Skip to content

Commit

Permalink
Merge branch 'main' into pass_query_param_in_delete
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 authored Nov 20, 2024
2 parents 5630d25 + bd87738 commit d1a5a8a
Show file tree
Hide file tree
Showing 73 changed files with 2,366 additions and 70 deletions.
50 changes: 50 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
twilio-go changelog
====================
[2024-11-15] Version 1.23.6
---------------------------
**Api**
- Added `ivr-virtual-agent-custom-voices` and `ivr-virtual-agent-genai` to `usage_record` API.
- Add open-api file tag to realtime_transcriptions

**Taskrouter**
- Add `api-tag` property to workers reservation
- Add `api-tag` property to task reservation


[2024-10-24] Version 1.23.5
---------------------------
**Conversations**
- Expose ConversationWithParticipants resource that allows creating a conversation with participants


[2024-10-17] Version 1.23.4
---------------------------
**Api**
- Add response key `country` to fetch AvailablePhoneNumber resource by specific country.

**Messaging**
- Make library and doc public for requestManagedCert Endpoint


[2024-10-03] Version 1.23.3
---------------------------
**Messaging**
- Add A2P external campaign CnpMigration flag

**Numbers**
- Add address sid to portability API

**Verify**
- Add `SnaClientToken` optional parameter on Verification check.
- Add `EnableSnaClientToken` optional parameter for Verification creation.


[2024-09-25] Version 1.23.2
---------------------------
**Accounts**
- Update docs and mounts.
- Change library visibility to public
- Enable consent and contact bulk upsert APIs in prod.

**Serverless**
- Add is_plugin parameter in deployments api to check if it is plugins deployment


[2024-09-18] Version 1.23.1
---------------------------
**Library - Fix**
Expand Down
2 changes: 1 addition & 1 deletion client/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
package client

// LibraryVersion specifies the current version of twilio-go.
const LibraryVersion = "1.23.1"
const LibraryVersion = "1.23.6"
4 changes: 4 additions & 0 deletions rest/accounts/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Class | Method | HTTP request | Description
*AuthTokensPromoteApi* | [**UpdateAuthTokenPromotion**](docs/AuthTokensPromoteApi.md#updateauthtokenpromotion) | **Post** /v1/AuthTokens/Promote |
*AuthTokensSecondaryApi* | [**CreateSecondaryAuthToken**](docs/AuthTokensSecondaryApi.md#createsecondaryauthtoken) | **Post** /v1/AuthTokens/Secondary |
*AuthTokensSecondaryApi* | [**DeleteSecondaryAuthToken**](docs/AuthTokensSecondaryApi.md#deletesecondaryauthtoken) | **Delete** /v1/AuthTokens/Secondary |
*ConsentsBulkApi* | [**CreateBulkConsents**](docs/ConsentsBulkApi.md#createbulkconsents) | **Post** /v1/Consents/Bulk |
*ContactsBulkApi* | [**CreateBulkContacts**](docs/ContactsBulkApi.md#createbulkcontacts) | **Post** /v1/Contacts/Bulk |
*CredentialsAWSApi* | [**CreateCredentialAws**](docs/CredentialsAWSApi.md#createcredentialaws) | **Post** /v1/Credentials/AWS |
*CredentialsAWSApi* | [**DeleteCredentialAws**](docs/CredentialsAWSApi.md#deletecredentialaws) | **Delete** /v1/Credentials/AWS/{Sid} |
*CredentialsAWSApi* | [**FetchCredentialAws**](docs/CredentialsAWSApi.md#fetchcredentialaws) | **Get** /v1/Credentials/AWS/{Sid} |
Expand All @@ -51,6 +53,8 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [AccountsV1BulkContacts](docs/AccountsV1BulkContacts.md)
- [AccountsV1BulkConsents](docs/AccountsV1BulkConsents.md)
- [ListCredentialAwsResponse](docs/ListCredentialAwsResponse.md)
- [ListCredentialPublicKeyResponse](docs/ListCredentialPublicKeyResponse.md)
- [AccountsV1SecondaryAuthToken](docs/AccountsV1SecondaryAuthToken.md)
Expand Down
67 changes: 67 additions & 0 deletions rest/accounts/v1/consents_bulk.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Accounts
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package openapi

import (
"encoding/json"
"net/url"
)

// Optional parameters for the method 'CreateBulkConsents'
type CreateBulkConsentsParams struct {
// 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`].
Items *[]interface{} `json:"Items,omitempty"`
}

func (params *CreateBulkConsentsParams) SetItems(Items []interface{}) *CreateBulkConsentsParams {
params.Items = &Items
return params
}

//
func (c *ApiService) CreateBulkConsents(params *CreateBulkConsentsParams) (*AccountsV1BulkConsents, error) {
path := "/v1/Consents/Bulk"

data := url.Values{}
headers := map[string]interface{}{
"Content-Type": "application/x-www-form-urlencoded",
}

if params != nil && params.Items != nil {
for _, item := range *params.Items {
v, err := json.Marshal(item)

if err != nil {
return nil, err
}

data.Add("Items", string(v))
}
}

resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
if err != nil {
return nil, err
}

defer resp.Body.Close()

ps := &AccountsV1BulkConsents{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}

return ps, err
}
67 changes: 67 additions & 0 deletions rest/accounts/v1/contacts_bulk.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Accounts
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package openapi

import (
"encoding/json"
"net/url"
)

// Optional parameters for the method 'CreateBulkContacts'
type CreateBulkContactsParams struct {
// 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.
Items *[]interface{} `json:"Items,omitempty"`
}

func (params *CreateBulkContactsParams) SetItems(Items []interface{}) *CreateBulkContactsParams {
params.Items = &Items
return params
}

//
func (c *ApiService) CreateBulkContacts(params *CreateBulkContactsParams) (*AccountsV1BulkContacts, error) {
path := "/v1/Contacts/Bulk"

data := url.Values{}
headers := map[string]interface{}{
"Content-Type": "application/x-www-form-urlencoded",
}

if params != nil && params.Items != nil {
for _, item := range *params.Items {
v, err := json.Marshal(item)

if err != nil {
return nil, err
}

data.Add("Items", string(v))
}
}

resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
if err != nil {
return nil, err
}

defer resp.Body.Close()

ps := &AccountsV1BulkContacts{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}

return ps, err
}
11 changes: 11 additions & 0 deletions rest/accounts/v1/docs/AccountsV1BulkConsents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AccountsV1BulkConsents

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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. |

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


11 changes: 11 additions & 0 deletions rest/accounts/v1/docs/AccountsV1BulkContacts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AccountsV1BulkContacts

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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. |

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


48 changes: 48 additions & 0 deletions rest/accounts/v1/docs/ConsentsBulkApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# ConsentsBulkApi

All URIs are relative to *https://accounts.twilio.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**CreateBulkConsents**](ConsentsBulkApi.md#CreateBulkConsents) | **Post** /v1/Consents/Bulk |



## CreateBulkConsents

> AccountsV1BulkConsents CreateBulkConsents(ctx, optional)




### Path Parameters

This endpoint does not need any path parameter.

### Other Parameters

Other parameters are passed through a pointer to a CreateBulkConsentsParams struct


Name | Type | Description
------------- | ------------- | -------------
**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`].

### Return type

[**AccountsV1BulkConsents**](AccountsV1BulkConsents.md)

### Authorization

[accountSid_authToken](../README.md#accountSid_authToken)

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json

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

48 changes: 48 additions & 0 deletions rest/accounts/v1/docs/ContactsBulkApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# ContactsBulkApi

All URIs are relative to *https://accounts.twilio.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**CreateBulkContacts**](ContactsBulkApi.md#CreateBulkContacts) | **Post** /v1/Contacts/Bulk |



## CreateBulkContacts

> AccountsV1BulkContacts CreateBulkContacts(ctx, optional)




### Path Parameters

This endpoint does not need any path parameter.

### Other Parameters

Other parameters are passed through a pointer to a CreateBulkContactsParams struct


Name | Type | Description
------------- | ------------- | -------------
**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.

### Return type

[**AccountsV1BulkContacts**](AccountsV1BulkContacts.md)

### Authorization

[accountSid_authToken](../README.md#accountSid_authToken)

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json

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

21 changes: 21 additions & 0 deletions rest/accounts/v1/model_accounts_v1_bulk_consents.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Accounts
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package openapi

// AccountsV1BulkConsents struct for AccountsV1BulkConsents
type AccountsV1BulkConsents struct {
// 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.
Items *interface{} `json:"items,omitempty"`
}
21 changes: 21 additions & 0 deletions rest/accounts/v1/model_accounts_v1_bulk_contacts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Accounts
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package openapi

// AccountsV1BulkContacts struct for AccountsV1BulkContacts
type AccountsV1BulkContacts struct {
// 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.
Items *interface{} `json:"items,omitempty"`
}
Loading

0 comments on commit d1a5a8a

Please sign in to comment.