@aws-sdk/client-pinpoint 3.39.0 → 3.43.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 +41 -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 +104 -20
- package/dist-cjs/models/models_1.js +44 -2
- package/dist-cjs/protocols/Aws_restJson1.js +294 -4
- package/dist-cjs/runtimeConfig.browser.js +6 -3
- package/dist-cjs/runtimeConfig.js +5 -3
- package/dist-es/Pinpoint.js +30 -0
- package/dist-es/commands/SendOTPMessageCommand.js +39 -0
- package/dist-es/commands/VerifyOTPMessageCommand.js +39 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/endpoints.js +104 -20
- package/dist-es/models/models_1.js +28 -0
- package/dist-es/protocols/Aws_restJson1.js +310 -0
- package/dist-es/runtimeConfig.browser.js +3 -2
- package/dist-es/runtimeConfig.js +3 -3
- package/dist-types/Pinpoint.d.ts +14 -0
- package/dist-types/PinpointClient.d.ts +12 -2
- package/dist-types/commands/CreateAppCommand.d.ts +1 -1
- package/dist-types/commands/CreateCampaignCommand.d.ts +1 -1
- package/dist-types/commands/CreateEmailTemplateCommand.d.ts +1 -1
- package/dist-types/commands/CreateExportJobCommand.d.ts +1 -1
- package/dist-types/commands/CreateImportJobCommand.d.ts +1 -1
- package/dist-types/commands/CreateInAppTemplateCommand.d.ts +1 -1
- package/dist-types/commands/CreateJourneyCommand.d.ts +1 -1
- package/dist-types/commands/CreatePushTemplateCommand.d.ts +1 -1
- package/dist-types/commands/CreateRecommenderConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/CreateSegmentCommand.d.ts +1 -1
- package/dist-types/commands/CreateSmsTemplateCommand.d.ts +1 -1
- package/dist-types/commands/CreateVoiceTemplateCommand.d.ts +1 -1
- package/dist-types/commands/DeleteAdmChannelCommand.d.ts +1 -1
- package/dist-types/commands/DeleteApnsChannelCommand.d.ts +1 -1
- package/dist-types/commands/DeleteApnsSandboxChannelCommand.d.ts +1 -1
- package/dist-types/commands/DeleteApnsVoipChannelCommand.d.ts +1 -1
- package/dist-types/commands/DeleteApnsVoipSandboxChannelCommand.d.ts +1 -1
- package/dist-types/commands/DeleteAppCommand.d.ts +1 -1
- package/dist-types/commands/DeleteBaiduChannelCommand.d.ts +1 -1
- package/dist-types/commands/DeleteCampaignCommand.d.ts +1 -1
- package/dist-types/commands/DeleteEmailChannelCommand.d.ts +1 -1
- package/dist-types/commands/DeleteEmailTemplateCommand.d.ts +1 -1
- package/dist-types/commands/DeleteEndpointCommand.d.ts +1 -1
- package/dist-types/commands/DeleteEventStreamCommand.d.ts +1 -1
- package/dist-types/commands/DeleteGcmChannelCommand.d.ts +1 -1
- package/dist-types/commands/DeleteInAppTemplateCommand.d.ts +1 -1
- package/dist-types/commands/DeleteJourneyCommand.d.ts +1 -1
- package/dist-types/commands/DeletePushTemplateCommand.d.ts +1 -1
- package/dist-types/commands/DeleteRecommenderConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/DeleteSegmentCommand.d.ts +1 -1
- package/dist-types/commands/DeleteSmsChannelCommand.d.ts +1 -1
- package/dist-types/commands/DeleteSmsTemplateCommand.d.ts +1 -1
- package/dist-types/commands/DeleteUserEndpointsCommand.d.ts +1 -1
- package/dist-types/commands/DeleteVoiceChannelCommand.d.ts +1 -1
- package/dist-types/commands/DeleteVoiceTemplateCommand.d.ts +1 -1
- package/dist-types/commands/GetAdmChannelCommand.d.ts +1 -1
- package/dist-types/commands/GetApnsChannelCommand.d.ts +1 -1
- package/dist-types/commands/GetApnsSandboxChannelCommand.d.ts +1 -1
- package/dist-types/commands/GetApnsVoipChannelCommand.d.ts +1 -1
- package/dist-types/commands/GetApnsVoipSandboxChannelCommand.d.ts +1 -1
- package/dist-types/commands/GetAppCommand.d.ts +1 -1
- package/dist-types/commands/GetApplicationDateRangeKpiCommand.d.ts +1 -1
- package/dist-types/commands/GetApplicationSettingsCommand.d.ts +1 -1
- package/dist-types/commands/GetAppsCommand.d.ts +1 -1
- package/dist-types/commands/GetBaiduChannelCommand.d.ts +1 -1
- package/dist-types/commands/GetCampaignActivitiesCommand.d.ts +1 -1
- package/dist-types/commands/GetCampaignCommand.d.ts +1 -1
- package/dist-types/commands/GetCampaignDateRangeKpiCommand.d.ts +1 -1
- package/dist-types/commands/GetCampaignVersionCommand.d.ts +1 -1
- package/dist-types/commands/GetCampaignVersionsCommand.d.ts +1 -1
- package/dist-types/commands/GetCampaignsCommand.d.ts +1 -1
- package/dist-types/commands/GetChannelsCommand.d.ts +1 -1
- package/dist-types/commands/GetEmailChannelCommand.d.ts +1 -1
- package/dist-types/commands/GetEmailTemplateCommand.d.ts +1 -1
- package/dist-types/commands/GetEndpointCommand.d.ts +1 -1
- package/dist-types/commands/GetEventStreamCommand.d.ts +1 -1
- package/dist-types/commands/GetExportJobCommand.d.ts +1 -1
- package/dist-types/commands/GetExportJobsCommand.d.ts +1 -1
- package/dist-types/commands/GetGcmChannelCommand.d.ts +1 -1
- package/dist-types/commands/GetImportJobCommand.d.ts +1 -1
- package/dist-types/commands/GetImportJobsCommand.d.ts +1 -1
- package/dist-types/commands/GetInAppMessagesCommand.d.ts +1 -1
- package/dist-types/commands/GetInAppTemplateCommand.d.ts +1 -1
- package/dist-types/commands/GetJourneyCommand.d.ts +1 -1
- package/dist-types/commands/GetJourneyDateRangeKpiCommand.d.ts +1 -1
- package/dist-types/commands/GetJourneyExecutionActivityMetricsCommand.d.ts +1 -1
- package/dist-types/commands/GetJourneyExecutionMetricsCommand.d.ts +1 -1
- package/dist-types/commands/GetPushTemplateCommand.d.ts +1 -1
- package/dist-types/commands/GetRecommenderConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/GetRecommenderConfigurationsCommand.d.ts +1 -1
- package/dist-types/commands/GetSegmentCommand.d.ts +1 -1
- package/dist-types/commands/GetSegmentExportJobsCommand.d.ts +1 -1
- package/dist-types/commands/GetSegmentImportJobsCommand.d.ts +1 -1
- package/dist-types/commands/GetSegmentVersionCommand.d.ts +1 -1
- package/dist-types/commands/GetSegmentVersionsCommand.d.ts +1 -1
- package/dist-types/commands/GetSegmentsCommand.d.ts +1 -1
- package/dist-types/commands/GetSmsChannelCommand.d.ts +1 -1
- package/dist-types/commands/GetSmsTemplateCommand.d.ts +1 -1
- package/dist-types/commands/GetUserEndpointsCommand.d.ts +1 -1
- package/dist-types/commands/GetVoiceChannelCommand.d.ts +1 -1
- package/dist-types/commands/GetVoiceTemplateCommand.d.ts +1 -1
- package/dist-types/commands/ListJourneysCommand.d.ts +1 -1
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/dist-types/commands/ListTemplateVersionsCommand.d.ts +1 -1
- package/dist-types/commands/ListTemplatesCommand.d.ts +1 -1
- package/dist-types/commands/PhoneNumberValidateCommand.d.ts +1 -1
- package/dist-types/commands/PutEventStreamCommand.d.ts +1 -1
- package/dist-types/commands/PutEventsCommand.d.ts +1 -1
- package/dist-types/commands/RemoveAttributesCommand.d.ts +1 -1
- package/dist-types/commands/SendMessagesCommand.d.ts +1 -1
- package/dist-types/commands/SendOTPMessageCommand.d.ts +35 -0
- package/dist-types/commands/SendUsersMessagesCommand.d.ts +1 -1
- package/dist-types/commands/TagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UpdateAdmChannelCommand.d.ts +1 -1
- package/dist-types/commands/UpdateApnsChannelCommand.d.ts +1 -1
- package/dist-types/commands/UpdateApnsSandboxChannelCommand.d.ts +1 -1
- package/dist-types/commands/UpdateApnsVoipChannelCommand.d.ts +1 -1
- package/dist-types/commands/UpdateApnsVoipSandboxChannelCommand.d.ts +1 -1
- package/dist-types/commands/UpdateApplicationSettingsCommand.d.ts +1 -1
- package/dist-types/commands/UpdateBaiduChannelCommand.d.ts +1 -1
- package/dist-types/commands/UpdateCampaignCommand.d.ts +1 -1
- package/dist-types/commands/UpdateEmailChannelCommand.d.ts +1 -1
- package/dist-types/commands/UpdateEmailTemplateCommand.d.ts +1 -1
- package/dist-types/commands/UpdateEndpointCommand.d.ts +1 -1
- package/dist-types/commands/UpdateEndpointsBatchCommand.d.ts +1 -1
- package/dist-types/commands/UpdateGcmChannelCommand.d.ts +1 -1
- package/dist-types/commands/UpdateInAppTemplateCommand.d.ts +1 -1
- package/dist-types/commands/UpdateJourneyCommand.d.ts +1 -1
- package/dist-types/commands/UpdateJourneyStateCommand.d.ts +1 -1
- package/dist-types/commands/UpdatePushTemplateCommand.d.ts +1 -1
- package/dist-types/commands/UpdateRecommenderConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/UpdateSegmentCommand.d.ts +1 -1
- package/dist-types/commands/UpdateSmsChannelCommand.d.ts +1 -1
- package/dist-types/commands/UpdateSmsTemplateCommand.d.ts +1 -1
- package/dist-types/commands/UpdateTemplateActiveVersionCommand.d.ts +1 -1
- package/dist-types/commands/UpdateVoiceChannelCommand.d.ts +1 -1
- package/dist-types/commands/UpdateVoiceTemplateCommand.d.ts +1 -1
- 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/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/runtimeConfig.d.ts +2 -0
- package/dist-types/runtimeConfig.native.d.ts +2 -0
- package/dist-types/ts3.4/Pinpoint.d.ts +10 -0
- package/dist-types/ts3.4/PinpointClient.d.ts +8 -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/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
- package/package.json +23 -23
package/dist-es/endpoints.js
CHANGED
|
@@ -1,28 +1,43 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
3
3
|
var regionHash = {
|
|
4
|
-
"fips-us-east-1": {
|
|
5
|
-
hostname: "pinpoint-fips.us-east-1.amazonaws.com",
|
|
6
|
-
signingRegion: "us-east-1",
|
|
7
|
-
},
|
|
8
|
-
"fips-us-gov-west-1": {
|
|
9
|
-
hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com",
|
|
10
|
-
signingRegion: "us-gov-west-1",
|
|
11
|
-
},
|
|
12
|
-
"fips-us-west-2": {
|
|
13
|
-
hostname: "pinpoint-fips.us-west-2.amazonaws.com",
|
|
14
|
-
signingRegion: "us-west-2",
|
|
15
|
-
},
|
|
16
4
|
"us-east-1": {
|
|
17
|
-
|
|
5
|
+
variants: [
|
|
6
|
+
{
|
|
7
|
+
hostname: "pinpoint.us-east-1.amazonaws.com",
|
|
8
|
+
tags: [],
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
hostname: "pinpoint-fips.us-east-1.amazonaws.com",
|
|
12
|
+
tags: ["fips"],
|
|
13
|
+
},
|
|
14
|
+
],
|
|
18
15
|
signingRegion: "us-east-1",
|
|
19
16
|
},
|
|
20
17
|
"us-gov-west-1": {
|
|
21
|
-
|
|
18
|
+
variants: [
|
|
19
|
+
{
|
|
20
|
+
hostname: "pinpoint.us-gov-west-1.amazonaws.com",
|
|
21
|
+
tags: [],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com",
|
|
25
|
+
tags: ["fips"],
|
|
26
|
+
},
|
|
27
|
+
],
|
|
22
28
|
signingRegion: "us-gov-west-1",
|
|
23
29
|
},
|
|
24
30
|
"us-west-2": {
|
|
25
|
-
|
|
31
|
+
variants: [
|
|
32
|
+
{
|
|
33
|
+
hostname: "pinpoint.us-west-2.amazonaws.com",
|
|
34
|
+
tags: [],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
hostname: "pinpoint-fips.us-west-2.amazonaws.com",
|
|
38
|
+
tags: ["fips"],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
26
41
|
signingRegion: "us-west-2",
|
|
27
42
|
},
|
|
28
43
|
};
|
|
@@ -54,27 +69,96 @@ var partitionHash = {
|
|
|
54
69
|
"us-west-2",
|
|
55
70
|
],
|
|
56
71
|
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
|
|
57
|
-
|
|
72
|
+
variants: [
|
|
73
|
+
{
|
|
74
|
+
hostname: "pinpoint.{region}.amazonaws.com",
|
|
75
|
+
tags: [],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
hostname: "pinpoint-fips.{region}.amazonaws.com",
|
|
79
|
+
tags: ["fips"],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
hostname: "pinpoint-fips.{region}.api.aws",
|
|
83
|
+
tags: ["dualstack", "fips"],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
hostname: "pinpoint.{region}.api.aws",
|
|
87
|
+
tags: ["dualstack"],
|
|
88
|
+
},
|
|
89
|
+
],
|
|
58
90
|
},
|
|
59
91
|
"aws-cn": {
|
|
60
92
|
regions: ["cn-north-1", "cn-northwest-1"],
|
|
61
93
|
regionRegex: "^cn\\-\\w+\\-\\d+$",
|
|
62
|
-
|
|
94
|
+
variants: [
|
|
95
|
+
{
|
|
96
|
+
hostname: "pinpoint.{region}.amazonaws.com.cn",
|
|
97
|
+
tags: [],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
hostname: "pinpoint-fips.{region}.amazonaws.com.cn",
|
|
101
|
+
tags: ["fips"],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
hostname: "pinpoint-fips.{region}.api.amazonwebservices.com.cn",
|
|
105
|
+
tags: ["dualstack", "fips"],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
hostname: "pinpoint.{region}.api.amazonwebservices.com.cn",
|
|
109
|
+
tags: ["dualstack"],
|
|
110
|
+
},
|
|
111
|
+
],
|
|
63
112
|
},
|
|
64
113
|
"aws-iso": {
|
|
65
114
|
regions: ["us-iso-east-1", "us-iso-west-1"],
|
|
66
115
|
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
|
|
67
|
-
|
|
116
|
+
variants: [
|
|
117
|
+
{
|
|
118
|
+
hostname: "pinpoint.{region}.c2s.ic.gov",
|
|
119
|
+
tags: [],
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
hostname: "pinpoint-fips.{region}.c2s.ic.gov",
|
|
123
|
+
tags: ["fips"],
|
|
124
|
+
},
|
|
125
|
+
],
|
|
68
126
|
},
|
|
69
127
|
"aws-iso-b": {
|
|
70
128
|
regions: ["us-isob-east-1"],
|
|
71
129
|
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
|
|
72
|
-
|
|
130
|
+
variants: [
|
|
131
|
+
{
|
|
132
|
+
hostname: "pinpoint.{region}.sc2s.sgov.gov",
|
|
133
|
+
tags: [],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
hostname: "pinpoint-fips.{region}.sc2s.sgov.gov",
|
|
137
|
+
tags: ["fips"],
|
|
138
|
+
},
|
|
139
|
+
],
|
|
73
140
|
},
|
|
74
141
|
"aws-us-gov": {
|
|
75
142
|
regions: ["fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"],
|
|
76
143
|
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
|
|
77
|
-
|
|
144
|
+
variants: [
|
|
145
|
+
{
|
|
146
|
+
hostname: "pinpoint.{region}.amazonaws.com",
|
|
147
|
+
tags: [],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
hostname: "pinpoint-fips.{region}.amazonaws.com",
|
|
151
|
+
tags: ["fips"],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
hostname: "pinpoint-fips.{region}.api.aws",
|
|
155
|
+
tags: ["dualstack", "fips"],
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
hostname: "pinpoint.{region}.api.aws",
|
|
159
|
+
tags: ["dualstack"],
|
|
160
|
+
},
|
|
161
|
+
],
|
|
78
162
|
},
|
|
79
163
|
};
|
|
80
164
|
export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -403,6 +403,18 @@ export var SendMessagesResponse;
|
|
|
403
403
|
(function (SendMessagesResponse) {
|
|
404
404
|
SendMessagesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
405
405
|
})(SendMessagesResponse || (SendMessagesResponse = {}));
|
|
406
|
+
export var SendOTPMessageRequestParameters;
|
|
407
|
+
(function (SendOTPMessageRequestParameters) {
|
|
408
|
+
SendOTPMessageRequestParameters.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
409
|
+
})(SendOTPMessageRequestParameters || (SendOTPMessageRequestParameters = {}));
|
|
410
|
+
export var SendOTPMessageRequest;
|
|
411
|
+
(function (SendOTPMessageRequest) {
|
|
412
|
+
SendOTPMessageRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
413
|
+
})(SendOTPMessageRequest || (SendOTPMessageRequest = {}));
|
|
414
|
+
export var SendOTPMessageResponse;
|
|
415
|
+
(function (SendOTPMessageResponse) {
|
|
416
|
+
SendOTPMessageResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
417
|
+
})(SendOTPMessageResponse || (SendOTPMessageResponse = {}));
|
|
406
418
|
export var SendUsersMessageRequest;
|
|
407
419
|
(function (SendUsersMessageRequest) {
|
|
408
420
|
SendUsersMessageRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -639,3 +651,19 @@ export var UpdateVoiceTemplateResponse;
|
|
|
639
651
|
(function (UpdateVoiceTemplateResponse) {
|
|
640
652
|
UpdateVoiceTemplateResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
641
653
|
})(UpdateVoiceTemplateResponse || (UpdateVoiceTemplateResponse = {}));
|
|
654
|
+
export var VerifyOTPMessageRequestParameters;
|
|
655
|
+
(function (VerifyOTPMessageRequestParameters) {
|
|
656
|
+
VerifyOTPMessageRequestParameters.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
657
|
+
})(VerifyOTPMessageRequestParameters || (VerifyOTPMessageRequestParameters = {}));
|
|
658
|
+
export var VerifyOTPMessageRequest;
|
|
659
|
+
(function (VerifyOTPMessageRequest) {
|
|
660
|
+
VerifyOTPMessageRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
661
|
+
})(VerifyOTPMessageRequest || (VerifyOTPMessageRequest = {}));
|
|
662
|
+
export var VerificationResponse;
|
|
663
|
+
(function (VerificationResponse) {
|
|
664
|
+
VerificationResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
665
|
+
})(VerificationResponse || (VerificationResponse = {}));
|
|
666
|
+
export var VerifyOTPMessageResponse;
|
|
667
|
+
(function (VerifyOTPMessageResponse) {
|
|
668
|
+
VerifyOTPMessageResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
669
|
+
})(VerifyOTPMessageResponse || (VerifyOTPMessageResponse = {}));
|
|
@@ -3299,6 +3299,46 @@ export var serializeAws_restJson1SendMessagesCommand = function (input, context)
|
|
|
3299
3299
|
}
|
|
3300
3300
|
});
|
|
3301
3301
|
}); };
|
|
3302
|
+
export var serializeAws_restJson1SendOTPMessageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3303
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
3304
|
+
return __generator(this, function (_c) {
|
|
3305
|
+
switch (_c.label) {
|
|
3306
|
+
case 0: return [4, context.endpoint()];
|
|
3307
|
+
case 1:
|
|
3308
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3309
|
+
headers = {
|
|
3310
|
+
"content-type": "application/json",
|
|
3311
|
+
};
|
|
3312
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/apps/{ApplicationId}/otp";
|
|
3313
|
+
if (input.ApplicationId !== undefined) {
|
|
3314
|
+
labelValue = input.ApplicationId;
|
|
3315
|
+
if (labelValue.length <= 0) {
|
|
3316
|
+
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
3317
|
+
}
|
|
3318
|
+
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
3319
|
+
}
|
|
3320
|
+
else {
|
|
3321
|
+
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
3322
|
+
}
|
|
3323
|
+
if (input.SendOTPMessageRequestParameters !== undefined) {
|
|
3324
|
+
body = serializeAws_restJson1SendOTPMessageRequestParameters(input.SendOTPMessageRequestParameters, context);
|
|
3325
|
+
}
|
|
3326
|
+
if (body === undefined) {
|
|
3327
|
+
body = {};
|
|
3328
|
+
}
|
|
3329
|
+
body = JSON.stringify(body);
|
|
3330
|
+
return [2, new __HttpRequest({
|
|
3331
|
+
protocol: protocol,
|
|
3332
|
+
hostname: hostname,
|
|
3333
|
+
port: port,
|
|
3334
|
+
method: "POST",
|
|
3335
|
+
headers: headers,
|
|
3336
|
+
path: resolvedPath,
|
|
3337
|
+
body: body,
|
|
3338
|
+
})];
|
|
3339
|
+
}
|
|
3340
|
+
});
|
|
3341
|
+
}); };
|
|
3302
3342
|
export var serializeAws_restJson1SendUsersMessagesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3303
3343
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
3304
3344
|
return __generator(this, function (_c) {
|
|
@@ -4451,6 +4491,46 @@ export var serializeAws_restJson1UpdateVoiceTemplateCommand = function (input, c
|
|
|
4451
4491
|
}
|
|
4452
4492
|
});
|
|
4453
4493
|
}); };
|
|
4494
|
+
export var serializeAws_restJson1VerifyOTPMessageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4495
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
4496
|
+
return __generator(this, function (_c) {
|
|
4497
|
+
switch (_c.label) {
|
|
4498
|
+
case 0: return [4, context.endpoint()];
|
|
4499
|
+
case 1:
|
|
4500
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
4501
|
+
headers = {
|
|
4502
|
+
"content-type": "application/json",
|
|
4503
|
+
};
|
|
4504
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/apps/{ApplicationId}/verify-otp";
|
|
4505
|
+
if (input.ApplicationId !== undefined) {
|
|
4506
|
+
labelValue = input.ApplicationId;
|
|
4507
|
+
if (labelValue.length <= 0) {
|
|
4508
|
+
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
4509
|
+
}
|
|
4510
|
+
resolvedPath = resolvedPath.replace("{ApplicationId}", __extendedEncodeURIComponent(labelValue));
|
|
4511
|
+
}
|
|
4512
|
+
else {
|
|
4513
|
+
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
4514
|
+
}
|
|
4515
|
+
if (input.VerifyOTPMessageRequestParameters !== undefined) {
|
|
4516
|
+
body = serializeAws_restJson1VerifyOTPMessageRequestParameters(input.VerifyOTPMessageRequestParameters, context);
|
|
4517
|
+
}
|
|
4518
|
+
if (body === undefined) {
|
|
4519
|
+
body = {};
|
|
4520
|
+
}
|
|
4521
|
+
body = JSON.stringify(body);
|
|
4522
|
+
return [2, new __HttpRequest({
|
|
4523
|
+
protocol: protocol,
|
|
4524
|
+
hostname: hostname,
|
|
4525
|
+
port: port,
|
|
4526
|
+
method: "POST",
|
|
4527
|
+
headers: headers,
|
|
4528
|
+
path: resolvedPath,
|
|
4529
|
+
body: body,
|
|
4530
|
+
})];
|
|
4531
|
+
}
|
|
4532
|
+
});
|
|
4533
|
+
}); };
|
|
4454
4534
|
export var deserializeAws_restJson1CreateAppCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4455
4535
|
var contents, data, _a;
|
|
4456
4536
|
return __generator(this, function (_b) {
|
|
@@ -13925,6 +14005,113 @@ var deserializeAws_restJson1SendMessagesCommandError = function (output, context
|
|
|
13925
14005
|
}
|
|
13926
14006
|
});
|
|
13927
14007
|
}); };
|
|
14008
|
+
export var deserializeAws_restJson1SendOTPMessageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14009
|
+
var contents, data, _a;
|
|
14010
|
+
return __generator(this, function (_b) {
|
|
14011
|
+
switch (_b.label) {
|
|
14012
|
+
case 0:
|
|
14013
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14014
|
+
return [2, deserializeAws_restJson1SendOTPMessageCommandError(output, context)];
|
|
14015
|
+
}
|
|
14016
|
+
contents = {
|
|
14017
|
+
$metadata: deserializeMetadata(output),
|
|
14018
|
+
MessageResponse: undefined,
|
|
14019
|
+
};
|
|
14020
|
+
_a = __expectObject;
|
|
14021
|
+
return [4, parseBody(output.body, context)];
|
|
14022
|
+
case 1:
|
|
14023
|
+
data = _a.apply(void 0, [_b.sent()]);
|
|
14024
|
+
contents.MessageResponse = deserializeAws_restJson1MessageResponse(data, context);
|
|
14025
|
+
return [2, Promise.resolve(contents)];
|
|
14026
|
+
}
|
|
14027
|
+
});
|
|
14028
|
+
}); };
|
|
14029
|
+
var deserializeAws_restJson1SendOTPMessageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14030
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
14031
|
+
var _k;
|
|
14032
|
+
return __generator(this, function (_l) {
|
|
14033
|
+
switch (_l.label) {
|
|
14034
|
+
case 0:
|
|
14035
|
+
_a = [__assign({}, output)];
|
|
14036
|
+
_k = {};
|
|
14037
|
+
return [4, parseBody(output.body, context)];
|
|
14038
|
+
case 1:
|
|
14039
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
14040
|
+
errorCode = "UnknownError";
|
|
14041
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14042
|
+
_b = errorCode;
|
|
14043
|
+
switch (_b) {
|
|
14044
|
+
case "BadRequestException": return [3, 2];
|
|
14045
|
+
case "com.amazonaws.pinpoint#BadRequestException": return [3, 2];
|
|
14046
|
+
case "ForbiddenException": return [3, 4];
|
|
14047
|
+
case "com.amazonaws.pinpoint#ForbiddenException": return [3, 4];
|
|
14048
|
+
case "InternalServerErrorException": return [3, 6];
|
|
14049
|
+
case "com.amazonaws.pinpoint#InternalServerErrorException": return [3, 6];
|
|
14050
|
+
case "MethodNotAllowedException": return [3, 8];
|
|
14051
|
+
case "com.amazonaws.pinpoint#MethodNotAllowedException": return [3, 8];
|
|
14052
|
+
case "NotFoundException": return [3, 10];
|
|
14053
|
+
case "com.amazonaws.pinpoint#NotFoundException": return [3, 10];
|
|
14054
|
+
case "PayloadTooLargeException": return [3, 12];
|
|
14055
|
+
case "com.amazonaws.pinpoint#PayloadTooLargeException": return [3, 12];
|
|
14056
|
+
case "TooManyRequestsException": return [3, 14];
|
|
14057
|
+
case "com.amazonaws.pinpoint#TooManyRequestsException": return [3, 14];
|
|
14058
|
+
}
|
|
14059
|
+
return [3, 16];
|
|
14060
|
+
case 2:
|
|
14061
|
+
_c = [{}];
|
|
14062
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
14063
|
+
case 3:
|
|
14064
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14065
|
+
return [3, 17];
|
|
14066
|
+
case 4:
|
|
14067
|
+
_d = [{}];
|
|
14068
|
+
return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
14069
|
+
case 5:
|
|
14070
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14071
|
+
return [3, 17];
|
|
14072
|
+
case 6:
|
|
14073
|
+
_e = [{}];
|
|
14074
|
+
return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
14075
|
+
case 7:
|
|
14076
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14077
|
+
return [3, 17];
|
|
14078
|
+
case 8:
|
|
14079
|
+
_f = [{}];
|
|
14080
|
+
return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
14081
|
+
case 9:
|
|
14082
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14083
|
+
return [3, 17];
|
|
14084
|
+
case 10:
|
|
14085
|
+
_g = [{}];
|
|
14086
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
14087
|
+
case 11:
|
|
14088
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14089
|
+
return [3, 17];
|
|
14090
|
+
case 12:
|
|
14091
|
+
_h = [{}];
|
|
14092
|
+
return [4, deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context)];
|
|
14093
|
+
case 13:
|
|
14094
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14095
|
+
return [3, 17];
|
|
14096
|
+
case 14:
|
|
14097
|
+
_j = [{}];
|
|
14098
|
+
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
14099
|
+
case 15:
|
|
14100
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14101
|
+
return [3, 17];
|
|
14102
|
+
case 16:
|
|
14103
|
+
parsedBody = parsedOutput.body;
|
|
14104
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14105
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14106
|
+
_l.label = 17;
|
|
14107
|
+
case 17:
|
|
14108
|
+
message = response.message || response.Message || errorCode;
|
|
14109
|
+
response.message = message;
|
|
14110
|
+
delete response.Message;
|
|
14111
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14112
|
+
}
|
|
14113
|
+
});
|
|
14114
|
+
}); };
|
|
13928
14115
|
export var deserializeAws_restJson1SendUsersMessagesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13929
14116
|
var contents, data, _a;
|
|
13930
14117
|
return __generator(this, function (_b) {
|
|
@@ -16696,6 +16883,113 @@ var deserializeAws_restJson1UpdateVoiceTemplateCommandError = function (output,
|
|
|
16696
16883
|
}
|
|
16697
16884
|
});
|
|
16698
16885
|
}); };
|
|
16886
|
+
export var deserializeAws_restJson1VerifyOTPMessageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16887
|
+
var contents, data, _a;
|
|
16888
|
+
return __generator(this, function (_b) {
|
|
16889
|
+
switch (_b.label) {
|
|
16890
|
+
case 0:
|
|
16891
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
16892
|
+
return [2, deserializeAws_restJson1VerifyOTPMessageCommandError(output, context)];
|
|
16893
|
+
}
|
|
16894
|
+
contents = {
|
|
16895
|
+
$metadata: deserializeMetadata(output),
|
|
16896
|
+
VerificationResponse: undefined,
|
|
16897
|
+
};
|
|
16898
|
+
_a = __expectObject;
|
|
16899
|
+
return [4, parseBody(output.body, context)];
|
|
16900
|
+
case 1:
|
|
16901
|
+
data = _a.apply(void 0, [_b.sent()]);
|
|
16902
|
+
contents.VerificationResponse = deserializeAws_restJson1VerificationResponse(data, context);
|
|
16903
|
+
return [2, Promise.resolve(contents)];
|
|
16904
|
+
}
|
|
16905
|
+
});
|
|
16906
|
+
}); };
|
|
16907
|
+
var deserializeAws_restJson1VerifyOTPMessageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16908
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
16909
|
+
var _k;
|
|
16910
|
+
return __generator(this, function (_l) {
|
|
16911
|
+
switch (_l.label) {
|
|
16912
|
+
case 0:
|
|
16913
|
+
_a = [__assign({}, output)];
|
|
16914
|
+
_k = {};
|
|
16915
|
+
return [4, parseBody(output.body, context)];
|
|
16916
|
+
case 1:
|
|
16917
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
16918
|
+
errorCode = "UnknownError";
|
|
16919
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
16920
|
+
_b = errorCode;
|
|
16921
|
+
switch (_b) {
|
|
16922
|
+
case "BadRequestException": return [3, 2];
|
|
16923
|
+
case "com.amazonaws.pinpoint#BadRequestException": return [3, 2];
|
|
16924
|
+
case "ForbiddenException": return [3, 4];
|
|
16925
|
+
case "com.amazonaws.pinpoint#ForbiddenException": return [3, 4];
|
|
16926
|
+
case "InternalServerErrorException": return [3, 6];
|
|
16927
|
+
case "com.amazonaws.pinpoint#InternalServerErrorException": return [3, 6];
|
|
16928
|
+
case "MethodNotAllowedException": return [3, 8];
|
|
16929
|
+
case "com.amazonaws.pinpoint#MethodNotAllowedException": return [3, 8];
|
|
16930
|
+
case "NotFoundException": return [3, 10];
|
|
16931
|
+
case "com.amazonaws.pinpoint#NotFoundException": return [3, 10];
|
|
16932
|
+
case "PayloadTooLargeException": return [3, 12];
|
|
16933
|
+
case "com.amazonaws.pinpoint#PayloadTooLargeException": return [3, 12];
|
|
16934
|
+
case "TooManyRequestsException": return [3, 14];
|
|
16935
|
+
case "com.amazonaws.pinpoint#TooManyRequestsException": return [3, 14];
|
|
16936
|
+
}
|
|
16937
|
+
return [3, 16];
|
|
16938
|
+
case 2:
|
|
16939
|
+
_c = [{}];
|
|
16940
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
16941
|
+
case 3:
|
|
16942
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16943
|
+
return [3, 17];
|
|
16944
|
+
case 4:
|
|
16945
|
+
_d = [{}];
|
|
16946
|
+
return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
16947
|
+
case 5:
|
|
16948
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16949
|
+
return [3, 17];
|
|
16950
|
+
case 6:
|
|
16951
|
+
_e = [{}];
|
|
16952
|
+
return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
16953
|
+
case 7:
|
|
16954
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16955
|
+
return [3, 17];
|
|
16956
|
+
case 8:
|
|
16957
|
+
_f = [{}];
|
|
16958
|
+
return [4, deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context)];
|
|
16959
|
+
case 9:
|
|
16960
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16961
|
+
return [3, 17];
|
|
16962
|
+
case 10:
|
|
16963
|
+
_g = [{}];
|
|
16964
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
16965
|
+
case 11:
|
|
16966
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16967
|
+
return [3, 17];
|
|
16968
|
+
case 12:
|
|
16969
|
+
_h = [{}];
|
|
16970
|
+
return [4, deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context)];
|
|
16971
|
+
case 13:
|
|
16972
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16973
|
+
return [3, 17];
|
|
16974
|
+
case 14:
|
|
16975
|
+
_j = [{}];
|
|
16976
|
+
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
16977
|
+
case 15:
|
|
16978
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
16979
|
+
return [3, 17];
|
|
16980
|
+
case 16:
|
|
16981
|
+
parsedBody = parsedOutput.body;
|
|
16982
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
16983
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
16984
|
+
_l.label = 17;
|
|
16985
|
+
case 17:
|
|
16986
|
+
message = response.message || response.Message || errorCode;
|
|
16987
|
+
response.message = message;
|
|
16988
|
+
delete response.Message;
|
|
16989
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
16990
|
+
}
|
|
16991
|
+
});
|
|
16992
|
+
}); };
|
|
16699
16993
|
var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16700
16994
|
var contents, data;
|
|
16701
16995
|
return __generator(this, function (_a) {
|
|
@@ -17659,6 +17953,13 @@ var serializeAws_restJson1SegmentLocation = function (input, context) {
|
|
|
17659
17953
|
var serializeAws_restJson1SegmentReference = function (input, context) {
|
|
17660
17954
|
return __assign(__assign({}, (input.Id !== undefined && input.Id !== null && { Id: input.Id })), (input.Version !== undefined && input.Version !== null && { Version: input.Version }));
|
|
17661
17955
|
};
|
|
17956
|
+
var serializeAws_restJson1SendOTPMessageRequestParameters = function (input, context) {
|
|
17957
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AllowedAttempts !== undefined &&
|
|
17958
|
+
input.AllowedAttempts !== null && { AllowedAttempts: input.AllowedAttempts })), (input.BrandName !== undefined && input.BrandName !== null && { BrandName: input.BrandName })), (input.Channel !== undefined && input.Channel !== null && { Channel: input.Channel })), (input.CodeLength !== undefined && input.CodeLength !== null && { CodeLength: input.CodeLength })), (input.DestinationIdentity !== undefined &&
|
|
17959
|
+
input.DestinationIdentity !== null && { DestinationIdentity: input.DestinationIdentity })), (input.EntityId !== undefined && input.EntityId !== null && { EntityId: input.EntityId })), (input.Language !== undefined && input.Language !== null && { Language: input.Language })), (input.OriginationIdentity !== undefined &&
|
|
17960
|
+
input.OriginationIdentity !== null && { OriginationIdentity: input.OriginationIdentity })), (input.ReferenceId !== undefined && input.ReferenceId !== null && { ReferenceId: input.ReferenceId })), (input.TemplateId !== undefined && input.TemplateId !== null && { TemplateId: input.TemplateId })), (input.ValidityPeriod !== undefined &&
|
|
17961
|
+
input.ValidityPeriod !== null && { ValidityPeriod: input.ValidityPeriod }));
|
|
17962
|
+
};
|
|
17662
17963
|
var serializeAws_restJson1SendUsersMessageRequest = function (input, context) {
|
|
17663
17964
|
return __assign(__assign(__assign(__assign(__assign({}, (input.Context !== undefined &&
|
|
17664
17965
|
input.Context !== null && { Context: serializeAws_restJson1MapOf__string(input.Context, context) })), (input.MessageConfiguration !== undefined &&
|
|
@@ -17768,6 +18069,10 @@ var serializeAws_restJson1UpdateRecommenderConfigurationShape = function (input,
|
|
|
17768
18069
|
input.RecommendationsDisplayName !== null && { RecommendationsDisplayName: input.RecommendationsDisplayName })), (input.RecommendationsPerMessage !== undefined &&
|
|
17769
18070
|
input.RecommendationsPerMessage !== null && { RecommendationsPerMessage: input.RecommendationsPerMessage }));
|
|
17770
18071
|
};
|
|
18072
|
+
var serializeAws_restJson1VerifyOTPMessageRequestParameters = function (input, context) {
|
|
18073
|
+
return __assign(__assign(__assign({}, (input.DestinationIdentity !== undefined &&
|
|
18074
|
+
input.DestinationIdentity !== null && { DestinationIdentity: input.DestinationIdentity })), (input.Otp !== undefined && input.Otp !== null && { Otp: input.Otp })), (input.ReferenceId !== undefined && input.ReferenceId !== null && { ReferenceId: input.ReferenceId }));
|
|
18075
|
+
};
|
|
17771
18076
|
var serializeAws_restJson1VoiceChannelRequest = function (input, context) {
|
|
17772
18077
|
return __assign({}, (input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }));
|
|
17773
18078
|
};
|
|
@@ -19843,6 +20148,11 @@ var deserializeAws_restJson1TreatmentResource = function (output, context) {
|
|
|
19843
20148
|
TreatmentName: __expectString(output.TreatmentName),
|
|
19844
20149
|
};
|
|
19845
20150
|
};
|
|
20151
|
+
var deserializeAws_restJson1VerificationResponse = function (output, context) {
|
|
20152
|
+
return {
|
|
20153
|
+
Valid: __expectBoolean(output.Valid),
|
|
20154
|
+
};
|
|
20155
|
+
};
|
|
19846
20156
|
var deserializeAws_restJson1VoiceChannelResponse = function (output, context) {
|
|
19847
20157
|
return {
|
|
19848
20158
|
ApplicationId: __expectString(output.ApplicationId),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
4
5
|
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
5
6
|
import { invalidProvider } from "@aws-sdk/invalid-dependency";
|
|
6
7
|
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
|
|
@@ -10,7 +11,7 @@ import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
|
10
11
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
11
12
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
12
13
|
export var getRuntimeConfig = function (config) {
|
|
13
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
14
15
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
15
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector,
|
|
16
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
16
17
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
|
-
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
|
|
4
|
+
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
5
5
|
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
6
6
|
import { Hash } from "@aws-sdk/hash-node";
|
|
7
7
|
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
|
|
@@ -14,8 +14,8 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
|
|
|
14
14
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
15
15
|
import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
|
|
16
16
|
export var getRuntimeConfig = function (config) {
|
|
17
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
18
18
|
emitWarningIfUnsupportedVersion(process.version);
|
|
19
19
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new 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,
|
|
20
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new 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
21
|
};
|
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
|
}
|