@wildix/wim-voicebots-client 1.1.8 → 3.1.10
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.
- package/dist-cjs/VoiceBots.js +3 -3
- package/dist-cjs/VoiceBotsClient.js +34 -26
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +65 -0
- package/dist-cjs/commands/CreateVoiceBotCommand.js +10 -11
- package/dist-cjs/commands/DeleteVoiceBotCommand.js +10 -11
- package/dist-cjs/commands/DescribeEventCommand.js +10 -11
- package/dist-cjs/commands/GetTraceCommand.js +10 -11
- package/dist-cjs/commands/GetVoiceBotCommand.js +10 -11
- package/dist-cjs/commands/ListTracesCommand.js +10 -11
- package/dist-cjs/commands/ListVoiceBotsCommand.js +10 -11
- package/dist-cjs/commands/ListVoiceBotsNamesCommand.js +10 -11
- package/dist-cjs/commands/SendHangupCommand.js +10 -11
- package/dist-cjs/commands/SendPlayCommand.js +10 -11
- package/dist-cjs/commands/SendSayCommand.js +10 -11
- package/dist-cjs/commands/SendStopCommand.js +10 -11
- package/dist-cjs/commands/SendTransferCommand.js +10 -11
- package/dist-cjs/commands/UpdateVoiceBotCommand.js +10 -11
- package/dist-cjs/endpoint/EndpointParameters.js +16 -0
- package/dist-cjs/endpoint/bdd.js +28 -0
- package/dist-cjs/endpoint/endpointResolver.js +16 -0
- package/dist-cjs/index.js +4 -1
- package/dist-cjs/models/VoiceBotsServiceException.js +3 -3
- package/dist-cjs/models/enums.js +64 -0
- package/dist-cjs/models/errors.js +75 -0
- package/dist-cjs/models/models_0.js +0 -314
- package/dist-cjs/runtimeConfig.browser.js +11 -11
- package/dist-cjs/runtimeConfig.js +22 -18
- package/dist-cjs/runtimeConfig.shared.js +30 -10
- package/dist-cjs/runtimeExtensions.js +6 -5
- package/dist-cjs/schemas/schemas_0.js +1247 -0
- package/dist-es/VoiceBots.js +6 -6
- package/dist-es/VoiceBotsClient.js +30 -22
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +59 -0
- package/dist-es/commands/CreateVoiceBotCommand.js +9 -10
- package/dist-es/commands/DeleteVoiceBotCommand.js +9 -10
- package/dist-es/commands/DescribeEventCommand.js +9 -10
- package/dist-es/commands/GetTraceCommand.js +9 -10
- package/dist-es/commands/GetVoiceBotCommand.js +9 -10
- package/dist-es/commands/ListTracesCommand.js +9 -10
- package/dist-es/commands/ListVoiceBotsCommand.js +9 -10
- package/dist-es/commands/ListVoiceBotsNamesCommand.js +9 -10
- package/dist-es/commands/SendHangupCommand.js +9 -10
- package/dist-es/commands/SendPlayCommand.js +9 -10
- package/dist-es/commands/SendSayCommand.js +9 -10
- package/dist-es/commands/SendStopCommand.js +9 -10
- package/dist-es/commands/SendTransferCommand.js +9 -10
- package/dist-es/commands/UpdateVoiceBotCommand.js +9 -10
- package/dist-es/endpoint/EndpointParameters.js +12 -0
- package/dist-es/endpoint/bdd.js +25 -0
- package/dist-es/endpoint/endpointResolver.js +12 -0
- package/dist-es/index.js +4 -1
- package/dist-es/models/VoiceBotsServiceException.js +1 -1
- package/dist-es/models/enums.js +61 -0
- package/dist-es/models/errors.js +67 -0
- package/dist-es/models/models_0.js +1 -308
- package/dist-es/runtimeConfig.browser.js +7 -7
- package/dist-es/runtimeConfig.js +17 -13
- package/dist-es/runtimeConfig.shared.js +24 -4
- package/dist-es/runtimeExtensions.js +6 -5
- package/dist-es/schemas/schemas_0.js +1241 -0
- package/dist-types/VoiceBots.d.ts +15 -15
- package/dist-types/VoiceBotsClient.d.ts +44 -26
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
- package/dist-types/commands/CreateVoiceBotCommand.d.ts +143 -7
- package/dist-types/commands/DeleteVoiceBotCommand.d.ts +11 -7
- package/dist-types/commands/DescribeEventCommand.d.ts +35 -7
- package/dist-types/commands/GetTraceCommand.d.ts +33 -7
- package/dist-types/commands/GetVoiceBotCommand.d.ts +77 -7
- package/dist-types/commands/ListTracesCommand.d.ts +11 -7
- package/dist-types/commands/ListVoiceBotsCommand.d.ts +77 -7
- package/dist-types/commands/ListVoiceBotsNamesCommand.d.ts +11 -7
- package/dist-types/commands/SendHangupCommand.d.ts +11 -7
- package/dist-types/commands/SendPlayCommand.d.ts +11 -7
- package/dist-types/commands/SendSayCommand.d.ts +11 -7
- package/dist-types/commands/SendStopCommand.d.ts +11 -7
- package/dist-types/commands/SendTransferCommand.d.ts +11 -7
- package/dist-types/commands/UpdateVoiceBotCommand.d.ts +143 -7
- package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
- package/dist-types/endpoint/bdd.d.ts +2 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/extensionConfiguration.d.ts +4 -3
- package/dist-types/index.d.ts +5 -1
- package/dist-types/models/VoiceBotsServiceException.d.ts +1 -1
- package/dist-types/models/enums.d.ts +141 -0
- package/dist-types/models/errors.d.ts +60 -0
- package/dist-types/models/models_0.d.ts +349 -204
- package/dist-types/runtimeConfig.browser.d.ts +35 -16
- package/dist-types/runtimeConfig.d.ts +34 -15
- package/dist-types/runtimeConfig.native.d.ts +36 -17
- package/dist-types/runtimeConfig.shared.d.ts +20 -3
- package/dist-types/runtimeExtensions.d.ts +1 -1
- package/dist-types/schemas/schemas_0.d.ts +175 -0
- package/package.json +14 -40
- package/dist-cjs/models/index.js +0 -4
- package/dist-cjs/protocols/Aws_restJson1.js +0 -1030
- package/dist-es/models/index.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -999
- package/dist-types/models/index.d.ts +0 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -128
package/dist-es/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export * from "./VoiceBotsClient";
|
|
2
2
|
export * from "./VoiceBots";
|
|
3
3
|
export * from "./commands";
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./schemas/schemas_0";
|
|
5
|
+
export * from "./models/enums";
|
|
6
|
+
export * from "./models/errors";
|
|
7
|
+
export * from "./models/models_0";
|
|
5
8
|
export { VoiceBotsServiceException } from "./models/VoiceBotsServiceException";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServiceException as __ServiceException, } from "@smithy/
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/core/client";
|
|
2
2
|
export { __ServiceException };
|
|
3
3
|
export class VoiceBotsServiceException extends __ServiceException {
|
|
4
4
|
constructor(options) {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export const AnnotationSourceType = {
|
|
2
|
+
CHATBOT: "chatbot",
|
|
3
|
+
SYSTEM: "system",
|
|
4
|
+
USER: "user",
|
|
5
|
+
VOICEBOT: "voicebot",
|
|
6
|
+
};
|
|
7
|
+
export const VoiceBotEventType = {
|
|
8
|
+
AUDIO: "audio",
|
|
9
|
+
COMPLETE: "complete",
|
|
10
|
+
ENDED: "ended",
|
|
11
|
+
INTERRUPTION: "interruption",
|
|
12
|
+
PLAYBACK: "playback",
|
|
13
|
+
REPLY: "reply",
|
|
14
|
+
STARTED: "started",
|
|
15
|
+
TRANSCRIPTION: "transcription",
|
|
16
|
+
};
|
|
17
|
+
export const VoiceBotCapabilityToolPipelineType = {
|
|
18
|
+
ASYNC_REQUEST: "async_request",
|
|
19
|
+
ASYNC_REQUEST_GUIDED: "async_request_guided",
|
|
20
|
+
BLOCKING_REQUEST: "blocking_request",
|
|
21
|
+
BLOCKING_REQUEST_GUIDED: "blocking_request_guided",
|
|
22
|
+
};
|
|
23
|
+
export const VoiceBotEmbeddedToolType = {
|
|
24
|
+
DELEGATE: "DELEGATE",
|
|
25
|
+
HANGUP: "HANGUP",
|
|
26
|
+
TRANSFER: "TRANSFER",
|
|
27
|
+
WAIT: "WAIT",
|
|
28
|
+
};
|
|
29
|
+
export const VoiceBotFunctionIntegrationMethod = {
|
|
30
|
+
DELETE: "delete",
|
|
31
|
+
GET: "get",
|
|
32
|
+
PATCH: "patch",
|
|
33
|
+
POST: "post",
|
|
34
|
+
PUT: "put",
|
|
35
|
+
};
|
|
36
|
+
export const VoiceBotToolType = {
|
|
37
|
+
FUNCTION: "function",
|
|
38
|
+
};
|
|
39
|
+
export const VoiceBotCommandType = {
|
|
40
|
+
HANGUP: "hangup",
|
|
41
|
+
PLAY: "play",
|
|
42
|
+
SAY: "say",
|
|
43
|
+
STOP: "stop",
|
|
44
|
+
TRANSFER: "transfer",
|
|
45
|
+
};
|
|
46
|
+
export const TraceActivityStatus = {
|
|
47
|
+
CANCELLED: "cancelled",
|
|
48
|
+
COMPLETE: "complete",
|
|
49
|
+
ERROR: "error",
|
|
50
|
+
PENDING: "pending",
|
|
51
|
+
};
|
|
52
|
+
export const TraceSegmentStatus = {
|
|
53
|
+
COMPLETE: "complete",
|
|
54
|
+
ERROR: "error",
|
|
55
|
+
PENDING: "pending",
|
|
56
|
+
};
|
|
57
|
+
export const TraceSessionStatus = {
|
|
58
|
+
COMPLETE: "complete",
|
|
59
|
+
COMPLETE_WITH_ERROR: "complete_with_error",
|
|
60
|
+
PENDING: "pending",
|
|
61
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { VoiceBotsServiceException as __BaseException } from "./VoiceBotsServiceException";
|
|
2
|
+
export class ForbiddenException extends __BaseException {
|
|
3
|
+
name = "ForbiddenException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "ForbiddenException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class ValidationException extends __BaseException {
|
|
15
|
+
name = "ValidationException";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
constructor(opts) {
|
|
18
|
+
super({
|
|
19
|
+
name: "ValidationException",
|
|
20
|
+
$fault: "client",
|
|
21
|
+
...opts,
|
|
22
|
+
});
|
|
23
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class VoiceBotNonUniqueNameException extends __BaseException {
|
|
27
|
+
name = "VoiceBotNonUniqueNameException";
|
|
28
|
+
$fault = "client";
|
|
29
|
+
type;
|
|
30
|
+
constructor(opts) {
|
|
31
|
+
super({
|
|
32
|
+
name: "VoiceBotNonUniqueNameException",
|
|
33
|
+
$fault: "client",
|
|
34
|
+
...opts,
|
|
35
|
+
});
|
|
36
|
+
Object.setPrototypeOf(this, VoiceBotNonUniqueNameException.prototype);
|
|
37
|
+
this.type = opts.type;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export class VoiceBotNotFoundException extends __BaseException {
|
|
41
|
+
name = "VoiceBotNotFoundException";
|
|
42
|
+
$fault = "client";
|
|
43
|
+
type;
|
|
44
|
+
constructor(opts) {
|
|
45
|
+
super({
|
|
46
|
+
name: "VoiceBotNotFoundException",
|
|
47
|
+
$fault: "client",
|
|
48
|
+
...opts,
|
|
49
|
+
});
|
|
50
|
+
Object.setPrototypeOf(this, VoiceBotNotFoundException.prototype);
|
|
51
|
+
this.type = opts.type;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export class VoiceSessionNotFoundException extends __BaseException {
|
|
55
|
+
name = "VoiceSessionNotFoundException";
|
|
56
|
+
$fault = "client";
|
|
57
|
+
type;
|
|
58
|
+
constructor(opts) {
|
|
59
|
+
super({
|
|
60
|
+
name: "VoiceSessionNotFoundException",
|
|
61
|
+
$fault: "client",
|
|
62
|
+
...opts,
|
|
63
|
+
});
|
|
64
|
+
Object.setPrototypeOf(this, VoiceSessionNotFoundException.prototype);
|
|
65
|
+
this.type = opts.type;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -1,308 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export class ForbiddenException extends __BaseException {
|
|
3
|
-
name = "ForbiddenException";
|
|
4
|
-
$fault = "client";
|
|
5
|
-
constructor(opts) {
|
|
6
|
-
super({
|
|
7
|
-
name: "ForbiddenException",
|
|
8
|
-
$fault: "client",
|
|
9
|
-
...opts
|
|
10
|
-
});
|
|
11
|
-
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export class ValidationException extends __BaseException {
|
|
15
|
-
name = "ValidationException";
|
|
16
|
-
$fault = "client";
|
|
17
|
-
constructor(opts) {
|
|
18
|
-
super({
|
|
19
|
-
name: "ValidationException",
|
|
20
|
-
$fault: "client",
|
|
21
|
-
...opts
|
|
22
|
-
});
|
|
23
|
-
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export const VoiceBotEventType = {
|
|
27
|
-
AUDIO: "audio",
|
|
28
|
-
COMPLETE: "complete",
|
|
29
|
-
ENDED: "ended",
|
|
30
|
-
INTERRUPTION: "interruption",
|
|
31
|
-
PLAYBACK: "playback",
|
|
32
|
-
REPLY: "reply",
|
|
33
|
-
STARTED: "started",
|
|
34
|
-
TRANSCRIPTION: "transcription",
|
|
35
|
-
};
|
|
36
|
-
export const VoiceBotCapabilityToolPipelineType = {
|
|
37
|
-
ASYNC_REQUEST: "async_request",
|
|
38
|
-
ASYNC_REQUEST_GUIDED: "async_request_guided",
|
|
39
|
-
BLOCKING_REQUEST: "blocking_request",
|
|
40
|
-
BLOCKING_REQUEST_GUIDED: "blocking_request_guided",
|
|
41
|
-
};
|
|
42
|
-
export var VoiceBotToolVariableHandler;
|
|
43
|
-
(function (VoiceBotToolVariableHandler) {
|
|
44
|
-
VoiceBotToolVariableHandler.visit = (value, visitor) => {
|
|
45
|
-
if (value.auto !== undefined)
|
|
46
|
-
return visitor.auto(value.auto);
|
|
47
|
-
if (value.guided !== undefined)
|
|
48
|
-
return visitor.guided(value.guided);
|
|
49
|
-
if (value.predefined !== undefined)
|
|
50
|
-
return visitor.predefined(value.predefined);
|
|
51
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
52
|
-
};
|
|
53
|
-
})(VoiceBotToolVariableHandler || (VoiceBotToolVariableHandler = {}));
|
|
54
|
-
export var VoiceBotCapability;
|
|
55
|
-
(function (VoiceBotCapability) {
|
|
56
|
-
VoiceBotCapability.visit = (value, visitor) => {
|
|
57
|
-
if (value.tool !== undefined)
|
|
58
|
-
return visitor.tool(value.tool);
|
|
59
|
-
if (value.kb !== undefined)
|
|
60
|
-
return visitor.kb(value.kb);
|
|
61
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
62
|
-
};
|
|
63
|
-
})(VoiceBotCapability || (VoiceBotCapability = {}));
|
|
64
|
-
export const VoiceBotEmbeddedToolType = {
|
|
65
|
-
DELEGATE: "DELEGATE",
|
|
66
|
-
HANGUP: "HANGUP",
|
|
67
|
-
TRANSFER: "TRANSFER",
|
|
68
|
-
WAIT: "WAIT",
|
|
69
|
-
};
|
|
70
|
-
export var VoiceBotFunctionIntegrationWebhookAuthorization;
|
|
71
|
-
(function (VoiceBotFunctionIntegrationWebhookAuthorization) {
|
|
72
|
-
VoiceBotFunctionIntegrationWebhookAuthorization.visit = (value, visitor) => {
|
|
73
|
-
if (value.bearer !== undefined)
|
|
74
|
-
return visitor.bearer(value.bearer);
|
|
75
|
-
if (value.basic !== undefined)
|
|
76
|
-
return visitor.basic(value.basic);
|
|
77
|
-
if (value.oauth !== undefined)
|
|
78
|
-
return visitor.oauth(value.oauth);
|
|
79
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
80
|
-
};
|
|
81
|
-
})(VoiceBotFunctionIntegrationWebhookAuthorization || (VoiceBotFunctionIntegrationWebhookAuthorization = {}));
|
|
82
|
-
export const VoiceBotFunctionIntegrationMethod = {
|
|
83
|
-
DELETE: "delete",
|
|
84
|
-
GET: "get",
|
|
85
|
-
PATCH: "patch",
|
|
86
|
-
POST: "post",
|
|
87
|
-
PUT: "put",
|
|
88
|
-
};
|
|
89
|
-
export var VoiceBotFunctionIntegration;
|
|
90
|
-
(function (VoiceBotFunctionIntegration) {
|
|
91
|
-
VoiceBotFunctionIntegration.visit = (value, visitor) => {
|
|
92
|
-
if (value.webhook !== undefined)
|
|
93
|
-
return visitor.webhook(value.webhook);
|
|
94
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
95
|
-
};
|
|
96
|
-
})(VoiceBotFunctionIntegration || (VoiceBotFunctionIntegration = {}));
|
|
97
|
-
export const VoiceBotToolType = {
|
|
98
|
-
FUNCTION: "function",
|
|
99
|
-
};
|
|
100
|
-
export var VoiceBotEndpoint;
|
|
101
|
-
(function (VoiceBotEndpoint) {
|
|
102
|
-
VoiceBotEndpoint.visit = (value, visitor) => {
|
|
103
|
-
if (value.llm !== undefined)
|
|
104
|
-
return visitor.llm(value.llm);
|
|
105
|
-
if (value.dialogflowCx !== undefined)
|
|
106
|
-
return visitor.dialogflowCx(value.dialogflowCx);
|
|
107
|
-
if (value.openAiAssistant !== undefined)
|
|
108
|
-
return visitor.openAiAssistant(value.openAiAssistant);
|
|
109
|
-
if (value.webhook !== undefined)
|
|
110
|
-
return visitor.webhook(value.webhook);
|
|
111
|
-
if (value.sqs !== undefined)
|
|
112
|
-
return visitor.sqs(value.sqs);
|
|
113
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
114
|
-
};
|
|
115
|
-
})(VoiceBotEndpoint || (VoiceBotEndpoint = {}));
|
|
116
|
-
export var VoiceBotPipelineTerminateAction;
|
|
117
|
-
(function (VoiceBotPipelineTerminateAction) {
|
|
118
|
-
VoiceBotPipelineTerminateAction.visit = (value, visitor) => {
|
|
119
|
-
if (value.hangup !== undefined)
|
|
120
|
-
return visitor.hangup(value.hangup);
|
|
121
|
-
if (value.transfer !== undefined)
|
|
122
|
-
return visitor.transfer(value.transfer);
|
|
123
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
124
|
-
};
|
|
125
|
-
})(VoiceBotPipelineTerminateAction || (VoiceBotPipelineTerminateAction = {}));
|
|
126
|
-
export class VoiceBotNonUniqueNameException extends __BaseException {
|
|
127
|
-
name = "VoiceBotNonUniqueNameException";
|
|
128
|
-
$fault = "client";
|
|
129
|
-
type;
|
|
130
|
-
constructor(opts) {
|
|
131
|
-
super({
|
|
132
|
-
name: "VoiceBotNonUniqueNameException",
|
|
133
|
-
$fault: "client",
|
|
134
|
-
...opts
|
|
135
|
-
});
|
|
136
|
-
Object.setPrototypeOf(this, VoiceBotNonUniqueNameException.prototype);
|
|
137
|
-
this.type = opts.type;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
export const VoiceBotCommandType = {
|
|
141
|
-
HANGUP: "hangup",
|
|
142
|
-
PLAY: "play",
|
|
143
|
-
SAY: "say",
|
|
144
|
-
STOP: "stop",
|
|
145
|
-
TRANSFER: "transfer",
|
|
146
|
-
};
|
|
147
|
-
export var TraceActivityResult;
|
|
148
|
-
(function (TraceActivityResult) {
|
|
149
|
-
TraceActivityResult.visit = (value, visitor) => {
|
|
150
|
-
if (value.error !== undefined)
|
|
151
|
-
return visitor.error(value.error);
|
|
152
|
-
if (value.text !== undefined)
|
|
153
|
-
return visitor.text(value.text);
|
|
154
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
155
|
-
};
|
|
156
|
-
})(TraceActivityResult || (TraceActivityResult = {}));
|
|
157
|
-
export const TraceActivityStatus = {
|
|
158
|
-
CANCELLED: "cancelled",
|
|
159
|
-
COMPLETE: "complete",
|
|
160
|
-
ERROR: "error",
|
|
161
|
-
PENDING: "pending",
|
|
162
|
-
};
|
|
163
|
-
export var TraceActivityTrigger;
|
|
164
|
-
(function (TraceActivityTrigger) {
|
|
165
|
-
TraceActivityTrigger.visit = (value, visitor) => {
|
|
166
|
-
if (value.connectEvent !== undefined)
|
|
167
|
-
return visitor.connectEvent(value.connectEvent);
|
|
168
|
-
if (value.disconnectEvent !== undefined)
|
|
169
|
-
return visitor.disconnectEvent(value.disconnectEvent);
|
|
170
|
-
if (value.replyEvent !== undefined)
|
|
171
|
-
return visitor.replyEvent(value.replyEvent);
|
|
172
|
-
if (value.completeEvent !== undefined)
|
|
173
|
-
return visitor.completeEvent(value.completeEvent);
|
|
174
|
-
if (value.interruptionEvent !== undefined)
|
|
175
|
-
return visitor.interruptionEvent(value.interruptionEvent);
|
|
176
|
-
if (value.playbackEvent !== undefined)
|
|
177
|
-
return visitor.playbackEvent(value.playbackEvent);
|
|
178
|
-
if (value.transcriptionEvent !== undefined)
|
|
179
|
-
return visitor.transcriptionEvent(value.transcriptionEvent);
|
|
180
|
-
if (value.sayCommand !== undefined)
|
|
181
|
-
return visitor.sayCommand(value.sayCommand);
|
|
182
|
-
if (value.hangupCommand !== undefined)
|
|
183
|
-
return visitor.hangupCommand(value.hangupCommand);
|
|
184
|
-
if (value.transferCommand !== undefined)
|
|
185
|
-
return visitor.transferCommand(value.transferCommand);
|
|
186
|
-
if (value.silenceTimeoutTask !== undefined)
|
|
187
|
-
return visitor.silenceTimeoutTask(value.silenceTimeoutTask);
|
|
188
|
-
if (value.durationTimeoutTask !== undefined)
|
|
189
|
-
return visitor.durationTimeoutTask(value.durationTimeoutTask);
|
|
190
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
191
|
-
};
|
|
192
|
-
})(TraceActivityTrigger || (TraceActivityTrigger = {}));
|
|
193
|
-
export var TraceToolCall;
|
|
194
|
-
(function (TraceToolCall) {
|
|
195
|
-
TraceToolCall.visit = (value, visitor) => {
|
|
196
|
-
if (value.transfer !== undefined)
|
|
197
|
-
return visitor.transfer(value.transfer);
|
|
198
|
-
if (value.hangup !== undefined)
|
|
199
|
-
return visitor.hangup(value.hangup);
|
|
200
|
-
if (value.wait !== undefined)
|
|
201
|
-
return visitor.wait(value.wait);
|
|
202
|
-
if (value.delegation !== undefined)
|
|
203
|
-
return visitor.delegation(value.delegation);
|
|
204
|
-
if (value.function !== undefined)
|
|
205
|
-
return visitor.function(value.function);
|
|
206
|
-
if (value.capabilityTool !== undefined)
|
|
207
|
-
return visitor.capabilityTool(value.capabilityTool);
|
|
208
|
-
if (value.capabilityKb !== undefined)
|
|
209
|
-
return visitor.capabilityKb(value.capabilityKb);
|
|
210
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
211
|
-
};
|
|
212
|
-
})(TraceToolCall || (TraceToolCall = {}));
|
|
213
|
-
export var TraceSegmentCompletionMessage;
|
|
214
|
-
(function (TraceSegmentCompletionMessage) {
|
|
215
|
-
TraceSegmentCompletionMessage.visit = (value, visitor) => {
|
|
216
|
-
if (value.text !== undefined)
|
|
217
|
-
return visitor.text(value.text);
|
|
218
|
-
if (value.tools !== undefined)
|
|
219
|
-
return visitor.tools(value.tools);
|
|
220
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
221
|
-
};
|
|
222
|
-
})(TraceSegmentCompletionMessage || (TraceSegmentCompletionMessage = {}));
|
|
223
|
-
export var TraceSegmentCompletionMessageItem;
|
|
224
|
-
(function (TraceSegmentCompletionMessageItem) {
|
|
225
|
-
TraceSegmentCompletionMessageItem.visit = (value, visitor) => {
|
|
226
|
-
if (value.user !== undefined)
|
|
227
|
-
return visitor.user(value.user);
|
|
228
|
-
if (value.bot !== undefined)
|
|
229
|
-
return visitor.bot(value.bot);
|
|
230
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
231
|
-
};
|
|
232
|
-
})(TraceSegmentCompletionMessageItem || (TraceSegmentCompletionMessageItem = {}));
|
|
233
|
-
export var TraceGenericInputBlockContent;
|
|
234
|
-
(function (TraceGenericInputBlockContent) {
|
|
235
|
-
TraceGenericInputBlockContent.visit = (value, visitor) => {
|
|
236
|
-
if (value.text !== undefined)
|
|
237
|
-
return visitor.text(value.text);
|
|
238
|
-
if (value.json !== undefined)
|
|
239
|
-
return visitor.json(value.json);
|
|
240
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
241
|
-
};
|
|
242
|
-
})(TraceGenericInputBlockContent || (TraceGenericInputBlockContent = {}));
|
|
243
|
-
export var TraceSegmentInput;
|
|
244
|
-
(function (TraceSegmentInput) {
|
|
245
|
-
TraceSegmentInput.visit = (value, visitor) => {
|
|
246
|
-
if (value.completion !== undefined)
|
|
247
|
-
return visitor.completion(value.completion);
|
|
248
|
-
if (value.tool !== undefined)
|
|
249
|
-
return visitor.tool(value.tool);
|
|
250
|
-
if (value.oauth !== undefined)
|
|
251
|
-
return visitor.oauth(value.oauth);
|
|
252
|
-
if (value.generic !== undefined)
|
|
253
|
-
return visitor.generic(value.generic);
|
|
254
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
255
|
-
};
|
|
256
|
-
})(TraceSegmentInput || (TraceSegmentInput = {}));
|
|
257
|
-
export var TraceSegmentResult;
|
|
258
|
-
(function (TraceSegmentResult) {
|
|
259
|
-
TraceSegmentResult.visit = (value, visitor) => {
|
|
260
|
-
if (value.error !== undefined)
|
|
261
|
-
return visitor.error(value.error);
|
|
262
|
-
if (value.tools !== undefined)
|
|
263
|
-
return visitor.tools(value.tools);
|
|
264
|
-
if (value.text !== undefined)
|
|
265
|
-
return visitor.text(value.text);
|
|
266
|
-
if (value.json !== undefined)
|
|
267
|
-
return visitor.json(value.json);
|
|
268
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
269
|
-
};
|
|
270
|
-
})(TraceSegmentResult || (TraceSegmentResult = {}));
|
|
271
|
-
export const TraceSegmentStatus = {
|
|
272
|
-
COMPLETE: "complete",
|
|
273
|
-
ERROR: "error",
|
|
274
|
-
PENDING: "pending",
|
|
275
|
-
};
|
|
276
|
-
export const TraceSessionStatus = {
|
|
277
|
-
COMPLETE: "complete",
|
|
278
|
-
COMPLETE_WITH_ERROR: "complete_with_error",
|
|
279
|
-
PENDING: "pending",
|
|
280
|
-
};
|
|
281
|
-
export class VoiceBotNotFoundException extends __BaseException {
|
|
282
|
-
name = "VoiceBotNotFoundException";
|
|
283
|
-
$fault = "client";
|
|
284
|
-
type;
|
|
285
|
-
constructor(opts) {
|
|
286
|
-
super({
|
|
287
|
-
name: "VoiceBotNotFoundException",
|
|
288
|
-
$fault: "client",
|
|
289
|
-
...opts
|
|
290
|
-
});
|
|
291
|
-
Object.setPrototypeOf(this, VoiceBotNotFoundException.prototype);
|
|
292
|
-
this.type = opts.type;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
export class VoiceSessionNotFoundException extends __BaseException {
|
|
296
|
-
name = "VoiceSessionNotFoundException";
|
|
297
|
-
$fault = "client";
|
|
298
|
-
type;
|
|
299
|
-
constructor(opts) {
|
|
300
|
-
super({
|
|
301
|
-
name: "VoiceSessionNotFoundException",
|
|
302
|
-
$fault: "client",
|
|
303
|
-
...opts
|
|
304
|
-
});
|
|
305
|
-
Object.setPrototypeOf(this, VoiceSessionNotFoundException.prototype);
|
|
306
|
-
this.type = opts.type;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
-
import { createDefaultUserAgentProvider } from "@aws-sdk/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
|
|
4
|
+
import { loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
5
|
+
import { resolveDefaultsModeConfig } from "@smithy/core/config";
|
|
6
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/core/retry";
|
|
7
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
8
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
7
9
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
8
|
-
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
9
|
-
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
10
10
|
export const getRuntimeConfig = (config) => {
|
|
11
11
|
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
12
|
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
@@ -17,7 +17,7 @@ export const getRuntimeConfig = (config) => {
|
|
|
17
17
|
runtime: "browser",
|
|
18
18
|
defaultsMode,
|
|
19
19
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
20
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({
|
|
20
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ clientVersion: packageInfo.version }),
|
|
21
21
|
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
22
22
|
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
23
23
|
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
2
|
+
import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } from "@aws-sdk/core/client";
|
|
3
|
+
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
4
|
+
import { loadConfig as loadNodeConfig, resolveDefaultsModeConfig } from "@smithy/core/config";
|
|
5
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
|
|
6
|
+
import { calculateBodyLength, Hash } from "@smithy/core/serde";
|
|
7
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
9
8
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
10
|
-
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
|
-
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
12
|
-
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
|
|
13
9
|
export const getRuntimeConfig = (config) => {
|
|
14
10
|
emitWarningIfUnsupportedVersion(process.version);
|
|
15
11
|
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
12
|
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
13
|
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
14
|
+
const loaderConfig = {
|
|
15
|
+
profile: config?.profile,
|
|
16
|
+
logger: clientSharedValues.logger,
|
|
17
|
+
};
|
|
18
18
|
return {
|
|
19
19
|
...clientSharedValues,
|
|
20
20
|
...config,
|
|
21
21
|
runtime: "node",
|
|
22
22
|
defaultsMode,
|
|
23
23
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
24
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ clientVersion: packageInfo.version }),
|
|
25
25
|
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
26
26
|
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
-
retryMode: config?.retryMode ??
|
|
27
|
+
retryMode: config?.retryMode ??
|
|
28
|
+
loadNodeConfig({
|
|
29
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
30
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
31
|
+
}, config),
|
|
28
32
|
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
29
33
|
streamCollector: config?.streamCollector ?? streamCollector,
|
|
30
|
-
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS,
|
|
34
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
31
35
|
};
|
|
32
36
|
};
|
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
2
|
+
import { HttpBearerAuthSigner } from "@smithy/core";
|
|
3
|
+
import { NoOpLogger } from "@smithy/core/client";
|
|
4
|
+
import { parseUrl } from "@smithy/core/protocols";
|
|
5
|
+
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
|
|
6
|
+
import { defaultVoiceBotsHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
7
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
8
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
5
9
|
export const getRuntimeConfig = (config) => {
|
|
6
10
|
return {
|
|
7
11
|
apiVersion: "v2",
|
|
8
12
|
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
9
13
|
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
10
14
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
15
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
11
16
|
extensions: config?.extensions ?? [],
|
|
17
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultVoiceBotsHttpAuthSchemeProvider,
|
|
18
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
19
|
+
{
|
|
20
|
+
schemeId: "smithy.api#httpBearerAuth",
|
|
21
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
|
|
22
|
+
signer: new HttpBearerAuthSigner(),
|
|
23
|
+
},
|
|
24
|
+
],
|
|
12
25
|
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
27
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
28
|
+
defaultNamespace: "wildix.wim.voicebots",
|
|
29
|
+
errorTypeRegistries,
|
|
30
|
+
version: "v2",
|
|
31
|
+
serviceTarget: "VoiceBots",
|
|
32
|
+
},
|
|
13
33
|
urlParser: config?.urlParser ?? parseUrl,
|
|
14
34
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
15
35
|
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/core/client";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/core/protocols";
|
|
3
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
3
4
|
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
4
|
-
const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig));
|
|
5
|
-
extensions.forEach(extension => extension.configure(extensionConfiguration));
|
|
6
|
-
return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration));
|
|
5
|
+
const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
6
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
7
|
+
return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
7
8
|
};
|