@wildix/wim-voicebots-client 1.1.9 → 4.0.1

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 (102) hide show
  1. package/dist-cjs/VoiceBots.js +3 -3
  2. package/dist-cjs/VoiceBotsClient.js +34 -26
  3. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  4. package/dist-cjs/auth/httpAuthSchemeProvider.js +65 -0
  5. package/dist-cjs/commands/CreateVoiceBotCommand.js +10 -11
  6. package/dist-cjs/commands/DeleteVoiceBotCommand.js +10 -11
  7. package/dist-cjs/commands/DescribeEventCommand.js +10 -11
  8. package/dist-cjs/commands/GetTraceCommand.js +10 -11
  9. package/dist-cjs/commands/GetVoiceBotCommand.js +10 -11
  10. package/dist-cjs/commands/ListTracesCommand.js +10 -11
  11. package/dist-cjs/commands/ListVoiceBotsCommand.js +10 -11
  12. package/dist-cjs/commands/ListVoiceBotsNamesCommand.js +10 -11
  13. package/dist-cjs/commands/SendHangupCommand.js +10 -11
  14. package/dist-cjs/commands/SendPlayCommand.js +10 -11
  15. package/dist-cjs/commands/SendSayCommand.js +10 -11
  16. package/dist-cjs/commands/SendStopCommand.js +10 -11
  17. package/dist-cjs/commands/SendTransferCommand.js +10 -11
  18. package/dist-cjs/commands/UpdateVoiceBotCommand.js +10 -11
  19. package/dist-cjs/endpoint/EndpointParameters.js +16 -0
  20. package/dist-cjs/endpoint/bdd.js +28 -0
  21. package/dist-cjs/endpoint/endpointResolver.js +16 -0
  22. package/dist-cjs/index.js +4 -1
  23. package/dist-cjs/models/VoiceBotsServiceException.js +3 -3
  24. package/dist-cjs/models/enums.js +64 -0
  25. package/dist-cjs/models/errors.js +75 -0
  26. package/dist-cjs/models/models_0.js +0 -350
  27. package/dist-cjs/runtimeConfig.browser.js +11 -11
  28. package/dist-cjs/runtimeConfig.js +22 -18
  29. package/dist-cjs/runtimeConfig.shared.js +30 -10
  30. package/dist-cjs/runtimeExtensions.js +6 -5
  31. package/dist-cjs/schemas/schemas_0.js +1247 -0
  32. package/dist-es/VoiceBots.js +6 -6
  33. package/dist-es/VoiceBotsClient.js +30 -22
  34. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  35. package/dist-es/auth/httpAuthSchemeProvider.js +59 -0
  36. package/dist-es/commands/CreateVoiceBotCommand.js +9 -10
  37. package/dist-es/commands/DeleteVoiceBotCommand.js +9 -10
  38. package/dist-es/commands/DescribeEventCommand.js +9 -10
  39. package/dist-es/commands/GetTraceCommand.js +9 -10
  40. package/dist-es/commands/GetVoiceBotCommand.js +9 -10
  41. package/dist-es/commands/ListTracesCommand.js +9 -10
  42. package/dist-es/commands/ListVoiceBotsCommand.js +9 -10
  43. package/dist-es/commands/ListVoiceBotsNamesCommand.js +9 -10
  44. package/dist-es/commands/SendHangupCommand.js +9 -10
  45. package/dist-es/commands/SendPlayCommand.js +9 -10
  46. package/dist-es/commands/SendSayCommand.js +9 -10
  47. package/dist-es/commands/SendStopCommand.js +9 -10
  48. package/dist-es/commands/SendTransferCommand.js +9 -10
  49. package/dist-es/commands/UpdateVoiceBotCommand.js +9 -10
  50. package/dist-es/endpoint/EndpointParameters.js +12 -0
  51. package/dist-es/endpoint/bdd.js +25 -0
  52. package/dist-es/endpoint/endpointResolver.js +12 -0
  53. package/dist-es/index.js +4 -1
  54. package/dist-es/models/VoiceBotsServiceException.js +1 -1
  55. package/dist-es/models/enums.js +61 -0
  56. package/dist-es/models/errors.js +67 -0
  57. package/dist-es/models/models_0.js +1 -344
  58. package/dist-es/runtimeConfig.browser.js +7 -7
  59. package/dist-es/runtimeConfig.js +17 -13
  60. package/dist-es/runtimeConfig.shared.js +24 -4
  61. package/dist-es/runtimeExtensions.js +6 -5
  62. package/dist-es/schemas/schemas_0.js +1241 -0
  63. package/dist-types/VoiceBots.d.ts +15 -15
  64. package/dist-types/VoiceBotsClient.d.ts +44 -26
  65. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  66. package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
  67. package/dist-types/commands/CreateVoiceBotCommand.d.ts +11 -7
  68. package/dist-types/commands/DeleteVoiceBotCommand.d.ts +11 -7
  69. package/dist-types/commands/DescribeEventCommand.d.ts +11 -7
  70. package/dist-types/commands/GetTraceCommand.d.ts +11 -7
  71. package/dist-types/commands/GetVoiceBotCommand.d.ts +11 -7
  72. package/dist-types/commands/ListTracesCommand.d.ts +11 -7
  73. package/dist-types/commands/ListVoiceBotsCommand.d.ts +11 -7
  74. package/dist-types/commands/ListVoiceBotsNamesCommand.d.ts +11 -7
  75. package/dist-types/commands/SendHangupCommand.d.ts +11 -7
  76. package/dist-types/commands/SendPlayCommand.d.ts +11 -7
  77. package/dist-types/commands/SendSayCommand.d.ts +11 -7
  78. package/dist-types/commands/SendStopCommand.d.ts +11 -7
  79. package/dist-types/commands/SendTransferCommand.d.ts +11 -7
  80. package/dist-types/commands/UpdateVoiceBotCommand.d.ts +11 -7
  81. package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
  82. package/dist-types/endpoint/bdd.d.ts +2 -0
  83. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  84. package/dist-types/extensionConfiguration.d.ts +4 -3
  85. package/dist-types/index.d.ts +5 -1
  86. package/dist-types/models/VoiceBotsServiceException.d.ts +1 -1
  87. package/dist-types/models/enums.d.ts +141 -0
  88. package/dist-types/models/errors.d.ts +60 -0
  89. package/dist-types/models/models_0.d.ts +92 -244
  90. package/dist-types/runtimeConfig.browser.d.ts +34 -15
  91. package/dist-types/runtimeConfig.d.ts +33 -14
  92. package/dist-types/runtimeConfig.native.d.ts +35 -16
  93. package/dist-types/runtimeConfig.shared.d.ts +20 -3
  94. package/dist-types/runtimeExtensions.d.ts +1 -1
  95. package/dist-types/schemas/schemas_0.d.ts +175 -0
  96. package/package.json +13 -39
  97. package/dist-cjs/models/index.js +0 -4
  98. package/dist-cjs/protocols/Aws_restJson1.js +0 -1106
  99. package/dist-es/models/index.js +0 -1
  100. package/dist-es/protocols/Aws_restJson1.js +0 -1075
  101. package/dist-types/models/index.d.ts +0 -1
  102. package/dist-types/protocols/Aws_restJson1.d.ts +0 -128
@@ -1,21 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SendTransferCommand = 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 SendTransferCommand extends smithy_client_1.Command.classBuilder()
4
+ const client_1 = require("@smithy/core/client");
5
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return client_1.Command; } });
6
+ const endpoints_1 = require("@smithy/core/endpoints");
7
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
8
+ const schemas_0_1 = require("../schemas/schemas_0");
9
+ class SendTransferCommand extends client_1.Command
10
+ .classBuilder()
11
+ .ep(EndpointParameters_1.commonParams)
9
12
  .m(function (Command, cs, config, o) {
10
- return [
11
- (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
- ];
13
+ return [(0, endpoints_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
13
14
  })
14
15
  .s("VoiceBots", "SendTransfer", {})
15
16
  .n("VoiceBotsClient", "SendTransferCommand")
16
- .f(void 0, void 0)
17
- .ser(Aws_restJson1_1.se_SendTransferCommand)
18
- .de(Aws_restJson1_1.de_SendTransferCommand)
17
+ .sc(schemas_0_1.SendTransfer$)
19
18
  .build() {
20
19
  }
21
20
  exports.SendTransferCommand = SendTransferCommand;
@@ -1,21 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateVoiceBotCommand = 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 UpdateVoiceBotCommand extends smithy_client_1.Command.classBuilder()
4
+ const client_1 = require("@smithy/core/client");
5
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return client_1.Command; } });
6
+ const endpoints_1 = require("@smithy/core/endpoints");
7
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
8
+ const schemas_0_1 = require("../schemas/schemas_0");
9
+ class UpdateVoiceBotCommand extends client_1.Command
10
+ .classBuilder()
11
+ .ep(EndpointParameters_1.commonParams)
9
12
  .m(function (Command, cs, config, o) {
10
- return [
11
- (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
- ];
13
+ return [(0, endpoints_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
13
14
  })
14
15
  .s("VoiceBots", "UpdateVoiceBot", {})
15
16
  .n("VoiceBotsClient", "UpdateVoiceBotCommand")
16
- .f(void 0, void 0)
17
- .ser(Aws_restJson1_1.se_UpdateVoiceBotCommand)
18
- .de(Aws_restJson1_1.de_UpdateVoiceBotCommand)
17
+ .sc(schemas_0_1.UpdateVoiceBot$)
19
18
  .build() {
20
19
  }
21
20
  exports.UpdateVoiceBotCommand = UpdateVoiceBotCommand;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonParams = exports.resolveClientEndpointParameters = void 0;
4
+ const clientContextParamDefaults = {};
5
+ const resolveClientEndpointParameters = (options) => {
6
+ return Object.assign(options, {
7
+ env: options.env ?? "prod",
8
+ defaultSigningName: "",
9
+ clientContextParams: Object.assign(clientContextParamDefaults, options.clientContextParams),
10
+ });
11
+ };
12
+ exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
13
+ exports.commonParams = {
14
+ env: { type: "clientContextParams", name: "env" },
15
+ endpoint: { type: "builtInParams", name: "endpoint" },
16
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bdd = void 0;
4
+ const endpoints_1 = require("@smithy/core/endpoints");
5
+ const a = "stringEquals", b = { "ref": "endpoint" }, c = { "ref": "env" };
6
+ const _data = {
7
+ conditions: [
8
+ ["isSet", [b]],
9
+ [a, [c, "stable"]],
10
+ [a, [c, "stage"]]
11
+ ],
12
+ results: [
13
+ [-1],
14
+ [b, {}],
15
+ ["https://wim-stable.wildix.com", {}],
16
+ ["https://wim-stage.wildix.com", {}],
17
+ ["https://wim.wildix.com", {}]
18
+ ]
19
+ };
20
+ const root = 2;
21
+ const r = 100_000_000;
22
+ const nodes = new Int32Array([
23
+ -1, 1, -1,
24
+ 0, r + 1, 3,
25
+ 1, r + 2, 4,
26
+ 2, r + 3, r + 4,
27
+ ]);
28
+ exports.bdd = endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultEndpointResolver = void 0;
4
+ const endpoints_1 = require("@smithy/core/endpoints");
5
+ const bdd_1 = require("./bdd");
6
+ const cache = new endpoints_1.EndpointCache({
7
+ size: 50,
8
+ params: ["endpoint", "env"],
9
+ });
10
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
11
+ return cache.get(endpointParams, () => (0, endpoints_1.decideEndpoint)(bdd_1.bdd, {
12
+ endpointParams: endpointParams,
13
+ logger: context.logger,
14
+ }));
15
+ };
16
+ exports.defaultEndpointResolver = defaultEndpointResolver;
package/dist-cjs/index.js CHANGED
@@ -5,6 +5,9 @@ const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./VoiceBotsClient"), exports);
6
6
  tslib_1.__exportStar(require("./VoiceBots"), exports);
7
7
  tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./models"), exports);
8
+ tslib_1.__exportStar(require("./schemas/schemas_0"), exports);
9
+ tslib_1.__exportStar(require("./models/enums"), exports);
10
+ tslib_1.__exportStar(require("./models/errors"), exports);
11
+ tslib_1.__exportStar(require("./models/models_0"), exports);
9
12
  var VoiceBotsServiceException_1 = require("./models/VoiceBotsServiceException");
10
13
  Object.defineProperty(exports, "VoiceBotsServiceException", { enumerable: true, get: function () { return VoiceBotsServiceException_1.VoiceBotsServiceException; } });
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VoiceBotsServiceException = exports.__ServiceException = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
- class VoiceBotsServiceException extends smithy_client_1.ServiceException {
4
+ const client_1 = require("@smithy/core/client");
5
+ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
6
+ class VoiceBotsServiceException extends client_1.ServiceException {
7
7
  constructor(options) {
8
8
  super(options);
9
9
  Object.setPrototypeOf(this, VoiceBotsServiceException.prototype);
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TraceSessionStatus = exports.TraceSegmentStatus = exports.TraceActivityStatus = exports.VoiceBotCommandType = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegrationMethod = exports.VoiceBotEmbeddedToolType = exports.VoiceBotCapabilityToolPipelineType = exports.VoiceBotEventType = exports.AnnotationSourceType = void 0;
4
+ exports.AnnotationSourceType = {
5
+ CHATBOT: "chatbot",
6
+ SYSTEM: "system",
7
+ USER: "user",
8
+ VOICEBOT: "voicebot",
9
+ };
10
+ exports.VoiceBotEventType = {
11
+ AUDIO: "audio",
12
+ COMPLETE: "complete",
13
+ ENDED: "ended",
14
+ INTERRUPTION: "interruption",
15
+ PLAYBACK: "playback",
16
+ REPLY: "reply",
17
+ STARTED: "started",
18
+ TRANSCRIPTION: "transcription",
19
+ };
20
+ exports.VoiceBotCapabilityToolPipelineType = {
21
+ ASYNC_REQUEST: "async_request",
22
+ ASYNC_REQUEST_GUIDED: "async_request_guided",
23
+ BLOCKING_REQUEST: "blocking_request",
24
+ BLOCKING_REQUEST_GUIDED: "blocking_request_guided",
25
+ };
26
+ exports.VoiceBotEmbeddedToolType = {
27
+ DELEGATE: "DELEGATE",
28
+ HANGUP: "HANGUP",
29
+ TRANSFER: "TRANSFER",
30
+ WAIT: "WAIT",
31
+ };
32
+ exports.VoiceBotFunctionIntegrationMethod = {
33
+ DELETE: "delete",
34
+ GET: "get",
35
+ PATCH: "patch",
36
+ POST: "post",
37
+ PUT: "put",
38
+ };
39
+ exports.VoiceBotToolType = {
40
+ FUNCTION: "function",
41
+ };
42
+ exports.VoiceBotCommandType = {
43
+ HANGUP: "hangup",
44
+ PLAY: "play",
45
+ SAY: "say",
46
+ STOP: "stop",
47
+ TRANSFER: "transfer",
48
+ };
49
+ exports.TraceActivityStatus = {
50
+ CANCELLED: "cancelled",
51
+ COMPLETE: "complete",
52
+ ERROR: "error",
53
+ PENDING: "pending",
54
+ };
55
+ exports.TraceSegmentStatus = {
56
+ COMPLETE: "complete",
57
+ ERROR: "error",
58
+ PENDING: "pending",
59
+ };
60
+ exports.TraceSessionStatus = {
61
+ COMPLETE: "complete",
62
+ COMPLETE_WITH_ERROR: "complete_with_error",
63
+ PENDING: "pending",
64
+ };
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VoiceSessionNotFoundException = exports.VoiceBotNotFoundException = exports.VoiceBotNonUniqueNameException = exports.ValidationException = exports.ForbiddenException = void 0;
4
+ const VoiceBotsServiceException_1 = require("./VoiceBotsServiceException");
5
+ class ForbiddenException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
6
+ name = "ForbiddenException";
7
+ $fault = "client";
8
+ constructor(opts) {
9
+ super({
10
+ name: "ForbiddenException",
11
+ $fault: "client",
12
+ ...opts,
13
+ });
14
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
15
+ }
16
+ }
17
+ exports.ForbiddenException = ForbiddenException;
18
+ class ValidationException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
19
+ name = "ValidationException";
20
+ $fault = "client";
21
+ constructor(opts) {
22
+ super({
23
+ name: "ValidationException",
24
+ $fault: "client",
25
+ ...opts,
26
+ });
27
+ Object.setPrototypeOf(this, ValidationException.prototype);
28
+ }
29
+ }
30
+ exports.ValidationException = ValidationException;
31
+ class VoiceBotNonUniqueNameException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
32
+ name = "VoiceBotNonUniqueNameException";
33
+ $fault = "client";
34
+ type;
35
+ constructor(opts) {
36
+ super({
37
+ name: "VoiceBotNonUniqueNameException",
38
+ $fault: "client",
39
+ ...opts,
40
+ });
41
+ Object.setPrototypeOf(this, VoiceBotNonUniqueNameException.prototype);
42
+ this.type = opts.type;
43
+ }
44
+ }
45
+ exports.VoiceBotNonUniqueNameException = VoiceBotNonUniqueNameException;
46
+ class VoiceBotNotFoundException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
47
+ name = "VoiceBotNotFoundException";
48
+ $fault = "client";
49
+ type;
50
+ constructor(opts) {
51
+ super({
52
+ name: "VoiceBotNotFoundException",
53
+ $fault: "client",
54
+ ...opts,
55
+ });
56
+ Object.setPrototypeOf(this, VoiceBotNotFoundException.prototype);
57
+ this.type = opts.type;
58
+ }
59
+ }
60
+ exports.VoiceBotNotFoundException = VoiceBotNotFoundException;
61
+ class VoiceSessionNotFoundException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
62
+ name = "VoiceSessionNotFoundException";
63
+ $fault = "client";
64
+ type;
65
+ constructor(opts) {
66
+ super({
67
+ name: "VoiceSessionNotFoundException",
68
+ $fault: "client",
69
+ ...opts,
70
+ });
71
+ Object.setPrototypeOf(this, VoiceSessionNotFoundException.prototype);
72
+ this.type = opts.type;
73
+ }
74
+ }
75
+ exports.VoiceSessionNotFoundException = VoiceSessionNotFoundException;
@@ -1,352 +1,2 @@
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.VoiceBotCapabilityToolPipelineType = exports.VoiceBotToolAnnotation = exports.VoiceBotEventType = exports.AnnotationSourceType = exports.AnnotationPayload = exports.ValidationException = exports.ForbiddenException = void 0;
4
- const VoiceBotsServiceException_1 = require("./VoiceBotsServiceException");
5
- class ForbiddenException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
6
- name = "ForbiddenException";
7
- $fault = "client";
8
- constructor(opts) {
9
- super({
10
- name: "ForbiddenException",
11
- $fault: "client",
12
- ...opts
13
- });
14
- Object.setPrototypeOf(this, ForbiddenException.prototype);
15
- }
16
- }
17
- exports.ForbiddenException = ForbiddenException;
18
- class ValidationException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
19
- name = "ValidationException";
20
- $fault = "client";
21
- constructor(opts) {
22
- super({
23
- name: "ValidationException",
24
- $fault: "client",
25
- ...opts
26
- });
27
- Object.setPrototypeOf(this, ValidationException.prototype);
28
- }
29
- }
30
- exports.ValidationException = ValidationException;
31
- var AnnotationPayload;
32
- (function (AnnotationPayload) {
33
- AnnotationPayload.visit = (value, visitor) => {
34
- if (value.tag !== undefined)
35
- return visitor.tag(value.tag);
36
- if (value.text !== undefined)
37
- return visitor.text(value.text);
38
- if (value.variables !== undefined)
39
- return visitor.variables(value.variables);
40
- if (value.result !== undefined)
41
- return visitor.result(value.result);
42
- return visitor._(value.$unknown[0], value.$unknown[1]);
43
- };
44
- })(AnnotationPayload || (exports.AnnotationPayload = AnnotationPayload = {}));
45
- exports.AnnotationSourceType = {
46
- CHATBOT: "chatbot",
47
- SYSTEM: "system",
48
- USER: "user",
49
- VOICEBOT: "voicebot",
50
- };
51
- exports.VoiceBotEventType = {
52
- AUDIO: "audio",
53
- COMPLETE: "complete",
54
- ENDED: "ended",
55
- INTERRUPTION: "interruption",
56
- PLAYBACK: "playback",
57
- REPLY: "reply",
58
- STARTED: "started",
59
- TRANSCRIPTION: "transcription",
60
- };
61
- var VoiceBotToolAnnotation;
62
- (function (VoiceBotToolAnnotation) {
63
- VoiceBotToolAnnotation.visit = (value, visitor) => {
64
- if (value.tag !== undefined)
65
- return visitor.tag(value.tag);
66
- if (value.comment !== undefined)
67
- return visitor.comment(value.comment);
68
- if (value.variables !== undefined)
69
- return visitor.variables(value.variables);
70
- if (value.result !== undefined)
71
- return visitor.result(value.result);
72
- return visitor._(value.$unknown[0], value.$unknown[1]);
73
- };
74
- })(VoiceBotToolAnnotation || (exports.VoiceBotToolAnnotation = VoiceBotToolAnnotation = {}));
75
- exports.VoiceBotCapabilityToolPipelineType = {
76
- ASYNC_REQUEST: "async_request",
77
- ASYNC_REQUEST_GUIDED: "async_request_guided",
78
- BLOCKING_REQUEST: "blocking_request",
79
- BLOCKING_REQUEST_GUIDED: "blocking_request_guided",
80
- };
81
- var VoiceBotToolVariableHandler;
82
- (function (VoiceBotToolVariableHandler) {
83
- VoiceBotToolVariableHandler.visit = (value, visitor) => {
84
- if (value.auto !== undefined)
85
- return visitor.auto(value.auto);
86
- if (value.guided !== undefined)
87
- return visitor.guided(value.guided);
88
- if (value.predefined !== undefined)
89
- return visitor.predefined(value.predefined);
90
- return visitor._(value.$unknown[0], value.$unknown[1]);
91
- };
92
- })(VoiceBotToolVariableHandler || (exports.VoiceBotToolVariableHandler = VoiceBotToolVariableHandler = {}));
93
- var VoiceBotCapability;
94
- (function (VoiceBotCapability) {
95
- VoiceBotCapability.visit = (value, visitor) => {
96
- if (value.tool !== undefined)
97
- return visitor.tool(value.tool);
98
- if (value.kb !== undefined)
99
- return visitor.kb(value.kb);
100
- return visitor._(value.$unknown[0], value.$unknown[1]);
101
- };
102
- })(VoiceBotCapability || (exports.VoiceBotCapability = VoiceBotCapability = {}));
103
- exports.VoiceBotEmbeddedToolType = {
104
- DELEGATE: "DELEGATE",
105
- HANGUP: "HANGUP",
106
- TRANSFER: "TRANSFER",
107
- WAIT: "WAIT",
108
- };
109
- var VoiceBotFunctionIntegrationWebhookAuthorization;
110
- (function (VoiceBotFunctionIntegrationWebhookAuthorization) {
111
- VoiceBotFunctionIntegrationWebhookAuthorization.visit = (value, visitor) => {
112
- if (value.bearer !== undefined)
113
- return visitor.bearer(value.bearer);
114
- if (value.basic !== undefined)
115
- return visitor.basic(value.basic);
116
- if (value.oauth !== undefined)
117
- return visitor.oauth(value.oauth);
118
- return visitor._(value.$unknown[0], value.$unknown[1]);
119
- };
120
- })(VoiceBotFunctionIntegrationWebhookAuthorization || (exports.VoiceBotFunctionIntegrationWebhookAuthorization = VoiceBotFunctionIntegrationWebhookAuthorization = {}));
121
- exports.VoiceBotFunctionIntegrationMethod = {
122
- DELETE: "delete",
123
- GET: "get",
124
- PATCH: "patch",
125
- POST: "post",
126
- PUT: "put",
127
- };
128
- var VoiceBotFunctionIntegration;
129
- (function (VoiceBotFunctionIntegration) {
130
- VoiceBotFunctionIntegration.visit = (value, visitor) => {
131
- if (value.webhook !== undefined)
132
- return visitor.webhook(value.webhook);
133
- return visitor._(value.$unknown[0], value.$unknown[1]);
134
- };
135
- })(VoiceBotFunctionIntegration || (exports.VoiceBotFunctionIntegration = VoiceBotFunctionIntegration = {}));
136
- exports.VoiceBotToolType = {
137
- FUNCTION: "function",
138
- };
139
- var VoiceBotEndpoint;
140
- (function (VoiceBotEndpoint) {
141
- VoiceBotEndpoint.visit = (value, visitor) => {
142
- if (value.llm !== undefined)
143
- return visitor.llm(value.llm);
144
- if (value.dialogflowCx !== undefined)
145
- return visitor.dialogflowCx(value.dialogflowCx);
146
- if (value.openAiAssistant !== undefined)
147
- return visitor.openAiAssistant(value.openAiAssistant);
148
- if (value.webhook !== undefined)
149
- return visitor.webhook(value.webhook);
150
- if (value.sqs !== undefined)
151
- return visitor.sqs(value.sqs);
152
- return visitor._(value.$unknown[0], value.$unknown[1]);
153
- };
154
- })(VoiceBotEndpoint || (exports.VoiceBotEndpoint = VoiceBotEndpoint = {}));
155
- var VoiceBotPipelineTerminateAction;
156
- (function (VoiceBotPipelineTerminateAction) {
157
- VoiceBotPipelineTerminateAction.visit = (value, visitor) => {
158
- if (value.hangup !== undefined)
159
- return visitor.hangup(value.hangup);
160
- if (value.transfer !== undefined)
161
- return visitor.transfer(value.transfer);
162
- return visitor._(value.$unknown[0], value.$unknown[1]);
163
- };
164
- })(VoiceBotPipelineTerminateAction || (exports.VoiceBotPipelineTerminateAction = VoiceBotPipelineTerminateAction = {}));
165
- class VoiceBotNonUniqueNameException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
166
- name = "VoiceBotNonUniqueNameException";
167
- $fault = "client";
168
- type;
169
- constructor(opts) {
170
- super({
171
- name: "VoiceBotNonUniqueNameException",
172
- $fault: "client",
173
- ...opts
174
- });
175
- Object.setPrototypeOf(this, VoiceBotNonUniqueNameException.prototype);
176
- this.type = opts.type;
177
- }
178
- }
179
- exports.VoiceBotNonUniqueNameException = VoiceBotNonUniqueNameException;
180
- exports.VoiceBotCommandType = {
181
- HANGUP: "hangup",
182
- PLAY: "play",
183
- SAY: "say",
184
- STOP: "stop",
185
- TRANSFER: "transfer",
186
- };
187
- var TraceActivityResult;
188
- (function (TraceActivityResult) {
189
- TraceActivityResult.visit = (value, visitor) => {
190
- if (value.error !== undefined)
191
- return visitor.error(value.error);
192
- if (value.text !== undefined)
193
- return visitor.text(value.text);
194
- return visitor._(value.$unknown[0], value.$unknown[1]);
195
- };
196
- })(TraceActivityResult || (exports.TraceActivityResult = TraceActivityResult = {}));
197
- exports.TraceActivityStatus = {
198
- CANCELLED: "cancelled",
199
- COMPLETE: "complete",
200
- ERROR: "error",
201
- PENDING: "pending",
202
- };
203
- var TraceActivityTrigger;
204
- (function (TraceActivityTrigger) {
205
- TraceActivityTrigger.visit = (value, visitor) => {
206
- if (value.connectEvent !== undefined)
207
- return visitor.connectEvent(value.connectEvent);
208
- if (value.disconnectEvent !== undefined)
209
- return visitor.disconnectEvent(value.disconnectEvent);
210
- if (value.replyEvent !== undefined)
211
- return visitor.replyEvent(value.replyEvent);
212
- if (value.completeEvent !== undefined)
213
- return visitor.completeEvent(value.completeEvent);
214
- if (value.interruptionEvent !== undefined)
215
- return visitor.interruptionEvent(value.interruptionEvent);
216
- if (value.playbackEvent !== undefined)
217
- return visitor.playbackEvent(value.playbackEvent);
218
- if (value.transcriptionEvent !== undefined)
219
- return visitor.transcriptionEvent(value.transcriptionEvent);
220
- if (value.sayCommand !== undefined)
221
- return visitor.sayCommand(value.sayCommand);
222
- if (value.hangupCommand !== undefined)
223
- return visitor.hangupCommand(value.hangupCommand);
224
- if (value.transferCommand !== undefined)
225
- return visitor.transferCommand(value.transferCommand);
226
- if (value.annotationCommand !== undefined)
227
- return visitor.annotationCommand(value.annotationCommand);
228
- if (value.silenceTimeoutTask !== undefined)
229
- return visitor.silenceTimeoutTask(value.silenceTimeoutTask);
230
- if (value.durationTimeoutTask !== undefined)
231
- return visitor.durationTimeoutTask(value.durationTimeoutTask);
232
- return visitor._(value.$unknown[0], value.$unknown[1]);
233
- };
234
- })(TraceActivityTrigger || (exports.TraceActivityTrigger = TraceActivityTrigger = {}));
235
- var TraceToolCall;
236
- (function (TraceToolCall) {
237
- TraceToolCall.visit = (value, visitor) => {
238
- if (value.transfer !== undefined)
239
- return visitor.transfer(value.transfer);
240
- if (value.hangup !== undefined)
241
- return visitor.hangup(value.hangup);
242
- if (value.wait !== undefined)
243
- return visitor.wait(value.wait);
244
- if (value.delegation !== undefined)
245
- return visitor.delegation(value.delegation);
246
- if (value.function !== undefined)
247
- return visitor.function(value.function);
248
- if (value.capabilityTool !== undefined)
249
- return visitor.capabilityTool(value.capabilityTool);
250
- if (value.capabilityKb !== undefined)
251
- return visitor.capabilityKb(value.capabilityKb);
252
- return visitor._(value.$unknown[0], value.$unknown[1]);
253
- };
254
- })(TraceToolCall || (exports.TraceToolCall = TraceToolCall = {}));
255
- var TraceSegmentCompletionMessage;
256
- (function (TraceSegmentCompletionMessage) {
257
- TraceSegmentCompletionMessage.visit = (value, visitor) => {
258
- if (value.text !== undefined)
259
- return visitor.text(value.text);
260
- if (value.tools !== undefined)
261
- return visitor.tools(value.tools);
262
- return visitor._(value.$unknown[0], value.$unknown[1]);
263
- };
264
- })(TraceSegmentCompletionMessage || (exports.TraceSegmentCompletionMessage = TraceSegmentCompletionMessage = {}));
265
- var TraceSegmentCompletionMessageItem;
266
- (function (TraceSegmentCompletionMessageItem) {
267
- TraceSegmentCompletionMessageItem.visit = (value, visitor) => {
268
- if (value.user !== undefined)
269
- return visitor.user(value.user);
270
- if (value.bot !== undefined)
271
- return visitor.bot(value.bot);
272
- return visitor._(value.$unknown[0], value.$unknown[1]);
273
- };
274
- })(TraceSegmentCompletionMessageItem || (exports.TraceSegmentCompletionMessageItem = TraceSegmentCompletionMessageItem = {}));
275
- var TraceGenericInputBlockContent;
276
- (function (TraceGenericInputBlockContent) {
277
- TraceGenericInputBlockContent.visit = (value, visitor) => {
278
- if (value.text !== undefined)
279
- return visitor.text(value.text);
280
- if (value.json !== undefined)
281
- return visitor.json(value.json);
282
- return visitor._(value.$unknown[0], value.$unknown[1]);
283
- };
284
- })(TraceGenericInputBlockContent || (exports.TraceGenericInputBlockContent = TraceGenericInputBlockContent = {}));
285
- var TraceSegmentInput;
286
- (function (TraceSegmentInput) {
287
- TraceSegmentInput.visit = (value, visitor) => {
288
- if (value.completion !== undefined)
289
- return visitor.completion(value.completion);
290
- if (value.tool !== undefined)
291
- return visitor.tool(value.tool);
292
- if (value.oauth !== undefined)
293
- return visitor.oauth(value.oauth);
294
- if (value.generic !== undefined)
295
- return visitor.generic(value.generic);
296
- return visitor._(value.$unknown[0], value.$unknown[1]);
297
- };
298
- })(TraceSegmentInput || (exports.TraceSegmentInput = TraceSegmentInput = {}));
299
- var TraceSegmentResult;
300
- (function (TraceSegmentResult) {
301
- TraceSegmentResult.visit = (value, visitor) => {
302
- if (value.error !== undefined)
303
- return visitor.error(value.error);
304
- if (value.tools !== undefined)
305
- return visitor.tools(value.tools);
306
- if (value.text !== undefined)
307
- return visitor.text(value.text);
308
- if (value.json !== undefined)
309
- return visitor.json(value.json);
310
- return visitor._(value.$unknown[0], value.$unknown[1]);
311
- };
312
- })(TraceSegmentResult || (exports.TraceSegmentResult = TraceSegmentResult = {}));
313
- exports.TraceSegmentStatus = {
314
- COMPLETE: "complete",
315
- ERROR: "error",
316
- PENDING: "pending",
317
- };
318
- exports.TraceSessionStatus = {
319
- COMPLETE: "complete",
320
- COMPLETE_WITH_ERROR: "complete_with_error",
321
- PENDING: "pending",
322
- };
323
- class VoiceBotNotFoundException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
324
- name = "VoiceBotNotFoundException";
325
- $fault = "client";
326
- type;
327
- constructor(opts) {
328
- super({
329
- name: "VoiceBotNotFoundException",
330
- $fault: "client",
331
- ...opts
332
- });
333
- Object.setPrototypeOf(this, VoiceBotNotFoundException.prototype);
334
- this.type = opts.type;
335
- }
336
- }
337
- exports.VoiceBotNotFoundException = VoiceBotNotFoundException;
338
- class VoiceSessionNotFoundException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
339
- name = "VoiceSessionNotFoundException";
340
- $fault = "client";
341
- type;
342
- constructor(opts) {
343
- super({
344
- name: "VoiceSessionNotFoundException",
345
- $fault: "client",
346
- ...opts
347
- });
348
- Object.setPrototypeOf(this, VoiceSessionNotFoundException.prototype);
349
- this.type = opts.type;
350
- }
351
- }
352
- exports.VoiceSessionNotFoundException = VoiceSessionNotFoundException;