|
15 | 15 | */ |
16 | 16 |
|
17 | 17 | /** |
18 | | - * IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-8d569e8f-20201103-112432 |
| 18 | + * IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-be3b4618-20201221-123327 |
19 | 19 | */ |
20 | 20 |
|
21 | 21 |
|
@@ -156,6 +156,66 @@ class AssistantV1 extends BaseService { |
156 | 156 | return this.createRequest(parameters); |
157 | 157 | }; |
158 | 158 |
|
| 159 | + /************************* |
| 160 | + * bulkClassify |
| 161 | + ************************/ |
| 162 | + |
| 163 | + /** |
| 164 | + * Identify intents and entities in multiple user utterances. |
| 165 | + * |
| 166 | + * Send multiple user inputs to a workspace in a single request and receive information about the intents and entities |
| 167 | + * recognized in each input. This method is useful for testing and comparing the performance of different workspaces. |
| 168 | + * |
| 169 | + * This method is available only with Premium plans. |
| 170 | + * |
| 171 | + * @param {Object} params - The parameters to send to the service. |
| 172 | + * @param {string} params.workspaceId - Unique identifier of the workspace. |
| 173 | + * @param {BulkClassifyUtterance[]} [params.input] - An array of input utterances to classify. |
| 174 | + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers |
| 175 | + * @returns {Promise<AssistantV1.Response<AssistantV1.BulkClassifyResponse>>} |
| 176 | + */ |
| 177 | + public bulkClassify(params: AssistantV1.BulkClassifyParams): Promise<AssistantV1.Response<AssistantV1.BulkClassifyResponse>> { |
| 178 | + const _params = Object.assign({}, params); |
| 179 | + const requiredParams = ['workspaceId']; |
| 180 | + |
| 181 | + const missingParams = getMissingParams(_params, requiredParams); |
| 182 | + if (missingParams) { |
| 183 | + return Promise.reject(missingParams); |
| 184 | + } |
| 185 | + |
| 186 | + const body = { |
| 187 | + 'input': _params.input |
| 188 | + }; |
| 189 | + |
| 190 | + const query = { |
| 191 | + 'version': this.version |
| 192 | + }; |
| 193 | + |
| 194 | + const path = { |
| 195 | + 'workspace_id': _params.workspaceId |
| 196 | + }; |
| 197 | + |
| 198 | + const sdkHeaders = getSdkHeaders(AssistantV1.DEFAULT_SERVICE_NAME, 'v1', 'bulkClassify'); |
| 199 | + |
| 200 | + const parameters = { |
| 201 | + options: { |
| 202 | + url: '/v1/workspaces/{workspace_id}/bulk_classify', |
| 203 | + method: 'POST', |
| 204 | + body, |
| 205 | + qs: query, |
| 206 | + path, |
| 207 | + }, |
| 208 | + defaultOptions: extend(true, {}, this.baseOptions, { |
| 209 | + headers: extend(true, sdkHeaders, { |
| 210 | + 'Accept': 'application/json', |
| 211 | + 'Content-Type': 'application/json', |
| 212 | + }, _params.headers), |
| 213 | + }), |
| 214 | + }; |
| 215 | + |
| 216 | + return this.createRequest(parameters); |
| 217 | + }; |
| 218 | + |
159 | 219 | /************************* |
160 | 220 | * workspaces |
161 | 221 | ************************/ |
@@ -2959,66 +3019,6 @@ class AssistantV1 extends BaseService { |
2959 | 3019 | return this.createRequest(parameters); |
2960 | 3020 | }; |
2961 | 3021 |
|
2962 | | - /************************* |
2963 | | - * bulkClassify |
2964 | | - ************************/ |
2965 | | - |
2966 | | - /** |
2967 | | - * Identify intents and entities in multiple user utterances. |
2968 | | - * |
2969 | | - * Send multiple user inputs to a workspace in a single request and receive information about the intents and entities |
2970 | | - * recognized in each input. This method is useful for testing and comparing the performance of different workspaces. |
2971 | | - * |
2972 | | - * This method is available only with Premium plans. |
2973 | | - * |
2974 | | - * @param {Object} params - The parameters to send to the service. |
2975 | | - * @param {string} params.workspaceId - Unique identifier of the workspace. |
2976 | | - * @param {BulkClassifyUtterance[]} [params.input] - An array of input utterances to classify. |
2977 | | - * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers |
2978 | | - * @returns {Promise<AssistantV1.Response<AssistantV1.BulkClassifyResponse>>} |
2979 | | - */ |
2980 | | - public bulkClassify(params: AssistantV1.BulkClassifyParams): Promise<AssistantV1.Response<AssistantV1.BulkClassifyResponse>> { |
2981 | | - const _params = Object.assign({}, params); |
2982 | | - const requiredParams = ['workspaceId']; |
2983 | | - |
2984 | | - const missingParams = getMissingParams(_params, requiredParams); |
2985 | | - if (missingParams) { |
2986 | | - return Promise.reject(missingParams); |
2987 | | - } |
2988 | | - |
2989 | | - const body = { |
2990 | | - 'input': _params.input |
2991 | | - }; |
2992 | | - |
2993 | | - const query = { |
2994 | | - 'version': this.version |
2995 | | - }; |
2996 | | - |
2997 | | - const path = { |
2998 | | - 'workspace_id': _params.workspaceId |
2999 | | - }; |
3000 | | - |
3001 | | - const sdkHeaders = getSdkHeaders(AssistantV1.DEFAULT_SERVICE_NAME, 'v1', 'bulkClassify'); |
3002 | | - |
3003 | | - const parameters = { |
3004 | | - options: { |
3005 | | - url: '/v1/workspaces/{workspace_id}/bulk_classify', |
3006 | | - method: 'POST', |
3007 | | - body, |
3008 | | - qs: query, |
3009 | | - path, |
3010 | | - }, |
3011 | | - defaultOptions: extend(true, {}, this.baseOptions, { |
3012 | | - headers: extend(true, sdkHeaders, { |
3013 | | - 'Accept': 'application/json', |
3014 | | - 'Content-Type': 'application/json', |
3015 | | - }, _params.headers), |
3016 | | - }), |
3017 | | - }; |
3018 | | - |
3019 | | - return this.createRequest(parameters); |
3020 | | - }; |
3021 | | - |
3022 | 3022 | } |
3023 | 3023 |
|
3024 | 3024 | /************************* |
@@ -3088,6 +3088,15 @@ namespace AssistantV1 { |
3088 | 3088 | headers?: OutgoingHttpHeaders; |
3089 | 3089 | } |
3090 | 3090 |
|
| 3091 | + /** Parameters for the `bulkClassify` operation. */ |
| 3092 | + export interface BulkClassifyParams { |
| 3093 | + /** Unique identifier of the workspace. */ |
| 3094 | + workspaceId: string; |
| 3095 | + /** An array of input utterances to classify. */ |
| 3096 | + input?: BulkClassifyUtterance[]; |
| 3097 | + headers?: OutgoingHttpHeaders; |
| 3098 | + } |
| 3099 | + |
3091 | 3100 | /** Parameters for the `listWorkspaces` operation. */ |
3092 | 3101 | export interface ListWorkspacesParams { |
3093 | 3102 | /** The number of records to return in each page of results. */ |
@@ -4193,19 +4202,16 @@ namespace AssistantV1 { |
4193 | 4202 | headers?: OutgoingHttpHeaders; |
4194 | 4203 | } |
4195 | 4204 |
|
4196 | | - /** Parameters for the `bulkClassify` operation. */ |
4197 | | - export interface BulkClassifyParams { |
4198 | | - /** Unique identifier of the workspace. */ |
4199 | | - workspaceId: string; |
4200 | | - /** An array of input utterances to classify. */ |
4201 | | - input?: BulkClassifyUtterance[]; |
4202 | | - headers?: OutgoingHttpHeaders; |
4203 | | - } |
4204 | | - |
4205 | 4205 | /************************* |
4206 | 4206 | * model interfaces |
4207 | 4207 | ************************/ |
4208 | 4208 |
|
| 4209 | + /** AgentAvailabilityMessage. */ |
| 4210 | + export interface AgentAvailabilityMessage { |
| 4211 | + /** The text of the message. */ |
| 4212 | + message?: string; |
| 4213 | + } |
| 4214 | + |
4209 | 4215 | /** BulkClassifyOutput. */ |
4210 | 4216 | export interface BulkClassifyOutput { |
4211 | 4217 | /** The user input utterance to classify. */ |
@@ -4857,11 +4863,10 @@ namespace AssistantV1 { |
4857 | 4863 | metadata?: JsonObject; |
4858 | 4864 | /** The recognized capture groups for the entity, as defined by the entity pattern. */ |
4859 | 4865 | groups?: CaptureGroup[]; |
4860 | | - /** An object containing detailed information about the entity recognized in the user input. This property is |
4861 | | - * included only if the new system entities are enabled for the workspace. |
| 4866 | + /** An object containing detailed information about the entity recognized in the user input. |
4862 | 4867 | * |
4863 | | - * For more information about how the new system entities are interpreted, see the |
4864 | | - * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-beta-system-entities). |
| 4868 | + * For more information about how system entities are interpreted, see the |
| 4869 | + * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-system-entities). |
4865 | 4870 | */ |
4866 | 4871 | interpretation?: RuntimeEntityInterpretation; |
4867 | 4872 | /** An array of possible alternative values that the user might have intended instead of the value returned in |
@@ -5186,11 +5191,11 @@ namespace AssistantV1 { |
5186 | 5191 | /** An optional message to be displayed to the user to indicate that the conversation will be transferred to the |
5187 | 5192 | * next available agent. |
5188 | 5193 | */ |
5189 | | - agent_available?: string; |
| 5194 | + agent_available?: AgentAvailabilityMessage; |
5190 | 5195 | /** An optional message to be displayed to the user to indicate that no online agent is available to take over |
5191 | 5196 | * the conversation. |
5192 | 5197 | */ |
5193 | | - agent_unavailable?: string; |
| 5198 | + agent_unavailable?: AgentAvailabilityMessage; |
5194 | 5199 | /** Routing or other contextual information to be used by target service desk systems. */ |
5195 | 5200 | transfer_info?: DialogNodeOutputConnectToAgentTransferInfo; |
5196 | 5201 | } |
@@ -5289,11 +5294,11 @@ namespace AssistantV1 { |
5289 | 5294 | /** An optional message to be displayed to the user to indicate that the conversation will be transferred to the |
5290 | 5295 | * next available agent. |
5291 | 5296 | */ |
5292 | | - agent_available?: string; |
| 5297 | + agent_available?: AgentAvailabilityMessage; |
5293 | 5298 | /** An optional message to be displayed to the user to indicate that no online agent is available to take over |
5294 | 5299 | * the conversation. |
5295 | 5300 | */ |
5296 | | - agent_unavailable?: string; |
| 5301 | + agent_unavailable?: AgentAvailabilityMessage; |
5297 | 5302 | /** Routing or other contextual information to be used by target service desk systems. */ |
5298 | 5303 | transfer_info?: DialogNodeOutputConnectToAgentTransferInfo; |
5299 | 5304 | /** A label identifying the topic of the conversation, derived from the **title** property of the relevant node |
|
0 commit comments