diff --git a/CHANGES.md b/CHANGES.md index e0c62175..5f1c536c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,12 @@ twilio-cli-core changelog ===================== +[2019-08-05] Version 3.0.2 +--------------------------- +**Conversations** +- Switch library_visibility to public for Conversations Resources + + [2019-08-02] Version 3.0.1 --------------------------- **Library** diff --git a/package-lock.json b/package-lock.json index d6d4066d..00b4e6c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3655,9 +3655,9 @@ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, "twilio": { - "version": "3.33.2", - "resolved": "https://registry.npmjs.org/twilio/-/twilio-3.33.2.tgz", - "integrity": "sha512-aKmZKL5dP79Xt1pkEhHyTZQj9xRRaWBKPrOKa30aXYnm9mVxZ5FPVawipq+Sho7c6JYpmyQK1FNsTJhV78dtrQ==", + "version": "3.33.3", + "resolved": "https://registry.npmjs.org/twilio/-/twilio-3.33.3.tgz", + "integrity": "sha512-xw/NjPXJ7JoeDSC1Eq6rkxlRdgJhiLeE8BM2KeI14g9ir5Hb1ui9YKYacqnnv/Hf9ZgLvtz4O/HWXzRItg7kqA==", "requires": { "@types/express": "^4.16.1", "deprecate": "1.0.0", diff --git a/package.json b/package.json index e4e706a0..ac763f3e 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "request": "^2.88.0", "shelljs": "^0.8.3", "tsv": "^0.2.0", - "twilio": "^3.33.2" + "twilio": "^3.33.3" }, "peerDependencies": { "keytar": "^4.11.0" diff --git a/src/services/twilio-api/twilio_conversations.json b/src/services/twilio-api/twilio_conversations.json new file mode 100644 index 00000000..657a8092 --- /dev/null +++ b/src/services/twilio-api/twilio_conversations.json @@ -0,0 +1,1754 @@ +{ + "components": { + "schemas": { + "conversations.v1.conversation": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "chat_service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "friendly_name": { + "type": "string" + }, + "links": { + "type": "object" + }, + "messaging_service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^MG[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "conversations.v1.conversation.conversation_message": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "author": { + "type": "string" + }, + "body": { + "type": "string" + }, + "conversation_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "index": { + "type": "integer" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "conversations.v1.conversation.conversation_participant": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "conversation_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "identity": { + "type": "string" + }, + "messaging_binding": { + "type": "object" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^MB[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "conversations.v1.conversation.conversation_scoped_webhook": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "configuration": { + "type": "object" + }, + "conversation_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^WH[0-9a-fA-F]{32}$", + "type": "string" + }, + "target": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "conversations.v1.conversation_webhook": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "filters": { + "items": { + "type": "string" + }, + "type": "array" + }, + "method": { + "enum": [ + "GET", + "POST" + ], + "type": "string" + }, + "post_webhook_url": { + "type": "string" + }, + "pre_webhook_url": { + "type": "string" + }, + "target": { + "enum": [ + "webhook", + "flex" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "securitySchemes": { + "accountSid_authToken": { + "scheme": "basic", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "support@twilio.com", + "name": "Twilio Support", + "url": "https://support.twilio.com" + }, + "description": "This is the public Twilio REST API.", + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "https://www.twilio.com/legal/tos", + "title": "Twilio REST API", + "version": "81ff5a4" + }, + "openapi": "3.0.1", + "paths": { + "/v1/Conversations": { + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "conversations": { + "items": { + "$ref": "#/components/schemas/conversations.v1.conversation" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The human-readable name of this conversation, limited to 256 characters. Optional.", + "in": "query", + "name": "FriendlyName", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The date that this resource was created.", + "in": "query", + "name": "DateCreated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "The date that this resource was last updated.", + "in": "query", + "name": "DateUpdated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "The unique id of the [SMS Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to.", + "in": "query", + "name": "MessagingServiceSid", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "servers": [ + { + "url": "https://conversations.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Conversations/Webhooks": { + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation_webhook" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The HTTP method to be used when sending a webhook request.", + "in": "query", + "name": "Method", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`", + "in": "query", + "name": "Filters", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + { + "description": "The absolute url the pre-event webhook request should be sent to.", + "in": "query", + "name": "PreWebhookUrl", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The absolute url the post-event webhook request should be sent to.", + "in": "query", + "name": "PostWebhookUrl", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The routing target of the webhook. Can be ordinary or route internally to Flex", + "in": "query", + "name": "Target", + "required": false, + "schema": { + "enum": [ + "webhook", + "flex" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation_webhook" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "servers": [ + { + "url": "https://conversations.twilio.com" + } + ], + "x-default-output-properties": [ + "target", + "method", + "pre_webhook_url", + "post_webhook_url" + ], + "x-path-type": "instance" + }, + "/v1/Conversations/{ConversationSid}/Messages": { + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for messages.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "messages": { + "items": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_message" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The channel specific identifier of the message's author. Defaults to `system`.", + "in": "query", + "name": "Author", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The content of the message, can be up to 1,600 characters long.", + "in": "query", + "name": "Body", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The date that this resource was created.", + "in": "query", + "name": "DateCreated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "The date that this resource was last updated. `null` if the message has not been edited.", + "in": "query", + "name": "DateUpdated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_message" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "servers": [ + { + "url": "https://conversations.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "index", + "author", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Conversations/{ConversationSid}/Messages/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_message" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The channel specific identifier of the message's author. Defaults to `system`.", + "in": "query", + "name": "Author", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The content of the message, can be up to 1,600 characters long.", + "in": "query", + "name": "Body", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The date that this resource was created.", + "in": "query", + "name": "DateCreated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "The date that this resource was last updated. `null` if the message has not been edited.", + "in": "query", + "name": "DateUpdated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_message" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "servers": [ + { + "url": "https://conversations.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "index", + "author", + "date_created" + ], + "x-path-type": "instance" + }, + "/v1/Conversations/{ConversationSid}/Participants": { + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for participants.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "participants": { + "items": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_participant" + }, + "type": "array" + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "A unique string identifier for the conversation participant as [Chat User](https://www.twilio.com/docs/api/chat/rest/users). This parameter is non-null if (and only if) the participant is using the Programmable Chat SDK to communicate. Limited to 256 characters.", + "in": "query", + "name": "Identity", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The address of the participant's device, e.g. a phone number or Messenger ID. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from a Chat endpoint (see the 'identity' field). Limited to 256 characters.", + "in": "query", + "name": "MessagingBinding.Address", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The address of the Twilio phone number (or WhatsApp number, or Messenger Page ID) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from a Chat endpoint (see the 'identity' field). Limited to 256 characters.", + "in": "query", + "name": "MessagingBinding.ProxyAddress", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The date that this resource was created.", + "in": "query", + "name": "DateCreated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "The date that this resource was last updated.", + "in": "query", + "name": "DateUpdated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_participant" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "servers": [ + { + "url": "https://conversations.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "messaging_binding" + ], + "x-path-type": "list" + }, + "/v1/Conversations/{ConversationSid}/Participants/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^MB[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^MB[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_participant" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^MB[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The date that this resource was created.", + "in": "query", + "name": "DateCreated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "The date that this resource was last updated.", + "in": "query", + "name": "DateUpdated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_participant" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "servers": [ + { + "url": "https://conversations.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "messaging_binding" + ], + "x-path-type": "instance" + }, + "/v1/Conversations/{ConversationSid}/Webhooks": { + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "webhooks": { + "items": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_scoped_webhook" + }, + "type": "array" + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The target of this webhook: `webhook`, `studio`, `trigger`", + "in": "query", + "name": "Target", + "required": true, + "schema": { + "enum": [ + "webhook", + "trigger", + "studio" + ], + "type": "string" + } + }, + { + "description": "The absolute url the webhook request should be sent to.", + "in": "query", + "name": "Configuration.Url", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The HTTP method to be used when sending a webhook request.", + "in": "query", + "name": "Configuration.Method", + "required": false, + "schema": { + "enum": [ + "GET", + "POST" + ], + "type": "string" + } + }, + { + "description": "The list of events, firing webhook event for this Conversation.", + "in": "query", + "name": "Configuration.Filters", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + { + "description": "The list of keywords, firing webhook event for this Conversation.", + "in": "query", + "name": "Configuration.Triggers", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + { + "description": "The studio flow sid, where the webhook should be sent to.", + "in": "query", + "name": "Configuration.FlowSid", + "required": false, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The message index for which and it's successors the webhook will be replayed. Not set by default", + "in": "query", + "name": "Configuration.ReplayAfter", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_scoped_webhook" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "servers": [ + { + "url": "https://conversations.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "target" + ], + "x-path-type": "list" + }, + "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^WH[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^WH[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_scoped_webhook" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The unique id of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook.", + "in": "path", + "name": "ConversationSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^WH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The absolute url the webhook request should be sent to.", + "in": "query", + "name": "Configuration.Url", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The HTTP method to be used when sending a webhook request.", + "in": "query", + "name": "Configuration.Method", + "required": false, + "schema": { + "enum": [ + "GET", + "POST" + ], + "type": "string" + } + }, + { + "description": "The list of events, firing webhook event for this Conversation.", + "in": "query", + "name": "Configuration.Filters", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + { + "description": "The list of keywords, firing webhook event for this Conversation.", + "in": "query", + "name": "Configuration.Triggers", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + { + "description": "The studio flow sid, where the webhook should be sent to.", + "in": "query", + "name": "Configuration.FlowSid", + "required": false, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation.conversation_scoped_webhook" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "servers": [ + { + "url": "https://conversations.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "target" + ], + "x-path-type": "instance" + }, + "/v1/Conversations/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "A 34 character string that uniquely identifies this resource.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The human-readable name of this conversation, limited to 256 characters. Optional.", + "in": "query", + "name": "FriendlyName", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The date that this resource was created.", + "in": "query", + "name": "DateCreated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "The date that this resource was last updated.", + "in": "query", + "name": "DateUpdated", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/conversations.v1.conversation" + } + } + } + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Preview" + ] + }, + "servers": [ + { + "url": "https://conversations.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "date_created" + ], + "x-path-type": "instance" + } + }, + "tags": [ + { + "description": "PLEASE NOTE that this is a Preview product that is subject to change. Use it with caution. If you currently do not have developer preview access, please contact help@twilio.com.", + "name": "Preview" + } + ] +} \ No newline at end of file