Skip to content

Commit

Permalink
[Librarian] Regenerated @ 08245333f4a8c9235d547b189cd9c422f73e0e7e 7b…
Browse files Browse the repository at this point in the history
…b98153c25ebfee95e6e85bd4c57969e6d02435
  • Loading branch information
twilio-dx committed Sep 25, 2024
1 parent 10d3610 commit c19a06d
Show file tree
Hide file tree
Showing 39 changed files with 1,382 additions and 33 deletions.
11 changes: 11 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
twilio-go changelog
====================
[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
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"`
}
14 changes: 12 additions & 2 deletions rest/assistants/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,31 @@ Class | Method | HTTP request | Description
*AssistantsApi* | [**CreateAssistant**](docs/AssistantsApi.md#createassistant) | **Post** /v1/Assistants | Create a new assistant
*AssistantsApi* | [**DeleteAssistant**](docs/AssistantsApi.md#deleteassistant) | **Delete** /v1/Assistants/{id} | Delete an assistant by ID
*AssistantsApi* | [**FetchAssistant**](docs/AssistantsApi.md#fetchassistant) | **Get** /v1/Assistants/{id} | Get an assistant by ID
*AssistantsApi* | [**ListAssistant**](docs/AssistantsApi.md#listassistant) | **Get** /v1/Assistants | List all assistants
*AssistantsApi* | [**ListAssistants**](docs/AssistantsApi.md#listassistants) | **Get** /v1/Assistants | List all assistants
*AssistantsApi* | [**UpdateAssistant**](docs/AssistantsApi.md#updateassistant) | **Put** /v1/Assistants/{id} | Update an assistant by ID
*AssistantsFeedbacksApi* | [**CreateFeedback**](docs/AssistantsFeedbacksApi.md#createfeedback) | **Post** /v1/Assistants/{id}/Feedbacks | Create feedback
*AssistantsFeedbacksApi* | [**ListFeedback**](docs/AssistantsFeedbacksApi.md#listfeedback) | **Get** /v1/Assistants/{id}/Feedbacks | List feedbacks
*AssistantsKnowledgeApi* | [**CreateAssistantKnowledgeAttachment**](docs/AssistantsKnowledgeApi.md#createassistantknowledgeattachment) | **Post** /v1/Assistants/{assistantId}/Knowledge/{id} | Attach Knowledge to Assistant
*AssistantsKnowledgeApi* | [**DeleteAssistantKnowledgeAttachment**](docs/AssistantsKnowledgeApi.md#deleteassistantknowledgeattachment) | **Delete** /v1/Assistants/{assistantId}/Knowledge/{id} | Detach Knowledge to Assistant
*AssistantsKnowledgeApi* | [**ListKnowledgeByAssistant**](docs/AssistantsKnowledgeApi.md#listknowledgebyassistant) | **Get** /v1/Assistants/{assistantId}/Knowledge | List all knowledge for an Assistant
*AssistantsMessagesApi* | [**CreateMessage**](docs/AssistantsMessagesApi.md#createmessage) | **Post** /v1/Assistants/{id}/Messages | Send a message to the assistant
*AssistantsToolsApi* | [**CreateAssistantToolAttachment**](docs/AssistantsToolsApi.md#createassistanttoolattachment) | **Post** /v1/Assistants/{assistantId}/Tools/{id} | Attach Tool to Assistant
*AssistantsToolsApi* | [**DeleteAssistantToolAttachment**](docs/AssistantsToolsApi.md#deleteassistanttoolattachment) | **Delete** /v1/Assistants/{assistantId}/Tools/{id} | Detach Tool to Assistant
*AssistantsToolsApi* | [**ListToolsByAssistant**](docs/AssistantsToolsApi.md#listtoolsbyassistant) | **Get** /v1/Assistants/{assistantId}/Tools | List tools for an Assistant
*KnowledgeApi* | [**CreateKnowledge**](docs/KnowledgeApi.md#createknowledge) | **Post** /v1/Knowledge | Create knowledge
*KnowledgeApi* | [**DeleteKnowledge**](docs/KnowledgeApi.md#deleteknowledge) | **Delete** /v1/Knowledge/{id} | Delete knowledge
*KnowledgeApi* | [**FetchKnowledge**](docs/KnowledgeApi.md#fetchknowledge) | **Get** /v1/Knowledge/{id} | Get knowledge
*KnowledgeApi* | [**ListKnowledge**](docs/KnowledgeApi.md#listknowledge) | **Get** /v1/Knowledge | List all knowledge
*KnowledgeApi* | [**UpdateKnowledge**](docs/KnowledgeApi.md#updateknowledge) | **Put** /v1/Knowledge/{id} | Update knowledge
*KnowledgeChunksApi* | [**ListKnowledgeChunks**](docs/KnowledgeChunksApi.md#listknowledgechunks) | **Get** /v1/Knowledge/{id}/Chunks | List knowledge chunks
*KnowledgeStatusApi* | [**FetchKnowledgeStatus**](docs/KnowledgeStatusApi.md#fetchknowledgestatus) | **Get** /v1/Knowledge/{id}/Status | Get knowledge status
*PoliciesApi* | [**ListPolicies**](docs/PoliciesApi.md#listpolicies) | **Get** /v1/Policies | List policies
*SessionsApi* | [**FetchSession**](docs/SessionsApi.md#fetchsession) | **Get** /v1/Sessions/{id} | Get a session by ID
*SessionsApi* | [**ListSessions**](docs/SessionsApi.md#listsessions) | **Get** /v1/Sessions | List sessions
*SessionsMessagesApi* | [**ListMessages**](docs/SessionsMessagesApi.md#listmessages) | **Get** /v1/Sessions/{sessionId}/Messages | List messages
*ToolsApi* | [**CreateTool**](docs/ToolsApi.md#createtool) | **Post** /v1/Tools | Create tool
*ToolsApi* | [**DeleteTool**](docs/ToolsApi.md#deletetool) | **Delete** /v1/Tools/{id} | Delete tool
*ToolsApi* | [**FetchTool**](docs/ToolsApi.md#fetchtool) | **Get** /v1/Tools/{id} | Get tool
*ToolsApi* | [**ListTools**](docs/ToolsApi.md#listtools) | **Get** /v1/Tools | List tools
*ToolsApi* | [**UpdateTool**](docs/ToolsApi.md#updatetool) | **Put** /v1/Tools/{id} | Update tool

Expand All @@ -59,11 +68,11 @@ Class | Method | HTTP request | Description
- [AssistantsV1CreateAssistantRequest](docs/AssistantsV1CreateAssistantRequest.md)
- [AssistantsV1KnowledgeChunk](docs/AssistantsV1KnowledgeChunk.md)
- [AssistantsV1AssistantSendMessageResponse](docs/AssistantsV1AssistantSendMessageResponse.md)
- [AssistantsV1SearchKnowledgeRequest](docs/AssistantsV1SearchKnowledgeRequest.md)
- [AssistantsV1CreatePolicyRequest](docs/AssistantsV1CreatePolicyRequest.md)
- [AssistantsV1SegmentCredential](docs/AssistantsV1SegmentCredential.md)
- [AssistantsV1CustomerAi](docs/AssistantsV1CustomerAi.md)
- [AssistantsV1Knowledge](docs/AssistantsV1Knowledge.md)
- [ListKnowledgeByAssistantResponse](docs/ListKnowledgeByAssistantResponse.md)
- [AssistantsV1Message](docs/AssistantsV1Message.md)
- [ListToolsResponse](docs/ListToolsResponse.md)
- [AssistantsV1UpdateToolRequest](docs/AssistantsV1UpdateToolRequest.md)
Expand All @@ -75,6 +84,7 @@ Class | Method | HTTP request | Description
- [AssistantsV1Policy](docs/AssistantsV1Policy.md)
- [AssistantsV1ToolWithPolicies](docs/AssistantsV1ToolWithPolicies.md)
- [ListKnowledgeChunksResponse](docs/ListKnowledgeChunksResponse.md)
- [ListToolsByAssistantResponse](docs/ListToolsByAssistantResponse.md)
- [AssistantsV1AssistantWithToolsAndKnowledge](docs/AssistantsV1AssistantWithToolsAndKnowledge.md)
- [ListKnowledgeResponse](docs/ListKnowledgeResponse.md)
- [AssistantsV1Tool](docs/AssistantsV1Tool.md)
Expand Down
Loading

0 comments on commit c19a06d

Please sign in to comment.