@aws-sdk/client-socialmessaging 3.669.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/LICENSE +201 -0
- package/README.md +334 -0
- package/dist-cjs/SocialMessaging.js +37 -0
- package/dist-cjs/SocialMessagingClient.js +50 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/AssociateWhatsAppBusinessAccountCommand.js +27 -0
- package/dist-cjs/commands/DeleteWhatsAppMessageMediaCommand.js +26 -0
- package/dist-cjs/commands/DisassociateWhatsAppBusinessAccountCommand.js +26 -0
- package/dist-cjs/commands/GetLinkedWhatsAppBusinessAccountCommand.js +26 -0
- package/dist-cjs/commands/GetLinkedWhatsAppBusinessAccountPhoneNumberCommand.js +26 -0
- package/dist-cjs/commands/GetWhatsAppMessageMediaCommand.js +27 -0
- package/dist-cjs/commands/ListLinkedWhatsAppBusinessAccountsCommand.js +26 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +26 -0
- package/dist-cjs/commands/PostWhatsAppMessageMediaCommand.js +27 -0
- package/dist-cjs/commands/PutWhatsAppBusinessAccountEventDestinationsCommand.js +26 -0
- package/dist-cjs/commands/SendWhatsAppMessageCommand.js +27 -0
- package/dist-cjs/commands/TagResourceCommand.js +26 -0
- package/dist-cjs/commands/UntagResourceCommand.js +26 -0
- package/dist-cjs/commands/index.js +16 -0
- package/dist-cjs/endpoint/EndpointParameters.js +18 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/SocialMessagingServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +173 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListLinkedWhatsAppBusinessAccountsPaginator.js +7 -0
- package/dist-cjs/pagination/index.js +5 -0
- package/dist-cjs/protocols/Aws_restJson1.js +573 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +34 -0
- package/dist-cjs/runtimeExtensions.js +25 -0
- package/dist-es/SocialMessaging.js +33 -0
- package/dist-es/SocialMessagingClient.js +46 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/AssociateWhatsAppBusinessAccountCommand.js +23 -0
- package/dist-es/commands/DeleteWhatsAppMessageMediaCommand.js +22 -0
- package/dist-es/commands/DisassociateWhatsAppBusinessAccountCommand.js +22 -0
- package/dist-es/commands/GetLinkedWhatsAppBusinessAccountCommand.js +22 -0
- package/dist-es/commands/GetLinkedWhatsAppBusinessAccountPhoneNumberCommand.js +22 -0
- package/dist-es/commands/GetWhatsAppMessageMediaCommand.js +23 -0
- package/dist-es/commands/ListLinkedWhatsAppBusinessAccountsCommand.js +22 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +22 -0
- package/dist-es/commands/PostWhatsAppMessageMediaCommand.js +23 -0
- package/dist-es/commands/PutWhatsAppBusinessAccountEventDestinationsCommand.js +22 -0
- package/dist-es/commands/SendWhatsAppMessageCommand.js +23 -0
- package/dist-es/commands/TagResourceCommand.js +22 -0
- package/dist-es/commands/UntagResourceCommand.js +22 -0
- package/dist-es/commands/index.js +13 -0
- package/dist-es/endpoint/EndpointParameters.js +14 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/SocialMessagingServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +152 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListLinkedWhatsAppBusinessAccountsPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +544 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +30 -0
- package/dist-es/runtimeExtensions.js +21 -0
- package/dist-types/SocialMessaging.d.ts +128 -0
- package/dist-types/SocialMessagingClient.d.ts +207 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/dist-types/commands/AssociateWhatsAppBusinessAccountCommand.d.ts +139 -0
- package/dist-types/commands/DeleteWhatsAppMessageMediaCommand.d.ts +97 -0
- package/dist-types/commands/DisassociateWhatsAppBusinessAccountCommand.d.ts +87 -0
- package/dist-types/commands/GetLinkedWhatsAppBusinessAccountCommand.d.ts +116 -0
- package/dist-types/commands/GetLinkedWhatsAppBusinessAccountPhoneNumberCommand.d.ts +103 -0
- package/dist-types/commands/GetWhatsAppMessageMediaCommand.d.ts +113 -0
- package/dist-types/commands/ListLinkedWhatsAppBusinessAccountsCommand.d.ts +106 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +93 -0
- package/dist-types/commands/PostWhatsAppMessageMediaCommand.d.ts +110 -0
- package/dist-types/commands/PutWhatsAppBusinessAccountEventDestinationsCommand.d.ts +90 -0
- package/dist-types/commands/SendWhatsAppMessageCommand.d.ts +99 -0
- package/dist-types/commands/TagResourceCommand.d.ts +94 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +90 -0
- package/dist-types/commands/index.d.ts +13 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +39 -0
- package/dist-types/models/SocialMessagingServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +969 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListLinkedWhatsAppBusinessAccountsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +119 -0
- package/dist-types/runtimeConfig.browser.d.ts +48 -0
- package/dist-types/runtimeConfig.d.ts +48 -0
- package/dist-types/runtimeConfig.native.d.ts +47 -0
- package/dist-types/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/SocialMessaging.d.ts +254 -0
- package/dist-types/ts3.4/SocialMessagingClient.d.ts +197 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
- package/dist-types/ts3.4/commands/AssociateWhatsAppBusinessAccountCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeleteWhatsAppMessageMediaCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DisassociateWhatsAppBusinessAccountCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetLinkedWhatsAppBusinessAccountCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetLinkedWhatsAppBusinessAccountPhoneNumberCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetWhatsAppMessageMediaCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListLinkedWhatsAppBusinessAccountsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/PostWhatsAppMessageMediaCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/PutWhatsAppBusinessAccountEventDestinationsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/SendWhatsAppMessageCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/index.d.ts +13 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +9 -0
- package/dist-types/ts3.4/models/SocialMessagingServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +272 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListLinkedWhatsAppBusinessAccountsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +161 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +96 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +23 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/package.json +101 -0
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SendWhatsAppMessageCommand = exports.de_PutWhatsAppBusinessAccountEventDestinationsCommand = exports.de_PostWhatsAppMessageMediaCommand = exports.de_ListTagsForResourceCommand = exports.de_ListLinkedWhatsAppBusinessAccountsCommand = exports.de_GetWhatsAppMessageMediaCommand = exports.de_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = exports.de_GetLinkedWhatsAppBusinessAccountCommand = exports.de_DisassociateWhatsAppBusinessAccountCommand = exports.de_DeleteWhatsAppMessageMediaCommand = exports.de_AssociateWhatsAppBusinessAccountCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SendWhatsAppMessageCommand = exports.se_PutWhatsAppBusinessAccountEventDestinationsCommand = exports.se_PostWhatsAppMessageMediaCommand = exports.se_ListTagsForResourceCommand = exports.se_ListLinkedWhatsAppBusinessAccountsCommand = exports.se_GetWhatsAppMessageMediaCommand = exports.se_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = exports.se_GetLinkedWhatsAppBusinessAccountCommand = exports.se_DisassociateWhatsAppBusinessAccountCommand = exports.se_DeleteWhatsAppMessageMediaCommand = 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_DeleteWhatsAppMessageMediaCommand = async (input, context) => {
|
|
25
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
26
|
+
const headers = {};
|
|
27
|
+
b.bp("/v1/whatsapp/media");
|
|
28
|
+
const query = (0, smithy_client_1.map)({
|
|
29
|
+
[_mI]: [, (0, smithy_client_1.expectNonNull)(input[_mI], `mediaId`)],
|
|
30
|
+
[_oPNI]: [, (0, smithy_client_1.expectNonNull)(input[_oPNI], `originationPhoneNumberId`)],
|
|
31
|
+
});
|
|
32
|
+
let body;
|
|
33
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
34
|
+
return b.build();
|
|
35
|
+
};
|
|
36
|
+
exports.se_DeleteWhatsAppMessageMediaCommand = se_DeleteWhatsAppMessageMediaCommand;
|
|
37
|
+
const se_DisassociateWhatsAppBusinessAccountCommand = async (input, context) => {
|
|
38
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
39
|
+
const headers = {};
|
|
40
|
+
b.bp("/v1/whatsapp/waba/disassociate");
|
|
41
|
+
const query = (0, smithy_client_1.map)({
|
|
42
|
+
[_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `id`)],
|
|
43
|
+
});
|
|
44
|
+
let body;
|
|
45
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
46
|
+
return b.build();
|
|
47
|
+
};
|
|
48
|
+
exports.se_DisassociateWhatsAppBusinessAccountCommand = se_DisassociateWhatsAppBusinessAccountCommand;
|
|
49
|
+
const se_GetLinkedWhatsAppBusinessAccountCommand = async (input, context) => {
|
|
50
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
51
|
+
const headers = {};
|
|
52
|
+
b.bp("/v1/whatsapp/waba/details");
|
|
53
|
+
const query = (0, smithy_client_1.map)({
|
|
54
|
+
[_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `id`)],
|
|
55
|
+
});
|
|
56
|
+
let body;
|
|
57
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
58
|
+
return b.build();
|
|
59
|
+
};
|
|
60
|
+
exports.se_GetLinkedWhatsAppBusinessAccountCommand = se_GetLinkedWhatsAppBusinessAccountCommand;
|
|
61
|
+
const se_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = async (input, context) => {
|
|
62
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
63
|
+
const headers = {};
|
|
64
|
+
b.bp("/v1/whatsapp/waba/phone/details");
|
|
65
|
+
const query = (0, smithy_client_1.map)({
|
|
66
|
+
[_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `id`)],
|
|
67
|
+
});
|
|
68
|
+
let body;
|
|
69
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
70
|
+
return b.build();
|
|
71
|
+
};
|
|
72
|
+
exports.se_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = se_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand;
|
|
73
|
+
const se_GetWhatsAppMessageMediaCommand = async (input, context) => {
|
|
74
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
75
|
+
const headers = {
|
|
76
|
+
"content-type": "application/json",
|
|
77
|
+
};
|
|
78
|
+
b.bp("/v1/whatsapp/media/get");
|
|
79
|
+
let body;
|
|
80
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
81
|
+
destinationS3File: (_) => (0, smithy_client_1._json)(_),
|
|
82
|
+
destinationS3PresignedUrl: (_) => (0, smithy_client_1._json)(_),
|
|
83
|
+
mediaId: [],
|
|
84
|
+
metadataOnly: [],
|
|
85
|
+
originationPhoneNumberId: [],
|
|
86
|
+
}));
|
|
87
|
+
b.m("POST").h(headers).b(body);
|
|
88
|
+
return b.build();
|
|
89
|
+
};
|
|
90
|
+
exports.se_GetWhatsAppMessageMediaCommand = se_GetWhatsAppMessageMediaCommand;
|
|
91
|
+
const se_ListLinkedWhatsAppBusinessAccountsCommand = async (input, context) => {
|
|
92
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
93
|
+
const headers = {};
|
|
94
|
+
b.bp("/v1/whatsapp/waba/list");
|
|
95
|
+
const query = (0, smithy_client_1.map)({
|
|
96
|
+
[_nT]: [, input[_nT]],
|
|
97
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
98
|
+
});
|
|
99
|
+
let body;
|
|
100
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
101
|
+
return b.build();
|
|
102
|
+
};
|
|
103
|
+
exports.se_ListLinkedWhatsAppBusinessAccountsCommand = se_ListLinkedWhatsAppBusinessAccountsCommand;
|
|
104
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
105
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
106
|
+
const headers = {};
|
|
107
|
+
b.bp("/v1/tags/list");
|
|
108
|
+
const query = (0, smithy_client_1.map)({
|
|
109
|
+
[_rA]: [, (0, smithy_client_1.expectNonNull)(input[_rA], `resourceArn`)],
|
|
110
|
+
});
|
|
111
|
+
let body;
|
|
112
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
113
|
+
return b.build();
|
|
114
|
+
};
|
|
115
|
+
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
116
|
+
const se_PostWhatsAppMessageMediaCommand = async (input, context) => {
|
|
117
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
118
|
+
const headers = {
|
|
119
|
+
"content-type": "application/json",
|
|
120
|
+
};
|
|
121
|
+
b.bp("/v1/whatsapp/media");
|
|
122
|
+
let body;
|
|
123
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
124
|
+
originationPhoneNumberId: [],
|
|
125
|
+
sourceS3File: (_) => (0, smithy_client_1._json)(_),
|
|
126
|
+
sourceS3PresignedUrl: (_) => (0, smithy_client_1._json)(_),
|
|
127
|
+
}));
|
|
128
|
+
b.m("POST").h(headers).b(body);
|
|
129
|
+
return b.build();
|
|
130
|
+
};
|
|
131
|
+
exports.se_PostWhatsAppMessageMediaCommand = se_PostWhatsAppMessageMediaCommand;
|
|
132
|
+
const se_PutWhatsAppBusinessAccountEventDestinationsCommand = async (input, context) => {
|
|
133
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
134
|
+
const headers = {
|
|
135
|
+
"content-type": "application/json",
|
|
136
|
+
};
|
|
137
|
+
b.bp("/v1/whatsapp/waba/eventdestinations");
|
|
138
|
+
let body;
|
|
139
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
140
|
+
eventDestinations: (_) => (0, smithy_client_1._json)(_),
|
|
141
|
+
id: [],
|
|
142
|
+
}));
|
|
143
|
+
b.m("PUT").h(headers).b(body);
|
|
144
|
+
return b.build();
|
|
145
|
+
};
|
|
146
|
+
exports.se_PutWhatsAppBusinessAccountEventDestinationsCommand = se_PutWhatsAppBusinessAccountEventDestinationsCommand;
|
|
147
|
+
const se_SendWhatsAppMessageCommand = async (input, context) => {
|
|
148
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
149
|
+
const headers = {
|
|
150
|
+
"content-type": "application/json",
|
|
151
|
+
};
|
|
152
|
+
b.bp("/v1/whatsapp/send");
|
|
153
|
+
let body;
|
|
154
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
155
|
+
message: (_) => context.base64Encoder(_),
|
|
156
|
+
metaApiVersion: [],
|
|
157
|
+
originationPhoneNumberId: [],
|
|
158
|
+
}));
|
|
159
|
+
b.m("POST").h(headers).b(body);
|
|
160
|
+
return b.build();
|
|
161
|
+
};
|
|
162
|
+
exports.se_SendWhatsAppMessageCommand = se_SendWhatsAppMessageCommand;
|
|
163
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
164
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
165
|
+
const headers = {
|
|
166
|
+
"content-type": "application/json",
|
|
167
|
+
};
|
|
168
|
+
b.bp("/v1/tags/tag-resource");
|
|
169
|
+
let body;
|
|
170
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
171
|
+
resourceArn: [],
|
|
172
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
173
|
+
}));
|
|
174
|
+
b.m("POST").h(headers).b(body);
|
|
175
|
+
return b.build();
|
|
176
|
+
};
|
|
177
|
+
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
178
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
179
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
180
|
+
const headers = {
|
|
181
|
+
"content-type": "application/json",
|
|
182
|
+
};
|
|
183
|
+
b.bp("/v1/tags/untag-resource");
|
|
184
|
+
let body;
|
|
185
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
186
|
+
resourceArn: [],
|
|
187
|
+
tagKeys: (_) => (0, smithy_client_1._json)(_),
|
|
188
|
+
}));
|
|
189
|
+
b.m("POST").h(headers).b(body);
|
|
190
|
+
return b.build();
|
|
191
|
+
};
|
|
192
|
+
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
193
|
+
const de_AssociateWhatsAppBusinessAccountCommand = async (output, context) => {
|
|
194
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
195
|
+
return de_CommandError(output, context);
|
|
196
|
+
}
|
|
197
|
+
const contents = (0, smithy_client_1.map)({
|
|
198
|
+
$metadata: deserializeMetadata(output),
|
|
199
|
+
});
|
|
200
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
201
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
202
|
+
signupCallbackResult: smithy_client_1._json,
|
|
203
|
+
statusCode: smithy_client_1.expectInt32,
|
|
204
|
+
});
|
|
205
|
+
Object.assign(contents, doc);
|
|
206
|
+
return contents;
|
|
207
|
+
};
|
|
208
|
+
exports.de_AssociateWhatsAppBusinessAccountCommand = de_AssociateWhatsAppBusinessAccountCommand;
|
|
209
|
+
const de_DeleteWhatsAppMessageMediaCommand = async (output, context) => {
|
|
210
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
211
|
+
return de_CommandError(output, context);
|
|
212
|
+
}
|
|
213
|
+
const contents = (0, smithy_client_1.map)({
|
|
214
|
+
$metadata: deserializeMetadata(output),
|
|
215
|
+
});
|
|
216
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
217
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
218
|
+
success: smithy_client_1.expectBoolean,
|
|
219
|
+
});
|
|
220
|
+
Object.assign(contents, doc);
|
|
221
|
+
return contents;
|
|
222
|
+
};
|
|
223
|
+
exports.de_DeleteWhatsAppMessageMediaCommand = de_DeleteWhatsAppMessageMediaCommand;
|
|
224
|
+
const de_DisassociateWhatsAppBusinessAccountCommand = async (output, context) => {
|
|
225
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
226
|
+
return de_CommandError(output, context);
|
|
227
|
+
}
|
|
228
|
+
const contents = (0, smithy_client_1.map)({
|
|
229
|
+
$metadata: deserializeMetadata(output),
|
|
230
|
+
});
|
|
231
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
232
|
+
return contents;
|
|
233
|
+
};
|
|
234
|
+
exports.de_DisassociateWhatsAppBusinessAccountCommand = de_DisassociateWhatsAppBusinessAccountCommand;
|
|
235
|
+
const de_GetLinkedWhatsAppBusinessAccountCommand = async (output, context) => {
|
|
236
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
237
|
+
return de_CommandError(output, context);
|
|
238
|
+
}
|
|
239
|
+
const contents = (0, smithy_client_1.map)({
|
|
240
|
+
$metadata: deserializeMetadata(output),
|
|
241
|
+
});
|
|
242
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
243
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
244
|
+
account: (_) => de_LinkedWhatsAppBusinessAccount(_, context),
|
|
245
|
+
});
|
|
246
|
+
Object.assign(contents, doc);
|
|
247
|
+
return contents;
|
|
248
|
+
};
|
|
249
|
+
exports.de_GetLinkedWhatsAppBusinessAccountCommand = de_GetLinkedWhatsAppBusinessAccountCommand;
|
|
250
|
+
const de_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = async (output, context) => {
|
|
251
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
252
|
+
return de_CommandError(output, context);
|
|
253
|
+
}
|
|
254
|
+
const contents = (0, smithy_client_1.map)({
|
|
255
|
+
$metadata: deserializeMetadata(output),
|
|
256
|
+
});
|
|
257
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
258
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
259
|
+
linkedWhatsAppBusinessAccountId: smithy_client_1.expectString,
|
|
260
|
+
phoneNumber: smithy_client_1._json,
|
|
261
|
+
});
|
|
262
|
+
Object.assign(contents, doc);
|
|
263
|
+
return contents;
|
|
264
|
+
};
|
|
265
|
+
exports.de_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = de_GetLinkedWhatsAppBusinessAccountPhoneNumberCommand;
|
|
266
|
+
const de_GetWhatsAppMessageMediaCommand = async (output, context) => {
|
|
267
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
268
|
+
return de_CommandError(output, context);
|
|
269
|
+
}
|
|
270
|
+
const contents = (0, smithy_client_1.map)({
|
|
271
|
+
$metadata: deserializeMetadata(output),
|
|
272
|
+
});
|
|
273
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
274
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
275
|
+
fileSize: smithy_client_1.expectLong,
|
|
276
|
+
mimeType: smithy_client_1.expectString,
|
|
277
|
+
});
|
|
278
|
+
Object.assign(contents, doc);
|
|
279
|
+
return contents;
|
|
280
|
+
};
|
|
281
|
+
exports.de_GetWhatsAppMessageMediaCommand = de_GetWhatsAppMessageMediaCommand;
|
|
282
|
+
const de_ListLinkedWhatsAppBusinessAccountsCommand = async (output, context) => {
|
|
283
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
284
|
+
return de_CommandError(output, context);
|
|
285
|
+
}
|
|
286
|
+
const contents = (0, smithy_client_1.map)({
|
|
287
|
+
$metadata: deserializeMetadata(output),
|
|
288
|
+
});
|
|
289
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
290
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
291
|
+
linkedAccounts: (_) => de_LinkedWhatsAppBusinessAccountSummaryList(_, context),
|
|
292
|
+
nextToken: smithy_client_1.expectString,
|
|
293
|
+
});
|
|
294
|
+
Object.assign(contents, doc);
|
|
295
|
+
return contents;
|
|
296
|
+
};
|
|
297
|
+
exports.de_ListLinkedWhatsAppBusinessAccountsCommand = de_ListLinkedWhatsAppBusinessAccountsCommand;
|
|
298
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
299
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
300
|
+
return de_CommandError(output, context);
|
|
301
|
+
}
|
|
302
|
+
const contents = (0, smithy_client_1.map)({
|
|
303
|
+
$metadata: deserializeMetadata(output),
|
|
304
|
+
});
|
|
305
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
306
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
307
|
+
statusCode: smithy_client_1.expectInt32,
|
|
308
|
+
tags: smithy_client_1._json,
|
|
309
|
+
});
|
|
310
|
+
Object.assign(contents, doc);
|
|
311
|
+
return contents;
|
|
312
|
+
};
|
|
313
|
+
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
314
|
+
const de_PostWhatsAppMessageMediaCommand = async (output, context) => {
|
|
315
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
316
|
+
return de_CommandError(output, context);
|
|
317
|
+
}
|
|
318
|
+
const contents = (0, smithy_client_1.map)({
|
|
319
|
+
$metadata: deserializeMetadata(output),
|
|
320
|
+
});
|
|
321
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
322
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
323
|
+
mediaId: smithy_client_1.expectString,
|
|
324
|
+
});
|
|
325
|
+
Object.assign(contents, doc);
|
|
326
|
+
return contents;
|
|
327
|
+
};
|
|
328
|
+
exports.de_PostWhatsAppMessageMediaCommand = de_PostWhatsAppMessageMediaCommand;
|
|
329
|
+
const de_PutWhatsAppBusinessAccountEventDestinationsCommand = async (output, context) => {
|
|
330
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
331
|
+
return de_CommandError(output, context);
|
|
332
|
+
}
|
|
333
|
+
const contents = (0, smithy_client_1.map)({
|
|
334
|
+
$metadata: deserializeMetadata(output),
|
|
335
|
+
});
|
|
336
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
337
|
+
return contents;
|
|
338
|
+
};
|
|
339
|
+
exports.de_PutWhatsAppBusinessAccountEventDestinationsCommand = de_PutWhatsAppBusinessAccountEventDestinationsCommand;
|
|
340
|
+
const de_SendWhatsAppMessageCommand = async (output, context) => {
|
|
341
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
342
|
+
return de_CommandError(output, context);
|
|
343
|
+
}
|
|
344
|
+
const contents = (0, smithy_client_1.map)({
|
|
345
|
+
$metadata: deserializeMetadata(output),
|
|
346
|
+
});
|
|
347
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
348
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
349
|
+
messageId: smithy_client_1.expectString,
|
|
350
|
+
});
|
|
351
|
+
Object.assign(contents, doc);
|
|
352
|
+
return contents;
|
|
353
|
+
};
|
|
354
|
+
exports.de_SendWhatsAppMessageCommand = de_SendWhatsAppMessageCommand;
|
|
355
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
356
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
357
|
+
return de_CommandError(output, context);
|
|
358
|
+
}
|
|
359
|
+
const contents = (0, smithy_client_1.map)({
|
|
360
|
+
$metadata: deserializeMetadata(output),
|
|
361
|
+
});
|
|
362
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
363
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
364
|
+
statusCode: smithy_client_1.expectInt32,
|
|
365
|
+
});
|
|
366
|
+
Object.assign(contents, doc);
|
|
367
|
+
return contents;
|
|
368
|
+
};
|
|
369
|
+
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
370
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
371
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
372
|
+
return de_CommandError(output, context);
|
|
373
|
+
}
|
|
374
|
+
const contents = (0, smithy_client_1.map)({
|
|
375
|
+
$metadata: deserializeMetadata(output),
|
|
376
|
+
});
|
|
377
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
378
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
379
|
+
statusCode: smithy_client_1.expectInt32,
|
|
380
|
+
});
|
|
381
|
+
Object.assign(contents, doc);
|
|
382
|
+
return contents;
|
|
383
|
+
};
|
|
384
|
+
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
385
|
+
const de_CommandError = async (output, context) => {
|
|
386
|
+
const parsedOutput = {
|
|
387
|
+
...output,
|
|
388
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context),
|
|
389
|
+
};
|
|
390
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
391
|
+
switch (errorCode) {
|
|
392
|
+
case "AccessDeniedException":
|
|
393
|
+
case "com.amazonaws.socialmessaging#AccessDeniedException":
|
|
394
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
395
|
+
case "DependencyException":
|
|
396
|
+
case "com.amazonaws.socialmessaging#DependencyException":
|
|
397
|
+
throw await de_DependencyExceptionRes(parsedOutput, context);
|
|
398
|
+
case "InvalidParametersException":
|
|
399
|
+
case "com.amazonaws.socialmessaging#InvalidParametersException":
|
|
400
|
+
throw await de_InvalidParametersExceptionRes(parsedOutput, context);
|
|
401
|
+
case "ThrottledRequestException":
|
|
402
|
+
case "com.amazonaws.socialmessaging#ThrottledRequestException":
|
|
403
|
+
throw await de_ThrottledRequestExceptionRes(parsedOutput, context);
|
|
404
|
+
case "ValidationException":
|
|
405
|
+
case "com.amazonaws.socialmessaging#ValidationException":
|
|
406
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
407
|
+
case "AccessDeniedByMetaException":
|
|
408
|
+
case "com.amazonaws.socialmessaging#AccessDeniedByMetaException":
|
|
409
|
+
throw await de_AccessDeniedByMetaExceptionRes(parsedOutput, context);
|
|
410
|
+
case "InternalServiceException":
|
|
411
|
+
case "com.amazonaws.socialmessaging#InternalServiceException":
|
|
412
|
+
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
413
|
+
case "ResourceNotFoundException":
|
|
414
|
+
case "com.amazonaws.socialmessaging#ResourceNotFoundException":
|
|
415
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
416
|
+
default:
|
|
417
|
+
const parsedBody = parsedOutput.body;
|
|
418
|
+
return throwDefaultError({
|
|
419
|
+
output,
|
|
420
|
+
parsedBody,
|
|
421
|
+
errorCode,
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(SocialMessagingServiceException_1.SocialMessagingServiceException);
|
|
426
|
+
const de_AccessDeniedByMetaExceptionRes = async (parsedOutput, context) => {
|
|
427
|
+
const contents = (0, smithy_client_1.map)({});
|
|
428
|
+
const data = parsedOutput.body;
|
|
429
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
430
|
+
message: smithy_client_1.expectString,
|
|
431
|
+
});
|
|
432
|
+
Object.assign(contents, doc);
|
|
433
|
+
const exception = new models_0_1.AccessDeniedByMetaException({
|
|
434
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
435
|
+
...contents,
|
|
436
|
+
});
|
|
437
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
438
|
+
};
|
|
439
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
440
|
+
const contents = (0, smithy_client_1.map)({});
|
|
441
|
+
const data = parsedOutput.body;
|
|
442
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
443
|
+
message: smithy_client_1.expectString,
|
|
444
|
+
});
|
|
445
|
+
Object.assign(contents, doc);
|
|
446
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
447
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
448
|
+
...contents,
|
|
449
|
+
});
|
|
450
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
451
|
+
};
|
|
452
|
+
const de_DependencyExceptionRes = async (parsedOutput, context) => {
|
|
453
|
+
const contents = (0, smithy_client_1.map)({});
|
|
454
|
+
const data = parsedOutput.body;
|
|
455
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
456
|
+
message: smithy_client_1.expectString,
|
|
457
|
+
});
|
|
458
|
+
Object.assign(contents, doc);
|
|
459
|
+
const exception = new models_0_1.DependencyException({
|
|
460
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
461
|
+
...contents,
|
|
462
|
+
});
|
|
463
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
464
|
+
};
|
|
465
|
+
const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
466
|
+
const contents = (0, smithy_client_1.map)({});
|
|
467
|
+
const data = parsedOutput.body;
|
|
468
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
469
|
+
message: smithy_client_1.expectString,
|
|
470
|
+
});
|
|
471
|
+
Object.assign(contents, doc);
|
|
472
|
+
const exception = new models_0_1.InternalServiceException({
|
|
473
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
474
|
+
...contents,
|
|
475
|
+
});
|
|
476
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
477
|
+
};
|
|
478
|
+
const de_InvalidParametersExceptionRes = async (parsedOutput, context) => {
|
|
479
|
+
const contents = (0, smithy_client_1.map)({});
|
|
480
|
+
const data = parsedOutput.body;
|
|
481
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
482
|
+
message: smithy_client_1.expectString,
|
|
483
|
+
});
|
|
484
|
+
Object.assign(contents, doc);
|
|
485
|
+
const exception = new models_0_1.InvalidParametersException({
|
|
486
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
487
|
+
...contents,
|
|
488
|
+
});
|
|
489
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
490
|
+
};
|
|
491
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
492
|
+
const contents = (0, smithy_client_1.map)({});
|
|
493
|
+
const data = parsedOutput.body;
|
|
494
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
495
|
+
message: smithy_client_1.expectString,
|
|
496
|
+
});
|
|
497
|
+
Object.assign(contents, doc);
|
|
498
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
499
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
500
|
+
...contents,
|
|
501
|
+
});
|
|
502
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
503
|
+
};
|
|
504
|
+
const de_ThrottledRequestExceptionRes = async (parsedOutput, context) => {
|
|
505
|
+
const contents = (0, smithy_client_1.map)({});
|
|
506
|
+
const data = parsedOutput.body;
|
|
507
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
508
|
+
message: smithy_client_1.expectString,
|
|
509
|
+
});
|
|
510
|
+
Object.assign(contents, doc);
|
|
511
|
+
const exception = new models_0_1.ThrottledRequestException({
|
|
512
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
513
|
+
...contents,
|
|
514
|
+
});
|
|
515
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
516
|
+
};
|
|
517
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
518
|
+
const contents = (0, smithy_client_1.map)({});
|
|
519
|
+
const data = parsedOutput.body;
|
|
520
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
521
|
+
message: smithy_client_1.expectString,
|
|
522
|
+
});
|
|
523
|
+
Object.assign(contents, doc);
|
|
524
|
+
const exception = new models_0_1.ValidationException({
|
|
525
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
526
|
+
...contents,
|
|
527
|
+
});
|
|
528
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
529
|
+
};
|
|
530
|
+
const de_LinkedWhatsAppBusinessAccount = (output, context) => {
|
|
531
|
+
return (0, smithy_client_1.take)(output, {
|
|
532
|
+
arn: smithy_client_1.expectString,
|
|
533
|
+
eventDestinations: smithy_client_1._json,
|
|
534
|
+
id: smithy_client_1.expectString,
|
|
535
|
+
linkDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
536
|
+
phoneNumbers: smithy_client_1._json,
|
|
537
|
+
registrationStatus: smithy_client_1.expectString,
|
|
538
|
+
wabaId: smithy_client_1.expectString,
|
|
539
|
+
wabaName: smithy_client_1.expectString,
|
|
540
|
+
});
|
|
541
|
+
};
|
|
542
|
+
const de_LinkedWhatsAppBusinessAccountSummary = (output, context) => {
|
|
543
|
+
return (0, smithy_client_1.take)(output, {
|
|
544
|
+
arn: smithy_client_1.expectString,
|
|
545
|
+
eventDestinations: smithy_client_1._json,
|
|
546
|
+
id: smithy_client_1.expectString,
|
|
547
|
+
linkDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
548
|
+
registrationStatus: smithy_client_1.expectString,
|
|
549
|
+
wabaId: smithy_client_1.expectString,
|
|
550
|
+
wabaName: smithy_client_1.expectString,
|
|
551
|
+
});
|
|
552
|
+
};
|
|
553
|
+
const de_LinkedWhatsAppBusinessAccountSummaryList = (output, context) => {
|
|
554
|
+
const retVal = (output || [])
|
|
555
|
+
.filter((e) => e != null)
|
|
556
|
+
.map((entry) => {
|
|
557
|
+
return de_LinkedWhatsAppBusinessAccountSummary(entry, context);
|
|
558
|
+
});
|
|
559
|
+
return retVal;
|
|
560
|
+
};
|
|
561
|
+
const deserializeMetadata = (output) => ({
|
|
562
|
+
httpStatusCode: output.statusCode,
|
|
563
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
564
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
565
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
566
|
+
});
|
|
567
|
+
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
568
|
+
const _i = "id";
|
|
569
|
+
const _mI = "mediaId";
|
|
570
|
+
const _mR = "maxResults";
|
|
571
|
+
const _nT = "nextToken";
|
|
572
|
+
const _oPNI = "originationPhoneNumberId";
|
|
573
|
+
const _rA = "resourceArn";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
+
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
|
+
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
8
|
+
const config_resolver_1 = require("@smithy/config-resolver");
|
|
9
|
+
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
10
|
+
const invalid_dependency_1 = require("@smithy/invalid-dependency");
|
|
11
|
+
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
12
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
13
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
14
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
15
|
+
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
|
|
16
|
+
const getRuntimeConfig = (config) => {
|
|
17
|
+
const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
|
|
18
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
19
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
20
|
+
return {
|
|
21
|
+
...clientSharedValues,
|
|
22
|
+
...config,
|
|
23
|
+
runtime: "browser",
|
|
24
|
+
defaultsMode,
|
|
25
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
|
26
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
28
|
+
(0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
30
|
+
region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
|
|
31
|
+
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
32
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
|
33
|
+
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
34
|
+
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
35
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
36
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
+
const core_1 = require("@aws-sdk/core");
|
|
7
|
+
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
8
|
+
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
9
|
+
const config_resolver_1 = require("@smithy/config-resolver");
|
|
10
|
+
const hash_node_1 = require("@smithy/hash-node");
|
|
11
|
+
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
12
|
+
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
13
|
+
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
14
|
+
const util_body_length_node_1 = require("@smithy/util-body-length-node");
|
|
15
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
16
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
17
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
18
|
+
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
|
|
19
|
+
const smithy_client_2 = require("@smithy/smithy-client");
|
|
20
|
+
const getRuntimeConfig = (config) => {
|
|
21
|
+
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
|
22
|
+
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
|
23
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
24
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
25
|
+
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
|
|
26
|
+
return {
|
|
27
|
+
...clientSharedValues,
|
|
28
|
+
...config,
|
|
29
|
+
runtime: "node",
|
|
30
|
+
defaultsMode,
|
|
31
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
32
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
|
|
33
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
34
|
+
(0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
35
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
36
|
+
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
37
|
+
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
38
|
+
retryMode: config?.retryMode ??
|
|
39
|
+
(0, node_config_provider_1.loadConfig)({
|
|
40
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
41
|
+
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
|
|
42
|
+
}),
|
|
43
|
+
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
44
|
+
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
45
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
46
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
47
|
+
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS),
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
+
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
6
|
+
const getRuntimeConfig = (config) => {
|
|
7
|
+
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
|
|
8
|
+
return {
|
|
9
|
+
...browserDefaults,
|
|
10
|
+
...config,
|
|
11
|
+
runtime: "react-native",
|
|
12
|
+
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|