@wildix/wim-voicebots-client 1.0.22 → 1.0.24

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.
Files changed (43) hide show
  1. package/dist-cjs/VoiceBots.js +4 -0
  2. package/dist-cjs/VoiceBotsClient.js +4 -5
  3. package/dist-cjs/commands/SendPlayCommand.js +21 -0
  4. package/dist-cjs/commands/SendStopCommand.js +21 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/models/models_0.js +28 -22
  7. package/dist-cjs/protocols/Aws_restJson1.js +108 -85
  8. package/dist-cjs/runtimeConfig.browser.js +1 -1
  9. package/dist-cjs/runtimeConfig.js +4 -3
  10. package/dist-cjs/runtimeExtensions.js +2 -10
  11. package/dist-es/VoiceBots.js +4 -0
  12. package/dist-es/VoiceBotsClient.js +4 -5
  13. package/dist-es/commands/SendPlayCommand.js +17 -0
  14. package/dist-es/commands/SendStopCommand.js +17 -0
  15. package/dist-es/commands/index.js +2 -0
  16. package/dist-es/models/models_0.js +16 -10
  17. package/dist-es/protocols/Aws_restJson1.js +72 -53
  18. package/dist-es/runtimeConfig.browser.js +2 -2
  19. package/dist-es/runtimeConfig.js +5 -4
  20. package/dist-es/runtimeExtensions.js +2 -10
  21. package/dist-types/VoiceBots.d.ts +14 -0
  22. package/dist-types/VoiceBotsClient.d.ts +5 -3
  23. package/dist-types/commands/CreateVoiceBotCommand.d.ts +16 -0
  24. package/dist-types/commands/DeleteVoiceBotCommand.d.ts +12 -0
  25. package/dist-types/commands/DescribeEventCommand.d.ts +74 -23
  26. package/dist-types/commands/GetTraceCommand.d.ts +33 -8
  27. package/dist-types/commands/GetVoiceBotCommand.d.ts +14 -0
  28. package/dist-types/commands/ListTracesCommand.d.ts +12 -0
  29. package/dist-types/commands/ListVoiceBotsCommand.d.ts +14 -0
  30. package/dist-types/commands/ListVoiceBotsNamesCommand.d.ts +12 -0
  31. package/dist-types/commands/SendHangupCommand.d.ts +12 -0
  32. package/dist-types/commands/SendPlayCommand.d.ts +79 -0
  33. package/dist-types/commands/SendSayCommand.d.ts +16 -0
  34. package/dist-types/commands/SendStopCommand.d.ts +76 -0
  35. package/dist-types/commands/SendTransferCommand.d.ts +12 -0
  36. package/dist-types/commands/UpdateVoiceBotCommand.d.ts +16 -0
  37. package/dist-types/commands/index.d.ts +2 -0
  38. package/dist-types/models/models_0.d.ts +221 -109
  39. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  40. package/dist-types/runtimeConfig.browser.d.ts +3 -2
  41. package/dist-types/runtimeConfig.d.ts +3 -2
  42. package/dist-types/runtimeConfig.native.d.ts +3 -2
  43. package/package.json +38 -34
@@ -11,7 +11,9 @@ const ListTracesCommand_1 = require("./commands/ListTracesCommand");
11
11
  const ListVoiceBotsCommand_1 = require("./commands/ListVoiceBotsCommand");
12
12
  const ListVoiceBotsNamesCommand_1 = require("./commands/ListVoiceBotsNamesCommand");
13
13
  const SendHangupCommand_1 = require("./commands/SendHangupCommand");
14
+ const SendPlayCommand_1 = require("./commands/SendPlayCommand");
14
15
  const SendSayCommand_1 = require("./commands/SendSayCommand");
16
+ const SendStopCommand_1 = require("./commands/SendStopCommand");
15
17
  const SendTransferCommand_1 = require("./commands/SendTransferCommand");
16
18
  const UpdateVoiceBotCommand_1 = require("./commands/UpdateVoiceBotCommand");
17
19
  const smithy_client_1 = require("@smithy/smithy-client");
@@ -25,7 +27,9 @@ const commands = {
25
27
  ListVoiceBotsCommand: ListVoiceBotsCommand_1.ListVoiceBotsCommand,
26
28
  ListVoiceBotsNamesCommand: ListVoiceBotsNamesCommand_1.ListVoiceBotsNamesCommand,
27
29
  SendHangupCommand: SendHangupCommand_1.SendHangupCommand,
30
+ SendPlayCommand: SendPlayCommand_1.SendPlayCommand,
28
31
  SendSayCommand: SendSayCommand_1.SendSayCommand,
32
+ SendStopCommand: SendStopCommand_1.SendStopCommand,
29
33
  SendTransferCommand: SendTransferCommand_1.SendTransferCommand,
30
34
  UpdateVoiceBotCommand: UpdateVoiceBotCommand_1.UpdateVoiceBotCommand,
31
35
  };
@@ -10,8 +10,11 @@ const smithy_client_1 = require("@smithy/smithy-client");
10
10
  Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
11
11
  const smithy_utils_1 = require("@wildix/smithy-utils");
12
12
  class VoiceBotsClient extends smithy_client_1.Client {
13
+ config;
13
14
  constructor(...[configuration]) {
14
15
  let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
16
+ super(_config_0);
17
+ this.initConfig = _config_0;
15
18
  let _config_1 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_0);
16
19
  let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
17
20
  let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
@@ -24,11 +27,7 @@ class VoiceBotsClient extends smithy_client_1.Client {
24
27
  path: ''
25
28
  };
26
29
  };
27
- const config = {
28
- ..._config_3,
29
- endpoint,
30
- };
31
- super(config);
30
+ const config = { ..._config_3, endpoint };
32
31
  this.config = config;
33
32
  this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
34
33
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SendPlayCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class SendPlayCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("VoiceBots", "SendPlay", {})
15
+ .n("VoiceBotsClient", "SendPlayCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_SendPlayCommand)
18
+ .de(Aws_restJson1_1.de_SendPlayCommand)
19
+ .build() {
20
+ }
21
+ exports.SendPlayCommand = SendPlayCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SendStopCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class SendStopCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("VoiceBots", "SendStop", {})
15
+ .n("VoiceBotsClient", "SendStopCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_SendStopCommand)
18
+ .de(Aws_restJson1_1.de_SendStopCommand)
19
+ .build() {
20
+ }
21
+ exports.SendStopCommand = SendStopCommand;
@@ -10,6 +10,8 @@ tslib_1.__exportStar(require("./ListTracesCommand"), exports);
10
10
  tslib_1.__exportStar(require("./ListVoiceBotsCommand"), exports);
11
11
  tslib_1.__exportStar(require("./ListVoiceBotsNamesCommand"), exports);
12
12
  tslib_1.__exportStar(require("./SendHangupCommand"), exports);
13
+ tslib_1.__exportStar(require("./SendPlayCommand"), exports);
13
14
  tslib_1.__exportStar(require("./SendSayCommand"), exports);
15
+ tslib_1.__exportStar(require("./SendStopCommand"), exports);
14
16
  tslib_1.__exportStar(require("./SendTransferCommand"), exports);
15
17
  tslib_1.__exportStar(require("./UpdateVoiceBotCommand"), exports);
@@ -3,32 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
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.VoiceBotEventType = exports.ForbiddenException = exports.ValidationException = void 0;
4
4
  const VoiceBotsServiceException_1 = require("./VoiceBotsServiceException");
5
5
  class ValidationException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
6
+ name = "ValidationException";
7
+ $fault = "client";
6
8
  constructor(opts) {
7
9
  super({
8
10
  name: "ValidationException",
9
11
  $fault: "client",
10
12
  ...opts
11
13
  });
12
- this.name = "ValidationException";
13
- this.$fault = "client";
14
14
  Object.setPrototypeOf(this, ValidationException.prototype);
15
15
  }
16
16
  }
17
17
  exports.ValidationException = ValidationException;
18
18
  class ForbiddenException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
19
+ name = "ForbiddenException";
20
+ $fault = "client";
19
21
  constructor(opts) {
20
22
  super({
21
23
  name: "ForbiddenException",
22
24
  $fault: "client",
23
25
  ...opts
24
26
  });
25
- this.name = "ForbiddenException";
26
- this.$fault = "client";
27
27
  Object.setPrototypeOf(this, ForbiddenException.prototype);
28
28
  }
29
29
  }
30
30
  exports.ForbiddenException = ForbiddenException;
31
31
  exports.VoiceBotEventType = {
32
+ AUDIO: "audio",
32
33
  COMPLETE: "complete",
33
34
  ENDED: "ended",
34
35
  INTERRUPTION: "interruption",
@@ -54,7 +55,7 @@ var VoiceBotFunctionIntegrationWebhookAuthorization;
54
55
  return visitor.oauth(value.oauth);
55
56
  return visitor._(value.$unknown[0], value.$unknown[1]);
56
57
  };
57
- })(VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotFunctionIntegrationWebhookAuthorization || (exports.VoiceBotFunctionIntegrationWebhookAuthorization = {}));
58
+ })(VoiceBotFunctionIntegrationWebhookAuthorization || (exports.VoiceBotFunctionIntegrationWebhookAuthorization = VoiceBotFunctionIntegrationWebhookAuthorization = {}));
58
59
  exports.VoiceBotFunctionIntegrationMethod = {
59
60
  DELETE: "delete",
60
61
  GET: "get",
@@ -69,7 +70,7 @@ var VoiceBotFunctionIntegration;
69
70
  return visitor.webhook(value.webhook);
70
71
  return visitor._(value.$unknown[0], value.$unknown[1]);
71
72
  };
72
- })(VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegration || (exports.VoiceBotFunctionIntegration = {}));
73
+ })(VoiceBotFunctionIntegration || (exports.VoiceBotFunctionIntegration = VoiceBotFunctionIntegration = {}));
73
74
  exports.VoiceBotToolType = {
74
75
  FUNCTION: "function",
75
76
  };
@@ -88,7 +89,7 @@ var VoiceBotEndpoint;
88
89
  return visitor.sqs(value.sqs);
89
90
  return visitor._(value.$unknown[0], value.$unknown[1]);
90
91
  };
91
- })(VoiceBotEndpoint = exports.VoiceBotEndpoint || (exports.VoiceBotEndpoint = {}));
92
+ })(VoiceBotEndpoint || (exports.VoiceBotEndpoint = VoiceBotEndpoint = {}));
92
93
  var VoiceBotPipelineTerminateAction;
93
94
  (function (VoiceBotPipelineTerminateAction) {
94
95
  VoiceBotPipelineTerminateAction.visit = (value, visitor) => {
@@ -98,16 +99,17 @@ var VoiceBotPipelineTerminateAction;
98
99
  return visitor.transfer(value.transfer);
99
100
  return visitor._(value.$unknown[0], value.$unknown[1]);
100
101
  };
101
- })(VoiceBotPipelineTerminateAction = exports.VoiceBotPipelineTerminateAction || (exports.VoiceBotPipelineTerminateAction = {}));
102
+ })(VoiceBotPipelineTerminateAction || (exports.VoiceBotPipelineTerminateAction = VoiceBotPipelineTerminateAction = {}));
102
103
  class VoiceBotNonUniqueNameException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
104
+ name = "VoiceBotNonUniqueNameException";
105
+ $fault = "client";
106
+ type;
103
107
  constructor(opts) {
104
108
  super({
105
109
  name: "VoiceBotNonUniqueNameException",
106
110
  $fault: "client",
107
111
  ...opts
108
112
  });
109
- this.name = "VoiceBotNonUniqueNameException";
110
- this.$fault = "client";
111
113
  Object.setPrototypeOf(this, VoiceBotNonUniqueNameException.prototype);
112
114
  this.type = opts.type;
113
115
  }
@@ -115,7 +117,9 @@ class VoiceBotNonUniqueNameException extends VoiceBotsServiceException_1.VoiceBo
115
117
  exports.VoiceBotNonUniqueNameException = VoiceBotNonUniqueNameException;
116
118
  exports.VoiceBotCommandType = {
117
119
  HANGUP: "hangup",
120
+ PLAY: "play",
118
121
  SAY: "say",
122
+ STOP: "stop",
119
123
  TRANSFER: "transfer",
120
124
  };
121
125
  var TraceActivityResult;
@@ -127,7 +131,7 @@ var TraceActivityResult;
127
131
  return visitor.text(value.text);
128
132
  return visitor._(value.$unknown[0], value.$unknown[1]);
129
133
  };
130
- })(TraceActivityResult = exports.TraceActivityResult || (exports.TraceActivityResult = {}));
134
+ })(TraceActivityResult || (exports.TraceActivityResult = TraceActivityResult = {}));
131
135
  exports.TraceActivityStatus = {
132
136
  CANCELLED: "cancelled",
133
137
  COMPLETE: "complete",
@@ -163,7 +167,7 @@ var TraceActivityTrigger;
163
167
  return visitor.durationTimeoutTask(value.durationTimeoutTask);
164
168
  return visitor._(value.$unknown[0], value.$unknown[1]);
165
169
  };
166
- })(TraceActivityTrigger = exports.TraceActivityTrigger || (exports.TraceActivityTrigger = {}));
170
+ })(TraceActivityTrigger || (exports.TraceActivityTrigger = TraceActivityTrigger = {}));
167
171
  var TraceToolCall;
168
172
  (function (TraceToolCall) {
169
173
  TraceToolCall.visit = (value, visitor) => {
@@ -179,7 +183,7 @@ var TraceToolCall;
179
183
  return visitor.function(value.function);
180
184
  return visitor._(value.$unknown[0], value.$unknown[1]);
181
185
  };
182
- })(TraceToolCall = exports.TraceToolCall || (exports.TraceToolCall = {}));
186
+ })(TraceToolCall || (exports.TraceToolCall = TraceToolCall = {}));
183
187
  var TraceSegmentCompletionMessage;
184
188
  (function (TraceSegmentCompletionMessage) {
185
189
  TraceSegmentCompletionMessage.visit = (value, visitor) => {
@@ -189,7 +193,7 @@ var TraceSegmentCompletionMessage;
189
193
  return visitor.tools(value.tools);
190
194
  return visitor._(value.$unknown[0], value.$unknown[1]);
191
195
  };
192
- })(TraceSegmentCompletionMessage = exports.TraceSegmentCompletionMessage || (exports.TraceSegmentCompletionMessage = {}));
196
+ })(TraceSegmentCompletionMessage || (exports.TraceSegmentCompletionMessage = TraceSegmentCompletionMessage = {}));
193
197
  var TraceSegmentCompletionMessageItem;
194
198
  (function (TraceSegmentCompletionMessageItem) {
195
199
  TraceSegmentCompletionMessageItem.visit = (value, visitor) => {
@@ -199,7 +203,7 @@ var TraceSegmentCompletionMessageItem;
199
203
  return visitor.bot(value.bot);
200
204
  return visitor._(value.$unknown[0], value.$unknown[1]);
201
205
  };
202
- })(TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessageItem || (exports.TraceSegmentCompletionMessageItem = {}));
206
+ })(TraceSegmentCompletionMessageItem || (exports.TraceSegmentCompletionMessageItem = TraceSegmentCompletionMessageItem = {}));
203
207
  var TraceGenericInputBlockContent;
204
208
  (function (TraceGenericInputBlockContent) {
205
209
  TraceGenericInputBlockContent.visit = (value, visitor) => {
@@ -209,7 +213,7 @@ var TraceGenericInputBlockContent;
209
213
  return visitor.json(value.json);
210
214
  return visitor._(value.$unknown[0], value.$unknown[1]);
211
215
  };
212
- })(TraceGenericInputBlockContent = exports.TraceGenericInputBlockContent || (exports.TraceGenericInputBlockContent = {}));
216
+ })(TraceGenericInputBlockContent || (exports.TraceGenericInputBlockContent = TraceGenericInputBlockContent = {}));
213
217
  var TraceSegmentInput;
214
218
  (function (TraceSegmentInput) {
215
219
  TraceSegmentInput.visit = (value, visitor) => {
@@ -223,7 +227,7 @@ var TraceSegmentInput;
223
227
  return visitor.generic(value.generic);
224
228
  return visitor._(value.$unknown[0], value.$unknown[1]);
225
229
  };
226
- })(TraceSegmentInput = exports.TraceSegmentInput || (exports.TraceSegmentInput = {}));
230
+ })(TraceSegmentInput || (exports.TraceSegmentInput = TraceSegmentInput = {}));
227
231
  var TraceSegmentResult;
228
232
  (function (TraceSegmentResult) {
229
233
  TraceSegmentResult.visit = (value, visitor) => {
@@ -237,7 +241,7 @@ var TraceSegmentResult;
237
241
  return visitor.json(value.json);
238
242
  return visitor._(value.$unknown[0], value.$unknown[1]);
239
243
  };
240
- })(TraceSegmentResult = exports.TraceSegmentResult || (exports.TraceSegmentResult = {}));
244
+ })(TraceSegmentResult || (exports.TraceSegmentResult = TraceSegmentResult = {}));
241
245
  exports.TraceSegmentStatus = {
242
246
  COMPLETE: "complete",
243
247
  ERROR: "error",
@@ -249,28 +253,30 @@ exports.TraceSessionStatus = {
249
253
  PENDING: "pending",
250
254
  };
251
255
  class VoiceBotNotFoundException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
256
+ name = "VoiceBotNotFoundException";
257
+ $fault = "client";
258
+ type;
252
259
  constructor(opts) {
253
260
  super({
254
261
  name: "VoiceBotNotFoundException",
255
262
  $fault: "client",
256
263
  ...opts
257
264
  });
258
- this.name = "VoiceBotNotFoundException";
259
- this.$fault = "client";
260
265
  Object.setPrototypeOf(this, VoiceBotNotFoundException.prototype);
261
266
  this.type = opts.type;
262
267
  }
263
268
  }
264
269
  exports.VoiceBotNotFoundException = VoiceBotNotFoundException;
265
270
  class VoiceSessionNotFoundException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
271
+ name = "VoiceSessionNotFoundException";
272
+ $fault = "client";
273
+ type;
266
274
  constructor(opts) {
267
275
  super({
268
276
  name: "VoiceSessionNotFoundException",
269
277
  $fault: "client",
270
278
  ...opts
271
279
  });
272
- this.name = "VoiceSessionNotFoundException";
273
- this.$fault = "client";
274
280
  Object.setPrototypeOf(this, VoiceSessionNotFoundException.prototype);
275
281
  this.type = opts.type;
276
282
  }