@wildix/wim-voicebots-client 1.0.15 → 1.0.16

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.
@@ -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) {
@@ -139,6 +140,8 @@ var TraceToolCall;
139
140
  return visitor.transfer(value.transfer);
140
141
  if (value.hangup !== undefined)
141
142
  return visitor.hangup(value.hangup);
143
+ if (value.wait !== undefined)
144
+ return visitor.wait(value.wait);
142
145
  if (value.delegation !== undefined)
143
146
  return visitor.delegation(value.delegation);
144
147
  if (value.function !== undefined)
@@ -175,8 +178,6 @@ var TraceSegmentInput;
175
178
  return visitor.tool(value.tool);
176
179
  if (value.oauth !== undefined)
177
180
  return visitor.oauth(value.oauth);
178
- if (value.request !== undefined)
179
- return visitor.request(value.request);
180
181
  return visitor._(value.$unknown[0], value.$unknown[1]);
181
182
  };
182
183
  })(TraceSegmentInput = exports.TraceSegmentInput || (exports.TraceSegmentInput = {}));
@@ -684,13 +684,31 @@ const de_TraceSegment = (output, context) => {
684
684
  'activityId': smithy_client_1.expectString,
685
685
  'duration': smithy_client_1.expectInt32,
686
686
  'id': smithy_client_1.expectString,
687
- 'input': (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
687
+ 'input': (_) => de_TraceSegmentInput((0, smithy_client_1.expectUnion)(_), context),
688
688
  'result': (_) => de_TraceSegmentResult((0, smithy_client_1.expectUnion)(_), context),
689
689
  'start': smithy_client_1.limitedParseDouble,
690
690
  'status': smithy_client_1.expectString,
691
691
  'version': smithy_client_1.expectInt32,
692
692
  });
693
693
  };
694
+ const de_TraceSegmentInput = (output, context) => {
695
+ if (output.completion != null) {
696
+ return {
697
+ completion: (0, smithy_client_1._json)(output.completion)
698
+ };
699
+ }
700
+ if (output.oauth != null) {
701
+ return {
702
+ oauth: (0, smithy_client_1._json)(output.oauth)
703
+ };
704
+ }
705
+ if (output.tool != null) {
706
+ return {
707
+ tool: (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(output.tool))
708
+ };
709
+ }
710
+ return { $unknown: Object.entries(output)[0] };
711
+ };
694
712
  const de_TraceSegmentResult = (output, context) => {
695
713
  if (output.error != null) {
696
714
  return {
@@ -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) {
@@ -134,6 +135,8 @@ export var TraceToolCall;
134
135
  return visitor.transfer(value.transfer);
135
136
  if (value.hangup !== undefined)
136
137
  return visitor.hangup(value.hangup);
138
+ if (value.wait !== undefined)
139
+ return visitor.wait(value.wait);
137
140
  if (value.delegation !== undefined)
138
141
  return visitor.delegation(value.delegation);
139
142
  if (value.function !== undefined)
@@ -170,8 +173,6 @@ export var TraceSegmentInput;
170
173
  return visitor.tool(value.tool);
171
174
  if (value.oauth !== undefined)
172
175
  return visitor.oauth(value.oauth);
173
- if (value.request !== undefined)
174
- return visitor.request(value.request);
175
176
  return visitor._(value.$unknown[0], value.$unknown[1]);
176
177
  };
177
178
  })(TraceSegmentInput || (TraceSegmentInput = {}));
@@ -657,13 +657,31 @@ const de_TraceSegment = (output, context) => {
657
657
  'activityId': __expectString,
658
658
  'duration': __expectInt32,
659
659
  'id': __expectString,
660
- 'input': (_) => _json(__expectUnion(_)),
660
+ 'input': (_) => de_TraceSegmentInput(__expectUnion(_), context),
661
661
  'result': (_) => de_TraceSegmentResult(__expectUnion(_), context),
662
662
  'start': __limitedParseDouble,
663
663
  'status': __expectString,
664
664
  'version': __expectInt32,
665
665
  });
666
666
  };
667
+ const de_TraceSegmentInput = (output, context) => {
668
+ if (output.completion != null) {
669
+ return {
670
+ completion: _json(output.completion)
671
+ };
672
+ }
673
+ if (output.oauth != null) {
674
+ return {
675
+ oauth: _json(output.oauth)
676
+ };
677
+ }
678
+ if (output.tool != null) {
679
+ return {
680
+ tool: _json(__expectUnion(output.tool))
681
+ };
682
+ }
683
+ return { $unknown: Object.entries(output)[0] };
684
+ };
667
685
  const de_TraceSegmentResult = (output, context) => {
668
686
  if (output.error != null) {
669
687
  return {
@@ -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
  * },
@@ -134,7 +134,7 @@ declare const CreateVoiceBotCommand_base: {
134
134
  * // prompt: "STRING_VALUE", // required
135
135
  * // embeddedTools: [ // VoiceBotEmbeddedToolsList
136
136
  * // { // VoiceBotEmbeddedTool
137
- * // type: "HANGUP" || "TRANSFER" || "DELEGATE", // required
137
+ * // type: "HANGUP" || "TRANSFER" || "DELEGATE" || "WAIT", // required
138
138
  * // name: "STRING_VALUE", // required
139
139
  * // parameters: "DOCUMENT_VALUE",
140
140
  * // },
@@ -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
  * // },
@@ -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
  * // },
@@ -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
  * },
@@ -135,7 +135,7 @@ declare const UpdateVoiceBotCommand_base: {
135
135
  * // prompt: "STRING_VALUE", // required
136
136
  * // embeddedTools: [ // VoiceBotEmbeddedToolsList
137
137
  * // { // VoiceBotEmbeddedTool
138
- * // type: "HANGUP" || "TRANSFER" || "DELEGATE", // required
138
+ * // type: "HANGUP" || "TRANSFER" || "DELEGATE" || "WAIT", // required
139
139
  * // name: "STRING_VALUE", // required
140
140
  * // parameters: "DOCUMENT_VALUE",
141
141
  * // },
@@ -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
@@ -923,12 +924,22 @@ export interface TraceActivity {
923
924
  export interface TraceDelegationToolCall {
924
925
  id?: string;
925
926
  }
927
+ /**
928
+ * @public
929
+ */
930
+ export interface TraceFunctionToolCallRequest {
931
+ url?: string;
932
+ method?: string;
933
+ headers?: Record<string, string>;
934
+ body?: string;
935
+ }
926
936
  /**
927
937
  * @public
928
938
  */
929
939
  export interface TraceFunctionToolCall {
930
940
  name?: string;
931
941
  args?: string;
942
+ request?: TraceFunctionToolCallRequest;
932
943
  }
933
944
  /**
934
945
  * @public
@@ -945,7 +956,12 @@ export interface TraceTransferToolCall {
945
956
  /**
946
957
  * @public
947
958
  */
948
- export type TraceToolCall = TraceToolCall.DelegationMember | TraceToolCall.FunctionMember | TraceToolCall.HangupMember | TraceToolCall.TransferMember | TraceToolCall.$UnknownMember;
959
+ export interface TraceWaitToolCall {
960
+ }
961
+ /**
962
+ * @public
963
+ */
964
+ export type TraceToolCall = TraceToolCall.DelegationMember | TraceToolCall.FunctionMember | TraceToolCall.HangupMember | TraceToolCall.TransferMember | TraceToolCall.WaitMember | TraceToolCall.$UnknownMember;
949
965
  /**
950
966
  * @public
951
967
  */
@@ -953,6 +969,7 @@ export declare namespace TraceToolCall {
953
969
  interface TransferMember {
954
970
  transfer: TraceTransferToolCall;
955
971
  hangup?: never;
972
+ wait?: never;
956
973
  delegation?: never;
957
974
  function?: never;
958
975
  $unknown?: never;
@@ -960,6 +977,15 @@ export declare namespace TraceToolCall {
960
977
  interface HangupMember {
961
978
  transfer?: never;
962
979
  hangup: TraceHangupToolCall;
980
+ wait?: never;
981
+ delegation?: never;
982
+ function?: never;
983
+ $unknown?: never;
984
+ }
985
+ interface WaitMember {
986
+ transfer?: never;
987
+ hangup?: never;
988
+ wait: TraceWaitToolCall;
963
989
  delegation?: never;
964
990
  function?: never;
965
991
  $unknown?: never;
@@ -967,6 +993,7 @@ export declare namespace TraceToolCall {
967
993
  interface DelegationMember {
968
994
  transfer?: never;
969
995
  hangup?: never;
996
+ wait?: never;
970
997
  delegation: TraceDelegationToolCall;
971
998
  function?: never;
972
999
  $unknown?: never;
@@ -974,6 +1001,7 @@ export declare namespace TraceToolCall {
974
1001
  interface FunctionMember {
975
1002
  transfer?: never;
976
1003
  hangup?: never;
1004
+ wait?: never;
977
1005
  delegation?: never;
978
1006
  function: TraceFunctionToolCall;
979
1007
  $unknown?: never;
@@ -984,6 +1012,7 @@ export declare namespace TraceToolCall {
984
1012
  interface $UnknownMember {
985
1013
  transfer?: never;
986
1014
  hangup?: never;
1015
+ wait?: never;
987
1016
  delegation?: never;
988
1017
  function?: never;
989
1018
  $unknown: [string, any];
@@ -991,6 +1020,7 @@ export declare namespace TraceToolCall {
991
1020
  interface Visitor<T> {
992
1021
  transfer: (value: TraceTransferToolCall) => T;
993
1022
  hangup: (value: TraceHangupToolCall) => T;
1023
+ wait: (value: TraceWaitToolCall) => T;
994
1024
  delegation: (value: TraceDelegationToolCall) => T;
995
1025
  function: (value: TraceFunctionToolCall) => T;
996
1026
  _: (name: string, value: any) => T;
@@ -1089,16 +1119,7 @@ export interface TraceOAuthInput {
1089
1119
  /**
1090
1120
  * @public
1091
1121
  */
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;
1122
+ export type TraceSegmentInput = TraceSegmentInput.CompletionMember | TraceSegmentInput.OauthMember | TraceSegmentInput.ToolMember | TraceSegmentInput.$UnknownMember;
1102
1123
  /**
1103
1124
  * @public
1104
1125
  */
@@ -1107,28 +1128,18 @@ export declare namespace TraceSegmentInput {
1107
1128
  completion: TraceSegmentCompletionInput;
1108
1129
  tool?: never;
1109
1130
  oauth?: never;
1110
- request?: never;
1111
1131
  $unknown?: never;
1112
1132
  }
1113
1133
  interface ToolMember {
1114
1134
  completion?: never;
1115
1135
  tool: TraceToolCall;
1116
1136
  oauth?: never;
1117
- request?: never;
1118
1137
  $unknown?: never;
1119
1138
  }
1120
1139
  interface OauthMember {
1121
1140
  completion?: never;
1122
1141
  tool?: never;
1123
1142
  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
1143
  $unknown?: never;
1133
1144
  }
1134
1145
  /**
@@ -1138,14 +1149,12 @@ export declare namespace TraceSegmentInput {
1138
1149
  completion?: never;
1139
1150
  tool?: never;
1140
1151
  oauth?: never;
1141
- request?: never;
1142
1152
  $unknown: [string, any];
1143
1153
  }
1144
1154
  interface Visitor<T> {
1145
1155
  completion: (value: TraceSegmentCompletionInput) => T;
1146
1156
  tool: (value: TraceToolCall) => T;
1147
1157
  oauth: (value: TraceOAuthInput) => T;
1148
- request: (value: TraceSegmentRequestInput) => T;
1149
1158
  _: (name: string, value: any) => T;
1150
1159
  }
1151
1160
  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.16",
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",