@wildix/xbees-conversations-client 1.0.55 → 1.0.56
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/commands/CreateKiteChannelCommand.js +21 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +47 -17
- package/dist-cjs/protocols/Aws_restJson1.js +76 -2
- package/dist-es/Conversations.js +2 -0
- package/dist-es/commands/CreateKiteChannelCommand.js +17 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +44 -16
- package/dist-es/protocols/Aws_restJson1.js +73 -1
- package/dist-types/Conversations.d.ts +7 -0
- package/dist-types/ConversationsClient.d.ts +3 -2
- package/dist-types/commands/CreateKiteChannelCommand.d.ts +300 -0
- package/dist-types/commands/DescribeEventCommand.d.ts +30 -0
- package/dist-types/commands/GetMessageCommand.d.ts +6 -0
- package/dist-types/commands/ListMessagesCommand.d.ts +6 -0
- package/dist-types/commands/PartialUpdateMessageCommand.d.ts +12 -0
- package/dist-types/commands/SendGiphyCommand.d.ts +6 -0
- package/dist-types/commands/SendMessageCommand.d.ts +12 -0
- package/dist-types/commands/UpdateMessageCommand.d.ts +12 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +249 -92
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ const ConversationsClient_1 = require("./ConversationsClient");
|
|
|
5
5
|
const AddChannelMemberCommand_1 = require("./commands/AddChannelMemberCommand");
|
|
6
6
|
const AddChannelMembersCommand_1 = require("./commands/AddChannelMembersCommand");
|
|
7
7
|
const CreateGroupChannelCommand_1 = require("./commands/CreateGroupChannelCommand");
|
|
8
|
+
const CreateKiteChannelCommand_1 = require("./commands/CreateKiteChannelCommand");
|
|
8
9
|
const DeleteChannelCommand_1 = require("./commands/DeleteChannelCommand");
|
|
9
10
|
const DeleteChannelMemberCommand_1 = require("./commands/DeleteChannelMemberCommand");
|
|
10
11
|
const DeleteMessageCommand_1 = require("./commands/DeleteMessageCommand");
|
|
@@ -43,6 +44,7 @@ const commands = {
|
|
|
43
44
|
AddChannelMemberCommand: AddChannelMemberCommand_1.AddChannelMemberCommand,
|
|
44
45
|
AddChannelMembersCommand: AddChannelMembersCommand_1.AddChannelMembersCommand,
|
|
45
46
|
CreateGroupChannelCommand: CreateGroupChannelCommand_1.CreateGroupChannelCommand,
|
|
47
|
+
CreateKiteChannelCommand: CreateKiteChannelCommand_1.CreateKiteChannelCommand,
|
|
46
48
|
DeleteChannelCommand: DeleteChannelCommand_1.DeleteChannelCommand,
|
|
47
49
|
DeleteChannelMemberCommand: DeleteChannelMemberCommand_1.DeleteChannelMemberCommand,
|
|
48
50
|
DeleteMessageCommand: DeleteMessageCommand_1.DeleteMessageCommand,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateKiteChannelCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class CreateKiteChannelCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("Conversations", "CreateKiteChannel", {})
|
|
15
|
+
.n("ConversationsClient", "CreateKiteChannelCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_CreateKiteChannelCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_CreateKiteChannelCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.CreateKiteChannelCommand = CreateKiteChannelCommand;
|
|
@@ -4,6 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./AddChannelMemberCommand"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./AddChannelMembersCommand"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./CreateGroupChannelCommand"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./CreateKiteChannelCommand"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./DeleteChannelCommand"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./DeleteChannelMemberCommand"), exports);
|
|
9
10
|
tslib_1.__exportStar(require("./DeleteMessageCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConversationsServiceException = exports.MessageUnsetFields = exports.GroupChannelUnsetOptions = exports.FileNotFoundException = exports.
|
|
3
|
+
exports.ConversationsServiceException = exports.MessageUnsetFields = exports.GroupChannelUnsetOptions = exports.FileNotFoundException = exports.WebhookEventType = exports.ReactionType = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.TargetNotFoundException = exports.TargetNotEligibleException = exports.TargetNotEligibleReason = exports.MessageWhatsAppStatus = exports.MessageType = exports.MessageSmsStatus = exports.ConversationFileCategory = exports.ChannelAlreadyExistException = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ChannelType = exports.RateLimitExceededException = exports.ForbiddenException = exports.ValidationException = void 0;
|
|
4
4
|
const ConversationsServiceException_1 = require("./ConversationsServiceException");
|
|
5
5
|
class ValidationException extends ConversationsServiceException_1.ConversationsServiceException {
|
|
6
6
|
constructor(opts) {
|
|
@@ -112,6 +112,52 @@ exports.ConversationFileCategory = {
|
|
|
112
112
|
GENERAL: "channels",
|
|
113
113
|
RECORDING: "recordings",
|
|
114
114
|
};
|
|
115
|
+
exports.MessageSmsStatus = {
|
|
116
|
+
DELIVERED: "delivered",
|
|
117
|
+
ERROR: "error",
|
|
118
|
+
SENT: "sent",
|
|
119
|
+
TRYING: "trying",
|
|
120
|
+
};
|
|
121
|
+
exports.MessageType = {
|
|
122
|
+
REGULAR: "regular",
|
|
123
|
+
SYSTEM: "system",
|
|
124
|
+
};
|
|
125
|
+
exports.MessageWhatsAppStatus = {
|
|
126
|
+
DELIVERED: "delivered",
|
|
127
|
+
ERROR: "error",
|
|
128
|
+
SENT: "sent",
|
|
129
|
+
TRYING: "trying",
|
|
130
|
+
};
|
|
131
|
+
exports.TargetNotEligibleReason = {
|
|
132
|
+
NO_LICENSE: "no_license",
|
|
133
|
+
};
|
|
134
|
+
class TargetNotEligibleException extends ConversationsServiceException_1.ConversationsServiceException {
|
|
135
|
+
constructor(opts) {
|
|
136
|
+
super({
|
|
137
|
+
name: "TargetNotEligibleException",
|
|
138
|
+
$fault: "client",
|
|
139
|
+
...opts
|
|
140
|
+
});
|
|
141
|
+
this.name = "TargetNotEligibleException";
|
|
142
|
+
this.$fault = "client";
|
|
143
|
+
Object.setPrototypeOf(this, TargetNotEligibleException.prototype);
|
|
144
|
+
this.reason = opts.reason;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.TargetNotEligibleException = TargetNotEligibleException;
|
|
148
|
+
class TargetNotFoundException extends ConversationsServiceException_1.ConversationsServiceException {
|
|
149
|
+
constructor(opts) {
|
|
150
|
+
super({
|
|
151
|
+
name: "TargetNotFoundException",
|
|
152
|
+
$fault: "client",
|
|
153
|
+
...opts
|
|
154
|
+
});
|
|
155
|
+
this.name = "TargetNotFoundException";
|
|
156
|
+
this.$fault = "client";
|
|
157
|
+
Object.setPrototypeOf(this, TargetNotFoundException.prototype);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
exports.TargetNotFoundException = TargetNotFoundException;
|
|
115
161
|
class MemberNotFoundException extends ConversationsServiceException_1.ConversationsServiceException {
|
|
116
162
|
constructor(opts) {
|
|
117
163
|
super({
|
|
@@ -160,22 +206,6 @@ exports.WebhookEventType = {
|
|
|
160
206
|
REACTION_DELETED: "chat:reaction:deleted",
|
|
161
207
|
REACTION_NEW: "chat:reaction:new",
|
|
162
208
|
};
|
|
163
|
-
exports.MessageSmsStatus = {
|
|
164
|
-
DELIVERED: "delivered",
|
|
165
|
-
ERROR: "error",
|
|
166
|
-
SENT: "sent",
|
|
167
|
-
TRYING: "trying",
|
|
168
|
-
};
|
|
169
|
-
exports.MessageType = {
|
|
170
|
-
REGULAR: "regular",
|
|
171
|
-
SYSTEM: "system",
|
|
172
|
-
};
|
|
173
|
-
exports.MessageWhatsAppStatus = {
|
|
174
|
-
DELIVERED: "delivered",
|
|
175
|
-
ERROR: "error",
|
|
176
|
-
SENT: "sent",
|
|
177
|
-
TRYING: "trying",
|
|
178
|
-
};
|
|
179
209
|
class FileNotFoundException extends ConversationsServiceException_1.ConversationsServiceException {
|
|
180
210
|
constructor(opts) {
|
|
181
211
|
super({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.de_UploadFileCommand = exports.de_UpdateMessageCommand = exports.de_UpdateChannelCommand = exports.de_ShowChannelCommand = exports.de_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_ScheduleExternalFlagAdjustmentJobCommand = exports.de_PartialUpdateMessageCommand = exports.de_PartialUpdateChannelCommand = exports.de_MarkReadCommand = exports.de_ListMessagesCommand = exports.de_ListMessageReactionsCommand = exports.de_ListChannelsCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_HideChannelCommand = exports.de_GetUploadedFileInfoCommand = void 0;
|
|
3
|
+
exports.de_GetFilePresignedDownloadUrlCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_DescribeEventCommand = exports.de_DeleteMessageReactionCommand = exports.de_DeleteMessageCommand = exports.de_DeleteChannelMemberCommand = exports.de_DeleteChannelCommand = exports.de_CreateKiteChannelCommand = exports.de_CreateGroupChannelCommand = exports.de_AddChannelMembersCommand = exports.de_AddChannelMemberCommand = exports.se_UploadFileCommand = exports.se_UpdateMessageCommand = exports.se_UpdateChannelCommand = exports.se_ShowChannelCommand = exports.se_SendTypingStopCommand = exports.se_SendTypingStartCommand = exports.se_SendMessageReactionCommand = exports.se_SendMessageCommand = exports.se_SendGiphyCommand = exports.se_ScheduleExternalFlagAdjustmentJobCommand = exports.se_PartialUpdateMessageCommand = exports.se_PartialUpdateChannelCommand = exports.se_MarkReadCommand = exports.se_ListMessagesCommand = exports.se_ListMessageReactionsCommand = exports.se_ListChannelsCommand = exports.se_ListChannelMembersCommand = exports.se_LeaveChannelCommand = exports.se_JoinChannelCommand = exports.se_InviteCommand = exports.se_HideChannelCommand = exports.se_GetUploadedFileInfoCommand = exports.se_GetOrCreateDirectChannelCommand = exports.se_GetMessageCommand = exports.se_GetFilePresignedDownloadUrlCommand = exports.se_GetDirectChannelIdCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_DescribeEventCommand = exports.se_DeleteMessageReactionCommand = exports.se_DeleteMessageCommand = exports.se_DeleteChannelMemberCommand = exports.se_DeleteChannelCommand = exports.se_CreateKiteChannelCommand = exports.se_CreateGroupChannelCommand = exports.se_AddChannelMembersCommand = exports.se_AddChannelMemberCommand = void 0;
|
|
4
|
+
exports.de_UploadFileCommand = exports.de_UpdateMessageCommand = exports.de_UpdateChannelCommand = exports.de_ShowChannelCommand = exports.de_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_ScheduleExternalFlagAdjustmentJobCommand = exports.de_PartialUpdateMessageCommand = exports.de_PartialUpdateChannelCommand = exports.de_MarkReadCommand = exports.de_ListMessagesCommand = exports.de_ListMessageReactionsCommand = exports.de_ListChannelsCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_HideChannelCommand = exports.de_GetUploadedFileInfoCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageCommand = void 0;
|
|
5
5
|
const ConversationsServiceException_1 = require("../models/ConversationsServiceException");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const core_1 = require("@smithy/core");
|
|
@@ -80,6 +80,30 @@ const se_CreateGroupChannelCommand = async (input, context) => {
|
|
|
80
80
|
return b.build();
|
|
81
81
|
};
|
|
82
82
|
exports.se_CreateGroupChannelCommand = se_CreateGroupChannelCommand;
|
|
83
|
+
const se_CreateKiteChannelCommand = async (input, context) => {
|
|
84
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
85
|
+
const headers = {
|
|
86
|
+
'content-type': 'application/json',
|
|
87
|
+
};
|
|
88
|
+
b.bp("/v2/conversations/kite");
|
|
89
|
+
const query = (0, smithy_client_1.map)({
|
|
90
|
+
[_u]: [, input[_uI]],
|
|
91
|
+
});
|
|
92
|
+
let body;
|
|
93
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
94
|
+
'channelId': [],
|
|
95
|
+
'initialMessage': _ => (0, smithy_client_1._json)(_),
|
|
96
|
+
'targetId': [],
|
|
97
|
+
'targetRouteId': [],
|
|
98
|
+
'welcomeMessages': _ => (0, smithy_client_1._json)(_),
|
|
99
|
+
}));
|
|
100
|
+
b.m("POST")
|
|
101
|
+
.h(headers)
|
|
102
|
+
.q(query)
|
|
103
|
+
.b(body);
|
|
104
|
+
return b.build();
|
|
105
|
+
};
|
|
106
|
+
exports.se_CreateKiteChannelCommand = se_CreateKiteChannelCommand;
|
|
83
107
|
const se_DeleteChannelCommand = async (input, context) => {
|
|
84
108
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
85
109
|
const headers = {};
|
|
@@ -533,6 +557,7 @@ const se_SendMessageCommand = async (input, context) => {
|
|
|
533
557
|
'forward': _ => (0, smithy_client_1._json)(_),
|
|
534
558
|
'mentions': _ => (0, smithy_client_1._json)(_),
|
|
535
559
|
'messageId': [],
|
|
560
|
+
'predefinedReplies': _ => (0, smithy_client_1._json)(_),
|
|
536
561
|
'quote': _ => (0, smithy_client_1._json)(_),
|
|
537
562
|
'text': [],
|
|
538
563
|
}));
|
|
@@ -656,6 +681,7 @@ const se_UpdateMessageCommand = async (input, context) => {
|
|
|
656
681
|
'attachments': _ => (0, smithy_client_1._json)(_),
|
|
657
682
|
'forward': _ => (0, smithy_client_1._json)(_),
|
|
658
683
|
'mentions': _ => (0, smithy_client_1._json)(_),
|
|
684
|
+
'predefinedReplies': _ => (0, smithy_client_1._json)(_),
|
|
659
685
|
'quote': _ => (0, smithy_client_1._json)(_),
|
|
660
686
|
'text': [],
|
|
661
687
|
}));
|
|
@@ -735,6 +761,21 @@ const de_CreateGroupChannelCommand = async (output, context) => {
|
|
|
735
761
|
return contents;
|
|
736
762
|
};
|
|
737
763
|
exports.de_CreateGroupChannelCommand = de_CreateGroupChannelCommand;
|
|
764
|
+
const de_CreateKiteChannelCommand = async (output, context) => {
|
|
765
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
766
|
+
return de_CommandError(output, context);
|
|
767
|
+
}
|
|
768
|
+
const contents = (0, smithy_client_1.map)({
|
|
769
|
+
$metadata: deserializeMetadata(output),
|
|
770
|
+
});
|
|
771
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
772
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
773
|
+
'channel': smithy_client_1._json,
|
|
774
|
+
});
|
|
775
|
+
Object.assign(contents, doc);
|
|
776
|
+
return contents;
|
|
777
|
+
};
|
|
778
|
+
exports.de_CreateKiteChannelCommand = de_CreateKiteChannelCommand;
|
|
738
779
|
const de_DeleteChannelCommand = async (output, context) => {
|
|
739
780
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
740
781
|
return de_CommandError(output, context);
|
|
@@ -1218,6 +1259,12 @@ const de_CommandError = async (output, context) => {
|
|
|
1218
1259
|
case "ChannelAlreadyExistException":
|
|
1219
1260
|
case "wildix.xbees.conversations#ChannelAlreadyExistException":
|
|
1220
1261
|
throw await de_ChannelAlreadyExistExceptionRes(parsedOutput, context);
|
|
1262
|
+
case "TargetNotEligibleException":
|
|
1263
|
+
case "wildix.xbees.conversations#TargetNotEligibleException":
|
|
1264
|
+
throw await de_TargetNotEligibleExceptionRes(parsedOutput, context);
|
|
1265
|
+
case "TargetNotFoundException":
|
|
1266
|
+
case "wildix.xbees.conversations#TargetNotFoundException":
|
|
1267
|
+
throw await de_TargetNotFoundExceptionRes(parsedOutput, context);
|
|
1221
1268
|
case "MemberNotFoundException":
|
|
1222
1269
|
case "wildix.xbees.conversations#MemberNotFoundException":
|
|
1223
1270
|
throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -1375,6 +1422,33 @@ const de_MessageNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
1375
1422
|
});
|
|
1376
1423
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1377
1424
|
};
|
|
1425
|
+
const de_TargetNotEligibleExceptionRes = async (parsedOutput, context) => {
|
|
1426
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1427
|
+
const data = parsedOutput.body;
|
|
1428
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1429
|
+
'message': smithy_client_1.expectString,
|
|
1430
|
+
'reason': smithy_client_1.expectString,
|
|
1431
|
+
});
|
|
1432
|
+
Object.assign(contents, doc);
|
|
1433
|
+
const exception = new models_0_1.TargetNotEligibleException({
|
|
1434
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1435
|
+
...contents
|
|
1436
|
+
});
|
|
1437
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1438
|
+
};
|
|
1439
|
+
const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1440
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1441
|
+
const data = parsedOutput.body;
|
|
1442
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1443
|
+
'message': smithy_client_1.expectString,
|
|
1444
|
+
});
|
|
1445
|
+
Object.assign(contents, doc);
|
|
1446
|
+
const exception = new models_0_1.TargetNotFoundException({
|
|
1447
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1448
|
+
...contents
|
|
1449
|
+
});
|
|
1450
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1451
|
+
};
|
|
1378
1452
|
const deserializeMetadata = (output) => ({
|
|
1379
1453
|
httpStatusCode: output.statusCode,
|
|
1380
1454
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-es/Conversations.js
CHANGED
|
@@ -2,6 +2,7 @@ import { ConversationsClient, } from "./ConversationsClient";
|
|
|
2
2
|
import { AddChannelMemberCommand, } from "./commands/AddChannelMemberCommand";
|
|
3
3
|
import { AddChannelMembersCommand, } from "./commands/AddChannelMembersCommand";
|
|
4
4
|
import { CreateGroupChannelCommand, } from "./commands/CreateGroupChannelCommand";
|
|
5
|
+
import { CreateKiteChannelCommand, } from "./commands/CreateKiteChannelCommand";
|
|
5
6
|
import { DeleteChannelCommand, } from "./commands/DeleteChannelCommand";
|
|
6
7
|
import { DeleteChannelMemberCommand, } from "./commands/DeleteChannelMemberCommand";
|
|
7
8
|
import { DeleteMessageCommand, } from "./commands/DeleteMessageCommand";
|
|
@@ -40,6 +41,7 @@ const commands = {
|
|
|
40
41
|
AddChannelMemberCommand,
|
|
41
42
|
AddChannelMembersCommand,
|
|
42
43
|
CreateGroupChannelCommand,
|
|
44
|
+
CreateKiteChannelCommand,
|
|
43
45
|
DeleteChannelCommand,
|
|
44
46
|
DeleteChannelMemberCommand,
|
|
45
47
|
DeleteMessageCommand,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_CreateKiteChannelCommand, se_CreateKiteChannelCommand, } 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 CreateKiteChannelCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "CreateKiteChannel", {})
|
|
12
|
+
.n("ConversationsClient", "CreateKiteChannelCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_CreateKiteChannelCommand)
|
|
15
|
+
.de(de_CreateKiteChannelCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./AddChannelMemberCommand";
|
|
2
2
|
export * from "./AddChannelMembersCommand";
|
|
3
3
|
export * from "./CreateGroupChannelCommand";
|
|
4
|
+
export * from "./CreateKiteChannelCommand";
|
|
4
5
|
export * from "./DeleteChannelCommand";
|
|
5
6
|
export * from "./DeleteChannelMemberCommand";
|
|
6
7
|
export * from "./DeleteMessageCommand";
|
|
@@ -103,6 +103,50 @@ export const ConversationFileCategory = {
|
|
|
103
103
|
GENERAL: "channels",
|
|
104
104
|
RECORDING: "recordings",
|
|
105
105
|
};
|
|
106
|
+
export const MessageSmsStatus = {
|
|
107
|
+
DELIVERED: "delivered",
|
|
108
|
+
ERROR: "error",
|
|
109
|
+
SENT: "sent",
|
|
110
|
+
TRYING: "trying",
|
|
111
|
+
};
|
|
112
|
+
export const MessageType = {
|
|
113
|
+
REGULAR: "regular",
|
|
114
|
+
SYSTEM: "system",
|
|
115
|
+
};
|
|
116
|
+
export const MessageWhatsAppStatus = {
|
|
117
|
+
DELIVERED: "delivered",
|
|
118
|
+
ERROR: "error",
|
|
119
|
+
SENT: "sent",
|
|
120
|
+
TRYING: "trying",
|
|
121
|
+
};
|
|
122
|
+
export const TargetNotEligibleReason = {
|
|
123
|
+
NO_LICENSE: "no_license",
|
|
124
|
+
};
|
|
125
|
+
export class TargetNotEligibleException extends __BaseException {
|
|
126
|
+
constructor(opts) {
|
|
127
|
+
super({
|
|
128
|
+
name: "TargetNotEligibleException",
|
|
129
|
+
$fault: "client",
|
|
130
|
+
...opts
|
|
131
|
+
});
|
|
132
|
+
this.name = "TargetNotEligibleException";
|
|
133
|
+
this.$fault = "client";
|
|
134
|
+
Object.setPrototypeOf(this, TargetNotEligibleException.prototype);
|
|
135
|
+
this.reason = opts.reason;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
export class TargetNotFoundException extends __BaseException {
|
|
139
|
+
constructor(opts) {
|
|
140
|
+
super({
|
|
141
|
+
name: "TargetNotFoundException",
|
|
142
|
+
$fault: "client",
|
|
143
|
+
...opts
|
|
144
|
+
});
|
|
145
|
+
this.name = "TargetNotFoundException";
|
|
146
|
+
this.$fault = "client";
|
|
147
|
+
Object.setPrototypeOf(this, TargetNotFoundException.prototype);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
106
150
|
export class MemberNotFoundException extends __BaseException {
|
|
107
151
|
constructor(opts) {
|
|
108
152
|
super({
|
|
@@ -149,22 +193,6 @@ export const WebhookEventType = {
|
|
|
149
193
|
REACTION_DELETED: "chat:reaction:deleted",
|
|
150
194
|
REACTION_NEW: "chat:reaction:new",
|
|
151
195
|
};
|
|
152
|
-
export const MessageSmsStatus = {
|
|
153
|
-
DELIVERED: "delivered",
|
|
154
|
-
ERROR: "error",
|
|
155
|
-
SENT: "sent",
|
|
156
|
-
TRYING: "trying",
|
|
157
|
-
};
|
|
158
|
-
export const MessageType = {
|
|
159
|
-
REGULAR: "regular",
|
|
160
|
-
SYSTEM: "system",
|
|
161
|
-
};
|
|
162
|
-
export const MessageWhatsAppStatus = {
|
|
163
|
-
DELIVERED: "delivered",
|
|
164
|
-
ERROR: "error",
|
|
165
|
-
SENT: "sent",
|
|
166
|
-
TRYING: "trying",
|
|
167
|
-
};
|
|
168
196
|
export class FileNotFoundException extends __BaseException {
|
|
169
197
|
constructor(opts) {
|
|
170
198
|
super({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConversationsServiceException as __BaseException } from "../models/ConversationsServiceException";
|
|
2
|
-
import { ChannelAlreadyExistException, ChannelNotFoundException, ConversationsServiceException, FileNotFoundException, ForbiddenException, MemberAlreadyExistException, MemberNotFoundException, MessageNotFoundException, RateLimitExceededException, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { ChannelAlreadyExistException, ChannelNotFoundException, ConversationsServiceException, FileNotFoundException, ForbiddenException, MemberAlreadyExistException, MemberNotFoundException, MessageNotFoundException, RateLimitExceededException, TargetNotEligibleException, TargetNotFoundException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { requestBuilder as rb } from "@smithy/core";
|
|
4
4
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, strictParseInt32 as __strictParseInt32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_AddChannelMemberCommand = async (input, context) => {
|
|
@@ -73,6 +73,29 @@ export const se_CreateGroupChannelCommand = async (input, context) => {
|
|
|
73
73
|
.b(body);
|
|
74
74
|
return b.build();
|
|
75
75
|
};
|
|
76
|
+
export const se_CreateKiteChannelCommand = async (input, context) => {
|
|
77
|
+
const b = rb(input, context);
|
|
78
|
+
const headers = {
|
|
79
|
+
'content-type': 'application/json',
|
|
80
|
+
};
|
|
81
|
+
b.bp("/v2/conversations/kite");
|
|
82
|
+
const query = map({
|
|
83
|
+
[_u]: [, input[_uI]],
|
|
84
|
+
});
|
|
85
|
+
let body;
|
|
86
|
+
body = JSON.stringify(take(input, {
|
|
87
|
+
'channelId': [],
|
|
88
|
+
'initialMessage': _ => _json(_),
|
|
89
|
+
'targetId': [],
|
|
90
|
+
'targetRouteId': [],
|
|
91
|
+
'welcomeMessages': _ => _json(_),
|
|
92
|
+
}));
|
|
93
|
+
b.m("POST")
|
|
94
|
+
.h(headers)
|
|
95
|
+
.q(query)
|
|
96
|
+
.b(body);
|
|
97
|
+
return b.build();
|
|
98
|
+
};
|
|
76
99
|
export const se_DeleteChannelCommand = async (input, context) => {
|
|
77
100
|
const b = rb(input, context);
|
|
78
101
|
const headers = {};
|
|
@@ -501,6 +524,7 @@ export const se_SendMessageCommand = async (input, context) => {
|
|
|
501
524
|
'forward': _ => _json(_),
|
|
502
525
|
'mentions': _ => _json(_),
|
|
503
526
|
'messageId': [],
|
|
527
|
+
'predefinedReplies': _ => _json(_),
|
|
504
528
|
'quote': _ => _json(_),
|
|
505
529
|
'text': [],
|
|
506
530
|
}));
|
|
@@ -618,6 +642,7 @@ export const se_UpdateMessageCommand = async (input, context) => {
|
|
|
618
642
|
'attachments': _ => _json(_),
|
|
619
643
|
'forward': _ => _json(_),
|
|
620
644
|
'mentions': _ => _json(_),
|
|
645
|
+
'predefinedReplies': _ => _json(_),
|
|
621
646
|
'quote': _ => _json(_),
|
|
622
647
|
'text': [],
|
|
623
648
|
}));
|
|
@@ -692,6 +717,20 @@ export const de_CreateGroupChannelCommand = async (output, context) => {
|
|
|
692
717
|
Object.assign(contents, doc);
|
|
693
718
|
return contents;
|
|
694
719
|
};
|
|
720
|
+
export const de_CreateKiteChannelCommand = async (output, context) => {
|
|
721
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
722
|
+
return de_CommandError(output, context);
|
|
723
|
+
}
|
|
724
|
+
const contents = map({
|
|
725
|
+
$metadata: deserializeMetadata(output),
|
|
726
|
+
});
|
|
727
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
728
|
+
const doc = take(data, {
|
|
729
|
+
'channel': _json,
|
|
730
|
+
});
|
|
731
|
+
Object.assign(contents, doc);
|
|
732
|
+
return contents;
|
|
733
|
+
};
|
|
695
734
|
export const de_DeleteChannelCommand = async (output, context) => {
|
|
696
735
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
697
736
|
return de_CommandError(output, context);
|
|
@@ -1142,6 +1181,12 @@ const de_CommandError = async (output, context) => {
|
|
|
1142
1181
|
case "ChannelAlreadyExistException":
|
|
1143
1182
|
case "wildix.xbees.conversations#ChannelAlreadyExistException":
|
|
1144
1183
|
throw await de_ChannelAlreadyExistExceptionRes(parsedOutput, context);
|
|
1184
|
+
case "TargetNotEligibleException":
|
|
1185
|
+
case "wildix.xbees.conversations#TargetNotEligibleException":
|
|
1186
|
+
throw await de_TargetNotEligibleExceptionRes(parsedOutput, context);
|
|
1187
|
+
case "TargetNotFoundException":
|
|
1188
|
+
case "wildix.xbees.conversations#TargetNotFoundException":
|
|
1189
|
+
throw await de_TargetNotFoundExceptionRes(parsedOutput, context);
|
|
1145
1190
|
case "MemberNotFoundException":
|
|
1146
1191
|
case "wildix.xbees.conversations#MemberNotFoundException":
|
|
1147
1192
|
throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -1299,6 +1344,33 @@ const de_MessageNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
1299
1344
|
});
|
|
1300
1345
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1301
1346
|
};
|
|
1347
|
+
const de_TargetNotEligibleExceptionRes = async (parsedOutput, context) => {
|
|
1348
|
+
const contents = map({});
|
|
1349
|
+
const data = parsedOutput.body;
|
|
1350
|
+
const doc = take(data, {
|
|
1351
|
+
'message': __expectString,
|
|
1352
|
+
'reason': __expectString,
|
|
1353
|
+
});
|
|
1354
|
+
Object.assign(contents, doc);
|
|
1355
|
+
const exception = new TargetNotEligibleException({
|
|
1356
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1357
|
+
...contents
|
|
1358
|
+
});
|
|
1359
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1360
|
+
};
|
|
1361
|
+
const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1362
|
+
const contents = map({});
|
|
1363
|
+
const data = parsedOutput.body;
|
|
1364
|
+
const doc = take(data, {
|
|
1365
|
+
'message': __expectString,
|
|
1366
|
+
});
|
|
1367
|
+
Object.assign(contents, doc);
|
|
1368
|
+
const exception = new TargetNotFoundException({
|
|
1369
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1370
|
+
...contents
|
|
1371
|
+
});
|
|
1372
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1373
|
+
};
|
|
1302
1374
|
const deserializeMetadata = (output) => ({
|
|
1303
1375
|
httpStatusCode: output.statusCode,
|
|
1304
1376
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -2,6 +2,7 @@ import { ConversationsClient } from "./ConversationsClient";
|
|
|
2
2
|
import { AddChannelMemberCommandInput, AddChannelMemberCommandOutput } from "./commands/AddChannelMemberCommand";
|
|
3
3
|
import { AddChannelMembersCommandInput, AddChannelMembersCommandOutput } from "./commands/AddChannelMembersCommand";
|
|
4
4
|
import { CreateGroupChannelCommandInput, CreateGroupChannelCommandOutput } from "./commands/CreateGroupChannelCommand";
|
|
5
|
+
import { CreateKiteChannelCommandInput, CreateKiteChannelCommandOutput } from "./commands/CreateKiteChannelCommand";
|
|
5
6
|
import { DeleteChannelCommandInput, DeleteChannelCommandOutput } from "./commands/DeleteChannelCommand";
|
|
6
7
|
import { DeleteChannelMemberCommandInput, DeleteChannelMemberCommandOutput } from "./commands/DeleteChannelMemberCommand";
|
|
7
8
|
import { DeleteMessageCommandInput, DeleteMessageCommandOutput } from "./commands/DeleteMessageCommand";
|
|
@@ -56,6 +57,12 @@ export interface Conversations {
|
|
|
56
57
|
createGroupChannel(args: CreateGroupChannelCommandInput, options?: __HttpHandlerOptions): Promise<CreateGroupChannelCommandOutput>;
|
|
57
58
|
createGroupChannel(args: CreateGroupChannelCommandInput, cb: (err: any, data?: CreateGroupChannelCommandOutput) => void): void;
|
|
58
59
|
createGroupChannel(args: CreateGroupChannelCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateGroupChannelCommandOutput) => void): void;
|
|
60
|
+
/**
|
|
61
|
+
* @see {@link CreateKiteChannelCommand}
|
|
62
|
+
*/
|
|
63
|
+
createKiteChannel(args: CreateKiteChannelCommandInput, options?: __HttpHandlerOptions): Promise<CreateKiteChannelCommandOutput>;
|
|
64
|
+
createKiteChannel(args: CreateKiteChannelCommandInput, cb: (err: any, data?: CreateKiteChannelCommandOutput) => void): void;
|
|
65
|
+
createKiteChannel(args: CreateKiteChannelCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateKiteChannelCommandOutput) => void): void;
|
|
59
66
|
/**
|
|
60
67
|
* @see {@link DeleteChannelCommand}
|
|
61
68
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AddChannelMemberCommandInput, AddChannelMemberCommandOutput } from "./commands/AddChannelMemberCommand";
|
|
2
2
|
import { AddChannelMembersCommandInput, AddChannelMembersCommandOutput } from "./commands/AddChannelMembersCommand";
|
|
3
3
|
import { CreateGroupChannelCommandInput, CreateGroupChannelCommandOutput } from "./commands/CreateGroupChannelCommand";
|
|
4
|
+
import { CreateKiteChannelCommandInput, CreateKiteChannelCommandOutput } from "./commands/CreateKiteChannelCommand";
|
|
4
5
|
import { DeleteChannelCommandInput, DeleteChannelCommandOutput } from "./commands/DeleteChannelCommand";
|
|
5
6
|
import { DeleteChannelMemberCommandInput, DeleteChannelMemberCommandOutput } from "./commands/DeleteChannelMemberCommand";
|
|
6
7
|
import { DeleteMessageCommandInput, DeleteMessageCommandOutput } from "./commands/DeleteMessageCommand";
|
|
@@ -45,11 +46,11 @@ export { __Client };
|
|
|
45
46
|
/**
|
|
46
47
|
* @public
|
|
47
48
|
*/
|
|
48
|
-
export type ServiceInputTypes = AddChannelMemberCommandInput | AddChannelMembersCommandInput | CreateGroupChannelCommandInput | DeleteChannelCommandInput | DeleteChannelMemberCommandInput | DeleteMessageCommandInput | DeleteMessageReactionCommandInput | DescribeEventCommandInput | GetChannelCommandInput | GetChannelMemberCommandInput | GetDirectChannelIdCommandInput | GetFilePresignedDownloadUrlCommandInput | GetMessageCommandInput | GetOrCreateDirectChannelCommandInput | GetUploadedFileInfoCommandInput | HideChannelCommandInput | InviteCommandInput | JoinChannelCommandInput | LeaveChannelCommandInput | ListChannelMembersCommandInput | ListChannelsCommandInput | ListMessageReactionsCommandInput | ListMessagesCommandInput | MarkReadCommandInput | PartialUpdateChannelCommandInput | PartialUpdateMessageCommandInput | ScheduleExternalFlagAdjustmentJobCommandInput | SendGiphyCommandInput | SendMessageCommandInput | SendMessageReactionCommandInput | SendTypingStartCommandInput | SendTypingStopCommandInput | ShowChannelCommandInput | UpdateChannelCommandInput | UpdateMessageCommandInput | UploadFileCommandInput;
|
|
49
|
+
export type ServiceInputTypes = AddChannelMemberCommandInput | AddChannelMembersCommandInput | CreateGroupChannelCommandInput | CreateKiteChannelCommandInput | DeleteChannelCommandInput | DeleteChannelMemberCommandInput | DeleteMessageCommandInput | DeleteMessageReactionCommandInput | DescribeEventCommandInput | GetChannelCommandInput | GetChannelMemberCommandInput | GetDirectChannelIdCommandInput | GetFilePresignedDownloadUrlCommandInput | GetMessageCommandInput | GetOrCreateDirectChannelCommandInput | GetUploadedFileInfoCommandInput | HideChannelCommandInput | InviteCommandInput | JoinChannelCommandInput | LeaveChannelCommandInput | ListChannelMembersCommandInput | ListChannelsCommandInput | ListMessageReactionsCommandInput | ListMessagesCommandInput | MarkReadCommandInput | PartialUpdateChannelCommandInput | PartialUpdateMessageCommandInput | ScheduleExternalFlagAdjustmentJobCommandInput | SendGiphyCommandInput | SendMessageCommandInput | SendMessageReactionCommandInput | SendTypingStartCommandInput | SendTypingStopCommandInput | ShowChannelCommandInput | UpdateChannelCommandInput | UpdateMessageCommandInput | UploadFileCommandInput;
|
|
49
50
|
/**
|
|
50
51
|
* @public
|
|
51
52
|
*/
|
|
52
|
-
export type ServiceOutputTypes = AddChannelMemberCommandOutput | AddChannelMembersCommandOutput | CreateGroupChannelCommandOutput | DeleteChannelCommandOutput | DeleteChannelMemberCommandOutput | DeleteMessageCommandOutput | DeleteMessageReactionCommandOutput | DescribeEventCommandOutput | GetChannelCommandOutput | GetChannelMemberCommandOutput | GetDirectChannelIdCommandOutput | GetFilePresignedDownloadUrlCommandOutput | GetMessageCommandOutput | GetOrCreateDirectChannelCommandOutput | GetUploadedFileInfoCommandOutput | HideChannelCommandOutput | InviteCommandOutput | JoinChannelCommandOutput | LeaveChannelCommandOutput | ListChannelMembersCommandOutput | ListChannelsCommandOutput | ListMessageReactionsCommandOutput | ListMessagesCommandOutput | MarkReadCommandOutput | PartialUpdateChannelCommandOutput | PartialUpdateMessageCommandOutput | ScheduleExternalFlagAdjustmentJobCommandOutput | SendGiphyCommandOutput | SendMessageCommandOutput | SendMessageReactionCommandOutput | SendTypingStartCommandOutput | SendTypingStopCommandOutput | ShowChannelCommandOutput | UpdateChannelCommandOutput | UpdateMessageCommandOutput | UploadFileCommandOutput;
|
|
53
|
+
export type ServiceOutputTypes = AddChannelMemberCommandOutput | AddChannelMembersCommandOutput | CreateGroupChannelCommandOutput | CreateKiteChannelCommandOutput | DeleteChannelCommandOutput | DeleteChannelMemberCommandOutput | DeleteMessageCommandOutput | DeleteMessageReactionCommandOutput | DescribeEventCommandOutput | GetChannelCommandOutput | GetChannelMemberCommandOutput | GetDirectChannelIdCommandOutput | GetFilePresignedDownloadUrlCommandOutput | GetMessageCommandOutput | GetOrCreateDirectChannelCommandOutput | GetUploadedFileInfoCommandOutput | HideChannelCommandOutput | InviteCommandOutput | JoinChannelCommandOutput | LeaveChannelCommandOutput | ListChannelMembersCommandOutput | ListChannelsCommandOutput | ListMessageReactionsCommandOutput | ListMessagesCommandOutput | MarkReadCommandOutput | PartialUpdateChannelCommandOutput | PartialUpdateMessageCommandOutput | ScheduleExternalFlagAdjustmentJobCommandOutput | SendGiphyCommandOutput | SendMessageCommandOutput | SendMessageReactionCommandOutput | SendTypingStartCommandOutput | SendTypingStopCommandOutput | ShowChannelCommandOutput | UpdateChannelCommandOutput | UpdateMessageCommandOutput | UploadFileCommandOutput;
|
|
53
54
|
/**
|
|
54
55
|
* @public
|
|
55
56
|
*/
|