From e11ed03bda64ff0e94e40da0153244c853fc1414 Mon Sep 17 00:00:00 2001 From: Zhixiang Zhan Date: Fri, 10 Dec 2021 16:03:47 +0800 Subject: [PATCH] Review request for Microsoft.BotService to update version stable/2021-03-01 (#16882) * fix api * add name property * update OP Channels_ListWithKeys * update type * mark the parameter value as x-ms-secret * allow null in value * ' * sync changes to 2021-05-01-preview Co-authored-by: FAREAST\hond --- .../2021-05-01-preview/botservice.json | 211 ++++++++++-------- .../examples/ListChannel.json | 52 +++++ .../stable/2021-03-01/botservice.json | 167 +++++++++----- .../2021-03-01/examples/ListChannel.json | 52 +++++ 4 files changed, 332 insertions(+), 150 deletions(-) diff --git a/specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/botservice.json b/specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/botservice.json index 463ad9098055..927fafb9ed93 100644 --- a/specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/botservice.json +++ b/specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/botservice.json @@ -583,7 +583,7 @@ "200": { "description": "If resource is retrieved successfully, the service should return 200 (OK).", "schema": { - "$ref": "#/definitions/BotChannel" + "$ref": "#/definitions/ListChannelWithKeysResponse" } }, "default": { @@ -1456,7 +1456,8 @@ }, "kind": { "$ref": "#/definitions/Kind", - "description": "Required. Gets or sets the Kind of the resource." + "description": "Required. Gets or sets the Kind of the resource.", + "x-nullable": true }, "etag": { "type": "string", @@ -1690,6 +1691,10 @@ "type": "string", "description": "The channel schema transformation version for the bot" }, + "storageResourceId": { + "type": "string", + "description": "The storage resourceId for the bot" + }, "privateEndpointConnections": { "type": "array", "readOnly": true, @@ -1740,6 +1745,25 @@ }, "description": "The list of bot service operation response." }, + "ListChannelWithKeysResponse": { + "type": "object", + "description": "The ARM channel of list channel with keys operation response.", + "allOf": [ + { + "$ref": "#/definitions/BotChannel" + } + ], + "properties": { + "resource": { + "$ref": "#/definitions/Channel", + "description": "The set of properties specific to bot channel resource" + }, + "setting": { + "$ref": "#/definitions/ChannelSettings", + "description": "Channel settings" + } + } + }, "BotChannel": { "type": "object", "description": "Bot channel resource definition", @@ -1755,6 +1779,51 @@ } } }, + "ChannelSettings": { + "type": "object", + "description": "Channel settings definition", + "properties": { + "extensionKey1": { + "type": "string", + "description": "The extensionKey1" + }, + "extensionKey2": { + "type": "string", + "description": "The extensionKey2" + }, + "sites": { + "type": "array", + "items": { + "$ref": "#/definitions/Site" + }, + "description": "The list of sites" + }, + "channelId": { + "type": "string", + "description": "The channel id" + }, + "channelDisplayName": { + "type": "string", + "description": "The channel display name" + }, + "botId": { + "type": "string", + "description": "The bot id" + }, + "botIconUrl": { + "type": "string", + "description": "The bot icon url" + }, + "isEnabled": { + "type": "boolean", + "description": "Whether this channel is enabled for the bot" + }, + "disableLocalAuth": { + "type": "boolean", + "description": "Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication." + } + } + }, "Channel": { "type": "object", "description": "Channel definition", @@ -1767,6 +1836,15 @@ "etag": { "type": "string", "description": "Entity Tag of the resource" + }, + "provisioningState": { + "type": "string", + "readOnly": true, + "description": "Provisioning state of the resource" + }, + "location": { + "description": "Specifies the location of the resource.", + "type": "string" } }, "required": [ @@ -1786,15 +1864,6 @@ "properties": { "$ref": "#/definitions/AlexaChannelProperties", "description": "The set of properties specific to Alexa channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" - }, - "provisioningState": { - "type": "string", - "readOnly": true, - "description": "Provisioning state of the resource" } } }, @@ -1838,14 +1907,6 @@ "properties": { "$ref": "#/definitions/FacebookChannelProperties", "description": "The set of properties specific to bot facebook channel" - }, - "provisioningState": { - "type": "string", - "description": "Provisioning state of the resource" - }, - "location": { - "type": "string", - "description": "Location of the resource" } } }, @@ -1919,14 +1980,6 @@ "properties": { "$ref": "#/definitions/EmailChannelProperties", "description": "The set of properties specific to email channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" - }, - "provisioningState": { - "type": "string", - "description": "Provisioning state of the resource" } } }, @@ -1964,18 +2017,6 @@ "properties": { "$ref": "#/definitions/MsTeamsChannelProperties", "description": "The set of properties specific to Microsoft Teams channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" - }, - "provisioningState": { - "type": "string", - "description": "Provisioning state of the resource" - }, - "location": { - "type": "string", - "description": "Location of the resource" } } }, @@ -2024,10 +2065,6 @@ "properties": { "$ref": "#/definitions/SkypeChannelProperties", "description": "The set of properties specific to Skype channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" } } }, @@ -2133,18 +2170,6 @@ "properties": { "$ref": "#/definitions/WebChatChannelProperties", "description": "The set of properties specific to Web Chat channel resource" - }, - "location": { - "type": "string", - "description": "Location of the resource" - }, - "provisioningState": { - "type": "string", - "description": "Provisioning state of the resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" } } }, @@ -2181,18 +2206,6 @@ "properties": { "$ref": "#/definitions/DirectLineChannelProperties", "description": "The set of properties specific to Direct Line channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" - }, - "provisioningState": { - "type": "string", - "description": "Provisioning state of the resource" - }, - "location": { - "type": "string", - "description": "Location of the resource" } } }, @@ -2225,14 +2238,6 @@ "properties": { "$ref": "#/definitions/TelegramChannelProperties", "description": "The set of properties specific to Telegram channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" - }, - "provisioningState": { - "type": "string", - "description": "Provisioning state of the resource" } } }, @@ -2270,10 +2275,6 @@ "properties": { "$ref": "#/definitions/SmsChannelProperties", "description": "The set of properties specific to Sms channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" } } }, @@ -2321,14 +2322,6 @@ "properties": { "$ref": "#/definitions/SlackChannelProperties", "description": "The set of properties specific to Slack channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" - }, - "location": { - "type": "string", - "description": "Location of the resource" } } }, @@ -2468,14 +2461,6 @@ "properties": { "$ref": "#/definitions/DirectLineSpeechChannelProperties", "description": "The set of properties specific to DirectLine Speech channel resource" - }, - "provisioningState": { - "type": "string", - "description": "Provisioning state of the resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" } } }, @@ -2566,7 +2551,8 @@ }, "isWebchatPreviewEnabled": { "type": "boolean", - "description": "Whether this site is enabled for preview versions of Webchat" + "description": "Whether this site is enabled for preview versions of Webchat", + "default": false } }, "required": [ @@ -2642,6 +2628,28 @@ "siteName" ] }, + "Site": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/WebChatSite" + }, + { + "$ref": "#/definitions/DirectLineSite" + } + ], + "properties": { + "isTokenEnabled": { + "type": "boolean", + "description": "Whether this site is token enabled for channel" + }, + "eTag": { + "type": "string", + "description": "Entity Tag" + } + }, + "description": "A site for the channel" + }, "SiteInfo": { "properties": { "siteName": { @@ -2686,13 +2694,22 @@ }, "value": { "type": "string", - "description": "Value associated with the Connection Setting Parameter." + "description": "Value associated with the Connection Setting Parameter.", + "x-nullable": true } }, "description": "Extra Parameter in a Connection Setting Properties to indicate service provider specific properties" }, "ConnectionSettingProperties": { "properties": { + "id": { + "type": "string", + "description": "Id associated with the Connection Setting." + }, + "name": { + "type": "string", + "description": "Name associated with the Connection Setting." + }, "clientId": { "type": "string", "description": "Client Id associated with the Connection Setting." diff --git a/specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListChannel.json b/specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListChannel.json index 32ac3c958a19..e163698f4e09 100644 --- a/specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListChannel.json +++ b/specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListChannel.json @@ -12,6 +12,58 @@ "responses": { "200": { "body": { + "resource": { + "properties": { + "sites": [ + { + "siteId": "aaaaaaaaaaa", + "siteName": "aaaaaaaaaaaa", + "key": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "key2": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "isEnabled": true, + "isV1Enabled": true, + "isV3Enabled": true, + "isSecureSiteEnabled": false, + "isBlockUserUploadEnabled": false, + "trustedOrigins": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ] + } + ] + }, + "etag": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "channelName": "DirectLineChannel", + "location": "aaaaaa" + }, + "setting": { + "extensionKey1": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "extensionKey2": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "sites": [ + { + "siteId": "aaaaaaaaaaa", + "siteName": "aaaaaaaaaaaa", + "key": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "key2": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "isEnabled": true, + "isV1Enabled": true, + "isV3Enabled": true, + "isWebchatPreviewEnabled": false, + "isSecureSiteEnabled": false, + "isBlockUserUploadEnabled": false, + "trustedOrigins": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ], + "isTokenEnabled": false, + "eTag": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "channelId": "aaaaaaaaaa", + "channelDisplayName": "aaaaaaaaaaa", + "botId": "aaaaaaaaaaaaaaaaaaaa", + "botIconUrl": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "isEnabled": true, + "disableLocalAuth": false + }, "location": "global", "properties": { "channelName": "EmailChannel", diff --git a/specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/botservice.json b/specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/botservice.json index 5ad8f265305e..e7fec5936a35 100644 --- a/specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/botservice.json +++ b/specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/botservice.json @@ -583,7 +583,7 @@ "200": { "description": "If resource is retrieved successfully, the service should return 200 (OK).", "schema": { - "$ref": "#/definitions/BotChannel" + "$ref": "#/definitions/ListChannelWithKeysResponse" } }, "default": { @@ -1180,7 +1180,8 @@ }, "kind": { "$ref": "#/definitions/Kind", - "description": "Required. Gets or sets the Kind of the resource." + "description": "Required. Gets or sets the Kind of the resource.", + "x-nullable": true }, "etag": { "type": "string", @@ -1414,6 +1415,10 @@ "type": "string", "description": "The channel schema transformation version for the bot" }, + "storageResourceId": { + "type": "string", + "description": "The storage resourceId for the bot" + }, "openWithHint": { "type": "string", "description": "The hint to browser (e.g. protocol handler) on how to open the bot for authoring" @@ -1456,6 +1461,25 @@ }, "description": "The list of bot service operation response." }, + "ListChannelWithKeysResponse": { + "type": "object", + "description": "The ARM channel of list channel with keys operation response.", + "allOf": [ + { + "$ref": "#/definitions/BotChannel" + } + ], + "properties": { + "resource": { + "$ref": "#/definitions/Channel", + "description": "The set of properties specific to bot channel resource" + }, + "setting": { + "$ref": "#/definitions/ChannelSettings", + "description": "Channel settings" + } + } + }, "BotChannel": { "type": "object", "description": "Bot channel resource definition", @@ -1471,6 +1495,51 @@ } } }, + "ChannelSettings": { + "type": "object", + "description": "Channel settings definition", + "properties": { + "extensionKey1": { + "type": "string", + "description": "The extensionKey1" + }, + "extensionKey2": { + "type": "string", + "description": "The extensionKey2" + }, + "sites": { + "type": "array", + "items": { + "$ref": "#/definitions/Site" + }, + "description": "The list of sites" + }, + "channelId": { + "type": "string", + "description": "The channel id" + }, + "channelDisplayName": { + "type": "string", + "description": "The channel display name" + }, + "botId": { + "type": "string", + "description": "The bot id" + }, + "botIconUrl": { + "type": "string", + "description": "The bot icon url" + }, + "isEnabled": { + "type": "boolean", + "description": "Whether this channel is enabled for the bot" + }, + "disableLocalAuth": { + "type": "boolean", + "description": "Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication." + } + } + }, "Channel": { "type": "object", "description": "Channel definition", @@ -1483,6 +1552,15 @@ "etag": { "type": "string", "description": "Entity Tag of the resource" + }, + "provisioningState": { + "type": "string", + "readOnly": true, + "description": "Provisioning state of the resource" + }, + "location": { + "description": "Specifies the location of the resource.", + "type": "string" } }, "required": [ @@ -1502,15 +1580,6 @@ "properties": { "$ref": "#/definitions/AlexaChannelProperties", "description": "The set of properties specific to Alexa channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" - }, - "provisioningState": { - "type": "string", - "readOnly": true, - "description": "Provisioning state of the resource" } } }, @@ -1664,18 +1733,6 @@ "properties": { "$ref": "#/definitions/MsTeamsChannelProperties", "description": "The set of properties specific to Microsoft Teams channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" - }, - "provisioningState": { - "type": "string", - "description": "Provisioning state of the resource" - }, - "location": { - "type": "string", - "description": "Location of the resource" } } }, @@ -1724,10 +1781,6 @@ "properties": { "$ref": "#/definitions/SkypeChannelProperties", "description": "The set of properties specific to Skype channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" } } }, @@ -1833,18 +1886,6 @@ "properties": { "$ref": "#/definitions/WebChatChannelProperties", "description": "The set of properties specific to Web Chat channel resource" - }, - "location": { - "type": "string", - "description": "Location of the resource" - }, - "provisioningState": { - "type": "string", - "description": "Provisioning state of the resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" } } }, @@ -1881,18 +1922,6 @@ "properties": { "$ref": "#/definitions/DirectLineChannelProperties", "description": "The set of properties specific to Direct Line channel resource" - }, - "etag": { - "type": "string", - "description": "Entity Tag of the resource" - }, - "provisioningState": { - "type": "string", - "description": "Provisioning state of the resource" - }, - "location": { - "type": "string", - "description": "Location of the resource" } } }, @@ -2234,7 +2263,8 @@ }, "isWebchatPreviewEnabled": { "type": "boolean", - "description": "Whether this site is enabled for preview versions of Webchat" + "description": "Whether this site is enabled for preview versions of Webchat", + "default": false } }, "required": [ @@ -2310,6 +2340,28 @@ "siteName" ] }, + "Site": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/WebChatSite" + }, + { + "$ref": "#/definitions/DirectLineSite" + } + ], + "properties": { + "isTokenEnabled": { + "type": "boolean", + "description": "Whether this site is token enabled for channel" + }, + "eTag": { + "type": "string", + "description": "Entity Tag" + } + }, + "description": "A site for the channel" + }, "SiteInfo": { "properties": { "siteName": { @@ -2354,13 +2406,22 @@ }, "value": { "type": "string", - "description": "Value associated with the Connection Setting Parameter." + "description": "Value associated with the Connection Setting Parameter.", + "x-nullable": true } }, "description": "Extra Parameter in a Connection Setting Properties to indicate service provider specific properties" }, "ConnectionSettingProperties": { "properties": { + "id": { + "type": "string", + "description": "Id associated with the Connection Setting." + }, + "name": { + "type": "string", + "description": "Name associated with the Connection Setting." + }, "clientId": { "type": "string", "description": "Client Id associated with the Connection Setting." diff --git a/specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListChannel.json b/specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListChannel.json index de952f0543e8..34c36d9fc898 100644 --- a/specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListChannel.json +++ b/specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListChannel.json @@ -12,6 +12,58 @@ "responses": { "200": { "body": { + "resource": { + "properties": { + "sites": [ + { + "siteId": "aaaaaaaaaaa", + "siteName": "aaaaaaaaaaaa", + "key": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "key2": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "isEnabled": true, + "isV1Enabled": true, + "isV3Enabled": true, + "isSecureSiteEnabled": false, + "isBlockUserUploadEnabled": false, + "trustedOrigins": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ] + } + ] + }, + "etag": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "channelName": "DirectLineChannel", + "location": "aaaaaa" + }, + "setting": { + "extensionKey1": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "extensionKey2": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "sites": [ + { + "siteId": "aaaaaaaaaaa", + "siteName": "aaaaaaaaaaaa", + "key": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "key2": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "isEnabled": true, + "isV1Enabled": true, + "isV3Enabled": true, + "isWebchatPreviewEnabled": false, + "isSecureSiteEnabled": false, + "isBlockUserUploadEnabled": false, + "trustedOrigins": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ], + "isTokenEnabled": false, + "eTag": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "channelId": "aaaaaaaaaa", + "channelDisplayName": "aaaaaaaaaaa", + "botId": "aaaaaaaaaaaaaaaaaaaa", + "botIconUrl": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "isEnabled": true, + "disableLocalAuth": false + }, "location": "global", "properties": { "channelName": "EmailChannel",