Skip to content

Commit 01576aa

Browse files
authored
Merge branch 'main' into dii-1786
2 parents 6a65e0e + ca30225 commit 01576aa

File tree

683 files changed

+4257
-3324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

683 files changed

+4257
-3324
lines changed

.github/workflows/test-and-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
timeout-minutes: 20
1818
strategy:
1919
matrix:
20-
go: [ '1.15', '1.16', '1.17', '1.18', '1.19' ]
20+
go: [ '1.18.10', '1.19.13', '1.20', '1.21', '1.22', '1.23', '1.24' ]
2121
steps:
2222
- name: Setup Go environment
2323
uses: actions/setup-go@v3

CHANGES.md

+45
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,50 @@
11
twilio-go changelog
22
====================
3+
[2025-03-11] Version 1.24.0
4+
---------------------------
5+
**Api**
6+
- Add the missing `emergency_enabled` field for `Address Service` endpoints
7+
8+
**Messaging**
9+
- Add missing enums for A2P and TF
10+
11+
**Numbers**
12+
- add missing enum values to hosted_number_order_status
13+
14+
**Twiml**
15+
- Convert Twiml Attribute `speechModel` of type enum to string **(breaking change)**
16+
17+
**DataType Changes**
18+
- Some attributes in multiple APIs has changed from Dictionary to Object **(breaking change)**. Please refer to the [API documentation](https://github.com/twilio/twilio-oai]) for more details.
19+
20+
21+
[2025-02-20] Version 1.23.13
22+
----------------------------
23+
**Flex**
24+
- Adding Digital Transfers APIs under v1/Interactions
25+
26+
**Numbers**
27+
- Convert webhook_type to ienum type in v1/Porting/Configuration/Webhook/{webhook_type}
28+
29+
**Trusthub**
30+
- Changing TrustHub SupportingDocument status enum from lowercase to uppercase since kyc-orch returns status capitalized and rest proxy requires strict casing
31+
32+
33+
[2025-02-11] Version 1.23.12
34+
----------------------------
35+
**Api**
36+
- Change downstream url and change media type for file `base/api/v2010/validation_request.json`.
37+
38+
**Intelligence**
39+
- Add json_results for Generative JSON operator results
40+
41+
**Messaging**
42+
- Add DestinationAlphaSender API to support Country-Specific Alpha Senders
43+
44+
**Video**
45+
- Change codec type from enum to case-insensitive enum in recording and room_recording apis
46+
47+
348
[2025-01-28] Version 1.23.11
449
----------------------------
550
**Api**

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ The Go library documentation can be found [here][libdocs].
2424

2525
This library supports the following Go implementations:
2626

27-
- Go 1.15
28-
- Go 1.16
29-
- Go 1.17
3027
- Go 1.18
3128
- Go 1.19
3229
- Go 1.20
30+
- Go 1.21
31+
- Go 1.22
32+
- Go 1.23
33+
- Go 1.24
3334

3435
## Installation
3536

client/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
package client
33

44
// LibraryVersion specifies the current version of twilio-go.
5-
const LibraryVersion = "1.23.11"
5+
const LibraryVersion = "1.24.0"

cluster_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ func TestListParams(t *testing.T) {
9797
assert.Nil(t, err)
9898
assert.NotNil(t, sink)
9999

100-
types := []interface{}{
101-
map[string]interface{}{
100+
types := []map[string]interface{}{
101+
{
102102
"type": "com.twilio.messaging.message.delivered",
103103
},
104-
map[string]interface{}{
104+
{
105105
"type": "com.twilio.messaging.message.sent",
106106
},
107107
}

rest/accounts/v1/README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,24 @@ All URIs are relative to *https://accounts.twilio.com*
3131

3232
Class | Method | HTTP request | Description
3333
------------ | ------------- | ------------- | -------------
34-
*AuthTokensPromoteApi* | [**UpdateAuthTokenPromotion**](docs/AuthTokensPromoteApi.md#updateauthtokenpromotion) | **Post** /v1/AuthTokens/Promote |
35-
*AuthTokensSecondaryApi* | [**CreateSecondaryAuthToken**](docs/AuthTokensSecondaryApi.md#createsecondaryauthtoken) | **Post** /v1/AuthTokens/Secondary |
36-
*AuthTokensSecondaryApi* | [**DeleteSecondaryAuthToken**](docs/AuthTokensSecondaryApi.md#deletesecondaryauthtoken) | **Delete** /v1/AuthTokens/Secondary |
34+
*AuthTokensPromoteApi* | [**UpdateAuthTokenPromotion**](docs/AuthTokensPromoteApi.md#updateauthtokenpromotion) | **Post** /v1/AuthTokens/Promote | Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error.
35+
*AuthTokensSecondaryApi* | [**CreateSecondaryAuthToken**](docs/AuthTokensSecondaryApi.md#createsecondaryauthtoken) | **Post** /v1/AuthTokens/Secondary | Create a new secondary Auth Token
36+
*AuthTokensSecondaryApi* | [**DeleteSecondaryAuthToken**](docs/AuthTokensSecondaryApi.md#deletesecondaryauthtoken) | **Delete** /v1/AuthTokens/Secondary | Delete the secondary Auth Token from your account
3737
*ConsentsBulkApi* | [**CreateBulkConsents**](docs/ConsentsBulkApi.md#createbulkconsents) | **Post** /v1/Consents/Bulk |
3838
*ContactsBulkApi* | [**CreateBulkContacts**](docs/ContactsBulkApi.md#createbulkcontacts) | **Post** /v1/Contacts/Bulk |
39-
*CredentialsAWSApi* | [**CreateCredentialAws**](docs/CredentialsAWSApi.md#createcredentialaws) | **Post** /v1/Credentials/AWS |
40-
*CredentialsAWSApi* | [**DeleteCredentialAws**](docs/CredentialsAWSApi.md#deletecredentialaws) | **Delete** /v1/Credentials/AWS/{Sid} |
41-
*CredentialsAWSApi* | [**FetchCredentialAws**](docs/CredentialsAWSApi.md#fetchcredentialaws) | **Get** /v1/Credentials/AWS/{Sid} |
42-
*CredentialsAWSApi* | [**ListCredentialAws**](docs/CredentialsAWSApi.md#listcredentialaws) | **Get** /v1/Credentials/AWS |
43-
*CredentialsAWSApi* | [**UpdateCredentialAws**](docs/CredentialsAWSApi.md#updatecredentialaws) | **Post** /v1/Credentials/AWS/{Sid} |
44-
*CredentialsPublicKeysApi* | [**CreateCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#createcredentialpublickey) | **Post** /v1/Credentials/PublicKeys |
45-
*CredentialsPublicKeysApi* | [**DeleteCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#deletecredentialpublickey) | **Delete** /v1/Credentials/PublicKeys/{Sid} |
46-
*CredentialsPublicKeysApi* | [**FetchCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#fetchcredentialpublickey) | **Get** /v1/Credentials/PublicKeys/{Sid} |
47-
*CredentialsPublicKeysApi* | [**ListCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#listcredentialpublickey) | **Get** /v1/Credentials/PublicKeys |
48-
*CredentialsPublicKeysApi* | [**UpdateCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#updatecredentialpublickey) | **Post** /v1/Credentials/PublicKeys/{Sid} |
49-
*SafeListNumbersApi* | [**CreateSafelist**](docs/SafeListNumbersApi.md#createsafelist) | **Post** /v1/SafeList/Numbers |
50-
*SafeListNumbersApi* | [**DeleteSafelist**](docs/SafeListNumbersApi.md#deletesafelist) | **Delete** /v1/SafeList/Numbers |
51-
*SafeListNumbersApi* | [**FetchSafelist**](docs/SafeListNumbersApi.md#fetchsafelist) | **Get** /v1/SafeList/Numbers |
39+
*CredentialsAWSApi* | [**CreateCredentialAws**](docs/CredentialsAWSApi.md#createcredentialaws) | **Post** /v1/Credentials/AWS | Create a new AWS Credential
40+
*CredentialsAWSApi* | [**DeleteCredentialAws**](docs/CredentialsAWSApi.md#deletecredentialaws) | **Delete** /v1/Credentials/AWS/{Sid} | Delete a Credential from your account
41+
*CredentialsAWSApi* | [**FetchCredentialAws**](docs/CredentialsAWSApi.md#fetchcredentialaws) | **Get** /v1/Credentials/AWS/{Sid} | Fetch the AWS credentials specified by the provided Credential Sid
42+
*CredentialsAWSApi* | [**ListCredentialAws**](docs/CredentialsAWSApi.md#listcredentialaws) | **Get** /v1/Credentials/AWS | Retrieves a collection of AWS Credentials belonging to the account used to make the request
43+
*CredentialsAWSApi* | [**UpdateCredentialAws**](docs/CredentialsAWSApi.md#updatecredentialaws) | **Post** /v1/Credentials/AWS/{Sid} | Modify the properties of a given Account
44+
*CredentialsPublicKeysApi* | [**CreateCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#createcredentialpublickey) | **Post** /v1/Credentials/PublicKeys | Create a new Public Key Credential
45+
*CredentialsPublicKeysApi* | [**DeleteCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#deletecredentialpublickey) | **Delete** /v1/Credentials/PublicKeys/{Sid} | Delete a Credential from your account
46+
*CredentialsPublicKeysApi* | [**FetchCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#fetchcredentialpublickey) | **Get** /v1/Credentials/PublicKeys/{Sid} | Fetch the public key specified by the provided Credential Sid
47+
*CredentialsPublicKeysApi* | [**ListCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#listcredentialpublickey) | **Get** /v1/Credentials/PublicKeys | Retrieves a collection of Public Key Credentials belonging to the account used to make the request
48+
*CredentialsPublicKeysApi* | [**UpdateCredentialPublicKey**](docs/CredentialsPublicKeysApi.md#updatecredentialpublickey) | **Post** /v1/Credentials/PublicKeys/{Sid} | Modify the properties of a given Account
49+
*SafeListNumbersApi* | [**CreateSafelist**](docs/SafeListNumbersApi.md#createsafelist) | **Post** /v1/SafeList/Numbers | Add a new phone number to SafeList.
50+
*SafeListNumbersApi* | [**DeleteSafelist**](docs/SafeListNumbersApi.md#deletesafelist) | **Delete** /v1/SafeList/Numbers | Remove a phone number from SafeList.
51+
*SafeListNumbersApi* | [**FetchSafelist**](docs/SafeListNumbersApi.md#fetchsafelist) | **Get** /v1/SafeList/Numbers | Check if a phone number exists in SafeList.
5252

5353

5454
## Documentation For Models

rest/accounts/v1/consents_bulk.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import (
2222
// Optional parameters for the method 'CreateBulkConsents'
2323
type CreateBulkConsentsParams struct {
2424
// This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`].
25-
Items *[]interface{} `json:"Items,omitempty"`
25+
Items *[]map[string]interface{} `json:"Items,omitempty"`
2626
}
2727

28-
func (params *CreateBulkConsentsParams) SetItems(Items []interface{}) *CreateBulkConsentsParams {
28+
func (params *CreateBulkConsentsParams) SetItems(Items []map[string]interface{}) *CreateBulkConsentsParams {
2929
params.Items = &Items
3030
return params
3131
}

rest/accounts/v1/contacts_bulk.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import (
2222
// Optional parameters for the method 'CreateBulkContacts'
2323
type CreateBulkContactsParams struct {
2424
// A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code.
25-
Items *[]interface{} `json:"Items,omitempty"`
25+
Items *[]map[string]interface{} `json:"Items,omitempty"`
2626
}
2727

28-
func (params *CreateBulkContactsParams) SetItems(Items []interface{}) *CreateBulkContactsParams {
28+
func (params *CreateBulkContactsParams) SetItems(Items []map[string]interface{}) *CreateBulkContactsParams {
2929
params.Items = &Items
3030
return params
3131
}

rest/accounts/v1/docs/AccountsV1BulkConsents.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**Items** | Pointer to **interface{}** | A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty. |
7+
**Items** | Pointer to **map[string]interface{}** | A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty. |
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

rest/accounts/v1/docs/AccountsV1BulkContacts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**Items** | Pointer to **interface{}** | A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty. |
7+
**Items** | Pointer to **map[string]interface{}** | A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty. |
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

rest/accounts/v1/docs/AuthTokensPromoteApi.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ All URIs are relative to *https://accounts.twilio.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**UpdateAuthTokenPromotion**](AuthTokensPromoteApi.md#UpdateAuthTokenPromotion) | **Post** /v1/AuthTokens/Promote |
7+
[**UpdateAuthTokenPromotion**](AuthTokensPromoteApi.md#UpdateAuthTokenPromotion) | **Post** /v1/AuthTokens/Promote | Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error.
88

99

1010

1111
## UpdateAuthTokenPromotion
1212

1313
> AccountsV1AuthTokenPromotion UpdateAuthTokenPromotion(ctx, )
1414
15-
15+
Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error.
1616

1717
Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error.
1818

rest/accounts/v1/docs/AuthTokensSecondaryApi.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ All URIs are relative to *https://accounts.twilio.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**CreateSecondaryAuthToken**](AuthTokensSecondaryApi.md#CreateSecondaryAuthToken) | **Post** /v1/AuthTokens/Secondary |
8-
[**DeleteSecondaryAuthToken**](AuthTokensSecondaryApi.md#DeleteSecondaryAuthToken) | **Delete** /v1/AuthTokens/Secondary |
7+
[**CreateSecondaryAuthToken**](AuthTokensSecondaryApi.md#CreateSecondaryAuthToken) | **Post** /v1/AuthTokens/Secondary | Create a new secondary Auth Token
8+
[**DeleteSecondaryAuthToken**](AuthTokensSecondaryApi.md#DeleteSecondaryAuthToken) | **Delete** /v1/AuthTokens/Secondary | Delete the secondary Auth Token from your account
99

1010

1111

1212
## CreateSecondaryAuthToken
1313

1414
> AccountsV1SecondaryAuthToken CreateSecondaryAuthToken(ctx, )
1515
16-
16+
Create a new secondary Auth Token
1717

1818
Create a new secondary Auth Token
1919

@@ -48,7 +48,7 @@ Other parameters are passed through a pointer to a CreateSecondaryAuthTokenParam
4848

4949
> DeleteSecondaryAuthToken(ctx, )
5050
51-
51+
Delete the secondary Auth Token from your account
5252

5353
Delete the secondary Auth Token from your account
5454

rest/accounts/v1/docs/ConsentsBulkApi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Other parameters are passed through a pointer to a CreateBulkConsentsParams stru
2727

2828
Name | Type | Description
2929
------------- | ------------- | -------------
30-
**Items** | **[]interface{}** | This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`].
30+
**Items** | **[]map[string]interface{}** | This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`].
3131

3232
### Return type
3333

rest/accounts/v1/docs/ContactsBulkApi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Other parameters are passed through a pointer to a CreateBulkContactsParams stru
2727

2828
Name | Type | Description
2929
------------- | ------------- | -------------
30-
**Items** | **[]interface{}** | A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code.
30+
**Items** | **[]map[string]interface{}** | A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code.
3131

3232
### Return type
3333

0 commit comments

Comments
 (0)