@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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.serializeAws_restJson1GetCampaignVersionCommand = exports.serializeAws_restJson1GetCampaignsCommand = exports.serializeAws_restJson1GetCampaignDateRangeKpiCommand = exports.serializeAws_restJson1GetCampaignActivitiesCommand = exports.serializeAws_restJson1GetCampaignCommand = exports.serializeAws_restJson1GetBaiduChannelCommand = exports.serializeAws_restJson1GetAppsCommand = exports.serializeAws_restJson1GetApplicationSettingsCommand = exports.serializeAws_restJson1GetApplicationDateRangeKpiCommand = exports.serializeAws_restJson1GetAppCommand = exports.serializeAws_restJson1GetApnsVoipSandboxChannelCommand = exports.serializeAws_restJson1GetApnsVoipChannelCommand = exports.serializeAws_restJson1GetApnsSandboxChannelCommand = exports.serializeAws_restJson1GetApnsChannelCommand = exports.serializeAws_restJson1GetAdmChannelCommand = exports.serializeAws_restJson1DeleteVoiceTemplateCommand = exports.serializeAws_restJson1DeleteVoiceChannelCommand = exports.serializeAws_restJson1DeleteUserEndpointsCommand = exports.serializeAws_restJson1DeleteSmsTemplateCommand = exports.serializeAws_restJson1DeleteSmsChannelCommand = exports.serializeAws_restJson1DeleteSegmentCommand = exports.serializeAws_restJson1DeleteRecommenderConfigurationCommand = exports.serializeAws_restJson1DeletePushTemplateCommand = exports.serializeAws_restJson1DeleteJourneyCommand = exports.serializeAws_restJson1DeleteInAppTemplateCommand = exports.serializeAws_restJson1DeleteGcmChannelCommand = exports.serializeAws_restJson1DeleteEventStreamCommand = exports.serializeAws_restJson1DeleteEndpointCommand = exports.serializeAws_restJson1DeleteEmailTemplateCommand = exports.serializeAws_restJson1DeleteEmailChannelCommand = exports.serializeAws_restJson1DeleteCampaignCommand = exports.serializeAws_restJson1DeleteBaiduChannelCommand = exports.serializeAws_restJson1DeleteAppCommand = exports.serializeAws_restJson1DeleteApnsVoipSandboxChannelCommand = exports.serializeAws_restJson1DeleteApnsVoipChannelCommand = exports.serializeAws_restJson1DeleteApnsSandboxChannelCommand = exports.serializeAws_restJson1DeleteApnsChannelCommand = exports.serializeAws_restJson1DeleteAdmChannelCommand = exports.serializeAws_restJson1CreateVoiceTemplateCommand = exports.serializeAws_restJson1CreateSmsTemplateCommand = exports.serializeAws_restJson1CreateSegmentCommand = exports.serializeAws_restJson1CreateRecommenderConfigurationCommand = exports.serializeAws_restJson1CreatePushTemplateCommand = exports.serializeAws_restJson1CreateJourneyCommand = exports.serializeAws_restJson1CreateInAppTemplateCommand = exports.serializeAws_restJson1CreateImportJobCommand = exports.serializeAws_restJson1CreateExportJobCommand = exports.serializeAws_restJson1CreateEmailTemplateCommand = exports.serializeAws_restJson1CreateCampaignCommand = exports.serializeAws_restJson1CreateAppCommand = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.deserializeAws_restJson1UpdateVoiceTemplateCommand = exports.deserializeAws_restJson1UpdateVoiceChannelCommand = exports.deserializeAws_restJson1UpdateTemplateActiveVersionCommand = exports.deserializeAws_restJson1UpdateSmsTemplateCommand = exports.deserializeAws_restJson1UpdateSmsChannelCommand = exports.deserializeAws_restJson1UpdateSegmentCommand = exports.deserializeAws_restJson1UpdateRecommenderConfigurationCommand = exports.deserializeAws_restJson1UpdatePushTemplateCommand = exports.deserializeAws_restJson1UpdateJourneyStateCommand = exports.deserializeAws_restJson1UpdateJourneyCommand = exports.deserializeAws_restJson1UpdateInAppTemplateCommand = exports.deserializeAws_restJson1UpdateGcmChannelCommand = exports.deserializeAws_restJson1UpdateEndpointsBatchCommand = exports.deserializeAws_restJson1UpdateEndpointCommand = exports.deserializeAws_restJson1UpdateEmailTemplateCommand = exports.deserializeAws_restJson1UpdateEmailChannelCommand = exports.deserializeAws_restJson1UpdateCampaignCommand = exports.deserializeAws_restJson1UpdateBaiduChannelCommand = exports.deserializeAws_restJson1UpdateApplicationSettingsCommand = exports.deserializeAws_restJson1UpdateApnsVoipSandboxChannelCommand = exports.deserializeAws_restJson1UpdateApnsVoipChannelCommand = exports.deserializeAws_restJson1UpdateApnsSandboxChannelCommand = exports.deserializeAws_restJson1UpdateApnsChannelCommand = exports.deserializeAws_restJson1UpdateAdmChannelCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SendUsersMessagesCommand = exports.deserializeAws_restJson1SendMessagesCommand = exports.deserializeAws_restJson1RemoveAttributesCommand = exports.deserializeAws_restJson1PutEventStreamCommand = exports.deserializeAws_restJson1PutEventsCommand = exports.deserializeAws_restJson1PhoneNumberValidateCommand = exports.deserializeAws_restJson1ListTemplateVersionsCommand = exports.deserializeAws_restJson1ListTemplatesCommand = void 0;
|
|
4
|
+
exports.serializeAws_restJson1UpdateApplicationSettingsCommand = exports.serializeAws_restJson1UpdateApnsVoipSandboxChannelCommand = exports.serializeAws_restJson1UpdateApnsVoipChannelCommand = exports.serializeAws_restJson1UpdateApnsSandboxChannelCommand = exports.serializeAws_restJson1UpdateApnsChannelCommand = exports.serializeAws_restJson1UpdateAdmChannelCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SendUsersMessagesCommand = exports.serializeAws_restJson1SendOTPMessageCommand = exports.serializeAws_restJson1SendMessagesCommand = exports.serializeAws_restJson1RemoveAttributesCommand = exports.serializeAws_restJson1PutEventStreamCommand = exports.serializeAws_restJson1PutEventsCommand = exports.serializeAws_restJson1PhoneNumberValidateCommand = exports.serializeAws_restJson1ListTemplateVersionsCommand = exports.serializeAws_restJson1ListTemplatesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListJourneysCommand = exports.serializeAws_restJson1GetVoiceTemplateCommand = exports.serializeAws_restJson1GetVoiceChannelCommand = exports.serializeAws_restJson1GetUserEndpointsCommand = exports.serializeAws_restJson1GetSmsTemplateCommand = exports.serializeAws_restJson1GetSmsChannelCommand = exports.serializeAws_restJson1GetSegmentVersionsCommand = exports.serializeAws_restJson1GetSegmentVersionCommand = exports.serializeAws_restJson1GetSegmentsCommand = exports.serializeAws_restJson1GetSegmentImportJobsCommand = exports.serializeAws_restJson1GetSegmentExportJobsCommand = exports.serializeAws_restJson1GetSegmentCommand = exports.serializeAws_restJson1GetRecommenderConfigurationsCommand = exports.serializeAws_restJson1GetRecommenderConfigurationCommand = exports.serializeAws_restJson1GetPushTemplateCommand = exports.serializeAws_restJson1GetJourneyExecutionMetricsCommand = exports.serializeAws_restJson1GetJourneyExecutionActivityMetricsCommand = exports.serializeAws_restJson1GetJourneyDateRangeKpiCommand = exports.serializeAws_restJson1GetJourneyCommand = exports.serializeAws_restJson1GetInAppTemplateCommand = exports.serializeAws_restJson1GetInAppMessagesCommand = exports.serializeAws_restJson1GetImportJobsCommand = exports.serializeAws_restJson1GetImportJobCommand = exports.serializeAws_restJson1GetGcmChannelCommand = exports.serializeAws_restJson1GetExportJobsCommand = exports.serializeAws_restJson1GetExportJobCommand = exports.serializeAws_restJson1GetEventStreamCommand = exports.serializeAws_restJson1GetEndpointCommand = exports.serializeAws_restJson1GetEmailTemplateCommand = exports.serializeAws_restJson1GetEmailChannelCommand = exports.serializeAws_restJson1GetChannelsCommand = exports.serializeAws_restJson1GetCampaignVersionsCommand = void 0;
|
|
5
|
+
exports.deserializeAws_restJson1DeleteSmsChannelCommand = exports.deserializeAws_restJson1DeleteSegmentCommand = exports.deserializeAws_restJson1DeleteRecommenderConfigurationCommand = exports.deserializeAws_restJson1DeletePushTemplateCommand = exports.deserializeAws_restJson1DeleteJourneyCommand = exports.deserializeAws_restJson1DeleteInAppTemplateCommand = exports.deserializeAws_restJson1DeleteGcmChannelCommand = exports.deserializeAws_restJson1DeleteEventStreamCommand = exports.deserializeAws_restJson1DeleteEndpointCommand = exports.deserializeAws_restJson1DeleteEmailTemplateCommand = exports.deserializeAws_restJson1DeleteEmailChannelCommand = exports.deserializeAws_restJson1DeleteCampaignCommand = exports.deserializeAws_restJson1DeleteBaiduChannelCommand = exports.deserializeAws_restJson1DeleteAppCommand = exports.deserializeAws_restJson1DeleteApnsVoipSandboxChannelCommand = exports.deserializeAws_restJson1DeleteApnsVoipChannelCommand = exports.deserializeAws_restJson1DeleteApnsSandboxChannelCommand = exports.deserializeAws_restJson1DeleteApnsChannelCommand = exports.deserializeAws_restJson1DeleteAdmChannelCommand = exports.deserializeAws_restJson1CreateVoiceTemplateCommand = exports.deserializeAws_restJson1CreateSmsTemplateCommand = exports.deserializeAws_restJson1CreateSegmentCommand = exports.deserializeAws_restJson1CreateRecommenderConfigurationCommand = exports.deserializeAws_restJson1CreatePushTemplateCommand = exports.deserializeAws_restJson1CreateJourneyCommand = exports.deserializeAws_restJson1CreateInAppTemplateCommand = exports.deserializeAws_restJson1CreateImportJobCommand = exports.deserializeAws_restJson1CreateExportJobCommand = exports.deserializeAws_restJson1CreateEmailTemplateCommand = exports.deserializeAws_restJson1CreateCampaignCommand = exports.deserializeAws_restJson1CreateAppCommand = exports.serializeAws_restJson1VerifyOTPMessageCommand = exports.serializeAws_restJson1UpdateVoiceTemplateCommand = exports.serializeAws_restJson1UpdateVoiceChannelCommand = exports.serializeAws_restJson1UpdateTemplateActiveVersionCommand = exports.serializeAws_restJson1UpdateSmsTemplateCommand = exports.serializeAws_restJson1UpdateSmsChannelCommand = exports.serializeAws_restJson1UpdateSegmentCommand = exports.serializeAws_restJson1UpdateRecommenderConfigurationCommand = exports.serializeAws_restJson1UpdatePushTemplateCommand = exports.serializeAws_restJson1UpdateJourneyStateCommand = exports.serializeAws_restJson1UpdateJourneyCommand = exports.serializeAws_restJson1UpdateInAppTemplateCommand = exports.serializeAws_restJson1UpdateGcmChannelCommand = exports.serializeAws_restJson1UpdateEndpointsBatchCommand = exports.serializeAws_restJson1UpdateEndpointCommand = exports.serializeAws_restJson1UpdateEmailTemplateCommand = exports.serializeAws_restJson1UpdateEmailChannelCommand = exports.serializeAws_restJson1UpdateCampaignCommand = exports.serializeAws_restJson1UpdateBaiduChannelCommand = void 0;
|
|
6
|
+
exports.deserializeAws_restJson1GetVoiceTemplateCommand = exports.deserializeAws_restJson1GetVoiceChannelCommand = exports.deserializeAws_restJson1GetUserEndpointsCommand = exports.deserializeAws_restJson1GetSmsTemplateCommand = exports.deserializeAws_restJson1GetSmsChannelCommand = exports.deserializeAws_restJson1GetSegmentVersionsCommand = exports.deserializeAws_restJson1GetSegmentVersionCommand = exports.deserializeAws_restJson1GetSegmentsCommand = exports.deserializeAws_restJson1GetSegmentImportJobsCommand = exports.deserializeAws_restJson1GetSegmentExportJobsCommand = exports.deserializeAws_restJson1GetSegmentCommand = exports.deserializeAws_restJson1GetRecommenderConfigurationsCommand = exports.deserializeAws_restJson1GetRecommenderConfigurationCommand = exports.deserializeAws_restJson1GetPushTemplateCommand = exports.deserializeAws_restJson1GetJourneyExecutionMetricsCommand = exports.deserializeAws_restJson1GetJourneyExecutionActivityMetricsCommand = exports.deserializeAws_restJson1GetJourneyDateRangeKpiCommand = exports.deserializeAws_restJson1GetJourneyCommand = exports.deserializeAws_restJson1GetInAppTemplateCommand = exports.deserializeAws_restJson1GetInAppMessagesCommand = exports.deserializeAws_restJson1GetImportJobsCommand = exports.deserializeAws_restJson1GetImportJobCommand = exports.deserializeAws_restJson1GetGcmChannelCommand = exports.deserializeAws_restJson1GetExportJobsCommand = exports.deserializeAws_restJson1GetExportJobCommand = exports.deserializeAws_restJson1GetEventStreamCommand = exports.deserializeAws_restJson1GetEndpointCommand = exports.deserializeAws_restJson1GetEmailTemplateCommand = exports.deserializeAws_restJson1GetEmailChannelCommand = exports.deserializeAws_restJson1GetChannelsCommand = exports.deserializeAws_restJson1GetCampaignVersionsCommand = exports.deserializeAws_restJson1GetCampaignVersionCommand = exports.deserializeAws_restJson1GetCampaignsCommand = exports.deserializeAws_restJson1GetCampaignDateRangeKpiCommand = exports.deserializeAws_restJson1GetCampaignActivitiesCommand = exports.deserializeAws_restJson1GetCampaignCommand = exports.deserializeAws_restJson1GetBaiduChannelCommand = exports.deserializeAws_restJson1GetAppsCommand = exports.deserializeAws_restJson1GetApplicationSettingsCommand = exports.deserializeAws_restJson1GetApplicationDateRangeKpiCommand = exports.deserializeAws_restJson1GetAppCommand = exports.deserializeAws_restJson1GetApnsVoipSandboxChannelCommand = exports.deserializeAws_restJson1GetApnsVoipChannelCommand = exports.deserializeAws_restJson1GetApnsSandboxChannelCommand = exports.deserializeAws_restJson1GetApnsChannelCommand = exports.deserializeAws_restJson1GetAdmChannelCommand = exports.deserializeAws_restJson1DeleteVoiceTemplateCommand = exports.deserializeAws_restJson1DeleteVoiceChannelCommand = exports.deserializeAws_restJson1DeleteUserEndpointsCommand = exports.deserializeAws_restJson1DeleteSmsTemplateCommand = void 0;
|
|
7
|
+
exports.deserializeAws_restJson1VerifyOTPMessageCommand = exports.deserializeAws_restJson1UpdateVoiceTemplateCommand = exports.deserializeAws_restJson1UpdateVoiceChannelCommand = exports.deserializeAws_restJson1UpdateTemplateActiveVersionCommand = exports.deserializeAws_restJson1UpdateSmsTemplateCommand = exports.deserializeAws_restJson1UpdateSmsChannelCommand = exports.deserializeAws_restJson1UpdateSegmentCommand = exports.deserializeAws_restJson1UpdateRecommenderConfigurationCommand = exports.deserializeAws_restJson1UpdatePushTemplateCommand = exports.deserializeAws_restJson1UpdateJourneyStateCommand = exports.deserializeAws_restJson1UpdateJourneyCommand = exports.deserializeAws_restJson1UpdateInAppTemplateCommand = exports.deserializeAws_restJson1UpdateGcmChannelCommand = exports.deserializeAws_restJson1UpdateEndpointsBatchCommand = exports.deserializeAws_restJson1UpdateEndpointCommand = exports.deserializeAws_restJson1UpdateEmailTemplateCommand = exports.deserializeAws_restJson1UpdateEmailChannelCommand = exports.deserializeAws_restJson1UpdateCampaignCommand = exports.deserializeAws_restJson1UpdateBaiduChannelCommand = exports.deserializeAws_restJson1UpdateApplicationSettingsCommand = exports.deserializeAws_restJson1UpdateApnsVoipSandboxChannelCommand = exports.deserializeAws_restJson1UpdateApnsVoipChannelCommand = exports.deserializeAws_restJson1UpdateApnsSandboxChannelCommand = exports.deserializeAws_restJson1UpdateApnsChannelCommand = exports.deserializeAws_restJson1UpdateAdmChannelCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SendUsersMessagesCommand = exports.deserializeAws_restJson1SendOTPMessageCommand = exports.deserializeAws_restJson1SendMessagesCommand = exports.deserializeAws_restJson1RemoveAttributesCommand = exports.deserializeAws_restJson1PutEventStreamCommand = exports.deserializeAws_restJson1PutEventsCommand = exports.deserializeAws_restJson1PhoneNumberValidateCommand = exports.deserializeAws_restJson1ListTemplateVersionsCommand = exports.deserializeAws_restJson1ListTemplatesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListJourneysCommand = void 0;
|
|
8
8
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
9
9
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
10
10
|
const serializeAws_restJson1CreateAppCommand = async (input, context) => {
|
|
@@ -2940,6 +2940,41 @@ const serializeAws_restJson1SendMessagesCommand = async (input, context) => {
|
|
|
2940
2940
|
});
|
|
2941
2941
|
};
|
|
2942
2942
|
exports.serializeAws_restJson1SendMessagesCommand = serializeAws_restJson1SendMessagesCommand;
|
|
2943
|
+
const serializeAws_restJson1SendOTPMessageCommand = async (input, context) => {
|
|
2944
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2945
|
+
const headers = {
|
|
2946
|
+
"content-type": "application/json",
|
|
2947
|
+
};
|
|
2948
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apps/{ApplicationId}/otp";
|
|
2949
|
+
if (input.ApplicationId !== undefined) {
|
|
2950
|
+
const labelValue = input.ApplicationId;
|
|
2951
|
+
if (labelValue.length <= 0) {
|
|
2952
|
+
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
2953
|
+
}
|
|
2954
|
+
resolvedPath = resolvedPath.replace("{ApplicationId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
2955
|
+
}
|
|
2956
|
+
else {
|
|
2957
|
+
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
2958
|
+
}
|
|
2959
|
+
let body;
|
|
2960
|
+
if (input.SendOTPMessageRequestParameters !== undefined) {
|
|
2961
|
+
body = serializeAws_restJson1SendOTPMessageRequestParameters(input.SendOTPMessageRequestParameters, context);
|
|
2962
|
+
}
|
|
2963
|
+
if (body === undefined) {
|
|
2964
|
+
body = {};
|
|
2965
|
+
}
|
|
2966
|
+
body = JSON.stringify(body);
|
|
2967
|
+
return new protocol_http_1.HttpRequest({
|
|
2968
|
+
protocol,
|
|
2969
|
+
hostname,
|
|
2970
|
+
port,
|
|
2971
|
+
method: "POST",
|
|
2972
|
+
headers,
|
|
2973
|
+
path: resolvedPath,
|
|
2974
|
+
body,
|
|
2975
|
+
});
|
|
2976
|
+
};
|
|
2977
|
+
exports.serializeAws_restJson1SendOTPMessageCommand = serializeAws_restJson1SendOTPMessageCommand;
|
|
2943
2978
|
const serializeAws_restJson1SendUsersMessagesCommand = async (input, context) => {
|
|
2944
2979
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2945
2980
|
const headers = {
|
|
@@ -3974,6 +4009,41 @@ const serializeAws_restJson1UpdateVoiceTemplateCommand = async (input, context)
|
|
|
3974
4009
|
});
|
|
3975
4010
|
};
|
|
3976
4011
|
exports.serializeAws_restJson1UpdateVoiceTemplateCommand = serializeAws_restJson1UpdateVoiceTemplateCommand;
|
|
4012
|
+
const serializeAws_restJson1VerifyOTPMessageCommand = async (input, context) => {
|
|
4013
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
4014
|
+
const headers = {
|
|
4015
|
+
"content-type": "application/json",
|
|
4016
|
+
};
|
|
4017
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apps/{ApplicationId}/verify-otp";
|
|
4018
|
+
if (input.ApplicationId !== undefined) {
|
|
4019
|
+
const labelValue = input.ApplicationId;
|
|
4020
|
+
if (labelValue.length <= 0) {
|
|
4021
|
+
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
4022
|
+
}
|
|
4023
|
+
resolvedPath = resolvedPath.replace("{ApplicationId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
4024
|
+
}
|
|
4025
|
+
else {
|
|
4026
|
+
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
4027
|
+
}
|
|
4028
|
+
let body;
|
|
4029
|
+
if (input.VerifyOTPMessageRequestParameters !== undefined) {
|
|
4030
|
+
body = serializeAws_restJson1VerifyOTPMessageRequestParameters(input.VerifyOTPMessageRequestParameters, context);
|
|
4031
|
+
}
|
|
4032
|
+
if (body === undefined) {
|
|
4033
|
+
body = {};
|
|
4034
|
+
}
|
|
4035
|
+
body = JSON.stringify(body);
|
|
4036
|
+
return new protocol_http_1.HttpRequest({
|
|
4037
|
+
protocol,
|
|
4038
|
+
hostname,
|
|
4039
|
+
port,
|
|
4040
|
+
method: "POST",
|
|
4041
|
+
headers,
|
|
4042
|
+
path: resolvedPath,
|
|
4043
|
+
body,
|
|
4044
|
+
});
|
|
4045
|
+
};
|
|
4046
|
+
exports.serializeAws_restJson1VerifyOTPMessageCommand = serializeAws_restJson1VerifyOTPMessageCommand;
|
|
3977
4047
|
const deserializeAws_restJson1CreateAppCommand = async (output, context) => {
|
|
3978
4048
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
3979
4049
|
return deserializeAws_restJson1CreateAppCommandError(output, context);
|
|
@@ -12282,6 +12352,100 @@ const deserializeAws_restJson1SendMessagesCommandError = async (output, context)
|
|
|
12282
12352
|
delete response.Message;
|
|
12283
12353
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
12284
12354
|
};
|
|
12355
|
+
const deserializeAws_restJson1SendOTPMessageCommand = async (output, context) => {
|
|
12356
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12357
|
+
return deserializeAws_restJson1SendOTPMessageCommandError(output, context);
|
|
12358
|
+
}
|
|
12359
|
+
const contents = {
|
|
12360
|
+
$metadata: deserializeMetadata(output),
|
|
12361
|
+
MessageResponse: undefined,
|
|
12362
|
+
};
|
|
12363
|
+
const data = smithy_client_1.expectObject(await parseBody(output.body, context));
|
|
12364
|
+
contents.MessageResponse = deserializeAws_restJson1MessageResponse(data, context);
|
|
12365
|
+
return Promise.resolve(contents);
|
|
12366
|
+
};
|
|
12367
|
+
exports.deserializeAws_restJson1SendOTPMessageCommand = deserializeAws_restJson1SendOTPMessageCommand;
|
|
12368
|
+
const deserializeAws_restJson1SendOTPMessageCommandError = async (output, context) => {
|
|
12369
|
+
const parsedOutput = {
|
|
12370
|
+
...output,
|
|
12371
|
+
body: await parseBody(output.body, context),
|
|
12372
|
+
};
|
|
12373
|
+
let response;
|
|
12374
|
+
let errorCode = "UnknownError";
|
|
12375
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
12376
|
+
switch (errorCode) {
|
|
12377
|
+
case "BadRequestException":
|
|
12378
|
+
case "com.amazonaws.pinpoint#BadRequestException":
|
|
12379
|
+
response = {
|
|
12380
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
12381
|
+
name: errorCode,
|
|
12382
|
+
$metadata: deserializeMetadata(output),
|
|
12383
|
+
};
|
|
12384
|
+
break;
|
|
12385
|
+
case "ForbiddenException":
|
|
12386
|
+
case "com.amazonaws.pinpoint#ForbiddenException":
|
|
12387
|
+
response = {
|
|
12388
|
+
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
12389
|
+
name: errorCode,
|
|
12390
|
+
$metadata: deserializeMetadata(output),
|
|
12391
|
+
};
|
|
12392
|
+
break;
|
|
12393
|
+
case "InternalServerErrorException":
|
|
12394
|
+
case "com.amazonaws.pinpoint#InternalServerErrorException":
|
|
12395
|
+
response = {
|
|
12396
|
+
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
12397
|
+
name: errorCode,
|
|
12398
|
+
$metadata: deserializeMetadata(output),
|
|
12399
|
+
};
|
|
12400
|
+
break;
|
|
12401
|
+
case "MethodNotAllowedException":
|
|
12402
|
+
case "com.amazonaws.pinpoint#MethodNotAllowedException":
|
|
12403
|
+
response = {
|
|
12404
|
+
...(await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)),
|
|
12405
|
+
name: errorCode,
|
|
12406
|
+
$metadata: deserializeMetadata(output),
|
|
12407
|
+
};
|
|
12408
|
+
break;
|
|
12409
|
+
case "NotFoundException":
|
|
12410
|
+
case "com.amazonaws.pinpoint#NotFoundException":
|
|
12411
|
+
response = {
|
|
12412
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
12413
|
+
name: errorCode,
|
|
12414
|
+
$metadata: deserializeMetadata(output),
|
|
12415
|
+
};
|
|
12416
|
+
break;
|
|
12417
|
+
case "PayloadTooLargeException":
|
|
12418
|
+
case "com.amazonaws.pinpoint#PayloadTooLargeException":
|
|
12419
|
+
response = {
|
|
12420
|
+
...(await deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context)),
|
|
12421
|
+
name: errorCode,
|
|
12422
|
+
$metadata: deserializeMetadata(output),
|
|
12423
|
+
};
|
|
12424
|
+
break;
|
|
12425
|
+
case "TooManyRequestsException":
|
|
12426
|
+
case "com.amazonaws.pinpoint#TooManyRequestsException":
|
|
12427
|
+
response = {
|
|
12428
|
+
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
12429
|
+
name: errorCode,
|
|
12430
|
+
$metadata: deserializeMetadata(output),
|
|
12431
|
+
};
|
|
12432
|
+
break;
|
|
12433
|
+
default:
|
|
12434
|
+
const parsedBody = parsedOutput.body;
|
|
12435
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
12436
|
+
response = {
|
|
12437
|
+
...parsedBody,
|
|
12438
|
+
name: `${errorCode}`,
|
|
12439
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
12440
|
+
$fault: "client",
|
|
12441
|
+
$metadata: deserializeMetadata(output),
|
|
12442
|
+
};
|
|
12443
|
+
}
|
|
12444
|
+
const message = response.message || response.Message || errorCode;
|
|
12445
|
+
response.message = message;
|
|
12446
|
+
delete response.Message;
|
|
12447
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
12448
|
+
};
|
|
12285
12449
|
const deserializeAws_restJson1SendUsersMessagesCommand = async (output, context) => {
|
|
12286
12450
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12287
12451
|
return deserializeAws_restJson1SendUsersMessagesCommandError(output, context);
|
|
@@ -14712,6 +14876,100 @@ const deserializeAws_restJson1UpdateVoiceTemplateCommandError = async (output, c
|
|
|
14712
14876
|
delete response.Message;
|
|
14713
14877
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
14714
14878
|
};
|
|
14879
|
+
const deserializeAws_restJson1VerifyOTPMessageCommand = async (output, context) => {
|
|
14880
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14881
|
+
return deserializeAws_restJson1VerifyOTPMessageCommandError(output, context);
|
|
14882
|
+
}
|
|
14883
|
+
const contents = {
|
|
14884
|
+
$metadata: deserializeMetadata(output),
|
|
14885
|
+
VerificationResponse: undefined,
|
|
14886
|
+
};
|
|
14887
|
+
const data = smithy_client_1.expectObject(await parseBody(output.body, context));
|
|
14888
|
+
contents.VerificationResponse = deserializeAws_restJson1VerificationResponse(data, context);
|
|
14889
|
+
return Promise.resolve(contents);
|
|
14890
|
+
};
|
|
14891
|
+
exports.deserializeAws_restJson1VerifyOTPMessageCommand = deserializeAws_restJson1VerifyOTPMessageCommand;
|
|
14892
|
+
const deserializeAws_restJson1VerifyOTPMessageCommandError = async (output, context) => {
|
|
14893
|
+
const parsedOutput = {
|
|
14894
|
+
...output,
|
|
14895
|
+
body: await parseBody(output.body, context),
|
|
14896
|
+
};
|
|
14897
|
+
let response;
|
|
14898
|
+
let errorCode = "UnknownError";
|
|
14899
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14900
|
+
switch (errorCode) {
|
|
14901
|
+
case "BadRequestException":
|
|
14902
|
+
case "com.amazonaws.pinpoint#BadRequestException":
|
|
14903
|
+
response = {
|
|
14904
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
14905
|
+
name: errorCode,
|
|
14906
|
+
$metadata: deserializeMetadata(output),
|
|
14907
|
+
};
|
|
14908
|
+
break;
|
|
14909
|
+
case "ForbiddenException":
|
|
14910
|
+
case "com.amazonaws.pinpoint#ForbiddenException":
|
|
14911
|
+
response = {
|
|
14912
|
+
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
14913
|
+
name: errorCode,
|
|
14914
|
+
$metadata: deserializeMetadata(output),
|
|
14915
|
+
};
|
|
14916
|
+
break;
|
|
14917
|
+
case "InternalServerErrorException":
|
|
14918
|
+
case "com.amazonaws.pinpoint#InternalServerErrorException":
|
|
14919
|
+
response = {
|
|
14920
|
+
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
14921
|
+
name: errorCode,
|
|
14922
|
+
$metadata: deserializeMetadata(output),
|
|
14923
|
+
};
|
|
14924
|
+
break;
|
|
14925
|
+
case "MethodNotAllowedException":
|
|
14926
|
+
case "com.amazonaws.pinpoint#MethodNotAllowedException":
|
|
14927
|
+
response = {
|
|
14928
|
+
...(await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)),
|
|
14929
|
+
name: errorCode,
|
|
14930
|
+
$metadata: deserializeMetadata(output),
|
|
14931
|
+
};
|
|
14932
|
+
break;
|
|
14933
|
+
case "NotFoundException":
|
|
14934
|
+
case "com.amazonaws.pinpoint#NotFoundException":
|
|
14935
|
+
response = {
|
|
14936
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
14937
|
+
name: errorCode,
|
|
14938
|
+
$metadata: deserializeMetadata(output),
|
|
14939
|
+
};
|
|
14940
|
+
break;
|
|
14941
|
+
case "PayloadTooLargeException":
|
|
14942
|
+
case "com.amazonaws.pinpoint#PayloadTooLargeException":
|
|
14943
|
+
response = {
|
|
14944
|
+
...(await deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context)),
|
|
14945
|
+
name: errorCode,
|
|
14946
|
+
$metadata: deserializeMetadata(output),
|
|
14947
|
+
};
|
|
14948
|
+
break;
|
|
14949
|
+
case "TooManyRequestsException":
|
|
14950
|
+
case "com.amazonaws.pinpoint#TooManyRequestsException":
|
|
14951
|
+
response = {
|
|
14952
|
+
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
14953
|
+
name: errorCode,
|
|
14954
|
+
$metadata: deserializeMetadata(output),
|
|
14955
|
+
};
|
|
14956
|
+
break;
|
|
14957
|
+
default:
|
|
14958
|
+
const parsedBody = parsedOutput.body;
|
|
14959
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14960
|
+
response = {
|
|
14961
|
+
...parsedBody,
|
|
14962
|
+
name: `${errorCode}`,
|
|
14963
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
14964
|
+
$fault: "client",
|
|
14965
|
+
$metadata: deserializeMetadata(output),
|
|
14966
|
+
};
|
|
14967
|
+
}
|
|
14968
|
+
const message = response.message || response.Message || errorCode;
|
|
14969
|
+
response.message = message;
|
|
14970
|
+
delete response.Message;
|
|
14971
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
14972
|
+
};
|
|
14715
14973
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
14716
14974
|
const contents = {
|
|
14717
14975
|
name: "BadRequestException",
|
|
@@ -16222,6 +16480,25 @@ const serializeAws_restJson1SegmentReference = (input, context) => {
|
|
|
16222
16480
|
...(input.Version !== undefined && input.Version !== null && { Version: input.Version }),
|
|
16223
16481
|
};
|
|
16224
16482
|
};
|
|
16483
|
+
const serializeAws_restJson1SendOTPMessageRequestParameters = (input, context) => {
|
|
16484
|
+
return {
|
|
16485
|
+
...(input.AllowedAttempts !== undefined &&
|
|
16486
|
+
input.AllowedAttempts !== null && { AllowedAttempts: input.AllowedAttempts }),
|
|
16487
|
+
...(input.BrandName !== undefined && input.BrandName !== null && { BrandName: input.BrandName }),
|
|
16488
|
+
...(input.Channel !== undefined && input.Channel !== null && { Channel: input.Channel }),
|
|
16489
|
+
...(input.CodeLength !== undefined && input.CodeLength !== null && { CodeLength: input.CodeLength }),
|
|
16490
|
+
...(input.DestinationIdentity !== undefined &&
|
|
16491
|
+
input.DestinationIdentity !== null && { DestinationIdentity: input.DestinationIdentity }),
|
|
16492
|
+
...(input.EntityId !== undefined && input.EntityId !== null && { EntityId: input.EntityId }),
|
|
16493
|
+
...(input.Language !== undefined && input.Language !== null && { Language: input.Language }),
|
|
16494
|
+
...(input.OriginationIdentity !== undefined &&
|
|
16495
|
+
input.OriginationIdentity !== null && { OriginationIdentity: input.OriginationIdentity }),
|
|
16496
|
+
...(input.ReferenceId !== undefined && input.ReferenceId !== null && { ReferenceId: input.ReferenceId }),
|
|
16497
|
+
...(input.TemplateId !== undefined && input.TemplateId !== null && { TemplateId: input.TemplateId }),
|
|
16498
|
+
...(input.ValidityPeriod !== undefined &&
|
|
16499
|
+
input.ValidityPeriod !== null && { ValidityPeriod: input.ValidityPeriod }),
|
|
16500
|
+
};
|
|
16501
|
+
};
|
|
16225
16502
|
const serializeAws_restJson1SendUsersMessageRequest = (input, context) => {
|
|
16226
16503
|
return {
|
|
16227
16504
|
...(input.Context !== undefined &&
|
|
@@ -16409,6 +16686,14 @@ const serializeAws_restJson1UpdateRecommenderConfigurationShape = (input, contex
|
|
|
16409
16686
|
input.RecommendationsPerMessage !== null && { RecommendationsPerMessage: input.RecommendationsPerMessage }),
|
|
16410
16687
|
};
|
|
16411
16688
|
};
|
|
16689
|
+
const serializeAws_restJson1VerifyOTPMessageRequestParameters = (input, context) => {
|
|
16690
|
+
return {
|
|
16691
|
+
...(input.DestinationIdentity !== undefined &&
|
|
16692
|
+
input.DestinationIdentity !== null && { DestinationIdentity: input.DestinationIdentity }),
|
|
16693
|
+
...(input.Otp !== undefined && input.Otp !== null && { Otp: input.Otp }),
|
|
16694
|
+
...(input.ReferenceId !== undefined && input.ReferenceId !== null && { ReferenceId: input.ReferenceId }),
|
|
16695
|
+
};
|
|
16696
|
+
};
|
|
16412
16697
|
const serializeAws_restJson1VoiceChannelRequest = (input, context) => {
|
|
16413
16698
|
return {
|
|
16414
16699
|
...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
|
|
@@ -18573,6 +18858,11 @@ const deserializeAws_restJson1TreatmentResource = (output, context) => {
|
|
|
18573
18858
|
TreatmentName: smithy_client_1.expectString(output.TreatmentName),
|
|
18574
18859
|
};
|
|
18575
18860
|
};
|
|
18861
|
+
const deserializeAws_restJson1VerificationResponse = (output, context) => {
|
|
18862
|
+
return {
|
|
18863
|
+
Valid: smithy_client_1.expectBoolean(output.Valid),
|
|
18864
|
+
};
|
|
18865
|
+
};
|
|
18576
18866
|
const deserializeAws_restJson1VoiceChannelResponse = (output, context) => {
|
|
18577
18867
|
return {
|
|
18578
18868
|
ApplicationId: smithy_client_1.expectString(output.ApplicationId),
|
|
@@ -15,10 +15,8 @@ const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
|
|
|
15
15
|
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
16
16
|
const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
|
|
17
17
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
18
|
-
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
19
18
|
const getRuntimeConfig = (config) => {
|
|
20
19
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
21
|
-
smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
|
|
22
20
|
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
23
21
|
return {
|
|
24
22
|
...clientSharedValues,
|
package/dist-es/Pinpoint.js
CHANGED
|
@@ -89,6 +89,7 @@ import { PutEventsCommand } from "./commands/PutEventsCommand";
|
|
|
89
89
|
import { PutEventStreamCommand, } from "./commands/PutEventStreamCommand";
|
|
90
90
|
import { RemoveAttributesCommand, } from "./commands/RemoveAttributesCommand";
|
|
91
91
|
import { SendMessagesCommand, } from "./commands/SendMessagesCommand";
|
|
92
|
+
import { SendOTPMessageCommand, } from "./commands/SendOTPMessageCommand";
|
|
92
93
|
import { SendUsersMessagesCommand, } from "./commands/SendUsersMessagesCommand";
|
|
93
94
|
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
94
95
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
@@ -116,6 +117,7 @@ import { UpdateSmsTemplateCommand, } from "./commands/UpdateSmsTemplateCommand";
|
|
|
116
117
|
import { UpdateTemplateActiveVersionCommand, } from "./commands/UpdateTemplateActiveVersionCommand";
|
|
117
118
|
import { UpdateVoiceChannelCommand, } from "./commands/UpdateVoiceChannelCommand";
|
|
118
119
|
import { UpdateVoiceTemplateCommand, } from "./commands/UpdateVoiceTemplateCommand";
|
|
120
|
+
import { VerifyOTPMessageCommand, } from "./commands/VerifyOTPMessageCommand";
|
|
119
121
|
import { PinpointClient } from "./PinpointClient";
|
|
120
122
|
var Pinpoint = (function (_super) {
|
|
121
123
|
__extends(Pinpoint, _super);
|
|
@@ -1382,6 +1384,20 @@ var Pinpoint = (function (_super) {
|
|
|
1382
1384
|
return this.send(command, optionsOrCb);
|
|
1383
1385
|
}
|
|
1384
1386
|
};
|
|
1387
|
+
Pinpoint.prototype.sendOTPMessage = function (args, optionsOrCb, cb) {
|
|
1388
|
+
var command = new SendOTPMessageCommand(args);
|
|
1389
|
+
if (typeof optionsOrCb === "function") {
|
|
1390
|
+
this.send(command, optionsOrCb);
|
|
1391
|
+
}
|
|
1392
|
+
else if (typeof cb === "function") {
|
|
1393
|
+
if (typeof optionsOrCb !== "object")
|
|
1394
|
+
throw new Error("Expect http options but get " + typeof optionsOrCb);
|
|
1395
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
1396
|
+
}
|
|
1397
|
+
else {
|
|
1398
|
+
return this.send(command, optionsOrCb);
|
|
1399
|
+
}
|
|
1400
|
+
};
|
|
1385
1401
|
Pinpoint.prototype.sendUsersMessages = function (args, optionsOrCb, cb) {
|
|
1386
1402
|
var command = new SendUsersMessagesCommand(args);
|
|
1387
1403
|
if (typeof optionsOrCb === "function") {
|
|
@@ -1760,6 +1776,20 @@ var Pinpoint = (function (_super) {
|
|
|
1760
1776
|
return this.send(command, optionsOrCb);
|
|
1761
1777
|
}
|
|
1762
1778
|
};
|
|
1779
|
+
Pinpoint.prototype.verifyOTPMessage = function (args, optionsOrCb, cb) {
|
|
1780
|
+
var command = new VerifyOTPMessageCommand(args);
|
|
1781
|
+
if (typeof optionsOrCb === "function") {
|
|
1782
|
+
this.send(command, optionsOrCb);
|
|
1783
|
+
}
|
|
1784
|
+
else if (typeof cb === "function") {
|
|
1785
|
+
if (typeof optionsOrCb !== "object")
|
|
1786
|
+
throw new Error("Expect http options but get " + typeof optionsOrCb);
|
|
1787
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
1788
|
+
}
|
|
1789
|
+
else {
|
|
1790
|
+
return this.send(command, optionsOrCb);
|
|
1791
|
+
}
|
|
1792
|
+
};
|
|
1763
1793
|
return Pinpoint;
|
|
1764
1794
|
}(PinpointClient));
|
|
1765
1795
|
export { Pinpoint };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { SendOTPMessageRequest, SendOTPMessageResponse } from "../models/models_1";
|
|
5
|
+
import { deserializeAws_restJson1SendOTPMessageCommand, serializeAws_restJson1SendOTPMessageCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var SendOTPMessageCommand = (function (_super) {
|
|
7
|
+
__extends(SendOTPMessageCommand, _super);
|
|
8
|
+
function SendOTPMessageCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
SendOTPMessageCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "PinpointClient";
|
|
18
|
+
var commandName = "SendOTPMessageCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: SendOTPMessageRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: SendOTPMessageResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
SendOTPMessageCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1SendOTPMessageCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
SendOTPMessageCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1SendOTPMessageCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return SendOTPMessageCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { SendOTPMessageCommand };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { VerifyOTPMessageRequest, VerifyOTPMessageResponse } from "../models/models_1";
|
|
5
|
+
import { deserializeAws_restJson1VerifyOTPMessageCommand, serializeAws_restJson1VerifyOTPMessageCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var VerifyOTPMessageCommand = (function (_super) {
|
|
7
|
+
__extends(VerifyOTPMessageCommand, _super);
|
|
8
|
+
function VerifyOTPMessageCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
VerifyOTPMessageCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "PinpointClient";
|
|
18
|
+
var commandName = "VerifyOTPMessageCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: VerifyOTPMessageRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: VerifyOTPMessageResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
VerifyOTPMessageCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1VerifyOTPMessageCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
VerifyOTPMessageCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1VerifyOTPMessageCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return VerifyOTPMessageCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { VerifyOTPMessageCommand };
|
|
@@ -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";
|
package/dist-es/endpoints.js
CHANGED
|
@@ -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 = {}));
|