@aws-sdk/client-pinpoint 3.42.0 → 3.47.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 +50 -0
- package/dist-cjs/Pinpoint.js +30 -0
- package/dist-cjs/commands/SendOTPMessageCommand.js +36 -0
- package/dist-cjs/commands/VerifyOTPMessageCommand.js +36 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +5 -53
- package/dist-cjs/models/models_1.js +44 -2
- package/dist-cjs/protocols/Aws_restJson1.js +294 -4
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +9 -3
- package/dist-es/Pinpoint.js +30 -0
- package/dist-es/commands/SendOTPMessageCommand.js +39 -0
- package/dist-es/commands/VerifyOTPMessageCommand.js +39 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +0 -32
- package/dist-es/models/models_1.js +28 -0
- package/dist-es/protocols/Aws_restJson1.js +310 -0
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -6
- package/dist-types/Pinpoint.d.ts +14 -0
- package/dist-types/PinpointClient.d.ts +9 -3
- package/dist-types/commands/SendOTPMessageCommand.d.ts +35 -0
- package/dist-types/commands/VerifyOTPMessageCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +0 -48
- package/dist-types/models/models_1.d.ts +149 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
- 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/Pinpoint.d.ts +10 -0
- package/dist-types/ts3.4/PinpointClient.d.ts +7 -3
- package/dist-types/ts3.4/commands/SendOTPMessageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/VerifyOTPMessageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -32
- package/dist-types/ts3.4/models/models_1.d.ts +87 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
- 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 +38 -45
|
@@ -329,10 +329,6 @@ export var AttributesResource;
|
|
|
329
329
|
(function (AttributesResource) {
|
|
330
330
|
AttributesResource.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
331
331
|
})(AttributesResource || (AttributesResource = {}));
|
|
332
|
-
export var BadRequestException;
|
|
333
|
-
(function (BadRequestException) {
|
|
334
|
-
BadRequestException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
335
|
-
})(BadRequestException || (BadRequestException = {}));
|
|
336
332
|
export var BaiduChannelRequest;
|
|
337
333
|
(function (BaiduChannelRequest) {
|
|
338
334
|
BaiduChannelRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -481,10 +477,6 @@ export var ChannelsResponse;
|
|
|
481
477
|
(function (ChannelsResponse) {
|
|
482
478
|
ChannelsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
483
479
|
})(ChannelsResponse || (ChannelsResponse = {}));
|
|
484
|
-
export var ConflictException;
|
|
485
|
-
(function (ConflictException) {
|
|
486
|
-
ConflictException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
487
|
-
})(ConflictException || (ConflictException = {}));
|
|
488
480
|
export var CreateApplicationRequest;
|
|
489
481
|
(function (CreateApplicationRequest) {
|
|
490
482
|
CreateApplicationRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -497,30 +489,6 @@ export var CreateAppResponse;
|
|
|
497
489
|
(function (CreateAppResponse) {
|
|
498
490
|
CreateAppResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
499
491
|
})(CreateAppResponse || (CreateAppResponse = {}));
|
|
500
|
-
export var ForbiddenException;
|
|
501
|
-
(function (ForbiddenException) {
|
|
502
|
-
ForbiddenException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
503
|
-
})(ForbiddenException || (ForbiddenException = {}));
|
|
504
|
-
export var InternalServerErrorException;
|
|
505
|
-
(function (InternalServerErrorException) {
|
|
506
|
-
InternalServerErrorException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
507
|
-
})(InternalServerErrorException || (InternalServerErrorException = {}));
|
|
508
|
-
export var MethodNotAllowedException;
|
|
509
|
-
(function (MethodNotAllowedException) {
|
|
510
|
-
MethodNotAllowedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
511
|
-
})(MethodNotAllowedException || (MethodNotAllowedException = {}));
|
|
512
|
-
export var NotFoundException;
|
|
513
|
-
(function (NotFoundException) {
|
|
514
|
-
NotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
515
|
-
})(NotFoundException || (NotFoundException = {}));
|
|
516
|
-
export var PayloadTooLargeException;
|
|
517
|
-
(function (PayloadTooLargeException) {
|
|
518
|
-
PayloadTooLargeException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
519
|
-
})(PayloadTooLargeException || (PayloadTooLargeException = {}));
|
|
520
|
-
export var TooManyRequestsException;
|
|
521
|
-
(function (TooManyRequestsException) {
|
|
522
|
-
TooManyRequestsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
523
|
-
})(TooManyRequestsException || (TooManyRequestsException = {}));
|
|
524
492
|
export var WriteTreatmentResource;
|
|
525
493
|
(function (WriteTreatmentResource) {
|
|
526
494
|
WriteTreatmentResource.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -403,6 +403,18 @@ export var SendMessagesResponse;
|
|
|
403
403
|
(function (SendMessagesResponse) {
|
|
404
404
|
SendMessagesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
405
405
|
})(SendMessagesResponse || (SendMessagesResponse = {}));
|
|
406
|
+
export var SendOTPMessageRequestParameters;
|
|
407
|
+
(function (SendOTPMessageRequestParameters) {
|
|
408
|
+
SendOTPMessageRequestParameters.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
409
|
+
})(SendOTPMessageRequestParameters || (SendOTPMessageRequestParameters = {}));
|
|
410
|
+
export var SendOTPMessageRequest;
|
|
411
|
+
(function (SendOTPMessageRequest) {
|
|
412
|
+
SendOTPMessageRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
413
|
+
})(SendOTPMessageRequest || (SendOTPMessageRequest = {}));
|
|
414
|
+
export var SendOTPMessageResponse;
|
|
415
|
+
(function (SendOTPMessageResponse) {
|
|
416
|
+
SendOTPMessageResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
417
|
+
})(SendOTPMessageResponse || (SendOTPMessageResponse = {}));
|
|
406
418
|
export var SendUsersMessageRequest;
|
|
407
419
|
(function (SendUsersMessageRequest) {
|
|
408
420
|
SendUsersMessageRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -639,3 +651,19 @@ export var UpdateVoiceTemplateResponse;
|
|
|
639
651
|
(function (UpdateVoiceTemplateResponse) {
|
|
640
652
|
UpdateVoiceTemplateResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
641
653
|
})(UpdateVoiceTemplateResponse || (UpdateVoiceTemplateResponse = {}));
|
|
654
|
+
export var VerifyOTPMessageRequestParameters;
|
|
655
|
+
(function (VerifyOTPMessageRequestParameters) {
|
|
656
|
+
VerifyOTPMessageRequestParameters.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
657
|
+
})(VerifyOTPMessageRequestParameters || (VerifyOTPMessageRequestParameters = {}));
|
|
658
|
+
export var VerifyOTPMessageRequest;
|
|
659
|
+
(function (VerifyOTPMessageRequest) {
|
|
660
|
+
VerifyOTPMessageRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
661
|
+
})(VerifyOTPMessageRequest || (VerifyOTPMessageRequest = {}));
|
|
662
|
+
export var VerificationResponse;
|
|
663
|
+
(function (VerificationResponse) {
|
|
664
|
+
VerificationResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
665
|
+
})(VerificationResponse || (VerificationResponse = {}));
|
|
666
|
+
export var VerifyOTPMessageResponse;
|
|
667
|
+
(function (VerifyOTPMessageResponse) {
|
|
668
|
+
VerifyOTPMessageResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
669
|
+
})(VerifyOTPMessageResponse || (VerifyOTPMessageResponse = {}));
|
|
@@ -3299,6 +3299,46 @@ export var serializeAws_restJson1SendMessagesCommand = function (input, context)
|
|
|
3299
3299
|
}
|
|
3300
3300
|
});
|
|
3301
3301
|
}); };
|
|
3302
|
+
export var serializeAws_restJson1SendOTPMessageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3303
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
3304
|
+
return __generator(this, function (_c) {
|
|
3305
|
+
switch (_c.label) {
|
|
3306
|
+
case 0: return [4, context.endpoint()];
|
|
3307
|
+
case 1:
|
|
3308
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3309
|
+
headers = {
|
|
3310
|
+
"content-type": "application/json",
|
|
3311
|
+
};
|
|
3312
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/apps/{ApplicationId}/otp";
|
|
3313
|
+
if (input.ApplicationId !== undefined) {
|
|
3314
|
+
labelValue = input.ApplicationId;
|
|
3315
|
+
if (labelValue.length <= 0) {
|
|
3316
|
+
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
3317
|
+
}
|
|
3318
|
+
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
3319
|
+
}
|
|
3320
|
+
else {
|
|
3321
|
+
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
3322
|
+
}
|
|
3323
|
+
if (input.SendOTPMessageRequestParameters !== undefined) {
|
|
3324
|
+
body = serializeAws_restJson1SendOTPMessageRequestParameters(input.SendOTPMessageRequestParameters, context);
|
|
3325
|
+
}
|
|
3326
|
+
if (body === undefined) {
|
|
3327
|
+
body = {};
|
|
3328
|
+
}
|
|
3329
|
+
body = JSON.stringify(body);
|
|
3330
|
+
return [2, new __HttpRequest({
|
|
3331
|
+
protocol: protocol,
|
|
3332
|
+
hostname: hostname,
|
|
3333
|
+
port: port,
|
|
3334
|
+
method: "POST",
|
|
3335
|
+
headers: headers,
|
|
3336
|
+
path: resolvedPath,
|
|
3337
|
+
body: body,
|
|
3338
|
+
})];
|
|
3339
|
+
}
|
|
3340
|
+
});
|
|
3341
|
+
}); };
|
|
3302
3342
|
export var serializeAws_restJson1SendUsersMessagesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3303
3343
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
3304
3344
|
return __generator(this, function (_c) {
|
|
@@ -4451,6 +4491,46 @@ export var serializeAws_restJson1UpdateVoiceTemplateCommand = function (input, c
|
|
|
4451
4491
|
}
|
|
4452
4492
|
});
|
|
4453
4493
|
}); };
|
|
4494
|
+
export var serializeAws_restJson1VerifyOTPMessageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4495
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
4496
|
+
return __generator(this, function (_c) {
|
|
4497
|
+
switch (_c.label) {
|
|
4498
|
+
case 0: return [4, context.endpoint()];
|
|
4499
|
+
case 1:
|
|
4500
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
4501
|
+
headers = {
|
|
4502
|
+
"content-type": "application/json",
|
|
4503
|
+
};
|
|
4504
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/apps/{ApplicationId}/verify-otp";
|
|
4505
|
+
if (input.ApplicationId !== undefined) {
|
|
4506
|
+
labelValue = input.ApplicationId;
|
|
4507
|
+
if (labelValue.length <= 0) {
|
|
4508
|
+
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
4509
|
+
}
|
|
4510
|
+
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
4511
|
+
}
|
|
4512
|
+
else {
|
|
4513
|
+
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
4514
|
+
}
|
|
4515
|
+
if (input.VerifyOTPMessageRequestParameters !== undefined) {
|
|
4516
|
+
body = serializeAws_restJson1VerifyOTPMessageRequestParameters(input.VerifyOTPMessageRequestParameters, context);
|
|
4517
|
+
}
|
|
4518
|
+
if (body === undefined) {
|
|
4519
|
+
body = {};
|
|
4520
|
+
}
|
|
4521
|
+
body = JSON.stringify(body);
|
|
4522
|
+
return [2, new __HttpRequest({
|
|
4523
|
+
protocol: protocol,
|
|
4524
|
+
hostname: hostname,
|
|
4525
|
+
port: port,
|
|
4526
|
+
method: "POST",
|
|
4527
|
+
headers: headers,
|
|
4528
|
+
path: resolvedPath,
|
|
4529
|
+
body: body,
|
|
4530
|
+
})];
|
|
4531
|
+
}
|
|
4532
|
+
});
|
|
4533
|
+
}); };
|
|
4454
4534
|
export var deserializeAws_restJson1CreateAppCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4455
4535
|
var contents, data, _a;
|
|
4456
4536
|
return __generator(this, function (_b) {
|
|
@@ -13925,6 +14005,113 @@ var deserializeAws_restJson1SendMessagesCommandError = function (output, context
|
|
|
13925
14005
|
}
|
|
13926
14006
|
});
|
|
13927
14007
|
}); };
|
|
14008
|
+
export var deserializeAws_restJson1SendOTPMessageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14009
|
+
var contents, data, _a;
|
|
14010
|
+
return __generator(this, function (_b) {
|
|
14011
|
+
switch (_b.label) {
|
|
14012
|
+
case 0:
|
|
14013
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14014
|
+
return [2, deserializeAws_restJson1SendOTPMessageCommandError(output, context)];
|
|
14015
|
+
}
|
|
14016
|
+
contents = {
|
|
14017
|
+
$metadata: deserializeMetadata(output),
|
|
14018
|
+
MessageResponse: undefined,
|
|
14019
|
+
};
|
|
14020
|
+
_a = __expectObject;
|
|
14021
|
+
return [4, parseBody(output.body, context)];
|
|
14022
|
+
case 1:
|
|
14023
|
+
data = _a.apply(void 0, [_b.sent()]);
|
|
14024
|
+
contents.MessageResponse = deserializeAws_restJson1MessageResponse(data, context);
|
|
14025
|
+
return [2, Promise.resolve(contents)];
|
|
14026
|
+
}
|
|
14027
|
+
});
|
|
14028
|
+
}); };
|
|
14029
|
+
var deserializeAws_restJson1SendOTPMessageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14030
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
14031
|
+
var _k;
|
|
14032
|
+
return __generator(this, function (_l) {
|
|
14033
|
+
switch (_l.label) {
|
|
14034
|
+
case 0:
|
|
14035
|
+
_a = [__assign({}, output)];
|
|
14036
|
+
_k = {};
|
|
14037
|
+
return [4, parseBody(output.body, context)];
|
|
14038
|
+
case 1:
|
|
14039
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
14040
|
+
errorCode = "UnknownError";
|
|
14041
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14042
|
+
_b = errorCode;
|
|
14043
|
+
switch (_b) {
|
|
14044
|
+
case "BadRequestException": return [3, 2];
|
|
14045
|
+
case "com.amazonaws.pinpoint#BadRequestException": return [3, 2];
|
|
14046
|
+
case "ForbiddenException": return [3, 4];
|
|
14047
|
+
case "com.amazonaws.pinpoint#ForbiddenException": return [3, 4];
|
|
14048
|
+
case "InternalServerErrorException": return [3, 6];
|
|
14049
|
+
case "com.amazonaws.pinpoint#InternalServerErrorException": return [3, 6];
|
|
14050
|
+
case "MethodNotAllowedException": return [3, 8];
|
|
14051
|
+
case "com.amazonaws.pinpoint#MethodNotAllowedException": return [3, 8];
|
|
14052
|
+
case "NotFoundException": return [3, 10];
|
|
14053
|
+
case "com.amazonaws.pinpoint#NotFoundException": return [3, 10];
|
|
14054
|
+
case "PayloadTooLargeException": return [3, 12];
|
|
14055
|
+
case "com.amazonaws.pinpoint#PayloadTooLargeException": return [3, 12];
|
|
14056
|
+
case "TooManyRequestsException": return [3, 14];
|
|
14057
|
+
case "com.amazonaws.pinpoint#TooManyRequestsException": return [3, 14];
|
|
14058
|
+
}
|
|
14059
|
+
return [3, 16];
|
|
14060
|
+
case 2:
|
|
14061
|
+
_c = [{}];
|
|
14062
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
14063
|
+
case 3:
|
|
14064
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14065
|
+
return [3, 17];
|
|
14066
|
+
case 4:
|
|
14067
|
+
_d = [{}];
|
|
14068
|
+
return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
14069
|
+
case 5:
|
|
14070
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14071
|
+
return [3, 17];
|
|
14072
|
+
case 6:
|
|
14073
|
+
_e = [{}];
|
|
14074
|
+
return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
14075
|
+
case 7:
|
|
14076
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14077
|
+
return [3, 17];
|
|
14078
|
+
case 8:
|
|
14079
|
+
_f = [{}];
|
|
14080
|
+
return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
14081
|
+
case 9:
|
|
14082
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14083
|
+
return [3, 17];
|
|
14084
|
+
case 10:
|
|
14085
|
+
_g = [{}];
|
|
14086
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
14087
|
+
case 11:
|
|
14088
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14089
|
+
return [3, 17];
|
|
14090
|
+
case 12:
|
|
14091
|
+
_h = [{}];
|
|
14092
|
+
return [4, deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context)];
|
|
14093
|
+
case 13:
|
|
14094
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14095
|
+
return [3, 17];
|
|
14096
|
+
case 14:
|
|
14097
|
+
_j = [{}];
|
|
14098
|
+
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
14099
|
+
case 15:
|
|
14100
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14101
|
+
return [3, 17];
|
|
14102
|
+
case 16:
|
|
14103
|
+
parsedBody = parsedOutput.body;
|
|
14104
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14105
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14106
|
+
_l.label = 17;
|
|
14107
|
+
case 17:
|
|
14108
|
+
message = response.message || response.Message || errorCode;
|
|
14109
|
+
response.message = message;
|
|
14110
|
+
delete response.Message;
|
|
14111
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14112
|
+
}
|
|
14113
|
+
});
|
|
14114
|
+
}); };
|
|
13928
14115
|
export var deserializeAws_restJson1SendUsersMessagesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13929
14116
|
var contents, data, _a;
|
|
13930
14117
|
return __generator(this, function (_b) {
|
|
@@ -16696,6 +16883,113 @@ var deserializeAws_restJson1UpdateVoiceTemplateCommandError = function (output,
|
|
|
16696
16883
|
}
|
|
16697
16884
|
});
|
|
16698
16885
|
}); };
|
|
16886
|
+
export var deserializeAws_restJson1VerifyOTPMessageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16887
|
+
var contents, data, _a;
|
|
16888
|
+
return __generator(this, function (_b) {
|
|
16889
|
+
switch (_b.label) {
|
|
16890
|
+
case 0:
|
|
16891
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
16892
|
+
return [2, deserializeAws_restJson1VerifyOTPMessageCommandError(output, context)];
|
|
16893
|
+
}
|
|
16894
|
+
contents = {
|
|
16895
|
+
$metadata: deserializeMetadata(output),
|
|
16896
|
+
VerificationResponse: undefined,
|
|
16897
|
+
};
|
|
16898
|
+
_a = __expectObject;
|
|
16899
|
+
return [4, parseBody(output.body, context)];
|
|
16900
|
+
case 1:
|
|
16901
|
+
data = _a.apply(void 0, [_b.sent()]);
|
|
16902
|
+
contents.VerificationResponse = deserializeAws_restJson1VerificationResponse(data, context);
|
|
16903
|
+
return [2, Promise.resolve(contents)];
|
|
16904
|
+
}
|
|
16905
|
+
});
|
|
16906
|
+
}); };
|
|
16907
|
+
var deserializeAws_restJson1VerifyOTPMessageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16908
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
16909
|
+
var _k;
|
|
16910
|
+
return __generator(this, function (_l) {
|
|
16911
|
+
switch (_l.label) {
|
|
16912
|
+
case 0:
|
|
16913
|
+
_a = [__assign({}, output)];
|
|
16914
|
+
_k = {};
|
|
16915
|
+
return [4, parseBody(output.body, context)];
|
|
16916
|
+
case 1:
|
|
16917
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
16918
|
+
errorCode = "UnknownError";
|
|
16919
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
16920
|
+
_b = errorCode;
|
|
16921
|
+
switch (_b) {
|
|
16922
|
+
case "BadRequestException": return [3, 2];
|
|
16923
|
+
case "com.amazonaws.pinpoint#BadRequestException": return [3, 2];
|
|
16924
|
+
case "ForbiddenException": return [3, 4];
|
|
16925
|
+
case "com.amazonaws.pinpoint#ForbiddenException": return [3, 4];
|
|
16926
|
+
case "InternalServerErrorException": return [3, 6];
|
|
16927
|
+
case "com.amazonaws.pinpoint#InternalServerErrorException": return [3, 6];
|
|
16928
|
+
case "MethodNotAllowedException": return [3, 8];
|
|
16929
|
+
case "com.amazonaws.pinpoint#MethodNotAllowedException": return [3, 8];
|
|
16930
|
+
case "NotFoundException": return [3, 10];
|
|
16931
|
+
case "com.amazonaws.pinpoint#NotFoundException": return [3, 10];
|
|
16932
|
+
case "PayloadTooLargeException": return [3, 12];
|
|
16933
|
+
case "com.amazonaws.pinpoint#PayloadTooLargeException": return [3, 12];
|
|
16934
|
+
case "TooManyRequestsException": return [3, 14];
|
|
16935
|
+
case "com.amazonaws.pinpoint#TooManyRequestsException": return [3, 14];
|
|
16936
|
+
}
|
|
16937
|
+
return [3, 16];
|
|
16938
|
+
case 2:
|
|
16939
|
+
_c = [{}];
|
|
16940
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
16941
|
+
case 3:
|
|
16942
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16943
|
+
return [3, 17];
|
|
16944
|
+
case 4:
|
|
16945
|
+
_d = [{}];
|
|
16946
|
+
return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
16947
|
+
case 5:
|
|
16948
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16949
|
+
return [3, 17];
|
|
16950
|
+
case 6:
|
|
16951
|
+
_e = [{}];
|
|
16952
|
+
return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
16953
|
+
case 7:
|
|
16954
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16955
|
+
return [3, 17];
|
|
16956
|
+
case 8:
|
|
16957
|
+
_f = [{}];
|
|
16958
|
+
return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
16959
|
+
case 9:
|
|
16960
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16961
|
+
return [3, 17];
|
|
16962
|
+
case 10:
|
|
16963
|
+
_g = [{}];
|
|
16964
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
16965
|
+
case 11:
|
|
16966
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16967
|
+
return [3, 17];
|
|
16968
|
+
case 12:
|
|
16969
|
+
_h = [{}];
|
|
16970
|
+
return [4, deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context)];
|
|
16971
|
+
case 13:
|
|
16972
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16973
|
+
return [3, 17];
|
|
16974
|
+
case 14:
|
|
16975
|
+
_j = [{}];
|
|
16976
|
+
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
16977
|
+
case 15:
|
|
16978
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16979
|
+
return [3, 17];
|
|
16980
|
+
case 16:
|
|
16981
|
+
parsedBody = parsedOutput.body;
|
|
16982
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
16983
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
16984
|
+
_l.label = 17;
|
|
16985
|
+
case 17:
|
|
16986
|
+
message = response.message || response.Message || errorCode;
|
|
16987
|
+
response.message = message;
|
|
16988
|
+
delete response.Message;
|
|
16989
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
16990
|
+
}
|
|
16991
|
+
});
|
|
16992
|
+
}); };
|
|
16699
16993
|
var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16700
16994
|
var contents, data;
|
|
16701
16995
|
return __generator(this, function (_a) {
|
|
@@ -17659,6 +17953,13 @@ var serializeAws_restJson1SegmentLocation = function (input, context) {
|
|
|
17659
17953
|
var serializeAws_restJson1SegmentReference = function (input, context) {
|
|
17660
17954
|
return __assign(__assign({}, (input.Id !== undefined && input.Id !== null && { Id: input.Id })), (input.Version !== undefined && input.Version !== null && { Version: input.Version }));
|
|
17661
17955
|
};
|
|
17956
|
+
var serializeAws_restJson1SendOTPMessageRequestParameters = function (input, context) {
|
|
17957
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AllowedAttempts !== undefined &&
|
|
17958
|
+
input.AllowedAttempts !== null && { AllowedAttempts: input.AllowedAttempts })), (input.BrandName !== undefined && input.BrandName !== null && { BrandName: input.BrandName })), (input.Channel !== undefined && input.Channel !== null && { Channel: input.Channel })), (input.CodeLength !== undefined && input.CodeLength !== null && { CodeLength: input.CodeLength })), (input.DestinationIdentity !== undefined &&
|
|
17959
|
+
input.DestinationIdentity !== null && { DestinationIdentity: input.DestinationIdentity })), (input.EntityId !== undefined && input.EntityId !== null && { EntityId: input.EntityId })), (input.Language !== undefined && input.Language !== null && { Language: input.Language })), (input.OriginationIdentity !== undefined &&
|
|
17960
|
+
input.OriginationIdentity !== null && { OriginationIdentity: input.OriginationIdentity })), (input.ReferenceId !== undefined && input.ReferenceId !== null && { ReferenceId: input.ReferenceId })), (input.TemplateId !== undefined && input.TemplateId !== null && { TemplateId: input.TemplateId })), (input.ValidityPeriod !== undefined &&
|
|
17961
|
+
input.ValidityPeriod !== null && { ValidityPeriod: input.ValidityPeriod }));
|
|
17962
|
+
};
|
|
17662
17963
|
var serializeAws_restJson1SendUsersMessageRequest = function (input, context) {
|
|
17663
17964
|
return __assign(__assign(__assign(__assign(__assign({}, (input.Context !== undefined &&
|
|
17664
17965
|
input.Context !== null && { Context: serializeAws_restJson1MapOf__string(input.Context, context) })), (input.MessageConfiguration !== undefined &&
|
|
@@ -17768,6 +18069,10 @@ var serializeAws_restJson1UpdateRecommenderConfigurationShape = function (input,
|
|
|
17768
18069
|
input.RecommendationsDisplayName !== null && { RecommendationsDisplayName: input.RecommendationsDisplayName })), (input.RecommendationsPerMessage !== undefined &&
|
|
17769
18070
|
input.RecommendationsPerMessage !== null && { RecommendationsPerMessage: input.RecommendationsPerMessage }));
|
|
17770
18071
|
};
|
|
18072
|
+
var serializeAws_restJson1VerifyOTPMessageRequestParameters = function (input, context) {
|
|
18073
|
+
return __assign(__assign(__assign({}, (input.DestinationIdentity !== undefined &&
|
|
18074
|
+
input.DestinationIdentity !== null && { DestinationIdentity: input.DestinationIdentity })), (input.Otp !== undefined && input.Otp !== null && { Otp: input.Otp })), (input.ReferenceId !== undefined && input.ReferenceId !== null && { ReferenceId: input.ReferenceId }));
|
|
18075
|
+
};
|
|
17771
18076
|
var serializeAws_restJson1VoiceChannelRequest = function (input, context) {
|
|
17772
18077
|
return __assign({}, (input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }));
|
|
17773
18078
|
};
|
|
@@ -19843,6 +20148,11 @@ var deserializeAws_restJson1TreatmentResource = function (output, context) {
|
|
|
19843
20148
|
TreatmentName: __expectString(output.TreatmentName),
|
|
19844
20149
|
};
|
|
19845
20150
|
};
|
|
20151
|
+
var deserializeAws_restJson1VerificationResponse = function (output, context) {
|
|
20152
|
+
return {
|
|
20153
|
+
Valid: __expectBoolean(output.Valid),
|
|
20154
|
+
};
|
|
20155
|
+
};
|
|
19846
20156
|
var deserializeAws_restJson1VoiceChannelResponse = function (output, context) {
|
|
19847
20157
|
return {
|
|
19848
20158
|
ApplicationId: __expectString(output.ApplicationId),
|
|
@@ -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,21 +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 {
|
|
15
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
16
17
|
export var getRuntimeConfig = function (config) {
|
|
17
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
18
|
-
|
|
19
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
19
21
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
-
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 });
|
|
21
28
|
};
|
package/dist-types/Pinpoint.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ import { PutEventsCommandInput, PutEventsCommandOutput } from "./commands/PutEve
|
|
|
89
89
|
import { PutEventStreamCommandInput, PutEventStreamCommandOutput } from "./commands/PutEventStreamCommand";
|
|
90
90
|
import { RemoveAttributesCommandInput, RemoveAttributesCommandOutput } from "./commands/RemoveAttributesCommand";
|
|
91
91
|
import { SendMessagesCommandInput, SendMessagesCommandOutput } from "./commands/SendMessagesCommand";
|
|
92
|
+
import { SendOTPMessageCommandInput, SendOTPMessageCommandOutput } from "./commands/SendOTPMessageCommand";
|
|
92
93
|
import { SendUsersMessagesCommandInput, SendUsersMessagesCommandOutput } from "./commands/SendUsersMessagesCommand";
|
|
93
94
|
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
94
95
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
@@ -116,6 +117,7 @@ import { UpdateSmsTemplateCommandInput, UpdateSmsTemplateCommandOutput } from ".
|
|
|
116
117
|
import { UpdateTemplateActiveVersionCommandInput, UpdateTemplateActiveVersionCommandOutput } from "./commands/UpdateTemplateActiveVersionCommand";
|
|
117
118
|
import { UpdateVoiceChannelCommandInput, UpdateVoiceChannelCommandOutput } from "./commands/UpdateVoiceChannelCommand";
|
|
118
119
|
import { UpdateVoiceTemplateCommandInput, UpdateVoiceTemplateCommandOutput } from "./commands/UpdateVoiceTemplateCommand";
|
|
120
|
+
import { VerifyOTPMessageCommandInput, VerifyOTPMessageCommandOutput } from "./commands/VerifyOTPMessageCommand";
|
|
119
121
|
import { PinpointClient } from "./PinpointClient";
|
|
120
122
|
/**
|
|
121
123
|
* <p>Doc Engage API - Amazon Pinpoint API</p>
|
|
@@ -661,6 +663,12 @@ export declare class Pinpoint extends PinpointClient {
|
|
|
661
663
|
sendMessages(args: SendMessagesCommandInput, options?: __HttpHandlerOptions): Promise<SendMessagesCommandOutput>;
|
|
662
664
|
sendMessages(args: SendMessagesCommandInput, cb: (err: any, data?: SendMessagesCommandOutput) => void): void;
|
|
663
665
|
sendMessages(args: SendMessagesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SendMessagesCommandOutput) => void): void;
|
|
666
|
+
/**
|
|
667
|
+
* <p>Send an OTP message</p>
|
|
668
|
+
*/
|
|
669
|
+
sendOTPMessage(args: SendOTPMessageCommandInput, options?: __HttpHandlerOptions): Promise<SendOTPMessageCommandOutput>;
|
|
670
|
+
sendOTPMessage(args: SendOTPMessageCommandInput, cb: (err: any, data?: SendOTPMessageCommandOutput) => void): void;
|
|
671
|
+
sendOTPMessage(args: SendOTPMessageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SendOTPMessageCommandOutput) => void): void;
|
|
664
672
|
/**
|
|
665
673
|
* <p>Creates and sends a message to a list of users.</p>
|
|
666
674
|
*/
|
|
@@ -823,4 +831,10 @@ export declare class Pinpoint extends PinpointClient {
|
|
|
823
831
|
updateVoiceTemplate(args: UpdateVoiceTemplateCommandInput, options?: __HttpHandlerOptions): Promise<UpdateVoiceTemplateCommandOutput>;
|
|
824
832
|
updateVoiceTemplate(args: UpdateVoiceTemplateCommandInput, cb: (err: any, data?: UpdateVoiceTemplateCommandOutput) => void): void;
|
|
825
833
|
updateVoiceTemplate(args: UpdateVoiceTemplateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateVoiceTemplateCommandOutput) => void): void;
|
|
834
|
+
/**
|
|
835
|
+
* <p>Verify an OTP</p>
|
|
836
|
+
*/
|
|
837
|
+
verifyOTPMessage(args: VerifyOTPMessageCommandInput, options?: __HttpHandlerOptions): Promise<VerifyOTPMessageCommandOutput>;
|
|
838
|
+
verifyOTPMessage(args: VerifyOTPMessageCommandInput, cb: (err: any, data?: VerifyOTPMessageCommandOutput) => void): void;
|
|
839
|
+
verifyOTPMessage(args: VerifyOTPMessageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: VerifyOTPMessageCommandOutput) => void): void;
|
|
826
840
|
}
|