@wildix/xbees-conversations-client 1.1.13 → 1.1.14
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/ConversationsClient.js +4 -5
- package/dist-cjs/models/models_0.js +48 -43
- package/dist-cjs/protocols/Aws_restJson1.js +101 -150
- 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/ConversationsClient.js +4 -5
- package/dist-es/models/models_0.js +43 -38
- package/dist-es/protocols/Aws_restJson1.js +5 -54
- 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/ConversationsClient.d.ts +1 -1
- package/dist-types/commands/AddChannelMemberCommand.d.ts +13 -0
- package/dist-types/commands/AddChannelMembersCommand.d.ts +13 -0
- package/dist-types/commands/AssignChannelCommand.d.ts +12 -0
- package/dist-types/commands/CreateGroupChannelCommand.d.ts +12 -0
- package/dist-types/commands/CreateInboxTagCommand.d.ts +12 -0
- package/dist-types/commands/CreateKiteChannelCommand.d.ts +12 -0
- package/dist-types/commands/DeleteChannelCommand.d.ts +12 -0
- package/dist-types/commands/DeleteChannelMemberCommand.d.ts +12 -0
- package/dist-types/commands/DeleteInboxTagCommand.d.ts +12 -0
- package/dist-types/commands/DeleteMessageCommand.d.ts +12 -0
- package/dist-types/commands/DeleteMessageReactionCommand.d.ts +12 -0
- package/dist-types/commands/DescribeEventCommand.d.ts +12 -0
- package/dist-types/commands/GetActionTriggerResultCommand.d.ts +12 -0
- package/dist-types/commands/GetChannelCommand.d.ts +12 -0
- package/dist-types/commands/GetChannelMemberCommand.d.ts +12 -0
- package/dist-types/commands/GetDirectChannelIdCommand.d.ts +12 -0
- package/dist-types/commands/GetFilePresignedDownloadUrlCommand.d.ts +12 -0
- package/dist-types/commands/GetInboxStateCommand.d.ts +12 -0
- package/dist-types/commands/GetMessageCommand.d.ts +12 -0
- package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +12 -0
- package/dist-types/commands/GetTokenCommand.d.ts +12 -0
- package/dist-types/commands/GetUploadedFileInfoCommand.d.ts +12 -0
- package/dist-types/commands/HideChannelCommand.d.ts +12 -0
- package/dist-types/commands/InviteCommand.d.ts +12 -0
- package/dist-types/commands/JoinChannelCommand.d.ts +12 -0
- package/dist-types/commands/LeaveChannelCommand.d.ts +12 -0
- package/dist-types/commands/ListChannelMembersCommand.d.ts +12 -0
- package/dist-types/commands/ListChannelsCommand.d.ts +12 -0
- package/dist-types/commands/ListInboxTaggedChannelsCommand.d.ts +12 -0
- package/dist-types/commands/ListInboxTagsCommand.d.ts +12 -0
- package/dist-types/commands/ListMessageReactionsCommand.d.ts +12 -0
- package/dist-types/commands/ListMessagesCommand.d.ts +12 -0
- package/dist-types/commands/ListPinnedMessagesCommand.d.ts +12 -0
- package/dist-types/commands/MarkReadCommand.d.ts +12 -0
- package/dist-types/commands/MarkUnreadCommand.d.ts +12 -0
- package/dist-types/commands/PartialUpdateChannelCommand.d.ts +12 -0
- package/dist-types/commands/PartialUpdateMessageCommand.d.ts +12 -0
- package/dist-types/commands/PinChannelCommand.d.ts +12 -0
- package/dist-types/commands/PinMessageCommand.d.ts +12 -0
- package/dist-types/commands/QueryChannelsCommand.d.ts +12 -0
- package/dist-types/commands/ScheduleExternalFlagAdjustmentJobCommand.d.ts +12 -0
- package/dist-types/commands/SendActionTriggerResultCommand.d.ts +12 -0
- package/dist-types/commands/SendGiphyCommand.d.ts +12 -0
- package/dist-types/commands/SendMessageCommand.d.ts +12 -0
- package/dist-types/commands/SendMessageReactionCommand.d.ts +12 -0
- package/dist-types/commands/SendTypingStartCommand.d.ts +12 -0
- package/dist-types/commands/SendTypingStopCommand.d.ts +12 -0
- package/dist-types/commands/ShowChannelCommand.d.ts +12 -0
- package/dist-types/commands/TagChannelCommand.d.ts +12 -0
- package/dist-types/commands/TriggerMessageActionCommand.d.ts +12 -0
- package/dist-types/commands/UnpinChannelCommand.d.ts +12 -0
- package/dist-types/commands/UnpinMessageCommand.d.ts +12 -0
- package/dist-types/commands/UntagChannelCommand.d.ts +12 -0
- package/dist-types/commands/UpdateChannelCommand.d.ts +12 -0
- package/dist-types/commands/UpdateInboxTagCommand.d.ts +12 -0
- package/dist-types/commands/UpdateMessageCommand.d.ts +12 -0
- package/dist-types/commands/UploadFileCommand.d.ts +12 -0
- package/dist-types/models/models_0.d.ts +301 -291
- 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;
|
|
@@ -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 ConversationsClient 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 ConversationsClient 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,37 +1,41 @@
|
|
|
1
1
|
import { ConversationsServiceException as __BaseException } from "./ConversationsServiceException";
|
|
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
|
}
|
|
26
26
|
export class RateLimitExceededException extends __BaseException {
|
|
27
|
+
name = "RateLimitExceededException";
|
|
28
|
+
$fault = "client";
|
|
29
|
+
rateLimit;
|
|
30
|
+
rateLimitRemaining;
|
|
31
|
+
rateLimitReset;
|
|
32
|
+
retryAfter;
|
|
27
33
|
constructor(opts) {
|
|
28
34
|
super({
|
|
29
35
|
name: "RateLimitExceededException",
|
|
30
36
|
$fault: "client",
|
|
31
37
|
...opts
|
|
32
38
|
});
|
|
33
|
-
this.name = "RateLimitExceededException";
|
|
34
|
-
this.$fault = "client";
|
|
35
39
|
Object.setPrototypeOf(this, RateLimitExceededException.prototype);
|
|
36
40
|
this.rateLimit = opts.rateLimit;
|
|
37
41
|
this.rateLimitRemaining = opts.rateLimitRemaining;
|
|
@@ -45,14 +49,14 @@ export const ConversationFileCategory = {
|
|
|
45
49
|
WIZY_RECORDING: "wizyconfRecordings",
|
|
46
50
|
};
|
|
47
51
|
export class FileNotFoundException extends __BaseException {
|
|
52
|
+
name = "FileNotFoundException";
|
|
53
|
+
$fault = "client";
|
|
48
54
|
constructor(opts) {
|
|
49
55
|
super({
|
|
50
56
|
name: "FileNotFoundException",
|
|
51
57
|
$fault: "client",
|
|
52
58
|
...opts
|
|
53
59
|
});
|
|
54
|
-
this.name = "FileNotFoundException";
|
|
55
|
-
this.$fault = "client";
|
|
56
60
|
Object.setPrototypeOf(this, FileNotFoundException.prototype);
|
|
57
61
|
}
|
|
58
62
|
}
|
|
@@ -93,26 +97,26 @@ export const ChannelMemberRole = {
|
|
|
93
97
|
SUPERVISOR: "supervisor",
|
|
94
98
|
};
|
|
95
99
|
export class ChannelNotFoundException extends __BaseException {
|
|
100
|
+
name = "ChannelNotFoundException";
|
|
101
|
+
$fault = "client";
|
|
96
102
|
constructor(opts) {
|
|
97
103
|
super({
|
|
98
104
|
name: "ChannelNotFoundException",
|
|
99
105
|
$fault: "client",
|
|
100
106
|
...opts
|
|
101
107
|
});
|
|
102
|
-
this.name = "ChannelNotFoundException";
|
|
103
|
-
this.$fault = "client";
|
|
104
108
|
Object.setPrototypeOf(this, ChannelNotFoundException.prototype);
|
|
105
109
|
}
|
|
106
110
|
}
|
|
107
111
|
export class MemberAlreadyExistException extends __BaseException {
|
|
112
|
+
name = "MemberAlreadyExistException";
|
|
113
|
+
$fault = "client";
|
|
108
114
|
constructor(opts) {
|
|
109
115
|
super({
|
|
110
116
|
name: "MemberAlreadyExistException",
|
|
111
117
|
$fault: "client",
|
|
112
118
|
...opts
|
|
113
119
|
});
|
|
114
|
-
this.name = "MemberAlreadyExistException";
|
|
115
|
-
this.$fault = "client";
|
|
116
120
|
Object.setPrototypeOf(this, MemberAlreadyExistException.prototype);
|
|
117
121
|
}
|
|
118
122
|
}
|
|
@@ -157,26 +161,26 @@ export const ChannelWhatsAppStatus = {
|
|
|
157
161
|
CHANNEL_CLOSED: "24h_channel_closed",
|
|
158
162
|
};
|
|
159
163
|
export class ChannelAlreadyExistException extends __BaseException {
|
|
164
|
+
name = "ChannelAlreadyExistException";
|
|
165
|
+
$fault = "client";
|
|
160
166
|
constructor(opts) {
|
|
161
167
|
super({
|
|
162
168
|
name: "ChannelAlreadyExistException",
|
|
163
169
|
$fault: "client",
|
|
164
170
|
...opts
|
|
165
171
|
});
|
|
166
|
-
this.name = "ChannelAlreadyExistException";
|
|
167
|
-
this.$fault = "client";
|
|
168
172
|
Object.setPrototypeOf(this, ChannelAlreadyExistException.prototype);
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
export class TagsLimitReachedException extends __BaseException {
|
|
176
|
+
name = "TagsLimitReachedException";
|
|
177
|
+
$fault = "client";
|
|
172
178
|
constructor(opts) {
|
|
173
179
|
super({
|
|
174
180
|
name: "TagsLimitReachedException",
|
|
175
181
|
$fault: "client",
|
|
176
182
|
...opts
|
|
177
183
|
});
|
|
178
|
-
this.name = "TagsLimitReachedException";
|
|
179
|
-
this.$fault = "client";
|
|
180
184
|
Object.setPrototypeOf(this, TagsLimitReachedException.prototype);
|
|
181
185
|
}
|
|
182
186
|
}
|
|
@@ -192,51 +196,52 @@ export const TargetNotEligibleReason = {
|
|
|
192
196
|
NO_LICENSE: "no_license",
|
|
193
197
|
};
|
|
194
198
|
export class TargetNotEligibleException extends __BaseException {
|
|
199
|
+
name = "TargetNotEligibleException";
|
|
200
|
+
$fault = "client";
|
|
201
|
+
reason;
|
|
195
202
|
constructor(opts) {
|
|
196
203
|
super({
|
|
197
204
|
name: "TargetNotEligibleException",
|
|
198
205
|
$fault: "client",
|
|
199
206
|
...opts
|
|
200
207
|
});
|
|
201
|
-
this.name = "TargetNotEligibleException";
|
|
202
|
-
this.$fault = "client";
|
|
203
208
|
Object.setPrototypeOf(this, TargetNotEligibleException.prototype);
|
|
204
209
|
this.reason = opts.reason;
|
|
205
210
|
}
|
|
206
211
|
}
|
|
207
212
|
export class TargetNotFoundException extends __BaseException {
|
|
213
|
+
name = "TargetNotFoundException";
|
|
214
|
+
$fault = "client";
|
|
208
215
|
constructor(opts) {
|
|
209
216
|
super({
|
|
210
217
|
name: "TargetNotFoundException",
|
|
211
218
|
$fault: "client",
|
|
212
219
|
...opts
|
|
213
220
|
});
|
|
214
|
-
this.name = "TargetNotFoundException";
|
|
215
|
-
this.$fault = "client";
|
|
216
221
|
Object.setPrototypeOf(this, TargetNotFoundException.prototype);
|
|
217
222
|
}
|
|
218
223
|
}
|
|
219
224
|
export class MemberNotFoundException extends __BaseException {
|
|
225
|
+
name = "MemberNotFoundException";
|
|
226
|
+
$fault = "client";
|
|
220
227
|
constructor(opts) {
|
|
221
228
|
super({
|
|
222
229
|
name: "MemberNotFoundException",
|
|
223
230
|
$fault: "client",
|
|
224
231
|
...opts
|
|
225
232
|
});
|
|
226
|
-
this.name = "MemberNotFoundException";
|
|
227
|
-
this.$fault = "client";
|
|
228
233
|
Object.setPrototypeOf(this, MemberNotFoundException.prototype);
|
|
229
234
|
}
|
|
230
235
|
}
|
|
231
236
|
export class MessageNotFoundException extends __BaseException {
|
|
237
|
+
name = "MessageNotFoundException";
|
|
238
|
+
$fault = "client";
|
|
232
239
|
constructor(opts) {
|
|
233
240
|
super({
|
|
234
241
|
name: "MessageNotFoundException",
|
|
235
242
|
$fault: "client",
|
|
236
243
|
...opts
|
|
237
244
|
});
|
|
238
|
-
this.name = "MessageNotFoundException";
|
|
239
|
-
this.$fault = "client";
|
|
240
245
|
Object.setPrototypeOf(this, MessageNotFoundException.prototype);
|
|
241
246
|
}
|
|
242
247
|
}
|
|
@@ -280,38 +285,38 @@ export const WebhookEventType = {
|
|
|
280
285
|
REACTION_NEW: "chat:reaction:new",
|
|
281
286
|
};
|
|
282
287
|
export class TriggerNotFoundException extends __BaseException {
|
|
288
|
+
name = "TriggerNotFoundException";
|
|
289
|
+
$fault = "client";
|
|
283
290
|
constructor(opts) {
|
|
284
291
|
super({
|
|
285
292
|
name: "TriggerNotFoundException",
|
|
286
293
|
$fault: "client",
|
|
287
294
|
...opts
|
|
288
295
|
});
|
|
289
|
-
this.name = "TriggerNotFoundException";
|
|
290
|
-
this.$fault = "client";
|
|
291
296
|
Object.setPrototypeOf(this, TriggerNotFoundException.prototype);
|
|
292
297
|
}
|
|
293
298
|
}
|
|
294
299
|
export class TagNotFoundException extends __BaseException {
|
|
300
|
+
name = "TagNotFoundException";
|
|
301
|
+
$fault = "client";
|
|
295
302
|
constructor(opts) {
|
|
296
303
|
super({
|
|
297
304
|
name: "TagNotFoundException",
|
|
298
305
|
$fault: "client",
|
|
299
306
|
...opts
|
|
300
307
|
});
|
|
301
|
-
this.name = "TagNotFoundException";
|
|
302
|
-
this.$fault = "client";
|
|
303
308
|
Object.setPrototypeOf(this, TagNotFoundException.prototype);
|
|
304
309
|
}
|
|
305
310
|
}
|
|
306
311
|
export class MarkUnreadChannelsLimitReachedException extends __BaseException {
|
|
312
|
+
name = "MarkUnreadChannelsLimitReachedException";
|
|
313
|
+
$fault = "client";
|
|
307
314
|
constructor(opts) {
|
|
308
315
|
super({
|
|
309
316
|
name: "MarkUnreadChannelsLimitReachedException",
|
|
310
317
|
$fault: "client",
|
|
311
318
|
...opts
|
|
312
319
|
});
|
|
313
|
-
this.name = "MarkUnreadChannelsLimitReachedException";
|
|
314
|
-
this.$fault = "client";
|
|
315
320
|
Object.setPrototypeOf(this, MarkUnreadChannelsLimitReachedException.prototype);
|
|
316
321
|
}
|
|
317
322
|
}
|
|
@@ -335,50 +340,50 @@ export const MessageUnsetFields = {
|
|
|
335
340
|
TEXT: "text",
|
|
336
341
|
};
|
|
337
342
|
export class PinnedChannelsLimitReachedException extends __BaseException {
|
|
343
|
+
name = "PinnedChannelsLimitReachedException";
|
|
344
|
+
$fault = "client";
|
|
338
345
|
constructor(opts) {
|
|
339
346
|
super({
|
|
340
347
|
name: "PinnedChannelsLimitReachedException",
|
|
341
348
|
$fault: "client",
|
|
342
349
|
...opts
|
|
343
350
|
});
|
|
344
|
-
this.name = "PinnedChannelsLimitReachedException";
|
|
345
|
-
this.$fault = "client";
|
|
346
351
|
Object.setPrototypeOf(this, PinnedChannelsLimitReachedException.prototype);
|
|
347
352
|
}
|
|
348
353
|
}
|
|
349
354
|
export class ConversationsServiceException extends __BaseException {
|
|
355
|
+
name = "ConversationsServiceException";
|
|
356
|
+
$fault = "server";
|
|
350
357
|
constructor(opts) {
|
|
351
358
|
super({
|
|
352
359
|
name: "ConversationsServiceException",
|
|
353
360
|
$fault: "server",
|
|
354
361
|
...opts
|
|
355
362
|
});
|
|
356
|
-
this.name = "ConversationsServiceException";
|
|
357
|
-
this.$fault = "server";
|
|
358
363
|
Object.setPrototypeOf(this, ConversationsServiceException.prototype);
|
|
359
364
|
}
|
|
360
365
|
}
|
|
361
366
|
export class TaggedChannelsLimitReachedException extends __BaseException {
|
|
367
|
+
name = "TaggedChannelsLimitReachedException";
|
|
368
|
+
$fault = "client";
|
|
362
369
|
constructor(opts) {
|
|
363
370
|
super({
|
|
364
371
|
name: "TaggedChannelsLimitReachedException",
|
|
365
372
|
$fault: "client",
|
|
366
373
|
...opts
|
|
367
374
|
});
|
|
368
|
-
this.name = "TaggedChannelsLimitReachedException";
|
|
369
|
-
this.$fault = "client";
|
|
370
375
|
Object.setPrototypeOf(this, TaggedChannelsLimitReachedException.prototype);
|
|
371
376
|
}
|
|
372
377
|
}
|
|
373
378
|
export class MessageActionNotFoundException extends __BaseException {
|
|
379
|
+
name = "MessageActionNotFoundException";
|
|
380
|
+
$fault = "client";
|
|
374
381
|
constructor(opts) {
|
|
375
382
|
super({
|
|
376
383
|
name: "MessageActionNotFoundException",
|
|
377
384
|
$fault: "client",
|
|
378
385
|
...opts
|
|
379
386
|
});
|
|
380
|
-
this.name = "MessageActionNotFoundException";
|
|
381
|
-
this.$fault = "client";
|
|
382
387
|
Object.setPrototypeOf(this, MessageActionNotFoundException.prototype);
|
|
383
388
|
}
|
|
384
389
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConversationsServiceException as __BaseException } from "../models/ConversationsServiceException";
|
|
2
2
|
import { ChannelAlreadyExistException, ChannelNotFoundException, ConversationsServiceException, FileNotFoundException, ForbiddenException, MarkUnreadChannelsLimitReachedException, MemberAlreadyExistException, MemberNotFoundException, MessageActionNotFoundException, MessageNotFoundException, PinnedChannelsLimitReachedException, RateLimitExceededException, TagNotFoundException, TaggedChannelsLimitReachedException, TagsLimitReachedException, TargetNotEligibleException, TargetNotFoundException, TriggerNotFoundException, ValidationException, } from "../models/models_0";
|
|
3
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
3
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
4
5
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, strictParseInt32 as __strictParseInt32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
6
|
export const se_AddChannelMemberCommand = async (input, context) => {
|
|
@@ -14,6 +15,7 @@ export const se_AddChannelMemberCommand = async (input, context) => {
|
|
|
14
15
|
});
|
|
15
16
|
let body;
|
|
16
17
|
body = JSON.stringify(take(input, {
|
|
18
|
+
'hideHistory': [],
|
|
17
19
|
'memberId': [],
|
|
18
20
|
'memberToInvite': _ => _json(_),
|
|
19
21
|
'silent': [],
|
|
@@ -36,6 +38,7 @@ export const se_AddChannelMembersCommand = async (input, context) => {
|
|
|
36
38
|
});
|
|
37
39
|
let body;
|
|
38
40
|
body = JSON.stringify(take(input, {
|
|
41
|
+
'hideHistory': [],
|
|
39
42
|
'members': _ => _json(_),
|
|
40
43
|
'membersToInvite': _ => _json(_),
|
|
41
44
|
'silent': [],
|
|
@@ -218,12 +221,9 @@ export const se_DeleteMessageReactionCommand = async (input, context) => {
|
|
|
218
221
|
};
|
|
219
222
|
export const se_DescribeEventCommand = async (input, context) => {
|
|
220
223
|
const b = rb(input, context);
|
|
221
|
-
const headers = {
|
|
222
|
-
'content-type': 'application/json',
|
|
223
|
-
};
|
|
224
|
+
const headers = {};
|
|
224
225
|
b.bp("/v2/conversations/describe");
|
|
225
226
|
let body;
|
|
226
|
-
body = "";
|
|
227
227
|
b.m("POST")
|
|
228
228
|
.h(headers)
|
|
229
229
|
.b(body);
|
|
@@ -353,12 +353,9 @@ export const se_GetOrCreateDirectChannelCommand = async (input, context) => {
|
|
|
353
353
|
};
|
|
354
354
|
export const se_GetTokenCommand = async (input, context) => {
|
|
355
355
|
const b = rb(input, context);
|
|
356
|
-
const headers = {
|
|
357
|
-
'content-type': 'application/json',
|
|
358
|
-
};
|
|
356
|
+
const headers = {};
|
|
359
357
|
b.bp("/v2/conversations/token");
|
|
360
358
|
let body;
|
|
361
|
-
body = "";
|
|
362
359
|
b.m("GET")
|
|
363
360
|
.h(headers)
|
|
364
361
|
.b(body);
|
|
@@ -2095,12 +2092,6 @@ const deserializeMetadata = (output) => ({
|
|
|
2095
2092
|
cfId: output.headers["x-amz-cf-id"],
|
|
2096
2093
|
});
|
|
2097
2094
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
|
|
2098
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
2099
|
-
value !== null &&
|
|
2100
|
-
value !== "" &&
|
|
2101
|
-
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
2102
|
-
value.length != 0) &&
|
|
2103
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2104
2095
|
const _c = "category";
|
|
2105
2096
|
const _cI = "companyId";
|
|
2106
2097
|
const _co = "company";
|
|
@@ -2119,43 +2110,3 @@ const _uI = "userId";
|
|
|
2119
2110
|
const _xrl = "x-ratelimit-limit";
|
|
2120
2111
|
const _xrr = "x-ratelimit-remaining";
|
|
2121
2112
|
const _xrr_ = "x-ratelimit-reset";
|
|
2122
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
|
|
2123
|
-
if (encoded.length) {
|
|
2124
|
-
return JSON.parse(encoded);
|
|
2125
|
-
}
|
|
2126
|
-
return {};
|
|
2127
|
-
});
|
|
2128
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
2129
|
-
const value = await parseBody(errorBody, context);
|
|
2130
|
-
value.message = value.message ?? value.Message;
|
|
2131
|
-
return value;
|
|
2132
|
-
};
|
|
2133
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
2134
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2135
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
2136
|
-
let cleanValue = rawValue;
|
|
2137
|
-
if (typeof cleanValue === "number") {
|
|
2138
|
-
cleanValue = cleanValue.toString();
|
|
2139
|
-
}
|
|
2140
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
2141
|
-
cleanValue = cleanValue.split(",")[0];
|
|
2142
|
-
}
|
|
2143
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2144
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2145
|
-
}
|
|
2146
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2147
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2148
|
-
}
|
|
2149
|
-
return cleanValue;
|
|
2150
|
-
};
|
|
2151
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2152
|
-
if (headerKey !== undefined) {
|
|
2153
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2154
|
-
}
|
|
2155
|
-
if (data.code !== undefined) {
|
|
2156
|
-
return sanitizeErrorCode(data.code);
|
|
2157
|
-
}
|
|
2158
|
-
if (data["__type"] !== undefined) {
|
|
2159
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2160
|
-
}
|
|
2161
|
-
};
|
|
@@ -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
|
};
|
|
@@ -168,7 +168,7 @@ export type ConversationsClientConfigType = Partial<__SmithyConfiguration<__Http
|
|
|
168
168
|
* The configuration interface of ConversationsClient class constructor that set the region, credentials and other options.
|
|
169
169
|
*/
|
|
170
170
|
export interface ConversationsClientConfig extends ConversationsClientConfigType {
|
|
171
|
-
env
|
|
171
|
+
env?: 'stage' | 'stable' | 'prod';
|
|
172
172
|
token: TokenProvider;
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
@@ -45,6 +45,7 @@ declare const AddChannelMemberCommand_base: {
|
|
|
45
45
|
* name: "STRING_VALUE",
|
|
46
46
|
* colleague: true || false,
|
|
47
47
|
* },
|
|
48
|
+
* hideHistory: true || false,
|
|
48
49
|
* };
|
|
49
50
|
* const command = new AddChannelMemberCommand(input);
|
|
50
51
|
* const response = await client.send(command);
|
|
@@ -95,7 +96,19 @@ declare const AddChannelMemberCommand_base: {
|
|
|
95
96
|
* @throws {@link ConversationsServiceException}
|
|
96
97
|
* <p>Base exception class for all service exceptions from Conversations service.</p>
|
|
97
98
|
*
|
|
99
|
+
*
|
|
98
100
|
* @public
|
|
99
101
|
*/
|
|
100
102
|
export declare class AddChannelMemberCommand extends AddChannelMemberCommand_base {
|
|
103
|
+
/** @internal type navigation helper, not in runtime. */
|
|
104
|
+
protected static __types: {
|
|
105
|
+
api: {
|
|
106
|
+
input: AddChannelMemberInput;
|
|
107
|
+
output: AddChannelMemberOutput;
|
|
108
|
+
};
|
|
109
|
+
sdk: {
|
|
110
|
+
input: AddChannelMemberCommandInput;
|
|
111
|
+
output: AddChannelMemberCommandOutput;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
101
114
|
}
|
|
@@ -49,6 +49,7 @@ declare const AddChannelMembersCommand_base: {
|
|
|
49
49
|
* colleague: true || false,
|
|
50
50
|
* },
|
|
51
51
|
* ],
|
|
52
|
+
* hideHistory: true || false,
|
|
52
53
|
* };
|
|
53
54
|
* const command = new AddChannelMembersCommand(input);
|
|
54
55
|
* const response = await client.send(command);
|
|
@@ -103,7 +104,19 @@ declare const AddChannelMembersCommand_base: {
|
|
|
103
104
|
* @throws {@link ConversationsServiceException}
|
|
104
105
|
* <p>Base exception class for all service exceptions from Conversations service.</p>
|
|
105
106
|
*
|
|
107
|
+
*
|
|
106
108
|
* @public
|
|
107
109
|
*/
|
|
108
110
|
export declare class AddChannelMembersCommand extends AddChannelMembersCommand_base {
|
|
111
|
+
/** @internal type navigation helper, not in runtime. */
|
|
112
|
+
protected static __types: {
|
|
113
|
+
api: {
|
|
114
|
+
input: AddChannelMembersInput;
|
|
115
|
+
output: AddChannelMembersOutput;
|
|
116
|
+
};
|
|
117
|
+
sdk: {
|
|
118
|
+
input: AddChannelMembersCommandInput;
|
|
119
|
+
output: AddChannelMembersCommandOutput;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
109
122
|
}
|
|
@@ -102,7 +102,19 @@ declare const AssignChannelCommand_base: {
|
|
|
102
102
|
* @throws {@link ConversationsServiceException}
|
|
103
103
|
* <p>Base exception class for all service exceptions from Conversations service.</p>
|
|
104
104
|
*
|
|
105
|
+
*
|
|
105
106
|
* @public
|
|
106
107
|
*/
|
|
107
108
|
export declare class AssignChannelCommand extends AssignChannelCommand_base {
|
|
109
|
+
/** @internal type navigation helper, not in runtime. */
|
|
110
|
+
protected static __types: {
|
|
111
|
+
api: {
|
|
112
|
+
input: AssignChannelInput;
|
|
113
|
+
output: AssignChannelOutput;
|
|
114
|
+
};
|
|
115
|
+
sdk: {
|
|
116
|
+
input: AssignChannelCommandInput;
|
|
117
|
+
output: AssignChannelCommandOutput;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
108
120
|
}
|
|
@@ -173,7 +173,19 @@ declare const CreateGroupChannelCommand_base: {
|
|
|
173
173
|
* @throws {@link ConversationsServiceException}
|
|
174
174
|
* <p>Base exception class for all service exceptions from Conversations service.</p>
|
|
175
175
|
*
|
|
176
|
+
*
|
|
176
177
|
* @public
|
|
177
178
|
*/
|
|
178
179
|
export declare class CreateGroupChannelCommand extends CreateGroupChannelCommand_base {
|
|
180
|
+
/** @internal type navigation helper, not in runtime. */
|
|
181
|
+
protected static __types: {
|
|
182
|
+
api: {
|
|
183
|
+
input: CreateGroupChannelInput;
|
|
184
|
+
output: CreateGroupChannelOutput;
|
|
185
|
+
};
|
|
186
|
+
sdk: {
|
|
187
|
+
input: CreateGroupChannelCommandInput;
|
|
188
|
+
output: CreateGroupChannelCommandOutput;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
179
191
|
}
|
|
@@ -67,7 +67,19 @@ declare const CreateInboxTagCommand_base: {
|
|
|
67
67
|
* @throws {@link ConversationsServiceException}
|
|
68
68
|
* <p>Base exception class for all service exceptions from Conversations service.</p>
|
|
69
69
|
*
|
|
70
|
+
*
|
|
70
71
|
* @public
|
|
71
72
|
*/
|
|
72
73
|
export declare class CreateInboxTagCommand extends CreateInboxTagCommand_base {
|
|
74
|
+
/** @internal type navigation helper, not in runtime. */
|
|
75
|
+
protected static __types: {
|
|
76
|
+
api: {
|
|
77
|
+
input: CreateInboxTagInput;
|
|
78
|
+
output: CreateInboxTagOutput;
|
|
79
|
+
};
|
|
80
|
+
sdk: {
|
|
81
|
+
input: CreateInboxTagCommandInput;
|
|
82
|
+
output: CreateInboxTagCommandOutput;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
73
85
|
}
|