@wildix/xbees-conversations-client 1.0.60 → 1.0.62
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/models/models_0.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +8 -11
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +8 -11
- package/dist-types/commands/GetFilePresignedDownloadUrlCommand.d.ts +2 -1
- package/dist-types/commands/GetUploadedFileInfoCommand.d.ts +1 -1
- package/dist-types/commands/TriggerMessageActionCommand.d.ts +3 -155
- package/dist-types/commands/UploadFileCommand.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +7 -5
- package/package.json +1 -1
|
@@ -139,6 +139,7 @@ exports.ChannelAlreadyExistException = ChannelAlreadyExistException;
|
|
|
139
139
|
exports.ConversationFileCategory = {
|
|
140
140
|
GENERAL: "channels",
|
|
141
141
|
RECORDING: "recordings",
|
|
142
|
+
WIZY_RECORDING: "wizyconfRecordings",
|
|
142
143
|
};
|
|
143
144
|
class TagsLimitReachedException extends ConversationsServiceException_1.ConversationsServiceException {
|
|
144
145
|
constructor(opts) {
|
|
@@ -267,6 +267,7 @@ const se_GetFilePresignedDownloadUrlCommand = async (input, context) => {
|
|
|
267
267
|
b.p('fileId', () => input.fileId, '{fileId}', false);
|
|
268
268
|
const query = (0, smithy_client_1.map)({
|
|
269
269
|
[_c]: [, input[_c]],
|
|
270
|
+
[_d]: [() => input.download !== void 0, () => (input[_d].toString())],
|
|
270
271
|
});
|
|
271
272
|
let body;
|
|
272
273
|
b.m("GET")
|
|
@@ -790,9 +791,7 @@ const se_TagChannelCommand = async (input, context) => {
|
|
|
790
791
|
exports.se_TagChannelCommand = se_TagChannelCommand;
|
|
791
792
|
const se_TriggerMessageActionCommand = async (input, context) => {
|
|
792
793
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
793
|
-
const headers = {
|
|
794
|
-
'content-type': 'application/json',
|
|
795
|
-
};
|
|
794
|
+
const headers = {};
|
|
796
795
|
b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/actions/{actionId}/trigger");
|
|
797
796
|
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
798
797
|
b.p('messageId', () => input.messageId, '{messageId}', false);
|
|
@@ -801,13 +800,6 @@ const se_TriggerMessageActionCommand = async (input, context) => {
|
|
|
801
800
|
[_u]: [, input[_uI]],
|
|
802
801
|
});
|
|
803
802
|
let body;
|
|
804
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
805
|
-
'attachments': _ => (0, smithy_client_1._json)(_),
|
|
806
|
-
'elements': _ => (0, smithy_client_1._json)(_),
|
|
807
|
-
'forward': _ => (0, smithy_client_1._json)(_),
|
|
808
|
-
'quote': _ => (0, smithy_client_1._json)(_),
|
|
809
|
-
'text': [],
|
|
810
|
-
}));
|
|
811
803
|
b.m("POST")
|
|
812
804
|
.h(headers)
|
|
813
805
|
.q(query)
|
|
@@ -1547,7 +1539,11 @@ const de_TriggerMessageActionCommand = async (output, context) => {
|
|
|
1547
1539
|
const contents = (0, smithy_client_1.map)({
|
|
1548
1540
|
$metadata: deserializeMetadata(output),
|
|
1549
1541
|
});
|
|
1550
|
-
|
|
1542
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1543
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1544
|
+
'triggerId': smithy_client_1.expectString,
|
|
1545
|
+
});
|
|
1546
|
+
Object.assign(contents, doc);
|
|
1551
1547
|
return contents;
|
|
1552
1548
|
};
|
|
1553
1549
|
exports.de_TriggerMessageActionCommand = de_TriggerMessageActionCommand;
|
|
@@ -1942,6 +1938,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1942
1938
|
value.length != 0) &&
|
|
1943
1939
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1944
1940
|
const _c = "category";
|
|
1941
|
+
const _d = "download";
|
|
1945
1942
|
const _f = "force";
|
|
1946
1943
|
const _l = "limit";
|
|
1947
1944
|
const _o = "offset";
|
|
@@ -130,6 +130,7 @@ export class ChannelAlreadyExistException extends __BaseException {
|
|
|
130
130
|
export const ConversationFileCategory = {
|
|
131
131
|
GENERAL: "channels",
|
|
132
132
|
RECORDING: "recordings",
|
|
133
|
+
WIZY_RECORDING: "wizyconfRecordings",
|
|
133
134
|
};
|
|
134
135
|
export class TagsLimitReachedException extends __BaseException {
|
|
135
136
|
constructor(opts) {
|
|
@@ -249,6 +249,7 @@ export const se_GetFilePresignedDownloadUrlCommand = async (input, context) => {
|
|
|
249
249
|
b.p('fileId', () => input.fileId, '{fileId}', false);
|
|
250
250
|
const query = map({
|
|
251
251
|
[_c]: [, input[_c]],
|
|
252
|
+
[_d]: [() => input.download !== void 0, () => (input[_d].toString())],
|
|
252
253
|
});
|
|
253
254
|
let body;
|
|
254
255
|
b.m("GET")
|
|
@@ -743,9 +744,7 @@ export const se_TagChannelCommand = async (input, context) => {
|
|
|
743
744
|
};
|
|
744
745
|
export const se_TriggerMessageActionCommand = async (input, context) => {
|
|
745
746
|
const b = rb(input, context);
|
|
746
|
-
const headers = {
|
|
747
|
-
'content-type': 'application/json',
|
|
748
|
-
};
|
|
747
|
+
const headers = {};
|
|
749
748
|
b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/actions/{actionId}/trigger");
|
|
750
749
|
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
751
750
|
b.p('messageId', () => input.messageId, '{messageId}', false);
|
|
@@ -754,13 +753,6 @@ export const se_TriggerMessageActionCommand = async (input, context) => {
|
|
|
754
753
|
[_u]: [, input[_uI]],
|
|
755
754
|
});
|
|
756
755
|
let body;
|
|
757
|
-
body = JSON.stringify(take(input, {
|
|
758
|
-
'attachments': _ => _json(_),
|
|
759
|
-
'elements': _ => _json(_),
|
|
760
|
-
'forward': _ => _json(_),
|
|
761
|
-
'quote': _ => _json(_),
|
|
762
|
-
'text': [],
|
|
763
|
-
}));
|
|
764
756
|
b.m("POST")
|
|
765
757
|
.h(headers)
|
|
766
758
|
.q(query)
|
|
@@ -1450,7 +1442,11 @@ export const de_TriggerMessageActionCommand = async (output, context) => {
|
|
|
1450
1442
|
const contents = map({
|
|
1451
1443
|
$metadata: deserializeMetadata(output),
|
|
1452
1444
|
});
|
|
1453
|
-
await
|
|
1445
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1446
|
+
const doc = take(data, {
|
|
1447
|
+
'triggerId': __expectString,
|
|
1448
|
+
});
|
|
1449
|
+
Object.assign(contents, doc);
|
|
1454
1450
|
return contents;
|
|
1455
1451
|
};
|
|
1456
1452
|
export const de_UnpinChannelCommand = async (output, context) => {
|
|
@@ -1838,6 +1834,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1838
1834
|
value.length != 0) &&
|
|
1839
1835
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1840
1836
|
const _c = "category";
|
|
1837
|
+
const _d = "download";
|
|
1841
1838
|
const _f = "force";
|
|
1842
1839
|
const _l = "limit";
|
|
1843
1840
|
const _o = "offset";
|
|
@@ -38,7 +38,8 @@ declare const GetFilePresignedDownloadUrlCommand_base: {
|
|
|
38
38
|
* channelId: "STRING_VALUE", // required
|
|
39
39
|
* messageId: "STRING_VALUE", // required
|
|
40
40
|
* fileId: "STRING_VALUE", // required
|
|
41
|
-
* category: "channels" || "recordings",
|
|
41
|
+
* category: "channels" || "recordings" || "wizyconfRecordings",
|
|
42
|
+
* download: Number("int"),
|
|
42
43
|
* };
|
|
43
44
|
* const command = new GetFilePresignedDownloadUrlCommand(input);
|
|
44
45
|
* const response = await client.send(command);
|
|
@@ -37,7 +37,7 @@ declare const GetUploadedFileInfoCommand_base: {
|
|
|
37
37
|
* const input = { // GetUploadedFileInfoInput
|
|
38
38
|
* channelId: "STRING_VALUE", // required
|
|
39
39
|
* fileId: "STRING_VALUE", // required
|
|
40
|
-
* category: "channels" || "recordings",
|
|
40
|
+
* category: "channels" || "recordings" || "wizyconfRecordings",
|
|
41
41
|
* };
|
|
42
42
|
* const command = new GetUploadedFileInfoCommand(input);
|
|
43
43
|
* const response = await client.send(command);
|
|
@@ -35,160 +35,6 @@ declare const TriggerMessageActionCommand_base: {
|
|
|
35
35
|
* // const { ConversationsClient, TriggerMessageActionCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
|
|
36
36
|
* const client = new ConversationsClient(config);
|
|
37
37
|
* const input = { // TriggerMessageActionInput
|
|
38
|
-
* text: "STRING_VALUE",
|
|
39
|
-
* elements: [ // ElementsList
|
|
40
|
-
* { // Element Union: only one key present
|
|
41
|
-
* text: { // TextElement
|
|
42
|
-
* value: "STRING_VALUE", // required
|
|
43
|
-
* style: { // TextStyle
|
|
44
|
-
* italic: true || false,
|
|
45
|
-
* bold: true || false,
|
|
46
|
-
* strike: true || false,
|
|
47
|
-
* code: true || false,
|
|
48
|
-
* },
|
|
49
|
-
* },
|
|
50
|
-
* link: { // LinkElement
|
|
51
|
-
* url: "STRING_VALUE", // required
|
|
52
|
-
* text: "STRING_VALUE",
|
|
53
|
-
* style: {
|
|
54
|
-
* italic: true || false,
|
|
55
|
-
* bold: true || false,
|
|
56
|
-
* strike: true || false,
|
|
57
|
-
* code: true || false,
|
|
58
|
-
* },
|
|
59
|
-
* },
|
|
60
|
-
* email: { // EmailElement
|
|
61
|
-
* value: "STRING_VALUE", // required
|
|
62
|
-
* style: {
|
|
63
|
-
* italic: true || false,
|
|
64
|
-
* bold: true || false,
|
|
65
|
-
* strike: true || false,
|
|
66
|
-
* code: true || false,
|
|
67
|
-
* },
|
|
68
|
-
* },
|
|
69
|
-
* phone: { // PhoneElement
|
|
70
|
-
* value: "STRING_VALUE", // required
|
|
71
|
-
* style: {
|
|
72
|
-
* italic: true || false,
|
|
73
|
-
* bold: true || false,
|
|
74
|
-
* strike: true || false,
|
|
75
|
-
* code: true || false,
|
|
76
|
-
* },
|
|
77
|
-
* },
|
|
78
|
-
* mention: { // MentionElement
|
|
79
|
-
* text: "STRING_VALUE", // required
|
|
80
|
-
* user: { // User
|
|
81
|
-
* id: "STRING_VALUE", // required
|
|
82
|
-
* name: "STRING_VALUE",
|
|
83
|
-
* email: "STRING_VALUE",
|
|
84
|
-
* phone: "STRING_VALUE",
|
|
85
|
-
* picture: "STRING_VALUE",
|
|
86
|
-
* locale: "STRING_VALUE",
|
|
87
|
-
* timeZone: "STRING_VALUE",
|
|
88
|
-
* company: "STRING_VALUE",
|
|
89
|
-
* bot: true || false,
|
|
90
|
-
* pbxDomain: "STRING_VALUE",
|
|
91
|
-
* pbxPort: "STRING_VALUE",
|
|
92
|
-
* pbxExtension: "STRING_VALUE",
|
|
93
|
-
* pbxSerial: "STRING_VALUE",
|
|
94
|
-
* pbxUserId: "STRING_VALUE",
|
|
95
|
-
* createdAt: "STRING_VALUE",
|
|
96
|
-
* updatedAt: "STRING_VALUE",
|
|
97
|
-
* },
|
|
98
|
-
* },
|
|
99
|
-
* actions: [ // ActionsElementsList
|
|
100
|
-
* { // ActionElement Union: only one key present
|
|
101
|
-
* button: { // ButtonElement
|
|
102
|
-
* text: "STRING_VALUE", // required
|
|
103
|
-
* variant: "contained" || "outlined",
|
|
104
|
-
* disabled: true || false,
|
|
105
|
-
* handler: { // ButtonHandler Union: only one key present
|
|
106
|
-
* link: { // ButtonLinkHandler
|
|
107
|
-
* url: "STRING_VALUE", // required
|
|
108
|
-
* },
|
|
109
|
-
* reply: { // ButtonReplyHandler
|
|
110
|
-
* text: "STRING_VALUE",
|
|
111
|
-
* },
|
|
112
|
-
* action: { // ButtonActionHandler
|
|
113
|
-
* id: "STRING_VALUE", // required
|
|
114
|
-
* },
|
|
115
|
-
* },
|
|
116
|
-
* },
|
|
117
|
-
* },
|
|
118
|
-
* ],
|
|
119
|
-
* },
|
|
120
|
-
* ],
|
|
121
|
-
* attachments: [ // MessageAttachmentList
|
|
122
|
-
* { // MessageAttachment
|
|
123
|
-
* id: "STRING_VALUE", // required
|
|
124
|
-
* fsId: "STRING_VALUE", // required
|
|
125
|
-
* mime: "STRING_VALUE",
|
|
126
|
-
* name: "STRING_VALUE", // required
|
|
127
|
-
* size: Number("int"), // required
|
|
128
|
-
* width: Number("int"),
|
|
129
|
-
* height: Number("int"),
|
|
130
|
-
* thumbnail: "STRING_VALUE",
|
|
131
|
-
* },
|
|
132
|
-
* ],
|
|
133
|
-
* quote: { // MessageQuote
|
|
134
|
-
* messageId: "STRING_VALUE", // required
|
|
135
|
-
* channelId: "STRING_VALUE", // required
|
|
136
|
-
* user: {
|
|
137
|
-
* id: "STRING_VALUE", // required
|
|
138
|
-
* name: "STRING_VALUE",
|
|
139
|
-
* email: "STRING_VALUE",
|
|
140
|
-
* phone: "STRING_VALUE",
|
|
141
|
-
* picture: "STRING_VALUE",
|
|
142
|
-
* locale: "STRING_VALUE",
|
|
143
|
-
* timeZone: "STRING_VALUE",
|
|
144
|
-
* company: "STRING_VALUE",
|
|
145
|
-
* bot: true || false,
|
|
146
|
-
* pbxDomain: "STRING_VALUE",
|
|
147
|
-
* pbxPort: "STRING_VALUE",
|
|
148
|
-
* pbxExtension: "STRING_VALUE",
|
|
149
|
-
* pbxSerial: "STRING_VALUE",
|
|
150
|
-
* pbxUserId: "STRING_VALUE",
|
|
151
|
-
* createdAt: "STRING_VALUE",
|
|
152
|
-
* updatedAt: "STRING_VALUE",
|
|
153
|
-
* },
|
|
154
|
-
* text: "STRING_VALUE",
|
|
155
|
-
* attachments: [
|
|
156
|
-
* {
|
|
157
|
-
* id: "STRING_VALUE", // required
|
|
158
|
-
* fsId: "STRING_VALUE", // required
|
|
159
|
-
* mime: "STRING_VALUE",
|
|
160
|
-
* name: "STRING_VALUE", // required
|
|
161
|
-
* size: Number("int"), // required
|
|
162
|
-
* width: Number("int"),
|
|
163
|
-
* height: Number("int"),
|
|
164
|
-
* thumbnail: "STRING_VALUE",
|
|
165
|
-
* },
|
|
166
|
-
* ],
|
|
167
|
-
* forward: { // MessageForward
|
|
168
|
-
* forwardCompany: "STRING_VALUE",
|
|
169
|
-
* forwardDate: "STRING_VALUE", // required
|
|
170
|
-
* forwardEmail: "STRING_VALUE",
|
|
171
|
-
* forwardName: "STRING_VALUE",
|
|
172
|
-
* },
|
|
173
|
-
* mentions: [ // UsersList
|
|
174
|
-
* "<User>",
|
|
175
|
-
* ],
|
|
176
|
-
* giphy: { // MessageGiphy
|
|
177
|
-
* id: "STRING_VALUE", // required
|
|
178
|
-
* size: "STRING_VALUE", // required
|
|
179
|
-
* url: "STRING_VALUE", // required
|
|
180
|
-
* height: "STRING_VALUE", // required
|
|
181
|
-
* width: "STRING_VALUE", // required
|
|
182
|
-
* },
|
|
183
|
-
* createdAt: "STRING_VALUE", // required
|
|
184
|
-
* updatedAt: "STRING_VALUE",
|
|
185
|
-
* },
|
|
186
|
-
* forward: {
|
|
187
|
-
* forwardCompany: "STRING_VALUE",
|
|
188
|
-
* forwardDate: "STRING_VALUE", // required
|
|
189
|
-
* forwardEmail: "STRING_VALUE",
|
|
190
|
-
* forwardName: "STRING_VALUE",
|
|
191
|
-
* },
|
|
192
38
|
* channelId: "STRING_VALUE", // required
|
|
193
39
|
* messageId: "STRING_VALUE", // required
|
|
194
40
|
* actionId: "STRING_VALUE", // required
|
|
@@ -196,7 +42,9 @@ declare const TriggerMessageActionCommand_base: {
|
|
|
196
42
|
* };
|
|
197
43
|
* const command = new TriggerMessageActionCommand(input);
|
|
198
44
|
* const response = await client.send(command);
|
|
199
|
-
* // {
|
|
45
|
+
* // { // TriggerMessageActionOutput
|
|
46
|
+
* // triggerId: "STRING_VALUE", // required
|
|
47
|
+
* // };
|
|
200
48
|
*
|
|
201
49
|
* ```
|
|
202
50
|
*
|
|
@@ -39,7 +39,7 @@ declare const UploadFileCommand_base: {
|
|
|
39
39
|
* name: "STRING_VALUE", // required
|
|
40
40
|
* userId: "STRING_VALUE",
|
|
41
41
|
* options: { // UploadFileOptions
|
|
42
|
-
* category: "channels" || "recordings",
|
|
42
|
+
* category: "channels" || "recordings" || "wizyconfRecordings",
|
|
43
43
|
* region: "STRING_VALUE",
|
|
44
44
|
* },
|
|
45
45
|
* };
|
|
@@ -491,6 +491,7 @@ export declare class ChannelAlreadyExistException extends __BaseException {
|
|
|
491
491
|
export declare const ConversationFileCategory: {
|
|
492
492
|
readonly GENERAL: "channels";
|
|
493
493
|
readonly RECORDING: "recordings";
|
|
494
|
+
readonly WIZY_RECORDING: "wizyconfRecordings";
|
|
494
495
|
};
|
|
495
496
|
/**
|
|
496
497
|
* @public
|
|
@@ -1374,6 +1375,11 @@ export interface GetFilePresignedDownloadUrlInput {
|
|
|
1374
1375
|
* @public
|
|
1375
1376
|
*/
|
|
1376
1377
|
category?: ConversationFileCategory;
|
|
1378
|
+
/**
|
|
1379
|
+
* URL behavior, 0 - open(play) for audio/video, others are downloaded; 1 — always download.
|
|
1380
|
+
* @public
|
|
1381
|
+
*/
|
|
1382
|
+
download?: number;
|
|
1377
1383
|
}
|
|
1378
1384
|
/**
|
|
1379
1385
|
* @public
|
|
@@ -2278,11 +2284,6 @@ export declare class MessageActionNotFoundException extends __BaseException {
|
|
|
2278
2284
|
* @public
|
|
2279
2285
|
*/
|
|
2280
2286
|
export interface TriggerMessageActionInput {
|
|
2281
|
-
text?: string;
|
|
2282
|
-
elements?: (Element)[];
|
|
2283
|
-
attachments?: (MessageAttachment)[];
|
|
2284
|
-
quote?: MessageQuote;
|
|
2285
|
-
forward?: MessageForward;
|
|
2286
2287
|
/**
|
|
2287
2288
|
* The unique identifier of the channel to which the message is sent.
|
|
2288
2289
|
* @public
|
|
@@ -2308,6 +2309,7 @@ export interface TriggerMessageActionInput {
|
|
|
2308
2309
|
* @public
|
|
2309
2310
|
*/
|
|
2310
2311
|
export interface TriggerMessageActionOutput {
|
|
2312
|
+
triggerId: string;
|
|
2311
2313
|
}
|
|
2312
2314
|
/**
|
|
2313
2315
|
* @public
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-conversations-client",
|
|
3
3
|
"description": "@wildix/xbees-conversations-client client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.62",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|