@wildix/wim-voicebots-client 1.0.15 → 1.0.17

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.TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessage = exports.TraceToolCall = exports.TraceActivityTrigger = exports.TraceActivityStatus = exports.TraceActivityResult = exports.VoiceBotCommandType = exports.VoiceBotEndpoint = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotEmbeddedToolType = exports.VoiceBotEventType = exports.ForbiddenException = exports.ValidationException = void 0;
3
+ exports.VoiceSessionNotFoundException = exports.VoiceBotNotFoundException = exports.TraceSessionStatus = exports.TraceSegmentStatus = exports.TraceSegmentResult = exports.TraceSegmentInput = exports.TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessage = exports.TraceToolCall = exports.TraceActivityTrigger = exports.TraceActivityStatus = exports.TraceActivityResult = exports.VoiceBotCommandType = exports.VoiceBotEndpoint = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegrationMethod = exports.VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotEmbeddedToolType = exports.VoiceBotEventType = exports.ForbiddenException = exports.ValidationException = void 0;
4
4
  const VoiceBotsServiceException_1 = require("./VoiceBotsServiceException");
5
5
  class ValidationException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
6
6
  constructor(opts) {
@@ -41,6 +41,7 @@ exports.VoiceBotEmbeddedToolType = {
41
41
  DELEGATE: "DELEGATE",
42
42
  HANGUP: "HANGUP",
43
43
  TRANSFER: "TRANSFER",
44
+ WAIT: "WAIT",
44
45
  };
45
46
  var VoiceBotFunctionIntegrationWebhookAuthorization;
46
47
  (function (VoiceBotFunctionIntegrationWebhookAuthorization) {
@@ -54,6 +55,13 @@ var VoiceBotFunctionIntegrationWebhookAuthorization;
54
55
  return visitor._(value.$unknown[0], value.$unknown[1]);
55
56
  };
56
57
  })(VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotFunctionIntegrationWebhookAuthorization || (exports.VoiceBotFunctionIntegrationWebhookAuthorization = {}));
58
+ exports.VoiceBotFunctionIntegrationMethod = {
59
+ DELETE: "delete",
60
+ GET: "get",
61
+ PATCH: "patch",
62
+ POST: "post",
63
+ PUT: "put",
64
+ };
57
65
  var VoiceBotFunctionIntegration;
58
66
  (function (VoiceBotFunctionIntegration) {
59
67
  VoiceBotFunctionIntegration.visit = (value, visitor) => {
@@ -139,6 +147,8 @@ var TraceToolCall;
139
147
  return visitor.transfer(value.transfer);
140
148
  if (value.hangup !== undefined)
141
149
  return visitor.hangup(value.hangup);
150
+ if (value.wait !== undefined)
151
+ return visitor.wait(value.wait);
142
152
  if (value.delegation !== undefined)
143
153
  return visitor.delegation(value.delegation);
144
154
  if (value.function !== undefined)
@@ -175,8 +185,6 @@ var TraceSegmentInput;
175
185
  return visitor.tool(value.tool);
176
186
  if (value.oauth !== undefined)
177
187
  return visitor.oauth(value.oauth);
178
- if (value.request !== undefined)
179
- return visitor.request(value.request);
180
188
  return visitor._(value.$unknown[0], value.$unknown[1]);
181
189
  };
182
190
  })(TraceSegmentInput = exports.TraceSegmentInput || (exports.TraceSegmentInput = {}));
@@ -523,6 +523,7 @@ const se_VoiceBotFunctionIntegrationWebhook = (input, context) => {
523
523
  'async': [],
524
524
  'authorization': smithy_client_1._json,
525
525
  'headers': smithy_client_1._json,
526
+ 'method': [],
526
527
  'parameters': _ => se_Document(_, context),
527
528
  'url': [],
528
529
  });
@@ -684,13 +685,31 @@ const de_TraceSegment = (output, context) => {
684
685
  'activityId': smithy_client_1.expectString,
685
686
  'duration': smithy_client_1.expectInt32,
686
687
  'id': smithy_client_1.expectString,
687
- 'input': (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
688
+ 'input': (_) => de_TraceSegmentInput((0, smithy_client_1.expectUnion)(_), context),
688
689
  'result': (_) => de_TraceSegmentResult((0, smithy_client_1.expectUnion)(_), context),
689
690
  'start': smithy_client_1.limitedParseDouble,
690
691
  'status': smithy_client_1.expectString,
691
692
  'version': smithy_client_1.expectInt32,
692
693
  });
693
694
  };
695
+ const de_TraceSegmentInput = (output, context) => {
696
+ if (output.completion != null) {
697
+ return {
698
+ completion: (0, smithy_client_1._json)(output.completion)
699
+ };
700
+ }
701
+ if (output.oauth != null) {
702
+ return {
703
+ oauth: (0, smithy_client_1._json)(output.oauth)
704
+ };
705
+ }
706
+ if (output.tool != null) {
707
+ return {
708
+ tool: (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(output.tool))
709
+ };
710
+ }
711
+ return { $unknown: Object.entries(output)[0] };
712
+ };
694
713
  const de_TraceSegmentResult = (output, context) => {
695
714
  if (output.error != null) {
696
715
  return {
@@ -819,6 +838,7 @@ const de_VoiceBotFunctionIntegrationWebhook = (output, context) => {
819
838
  'async': smithy_client_1.expectBoolean,
820
839
  'authorization': (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
821
840
  'headers': smithy_client_1._json,
841
+ 'method': smithy_client_1.expectString,
822
842
  'parameters': (_) => de_Document(_, context),
823
843
  'url': smithy_client_1.expectString,
824
844
  });
@@ -36,6 +36,7 @@ export const VoiceBotEmbeddedToolType = {
36
36
  DELEGATE: "DELEGATE",
37
37
  HANGUP: "HANGUP",
38
38
  TRANSFER: "TRANSFER",
39
+ WAIT: "WAIT",
39
40
  };
40
41
  export var VoiceBotFunctionIntegrationWebhookAuthorization;
41
42
  (function (VoiceBotFunctionIntegrationWebhookAuthorization) {
@@ -49,6 +50,13 @@ export var VoiceBotFunctionIntegrationWebhookAuthorization;
49
50
  return visitor._(value.$unknown[0], value.$unknown[1]);
50
51
  };
51
52
  })(VoiceBotFunctionIntegrationWebhookAuthorization || (VoiceBotFunctionIntegrationWebhookAuthorization = {}));
53
+ export const VoiceBotFunctionIntegrationMethod = {
54
+ DELETE: "delete",
55
+ GET: "get",
56
+ PATCH: "patch",
57
+ POST: "post",
58
+ PUT: "put",
59
+ };
52
60
  export var VoiceBotFunctionIntegration;
53
61
  (function (VoiceBotFunctionIntegration) {
54
62
  VoiceBotFunctionIntegration.visit = (value, visitor) => {
@@ -134,6 +142,8 @@ export var TraceToolCall;
134
142
  return visitor.transfer(value.transfer);
135
143
  if (value.hangup !== undefined)
136
144
  return visitor.hangup(value.hangup);
145
+ if (value.wait !== undefined)
146
+ return visitor.wait(value.wait);
137
147
  if (value.delegation !== undefined)
138
148
  return visitor.delegation(value.delegation);
139
149
  if (value.function !== undefined)
@@ -170,8 +180,6 @@ export var TraceSegmentInput;
170
180
  return visitor.tool(value.tool);
171
181
  if (value.oauth !== undefined)
172
182
  return visitor.oauth(value.oauth);
173
- if (value.request !== undefined)
174
- return visitor.request(value.request);
175
183
  return visitor._(value.$unknown[0], value.$unknown[1]);
176
184
  };
177
185
  })(TraceSegmentInput || (TraceSegmentInput = {}));
@@ -496,6 +496,7 @@ const se_VoiceBotFunctionIntegrationWebhook = (input, context) => {
496
496
  'async': [],
497
497
  'authorization': _json,
498
498
  'headers': _json,
499
+ 'method': [],
499
500
  'parameters': _ => se_Document(_, context),
500
501
  'url': [],
501
502
  });
@@ -657,13 +658,31 @@ const de_TraceSegment = (output, context) => {
657
658
  'activityId': __expectString,
658
659
  'duration': __expectInt32,
659
660
  'id': __expectString,
660
- 'input': (_) => _json(__expectUnion(_)),
661
+ 'input': (_) => de_TraceSegmentInput(__expectUnion(_), context),
661
662
  'result': (_) => de_TraceSegmentResult(__expectUnion(_), context),
662
663
  'start': __limitedParseDouble,
663
664
  'status': __expectString,
664
665
  'version': __expectInt32,
665
666
  });
666
667
  };
668
+ const de_TraceSegmentInput = (output, context) => {
669
+ if (output.completion != null) {
670
+ return {
671
+ completion: _json(output.completion)
672
+ };
673
+ }
674
+ if (output.oauth != null) {
675
+ return {
676
+ oauth: _json(output.oauth)
677
+ };
678
+ }
679
+ if (output.tool != null) {
680
+ return {
681
+ tool: _json(__expectUnion(output.tool))
682
+ };
683
+ }
684
+ return { $unknown: Object.entries(output)[0] };
685
+ };
667
686
  const de_TraceSegmentResult = (output, context) => {
668
687
  if (output.error != null) {
669
688
  return {
@@ -792,6 +811,7 @@ const de_VoiceBotFunctionIntegrationWebhook = (output, context) => {
792
811
  'async': __expectBoolean,
793
812
  'authorization': (_) => _json(__expectUnion(_)),
794
813
  'headers': _json,
814
+ 'method': __expectString,
795
815
  'parameters': (_) => de_Document(_, context),
796
816
  'url': __expectString,
797
817
  });
@@ -50,7 +50,7 @@ declare const CreateVoiceBotCommand_base: {
50
50
  * prompt: "STRING_VALUE", // required
51
51
  * embeddedTools: [ // VoiceBotEmbeddedToolsList
52
52
  * { // VoiceBotEmbeddedTool
53
- * type: "HANGUP" || "TRANSFER" || "DELEGATE", // required
53
+ * type: "HANGUP" || "TRANSFER" || "DELEGATE" || "WAIT", // required
54
54
  * name: "STRING_VALUE", // required
55
55
  * parameters: "DOCUMENT_VALUE",
56
56
  * },
@@ -65,6 +65,7 @@ declare const CreateVoiceBotCommand_base: {
65
65
  * integration: { // VoiceBotFunctionIntegration Union: only one key present
66
66
  * webhook: { // VoiceBotFunctionIntegrationWebhook
67
67
  * url: "STRING_VALUE", // required
68
+ * method: "get" || "post" || "put" || "delete" || "patch",
68
69
  * async: true || false,
69
70
  * authorization: { // VoiceBotFunctionIntegrationWebhookAuthorization Union: only one key present
70
71
  * bearer: { // VoiceBotFunctionIntegrationWebhookAuthorizationBearer
@@ -134,7 +135,7 @@ declare const CreateVoiceBotCommand_base: {
134
135
  * // prompt: "STRING_VALUE", // required
135
136
  * // embeddedTools: [ // VoiceBotEmbeddedToolsList
136
137
  * // { // VoiceBotEmbeddedTool
137
- * // type: "HANGUP" || "TRANSFER" || "DELEGATE", // required
138
+ * // type: "HANGUP" || "TRANSFER" || "DELEGATE" || "WAIT", // required
138
139
  * // name: "STRING_VALUE", // required
139
140
  * // parameters: "DOCUMENT_VALUE",
140
141
  * // },
@@ -149,6 +150,7 @@ declare const CreateVoiceBotCommand_base: {
149
150
  * // integration: { // VoiceBotFunctionIntegration Union: only one key present
150
151
  * // webhook: { // VoiceBotFunctionIntegrationWebhook
151
152
  * // url: "STRING_VALUE", // required
153
+ * // method: "get" || "post" || "put" || "delete" || "patch",
152
154
  * // async: true || false,
153
155
  * // authorization: { // VoiceBotFunctionIntegrationWebhookAuthorization Union: only one key present
154
156
  * // bearer: { // VoiceBotFunctionIntegrationWebhookAuthorizationBearer
@@ -331,12 +331,21 @@ declare const DescribeEventCommand_base: {
331
331
  * // extension: "STRING_VALUE",
332
332
  * // },
333
333
  * // hangup: {},
334
+ * // wait: {},
334
335
  * // delegation: { // TraceDelegationToolCall
335
336
  * // id: "STRING_VALUE",
336
337
  * // },
337
338
  * // function: { // TraceFunctionToolCall
338
339
  * // name: "STRING_VALUE",
339
340
  * // args: "STRING_VALUE",
341
+ * // request: { // TraceFunctionToolCallRequest
342
+ * // url: "STRING_VALUE",
343
+ * // method: "STRING_VALUE",
344
+ * // headers: { // TraceSegmentRequestInputHeaders
345
+ * // "<keys>": "STRING_VALUE",
346
+ * // },
347
+ * // body: "STRING_VALUE",
348
+ * // },
340
349
  * // },
341
350
  * // },
342
351
  * // result: "STRING_VALUE",
@@ -353,12 +362,21 @@ declare const DescribeEventCommand_base: {
353
362
  * // extension: "STRING_VALUE",
354
363
  * // },
355
364
  * // hangup: {},
365
+ * // wait: {},
356
366
  * // delegation: {
357
367
  * // id: "STRING_VALUE",
358
368
  * // },
359
369
  * // function: {
360
370
  * // name: "STRING_VALUE",
361
371
  * // args: "STRING_VALUE",
372
+ * // request: {
373
+ * // url: "STRING_VALUE",
374
+ * // method: "STRING_VALUE",
375
+ * // headers: {
376
+ * // "<keys>": "STRING_VALUE",
377
+ * // },
378
+ * // body: "STRING_VALUE",
379
+ * // },
362
380
  * // },
363
381
  * // },
364
382
  * // result: "STRING_VALUE",
@@ -374,12 +392,21 @@ declare const DescribeEventCommand_base: {
374
392
  * // extension: "STRING_VALUE",
375
393
  * // },
376
394
  * // hangup: {},
395
+ * // wait: {},
377
396
  * // delegation: {
378
397
  * // id: "STRING_VALUE",
379
398
  * // },
380
399
  * // function: {
381
400
  * // name: "STRING_VALUE",
382
401
  * // args: "STRING_VALUE",
402
+ * // request: {
403
+ * // url: "STRING_VALUE",
404
+ * // method: "STRING_VALUE",
405
+ * // headers: {
406
+ * // "<keys>": "STRING_VALUE",
407
+ * // },
408
+ * // body: "STRING_VALUE",
409
+ * // },
383
410
  * // },
384
411
  * // },
385
412
  * // oauth: { // TraceOAuthInput
@@ -388,14 +415,6 @@ declare const DescribeEventCommand_base: {
388
415
  * // endpointUrl: "STRING_VALUE",
389
416
  * // scope: "STRING_VALUE",
390
417
  * // },
391
- * // request: { // TraceSegmentRequestInput
392
- * // url: "STRING_VALUE",
393
- * // method: "STRING_VALUE",
394
- * // headers: { // TraceSegmentRequestInputHeaders
395
- * // "<keys>": "STRING_VALUE",
396
- * // },
397
- * // body: "STRING_VALUE",
398
- * // },
399
418
  * // },
400
419
  * // result: { // TraceSegmentResult Union: only one key present
401
420
  * // error: {
@@ -181,12 +181,21 @@ declare const GetTraceCommand_base: {
181
181
  * // extension: "STRING_VALUE",
182
182
  * // },
183
183
  * // hangup: {},
184
+ * // wait: {},
184
185
  * // delegation: { // TraceDelegationToolCall
185
186
  * // id: "STRING_VALUE",
186
187
  * // },
187
188
  * // function: { // TraceFunctionToolCall
188
189
  * // name: "STRING_VALUE",
189
190
  * // args: "STRING_VALUE",
191
+ * // request: { // TraceFunctionToolCallRequest
192
+ * // url: "STRING_VALUE",
193
+ * // method: "STRING_VALUE",
194
+ * // headers: { // TraceSegmentRequestInputHeaders
195
+ * // "<keys>": "STRING_VALUE",
196
+ * // },
197
+ * // body: "STRING_VALUE",
198
+ * // },
190
199
  * // },
191
200
  * // },
192
201
  * // result: "STRING_VALUE",
@@ -203,12 +212,21 @@ declare const GetTraceCommand_base: {
203
212
  * // extension: "STRING_VALUE",
204
213
  * // },
205
214
  * // hangup: {},
215
+ * // wait: {},
206
216
  * // delegation: {
207
217
  * // id: "STRING_VALUE",
208
218
  * // },
209
219
  * // function: {
210
220
  * // name: "STRING_VALUE",
211
221
  * // args: "STRING_VALUE",
222
+ * // request: {
223
+ * // url: "STRING_VALUE",
224
+ * // method: "STRING_VALUE",
225
+ * // headers: {
226
+ * // "<keys>": "STRING_VALUE",
227
+ * // },
228
+ * // body: "STRING_VALUE",
229
+ * // },
212
230
  * // },
213
231
  * // },
214
232
  * // result: "STRING_VALUE",
@@ -224,12 +242,21 @@ declare const GetTraceCommand_base: {
224
242
  * // extension: "STRING_VALUE",
225
243
  * // },
226
244
  * // hangup: {},
245
+ * // wait: {},
227
246
  * // delegation: {
228
247
  * // id: "STRING_VALUE",
229
248
  * // },
230
249
  * // function: {
231
250
  * // name: "STRING_VALUE",
232
251
  * // args: "STRING_VALUE",
252
+ * // request: {
253
+ * // url: "STRING_VALUE",
254
+ * // method: "STRING_VALUE",
255
+ * // headers: {
256
+ * // "<keys>": "STRING_VALUE",
257
+ * // },
258
+ * // body: "STRING_VALUE",
259
+ * // },
233
260
  * // },
234
261
  * // },
235
262
  * // oauth: { // TraceOAuthInput
@@ -238,14 +265,6 @@ declare const GetTraceCommand_base: {
238
265
  * // endpointUrl: "STRING_VALUE",
239
266
  * // scope: "STRING_VALUE",
240
267
  * // },
241
- * // request: { // TraceSegmentRequestInput
242
- * // url: "STRING_VALUE",
243
- * // method: "STRING_VALUE",
244
- * // headers: { // TraceSegmentRequestInputHeaders
245
- * // "<keys>": "STRING_VALUE",
246
- * // },
247
- * // body: "STRING_VALUE",
248
- * // },
249
268
  * // },
250
269
  * // result: { // TraceSegmentResult Union: only one key present
251
270
  * // error: {
@@ -57,7 +57,7 @@ declare const GetVoiceBotCommand_base: {
57
57
  * // prompt: "STRING_VALUE", // required
58
58
  * // embeddedTools: [ // VoiceBotEmbeddedToolsList
59
59
  * // { // VoiceBotEmbeddedTool
60
- * // type: "HANGUP" || "TRANSFER" || "DELEGATE", // required
60
+ * // type: "HANGUP" || "TRANSFER" || "DELEGATE" || "WAIT", // required
61
61
  * // name: "STRING_VALUE", // required
62
62
  * // parameters: "DOCUMENT_VALUE",
63
63
  * // },
@@ -72,6 +72,7 @@ declare const GetVoiceBotCommand_base: {
72
72
  * // integration: { // VoiceBotFunctionIntegration Union: only one key present
73
73
  * // webhook: { // VoiceBotFunctionIntegrationWebhook
74
74
  * // url: "STRING_VALUE", // required
75
+ * // method: "get" || "post" || "put" || "delete" || "patch",
75
76
  * // async: true || false,
76
77
  * // authorization: { // VoiceBotFunctionIntegrationWebhookAuthorization Union: only one key present
77
78
  * // bearer: { // VoiceBotFunctionIntegrationWebhookAuthorizationBearer
@@ -57,7 +57,7 @@ declare const ListVoiceBotsCommand_base: {
57
57
  * // prompt: "STRING_VALUE", // required
58
58
  * // embeddedTools: [ // VoiceBotEmbeddedToolsList
59
59
  * // { // VoiceBotEmbeddedTool
60
- * // type: "HANGUP" || "TRANSFER" || "DELEGATE", // required
60
+ * // type: "HANGUP" || "TRANSFER" || "DELEGATE" || "WAIT", // required
61
61
  * // name: "STRING_VALUE", // required
62
62
  * // parameters: "DOCUMENT_VALUE",
63
63
  * // },
@@ -72,6 +72,7 @@ declare const ListVoiceBotsCommand_base: {
72
72
  * // integration: { // VoiceBotFunctionIntegration Union: only one key present
73
73
  * // webhook: { // VoiceBotFunctionIntegrationWebhook
74
74
  * // url: "STRING_VALUE", // required
75
+ * // method: "get" || "post" || "put" || "delete" || "patch",
75
76
  * // async: true || false,
76
77
  * // authorization: { // VoiceBotFunctionIntegrationWebhookAuthorization Union: only one key present
77
78
  * // bearer: { // VoiceBotFunctionIntegrationWebhookAuthorizationBearer
@@ -50,7 +50,7 @@ declare const UpdateVoiceBotCommand_base: {
50
50
  * prompt: "STRING_VALUE", // required
51
51
  * embeddedTools: [ // VoiceBotEmbeddedToolsList
52
52
  * { // VoiceBotEmbeddedTool
53
- * type: "HANGUP" || "TRANSFER" || "DELEGATE", // required
53
+ * type: "HANGUP" || "TRANSFER" || "DELEGATE" || "WAIT", // required
54
54
  * name: "STRING_VALUE", // required
55
55
  * parameters: "DOCUMENT_VALUE",
56
56
  * },
@@ -65,6 +65,7 @@ declare const UpdateVoiceBotCommand_base: {
65
65
  * integration: { // VoiceBotFunctionIntegration Union: only one key present
66
66
  * webhook: { // VoiceBotFunctionIntegrationWebhook
67
67
  * url: "STRING_VALUE", // required
68
+ * method: "get" || "post" || "put" || "delete" || "patch",
68
69
  * async: true || false,
69
70
  * authorization: { // VoiceBotFunctionIntegrationWebhookAuthorization Union: only one key present
70
71
  * bearer: { // VoiceBotFunctionIntegrationWebhookAuthorizationBearer
@@ -135,7 +136,7 @@ declare const UpdateVoiceBotCommand_base: {
135
136
  * // prompt: "STRING_VALUE", // required
136
137
  * // embeddedTools: [ // VoiceBotEmbeddedToolsList
137
138
  * // { // VoiceBotEmbeddedTool
138
- * // type: "HANGUP" || "TRANSFER" || "DELEGATE", // required
139
+ * // type: "HANGUP" || "TRANSFER" || "DELEGATE" || "WAIT", // required
139
140
  * // name: "STRING_VALUE", // required
140
141
  * // parameters: "DOCUMENT_VALUE",
141
142
  * // },
@@ -150,6 +151,7 @@ declare const UpdateVoiceBotCommand_base: {
150
151
  * // integration: { // VoiceBotFunctionIntegration Union: only one key present
151
152
  * // webhook: { // VoiceBotFunctionIntegrationWebhook
152
153
  * // url: "STRING_VALUE", // required
154
+ * // method: "get" || "post" || "put" || "delete" || "patch",
153
155
  * // async: true || false,
154
156
  * // authorization: { // VoiceBotFunctionIntegrationWebhookAuthorization Union: only one key present
155
157
  * // bearer: { // VoiceBotFunctionIntegrationWebhookAuthorizationBearer
@@ -97,6 +97,7 @@ export declare const VoiceBotEmbeddedToolType: {
97
97
  readonly DELEGATE: "DELEGATE";
98
98
  readonly HANGUP: "HANGUP";
99
99
  readonly TRANSFER: "TRANSFER";
100
+ readonly WAIT: "WAIT";
100
101
  };
101
102
  /**
102
103
  * @public
@@ -186,11 +187,27 @@ export interface VoiceBotFunctionIntegrationWebhookHeader {
186
187
  key: string;
187
188
  value: string;
188
189
  }
190
+ /**
191
+ * @public
192
+ * @enum
193
+ */
194
+ export declare const VoiceBotFunctionIntegrationMethod: {
195
+ readonly DELETE: "delete";
196
+ readonly GET: "get";
197
+ readonly PATCH: "patch";
198
+ readonly POST: "post";
199
+ readonly PUT: "put";
200
+ };
201
+ /**
202
+ * @public
203
+ */
204
+ export type VoiceBotFunctionIntegrationMethod = typeof VoiceBotFunctionIntegrationMethod[keyof typeof VoiceBotFunctionIntegrationMethod];
189
205
  /**
190
206
  * @public
191
207
  */
192
208
  export interface VoiceBotFunctionIntegrationWebhook {
193
209
  url: string;
210
+ method?: VoiceBotFunctionIntegrationMethod;
194
211
  async?: boolean;
195
212
  authorization?: VoiceBotFunctionIntegrationWebhookAuthorization;
196
213
  headers?: (VoiceBotFunctionIntegrationWebhookHeader)[];
@@ -923,12 +940,22 @@ export interface TraceActivity {
923
940
  export interface TraceDelegationToolCall {
924
941
  id?: string;
925
942
  }
943
+ /**
944
+ * @public
945
+ */
946
+ export interface TraceFunctionToolCallRequest {
947
+ url?: string;
948
+ method?: string;
949
+ headers?: Record<string, string>;
950
+ body?: string;
951
+ }
926
952
  /**
927
953
  * @public
928
954
  */
929
955
  export interface TraceFunctionToolCall {
930
956
  name?: string;
931
957
  args?: string;
958
+ request?: TraceFunctionToolCallRequest;
932
959
  }
933
960
  /**
934
961
  * @public
@@ -945,7 +972,12 @@ export interface TraceTransferToolCall {
945
972
  /**
946
973
  * @public
947
974
  */
948
- export type TraceToolCall = TraceToolCall.DelegationMember | TraceToolCall.FunctionMember | TraceToolCall.HangupMember | TraceToolCall.TransferMember | TraceToolCall.$UnknownMember;
975
+ export interface TraceWaitToolCall {
976
+ }
977
+ /**
978
+ * @public
979
+ */
980
+ export type TraceToolCall = TraceToolCall.DelegationMember | TraceToolCall.FunctionMember | TraceToolCall.HangupMember | TraceToolCall.TransferMember | TraceToolCall.WaitMember | TraceToolCall.$UnknownMember;
949
981
  /**
950
982
  * @public
951
983
  */
@@ -953,6 +985,7 @@ export declare namespace TraceToolCall {
953
985
  interface TransferMember {
954
986
  transfer: TraceTransferToolCall;
955
987
  hangup?: never;
988
+ wait?: never;
956
989
  delegation?: never;
957
990
  function?: never;
958
991
  $unknown?: never;
@@ -960,6 +993,15 @@ export declare namespace TraceToolCall {
960
993
  interface HangupMember {
961
994
  transfer?: never;
962
995
  hangup: TraceHangupToolCall;
996
+ wait?: never;
997
+ delegation?: never;
998
+ function?: never;
999
+ $unknown?: never;
1000
+ }
1001
+ interface WaitMember {
1002
+ transfer?: never;
1003
+ hangup?: never;
1004
+ wait: TraceWaitToolCall;
963
1005
  delegation?: never;
964
1006
  function?: never;
965
1007
  $unknown?: never;
@@ -967,6 +1009,7 @@ export declare namespace TraceToolCall {
967
1009
  interface DelegationMember {
968
1010
  transfer?: never;
969
1011
  hangup?: never;
1012
+ wait?: never;
970
1013
  delegation: TraceDelegationToolCall;
971
1014
  function?: never;
972
1015
  $unknown?: never;
@@ -974,6 +1017,7 @@ export declare namespace TraceToolCall {
974
1017
  interface FunctionMember {
975
1018
  transfer?: never;
976
1019
  hangup?: never;
1020
+ wait?: never;
977
1021
  delegation?: never;
978
1022
  function: TraceFunctionToolCall;
979
1023
  $unknown?: never;
@@ -984,6 +1028,7 @@ export declare namespace TraceToolCall {
984
1028
  interface $UnknownMember {
985
1029
  transfer?: never;
986
1030
  hangup?: never;
1031
+ wait?: never;
987
1032
  delegation?: never;
988
1033
  function?: never;
989
1034
  $unknown: [string, any];
@@ -991,6 +1036,7 @@ export declare namespace TraceToolCall {
991
1036
  interface Visitor<T> {
992
1037
  transfer: (value: TraceTransferToolCall) => T;
993
1038
  hangup: (value: TraceHangupToolCall) => T;
1039
+ wait: (value: TraceWaitToolCall) => T;
994
1040
  delegation: (value: TraceDelegationToolCall) => T;
995
1041
  function: (value: TraceFunctionToolCall) => T;
996
1042
  _: (name: string, value: any) => T;
@@ -1089,16 +1135,7 @@ export interface TraceOAuthInput {
1089
1135
  /**
1090
1136
  * @public
1091
1137
  */
1092
- export interface TraceSegmentRequestInput {
1093
- url?: string;
1094
- method?: string;
1095
- headers?: Record<string, string>;
1096
- body?: string;
1097
- }
1098
- /**
1099
- * @public
1100
- */
1101
- export type TraceSegmentInput = TraceSegmentInput.CompletionMember | TraceSegmentInput.OauthMember | TraceSegmentInput.RequestMember | TraceSegmentInput.ToolMember | TraceSegmentInput.$UnknownMember;
1138
+ export type TraceSegmentInput = TraceSegmentInput.CompletionMember | TraceSegmentInput.OauthMember | TraceSegmentInput.ToolMember | TraceSegmentInput.$UnknownMember;
1102
1139
  /**
1103
1140
  * @public
1104
1141
  */
@@ -1107,28 +1144,18 @@ export declare namespace TraceSegmentInput {
1107
1144
  completion: TraceSegmentCompletionInput;
1108
1145
  tool?: never;
1109
1146
  oauth?: never;
1110
- request?: never;
1111
1147
  $unknown?: never;
1112
1148
  }
1113
1149
  interface ToolMember {
1114
1150
  completion?: never;
1115
1151
  tool: TraceToolCall;
1116
1152
  oauth?: never;
1117
- request?: never;
1118
1153
  $unknown?: never;
1119
1154
  }
1120
1155
  interface OauthMember {
1121
1156
  completion?: never;
1122
1157
  tool?: never;
1123
1158
  oauth: TraceOAuthInput;
1124
- request?: never;
1125
- $unknown?: never;
1126
- }
1127
- interface RequestMember {
1128
- completion?: never;
1129
- tool?: never;
1130
- oauth?: never;
1131
- request: TraceSegmentRequestInput;
1132
1159
  $unknown?: never;
1133
1160
  }
1134
1161
  /**
@@ -1138,14 +1165,12 @@ export declare namespace TraceSegmentInput {
1138
1165
  completion?: never;
1139
1166
  tool?: never;
1140
1167
  oauth?: never;
1141
- request?: never;
1142
1168
  $unknown: [string, any];
1143
1169
  }
1144
1170
  interface Visitor<T> {
1145
1171
  completion: (value: TraceSegmentCompletionInput) => T;
1146
1172
  tool: (value: TraceToolCall) => T;
1147
1173
  oauth: (value: TraceOAuthInput) => T;
1148
- request: (value: TraceSegmentRequestInput) => T;
1149
1174
  _: (name: string, value: any) => T;
1150
1175
  }
1151
1176
  const visit: <T>(value: TraceSegmentInput, visitor: Visitor<T>) => T;
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.0.15",
4
+ "version": "1.0.17",
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",