@aws-sdk/client-socialmessaging 3.891.0 → 3.894.0
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/index.js +1682 -10
- package/package.json +19 -19
- package/dist-cjs/SocialMessaging.js +0 -53
- package/dist-cjs/SocialMessagingClient.js +0 -52
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -43
- package/dist-cjs/commands/AssociateWhatsAppBusinessAccountCommand.js +0 -27
- package/dist-cjs/commands/CreateWhatsAppMessageTemplateCommand.js +0 -26
- package/dist-cjs/commands/CreateWhatsAppMessageTemplateFromLibraryCommand.js +0 -26
- package/dist-cjs/commands/CreateWhatsAppMessageTemplateMediaCommand.js +0 -27
- package/dist-cjs/commands/DeleteWhatsAppMessageMediaCommand.js +0 -26
- package/dist-cjs/commands/DeleteWhatsAppMessageTemplateCommand.js +0 -26
- package/dist-cjs/commands/DisassociateWhatsAppBusinessAccountCommand.js +0 -26
- package/dist-cjs/commands/GetLinkedWhatsAppBusinessAccountCommand.js +0 -26
- package/dist-cjs/commands/GetLinkedWhatsAppBusinessAccountPhoneNumberCommand.js +0 -26
- package/dist-cjs/commands/GetWhatsAppMessageMediaCommand.js +0 -27
- package/dist-cjs/commands/GetWhatsAppMessageTemplateCommand.js +0 -26
- package/dist-cjs/commands/ListLinkedWhatsAppBusinessAccountsCommand.js +0 -26
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -26
- package/dist-cjs/commands/ListWhatsAppMessageTemplatesCommand.js +0 -26
- package/dist-cjs/commands/ListWhatsAppTemplateLibraryCommand.js +0 -26
- package/dist-cjs/commands/PostWhatsAppMessageMediaCommand.js +0 -27
- package/dist-cjs/commands/PutWhatsAppBusinessAccountEventDestinationsCommand.js +0 -26
- package/dist-cjs/commands/SendWhatsAppMessageCommand.js +0 -27
- package/dist-cjs/commands/TagResourceCommand.js +0 -26
- package/dist-cjs/commands/UntagResourceCommand.js +0 -26
- package/dist-cjs/commands/UpdateWhatsAppMessageTemplateCommand.js +0 -26
- package/dist-cjs/commands/index.js +0 -24
- package/dist-cjs/endpoint/EndpointParameters.js +0 -17
- package/dist-cjs/extensionConfiguration.js +0 -2
- package/dist-cjs/models/SocialMessagingServiceException.js +0 -12
- package/dist-cjs/models/index.js +0 -4
- package/dist-cjs/models/models_0.js +0 -191
- package/dist-cjs/pagination/Interfaces.js +0 -2
- package/dist-cjs/pagination/ListLinkedWhatsAppBusinessAccountsPaginator.js +0 -7
- package/dist-cjs/pagination/ListWhatsAppMessageTemplatesPaginator.js +0 -7
- package/dist-cjs/pagination/ListWhatsAppTemplateLibraryPaginator.js +0 -7
- package/dist-cjs/pagination/index.js +0 -7
- package/dist-cjs/protocols/Aws_restJson1.js +0 -834
- package/dist-cjs/runtimeExtensions.js +0 -13
|
@@ -1,834 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateWhatsAppMessageTemplateCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SendWhatsAppMessageCommand = exports.de_PutWhatsAppBusinessAccountEventDestinationsCommand = exports.de_PostWhatsAppMessageMediaCommand = exports.de_ListWhatsAppTemplateLibraryCommand = exports.de_ListWhatsAppMessageTemplatesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListLinkedWhatsAppBusinessAccountsCommand = exports.de_GetWhatsAppMessageTemplateCommand = exports.de_GetWhatsAppMessageMediaCommand = exports.de_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = exports.de_GetLinkedWhatsAppBusinessAccountCommand = exports.de_DisassociateWhatsAppBusinessAccountCommand = exports.de_DeleteWhatsAppMessageTemplateCommand = exports.de_DeleteWhatsAppMessageMediaCommand = exports.de_CreateWhatsAppMessageTemplateMediaCommand = exports.de_CreateWhatsAppMessageTemplateFromLibraryCommand = exports.de_CreateWhatsAppMessageTemplateCommand = exports.de_AssociateWhatsAppBusinessAccountCommand = exports.se_UpdateWhatsAppMessageTemplateCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SendWhatsAppMessageCommand = exports.se_PutWhatsAppBusinessAccountEventDestinationsCommand = exports.se_PostWhatsAppMessageMediaCommand = exports.se_ListWhatsAppTemplateLibraryCommand = exports.se_ListWhatsAppMessageTemplatesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListLinkedWhatsAppBusinessAccountsCommand = exports.se_GetWhatsAppMessageTemplateCommand = exports.se_GetWhatsAppMessageMediaCommand = exports.se_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = exports.se_GetLinkedWhatsAppBusinessAccountCommand = exports.se_DisassociateWhatsAppBusinessAccountCommand = exports.se_DeleteWhatsAppMessageTemplateCommand = exports.se_DeleteWhatsAppMessageMediaCommand = exports.se_CreateWhatsAppMessageTemplateMediaCommand = exports.se_CreateWhatsAppMessageTemplateFromLibraryCommand = exports.se_CreateWhatsAppMessageTemplateCommand = exports.se_AssociateWhatsAppBusinessAccountCommand = void 0;
|
|
4
|
-
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const core_2 = require("@smithy/core");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const SocialMessagingServiceException_1 = require("../models/SocialMessagingServiceException");
|
|
9
|
-
const se_AssociateWhatsAppBusinessAccountCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
11
|
-
const headers = {
|
|
12
|
-
"content-type": "application/json",
|
|
13
|
-
};
|
|
14
|
-
b.bp("/v1/whatsapp/signup");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
setupFinalization: (_) => (0, smithy_client_1._json)(_),
|
|
18
|
-
signupCallback: (_) => (0, smithy_client_1._json)(_),
|
|
19
|
-
}));
|
|
20
|
-
b.m("POST").h(headers).b(body);
|
|
21
|
-
return b.build();
|
|
22
|
-
};
|
|
23
|
-
exports.se_AssociateWhatsAppBusinessAccountCommand = se_AssociateWhatsAppBusinessAccountCommand;
|
|
24
|
-
const se_CreateWhatsAppMessageTemplateCommand = async (input, context) => {
|
|
25
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
26
|
-
const headers = {
|
|
27
|
-
"content-type": "application/json",
|
|
28
|
-
};
|
|
29
|
-
b.bp("/v1/whatsapp/template/put");
|
|
30
|
-
let body;
|
|
31
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
32
|
-
id: [],
|
|
33
|
-
templateDefinition: (_) => context.base64Encoder(_),
|
|
34
|
-
}));
|
|
35
|
-
b.m("POST").h(headers).b(body);
|
|
36
|
-
return b.build();
|
|
37
|
-
};
|
|
38
|
-
exports.se_CreateWhatsAppMessageTemplateCommand = se_CreateWhatsAppMessageTemplateCommand;
|
|
39
|
-
const se_CreateWhatsAppMessageTemplateFromLibraryCommand = async (input, context) => {
|
|
40
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
41
|
-
const headers = {
|
|
42
|
-
"content-type": "application/json",
|
|
43
|
-
};
|
|
44
|
-
b.bp("/v1/whatsapp/template/create");
|
|
45
|
-
let body;
|
|
46
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
47
|
-
id: [],
|
|
48
|
-
metaLibraryTemplate: (_) => (0, smithy_client_1._json)(_),
|
|
49
|
-
}));
|
|
50
|
-
b.m("POST").h(headers).b(body);
|
|
51
|
-
return b.build();
|
|
52
|
-
};
|
|
53
|
-
exports.se_CreateWhatsAppMessageTemplateFromLibraryCommand = se_CreateWhatsAppMessageTemplateFromLibraryCommand;
|
|
54
|
-
const se_CreateWhatsAppMessageTemplateMediaCommand = async (input, context) => {
|
|
55
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
56
|
-
const headers = {
|
|
57
|
-
"content-type": "application/json",
|
|
58
|
-
};
|
|
59
|
-
b.bp("/v1/whatsapp/template/media");
|
|
60
|
-
let body;
|
|
61
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
62
|
-
id: [],
|
|
63
|
-
sourceS3File: (_) => (0, smithy_client_1._json)(_),
|
|
64
|
-
}));
|
|
65
|
-
b.m("POST").h(headers).b(body);
|
|
66
|
-
return b.build();
|
|
67
|
-
};
|
|
68
|
-
exports.se_CreateWhatsAppMessageTemplateMediaCommand = se_CreateWhatsAppMessageTemplateMediaCommand;
|
|
69
|
-
const se_DeleteWhatsAppMessageMediaCommand = async (input, context) => {
|
|
70
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
71
|
-
const headers = {};
|
|
72
|
-
b.bp("/v1/whatsapp/media");
|
|
73
|
-
const query = (0, smithy_client_1.map)({
|
|
74
|
-
[_mI]: [, (0, smithy_client_1.expectNonNull)(input[_mI], `mediaId`)],
|
|
75
|
-
[_oPNI]: [, (0, smithy_client_1.expectNonNull)(input[_oPNI], `originationPhoneNumberId`)],
|
|
76
|
-
});
|
|
77
|
-
let body;
|
|
78
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
79
|
-
return b.build();
|
|
80
|
-
};
|
|
81
|
-
exports.se_DeleteWhatsAppMessageMediaCommand = se_DeleteWhatsAppMessageMediaCommand;
|
|
82
|
-
const se_DeleteWhatsAppMessageTemplateCommand = async (input, context) => {
|
|
83
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
84
|
-
const headers = {};
|
|
85
|
-
b.bp("/v1/whatsapp/template");
|
|
86
|
-
const query = (0, smithy_client_1.map)({
|
|
87
|
-
[_mTI]: [, input[_mTI]],
|
|
88
|
-
[_dAT]: [() => input.deleteAllLanguages !== void 0, () => input[_dAL].toString()],
|
|
89
|
-
[_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `id`)],
|
|
90
|
-
[_tN]: [, (0, smithy_client_1.expectNonNull)(input[_tN], `templateName`)],
|
|
91
|
-
});
|
|
92
|
-
let body;
|
|
93
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
94
|
-
return b.build();
|
|
95
|
-
};
|
|
96
|
-
exports.se_DeleteWhatsAppMessageTemplateCommand = se_DeleteWhatsAppMessageTemplateCommand;
|
|
97
|
-
const se_DisassociateWhatsAppBusinessAccountCommand = async (input, context) => {
|
|
98
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
99
|
-
const headers = {};
|
|
100
|
-
b.bp("/v1/whatsapp/waba/disassociate");
|
|
101
|
-
const query = (0, smithy_client_1.map)({
|
|
102
|
-
[_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `id`)],
|
|
103
|
-
});
|
|
104
|
-
let body;
|
|
105
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
106
|
-
return b.build();
|
|
107
|
-
};
|
|
108
|
-
exports.se_DisassociateWhatsAppBusinessAccountCommand = se_DisassociateWhatsAppBusinessAccountCommand;
|
|
109
|
-
const se_GetLinkedWhatsAppBusinessAccountCommand = async (input, context) => {
|
|
110
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
111
|
-
const headers = {};
|
|
112
|
-
b.bp("/v1/whatsapp/waba/details");
|
|
113
|
-
const query = (0, smithy_client_1.map)({
|
|
114
|
-
[_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `id`)],
|
|
115
|
-
});
|
|
116
|
-
let body;
|
|
117
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
118
|
-
return b.build();
|
|
119
|
-
};
|
|
120
|
-
exports.se_GetLinkedWhatsAppBusinessAccountCommand = se_GetLinkedWhatsAppBusinessAccountCommand;
|
|
121
|
-
const se_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = async (input, context) => {
|
|
122
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
123
|
-
const headers = {};
|
|
124
|
-
b.bp("/v1/whatsapp/waba/phone/details");
|
|
125
|
-
const query = (0, smithy_client_1.map)({
|
|
126
|
-
[_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `id`)],
|
|
127
|
-
});
|
|
128
|
-
let body;
|
|
129
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
130
|
-
return b.build();
|
|
131
|
-
};
|
|
132
|
-
exports.se_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = se_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand;
|
|
133
|
-
const se_GetWhatsAppMessageMediaCommand = async (input, context) => {
|
|
134
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
135
|
-
const headers = {
|
|
136
|
-
"content-type": "application/json",
|
|
137
|
-
};
|
|
138
|
-
b.bp("/v1/whatsapp/media/get");
|
|
139
|
-
let body;
|
|
140
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
141
|
-
destinationS3File: (_) => (0, smithy_client_1._json)(_),
|
|
142
|
-
destinationS3PresignedUrl: (_) => (0, smithy_client_1._json)(_),
|
|
143
|
-
mediaId: [],
|
|
144
|
-
metadataOnly: [],
|
|
145
|
-
originationPhoneNumberId: [],
|
|
146
|
-
}));
|
|
147
|
-
b.m("POST").h(headers).b(body);
|
|
148
|
-
return b.build();
|
|
149
|
-
};
|
|
150
|
-
exports.se_GetWhatsAppMessageMediaCommand = se_GetWhatsAppMessageMediaCommand;
|
|
151
|
-
const se_GetWhatsAppMessageTemplateCommand = async (input, context) => {
|
|
152
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
153
|
-
const headers = {};
|
|
154
|
-
b.bp("/v1/whatsapp/template");
|
|
155
|
-
const query = (0, smithy_client_1.map)({
|
|
156
|
-
[_mTI]: [, (0, smithy_client_1.expectNonNull)(input[_mTI], `metaTemplateId`)],
|
|
157
|
-
[_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `id`)],
|
|
158
|
-
});
|
|
159
|
-
let body;
|
|
160
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
161
|
-
return b.build();
|
|
162
|
-
};
|
|
163
|
-
exports.se_GetWhatsAppMessageTemplateCommand = se_GetWhatsAppMessageTemplateCommand;
|
|
164
|
-
const se_ListLinkedWhatsAppBusinessAccountsCommand = async (input, context) => {
|
|
165
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
166
|
-
const headers = {};
|
|
167
|
-
b.bp("/v1/whatsapp/waba/list");
|
|
168
|
-
const query = (0, smithy_client_1.map)({
|
|
169
|
-
[_nT]: [, input[_nT]],
|
|
170
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
171
|
-
});
|
|
172
|
-
let body;
|
|
173
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
174
|
-
return b.build();
|
|
175
|
-
};
|
|
176
|
-
exports.se_ListLinkedWhatsAppBusinessAccountsCommand = se_ListLinkedWhatsAppBusinessAccountsCommand;
|
|
177
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
178
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
179
|
-
const headers = {};
|
|
180
|
-
b.bp("/v1/tags/list");
|
|
181
|
-
const query = (0, smithy_client_1.map)({
|
|
182
|
-
[_rA]: [, (0, smithy_client_1.expectNonNull)(input[_rA], `resourceArn`)],
|
|
183
|
-
});
|
|
184
|
-
let body;
|
|
185
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
186
|
-
return b.build();
|
|
187
|
-
};
|
|
188
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
189
|
-
const se_ListWhatsAppMessageTemplatesCommand = async (input, context) => {
|
|
190
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
191
|
-
const headers = {};
|
|
192
|
-
b.bp("/v1/whatsapp/template/list");
|
|
193
|
-
const query = (0, smithy_client_1.map)({
|
|
194
|
-
[_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `id`)],
|
|
195
|
-
[_nT]: [, input[_nT]],
|
|
196
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
197
|
-
});
|
|
198
|
-
let body;
|
|
199
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
200
|
-
return b.build();
|
|
201
|
-
};
|
|
202
|
-
exports.se_ListWhatsAppMessageTemplatesCommand = se_ListWhatsAppMessageTemplatesCommand;
|
|
203
|
-
const se_ListWhatsAppTemplateLibraryCommand = async (input, context) => {
|
|
204
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
205
|
-
const headers = {
|
|
206
|
-
"content-type": "application/json",
|
|
207
|
-
};
|
|
208
|
-
b.bp("/v1/whatsapp/template/library");
|
|
209
|
-
const query = (0, smithy_client_1.map)({
|
|
210
|
-
[_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `id`)],
|
|
211
|
-
});
|
|
212
|
-
let body;
|
|
213
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
214
|
-
filters: (_) => (0, smithy_client_1._json)(_),
|
|
215
|
-
maxResults: [],
|
|
216
|
-
nextToken: [],
|
|
217
|
-
}));
|
|
218
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
219
|
-
return b.build();
|
|
220
|
-
};
|
|
221
|
-
exports.se_ListWhatsAppTemplateLibraryCommand = se_ListWhatsAppTemplateLibraryCommand;
|
|
222
|
-
const se_PostWhatsAppMessageMediaCommand = async (input, context) => {
|
|
223
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
224
|
-
const headers = {
|
|
225
|
-
"content-type": "application/json",
|
|
226
|
-
};
|
|
227
|
-
b.bp("/v1/whatsapp/media");
|
|
228
|
-
let body;
|
|
229
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
230
|
-
originationPhoneNumberId: [],
|
|
231
|
-
sourceS3File: (_) => (0, smithy_client_1._json)(_),
|
|
232
|
-
sourceS3PresignedUrl: (_) => (0, smithy_client_1._json)(_),
|
|
233
|
-
}));
|
|
234
|
-
b.m("POST").h(headers).b(body);
|
|
235
|
-
return b.build();
|
|
236
|
-
};
|
|
237
|
-
exports.se_PostWhatsAppMessageMediaCommand = se_PostWhatsAppMessageMediaCommand;
|
|
238
|
-
const se_PutWhatsAppBusinessAccountEventDestinationsCommand = async (input, context) => {
|
|
239
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
240
|
-
const headers = {
|
|
241
|
-
"content-type": "application/json",
|
|
242
|
-
};
|
|
243
|
-
b.bp("/v1/whatsapp/waba/eventdestinations");
|
|
244
|
-
let body;
|
|
245
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
246
|
-
eventDestinations: (_) => (0, smithy_client_1._json)(_),
|
|
247
|
-
id: [],
|
|
248
|
-
}));
|
|
249
|
-
b.m("PUT").h(headers).b(body);
|
|
250
|
-
return b.build();
|
|
251
|
-
};
|
|
252
|
-
exports.se_PutWhatsAppBusinessAccountEventDestinationsCommand = se_PutWhatsAppBusinessAccountEventDestinationsCommand;
|
|
253
|
-
const se_SendWhatsAppMessageCommand = async (input, context) => {
|
|
254
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
255
|
-
const headers = {
|
|
256
|
-
"content-type": "application/json",
|
|
257
|
-
};
|
|
258
|
-
b.bp("/v1/whatsapp/send");
|
|
259
|
-
let body;
|
|
260
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
261
|
-
message: (_) => context.base64Encoder(_),
|
|
262
|
-
metaApiVersion: [],
|
|
263
|
-
originationPhoneNumberId: [],
|
|
264
|
-
}));
|
|
265
|
-
b.m("POST").h(headers).b(body);
|
|
266
|
-
return b.build();
|
|
267
|
-
};
|
|
268
|
-
exports.se_SendWhatsAppMessageCommand = se_SendWhatsAppMessageCommand;
|
|
269
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
270
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
271
|
-
const headers = {
|
|
272
|
-
"content-type": "application/json",
|
|
273
|
-
};
|
|
274
|
-
b.bp("/v1/tags/tag-resource");
|
|
275
|
-
let body;
|
|
276
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
277
|
-
resourceArn: [],
|
|
278
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
279
|
-
}));
|
|
280
|
-
b.m("POST").h(headers).b(body);
|
|
281
|
-
return b.build();
|
|
282
|
-
};
|
|
283
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
284
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
285
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
286
|
-
const headers = {
|
|
287
|
-
"content-type": "application/json",
|
|
288
|
-
};
|
|
289
|
-
b.bp("/v1/tags/untag-resource");
|
|
290
|
-
let body;
|
|
291
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
292
|
-
resourceArn: [],
|
|
293
|
-
tagKeys: (_) => (0, smithy_client_1._json)(_),
|
|
294
|
-
}));
|
|
295
|
-
b.m("POST").h(headers).b(body);
|
|
296
|
-
return b.build();
|
|
297
|
-
};
|
|
298
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
299
|
-
const se_UpdateWhatsAppMessageTemplateCommand = async (input, context) => {
|
|
300
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
301
|
-
const headers = {
|
|
302
|
-
"content-type": "application/json",
|
|
303
|
-
};
|
|
304
|
-
b.bp("/v1/whatsapp/template");
|
|
305
|
-
let body;
|
|
306
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
307
|
-
id: [],
|
|
308
|
-
metaTemplateId: [],
|
|
309
|
-
templateCategory: [],
|
|
310
|
-
templateComponents: (_) => context.base64Encoder(_),
|
|
311
|
-
}));
|
|
312
|
-
b.m("POST").h(headers).b(body);
|
|
313
|
-
return b.build();
|
|
314
|
-
};
|
|
315
|
-
exports.se_UpdateWhatsAppMessageTemplateCommand = se_UpdateWhatsAppMessageTemplateCommand;
|
|
316
|
-
const de_AssociateWhatsAppBusinessAccountCommand = async (output, context) => {
|
|
317
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
318
|
-
return de_CommandError(output, context);
|
|
319
|
-
}
|
|
320
|
-
const contents = (0, smithy_client_1.map)({
|
|
321
|
-
$metadata: deserializeMetadata(output),
|
|
322
|
-
});
|
|
323
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
324
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
325
|
-
signupCallbackResult: smithy_client_1._json,
|
|
326
|
-
statusCode: smithy_client_1.expectInt32,
|
|
327
|
-
});
|
|
328
|
-
Object.assign(contents, doc);
|
|
329
|
-
return contents;
|
|
330
|
-
};
|
|
331
|
-
exports.de_AssociateWhatsAppBusinessAccountCommand = de_AssociateWhatsAppBusinessAccountCommand;
|
|
332
|
-
const de_CreateWhatsAppMessageTemplateCommand = async (output, context) => {
|
|
333
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
334
|
-
return de_CommandError(output, context);
|
|
335
|
-
}
|
|
336
|
-
const contents = (0, smithy_client_1.map)({
|
|
337
|
-
$metadata: deserializeMetadata(output),
|
|
338
|
-
});
|
|
339
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
340
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
341
|
-
category: smithy_client_1.expectString,
|
|
342
|
-
metaTemplateId: smithy_client_1.expectString,
|
|
343
|
-
templateStatus: smithy_client_1.expectString,
|
|
344
|
-
});
|
|
345
|
-
Object.assign(contents, doc);
|
|
346
|
-
return contents;
|
|
347
|
-
};
|
|
348
|
-
exports.de_CreateWhatsAppMessageTemplateCommand = de_CreateWhatsAppMessageTemplateCommand;
|
|
349
|
-
const de_CreateWhatsAppMessageTemplateFromLibraryCommand = async (output, context) => {
|
|
350
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
351
|
-
return de_CommandError(output, context);
|
|
352
|
-
}
|
|
353
|
-
const contents = (0, smithy_client_1.map)({
|
|
354
|
-
$metadata: deserializeMetadata(output),
|
|
355
|
-
});
|
|
356
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
357
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
358
|
-
category: smithy_client_1.expectString,
|
|
359
|
-
metaTemplateId: smithy_client_1.expectString,
|
|
360
|
-
templateStatus: smithy_client_1.expectString,
|
|
361
|
-
});
|
|
362
|
-
Object.assign(contents, doc);
|
|
363
|
-
return contents;
|
|
364
|
-
};
|
|
365
|
-
exports.de_CreateWhatsAppMessageTemplateFromLibraryCommand = de_CreateWhatsAppMessageTemplateFromLibraryCommand;
|
|
366
|
-
const de_CreateWhatsAppMessageTemplateMediaCommand = async (output, context) => {
|
|
367
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
368
|
-
return de_CommandError(output, context);
|
|
369
|
-
}
|
|
370
|
-
const contents = (0, smithy_client_1.map)({
|
|
371
|
-
$metadata: deserializeMetadata(output),
|
|
372
|
-
});
|
|
373
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
374
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
375
|
-
metaHeaderHandle: smithy_client_1.expectString,
|
|
376
|
-
});
|
|
377
|
-
Object.assign(contents, doc);
|
|
378
|
-
return contents;
|
|
379
|
-
};
|
|
380
|
-
exports.de_CreateWhatsAppMessageTemplateMediaCommand = de_CreateWhatsAppMessageTemplateMediaCommand;
|
|
381
|
-
const de_DeleteWhatsAppMessageMediaCommand = async (output, context) => {
|
|
382
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
383
|
-
return de_CommandError(output, context);
|
|
384
|
-
}
|
|
385
|
-
const contents = (0, smithy_client_1.map)({
|
|
386
|
-
$metadata: deserializeMetadata(output),
|
|
387
|
-
});
|
|
388
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
389
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
390
|
-
success: smithy_client_1.expectBoolean,
|
|
391
|
-
});
|
|
392
|
-
Object.assign(contents, doc);
|
|
393
|
-
return contents;
|
|
394
|
-
};
|
|
395
|
-
exports.de_DeleteWhatsAppMessageMediaCommand = de_DeleteWhatsAppMessageMediaCommand;
|
|
396
|
-
const de_DeleteWhatsAppMessageTemplateCommand = async (output, context) => {
|
|
397
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
398
|
-
return de_CommandError(output, context);
|
|
399
|
-
}
|
|
400
|
-
const contents = (0, smithy_client_1.map)({
|
|
401
|
-
$metadata: deserializeMetadata(output),
|
|
402
|
-
});
|
|
403
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
404
|
-
return contents;
|
|
405
|
-
};
|
|
406
|
-
exports.de_DeleteWhatsAppMessageTemplateCommand = de_DeleteWhatsAppMessageTemplateCommand;
|
|
407
|
-
const de_DisassociateWhatsAppBusinessAccountCommand = async (output, context) => {
|
|
408
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
409
|
-
return de_CommandError(output, context);
|
|
410
|
-
}
|
|
411
|
-
const contents = (0, smithy_client_1.map)({
|
|
412
|
-
$metadata: deserializeMetadata(output),
|
|
413
|
-
});
|
|
414
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
415
|
-
return contents;
|
|
416
|
-
};
|
|
417
|
-
exports.de_DisassociateWhatsAppBusinessAccountCommand = de_DisassociateWhatsAppBusinessAccountCommand;
|
|
418
|
-
const de_GetLinkedWhatsAppBusinessAccountCommand = async (output, context) => {
|
|
419
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
420
|
-
return de_CommandError(output, context);
|
|
421
|
-
}
|
|
422
|
-
const contents = (0, smithy_client_1.map)({
|
|
423
|
-
$metadata: deserializeMetadata(output),
|
|
424
|
-
});
|
|
425
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
426
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
427
|
-
account: (_) => de_LinkedWhatsAppBusinessAccount(_, context),
|
|
428
|
-
});
|
|
429
|
-
Object.assign(contents, doc);
|
|
430
|
-
return contents;
|
|
431
|
-
};
|
|
432
|
-
exports.de_GetLinkedWhatsAppBusinessAccountCommand = de_GetLinkedWhatsAppBusinessAccountCommand;
|
|
433
|
-
const de_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = async (output, context) => {
|
|
434
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
435
|
-
return de_CommandError(output, context);
|
|
436
|
-
}
|
|
437
|
-
const contents = (0, smithy_client_1.map)({
|
|
438
|
-
$metadata: deserializeMetadata(output),
|
|
439
|
-
});
|
|
440
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
441
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
442
|
-
linkedWhatsAppBusinessAccountId: smithy_client_1.expectString,
|
|
443
|
-
phoneNumber: smithy_client_1._json,
|
|
444
|
-
});
|
|
445
|
-
Object.assign(contents, doc);
|
|
446
|
-
return contents;
|
|
447
|
-
};
|
|
448
|
-
exports.de_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = de_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand;
|
|
449
|
-
const de_GetWhatsAppMessageMediaCommand = async (output, context) => {
|
|
450
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
451
|
-
return de_CommandError(output, context);
|
|
452
|
-
}
|
|
453
|
-
const contents = (0, smithy_client_1.map)({
|
|
454
|
-
$metadata: deserializeMetadata(output),
|
|
455
|
-
});
|
|
456
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
457
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
458
|
-
fileSize: smithy_client_1.expectLong,
|
|
459
|
-
mimeType: smithy_client_1.expectString,
|
|
460
|
-
});
|
|
461
|
-
Object.assign(contents, doc);
|
|
462
|
-
return contents;
|
|
463
|
-
};
|
|
464
|
-
exports.de_GetWhatsAppMessageMediaCommand = de_GetWhatsAppMessageMediaCommand;
|
|
465
|
-
const de_GetWhatsAppMessageTemplateCommand = async (output, context) => {
|
|
466
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
467
|
-
return de_CommandError(output, context);
|
|
468
|
-
}
|
|
469
|
-
const contents = (0, smithy_client_1.map)({
|
|
470
|
-
$metadata: deserializeMetadata(output),
|
|
471
|
-
});
|
|
472
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
473
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
474
|
-
template: smithy_client_1.expectString,
|
|
475
|
-
});
|
|
476
|
-
Object.assign(contents, doc);
|
|
477
|
-
return contents;
|
|
478
|
-
};
|
|
479
|
-
exports.de_GetWhatsAppMessageTemplateCommand = de_GetWhatsAppMessageTemplateCommand;
|
|
480
|
-
const de_ListLinkedWhatsAppBusinessAccountsCommand = async (output, context) => {
|
|
481
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
482
|
-
return de_CommandError(output, context);
|
|
483
|
-
}
|
|
484
|
-
const contents = (0, smithy_client_1.map)({
|
|
485
|
-
$metadata: deserializeMetadata(output),
|
|
486
|
-
});
|
|
487
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
488
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
489
|
-
linkedAccounts: (_) => de_LinkedWhatsAppBusinessAccountSummaryList(_, context),
|
|
490
|
-
nextToken: smithy_client_1.expectString,
|
|
491
|
-
});
|
|
492
|
-
Object.assign(contents, doc);
|
|
493
|
-
return contents;
|
|
494
|
-
};
|
|
495
|
-
exports.de_ListLinkedWhatsAppBusinessAccountsCommand = de_ListLinkedWhatsAppBusinessAccountsCommand;
|
|
496
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
497
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
498
|
-
return de_CommandError(output, context);
|
|
499
|
-
}
|
|
500
|
-
const contents = (0, smithy_client_1.map)({
|
|
501
|
-
$metadata: deserializeMetadata(output),
|
|
502
|
-
});
|
|
503
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
504
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
505
|
-
statusCode: smithy_client_1.expectInt32,
|
|
506
|
-
tags: smithy_client_1._json,
|
|
507
|
-
});
|
|
508
|
-
Object.assign(contents, doc);
|
|
509
|
-
return contents;
|
|
510
|
-
};
|
|
511
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
512
|
-
const de_ListWhatsAppMessageTemplatesCommand = async (output, context) => {
|
|
513
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
514
|
-
return de_CommandError(output, context);
|
|
515
|
-
}
|
|
516
|
-
const contents = (0, smithy_client_1.map)({
|
|
517
|
-
$metadata: deserializeMetadata(output),
|
|
518
|
-
});
|
|
519
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
520
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
521
|
-
nextToken: smithy_client_1.expectString,
|
|
522
|
-
templates: smithy_client_1._json,
|
|
523
|
-
});
|
|
524
|
-
Object.assign(contents, doc);
|
|
525
|
-
return contents;
|
|
526
|
-
};
|
|
527
|
-
exports.de_ListWhatsAppMessageTemplatesCommand = de_ListWhatsAppMessageTemplatesCommand;
|
|
528
|
-
const de_ListWhatsAppTemplateLibraryCommand = async (output, context) => {
|
|
529
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
530
|
-
return de_CommandError(output, context);
|
|
531
|
-
}
|
|
532
|
-
const contents = (0, smithy_client_1.map)({
|
|
533
|
-
$metadata: deserializeMetadata(output),
|
|
534
|
-
});
|
|
535
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
536
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
537
|
-
metaLibraryTemplates: smithy_client_1._json,
|
|
538
|
-
nextToken: smithy_client_1.expectString,
|
|
539
|
-
});
|
|
540
|
-
Object.assign(contents, doc);
|
|
541
|
-
return contents;
|
|
542
|
-
};
|
|
543
|
-
exports.de_ListWhatsAppTemplateLibraryCommand = de_ListWhatsAppTemplateLibraryCommand;
|
|
544
|
-
const de_PostWhatsAppMessageMediaCommand = async (output, context) => {
|
|
545
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
546
|
-
return de_CommandError(output, context);
|
|
547
|
-
}
|
|
548
|
-
const contents = (0, smithy_client_1.map)({
|
|
549
|
-
$metadata: deserializeMetadata(output),
|
|
550
|
-
});
|
|
551
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
552
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
553
|
-
mediaId: smithy_client_1.expectString,
|
|
554
|
-
});
|
|
555
|
-
Object.assign(contents, doc);
|
|
556
|
-
return contents;
|
|
557
|
-
};
|
|
558
|
-
exports.de_PostWhatsAppMessageMediaCommand = de_PostWhatsAppMessageMediaCommand;
|
|
559
|
-
const de_PutWhatsAppBusinessAccountEventDestinationsCommand = async (output, context) => {
|
|
560
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
561
|
-
return de_CommandError(output, context);
|
|
562
|
-
}
|
|
563
|
-
const contents = (0, smithy_client_1.map)({
|
|
564
|
-
$metadata: deserializeMetadata(output),
|
|
565
|
-
});
|
|
566
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
567
|
-
return contents;
|
|
568
|
-
};
|
|
569
|
-
exports.de_PutWhatsAppBusinessAccountEventDestinationsCommand = de_PutWhatsAppBusinessAccountEventDestinationsCommand;
|
|
570
|
-
const de_SendWhatsAppMessageCommand = async (output, context) => {
|
|
571
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
572
|
-
return de_CommandError(output, context);
|
|
573
|
-
}
|
|
574
|
-
const contents = (0, smithy_client_1.map)({
|
|
575
|
-
$metadata: deserializeMetadata(output),
|
|
576
|
-
});
|
|
577
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
578
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
579
|
-
messageId: smithy_client_1.expectString,
|
|
580
|
-
});
|
|
581
|
-
Object.assign(contents, doc);
|
|
582
|
-
return contents;
|
|
583
|
-
};
|
|
584
|
-
exports.de_SendWhatsAppMessageCommand = de_SendWhatsAppMessageCommand;
|
|
585
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
586
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
587
|
-
return de_CommandError(output, context);
|
|
588
|
-
}
|
|
589
|
-
const contents = (0, smithy_client_1.map)({
|
|
590
|
-
$metadata: deserializeMetadata(output),
|
|
591
|
-
});
|
|
592
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
593
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
594
|
-
statusCode: smithy_client_1.expectInt32,
|
|
595
|
-
});
|
|
596
|
-
Object.assign(contents, doc);
|
|
597
|
-
return contents;
|
|
598
|
-
};
|
|
599
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
600
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
601
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
602
|
-
return de_CommandError(output, context);
|
|
603
|
-
}
|
|
604
|
-
const contents = (0, smithy_client_1.map)({
|
|
605
|
-
$metadata: deserializeMetadata(output),
|
|
606
|
-
});
|
|
607
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
608
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
609
|
-
statusCode: smithy_client_1.expectInt32,
|
|
610
|
-
});
|
|
611
|
-
Object.assign(contents, doc);
|
|
612
|
-
return contents;
|
|
613
|
-
};
|
|
614
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
615
|
-
const de_UpdateWhatsAppMessageTemplateCommand = async (output, context) => {
|
|
616
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
617
|
-
return de_CommandError(output, context);
|
|
618
|
-
}
|
|
619
|
-
const contents = (0, smithy_client_1.map)({
|
|
620
|
-
$metadata: deserializeMetadata(output),
|
|
621
|
-
});
|
|
622
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
623
|
-
return contents;
|
|
624
|
-
};
|
|
625
|
-
exports.de_UpdateWhatsAppMessageTemplateCommand = de_UpdateWhatsAppMessageTemplateCommand;
|
|
626
|
-
const de_CommandError = async (output, context) => {
|
|
627
|
-
const parsedOutput = {
|
|
628
|
-
...output,
|
|
629
|
-
body: await (0, core_1.parseJsonErrorBody)(output.body, context),
|
|
630
|
-
};
|
|
631
|
-
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
632
|
-
switch (errorCode) {
|
|
633
|
-
case "AccessDeniedException":
|
|
634
|
-
case "com.amazonaws.socialmessaging#AccessDeniedException":
|
|
635
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
636
|
-
case "DependencyException":
|
|
637
|
-
case "com.amazonaws.socialmessaging#DependencyException":
|
|
638
|
-
throw await de_DependencyExceptionRes(parsedOutput, context);
|
|
639
|
-
case "InvalidParametersException":
|
|
640
|
-
case "com.amazonaws.socialmessaging#InvalidParametersException":
|
|
641
|
-
throw await de_InvalidParametersExceptionRes(parsedOutput, context);
|
|
642
|
-
case "LimitExceededException":
|
|
643
|
-
case "com.amazonaws.socialmessaging#LimitExceededException":
|
|
644
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
645
|
-
case "ThrottledRequestException":
|
|
646
|
-
case "com.amazonaws.socialmessaging#ThrottledRequestException":
|
|
647
|
-
throw await de_ThrottledRequestExceptionRes(parsedOutput, context);
|
|
648
|
-
case "ValidationException":
|
|
649
|
-
case "com.amazonaws.socialmessaging#ValidationException":
|
|
650
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
651
|
-
case "InternalServiceException":
|
|
652
|
-
case "com.amazonaws.socialmessaging#InternalServiceException":
|
|
653
|
-
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
654
|
-
case "ResourceNotFoundException":
|
|
655
|
-
case "com.amazonaws.socialmessaging#ResourceNotFoundException":
|
|
656
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
657
|
-
case "AccessDeniedByMetaException":
|
|
658
|
-
case "com.amazonaws.socialmessaging#AccessDeniedByMetaException":
|
|
659
|
-
throw await de_AccessDeniedByMetaExceptionRes(parsedOutput, context);
|
|
660
|
-
default:
|
|
661
|
-
const parsedBody = parsedOutput.body;
|
|
662
|
-
return throwDefaultError({
|
|
663
|
-
output,
|
|
664
|
-
parsedBody,
|
|
665
|
-
errorCode,
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
};
|
|
669
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(SocialMessagingServiceException_1.SocialMessagingServiceException);
|
|
670
|
-
const de_AccessDeniedByMetaExceptionRes = async (parsedOutput, context) => {
|
|
671
|
-
const contents = (0, smithy_client_1.map)({});
|
|
672
|
-
const data = parsedOutput.body;
|
|
673
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
674
|
-
message: smithy_client_1.expectString,
|
|
675
|
-
});
|
|
676
|
-
Object.assign(contents, doc);
|
|
677
|
-
const exception = new models_0_1.AccessDeniedByMetaException({
|
|
678
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
679
|
-
...contents,
|
|
680
|
-
});
|
|
681
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
682
|
-
};
|
|
683
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
684
|
-
const contents = (0, smithy_client_1.map)({});
|
|
685
|
-
const data = parsedOutput.body;
|
|
686
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
687
|
-
message: smithy_client_1.expectString,
|
|
688
|
-
});
|
|
689
|
-
Object.assign(contents, doc);
|
|
690
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
691
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
692
|
-
...contents,
|
|
693
|
-
});
|
|
694
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
695
|
-
};
|
|
696
|
-
const de_DependencyExceptionRes = async (parsedOutput, context) => {
|
|
697
|
-
const contents = (0, smithy_client_1.map)({});
|
|
698
|
-
const data = parsedOutput.body;
|
|
699
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
700
|
-
message: smithy_client_1.expectString,
|
|
701
|
-
});
|
|
702
|
-
Object.assign(contents, doc);
|
|
703
|
-
const exception = new models_0_1.DependencyException({
|
|
704
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
705
|
-
...contents,
|
|
706
|
-
});
|
|
707
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
708
|
-
};
|
|
709
|
-
const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
710
|
-
const contents = (0, smithy_client_1.map)({});
|
|
711
|
-
const data = parsedOutput.body;
|
|
712
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
713
|
-
message: smithy_client_1.expectString,
|
|
714
|
-
});
|
|
715
|
-
Object.assign(contents, doc);
|
|
716
|
-
const exception = new models_0_1.InternalServiceException({
|
|
717
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
718
|
-
...contents,
|
|
719
|
-
});
|
|
720
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
721
|
-
};
|
|
722
|
-
const de_InvalidParametersExceptionRes = async (parsedOutput, context) => {
|
|
723
|
-
const contents = (0, smithy_client_1.map)({});
|
|
724
|
-
const data = parsedOutput.body;
|
|
725
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
726
|
-
message: smithy_client_1.expectString,
|
|
727
|
-
});
|
|
728
|
-
Object.assign(contents, doc);
|
|
729
|
-
const exception = new models_0_1.InvalidParametersException({
|
|
730
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
731
|
-
...contents,
|
|
732
|
-
});
|
|
733
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
734
|
-
};
|
|
735
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
736
|
-
const contents = (0, smithy_client_1.map)({});
|
|
737
|
-
const data = parsedOutput.body;
|
|
738
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
739
|
-
message: smithy_client_1.expectString,
|
|
740
|
-
});
|
|
741
|
-
Object.assign(contents, doc);
|
|
742
|
-
const exception = new models_0_1.LimitExceededException({
|
|
743
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
744
|
-
...contents,
|
|
745
|
-
});
|
|
746
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
747
|
-
};
|
|
748
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
749
|
-
const contents = (0, smithy_client_1.map)({});
|
|
750
|
-
const data = parsedOutput.body;
|
|
751
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
752
|
-
message: smithy_client_1.expectString,
|
|
753
|
-
});
|
|
754
|
-
Object.assign(contents, doc);
|
|
755
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
756
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
757
|
-
...contents,
|
|
758
|
-
});
|
|
759
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
760
|
-
};
|
|
761
|
-
const de_ThrottledRequestExceptionRes = async (parsedOutput, context) => {
|
|
762
|
-
const contents = (0, smithy_client_1.map)({});
|
|
763
|
-
const data = parsedOutput.body;
|
|
764
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
765
|
-
message: smithy_client_1.expectString,
|
|
766
|
-
});
|
|
767
|
-
Object.assign(contents, doc);
|
|
768
|
-
const exception = new models_0_1.ThrottledRequestException({
|
|
769
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
770
|
-
...contents,
|
|
771
|
-
});
|
|
772
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
773
|
-
};
|
|
774
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
775
|
-
const contents = (0, smithy_client_1.map)({});
|
|
776
|
-
const data = parsedOutput.body;
|
|
777
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
778
|
-
message: smithy_client_1.expectString,
|
|
779
|
-
});
|
|
780
|
-
Object.assign(contents, doc);
|
|
781
|
-
const exception = new models_0_1.ValidationException({
|
|
782
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
783
|
-
...contents,
|
|
784
|
-
});
|
|
785
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
786
|
-
};
|
|
787
|
-
const de_LinkedWhatsAppBusinessAccount = (output, context) => {
|
|
788
|
-
return (0, smithy_client_1.take)(output, {
|
|
789
|
-
arn: smithy_client_1.expectString,
|
|
790
|
-
eventDestinations: smithy_client_1._json,
|
|
791
|
-
id: smithy_client_1.expectString,
|
|
792
|
-
linkDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
793
|
-
phoneNumbers: smithy_client_1._json,
|
|
794
|
-
registrationStatus: smithy_client_1.expectString,
|
|
795
|
-
wabaId: smithy_client_1.expectString,
|
|
796
|
-
wabaName: smithy_client_1.expectString,
|
|
797
|
-
});
|
|
798
|
-
};
|
|
799
|
-
const de_LinkedWhatsAppBusinessAccountSummary = (output, context) => {
|
|
800
|
-
return (0, smithy_client_1.take)(output, {
|
|
801
|
-
arn: smithy_client_1.expectString,
|
|
802
|
-
eventDestinations: smithy_client_1._json,
|
|
803
|
-
id: smithy_client_1.expectString,
|
|
804
|
-
linkDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
805
|
-
registrationStatus: smithy_client_1.expectString,
|
|
806
|
-
wabaId: smithy_client_1.expectString,
|
|
807
|
-
wabaName: smithy_client_1.expectString,
|
|
808
|
-
});
|
|
809
|
-
};
|
|
810
|
-
const de_LinkedWhatsAppBusinessAccountSummaryList = (output, context) => {
|
|
811
|
-
const retVal = (output || [])
|
|
812
|
-
.filter((e) => e != null)
|
|
813
|
-
.map((entry) => {
|
|
814
|
-
return de_LinkedWhatsAppBusinessAccountSummary(entry, context);
|
|
815
|
-
});
|
|
816
|
-
return retVal;
|
|
817
|
-
};
|
|
818
|
-
const deserializeMetadata = (output) => ({
|
|
819
|
-
httpStatusCode: output.statusCode,
|
|
820
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
821
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
822
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
823
|
-
});
|
|
824
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
825
|
-
const _dAL = "deleteAllLanguages";
|
|
826
|
-
const _dAT = "deleteAllTemplates";
|
|
827
|
-
const _i = "id";
|
|
828
|
-
const _mI = "mediaId";
|
|
829
|
-
const _mR = "maxResults";
|
|
830
|
-
const _mTI = "metaTemplateId";
|
|
831
|
-
const _nT = "nextToken";
|
|
832
|
-
const _oPNI = "originationPhoneNumberId";
|
|
833
|
-
const _rA = "resourceArn";
|
|
834
|
-
const _tN = "templateName";
|