@wildix/xbees-users-client 1.0.37 → 1.0.39
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/UsersClient.js +4 -5
- package/dist-cjs/models/models_0.js +33 -21
- package/dist-cjs/protocols/Aws_restJson1.js +73 -116
- package/dist-cjs/runtimeConfig.browser.js +1 -1
- package/dist-cjs/runtimeConfig.js +4 -3
- package/dist-cjs/runtimeExtensions.js +2 -10
- package/dist-es/UsersClient.js +4 -5
- package/dist-es/models/models_0.js +28 -16
- package/dist-es/protocols/Aws_restJson1.js +6 -49
- package/dist-es/runtimeConfig.browser.js +2 -2
- package/dist-es/runtimeConfig.js +5 -4
- package/dist-es/runtimeExtensions.js +2 -10
- package/dist-types/UsersClient.d.ts +1 -1
- package/dist-types/commands/BatchGetUsersCommand.d.ts +12 -0
- package/dist-types/commands/BatchGetUsersEmailNotificationsSettingsCommand.d.ts +12 -0
- package/dist-types/commands/BatchGetUsersPbxLinkDataCommand.d.ts +12 -0
- package/dist-types/commands/BatchGetUsersPbxLinkDataV1Command.d.ts +12 -0
- package/dist-types/commands/ChangeUserEmailCommand.d.ts +12 -0
- package/dist-types/commands/CreateBotApiKeyCommand.d.ts +16 -1
- package/dist-types/commands/CreateBotCommand.d.ts +19 -3
- package/dist-types/commands/CreateSystemBotCommand.d.ts +12 -0
- package/dist-types/commands/DeleteBotApiKeyCommand.d.ts +12 -0
- package/dist-types/commands/DeleteBotCommand.d.ts +12 -0
- package/dist-types/commands/GetBotCallbackCommand.d.ts +13 -1
- package/dist-types/commands/GetBotCommand.d.ts +16 -1
- package/dist-types/commands/GetUserCommand.d.ts +12 -0
- package/dist-types/commands/GetUserEmailNotificationsSettingsCommand.d.ts +12 -0
- package/dist-types/commands/GetUserPbxLinkDataCommand.d.ts +12 -0
- package/dist-types/commands/GetUserPbxLinkSuggestionCommand.d.ts +12 -0
- package/dist-types/commands/GetUserPbxLinkSuggestionV1Command.d.ts +12 -0
- package/dist-types/commands/IntelligenceSearchCommand.d.ts +12 -0
- package/dist-types/commands/ListBotApiKeysCommand.d.ts +12 -0
- package/dist-types/commands/ListBotsCommand.d.ts +16 -1
- package/dist-types/commands/PartialUpdateUserEmailNotificationsSettingsCommand.d.ts +12 -0
- package/dist-types/commands/QueryColleaguesCommand.d.ts +12 -0
- package/dist-types/commands/QueryUserCommand.d.ts +12 -0
- package/dist-types/commands/QueryUsersCommand.d.ts +12 -0
- package/dist-types/commands/ToggleTranscriptionEmailNotificationsSubscriptionCommand.d.ts +12 -0
- package/dist-types/commands/ToggleUnreadEmailNotificationsSubscriptionCommand.d.ts +12 -0
- package/dist-types/commands/UpdateBotCallbackCommand.d.ts +14 -2
- package/dist-types/commands/UpdateBotCommand.d.ts +19 -3
- package/dist-types/commands/UpdateUserEmailNotificationsSettingsCommand.d.ts +12 -0
- package/dist-types/commands/UploadPictureCommand.d.ts +12 -0
- package/dist-types/commands/UploadPictureV1Command.d.ts +12 -0
- package/dist-types/commands/VerifyBotSecretKeyCommand.d.ts +12 -0
- package/dist-types/commands/VerifyBotSecretKeyV1Command.d.ts +12 -0
- package/dist-types/models/models_0.d.ts +179 -118
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +3 -2
- package/dist-types/runtimeConfig.native.d.ts +3 -2
- package/package.json +38 -34
|
@@ -21,7 +21,7 @@ const getRuntimeConfig = (config) => {
|
|
|
21
21
|
runtime: "browser",
|
|
22
22
|
defaultsMode,
|
|
23
23
|
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
|
24
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
|
|
25
25
|
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
26
26
|
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
27
|
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
|
@@ -25,12 +25,13 @@ const getRuntimeConfig = (config) => {
|
|
|
25
25
|
runtime: "node",
|
|
26
26
|
defaultsMode,
|
|
27
27
|
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
28
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.
|
|
29
|
-
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
28
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
30
30
|
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
31
|
-
retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }),
|
|
31
|
+
retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }, config),
|
|
32
32
|
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
33
33
|
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
34
|
+
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
|
|
34
35
|
};
|
|
35
36
|
};
|
|
36
37
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -3,17 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.resolveRuntimeExtensions = void 0;
|
|
4
4
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const asPartial = (t) => t;
|
|
7
6
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
8
|
-
const extensionConfiguration =
|
|
9
|
-
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
10
|
-
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
11
|
-
};
|
|
7
|
+
const extensionConfiguration = Object.assign((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig));
|
|
12
8
|
extensions.forEach(extension => extension.configure(extensionConfiguration));
|
|
13
|
-
return
|
|
14
|
-
...runtimeConfig,
|
|
15
|
-
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
16
|
-
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
17
|
-
};
|
|
9
|
+
return Object.assign(runtimeConfig, (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration));
|
|
18
10
|
};
|
|
19
11
|
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
package/dist-es/UsersClient.js
CHANGED
|
@@ -7,8 +7,11 @@ import { Client as __Client, } from "@smithy/smithy-client";
|
|
|
7
7
|
import { authorizationMiddleware } from '@wildix/smithy-utils';
|
|
8
8
|
export { __Client };
|
|
9
9
|
export class UsersClient extends __Client {
|
|
10
|
+
config;
|
|
10
11
|
constructor(...[configuration]) {
|
|
11
12
|
let _config_0 = __getRuntimeConfig(configuration || {});
|
|
13
|
+
super(_config_0);
|
|
14
|
+
this.initConfig = _config_0;
|
|
12
15
|
let _config_1 = resolveUserAgentConfig(_config_0);
|
|
13
16
|
let _config_2 = resolveRetryConfig(_config_1);
|
|
14
17
|
let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
|
|
@@ -21,11 +24,7 @@ export class UsersClient extends __Client {
|
|
|
21
24
|
path: ''
|
|
22
25
|
};
|
|
23
26
|
};
|
|
24
|
-
const config = {
|
|
25
|
-
..._config_3,
|
|
26
|
-
endpoint,
|
|
27
|
-
};
|
|
28
|
-
super(config);
|
|
27
|
+
const config = { ..._config_3, endpoint };
|
|
29
28
|
this.config = config;
|
|
30
29
|
this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
31
30
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { UsersServiceException as __BaseException } from "./UsersServiceException";
|
|
2
2
|
export class ValidationException extends __BaseException {
|
|
3
|
+
name = "ValidationException";
|
|
4
|
+
$fault = "client";
|
|
3
5
|
constructor(opts) {
|
|
4
6
|
super({
|
|
5
7
|
name: "ValidationException",
|
|
6
8
|
$fault: "client",
|
|
7
9
|
...opts
|
|
8
10
|
});
|
|
9
|
-
this.name = "ValidationException";
|
|
10
|
-
this.$fault = "client";
|
|
11
11
|
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
export class ForbiddenException extends __BaseException {
|
|
15
|
+
name = "ForbiddenException";
|
|
16
|
+
$fault = "client";
|
|
15
17
|
constructor(opts) {
|
|
16
18
|
super({
|
|
17
19
|
name: "ForbiddenException",
|
|
18
20
|
$fault: "client",
|
|
19
21
|
...opts
|
|
20
22
|
});
|
|
21
|
-
this.name = "ForbiddenException";
|
|
22
|
-
this.$fault = "client";
|
|
23
23
|
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -64,21 +64,33 @@ export const PbxColleaguesSearchStrategy = {
|
|
|
64
64
|
CONTAIN: "contain",
|
|
65
65
|
STARTS_WITH: "startsWith",
|
|
66
66
|
};
|
|
67
|
+
export const BotAccess = {
|
|
68
|
+
EVERYBODY: "EVERYBODY",
|
|
69
|
+
ORGANIZATION: "ORGANIZATION",
|
|
70
|
+
};
|
|
71
|
+
export const BotIntegrationType = {
|
|
72
|
+
DIALOGFLOW_CX: "DIALOGFLOW_CX",
|
|
73
|
+
LLM: "LLM",
|
|
74
|
+
OPEN_AI_ASSISTANT: "OPEN_AI_ASSISTANT",
|
|
75
|
+
SQS: "SQS",
|
|
76
|
+
WEBHOOK: "WEBHOOK",
|
|
77
|
+
};
|
|
67
78
|
export class BotApiKeyNotFoundException extends __BaseException {
|
|
79
|
+
name = "BotApiKeyNotFoundException";
|
|
80
|
+
$fault = "client";
|
|
68
81
|
constructor(opts) {
|
|
69
82
|
super({
|
|
70
83
|
name: "BotApiKeyNotFoundException",
|
|
71
84
|
$fault: "client",
|
|
72
85
|
...opts
|
|
73
86
|
});
|
|
74
|
-
this.name = "BotApiKeyNotFoundException";
|
|
75
|
-
this.$fault = "client";
|
|
76
87
|
Object.setPrototypeOf(this, BotApiKeyNotFoundException.prototype);
|
|
77
88
|
}
|
|
78
89
|
}
|
|
79
90
|
export const BotLlmEmbeddedToolType = {
|
|
80
91
|
DELEGATE: "DELEGATE",
|
|
81
92
|
HANDOVER: "HANDOVER",
|
|
93
|
+
SUGGESTIONS: "SUGGESTIONS",
|
|
82
94
|
};
|
|
83
95
|
export var BotLlmFunctionIntegrationWebhookAuthorization;
|
|
84
96
|
(function (BotLlmFunctionIntegrationWebhookAuthorization) {
|
|
@@ -127,50 +139,50 @@ export var BotEndpoint;
|
|
|
127
139
|
};
|
|
128
140
|
})(BotEndpoint || (BotEndpoint = {}));
|
|
129
141
|
export class BotNotFoundException extends __BaseException {
|
|
142
|
+
name = "BotNotFoundException";
|
|
143
|
+
$fault = "client";
|
|
130
144
|
constructor(opts) {
|
|
131
145
|
super({
|
|
132
146
|
name: "BotNotFoundException",
|
|
133
147
|
$fault: "client",
|
|
134
148
|
...opts
|
|
135
149
|
});
|
|
136
|
-
this.name = "BotNotFoundException";
|
|
137
|
-
this.$fault = "client";
|
|
138
150
|
Object.setPrototypeOf(this, BotNotFoundException.prototype);
|
|
139
151
|
}
|
|
140
152
|
}
|
|
141
153
|
export class BotSecretKeyNotValidException extends __BaseException {
|
|
154
|
+
name = "BotSecretKeyNotValidException";
|
|
155
|
+
$fault = "client";
|
|
142
156
|
constructor(opts) {
|
|
143
157
|
super({
|
|
144
158
|
name: "BotSecretKeyNotValidException",
|
|
145
159
|
$fault: "client",
|
|
146
160
|
...opts
|
|
147
161
|
});
|
|
148
|
-
this.name = "BotSecretKeyNotValidException";
|
|
149
|
-
this.$fault = "client";
|
|
150
162
|
Object.setPrototypeOf(this, BotSecretKeyNotValidException.prototype);
|
|
151
163
|
}
|
|
152
164
|
}
|
|
153
165
|
export class UserCompanyNotValidException extends __BaseException {
|
|
166
|
+
name = "UserCompanyNotValidException";
|
|
167
|
+
$fault = "client";
|
|
154
168
|
constructor(opts) {
|
|
155
169
|
super({
|
|
156
170
|
name: "UserCompanyNotValidException",
|
|
157
171
|
$fault: "client",
|
|
158
172
|
...opts
|
|
159
173
|
});
|
|
160
|
-
this.name = "UserCompanyNotValidException";
|
|
161
|
-
this.$fault = "client";
|
|
162
174
|
Object.setPrototypeOf(this, UserCompanyNotValidException.prototype);
|
|
163
175
|
}
|
|
164
176
|
}
|
|
165
177
|
export class UserNotFoundException extends __BaseException {
|
|
178
|
+
name = "UserNotFoundException";
|
|
179
|
+
$fault = "client";
|
|
166
180
|
constructor(opts) {
|
|
167
181
|
super({
|
|
168
182
|
name: "UserNotFoundException",
|
|
169
183
|
$fault: "client",
|
|
170
184
|
...opts
|
|
171
185
|
});
|
|
172
|
-
this.name = "UserNotFoundException";
|
|
173
|
-
this.$fault = "client";
|
|
174
186
|
Object.setPrototypeOf(this, UserNotFoundException.prototype);
|
|
175
187
|
}
|
|
176
188
|
}
|
|
@@ -187,14 +199,14 @@ export var UserQuery;
|
|
|
187
199
|
};
|
|
188
200
|
})(UserQuery || (UserQuery = {}));
|
|
189
201
|
export class UserQueryPredicateNotMetException extends __BaseException {
|
|
202
|
+
name = "UserQueryPredicateNotMetException";
|
|
203
|
+
$fault = "client";
|
|
190
204
|
constructor(opts) {
|
|
191
205
|
super({
|
|
192
206
|
name: "UserQueryPredicateNotMetException",
|
|
193
207
|
$fault: "client",
|
|
194
208
|
...opts
|
|
195
209
|
});
|
|
196
|
-
this.name = "UserQueryPredicateNotMetException";
|
|
197
|
-
this.$fault = "client";
|
|
198
210
|
Object.setPrototypeOf(this, UserQueryPredicateNotMetException.prototype);
|
|
199
211
|
}
|
|
200
212
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { UsersServiceException as __BaseException } from "../models/UsersServiceException";
|
|
2
2
|
import { BotApiKeyNotFoundException, BotEndpoint, BotLlmFunctionIntegration, BotNotFoundException, BotSecretKeyNotValidException, ForbiddenException, UserCompanyNotValidException, UserNotFoundException, UserQueryPredicateNotMetException, ValidationException, } from "../models/models_0";
|
|
3
|
+
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
3
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
4
|
-
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString,
|
|
5
|
+
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
6
|
export const se_BatchGetUsersCommand = async (input, context) => {
|
|
6
7
|
const b = rb(input, context);
|
|
7
8
|
const headers = {
|
|
@@ -89,6 +90,7 @@ export const se_CreateBotCommand = async (input, context) => {
|
|
|
89
90
|
});
|
|
90
91
|
let body;
|
|
91
92
|
body = JSON.stringify(take(input, {
|
|
93
|
+
'access': [],
|
|
92
94
|
'callback': _ => se_BotCallback(_, context),
|
|
93
95
|
'name': [],
|
|
94
96
|
'picture': [],
|
|
@@ -419,6 +421,7 @@ export const se_UpdateBotCommand = async (input, context) => {
|
|
|
419
421
|
});
|
|
420
422
|
let body;
|
|
421
423
|
body = JSON.stringify(take(input, {
|
|
424
|
+
'access': [],
|
|
422
425
|
'name': [],
|
|
423
426
|
'picture': [],
|
|
424
427
|
'searchable': [],
|
|
@@ -1145,7 +1148,7 @@ const se_BotEndpoint = (input, context) => {
|
|
|
1145
1148
|
openAiAssistant: value => ({ "openAiAssistant": _json(value) }),
|
|
1146
1149
|
sqs: value => ({ "sqs": _json(value) }),
|
|
1147
1150
|
webhook: value => ({ "webhook": _json(value) }),
|
|
1148
|
-
_: (name, value) => ({ name: value })
|
|
1151
|
+
_: (name, value) => ({ [name]: value })
|
|
1149
1152
|
});
|
|
1150
1153
|
};
|
|
1151
1154
|
const se_BotLlmEmbeddedTool = (input, context) => {
|
|
@@ -1178,7 +1181,7 @@ const se_BotLlmFunctionDefinition = (input, context) => {
|
|
|
1178
1181
|
const se_BotLlmFunctionIntegration = (input, context) => {
|
|
1179
1182
|
return BotLlmFunctionIntegration.visit(input, {
|
|
1180
1183
|
webhook: value => ({ "webhook": se_BotLlmFunctionIntegrationWebhook(value, context) }),
|
|
1181
|
-
_: (name, value) => ({ name: value })
|
|
1184
|
+
_: (name, value) => ({ [name]: value })
|
|
1182
1185
|
});
|
|
1183
1186
|
};
|
|
1184
1187
|
const se_BotLlmFunctionIntegrationWebhook = (input, context) => {
|
|
@@ -1311,53 +1314,7 @@ const deserializeMetadata = (output) => ({
|
|
|
1311
1314
|
cfId: output.headers["x-amz-cf-id"],
|
|
1312
1315
|
});
|
|
1313
1316
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
|
|
1314
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1315
|
-
value !== null &&
|
|
1316
|
-
value !== "" &&
|
|
1317
|
-
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
1318
|
-
value.length != 0) &&
|
|
1319
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1320
1317
|
const _c = "company";
|
|
1321
1318
|
const _e = "email";
|
|
1322
1319
|
const _eE = "excludeExtension";
|
|
1323
1320
|
const _s = "search";
|
|
1324
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
|
|
1325
|
-
if (encoded.length) {
|
|
1326
|
-
return JSON.parse(encoded);
|
|
1327
|
-
}
|
|
1328
|
-
return {};
|
|
1329
|
-
});
|
|
1330
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1331
|
-
const value = await parseBody(errorBody, context);
|
|
1332
|
-
value.message = value.message ?? value.Message;
|
|
1333
|
-
return value;
|
|
1334
|
-
};
|
|
1335
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1336
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1337
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1338
|
-
let cleanValue = rawValue;
|
|
1339
|
-
if (typeof cleanValue === "number") {
|
|
1340
|
-
cleanValue = cleanValue.toString();
|
|
1341
|
-
}
|
|
1342
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1343
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1344
|
-
}
|
|
1345
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1346
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1347
|
-
}
|
|
1348
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1349
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1350
|
-
}
|
|
1351
|
-
return cleanValue;
|
|
1352
|
-
};
|
|
1353
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1354
|
-
if (headerKey !== undefined) {
|
|
1355
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1356
|
-
}
|
|
1357
|
-
if (data.code !== undefined) {
|
|
1358
|
-
return sanitizeErrorCode(data.code);
|
|
1359
|
-
}
|
|
1360
|
-
if (data["__type"] !== undefined) {
|
|
1361
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1362
|
-
}
|
|
1363
|
-
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
-
import {
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
|
|
4
4
|
import { FetchHttpHandler as RequestHandler, streamCollector, } from "@smithy/fetch-http-handler";
|
|
5
5
|
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
6
6
|
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, } from "@smithy/util-retry";
|
|
@@ -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 ??
|
|
20
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, 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,5 +1,5 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
|
-
import {
|
|
2
|
+
import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider, } from "@aws-sdk/util-user-agent-node";
|
|
3
3
|
import { Hash } from "@smithy/hash-node";
|
|
4
4
|
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/middleware-retry";
|
|
5
5
|
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
@@ -21,11 +21,12 @@ export const getRuntimeConfig = (config) => {
|
|
|
21
21
|
runtime: "node",
|
|
22
22
|
defaultsMode,
|
|
23
23
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
24
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
25
|
-
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
26
26
|
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
-
retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }),
|
|
27
|
+
retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }, config),
|
|
28
28
|
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
29
29
|
streamCollector: config?.streamCollector ?? streamCollector,
|
|
30
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
|
|
30
31
|
};
|
|
31
32
|
};
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, } from "@smithy/protocol-http";
|
|
2
2
|
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, } from "@smithy/smithy-client";
|
|
3
|
-
const asPartial = (t) => t;
|
|
4
3
|
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
5
|
-
const extensionConfiguration =
|
|
6
|
-
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
7
|
-
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
8
|
-
};
|
|
4
|
+
const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig));
|
|
9
5
|
extensions.forEach(extension => extension.configure(extensionConfiguration));
|
|
10
|
-
return
|
|
11
|
-
...runtimeConfig,
|
|
12
|
-
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
13
|
-
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
14
|
-
};
|
|
6
|
+
return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration));
|
|
15
7
|
};
|
|
@@ -144,7 +144,7 @@ export type UsersClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerO
|
|
|
144
144
|
* The configuration interface of UsersClient class constructor that set the region, credentials and other options.
|
|
145
145
|
*/
|
|
146
146
|
export interface UsersClientConfig extends UsersClientConfigType {
|
|
147
|
-
env
|
|
147
|
+
env?: 'stage' | 'stable' | 'prod';
|
|
148
148
|
token: TokenProvider;
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
@@ -80,6 +80,18 @@ declare const BatchGetUsersCommand_base: {
|
|
|
80
80
|
* @throws {@link UsersServiceException}
|
|
81
81
|
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
82
82
|
*
|
|
83
|
+
*
|
|
83
84
|
*/
|
|
84
85
|
export declare class BatchGetUsersCommand extends BatchGetUsersCommand_base {
|
|
86
|
+
/** @internal type navigation helper, not in runtime. */
|
|
87
|
+
protected static __types: {
|
|
88
|
+
api: {
|
|
89
|
+
input: BatchGetUsersInput;
|
|
90
|
+
output: BatchGetUsersOutput;
|
|
91
|
+
};
|
|
92
|
+
sdk: {
|
|
93
|
+
input: BatchGetUsersCommandInput;
|
|
94
|
+
output: BatchGetUsersCommandOutput;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
85
97
|
}
|
|
@@ -65,7 +65,19 @@ declare const BatchGetUsersEmailNotificationsSettingsCommand_base: {
|
|
|
65
65
|
* @throws {@link UsersServiceException}
|
|
66
66
|
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
67
67
|
*
|
|
68
|
+
*
|
|
68
69
|
* @public
|
|
69
70
|
*/
|
|
70
71
|
export declare class BatchGetUsersEmailNotificationsSettingsCommand extends BatchGetUsersEmailNotificationsSettingsCommand_base {
|
|
72
|
+
/** @internal type navigation helper, not in runtime. */
|
|
73
|
+
protected static __types: {
|
|
74
|
+
api: {
|
|
75
|
+
input: BatchGetUsersEmailNotificationsSettingsInput;
|
|
76
|
+
output: BatchGetUsersEmailNotificationsSettingsOutput;
|
|
77
|
+
};
|
|
78
|
+
sdk: {
|
|
79
|
+
input: BatchGetUsersEmailNotificationsSettingsCommandInput;
|
|
80
|
+
output: BatchGetUsersEmailNotificationsSettingsCommandOutput;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
71
83
|
}
|
|
@@ -117,6 +117,18 @@ declare const BatchGetUsersPbxLinkDataCommand_base: {
|
|
|
117
117
|
* @throws {@link UsersServiceException}
|
|
118
118
|
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
119
119
|
*
|
|
120
|
+
*
|
|
120
121
|
*/
|
|
121
122
|
export declare class BatchGetUsersPbxLinkDataCommand extends BatchGetUsersPbxLinkDataCommand_base {
|
|
123
|
+
/** @internal type navigation helper, not in runtime. */
|
|
124
|
+
protected static __types: {
|
|
125
|
+
api: {
|
|
126
|
+
input: BatchGetUsersPbxLinkDataInput;
|
|
127
|
+
output: BatchGetUsersPbxLinkDataOutput;
|
|
128
|
+
};
|
|
129
|
+
sdk: {
|
|
130
|
+
input: BatchGetUsersPbxLinkDataCommandInput;
|
|
131
|
+
output: BatchGetUsersPbxLinkDataCommandOutput;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
122
134
|
}
|
|
@@ -117,6 +117,18 @@ declare const BatchGetUsersPbxLinkDataV1Command_base: {
|
|
|
117
117
|
* @throws {@link UsersServiceException}
|
|
118
118
|
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
119
119
|
*
|
|
120
|
+
*
|
|
120
121
|
*/
|
|
121
122
|
export declare class BatchGetUsersPbxLinkDataV1Command extends BatchGetUsersPbxLinkDataV1Command_base {
|
|
123
|
+
/** @internal type navigation helper, not in runtime. */
|
|
124
|
+
protected static __types: {
|
|
125
|
+
api: {
|
|
126
|
+
input: BatchGetUsersPbxLinkDataV1Input;
|
|
127
|
+
output: BatchGetUsersPbxLinkDataV1Output;
|
|
128
|
+
};
|
|
129
|
+
sdk: {
|
|
130
|
+
input: BatchGetUsersPbxLinkDataV1CommandInput;
|
|
131
|
+
output: BatchGetUsersPbxLinkDataV1CommandOutput;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
122
134
|
}
|
|
@@ -70,7 +70,19 @@ declare const ChangeUserEmailCommand_base: {
|
|
|
70
70
|
* @throws {@link UsersServiceException}
|
|
71
71
|
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
72
72
|
*
|
|
73
|
+
*
|
|
73
74
|
* @public
|
|
74
75
|
*/
|
|
75
76
|
export declare class ChangeUserEmailCommand extends ChangeUserEmailCommand_base {
|
|
77
|
+
/** @internal type navigation helper, not in runtime. */
|
|
78
|
+
protected static __types: {
|
|
79
|
+
api: {
|
|
80
|
+
input: ChangeUserEmailInput;
|
|
81
|
+
output: ChangeUserEmailOutput;
|
|
82
|
+
};
|
|
83
|
+
sdk: {
|
|
84
|
+
input: ChangeUserEmailCommandInput;
|
|
85
|
+
output: ChangeUserEmailCommandOutput;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
76
88
|
}
|
|
@@ -44,10 +44,13 @@ declare const CreateBotApiKeyCommand_base: {
|
|
|
44
44
|
* const response = await client.send(command);
|
|
45
45
|
* // { // CreateBotApiKeyOutput
|
|
46
46
|
* // bot: { // Bot
|
|
47
|
-
* // id: "STRING_VALUE", // required
|
|
48
47
|
* // name: "STRING_VALUE", // required
|
|
49
48
|
* // picture: "STRING_VALUE",
|
|
50
49
|
* // searchable: true || false,
|
|
50
|
+
* // access: "EVERYBODY" || "ORGANIZATION",
|
|
51
|
+
* // id: "STRING_VALUE", // required
|
|
52
|
+
* // integrationType: "LLM" || "DIALOGFLOW_CX" || "OPEN_AI_ASSISTANT" || "WEBHOOK" || "SQS", // required
|
|
53
|
+
* // integrationApiKeysCount: Number("int"), // required
|
|
51
54
|
* // createdAt: "STRING_VALUE", // required
|
|
52
55
|
* // updated: "STRING_VALUE",
|
|
53
56
|
* // },
|
|
@@ -75,6 +78,18 @@ declare const CreateBotApiKeyCommand_base: {
|
|
|
75
78
|
* @throws {@link UsersServiceException}
|
|
76
79
|
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
77
80
|
*
|
|
81
|
+
*
|
|
78
82
|
*/
|
|
79
83
|
export declare class CreateBotApiKeyCommand extends CreateBotApiKeyCommand_base {
|
|
84
|
+
/** @internal type navigation helper, not in runtime. */
|
|
85
|
+
protected static __types: {
|
|
86
|
+
api: {
|
|
87
|
+
input: CreateBotApiKeyInput;
|
|
88
|
+
output: CreateBotApiKeyOutput;
|
|
89
|
+
};
|
|
90
|
+
sdk: {
|
|
91
|
+
input: CreateBotApiKeyCommandInput;
|
|
92
|
+
output: CreateBotApiKeyCommandOutput;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
80
95
|
}
|
|
@@ -36,17 +36,18 @@ declare const CreateBotCommand_base: {
|
|
|
36
36
|
* // const { UsersClient, CreateBotCommand } = require("@wildix/xbees-users-client"); // CommonJS import
|
|
37
37
|
* const client = new UsersClient(config);
|
|
38
38
|
* const input = { // CreateBotInput
|
|
39
|
-
* company: "STRING_VALUE",
|
|
40
39
|
* name: "STRING_VALUE", // required
|
|
41
40
|
* picture: "STRING_VALUE",
|
|
42
41
|
* searchable: true || false,
|
|
42
|
+
* access: "EVERYBODY" || "ORGANIZATION",
|
|
43
|
+
* company: "STRING_VALUE",
|
|
43
44
|
* callback: { // BotCallback
|
|
44
45
|
* endpoint: { // BotEndpoint Union: only one key present
|
|
45
46
|
* llm: { // BotLlmEndpoint
|
|
46
47
|
* prompt: "STRING_VALUE", // required
|
|
47
48
|
* embeddedTools: [ // BotLlmEmbeddedToolsList
|
|
48
49
|
* { // BotLlmEmbeddedTool
|
|
49
|
-
* type: "HANDOVER" || "DELEGATE", // required
|
|
50
|
+
* type: "HANDOVER" || "DELEGATE" || "SUGGESTIONS", // required
|
|
50
51
|
* name: "STRING_VALUE", // required
|
|
51
52
|
* parameters: "DOCUMENT_VALUE",
|
|
52
53
|
* },
|
|
@@ -117,10 +118,13 @@ declare const CreateBotCommand_base: {
|
|
|
117
118
|
* const response = await client.send(command);
|
|
118
119
|
* // { // CreateBotOutput
|
|
119
120
|
* // bot: { // Bot
|
|
120
|
-
* // id: "STRING_VALUE", // required
|
|
121
121
|
* // name: "STRING_VALUE", // required
|
|
122
122
|
* // picture: "STRING_VALUE",
|
|
123
123
|
* // searchable: true || false,
|
|
124
|
+
* // access: "EVERYBODY" || "ORGANIZATION",
|
|
125
|
+
* // id: "STRING_VALUE", // required
|
|
126
|
+
* // integrationType: "LLM" || "DIALOGFLOW_CX" || "OPEN_AI_ASSISTANT" || "WEBHOOK" || "SQS", // required
|
|
127
|
+
* // integrationApiKeysCount: Number("int"), // required
|
|
124
128
|
* // createdAt: "STRING_VALUE", // required
|
|
125
129
|
* // updated: "STRING_VALUE",
|
|
126
130
|
* // },
|
|
@@ -141,6 +145,18 @@ declare const CreateBotCommand_base: {
|
|
|
141
145
|
* @throws {@link UsersServiceException}
|
|
142
146
|
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
143
147
|
*
|
|
148
|
+
*
|
|
144
149
|
*/
|
|
145
150
|
export declare class CreateBotCommand extends CreateBotCommand_base {
|
|
151
|
+
/** @internal type navigation helper, not in runtime. */
|
|
152
|
+
protected static __types: {
|
|
153
|
+
api: {
|
|
154
|
+
input: CreateBotInput;
|
|
155
|
+
output: CreateBotOutput;
|
|
156
|
+
};
|
|
157
|
+
sdk: {
|
|
158
|
+
input: CreateBotCommandInput;
|
|
159
|
+
output: CreateBotCommandOutput;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
146
162
|
}
|
|
@@ -61,6 +61,18 @@ declare const CreateSystemBotCommand_base: {
|
|
|
61
61
|
* @throws {@link UsersServiceException}
|
|
62
62
|
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
63
63
|
*
|
|
64
|
+
*
|
|
64
65
|
*/
|
|
65
66
|
export declare class CreateSystemBotCommand extends CreateSystemBotCommand_base {
|
|
67
|
+
/** @internal type navigation helper, not in runtime. */
|
|
68
|
+
protected static __types: {
|
|
69
|
+
api: {
|
|
70
|
+
input: CreateSystemBotInput;
|
|
71
|
+
output: CreateSystemBotOutput;
|
|
72
|
+
};
|
|
73
|
+
sdk: {
|
|
74
|
+
input: CreateSystemBotCommandInput;
|
|
75
|
+
output: CreateSystemBotCommandOutput;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
66
78
|
}
|
|
@@ -63,6 +63,18 @@ declare const DeleteBotApiKeyCommand_base: {
|
|
|
63
63
|
* @throws {@link UsersServiceException}
|
|
64
64
|
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
65
65
|
*
|
|
66
|
+
*
|
|
66
67
|
*/
|
|
67
68
|
export declare class DeleteBotApiKeyCommand extends DeleteBotApiKeyCommand_base {
|
|
69
|
+
/** @internal type navigation helper, not in runtime. */
|
|
70
|
+
protected static __types: {
|
|
71
|
+
api: {
|
|
72
|
+
input: DeleteBotApiKeyInput;
|
|
73
|
+
output: {};
|
|
74
|
+
};
|
|
75
|
+
sdk: {
|
|
76
|
+
input: DeleteBotApiKeyCommandInput;
|
|
77
|
+
output: DeleteBotApiKeyCommandOutput;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
68
80
|
}
|
|
@@ -60,6 +60,18 @@ declare const DeleteBotCommand_base: {
|
|
|
60
60
|
* @throws {@link UsersServiceException}
|
|
61
61
|
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
62
62
|
*
|
|
63
|
+
*
|
|
63
64
|
*/
|
|
64
65
|
export declare class DeleteBotCommand extends DeleteBotCommand_base {
|
|
66
|
+
/** @internal type navigation helper, not in runtime. */
|
|
67
|
+
protected static __types: {
|
|
68
|
+
api: {
|
|
69
|
+
input: DeleteBotInput;
|
|
70
|
+
output: {};
|
|
71
|
+
};
|
|
72
|
+
sdk: {
|
|
73
|
+
input: DeleteBotCommandInput;
|
|
74
|
+
output: DeleteBotCommandOutput;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
65
77
|
}
|