@aws-sdk/client-sns 3.46.0 → 3.48.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/CHANGELOG.md +36 -0
- package/dist-cjs/endpoints.js +0 -16
- package/dist-cjs/models/models_0.js +2 -195
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +10 -2
- package/dist-es/endpoints.js +0 -16
- package/dist-es/models/models_0.js +0 -128
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -4
- package/dist-types/SNSClient.d.ts +5 -1
- package/dist-types/models/models_0.d.ts +0 -192
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/SNSClient.d.ts +3 -1
- package/dist-types/ts3.4/models/models_0.d.ts +0 -128
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +35 -35
|
@@ -3,22 +3,6 @@ export var AddPermissionInput;
|
|
|
3
3
|
(function (AddPermissionInput) {
|
|
4
4
|
AddPermissionInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
5
5
|
})(AddPermissionInput || (AddPermissionInput = {}));
|
|
6
|
-
export var AuthorizationErrorException;
|
|
7
|
-
(function (AuthorizationErrorException) {
|
|
8
|
-
AuthorizationErrorException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
9
|
-
})(AuthorizationErrorException || (AuthorizationErrorException = {}));
|
|
10
|
-
export var InternalErrorException;
|
|
11
|
-
(function (InternalErrorException) {
|
|
12
|
-
InternalErrorException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
13
|
-
})(InternalErrorException || (InternalErrorException = {}));
|
|
14
|
-
export var InvalidParameterException;
|
|
15
|
-
(function (InvalidParameterException) {
|
|
16
|
-
InvalidParameterException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
17
|
-
})(InvalidParameterException || (InvalidParameterException = {}));
|
|
18
|
-
export var NotFoundException;
|
|
19
|
-
(function (NotFoundException) {
|
|
20
|
-
NotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
21
|
-
})(NotFoundException || (NotFoundException = {}));
|
|
22
6
|
export var CheckIfPhoneNumberIsOptedOutInput;
|
|
23
7
|
(function (CheckIfPhoneNumberIsOptedOutInput) {
|
|
24
8
|
CheckIfPhoneNumberIsOptedOutInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -27,10 +11,6 @@ export var CheckIfPhoneNumberIsOptedOutResponse;
|
|
|
27
11
|
(function (CheckIfPhoneNumberIsOptedOutResponse) {
|
|
28
12
|
CheckIfPhoneNumberIsOptedOutResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
29
13
|
})(CheckIfPhoneNumberIsOptedOutResponse || (CheckIfPhoneNumberIsOptedOutResponse = {}));
|
|
30
|
-
export var ThrottledException;
|
|
31
|
-
(function (ThrottledException) {
|
|
32
|
-
ThrottledException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
33
|
-
})(ThrottledException || (ThrottledException = {}));
|
|
34
14
|
export var ConfirmSubscriptionInput;
|
|
35
15
|
(function (ConfirmSubscriptionInput) {
|
|
36
16
|
ConfirmSubscriptionInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -39,14 +19,6 @@ export var ConfirmSubscriptionResponse;
|
|
|
39
19
|
(function (ConfirmSubscriptionResponse) {
|
|
40
20
|
ConfirmSubscriptionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
41
21
|
})(ConfirmSubscriptionResponse || (ConfirmSubscriptionResponse = {}));
|
|
42
|
-
export var FilterPolicyLimitExceededException;
|
|
43
|
-
(function (FilterPolicyLimitExceededException) {
|
|
44
|
-
FilterPolicyLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
45
|
-
})(FilterPolicyLimitExceededException || (FilterPolicyLimitExceededException = {}));
|
|
46
|
-
export var SubscriptionLimitExceededException;
|
|
47
|
-
(function (SubscriptionLimitExceededException) {
|
|
48
|
-
SubscriptionLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
49
|
-
})(SubscriptionLimitExceededException || (SubscriptionLimitExceededException = {}));
|
|
50
22
|
export var CreatePlatformApplicationInput;
|
|
51
23
|
(function (CreatePlatformApplicationInput) {
|
|
52
24
|
CreatePlatformApplicationInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -87,18 +59,6 @@ export var CreateSMSSandboxPhoneNumberResult;
|
|
|
87
59
|
(function (CreateSMSSandboxPhoneNumberResult) {
|
|
88
60
|
CreateSMSSandboxPhoneNumberResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
89
61
|
})(CreateSMSSandboxPhoneNumberResult || (CreateSMSSandboxPhoneNumberResult = {}));
|
|
90
|
-
export var OptedOutException;
|
|
91
|
-
(function (OptedOutException) {
|
|
92
|
-
OptedOutException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
93
|
-
})(OptedOutException || (OptedOutException = {}));
|
|
94
|
-
export var UserErrorException;
|
|
95
|
-
(function (UserErrorException) {
|
|
96
|
-
UserErrorException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
97
|
-
})(UserErrorException || (UserErrorException = {}));
|
|
98
|
-
export var ConcurrentAccessException;
|
|
99
|
-
(function (ConcurrentAccessException) {
|
|
100
|
-
ConcurrentAccessException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
101
|
-
})(ConcurrentAccessException || (ConcurrentAccessException = {}));
|
|
102
62
|
export var Tag;
|
|
103
63
|
(function (Tag) {
|
|
104
64
|
Tag.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -111,26 +71,6 @@ export var CreateTopicResponse;
|
|
|
111
71
|
(function (CreateTopicResponse) {
|
|
112
72
|
CreateTopicResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
113
73
|
})(CreateTopicResponse || (CreateTopicResponse = {}));
|
|
114
|
-
export var InvalidSecurityException;
|
|
115
|
-
(function (InvalidSecurityException) {
|
|
116
|
-
InvalidSecurityException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
117
|
-
})(InvalidSecurityException || (InvalidSecurityException = {}));
|
|
118
|
-
export var StaleTagException;
|
|
119
|
-
(function (StaleTagException) {
|
|
120
|
-
StaleTagException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
121
|
-
})(StaleTagException || (StaleTagException = {}));
|
|
122
|
-
export var TagLimitExceededException;
|
|
123
|
-
(function (TagLimitExceededException) {
|
|
124
|
-
TagLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
125
|
-
})(TagLimitExceededException || (TagLimitExceededException = {}));
|
|
126
|
-
export var TagPolicyException;
|
|
127
|
-
(function (TagPolicyException) {
|
|
128
|
-
TagPolicyException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
129
|
-
})(TagPolicyException || (TagPolicyException = {}));
|
|
130
|
-
export var TopicLimitExceededException;
|
|
131
|
-
(function (TopicLimitExceededException) {
|
|
132
|
-
TopicLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
133
|
-
})(TopicLimitExceededException || (TopicLimitExceededException = {}));
|
|
134
74
|
export var DeleteEndpointInput;
|
|
135
75
|
(function (DeleteEndpointInput) {
|
|
136
76
|
DeleteEndpointInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -147,10 +87,6 @@ export var DeleteSMSSandboxPhoneNumberResult;
|
|
|
147
87
|
(function (DeleteSMSSandboxPhoneNumberResult) {
|
|
148
88
|
DeleteSMSSandboxPhoneNumberResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
149
89
|
})(DeleteSMSSandboxPhoneNumberResult || (DeleteSMSSandboxPhoneNumberResult = {}));
|
|
150
|
-
export var ResourceNotFoundException;
|
|
151
|
-
(function (ResourceNotFoundException) {
|
|
152
|
-
ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
153
|
-
})(ResourceNotFoundException || (ResourceNotFoundException = {}));
|
|
154
90
|
export var DeleteTopicInput;
|
|
155
91
|
(function (DeleteTopicInput) {
|
|
156
92
|
DeleteTopicInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -239,10 +175,6 @@ export var ListOriginationNumbersResult;
|
|
|
239
175
|
(function (ListOriginationNumbersResult) {
|
|
240
176
|
ListOriginationNumbersResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
241
177
|
})(ListOriginationNumbersResult || (ListOriginationNumbersResult = {}));
|
|
242
|
-
export var ValidationException;
|
|
243
|
-
(function (ValidationException) {
|
|
244
|
-
ValidationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
245
|
-
})(ValidationException || (ValidationException = {}));
|
|
246
178
|
export var ListPhoneNumbersOptedOutInput;
|
|
247
179
|
(function (ListPhoneNumbersOptedOutInput) {
|
|
248
180
|
ListPhoneNumbersOptedOutInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -328,42 +260,6 @@ export var OptInPhoneNumberResponse;
|
|
|
328
260
|
(function (OptInPhoneNumberResponse) {
|
|
329
261
|
OptInPhoneNumberResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
330
262
|
})(OptInPhoneNumberResponse || (OptInPhoneNumberResponse = {}));
|
|
331
|
-
export var EndpointDisabledException;
|
|
332
|
-
(function (EndpointDisabledException) {
|
|
333
|
-
EndpointDisabledException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
334
|
-
})(EndpointDisabledException || (EndpointDisabledException = {}));
|
|
335
|
-
export var InvalidParameterValueException;
|
|
336
|
-
(function (InvalidParameterValueException) {
|
|
337
|
-
InvalidParameterValueException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
338
|
-
})(InvalidParameterValueException || (InvalidParameterValueException = {}));
|
|
339
|
-
export var KMSAccessDeniedException;
|
|
340
|
-
(function (KMSAccessDeniedException) {
|
|
341
|
-
KMSAccessDeniedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
342
|
-
})(KMSAccessDeniedException || (KMSAccessDeniedException = {}));
|
|
343
|
-
export var KMSDisabledException;
|
|
344
|
-
(function (KMSDisabledException) {
|
|
345
|
-
KMSDisabledException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
346
|
-
})(KMSDisabledException || (KMSDisabledException = {}));
|
|
347
|
-
export var KMSInvalidStateException;
|
|
348
|
-
(function (KMSInvalidStateException) {
|
|
349
|
-
KMSInvalidStateException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
350
|
-
})(KMSInvalidStateException || (KMSInvalidStateException = {}));
|
|
351
|
-
export var KMSNotFoundException;
|
|
352
|
-
(function (KMSNotFoundException) {
|
|
353
|
-
KMSNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
354
|
-
})(KMSNotFoundException || (KMSNotFoundException = {}));
|
|
355
|
-
export var KMSOptInRequired;
|
|
356
|
-
(function (KMSOptInRequired) {
|
|
357
|
-
KMSOptInRequired.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
358
|
-
})(KMSOptInRequired || (KMSOptInRequired = {}));
|
|
359
|
-
export var KMSThrottlingException;
|
|
360
|
-
(function (KMSThrottlingException) {
|
|
361
|
-
KMSThrottlingException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
362
|
-
})(KMSThrottlingException || (KMSThrottlingException = {}));
|
|
363
|
-
export var PlatformApplicationDisabledException;
|
|
364
|
-
(function (PlatformApplicationDisabledException) {
|
|
365
|
-
PlatformApplicationDisabledException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
366
|
-
})(PlatformApplicationDisabledException || (PlatformApplicationDisabledException = {}));
|
|
367
263
|
export var MessageAttributeValue;
|
|
368
264
|
(function (MessageAttributeValue) {
|
|
369
265
|
MessageAttributeValue.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -376,22 +272,6 @@ export var PublishResponse;
|
|
|
376
272
|
(function (PublishResponse) {
|
|
377
273
|
PublishResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
378
274
|
})(PublishResponse || (PublishResponse = {}));
|
|
379
|
-
export var BatchEntryIdsNotDistinctException;
|
|
380
|
-
(function (BatchEntryIdsNotDistinctException) {
|
|
381
|
-
BatchEntryIdsNotDistinctException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
382
|
-
})(BatchEntryIdsNotDistinctException || (BatchEntryIdsNotDistinctException = {}));
|
|
383
|
-
export var BatchRequestTooLongException;
|
|
384
|
-
(function (BatchRequestTooLongException) {
|
|
385
|
-
BatchRequestTooLongException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
386
|
-
})(BatchRequestTooLongException || (BatchRequestTooLongException = {}));
|
|
387
|
-
export var EmptyBatchRequestException;
|
|
388
|
-
(function (EmptyBatchRequestException) {
|
|
389
|
-
EmptyBatchRequestException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
390
|
-
})(EmptyBatchRequestException || (EmptyBatchRequestException = {}));
|
|
391
|
-
export var InvalidBatchEntryIdException;
|
|
392
|
-
(function (InvalidBatchEntryIdException) {
|
|
393
|
-
InvalidBatchEntryIdException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
394
|
-
})(InvalidBatchEntryIdException || (InvalidBatchEntryIdException = {}));
|
|
395
275
|
export var PublishBatchRequestEntry;
|
|
396
276
|
(function (PublishBatchRequestEntry) {
|
|
397
277
|
PublishBatchRequestEntry.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -412,10 +292,6 @@ export var PublishBatchResponse;
|
|
|
412
292
|
(function (PublishBatchResponse) {
|
|
413
293
|
PublishBatchResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
414
294
|
})(PublishBatchResponse || (PublishBatchResponse = {}));
|
|
415
|
-
export var TooManyEntriesInBatchRequestException;
|
|
416
|
-
(function (TooManyEntriesInBatchRequestException) {
|
|
417
|
-
TooManyEntriesInBatchRequestException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
418
|
-
})(TooManyEntriesInBatchRequestException || (TooManyEntriesInBatchRequestException = {}));
|
|
419
295
|
export var RemovePermissionInput;
|
|
420
296
|
(function (RemovePermissionInput) {
|
|
421
297
|
RemovePermissionInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -472,10 +348,6 @@ export var UntagResourceResponse;
|
|
|
472
348
|
(function (UntagResourceResponse) {
|
|
473
349
|
UntagResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
474
350
|
})(UntagResourceResponse || (UntagResourceResponse = {}));
|
|
475
|
-
export var VerificationException;
|
|
476
|
-
(function (VerificationException) {
|
|
477
|
-
VerificationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
478
|
-
})(VerificationException || (VerificationException = {}));
|
|
479
351
|
export var VerifySMSSandboxPhoneNumberInput;
|
|
480
352
|
(function (VerifySMSSandboxPhoneNumberInput) {
|
|
481
353
|
VerifySMSSandboxPhoneNumberInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
4
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
5
|
-
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
6
6
|
import { invalidProvider } from "@aws-sdk/invalid-dependency";
|
|
7
7
|
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
|
|
8
8
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
|
|
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
|
|
|
10
10
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
11
11
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
12
12
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
13
15
|
export var getRuntimeConfig = function (config) {
|
|
14
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
18
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
15
19
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new
|
|
20
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
21
|
+
switch (_a.label) {
|
|
22
|
+
case 0: return [4, defaultConfigProvider()];
|
|
23
|
+
case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
|
|
24
|
+
}
|
|
25
|
+
}); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
17
26
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
4
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
5
5
|
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
6
6
|
import { Hash } from "@aws-sdk/hash-node";
|
|
7
|
-
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
|
|
7
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
|
|
8
8
|
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
|
|
9
|
-
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
10
10
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
|
|
11
11
|
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
|
|
12
12
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
13
13
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
|
|
14
14
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
15
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
15
17
|
export var getRuntimeConfig = function (config) {
|
|
16
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
19
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
17
21
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
18
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new
|
|
22
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
23
|
+
switch (_a.label) {
|
|
24
|
+
case 0: return [4, defaultConfigProvider()];
|
|
25
|
+
case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
|
|
26
|
+
}
|
|
27
|
+
}); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
19
28
|
};
|
|
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
|
|
|
4
4
|
import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
|
|
5
5
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
6
6
|
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
7
|
-
import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
7
|
+
import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
8
8
|
import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
9
9
|
import { AddPermissionCommandInput, AddPermissionCommandOutput } from "./commands/AddPermissionCommand";
|
|
10
10
|
import { CheckIfPhoneNumberIsOptedOutCommandInput, CheckIfPhoneNumberIsOptedOutCommandOutput } from "./commands/CheckIfPhoneNumberIsOptedOutCommand";
|
|
@@ -148,6 +148,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
148
148
|
* @internal
|
|
149
149
|
*/
|
|
150
150
|
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
151
|
+
/**
|
|
152
|
+
* The {@link DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
153
|
+
*/
|
|
154
|
+
defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
|
|
151
155
|
}
|
|
152
156
|
declare type SNSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
|
|
153
157
|
/**
|