@wildix/wim-voicebots-client 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VoiceSessionNotFoundException = exports.VoiceBotNotFoundException = exports.TraceSessionStatus = exports.TraceSegmentStatus = exports.TraceSegmentResult = exports.TraceSegmentInput = exports.TraceGenericInputBlockContent = exports.TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessage = exports.TraceToolCall = exports.TraceActivityTrigger = exports.TraceActivityStatus = exports.TraceActivityResult = exports.VoiceBotCommandType = exports.VoiceBotNonUniqueNameException = exports.VoiceBotPipelineTerminateAction = exports.VoiceBotEndpoint = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegrationMethod = exports.VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotEmbeddedToolType = exports.VoiceBotCapability = exports.VoiceBotToolVariableHandler = exports.VoiceBotEventType = exports.ValidationException = exports.ForbiddenException = void 0;
3
+ exports.VoiceSessionNotFoundException = exports.VoiceBotNotFoundException = exports.TraceSessionStatus = exports.TraceSegmentStatus = exports.TraceSegmentResult = exports.TraceSegmentInput = exports.TraceGenericInputBlockContent = exports.TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessage = exports.TraceToolCall = exports.TraceActivityTrigger = exports.TraceActivityStatus = exports.TraceActivityResult = exports.VoiceBotCommandType = exports.VoiceBotNonUniqueNameException = exports.VoiceBotPipelineTerminateAction = exports.VoiceBotEndpoint = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegrationMethod = exports.VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotEmbeddedToolType = exports.VoiceBotCapability = exports.VoiceBotToolVariableHandler = exports.VoiceBotCapabilityToolPipelineType = exports.VoiceBotEventType = exports.ValidationException = exports.ForbiddenException = void 0;
4
4
  const VoiceBotsServiceException_1 = require("./VoiceBotsServiceException");
5
5
  class ForbiddenException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
6
6
  name = "ForbiddenException";
@@ -38,6 +38,12 @@ exports.VoiceBotEventType = {
38
38
  STARTED: "started",
39
39
  TRANSCRIPTION: "transcription",
40
40
  };
41
+ exports.VoiceBotCapabilityToolPipelineType = {
42
+ ASYNC_REQUEST: "async_request",
43
+ ASYNC_REQUEST_GUIDED: "async_request_guided",
44
+ BLOCKING_REQUEST: "blocking_request",
45
+ BLOCKING_REQUEST_GUIDED: "blocking_request_guided",
46
+ };
41
47
  var VoiceBotToolVariableHandler;
42
48
  (function (VoiceBotToolVariableHandler) {
43
49
  VoiceBotToolVariableHandler.visit = (value, visitor) => {
@@ -615,6 +615,7 @@ const se_VoiceBotLlmEndpoint = (input, context) => {
615
615
  'model': [],
616
616
  'prompt': [],
617
617
  'tools': _ => se_VoiceBotToolsList(_, context),
618
+ 'variables': smithy_client_1._json,
618
619
  });
619
620
  };
620
621
  const se_VoiceBotTool = (input, context) => {
@@ -984,6 +985,7 @@ const de_VoiceBotLlmEndpoint = (output, context) => {
984
985
  'model': smithy_client_1.expectString,
985
986
  'prompt': smithy_client_1.expectString,
986
987
  'tools': (_) => de_VoiceBotToolsList(_, context),
988
+ 'variables': smithy_client_1._json,
987
989
  });
988
990
  };
989
991
  const de_VoiceBotsList = (output, context) => {
@@ -33,6 +33,12 @@ export const VoiceBotEventType = {
33
33
  STARTED: "started",
34
34
  TRANSCRIPTION: "transcription",
35
35
  };
36
+ export const VoiceBotCapabilityToolPipelineType = {
37
+ ASYNC_REQUEST: "async_request",
38
+ ASYNC_REQUEST_GUIDED: "async_request_guided",
39
+ BLOCKING_REQUEST: "blocking_request",
40
+ BLOCKING_REQUEST_GUIDED: "blocking_request_guided",
41
+ };
36
42
  export var VoiceBotToolVariableHandler;
37
43
  (function (VoiceBotToolVariableHandler) {
38
44
  VoiceBotToolVariableHandler.visit = (value, visitor) => {
@@ -584,6 +584,7 @@ const se_VoiceBotLlmEndpoint = (input, context) => {
584
584
  'model': [],
585
585
  'prompt': [],
586
586
  'tools': _ => se_VoiceBotToolsList(_, context),
587
+ 'variables': _json,
587
588
  });
588
589
  };
589
590
  const se_VoiceBotTool = (input, context) => {
@@ -953,6 +954,7 @@ const de_VoiceBotLlmEndpoint = (output, context) => {
953
954
  'model': __expectString,
954
955
  'prompt': __expectString,
955
956
  'tools': (_) => de_VoiceBotToolsList(_, context),
957
+ 'variables': _json,
956
958
  });
957
959
  };
958
960
  const de_VoiceBotsList = (output, context) => {
@@ -148,6 +148,10 @@ declare const CreateVoiceBotCommand_base: {
148
148
  * },
149
149
  * ],
150
150
  * startMessage: "STRING_VALUE",
151
+ * pipeline: { // VoiceBotCapabilityToolPipeline
152
+ * type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
153
+ * instructions: "STRING_VALUE",
154
+ * },
151
155
  * },
152
156
  * kb: { // VoiceBotKnowledgeBase
153
157
  * knowledgeBaseId: "STRING_VALUE",
@@ -155,6 +159,11 @@ declare const CreateVoiceBotCommand_base: {
155
159
  * },
156
160
  * },
157
161
  * ],
162
+ * variables: [ // VoiceBotVariablesList
163
+ * { // VoiceBotVariable
164
+ * name: "STRING_VALUE", // required
165
+ * },
166
+ * ],
158
167
  * },
159
168
  * dialogflowCx: { // BotDialogflowCxEndpoint
160
169
  * credentials: "DOCUMENT_VALUE", // required
@@ -195,6 +204,10 @@ declare const CreateVoiceBotCommand_base: {
195
204
  * },
196
205
  * ],
197
206
  * startMessage: "STRING_VALUE",
207
+ * pipeline: {
208
+ * type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
209
+ * instructions: "STRING_VALUE",
210
+ * },
198
211
  * },
199
212
  * kb: {
200
213
  * knowledgeBaseId: "STRING_VALUE",
@@ -321,6 +334,10 @@ declare const CreateVoiceBotCommand_base: {
321
334
  * // },
322
335
  * // ],
323
336
  * // startMessage: "STRING_VALUE",
337
+ * // pipeline: { // VoiceBotCapabilityToolPipeline
338
+ * // type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
339
+ * // instructions: "STRING_VALUE",
340
+ * // },
324
341
  * // },
325
342
  * // kb: { // VoiceBotKnowledgeBase
326
343
  * // knowledgeBaseId: "STRING_VALUE",
@@ -328,6 +345,11 @@ declare const CreateVoiceBotCommand_base: {
328
345
  * // },
329
346
  * // },
330
347
  * // ],
348
+ * // variables: [ // VoiceBotVariablesList
349
+ * // { // VoiceBotVariable
350
+ * // name: "STRING_VALUE", // required
351
+ * // },
352
+ * // ],
331
353
  * // },
332
354
  * // dialogflowCx: { // BotDialogflowCxEndpoint
333
355
  * // credentials: "DOCUMENT_VALUE", // required
@@ -368,6 +390,10 @@ declare const CreateVoiceBotCommand_base: {
368
390
  * // },
369
391
  * // ],
370
392
  * // startMessage: "STRING_VALUE",
393
+ * // pipeline: {
394
+ * // type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
395
+ * // instructions: "STRING_VALUE",
396
+ * // },
371
397
  * // },
372
398
  * // kb: {
373
399
  * // knowledgeBaseId: "STRING_VALUE",
@@ -155,6 +155,10 @@ declare const GetVoiceBotCommand_base: {
155
155
  * // },
156
156
  * // ],
157
157
  * // startMessage: "STRING_VALUE",
158
+ * // pipeline: { // VoiceBotCapabilityToolPipeline
159
+ * // type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
160
+ * // instructions: "STRING_VALUE",
161
+ * // },
158
162
  * // },
159
163
  * // kb: { // VoiceBotKnowledgeBase
160
164
  * // knowledgeBaseId: "STRING_VALUE",
@@ -162,6 +166,11 @@ declare const GetVoiceBotCommand_base: {
162
166
  * // },
163
167
  * // },
164
168
  * // ],
169
+ * // variables: [ // VoiceBotVariablesList
170
+ * // { // VoiceBotVariable
171
+ * // name: "STRING_VALUE", // required
172
+ * // },
173
+ * // ],
165
174
  * // },
166
175
  * // dialogflowCx: { // BotDialogflowCxEndpoint
167
176
  * // credentials: "DOCUMENT_VALUE", // required
@@ -202,6 +211,10 @@ declare const GetVoiceBotCommand_base: {
202
211
  * // },
203
212
  * // ],
204
213
  * // startMessage: "STRING_VALUE",
214
+ * // pipeline: {
215
+ * // type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
216
+ * // instructions: "STRING_VALUE",
217
+ * // },
205
218
  * // },
206
219
  * // kb: {
207
220
  * // knowledgeBaseId: "STRING_VALUE",
@@ -155,6 +155,10 @@ declare const ListVoiceBotsCommand_base: {
155
155
  * // },
156
156
  * // ],
157
157
  * // startMessage: "STRING_VALUE",
158
+ * // pipeline: { // VoiceBotCapabilityToolPipeline
159
+ * // type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
160
+ * // instructions: "STRING_VALUE",
161
+ * // },
158
162
  * // },
159
163
  * // kb: { // VoiceBotKnowledgeBase
160
164
  * // knowledgeBaseId: "STRING_VALUE",
@@ -162,6 +166,11 @@ declare const ListVoiceBotsCommand_base: {
162
166
  * // },
163
167
  * // },
164
168
  * // ],
169
+ * // variables: [ // VoiceBotVariablesList
170
+ * // { // VoiceBotVariable
171
+ * // name: "STRING_VALUE", // required
172
+ * // },
173
+ * // ],
165
174
  * // },
166
175
  * // dialogflowCx: { // BotDialogflowCxEndpoint
167
176
  * // credentials: "DOCUMENT_VALUE", // required
@@ -202,6 +211,10 @@ declare const ListVoiceBotsCommand_base: {
202
211
  * // },
203
212
  * // ],
204
213
  * // startMessage: "STRING_VALUE",
214
+ * // pipeline: {
215
+ * // type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
216
+ * // instructions: "STRING_VALUE",
217
+ * // },
205
218
  * // },
206
219
  * // kb: {
207
220
  * // knowledgeBaseId: "STRING_VALUE",
@@ -148,6 +148,10 @@ declare const UpdateVoiceBotCommand_base: {
148
148
  * },
149
149
  * ],
150
150
  * startMessage: "STRING_VALUE",
151
+ * pipeline: { // VoiceBotCapabilityToolPipeline
152
+ * type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
153
+ * instructions: "STRING_VALUE",
154
+ * },
151
155
  * },
152
156
  * kb: { // VoiceBotKnowledgeBase
153
157
  * knowledgeBaseId: "STRING_VALUE",
@@ -155,6 +159,11 @@ declare const UpdateVoiceBotCommand_base: {
155
159
  * },
156
160
  * },
157
161
  * ],
162
+ * variables: [ // VoiceBotVariablesList
163
+ * { // VoiceBotVariable
164
+ * name: "STRING_VALUE", // required
165
+ * },
166
+ * ],
158
167
  * },
159
168
  * dialogflowCx: { // BotDialogflowCxEndpoint
160
169
  * credentials: "DOCUMENT_VALUE", // required
@@ -195,6 +204,10 @@ declare const UpdateVoiceBotCommand_base: {
195
204
  * },
196
205
  * ],
197
206
  * startMessage: "STRING_VALUE",
207
+ * pipeline: {
208
+ * type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
209
+ * instructions: "STRING_VALUE",
210
+ * },
198
211
  * },
199
212
  * kb: {
200
213
  * knowledgeBaseId: "STRING_VALUE",
@@ -322,6 +335,10 @@ declare const UpdateVoiceBotCommand_base: {
322
335
  * // },
323
336
  * // ],
324
337
  * // startMessage: "STRING_VALUE",
338
+ * // pipeline: { // VoiceBotCapabilityToolPipeline
339
+ * // type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
340
+ * // instructions: "STRING_VALUE",
341
+ * // },
325
342
  * // },
326
343
  * // kb: { // VoiceBotKnowledgeBase
327
344
  * // knowledgeBaseId: "STRING_VALUE",
@@ -329,6 +346,11 @@ declare const UpdateVoiceBotCommand_base: {
329
346
  * // },
330
347
  * // },
331
348
  * // ],
349
+ * // variables: [ // VoiceBotVariablesList
350
+ * // { // VoiceBotVariable
351
+ * // name: "STRING_VALUE", // required
352
+ * // },
353
+ * // ],
332
354
  * // },
333
355
  * // dialogflowCx: { // BotDialogflowCxEndpoint
334
356
  * // credentials: "DOCUMENT_VALUE", // required
@@ -369,6 +391,10 @@ declare const UpdateVoiceBotCommand_base: {
369
391
  * // },
370
392
  * // ],
371
393
  * // startMessage: "STRING_VALUE",
394
+ * // pipeline: {
395
+ * // type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
396
+ * // instructions: "STRING_VALUE",
397
+ * // },
372
398
  * // },
373
399
  * // kb: {
374
400
  * // knowledgeBaseId: "STRING_VALUE",
@@ -98,6 +98,35 @@ export interface VoiceBotKnowledgeBase {
98
98
  */
99
99
  instructions?: string | undefined;
100
100
  }
101
+ /**
102
+ * @public
103
+ * @enum
104
+ */
105
+ export declare const VoiceBotCapabilityToolPipelineType: {
106
+ readonly ASYNC_REQUEST: "async_request";
107
+ readonly ASYNC_REQUEST_GUIDED: "async_request_guided";
108
+ readonly BLOCKING_REQUEST: "blocking_request";
109
+ readonly BLOCKING_REQUEST_GUIDED: "blocking_request_guided";
110
+ };
111
+ /**
112
+ * @public
113
+ */
114
+ export type VoiceBotCapabilityToolPipelineType = typeof VoiceBotCapabilityToolPipelineType[keyof typeof VoiceBotCapabilityToolPipelineType];
115
+ /**
116
+ * @public
117
+ */
118
+ export interface VoiceBotCapabilityToolPipeline {
119
+ /**
120
+ * Pipeline type for tool execution. Determines whether to wait for response and how to handle the reply.
121
+ * @public
122
+ */
123
+ type?: VoiceBotCapabilityToolPipelineType | undefined;
124
+ /**
125
+ * Instructions for generating a reply when using guided pipeline types. Use \{\{response\}\} to reference the tool response.
126
+ * @public
127
+ */
128
+ instructions?: string | undefined;
129
+ }
101
130
  /**
102
131
  * @public
103
132
  */
@@ -184,6 +213,11 @@ export interface VoiceBotCapabilityTool {
184
213
  * @public
185
214
  */
186
215
  startMessage?: string | undefined;
216
+ /**
217
+ * Pipeline configuration for tool execution, similar to third-party function pipelines.
218
+ * @public
219
+ */
220
+ pipeline?: VoiceBotCapabilityToolPipeline | undefined;
187
221
  }
188
222
  /**
189
223
  * @public
@@ -506,6 +540,12 @@ export interface VoiceBotTool {
506
540
  type: VoiceBotToolType;
507
541
  function?: VoiceBotFunctionDefinition | undefined;
508
542
  }
543
+ /**
544
+ * @public
545
+ */
546
+ export interface VoiceBotVariable {
547
+ name: string;
548
+ }
509
549
  /**
510
550
  * @public
511
551
  */
@@ -532,6 +572,11 @@ export interface VoiceBotLlmEndpoint {
532
572
  */
533
573
  tools?: (VoiceBotTool)[] | undefined;
534
574
  capabilities?: (VoiceBotCapability)[] | undefined;
575
+ /**
576
+ * Variables such as dialplan variables that can be used in the bot.
577
+ * @public
578
+ */
579
+ variables?: (VoiceBotVariable)[] | undefined;
535
580
  }
536
581
  /**
537
582
  * @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/wim-voicebots-client",
3
3
  "description": "@wildix/wim-voicebots-client client",
4
- "version": "1.1.4",
4
+ "version": "1.1.5",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",