@wildix/xbees-conversations-client 1.1.12 → 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/Conversations.js +2 -0
- package/dist-cjs/ConversationsClient.js +4 -5
- package/dist-cjs/commands/AssignChannelCommand.js +21 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +71 -42
- package/dist-cjs/protocols/Aws_restJson1.js +142 -151
- 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/Conversations.js +2 -0
- package/dist-es/ConversationsClient.js +4 -5
- package/dist-es/commands/AssignChannelCommand.js +17 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +67 -38
- package/dist-es/protocols/Aws_restJson1.js +43 -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/Conversations.d.ts +7 -0
- package/dist-types/ConversationsClient.d.ts +4 -3
- 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 +120 -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/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +459 -284
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/runtimeConfig.browser.d.ts +4 -2
- package/dist-types/runtimeConfig.d.ts +4 -2
- package/dist-types/runtimeConfig.native.d.ts +4 -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/Conversations.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ConversationsClient, } from "./ConversationsClient";
|
|
2
2
|
import { AddChannelMemberCommand, } from "./commands/AddChannelMemberCommand";
|
|
3
3
|
import { AddChannelMembersCommand, } from "./commands/AddChannelMembersCommand";
|
|
4
|
+
import { AssignChannelCommand, } from "./commands/AssignChannelCommand";
|
|
4
5
|
import { CreateGroupChannelCommand, } from "./commands/CreateGroupChannelCommand";
|
|
5
6
|
import { CreateInboxTagCommand, } from "./commands/CreateInboxTagCommand";
|
|
6
7
|
import { CreateKiteChannelCommand, } from "./commands/CreateKiteChannelCommand";
|
|
@@ -59,6 +60,7 @@ import { createAggregatedClient } from "@smithy/smithy-client";
|
|
|
59
60
|
const commands = {
|
|
60
61
|
AddChannelMemberCommand,
|
|
61
62
|
AddChannelMembersCommand,
|
|
63
|
+
AssignChannelCommand,
|
|
62
64
|
CreateGroupChannelCommand,
|
|
63
65
|
CreateInboxTagCommand,
|
|
64
66
|
CreateKiteChannelCommand,
|
|
@@ -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));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_AssignChannelCommand, se_AssignChannelCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class AssignChannelCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "AssignChannel", {})
|
|
12
|
+
.n("ConversationsClient", "AssignChannelCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_AssignChannelCommand)
|
|
15
|
+
.de(de_AssignChannelCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -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,29 +97,53 @@ 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
|
}
|
|
123
|
+
export var AssignChannelAssigneeRequest;
|
|
124
|
+
(function (AssignChannelAssigneeRequest) {
|
|
125
|
+
AssignChannelAssigneeRequest.visit = (value, visitor) => {
|
|
126
|
+
if (value.id !== undefined)
|
|
127
|
+
return visitor.id(value.id);
|
|
128
|
+
if (value.email !== undefined)
|
|
129
|
+
return visitor.email(value.email);
|
|
130
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
131
|
+
};
|
|
132
|
+
})(AssignChannelAssigneeRequest || (AssignChannelAssigneeRequest = {}));
|
|
133
|
+
export var AssignChannelServiceRequest;
|
|
134
|
+
(function (AssignChannelServiceRequest) {
|
|
135
|
+
AssignChannelServiceRequest.visit = (value, visitor) => {
|
|
136
|
+
if (value.uri !== undefined)
|
|
137
|
+
return visitor.uri(value.uri);
|
|
138
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
139
|
+
};
|
|
140
|
+
})(AssignChannelServiceRequest || (AssignChannelServiceRequest = {}));
|
|
141
|
+
export const AssignChannelVariant = {
|
|
142
|
+
ADAPTIVE: "ADAPTIVE",
|
|
143
|
+
EVERYBODY: "EVERYBODY",
|
|
144
|
+
SELECTED: "SELECTED",
|
|
145
|
+
SKIP: "SKIP",
|
|
146
|
+
};
|
|
119
147
|
export const ChannelAccess = {
|
|
120
148
|
PRIVATE: "private",
|
|
121
149
|
PUBLIC: "public",
|
|
@@ -133,26 +161,26 @@ export const ChannelWhatsAppStatus = {
|
|
|
133
161
|
CHANNEL_CLOSED: "24h_channel_closed",
|
|
134
162
|
};
|
|
135
163
|
export class ChannelAlreadyExistException extends __BaseException {
|
|
164
|
+
name = "ChannelAlreadyExistException";
|
|
165
|
+
$fault = "client";
|
|
136
166
|
constructor(opts) {
|
|
137
167
|
super({
|
|
138
168
|
name: "ChannelAlreadyExistException",
|
|
139
169
|
$fault: "client",
|
|
140
170
|
...opts
|
|
141
171
|
});
|
|
142
|
-
this.name = "ChannelAlreadyExistException";
|
|
143
|
-
this.$fault = "client";
|
|
144
172
|
Object.setPrototypeOf(this, ChannelAlreadyExistException.prototype);
|
|
145
173
|
}
|
|
146
174
|
}
|
|
147
175
|
export class TagsLimitReachedException extends __BaseException {
|
|
176
|
+
name = "TagsLimitReachedException";
|
|
177
|
+
$fault = "client";
|
|
148
178
|
constructor(opts) {
|
|
149
179
|
super({
|
|
150
180
|
name: "TagsLimitReachedException",
|
|
151
181
|
$fault: "client",
|
|
152
182
|
...opts
|
|
153
183
|
});
|
|
154
|
-
this.name = "TagsLimitReachedException";
|
|
155
|
-
this.$fault = "client";
|
|
156
184
|
Object.setPrototypeOf(this, TagsLimitReachedException.prototype);
|
|
157
185
|
}
|
|
158
186
|
}
|
|
@@ -168,51 +196,52 @@ export const TargetNotEligibleReason = {
|
|
|
168
196
|
NO_LICENSE: "no_license",
|
|
169
197
|
};
|
|
170
198
|
export class TargetNotEligibleException extends __BaseException {
|
|
199
|
+
name = "TargetNotEligibleException";
|
|
200
|
+
$fault = "client";
|
|
201
|
+
reason;
|
|
171
202
|
constructor(opts) {
|
|
172
203
|
super({
|
|
173
204
|
name: "TargetNotEligibleException",
|
|
174
205
|
$fault: "client",
|
|
175
206
|
...opts
|
|
176
207
|
});
|
|
177
|
-
this.name = "TargetNotEligibleException";
|
|
178
|
-
this.$fault = "client";
|
|
179
208
|
Object.setPrototypeOf(this, TargetNotEligibleException.prototype);
|
|
180
209
|
this.reason = opts.reason;
|
|
181
210
|
}
|
|
182
211
|
}
|
|
183
212
|
export class TargetNotFoundException extends __BaseException {
|
|
213
|
+
name = "TargetNotFoundException";
|
|
214
|
+
$fault = "client";
|
|
184
215
|
constructor(opts) {
|
|
185
216
|
super({
|
|
186
217
|
name: "TargetNotFoundException",
|
|
187
218
|
$fault: "client",
|
|
188
219
|
...opts
|
|
189
220
|
});
|
|
190
|
-
this.name = "TargetNotFoundException";
|
|
191
|
-
this.$fault = "client";
|
|
192
221
|
Object.setPrototypeOf(this, TargetNotFoundException.prototype);
|
|
193
222
|
}
|
|
194
223
|
}
|
|
195
224
|
export class MemberNotFoundException extends __BaseException {
|
|
225
|
+
name = "MemberNotFoundException";
|
|
226
|
+
$fault = "client";
|
|
196
227
|
constructor(opts) {
|
|
197
228
|
super({
|
|
198
229
|
name: "MemberNotFoundException",
|
|
199
230
|
$fault: "client",
|
|
200
231
|
...opts
|
|
201
232
|
});
|
|
202
|
-
this.name = "MemberNotFoundException";
|
|
203
|
-
this.$fault = "client";
|
|
204
233
|
Object.setPrototypeOf(this, MemberNotFoundException.prototype);
|
|
205
234
|
}
|
|
206
235
|
}
|
|
207
236
|
export class MessageNotFoundException extends __BaseException {
|
|
237
|
+
name = "MessageNotFoundException";
|
|
238
|
+
$fault = "client";
|
|
208
239
|
constructor(opts) {
|
|
209
240
|
super({
|
|
210
241
|
name: "MessageNotFoundException",
|
|
211
242
|
$fault: "client",
|
|
212
243
|
...opts
|
|
213
244
|
});
|
|
214
|
-
this.name = "MessageNotFoundException";
|
|
215
|
-
this.$fault = "client";
|
|
216
245
|
Object.setPrototypeOf(this, MessageNotFoundException.prototype);
|
|
217
246
|
}
|
|
218
247
|
}
|
|
@@ -256,38 +285,38 @@ export const WebhookEventType = {
|
|
|
256
285
|
REACTION_NEW: "chat:reaction:new",
|
|
257
286
|
};
|
|
258
287
|
export class TriggerNotFoundException extends __BaseException {
|
|
288
|
+
name = "TriggerNotFoundException";
|
|
289
|
+
$fault = "client";
|
|
259
290
|
constructor(opts) {
|
|
260
291
|
super({
|
|
261
292
|
name: "TriggerNotFoundException",
|
|
262
293
|
$fault: "client",
|
|
263
294
|
...opts
|
|
264
295
|
});
|
|
265
|
-
this.name = "TriggerNotFoundException";
|
|
266
|
-
this.$fault = "client";
|
|
267
296
|
Object.setPrototypeOf(this, TriggerNotFoundException.prototype);
|
|
268
297
|
}
|
|
269
298
|
}
|
|
270
299
|
export class TagNotFoundException extends __BaseException {
|
|
300
|
+
name = "TagNotFoundException";
|
|
301
|
+
$fault = "client";
|
|
271
302
|
constructor(opts) {
|
|
272
303
|
super({
|
|
273
304
|
name: "TagNotFoundException",
|
|
274
305
|
$fault: "client",
|
|
275
306
|
...opts
|
|
276
307
|
});
|
|
277
|
-
this.name = "TagNotFoundException";
|
|
278
|
-
this.$fault = "client";
|
|
279
308
|
Object.setPrototypeOf(this, TagNotFoundException.prototype);
|
|
280
309
|
}
|
|
281
310
|
}
|
|
282
311
|
export class MarkUnreadChannelsLimitReachedException extends __BaseException {
|
|
312
|
+
name = "MarkUnreadChannelsLimitReachedException";
|
|
313
|
+
$fault = "client";
|
|
283
314
|
constructor(opts) {
|
|
284
315
|
super({
|
|
285
316
|
name: "MarkUnreadChannelsLimitReachedException",
|
|
286
317
|
$fault: "client",
|
|
287
318
|
...opts
|
|
288
319
|
});
|
|
289
|
-
this.name = "MarkUnreadChannelsLimitReachedException";
|
|
290
|
-
this.$fault = "client";
|
|
291
320
|
Object.setPrototypeOf(this, MarkUnreadChannelsLimitReachedException.prototype);
|
|
292
321
|
}
|
|
293
322
|
}
|
|
@@ -311,50 +340,50 @@ export const MessageUnsetFields = {
|
|
|
311
340
|
TEXT: "text",
|
|
312
341
|
};
|
|
313
342
|
export class PinnedChannelsLimitReachedException extends __BaseException {
|
|
343
|
+
name = "PinnedChannelsLimitReachedException";
|
|
344
|
+
$fault = "client";
|
|
314
345
|
constructor(opts) {
|
|
315
346
|
super({
|
|
316
347
|
name: "PinnedChannelsLimitReachedException",
|
|
317
348
|
$fault: "client",
|
|
318
349
|
...opts
|
|
319
350
|
});
|
|
320
|
-
this.name = "PinnedChannelsLimitReachedException";
|
|
321
|
-
this.$fault = "client";
|
|
322
351
|
Object.setPrototypeOf(this, PinnedChannelsLimitReachedException.prototype);
|
|
323
352
|
}
|
|
324
353
|
}
|
|
325
354
|
export class ConversationsServiceException extends __BaseException {
|
|
355
|
+
name = "ConversationsServiceException";
|
|
356
|
+
$fault = "server";
|
|
326
357
|
constructor(opts) {
|
|
327
358
|
super({
|
|
328
359
|
name: "ConversationsServiceException",
|
|
329
360
|
$fault: "server",
|
|
330
361
|
...opts
|
|
331
362
|
});
|
|
332
|
-
this.name = "ConversationsServiceException";
|
|
333
|
-
this.$fault = "server";
|
|
334
363
|
Object.setPrototypeOf(this, ConversationsServiceException.prototype);
|
|
335
364
|
}
|
|
336
365
|
}
|
|
337
366
|
export class TaggedChannelsLimitReachedException extends __BaseException {
|
|
367
|
+
name = "TaggedChannelsLimitReachedException";
|
|
368
|
+
$fault = "client";
|
|
338
369
|
constructor(opts) {
|
|
339
370
|
super({
|
|
340
371
|
name: "TaggedChannelsLimitReachedException",
|
|
341
372
|
$fault: "client",
|
|
342
373
|
...opts
|
|
343
374
|
});
|
|
344
|
-
this.name = "TaggedChannelsLimitReachedException";
|
|
345
|
-
this.$fault = "client";
|
|
346
375
|
Object.setPrototypeOf(this, TaggedChannelsLimitReachedException.prototype);
|
|
347
376
|
}
|
|
348
377
|
}
|
|
349
378
|
export class MessageActionNotFoundException extends __BaseException {
|
|
379
|
+
name = "MessageActionNotFoundException";
|
|
380
|
+
$fault = "client";
|
|
350
381
|
constructor(opts) {
|
|
351
382
|
super({
|
|
352
383
|
name: "MessageActionNotFoundException",
|
|
353
384
|
$fault: "client",
|
|
354
385
|
...opts
|
|
355
386
|
});
|
|
356
|
-
this.name = "MessageActionNotFoundException";
|
|
357
|
-
this.$fault = "client";
|
|
358
387
|
Object.setPrototypeOf(this, MessageActionNotFoundException.prototype);
|
|
359
388
|
}
|
|
360
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': [],
|
|
@@ -46,6 +49,29 @@ export const se_AddChannelMembersCommand = async (input, context) => {
|
|
|
46
49
|
.b(body);
|
|
47
50
|
return b.build();
|
|
48
51
|
};
|
|
52
|
+
export const se_AssignChannelCommand = async (input, context) => {
|
|
53
|
+
const b = rb(input, context);
|
|
54
|
+
const headers = {
|
|
55
|
+
'content-type': 'application/json',
|
|
56
|
+
};
|
|
57
|
+
b.bp("/v2/conversations/channels/{channelId}/assign");
|
|
58
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
59
|
+
const query = map({
|
|
60
|
+
[_u]: [, input[_uI]],
|
|
61
|
+
});
|
|
62
|
+
let body;
|
|
63
|
+
body = JSON.stringify(take(input, {
|
|
64
|
+
'assignee': _ => _json(_),
|
|
65
|
+
'service': _ => _json(_),
|
|
66
|
+
'silent': [],
|
|
67
|
+
'variant': [],
|
|
68
|
+
}));
|
|
69
|
+
b.m("POST")
|
|
70
|
+
.h(headers)
|
|
71
|
+
.q(query)
|
|
72
|
+
.b(body);
|
|
73
|
+
return b.build();
|
|
74
|
+
};
|
|
49
75
|
export const se_CreateGroupChannelCommand = async (input, context) => {
|
|
50
76
|
const b = rb(input, context);
|
|
51
77
|
const headers = {
|
|
@@ -195,12 +221,9 @@ export const se_DeleteMessageReactionCommand = async (input, context) => {
|
|
|
195
221
|
};
|
|
196
222
|
export const se_DescribeEventCommand = async (input, context) => {
|
|
197
223
|
const b = rb(input, context);
|
|
198
|
-
const headers = {
|
|
199
|
-
'content-type': 'application/json',
|
|
200
|
-
};
|
|
224
|
+
const headers = {};
|
|
201
225
|
b.bp("/v2/conversations/describe");
|
|
202
226
|
let body;
|
|
203
|
-
body = "";
|
|
204
227
|
b.m("POST")
|
|
205
228
|
.h(headers)
|
|
206
229
|
.b(body);
|
|
@@ -330,12 +353,9 @@ export const se_GetOrCreateDirectChannelCommand = async (input, context) => {
|
|
|
330
353
|
};
|
|
331
354
|
export const se_GetTokenCommand = async (input, context) => {
|
|
332
355
|
const b = rb(input, context);
|
|
333
|
-
const headers = {
|
|
334
|
-
'content-type': 'application/json',
|
|
335
|
-
};
|
|
356
|
+
const headers = {};
|
|
336
357
|
b.bp("/v2/conversations/token");
|
|
337
358
|
let body;
|
|
338
|
-
body = "";
|
|
339
359
|
b.m("GET")
|
|
340
360
|
.h(headers)
|
|
341
361
|
.b(body);
|
|
@@ -1036,6 +1056,21 @@ export const de_AddChannelMembersCommand = async (output, context) => {
|
|
|
1036
1056
|
Object.assign(contents, doc);
|
|
1037
1057
|
return contents;
|
|
1038
1058
|
};
|
|
1059
|
+
export const de_AssignChannelCommand = async (output, context) => {
|
|
1060
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1061
|
+
return de_CommandError(output, context);
|
|
1062
|
+
}
|
|
1063
|
+
const contents = map({
|
|
1064
|
+
$metadata: deserializeMetadata(output),
|
|
1065
|
+
});
|
|
1066
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1067
|
+
const doc = take(data, {
|
|
1068
|
+
'assignee': _json,
|
|
1069
|
+
'service': _json,
|
|
1070
|
+
});
|
|
1071
|
+
Object.assign(contents, doc);
|
|
1072
|
+
return contents;
|
|
1073
|
+
};
|
|
1039
1074
|
export const de_CreateGroupChannelCommand = async (output, context) => {
|
|
1040
1075
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1041
1076
|
return de_CommandError(output, context);
|
|
@@ -2057,12 +2092,6 @@ const deserializeMetadata = (output) => ({
|
|
|
2057
2092
|
cfId: output.headers["x-amz-cf-id"],
|
|
2058
2093
|
});
|
|
2059
2094
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
|
|
2060
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
2061
|
-
value !== null &&
|
|
2062
|
-
value !== "" &&
|
|
2063
|
-
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
2064
|
-
value.length != 0) &&
|
|
2065
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2066
2095
|
const _c = "category";
|
|
2067
2096
|
const _cI = "companyId";
|
|
2068
2097
|
const _co = "company";
|
|
@@ -2081,43 +2110,3 @@ const _uI = "userId";
|
|
|
2081
2110
|
const _xrl = "x-ratelimit-limit";
|
|
2082
2111
|
const _xrr = "x-ratelimit-remaining";
|
|
2083
2112
|
const _xrr_ = "x-ratelimit-reset";
|
|
2084
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
|
|
2085
|
-
if (encoded.length) {
|
|
2086
|
-
return JSON.parse(encoded);
|
|
2087
|
-
}
|
|
2088
|
-
return {};
|
|
2089
|
-
});
|
|
2090
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
2091
|
-
const value = await parseBody(errorBody, context);
|
|
2092
|
-
value.message = value.message ?? value.Message;
|
|
2093
|
-
return value;
|
|
2094
|
-
};
|
|
2095
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
2096
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2097
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
2098
|
-
let cleanValue = rawValue;
|
|
2099
|
-
if (typeof cleanValue === "number") {
|
|
2100
|
-
cleanValue = cleanValue.toString();
|
|
2101
|
-
}
|
|
2102
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
2103
|
-
cleanValue = cleanValue.split(",")[0];
|
|
2104
|
-
}
|
|
2105
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2106
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2107
|
-
}
|
|
2108
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2109
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2110
|
-
}
|
|
2111
|
-
return cleanValue;
|
|
2112
|
-
};
|
|
2113
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2114
|
-
if (headerKey !== undefined) {
|
|
2115
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2116
|
-
}
|
|
2117
|
-
if (data.code !== undefined) {
|
|
2118
|
-
return sanitizeErrorCode(data.code);
|
|
2119
|
-
}
|
|
2120
|
-
if (data["__type"] !== undefined) {
|
|
2121
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2122
|
-
}
|
|
2123
|
-
};
|
|
@@ -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
|
};
|