From 53af4cb4180b5bb5a62972c35202dff9dee7ac6a Mon Sep 17 00:00:00 2001 From: Tom Laird-McConnell Date: Thu, 1 Nov 2018 12:03:14 -0700 Subject: [PATCH] update swagger --- libraries/Swagger/ConnectorAPI.json | 184 +++-- libraries/Swagger/StateAPI.json | 1036 +++++++++++++-------------- 2 files changed, 626 insertions(+), 594 deletions(-) diff --git a/libraries/Swagger/ConnectorAPI.json b/libraries/Swagger/ConnectorAPI.json index e9f62e174d..af1b9144c0 100644 --- a/libraries/Swagger/ConnectorAPI.json +++ b/libraries/Swagger/ConnectorAPI.json @@ -278,69 +278,69 @@ } }, "/v3/conversations/{conversationId}/activities/history": { - "post": { - "tags": [ - "Conversations" - ], - "summary": "SendConversationHistory", - "description": "This method allows you to upload the historic activities to the conversation.\r\n\r\nSender must ensure that the historic activities have unique ids and appropriate timestamps. The ids are used by the client to deal with duplicate activities and the timestamps are used by the client to render the activities in the right order.", - "operationId": "Conversations_SendConversationHistory", - "consumes": [ - "application/json", - "text/json", - "application/xml", - "text/xml", - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json", - "text/json" - ], - "parameters": [ - { - "name": "conversationId", - "in": "path", - "description": "Conversation ID", - "required": true, - "type": "string" - }, - { - "name": "transcript", - "in": "body", - "description": "Transcript of activities", - "required": true, - "schema": { - "$ref": "#/definitions/Transcript" - } - } - ], - "responses": { - "200": { - "description": "An object will be returned containing the ID for the resource.", - "schema": { - "$ref": "#/definitions/ResourceResponse" - } - }, - "201": { - "description": "A ResourceResponse object will be returned containing the ID for the resource.", - "schema": { - "$ref": "#/definitions/ResourceResponse" - } - }, - "202": { - "description": "An object will be returned containing the ID for the resource.", - "schema": { - "$ref": "#/definitions/ResourceResponse" - } - }, - "default": { - "description": "The operation failed and the response is an error object describing the status code and failure.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } + "post": { + "tags": [ + "Conversations" + ], + "summary": "SendConversationHistory", + "description": "This method allows you to upload the historic activities to the conversation.\r\n\r\nSender must ensure that the historic activities have unique ids and appropriate timestamps. The ids are used by the client to deal with duplicate activities and the timestamps are used by the client to render the activities in the right order.", + "operationId": "Conversations_SendConversationHistory", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "conversationId", + "in": "path", + "description": "Conversation ID", + "required": true, + "type": "string" + }, + { + "name": "history", + "in": "body", + "description": "Historic activities", + "required": true, + "schema": { + "$ref": "#/definitions/Transcript" + } + } + ], + "responses": { + "200": { + "description": "An object will be returned containing the ID for the resource.", + "schema": { + "$ref": "#/definitions/ResourceResponse" + } + }, + "201": { + "description": "A ResourceResponse object will be returned containing the ID for the resource.", + "schema": { + "$ref": "#/definitions/ResourceResponse" + } + }, + "202": { + "description": "An object will be returned containing the ID for the resource.", + "schema": { + "$ref": "#/definitions/ResourceResponse" } + }, + "default": { + "description": "The operation failed and the response is an error object describing the status code and failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } } + } }, "/v3/conversations/{conversationId}/activities/{activityId}": { "put": { @@ -909,6 +909,10 @@ "description": "Display friendly name", "type": "string" }, + "aadObjectId": { + "description": "This account's object ID within Azure Active Directory (AAD)", + "type": "string" + }, "role": { "$ref": "#/definitions/RoleTypes", "description": "Role of the entity behind the account (Example: User, Bot, etc.)" @@ -937,6 +941,10 @@ "description": "Contains the date and time that the message was sent, in local time, expressed in ISO-8601 format.\r\nFor example, 2016-09-23T13:07:49.4714686-07:00.", "type": "string" }, + "localTimezone": { + "description": "Contains the name of the timezone in which the message, in local time, expressed in IANA Time Zone database format.\r\nFor example, America/Los_Angeles.", + "type": "string" + }, "serviceUrl": { "description": "Contains the URL that specifies the channel's service endpoint. Set by the channel.", "type": "string" @@ -1086,7 +1094,7 @@ }, "deliveryMode": { "$ref": "#/definitions/DeliveryModes", - "description": "A delivery hint to signal to the recipient alternate delivery paths for the activity.\r\nThe default delivery mode is \"default\"." + "description": "A delivery hint to signal to the recipient alternate delivery paths for the activity.\r\nThe default delivery mode is \"default\"." }, "listenFor": { "description": "List of phrases and references that speech and language priming systems should listen for", @@ -1128,6 +1136,10 @@ "description": "Display friendly name", "type": "string" }, + "aadObjectId": { + "description": "This account's object ID within Azure Active Directory (AAD)", + "type": "string" + }, "role": { "$ref": "#/definitions/RoleTypes", "description": "Role of the entity behind the account (Example: User, Bot, etc.)" @@ -1191,11 +1203,11 @@ } }, "Entity": { - "description": "Object of schema.org types", + "description": "Metadata object pertaining to an activity", "type": "object", "properties": { "type": { - "description": "Entity Type (typically from schema.org types)", + "description": "Type of this entity (RFC 3987 IRI)", "type": "string" } } @@ -1257,7 +1269,7 @@ "description": "Entities associated with this action", "type": "object", "additionalProperties": { - "type": "object" + "$ref": "#/definitions/Entity" } } } @@ -1289,6 +1301,10 @@ "value": { "description": "Supplementary parameter for action. Content of this property depends on the ActionType", "type": "object" + }, + "channelData": { + "description": "Channel-specific data associated with this action", + "type": "object" } } }, @@ -1355,11 +1371,11 @@ } }, "Transcript": { - "description": "Conversation Transcript", + "description": "Transcript", "type": "object", "properties": { "activities": { - "description": "Array of conversation activities.", + "description": "A collection of Activities that conforms to the Transcript schema.", "type": "array", "items": { "$ref": "#/definitions/Activity" @@ -1483,7 +1499,7 @@ "description": "Thumbnail placeholder" }, "media": { - "description": "Media URLs for this card", + "description": "Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content.", "type": "array", "items": { "$ref": "#/definitions/MediaUrl" @@ -1509,7 +1525,11 @@ "type": "boolean" }, "aspect": { - "description": "Aspect ratio of thumbnail/media placeholder, allowed values are \"16:9\" and \"4:3\"", + "description": "Aspect ratio of thumbnail/media placeholder. Allowed values are \"16:9\" and \"4:3\"", + "type": "string" + }, + "duration": { + "description": "Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field.", "type": "string" }, "value": { @@ -1567,7 +1587,7 @@ "description": "Thumbnail placeholder" }, "media": { - "description": "Media URLs for this card", + "description": "Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content.", "type": "array", "items": { "$ref": "#/definitions/MediaUrl" @@ -1593,7 +1613,11 @@ "type": "boolean" }, "aspect": { - "description": "Aspect ratio of thumbnail/media placeholder, allowed values are \"16:9\" and \"4:3\"", + "description": "Aspect ratio of thumbnail/media placeholder. Allowed values are \"16:9\" and \"4:3\"", + "type": "string" + }, + "duration": { + "description": "Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field.", "type": "string" }, "value": { @@ -1659,7 +1683,7 @@ "description": "Thumbnail placeholder" }, "media": { - "description": "Media URLs for this card", + "description": "Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content.", "type": "array", "items": { "$ref": "#/definitions/MediaUrl" @@ -1685,7 +1709,11 @@ "type": "boolean" }, "aspect": { - "description": "Aspect ratio of thumbnail/media placeholder, allowed values are \"16:9\" and \"4:3\"", + "description": "Aspect ratio of thumbnail/media placeholder. Allowed values are \"16:9\" and \"4:3\"", + "type": "string" + }, + "duration": { + "description": "Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field.", "type": "string" }, "value": { @@ -1884,7 +1912,7 @@ "description": "Thumbnail placeholder" }, "media": { - "description": "Media URLs for this card", + "description": "Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content.", "type": "array", "items": { "$ref": "#/definitions/MediaUrl" @@ -1910,7 +1938,11 @@ "type": "boolean" }, "aspect": { - "description": "Aspect ratio of thumbnail/media placeholder, allowed values are \"16:9\" and \"4:3\"", + "description": "Aspect ratio of thumbnail/media placeholder. Allowed values are \"16:9\" and \"4:3\"", + "type": "string" + }, + "duration": { + "description": "Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field.", "type": "string" }, "value": { @@ -1961,7 +1993,7 @@ "type": "string" }, "type": { - "description": "Entity Type (typically from schema.org types)", + "description": "Type of this entity (RFC 3987 IRI)", "type": "string" } } diff --git a/libraries/Swagger/StateAPI.json b/libraries/Swagger/StateAPI.json index a59febdab5..499ce2bc5c 100644 --- a/libraries/Swagger/StateAPI.json +++ b/libraries/Swagger/StateAPI.json @@ -1,542 +1,542 @@ { - "swagger": "2.0", - "info": { - "version": "v3", - "title": "Microsoft Bot Connector API - v3.0", - "description": "The Bot State REST API allows your bot to store and retrieve state associated with conversations conducted through\r\nthe [Bot Connector REST API](/en-us/restapi/connector). The Bot State REST API uses REST and HTTPS to send and receive\r\nencoded content that your bot controls.\r\n\r\nClient libraries for this REST API are available. See below for a list.\r\n\r\nYour bot may store data for a user, a conversation, or a single user within a conversation (called \"private\" data).\r\nEach payload may be up to 32 kilobytes in size. The data may be removed by the bot or upon a user's request, e.g.\r\nif the user requests the channel to inform the bot (and therefore, the Bot Framework) to delete the user's data.\r\n\r\nThe Bot State REST API is only useful in conjunction with the Bot Connector REST API.\r\n\r\nAuthentication for both the Bot State and Bot Connector REST APIs is accomplished with JWT Bearer tokens, and is\r\ndescribed in detail in the [Connector Authentication](/en-us/restapi/authentication) document.\r\n\r\nCurrently, clients calling the Bot State REST API must send their requests to the ```state.botframework.com```\r\nhost. Channel services do not currently implement the Bot State REST API.\r\n\r\nRequests to update bot state include an ```eTag``` property within the JSON payload. You may use the ```eTag```\r\nfor optimistic concurrency control. If you include an ```eTag``` value equivalent to the ```eTag``` you saw\r\nin a prior object, the Bot State REST API will fail the request with an HTTP 409 or 412 error, on update or create,\r\nrespectively. If you wish to overwrite whatever data is in the Bot State service, set ```eTag``` to ```*```.\r\n\r\n# Client Libraries for the Bot State REST API\r\n\r\n* [Bot Builder for C#](/en-us/csharp/builder/sdkreference/)\r\n* [Bot Builder for Node.js](/en-us/node/builder/overview/)\r\n* Generate your own from the [State API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/StateAPI.json)\r\n\r\n© 2016 Microsoft", - "termsOfService": "https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx", - "contact": { - "name": "Bot Framework", - "url": "https://botframework.com", - "email": "botframework@microsoft.com" - }, - "license": { - "name": "The MIT License (MIT)", - "url": "https://opensource.org/licenses/MIT" - } + "swagger": "2.0", + "info": { + "version": "v3", + "title": "Microsoft Bot Framework API - v3.0", + "description": "The Bot State REST API allows your bot to store and retrieve state associated with conversations conducted through\r\nthe [Bot Connector REST API](/en-us/restapi/connector). The Bot State REST API uses REST and HTTPS to send and receive\r\nencoded content that your bot controls.\r\n\r\nClient libraries for this REST API are available. See below for a list.\r\n\r\nYour bot may store data for a user, a conversation, or a single user within a conversation (called \"private\" data).\r\nEach payload may be up to 32 kilobytes in size. The data may be removed by the bot or upon a user's request, e.g.\r\nif the user requests the channel to inform the bot (and therefore, the Bot Framework) to delete the user's data.\r\n\r\nThe Bot State REST API is only useful in conjunction with the Bot Connector REST API.\r\n\r\nAuthentication for both the Bot State and Bot Connector REST APIs is accomplished with JWT Bearer tokens, and is\r\ndescribed in detail in the [Connector Authentication](/en-us/restapi/authentication) document.\r\n\r\nCurrently, clients calling the Bot State REST API must send their requests to the ```state.botframework.com```\r\nhost. Channel services do not currently implement the Bot State REST API.\r\n\r\nRequests to update bot state include an ```eTag``` property within the JSON payload. You may use the ```eTag```\r\nfor optimistic concurrency control. If you include an ```eTag``` value equivalent to the ```eTag``` you saw\r\nin a prior object, the Bot State REST API will fail the request with an HTTP 409 or 412 error, on update or create,\r\nrespectively. If you wish to overwrite whatever data is in the Bot State service, set ```eTag``` to ```*```.\r\n\r\n# Client Libraries for the Bot State REST API\r\n\r\n* [Bot Builder for C#](/en-us/csharp/builder/sdkreference/)\r\n* [Bot Builder for Node.js](/en-us/node/builder/overview/)\r\n* Generate your own from the [State API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/StateAPI.json)\r\n\r\n© 2016 Microsoft", + "termsOfService": "https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx", + "contact": { + "name": "Bot Framework", + "url": "https://botframework.com", + "email": "botframework@microsoft.com" }, - "host": "state.botframework.com", - "schemes": [ - "https" - ], - "paths": { - "/v3/botstate/{channelId}/users/{userId}": { - "get": { - "tags": [ - "BotState" - ], - "summary": "Get user data. This API is deprecated, see https://aka.ms/AA1vm7i", - "description": "Get the bot's data for the user across all conversations", - "operationId": "BotState_GetUserData", - "consumes": [], - "produces": [ - "application/json", - "text/json", - "application/xml", - "text/xml" - ], - "parameters": [ - { - "name": "channelId", - "in": "path", - "description": "channelId", - "required": true, - "type": "string" - }, - { - "name": "userId", - "in": "path", - "description": "id for the user on the channel", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "A bot data object will be returned containing your object", - "schema": { - "$ref": "#/definitions/BotData" - } - }, - "default": { - "description": "The operation failed and the response is an error object describing the status code and failure.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "deprecated": true - }, - "post": { - "tags": [ - "BotState" - ], - "summary": "Set user data. This API is deprecated, see https://aka.ms/AA1vm7i", - "description": "Update the bot's data for a user", - "operationId": "BotState_SetUserData", - "consumes": [ - "application/json", - "text/json", - "application/xml", - "text/xml", - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json", - "text/json", - "application/xml", - "text/xml" - ], - "parameters": [ - { - "name": "channelId", - "in": "path", - "description": "channelId", - "required": true, - "type": "string" - }, - { - "name": "userId", - "in": "path", - "description": "id for the user on the channel", - "required": true, - "type": "string" - }, - { - "name": "botData", - "in": "body", - "description": "the new botdata", - "required": true, - "schema": { - "$ref": "#/definitions/BotData" - } - } - ], - "responses": { - "200": { - "description": "A bot data object will be returned containing your object", - "schema": { - "$ref": "#/definitions/BotData" - } - }, - "default": { - "description": "The operation failed and the response is an error object describing the status code and failure.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "deprecated": true - }, - "delete": { - "tags": [ - "BotState" - ], - "summary": "Delete state for user. This API is deprecated, see https://aka.ms/AA1vm7i", - "description": "Delete all data for a user in a channel (UserData and PrivateConversationData)", - "operationId": "BotState_DeleteStateForUser", - "consumes": [], - "produces": [ - "application/json", - "text/json", - "application/xml", - "text/xml" - ], - "parameters": [ - { - "name": "channelId", - "in": "path", - "description": "channelId", - "required": true, - "type": "string" - }, - { - "name": "userId", - "in": "path", - "description": "id for the user on the channel", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object" - } - }, - "204": { - "description": "The operation succeeded but no content was returned." - }, - "default": { - "description": "The operation failed and the response is an error object describing the status code and failure.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "deprecated": true + "license": { + "name": "The MIT License (MIT)", + "url": "https://opensource.org/licenses/MIT" + } + }, + "host": "state.botframework.com", + "schemes": [ + "https" + ], + "paths": { + "/v3/botstate/{channelId}/users/{userId}": { + "get": { + "tags": [ + "BotState" + ], + "summary": "Get user data. This API is deprecated, see https://aka.ms/AA1vm7i", + "description": "Get the bot's data for the user across all conversations", + "operationId": "BotState_GetUserData", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "channelId", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "id for the user on the channel", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "A bot data object will be returned containing your object", + "schema": { + "$ref": "#/definitions/BotData" } - }, - "/v3/botstate/{channelId}/conversations/{conversationId}": { - "get": { - "tags": [ - "BotState" - ], - "summary": "Get conversation data. This API is deprecated, see https://aka.ms/AA1vm7i", - "description": "Get the bot's data for all users in a conversation", - "operationId": "BotState_GetConversationData", - "consumes": [], - "produces": [ - "application/json", - "text/json", - "application/xml", - "text/xml" - ], - "parameters": [ - { - "name": "channelId", - "in": "path", - "description": "the channelId", - "required": true, - "type": "string" - }, - { - "name": "conversationId", - "in": "path", - "description": "The id for the conversation on the channel", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "A bot data object will be returned containing your object", - "schema": { - "$ref": "#/definitions/BotData" - } - }, - "default": { - "description": "The operation failed and the response is an error object describing the status code and failure.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "deprecated": true - }, - "post": { - "tags": [ - "BotState" - ], - "summary": "Set conversation data. This API is deprecated, see https://aka.ms/AA1vm7i", - "description": "Update the bot's data for all users in a conversation", - "operationId": "BotState_SetConversationData", - "consumes": [ - "application/json", - "text/json", - "application/xml", - "text/xml", - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json", - "text/json", - "application/xml", - "text/xml" - ], - "parameters": [ - { - "name": "channelId", - "in": "path", - "description": "channelId", - "required": true, - "type": "string" - }, - { - "name": "conversationId", - "in": "path", - "description": "The id for the conversation on the channel", - "required": true, - "type": "string" - }, - { - "name": "botData", - "in": "body", - "description": "the new botdata", - "required": true, - "schema": { - "$ref": "#/definitions/BotData" - } - } - ], - "responses": { - "200": { - "description": "A bot data object will be returned containing your object", - "schema": { - "$ref": "#/definitions/BotData" - } - }, - "default": { - "description": "The operation failed and the response is an error object describing the status code and failure.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "deprecated": true + }, + "default": { + "description": "The operation failed and the response is an error object describing the status code and failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" } + } }, - "/v3/botstate/{channelId}/conversations/{conversationId}/users/{userId}": { - "get": { - "tags": [ - "BotState" - ], - "summary": "Get private conversation data. This API is deprecated, see https://aka.ms/AA1vm7i", - "description": "Get the bot's data for a single user in a conversation", - "operationId": "BotState_GetPrivateConversationData", - "consumes": [], - "produces": [ - "application/json", - "text/json", - "application/xml", - "text/xml" - ], - "parameters": [ - { - "name": "channelId", - "in": "path", - "description": "channelId", - "required": true, - "type": "string" - }, - { - "name": "conversationId", - "in": "path", - "description": "The id for the conversation on the channel", - "required": true, - "type": "string" - }, - { - "name": "userId", - "in": "path", - "description": "id for the user on the channel", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "A bot data object will be returned containing your object", - "schema": { - "$ref": "#/definitions/BotData" - } - }, - "default": { - "description": "The operation failed and the response is an error object describing the status code and failure.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "deprecated": true - }, - "post": { - "tags": [ - "BotState" - ], - "summary": "Set private conversation data. This API is deprecated, see https://aka.ms/AA1vm7i", - "description": "Update the bot's data for a single user in a conversation", - "operationId": "BotState_SetPrivateConversationData", - "consumes": [ - "application/json", - "text/json", - "application/xml", - "text/xml", - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json", - "text/json", - "application/xml", - "text/xml" - ], - "parameters": [ - { - "name": "channelId", - "in": "path", - "description": "channelId", - "required": true, - "type": "string" - }, - { - "name": "conversationId", - "in": "path", - "description": "The id for the conversation on the channel", - "required": true, - "type": "string" - }, - { - "name": "userId", - "in": "path", - "description": "id for the user on the channel", - "required": true, - "type": "string" - }, - { - "name": "botData", - "in": "body", - "description": "the new botdata", - "required": true, - "schema": { - "$ref": "#/definitions/BotData" - } - } - ], - "responses": { - "200": { - "description": "A bot data object will be returned containing your object", - "schema": { - "$ref": "#/definitions/BotData" - } - }, - "default": { - "description": "The operation failed and the response is an error object describing the status code and failure.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "deprecated": true + "deprecated": true + }, + "post": { + "tags": [ + "BotState" + ], + "summary": "Set user data. This API is deprecated, see https://aka.ms/AA1vm7i", + "description": "Update the bot's data for a user", + "operationId": "BotState_SetUserData", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "channelId", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "id for the user on the channel", + "required": true, + "type": "string" + }, + { + "name": "botData", + "in": "body", + "description": "the new botdata", + "required": true, + "schema": { + "$ref": "#/definitions/BotData" + } + } + ], + "responses": { + "200": { + "description": "A bot data object will be returned containing your object", + "schema": { + "$ref": "#/definitions/BotData" } + }, + "default": { + "description": "The operation failed and the response is an error object describing the status code and failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } }, - "/v3/botstate/{channelId}/exportBotStateData": { - "get": { - "tags": [ - "BotState" - ], - "summary": "Export bot state data. This API is deprecated, see https://aka.ms/AA1vm7i", - "description": "Get all the state data for a bot in this channel. This returns a list of BotStateData and (possibly) a continuation token", - "operationId": "BotState_ExportBotStateData", - "consumes": [], - "produces": [ - "application/json", - "text/json", - "application/xml", - "text/xml" - ], - "parameters": [ - { - "name": "channelId", - "in": "path", - "description": "the channelId", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "A bot state data object will be returned. It contains a (possibly empty) array of BotStateData objects and a continuation token.", - "schema": { - "$ref": "#/definitions/BotStateDataResult" - } - }, - "default": { - "description": "The operation failed and the response is an error object describing the status code and failure.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "deprecated": true + "deprecated": true + }, + "delete": { + "tags": [ + "BotState" + ], + "summary": "Delete state for user. This API is deprecated, see https://aka.ms/AA1vm7i", + "description": "Delete all data for a user in a channel (UserData and PrivateConversationData)", + "operationId": "BotState_DeleteStateForUser", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "channelId", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "id for the user on the channel", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object" } - } - }, - "definitions": { - "BotData": { - "type": "object", - "properties": { - "data": { - "type": "object" - }, - "eTag": { - "type": "string" - } + }, + "204": { + "description": "The operation succeeded but no content was returned." + }, + "default": { + "description": "The operation failed and the response is an error object describing the status code and failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" } + } }, - "ErrorResponse": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } + "deprecated": true + } + }, + "/v3/botstate/{channelId}/conversations/{conversationId}": { + "get": { + "tags": [ + "BotState" + ], + "summary": "Get conversation data. This API is deprecated, see https://aka.ms/AA1vm7i", + "description": "Get the bot's data for all users in a conversation", + "operationId": "BotState_GetConversationData", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "the channelId", + "required": true, + "type": "string" + }, + { + "name": "conversationId", + "in": "path", + "description": "The id for the conversation on the channel", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "A bot data object will be returned containing your object", + "schema": { + "$ref": "#/definitions/BotData" + } + }, + "default": { + "description": "The operation failed and the response is an error object describing the status code and failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" } + } }, - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "innerHttpError": { - "$ref": "#/definitions/InnerHttpError" - } + "deprecated": true + }, + "post": { + "tags": [ + "BotState" + ], + "summary": "Set conversation data. This API is deprecated, see https://aka.ms/AA1vm7i", + "description": "Update the bot's data for all users in a conversation", + "operationId": "BotState_SetConversationData", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "channelId", + "required": true, + "type": "string" + }, + { + "name": "conversationId", + "in": "path", + "description": "The id for the conversation on the channel", + "required": true, + "type": "string" + }, + { + "name": "botData", + "in": "body", + "description": "the new botdata", + "required": true, + "schema": { + "$ref": "#/definitions/BotData" } + } + ], + "responses": { + "200": { + "description": "A bot data object will be returned containing your object", + "schema": { + "$ref": "#/definitions/BotData" + } + }, + "default": { + "description": "The operation failed and the response is an error object describing the status code and failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } }, - "InnerHttpError": { - "type": "object", - "properties": { - "statusCode": { - "format": "int32", - "type": "integer" - }, - "body": { - "type": "object" - } + "deprecated": true + } + }, + "/v3/botstate/{channelId}/conversations/{conversationId}/users/{userId}": { + "get": { + "tags": [ + "BotState" + ], + "summary": "Get private conversation data. This API is deprecated, see https://aka.ms/AA1vm7i", + "description": "Get the bot's data for a single user in a conversation", + "operationId": "BotState_GetPrivateConversationData", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "channelId", + "required": true, + "type": "string" + }, + { + "name": "conversationId", + "in": "path", + "description": "The id for the conversation on the channel", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "id for the user on the channel", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "A bot data object will be returned containing your object", + "schema": { + "$ref": "#/definitions/BotData" } + }, + "default": { + "description": "The operation failed and the response is an error object describing the status code and failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } }, - "BotStateDataResult": { - "type": "object", - "properties": { - "botStateData": { - "type": "array", - "items": { - "$ref": "#/definitions/BotStateData" - } - }, - "continuationToken": { - "type": "string" - } + "deprecated": true + }, + "post": { + "tags": [ + "BotState" + ], + "summary": "Set private conversation data. This API is deprecated, see https://aka.ms/AA1vm7i", + "description": "Update the bot's data for a single user in a conversation", + "operationId": "BotState_SetPrivateConversationData", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "channelId", + "required": true, + "type": "string" + }, + { + "name": "conversationId", + "in": "path", + "description": "The id for the conversation on the channel", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "id for the user on the channel", + "required": true, + "type": "string" + }, + { + "name": "botData", + "in": "body", + "description": "the new botdata", + "required": true, + "schema": { + "$ref": "#/definitions/BotData" + } + } + ], + "responses": { + "200": { + "description": "A bot data object will be returned containing your object", + "schema": { + "$ref": "#/definitions/BotData" } + }, + "default": { + "description": "The operation failed and the response is an error object describing the status code and failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } }, - "BotStateData": { - "type": "object", - "properties": { - "conversationId": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "data": { - "type": "string" - }, - "lastModified": { - "format": "date-time", - "type": "string" - } + "deprecated": true + } + }, + "/v3/botstate/{channelId}/exportBotStateData": { + "get": { + "tags": [ + "BotState" + ], + "summary": "Export bot state data. This API is deprecated, see https://aka.ms/AA1vm7i", + "description": "Get all the state data for a bot in this channel. This returns a list of BotStateData and (possibly) a continuation token", + "operationId": "BotState_ExportBotStateData", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "the channelId", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "A bot state data object will be returned. It contains a (possibly empty) array of BotStateData objects and a continuation token.", + "schema": { + "$ref": "#/definitions/BotStateDataResult" } + }, + "default": { + "description": "The operation failed and the response is an error object describing the status code and failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "deprecated": true + } + } + }, + "definitions": { + "BotData": { + "type": "object", + "properties": { + "data": { + "type": "object" + }, + "eTag": { + "type": "string" + } + } + }, + "ErrorResponse": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + } + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "innerHttpError": { + "$ref": "#/definitions/InnerHttpError" + } + } + }, + "InnerHttpError": { + "type": "object", + "properties": { + "statusCode": { + "format": "int32", + "type": "integer" + }, + "body": { + "type": "object" } + } }, - "securityDefinitions": { - "bearer_auth": { - "type": "apiKey", - "description": "Access token to authenticate calls to the Bot Connector Service.", - "name": "Authorization", - "in": "header" + "BotStateDataResult": { + "type": "object", + "properties": { + "botStateData": { + "type": "array", + "items": { + "$ref": "#/definitions/BotStateData" + } + }, + "continuationToken": { + "type": "string" } + } + }, + "BotStateData": { + "type": "object", + "properties": { + "conversationId": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "data": { + "type": "string" + }, + "lastModified": { + "format": "date-time", + "type": "string" + } + } + } + }, + "securityDefinitions": { + "bearer_auth": { + "type": "apiKey", + "description": "Access token to authenticate calls to the Bot Connector Service.", + "name": "Authorization", + "in": "header" } + } } \ No newline at end of file