@aws-sdk/client-pinpoint 3.41.0 → 3.46.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 +47 -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_1.js +44 -2
- package/dist-cjs/protocols/Aws_restJson1.js +294 -4
- package/dist-cjs/runtimeConfig.js +0 -2
- 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_1.js +28 -0
- package/dist-es/protocols/Aws_restJson1.js +310 -0
- package/dist-es/runtimeConfig.js +0 -2
- package/dist-types/Pinpoint.d.ts +14 -0
- package/dist-types/PinpointClient.d.ts +4 -2
- 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_1.d.ts +149 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
- package/dist-types/ts3.4/Pinpoint.d.ts +10 -0
- package/dist-types/ts3.4/PinpointClient.d.ts +4 -2
- 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_1.d.ts +87 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
- package/package.json +36 -43
|
@@ -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),
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -12,10 +12,8 @@ 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 { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
|
|
16
15
|
export var getRuntimeConfig = function (config) {
|
|
17
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
18
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
19
17
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
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 NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), 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
19
|
};
|
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
|
}
|
|
@@ -96,6 +96,7 @@ import { PutEventsCommandInput, PutEventsCommandOutput } from "./commands/PutEve
|
|
|
96
96
|
import { PutEventStreamCommandInput, PutEventStreamCommandOutput } from "./commands/PutEventStreamCommand";
|
|
97
97
|
import { RemoveAttributesCommandInput, RemoveAttributesCommandOutput } from "./commands/RemoveAttributesCommand";
|
|
98
98
|
import { SendMessagesCommandInput, SendMessagesCommandOutput } from "./commands/SendMessagesCommand";
|
|
99
|
+
import { SendOTPMessageCommandInput, SendOTPMessageCommandOutput } from "./commands/SendOTPMessageCommand";
|
|
99
100
|
import { SendUsersMessagesCommandInput, SendUsersMessagesCommandOutput } from "./commands/SendUsersMessagesCommand";
|
|
100
101
|
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
101
102
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
@@ -123,8 +124,9 @@ import { UpdateSmsTemplateCommandInput, UpdateSmsTemplateCommandOutput } from ".
|
|
|
123
124
|
import { UpdateTemplateActiveVersionCommandInput, UpdateTemplateActiveVersionCommandOutput } from "./commands/UpdateTemplateActiveVersionCommand";
|
|
124
125
|
import { UpdateVoiceChannelCommandInput, UpdateVoiceChannelCommandOutput } from "./commands/UpdateVoiceChannelCommand";
|
|
125
126
|
import { UpdateVoiceTemplateCommandInput, UpdateVoiceTemplateCommandOutput } from "./commands/UpdateVoiceTemplateCommand";
|
|
126
|
-
|
|
127
|
-
export declare type
|
|
127
|
+
import { VerifyOTPMessageCommandInput, VerifyOTPMessageCommandOutput } from "./commands/VerifyOTPMessageCommand";
|
|
128
|
+
export declare type ServiceInputTypes = CreateAppCommandInput | CreateCampaignCommandInput | CreateEmailTemplateCommandInput | CreateExportJobCommandInput | CreateImportJobCommandInput | CreateInAppTemplateCommandInput | CreateJourneyCommandInput | CreatePushTemplateCommandInput | CreateRecommenderConfigurationCommandInput | CreateSegmentCommandInput | CreateSmsTemplateCommandInput | CreateVoiceTemplateCommandInput | DeleteAdmChannelCommandInput | DeleteApnsChannelCommandInput | DeleteApnsSandboxChannelCommandInput | DeleteApnsVoipChannelCommandInput | DeleteApnsVoipSandboxChannelCommandInput | DeleteAppCommandInput | DeleteBaiduChannelCommandInput | DeleteCampaignCommandInput | DeleteEmailChannelCommandInput | DeleteEmailTemplateCommandInput | DeleteEndpointCommandInput | DeleteEventStreamCommandInput | DeleteGcmChannelCommandInput | DeleteInAppTemplateCommandInput | DeleteJourneyCommandInput | DeletePushTemplateCommandInput | DeleteRecommenderConfigurationCommandInput | DeleteSegmentCommandInput | DeleteSmsChannelCommandInput | DeleteSmsTemplateCommandInput | DeleteUserEndpointsCommandInput | DeleteVoiceChannelCommandInput | DeleteVoiceTemplateCommandInput | GetAdmChannelCommandInput | GetApnsChannelCommandInput | GetApnsSandboxChannelCommandInput | GetApnsVoipChannelCommandInput | GetApnsVoipSandboxChannelCommandInput | GetAppCommandInput | GetApplicationDateRangeKpiCommandInput | GetApplicationSettingsCommandInput | GetAppsCommandInput | GetBaiduChannelCommandInput | GetCampaignActivitiesCommandInput | GetCampaignCommandInput | GetCampaignDateRangeKpiCommandInput | GetCampaignVersionCommandInput | GetCampaignVersionsCommandInput | GetCampaignsCommandInput | GetChannelsCommandInput | GetEmailChannelCommandInput | GetEmailTemplateCommandInput | GetEndpointCommandInput | GetEventStreamCommandInput | GetExportJobCommandInput | GetExportJobsCommandInput | GetGcmChannelCommandInput | GetImportJobCommandInput | GetImportJobsCommandInput | GetInAppMessagesCommandInput | GetInAppTemplateCommandInput | GetJourneyCommandInput | GetJourneyDateRangeKpiCommandInput | GetJourneyExecutionActivityMetricsCommandInput | GetJourneyExecutionMetricsCommandInput | GetPushTemplateCommandInput | GetRecommenderConfigurationCommandInput | GetRecommenderConfigurationsCommandInput | GetSegmentCommandInput | GetSegmentExportJobsCommandInput | GetSegmentImportJobsCommandInput | GetSegmentVersionCommandInput | GetSegmentVersionsCommandInput | GetSegmentsCommandInput | GetSmsChannelCommandInput | GetSmsTemplateCommandInput | GetUserEndpointsCommandInput | GetVoiceChannelCommandInput | GetVoiceTemplateCommandInput | ListJourneysCommandInput | ListTagsForResourceCommandInput | ListTemplateVersionsCommandInput | ListTemplatesCommandInput | PhoneNumberValidateCommandInput | PutEventStreamCommandInput | PutEventsCommandInput | RemoveAttributesCommandInput | SendMessagesCommandInput | SendOTPMessageCommandInput | SendUsersMessagesCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAdmChannelCommandInput | UpdateApnsChannelCommandInput | UpdateApnsSandboxChannelCommandInput | UpdateApnsVoipChannelCommandInput | UpdateApnsVoipSandboxChannelCommandInput | UpdateApplicationSettingsCommandInput | UpdateBaiduChannelCommandInput | UpdateCampaignCommandInput | UpdateEmailChannelCommandInput | UpdateEmailTemplateCommandInput | UpdateEndpointCommandInput | UpdateEndpointsBatchCommandInput | UpdateGcmChannelCommandInput | UpdateInAppTemplateCommandInput | UpdateJourneyCommandInput | UpdateJourneyStateCommandInput | UpdatePushTemplateCommandInput | UpdateRecommenderConfigurationCommandInput | UpdateSegmentCommandInput | UpdateSmsChannelCommandInput | UpdateSmsTemplateCommandInput | UpdateTemplateActiveVersionCommandInput | UpdateVoiceChannelCommandInput | UpdateVoiceTemplateCommandInput | VerifyOTPMessageCommandInput;
|
|
129
|
+
export declare type ServiceOutputTypes = CreateAppCommandOutput | CreateCampaignCommandOutput | CreateEmailTemplateCommandOutput | CreateExportJobCommandOutput | CreateImportJobCommandOutput | CreateInAppTemplateCommandOutput | CreateJourneyCommandOutput | CreatePushTemplateCommandOutput | CreateRecommenderConfigurationCommandOutput | CreateSegmentCommandOutput | CreateSmsTemplateCommandOutput | CreateVoiceTemplateCommandOutput | DeleteAdmChannelCommandOutput | DeleteApnsChannelCommandOutput | DeleteApnsSandboxChannelCommandOutput | DeleteApnsVoipChannelCommandOutput | DeleteApnsVoipSandboxChannelCommandOutput | DeleteAppCommandOutput | DeleteBaiduChannelCommandOutput | DeleteCampaignCommandOutput | DeleteEmailChannelCommandOutput | DeleteEmailTemplateCommandOutput | DeleteEndpointCommandOutput | DeleteEventStreamCommandOutput | DeleteGcmChannelCommandOutput | DeleteInAppTemplateCommandOutput | DeleteJourneyCommandOutput | DeletePushTemplateCommandOutput | DeleteRecommenderConfigurationCommandOutput | DeleteSegmentCommandOutput | DeleteSmsChannelCommandOutput | DeleteSmsTemplateCommandOutput | DeleteUserEndpointsCommandOutput | DeleteVoiceChannelCommandOutput | DeleteVoiceTemplateCommandOutput | GetAdmChannelCommandOutput | GetApnsChannelCommandOutput | GetApnsSandboxChannelCommandOutput | GetApnsVoipChannelCommandOutput | GetApnsVoipSandboxChannelCommandOutput | GetAppCommandOutput | GetApplicationDateRangeKpiCommandOutput | GetApplicationSettingsCommandOutput | GetAppsCommandOutput | GetBaiduChannelCommandOutput | GetCampaignActivitiesCommandOutput | GetCampaignCommandOutput | GetCampaignDateRangeKpiCommandOutput | GetCampaignVersionCommandOutput | GetCampaignVersionsCommandOutput | GetCampaignsCommandOutput | GetChannelsCommandOutput | GetEmailChannelCommandOutput | GetEmailTemplateCommandOutput | GetEndpointCommandOutput | GetEventStreamCommandOutput | GetExportJobCommandOutput | GetExportJobsCommandOutput | GetGcmChannelCommandOutput | GetImportJobCommandOutput | GetImportJobsCommandOutput | GetInAppMessagesCommandOutput | GetInAppTemplateCommandOutput | GetJourneyCommandOutput | GetJourneyDateRangeKpiCommandOutput | GetJourneyExecutionActivityMetricsCommandOutput | GetJourneyExecutionMetricsCommandOutput | GetPushTemplateCommandOutput | GetRecommenderConfigurationCommandOutput | GetRecommenderConfigurationsCommandOutput | GetSegmentCommandOutput | GetSegmentExportJobsCommandOutput | GetSegmentImportJobsCommandOutput | GetSegmentVersionCommandOutput | GetSegmentVersionsCommandOutput | GetSegmentsCommandOutput | GetSmsChannelCommandOutput | GetSmsTemplateCommandOutput | GetUserEndpointsCommandOutput | GetVoiceChannelCommandOutput | GetVoiceTemplateCommandOutput | ListJourneysCommandOutput | ListTagsForResourceCommandOutput | ListTemplateVersionsCommandOutput | ListTemplatesCommandOutput | PhoneNumberValidateCommandOutput | PutEventStreamCommandOutput | PutEventsCommandOutput | RemoveAttributesCommandOutput | SendMessagesCommandOutput | SendOTPMessageCommandOutput | SendUsersMessagesCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAdmChannelCommandOutput | UpdateApnsChannelCommandOutput | UpdateApnsSandboxChannelCommandOutput | UpdateApnsVoipChannelCommandOutput | UpdateApnsVoipSandboxChannelCommandOutput | UpdateApplicationSettingsCommandOutput | UpdateBaiduChannelCommandOutput | UpdateCampaignCommandOutput | UpdateEmailChannelCommandOutput | UpdateEmailTemplateCommandOutput | UpdateEndpointCommandOutput | UpdateEndpointsBatchCommandOutput | UpdateGcmChannelCommandOutput | UpdateInAppTemplateCommandOutput | UpdateJourneyCommandOutput | UpdateJourneyStateCommandOutput | UpdatePushTemplateCommandOutput | UpdateRecommenderConfigurationCommandOutput | UpdateSegmentCommandOutput | UpdateSmsChannelCommandOutput | UpdateSmsTemplateCommandOutput | UpdateTemplateActiveVersionCommandOutput | UpdateVoiceChannelCommandOutput | UpdateVoiceTemplateCommandOutput | VerifyOTPMessageCommandOutput;
|
|
128
130
|
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
129
131
|
/**
|
|
130
132
|
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { SendOTPMessageRequest, SendOTPMessageResponse } from "../models/models_1";
|
|
4
|
+
import { PinpointClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PinpointClient";
|
|
5
|
+
export interface SendOTPMessageCommandInput extends SendOTPMessageRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface SendOTPMessageCommandOutput extends SendOTPMessageResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Send an OTP message</p>
|
|
11
|
+
* @example
|
|
12
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
13
|
+
* ```javascript
|
|
14
|
+
* import { PinpointClient, SendOTPMessageCommand } from "@aws-sdk/client-pinpoint"; // ES Modules import
|
|
15
|
+
* // const { PinpointClient, SendOTPMessageCommand } = require("@aws-sdk/client-pinpoint"); // CommonJS import
|
|
16
|
+
* const client = new PinpointClient(config);
|
|
17
|
+
* const command = new SendOTPMessageCommand(input);
|
|
18
|
+
* const response = await client.send(command);
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @see {@link SendOTPMessageCommandInput} for command's `input` shape.
|
|
22
|
+
* @see {@link SendOTPMessageCommandOutput} for command's `response` shape.
|
|
23
|
+
* @see {@link PinpointClientResolvedConfig | config} for PinpointClient's `config` shape.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare class SendOTPMessageCommand extends $Command<SendOTPMessageCommandInput, SendOTPMessageCommandOutput, PinpointClientResolvedConfig> {
|
|
27
|
+
readonly input: SendOTPMessageCommandInput;
|
|
28
|
+
constructor(input: SendOTPMessageCommandInput);
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: PinpointClientResolvedConfig, options?: __HttpHandlerOptions): Handler<SendOTPMessageCommandInput, SendOTPMessageCommandOutput>;
|
|
33
|
+
private serialize;
|
|
34
|
+
private deserialize;
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { VerifyOTPMessageRequest, VerifyOTPMessageResponse } from "../models/models_1";
|
|
4
|
+
import { PinpointClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PinpointClient";
|
|
5
|
+
export interface VerifyOTPMessageCommandInput extends VerifyOTPMessageRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface VerifyOTPMessageCommandOutput extends VerifyOTPMessageResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Verify an OTP</p>
|
|
11
|
+
* @example
|
|
12
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
13
|
+
* ```javascript
|
|
14
|
+
* import { PinpointClient, VerifyOTPMessageCommand } from "@aws-sdk/client-pinpoint"; // ES Modules import
|
|
15
|
+
* // const { PinpointClient, VerifyOTPMessageCommand } = require("@aws-sdk/client-pinpoint"); // CommonJS import
|
|
16
|
+
* const client = new PinpointClient(config);
|
|
17
|
+
* const command = new VerifyOTPMessageCommand(input);
|
|
18
|
+
* const response = await client.send(command);
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @see {@link VerifyOTPMessageCommandInput} for command's `input` shape.
|
|
22
|
+
* @see {@link VerifyOTPMessageCommandOutput} for command's `response` shape.
|
|
23
|
+
* @see {@link PinpointClientResolvedConfig | config} for PinpointClient's `config` shape.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare class VerifyOTPMessageCommand extends $Command<VerifyOTPMessageCommandInput, VerifyOTPMessageCommandOutput, PinpointClientResolvedConfig> {
|
|
27
|
+
readonly input: VerifyOTPMessageCommandInput;
|
|
28
|
+
constructor(input: VerifyOTPMessageCommandInput);
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: PinpointClientResolvedConfig, options?: __HttpHandlerOptions): Handler<VerifyOTPMessageCommandInput, VerifyOTPMessageCommandOutput>;
|
|
33
|
+
private serialize;
|
|
34
|
+
private deserialize;
|
|
35
|
+
}
|
|
@@ -88,6 +88,7 @@ export * from "./PutEventStreamCommand";
|
|
|
88
88
|
export * from "./PutEventsCommand";
|
|
89
89
|
export * from "./RemoveAttributesCommand";
|
|
90
90
|
export * from "./SendMessagesCommand";
|
|
91
|
+
export * from "./SendOTPMessageCommand";
|
|
91
92
|
export * from "./SendUsersMessagesCommand";
|
|
92
93
|
export * from "./TagResourceCommand";
|
|
93
94
|
export * from "./UntagResourceCommand";
|
|
@@ -115,3 +116,4 @@ export * from "./UpdateSmsTemplateCommand";
|
|
|
115
116
|
export * from "./UpdateTemplateActiveVersionCommand";
|
|
116
117
|
export * from "./UpdateVoiceChannelCommand";
|
|
117
118
|
export * from "./UpdateVoiceTemplateCommand";
|
|
119
|
+
export * from "./VerifyOTPMessageCommand";
|