Skip to content

Commit cd5ca74

Browse files
author
awstools
committedJun 26, 2023
feat(client-pinpoint): Added time zone estimation support for journeys
1 parent 46a6009 commit cd5ca74

11 files changed

+104
-11
lines changed
 

‎clients/client-pinpoint/src/commands/CreateJourneyCommand.ts

+6
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ export interface CreateJourneyCommandOutput extends CreateJourneyResponse, __Met
417417
* },
418418
* ],
419419
* },
420+
* TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
421+
* "PHONE_NUMBER" || "POSTAL_CODE",
422+
* ],
420423
* },
421424
* };
422425
* const command = new CreateJourneyCommand(input);
@@ -799,6 +802,9 @@ export interface CreateJourneyCommandOutput extends CreateJourneyResponse, __Met
799802
* // },
800803
* // ],
801804
* // },
805+
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
806+
* // "PHONE_NUMBER" || "POSTAL_CODE",
807+
* // ],
802808
* // },
803809
* // };
804810
*

‎clients/client-pinpoint/src/commands/DeleteJourneyCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ export interface DeleteJourneyCommandOutput extends DeleteJourneyResponse, __Met
427427
* // },
428428
* // ],
429429
* // },
430+
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
431+
* // "PHONE_NUMBER" || "POSTAL_CODE",
432+
* // ],
430433
* // },
431434
* // };
432435
*

‎clients/client-pinpoint/src/commands/GetCampaignVersionsCommand.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import {
1313
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
1414
import { SerdeContext as __SerdeContext } from "@smithy/types";
1515

16-
import { GetCampaignVersionsRequest, GetCampaignVersionsResponse } from "../models/models_0";
16+
import { GetCampaignVersionsRequest } from "../models/models_0";
17+
import { GetCampaignVersionsResponse } from "../models/models_1";
1718
import { PinpointClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PinpointClient";
1819
import { de_GetCampaignVersionsCommand, se_GetCampaignVersionsCommand } from "../protocols/Aws_restJson1";
1920

‎clients/client-pinpoint/src/commands/GetJourneyCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ export interface GetJourneyCommandOutput extends GetJourneyResponse, __MetadataB
427427
* // },
428428
* // ],
429429
* // },
430+
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
431+
* // "PHONE_NUMBER" || "POSTAL_CODE",
432+
* // ],
430433
* // },
431434
* // };
432435
*

‎clients/client-pinpoint/src/commands/ListJourneysCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,9 @@ export interface ListJourneysCommandOutput extends ListJourneysResponse, __Metad
430430
* // },
431431
* // ],
432432
* // },
433+
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
434+
* // "PHONE_NUMBER" || "POSTAL_CODE",
435+
* // ],
433436
* // },
434437
* // ],
435438
* // NextToken: "STRING_VALUE",

‎clients/client-pinpoint/src/commands/UpdateJourneyCommand.ts

+6
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ export interface UpdateJourneyCommandOutput extends UpdateJourneyResponse, __Met
418418
* },
419419
* ],
420420
* },
421+
* TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
422+
* "PHONE_NUMBER" || "POSTAL_CODE",
423+
* ],
421424
* },
422425
* };
423426
* const command = new UpdateJourneyCommand(input);
@@ -800,6 +803,9 @@ export interface UpdateJourneyCommandOutput extends UpdateJourneyResponse, __Met
800803
* // },
801804
* // ],
802805
* // },
806+
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
807+
* // "PHONE_NUMBER" || "POSTAL_CODE",
808+
* // ],
803809
* // },
804810
* // };
805811
*

‎clients/client-pinpoint/src/commands/UpdateJourneyStateCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,9 @@ export interface UpdateJourneyStateCommandOutput extends UpdateJourneyStateRespo
430430
* // },
431431
* // ],
432432
* // },
433+
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
434+
* // "PHONE_NUMBER" || "POSTAL_CODE",
435+
* // ],
433436
* // },
434437
* // };
435438
*

‎clients/client-pinpoint/src/models/models_0.ts

+25-10
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ export const __EndpointTypesElement = {
2828
*/
2929
export type __EndpointTypesElement = (typeof __EndpointTypesElement)[keyof typeof __EndpointTypesElement];
3030

31+
/**
32+
* @public
33+
* @enum
34+
*/
35+
export const __TimezoneEstimationMethodsElement = {
36+
PHONE_NUMBER: "PHONE_NUMBER",
37+
POSTAL_CODE: "POSTAL_CODE",
38+
} as const;
39+
40+
/**
41+
* @public
42+
*/
43+
export type __TimezoneEstimationMethodsElement =
44+
(typeof __TimezoneEstimationMethodsElement)[keyof typeof __TimezoneEstimationMethodsElement];
45+
3146
/**
3247
* @public
3348
* @enum
@@ -4402,6 +4417,11 @@ export interface WriteJourneyRequest {
44024417
* <p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
44034418
*/
44044419
ClosedDays?: ClosedDays;
4420+
4421+
/**
4422+
* <p>An array of time zone estimation methods, if any, to use for determining an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-endpoints-endpoint-id.html">Endpoints</a> time zone if the Endpoint does not have a value for the Demographic.Timezone attribute.</p> <ul> <li><p>PHONE_NUMBER - A time zone is determined based on the Endpoint.Address and Endpoint.Location.Country.</p></li> <li><p>POSTAL_CODE - A time zone is determined based on the Endpoint.Location.PostalCode and Endpoint.Location.Country.</p> <note><p>POSTAL_CODE detection is only supported in the United States, United Kingdom, Australia, New Zealand, Canada, France, Italy, Spain, Germany and in regions where Amazon Pinpoint is available.</p></note></li> </ul>
4423+
*/
4424+
TimezoneEstimationMethods?: (__TimezoneEstimationMethodsElement | string)[];
44054425
}
44064426

44074427
/**
@@ -4528,6 +4548,11 @@ export interface JourneyResponse {
45284548
* <p>The time when a journey will not send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
45294549
*/
45304550
ClosedDays?: ClosedDays;
4551+
4552+
/**
4553+
* <p>An array of time zone estimation methods, if any, to use for determining an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-endpoints-endpoint-id.html">Endpoints</a> time zone if the Endpoint does not have a value for the Demographic.Timezone attribute.</p> <ul> <li><p>PHONE_NUMBER - A time zone is determined based on the Endpoint.Address and Endpoint.Location.Country.</p></li> <li><p>POSTAL_CODE - A time zone is determined based on the Endpoint.Location.PostalCode and Endpoint.Location.Country.</p> <note><p>POSTAL_CODE detection is only supported in the United States, United Kingdom, Australia, New Zealand, Canada, France, Italy, Spain, Germany and in regions where Amazon Pinpoint is available.</p></note></li> </ul>
4554+
*/
4555+
TimezoneEstimationMethods?: (__TimezoneEstimationMethodsElement | string)[];
45314556
}
45324557

45334558
/**
@@ -7597,13 +7622,3 @@ export interface GetCampaignVersionsRequest {
75977622
*/
75987623
Token?: string;
75997624
}
7600-
7601-
/**
7602-
* @public
7603-
*/
7604-
export interface GetCampaignVersionsResponse {
7605-
/**
7606-
* <p>Provides information about the configuration and other settings for all the campaigns that are associated with an application.</p>
7607-
*/
7608-
CampaignsResponse: CampaignsResponse | undefined;
7609-
}

‎clients/client-pinpoint/src/models/models_1.ts

+11
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
CampaignHook,
2323
CampaignLimits,
2424
CampaignResponse,
25+
CampaignsResponse,
2526
ChannelsResponse,
2627
DefaultPushNotificationTemplate,
2728
DeliveryStatus,
@@ -65,6 +66,16 @@ import {
6566
WriteSegmentRequest,
6667
} from "./models_0";
6768

69+
/**
70+
* @public
71+
*/
72+
export interface GetCampaignVersionsResponse {
73+
/**
74+
* <p>Provides information about the configuration and other settings for all the campaigns that are associated with an application.</p>
75+
*/
76+
CampaignsResponse: CampaignsResponse | undefined;
77+
}
78+
6879
/**
6980
* @public
7081
*/

‎clients/client-pinpoint/src/protocols/Aws_restJson1.ts

+7
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ import {
268268
import { VerifyOTPMessageCommandInput, VerifyOTPMessageCommandOutput } from "../commands/VerifyOTPMessageCommand";
269269
import {
270270
__EndpointTypesElement,
271+
__TimezoneEstimationMethodsElement,
271272
Activity,
272273
AddressConfiguration,
273274
ADMChannelRequest,
@@ -12868,6 +12869,8 @@ const se_JourneySchedule = (input: JourneySchedule, context: __SerdeContext): an
1286812869

1286912870
// se_ListOf__string omitted.
1287012871

12872+
// se_ListOf__TimezoneEstimationMethodsElement omitted.
12873+
1287112874
// se_ListOfClosedDaysRules omitted.
1287212875

1287312876
/**
@@ -13360,6 +13363,7 @@ const se_WriteJourneyRequest = (input: WriteJourneyRequest, context: __SerdeCont
1336013363
StartActivity: [],
1336113364
StartCondition: (_) => se_StartCondition(_, context),
1336213365
State: [],
13366+
TimezoneEstimationMethods: _json,
1336313367
WaitForQuietTime: [],
1336413368
});
1336513369
};
@@ -13881,6 +13885,7 @@ const de_JourneyResponse = (output: any, context: __SerdeContext): JourneyRespon
1388113885
StartActivity: __expectString,
1388213886
StartCondition: (_: any) => de_StartCondition(_, context),
1388313887
State: __expectString,
13888+
TimezoneEstimationMethods: _json,
1388413889
WaitForQuietTime: __expectBoolean,
1388513890
tags: [, _json, `tags`],
1388613891
}) as any;
@@ -13921,6 +13926,8 @@ const de_JourneysResponse = (output: any, context: __SerdeContext): JourneysResp
1392113926

1392213927
// de_ListOf__string omitted.
1392313928

13929+
// de_ListOf__TimezoneEstimationMethodsElement omitted.
13930+
1392413931
// de_ListOfActivityResponse omitted.
1392513932

1392613933
/**

‎codegen/sdk-codegen/aws-models/pinpoint.json

+35
Original file line numberDiff line numberDiff line change
@@ -12662,6 +12662,12 @@
1266212662
"traits": {
1266312663
"smithy.api#documentation": "<p>The time when a journey will not send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>"
1266412664
}
12665+
},
12666+
"TimezoneEstimationMethods": {
12667+
"target": "com.amazonaws.pinpoint#ListOf__TimezoneEstimationMethodsElement",
12668+
"traits": {
12669+
"smithy.api#documentation": "<p>An array of time zone estimation methods, if any, to use for determining an <a href=\"https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-endpoints-endpoint-id.html\">Endpoints</a> time zone if the Endpoint does not have a value for the Demographic.Timezone attribute.</p> <ul> <li><p>PHONE_NUMBER - A time zone is determined based on the Endpoint.Address and Endpoint.Location.Country.</p></li> <li><p>POSTAL_CODE - A time zone is determined based on the Endpoint.Location.PostalCode and Endpoint.Location.Country.</p> <note><p>POSTAL_CODE detection is only supported in the United States, United Kingdom, Australia, New Zealand, Canada, France, Italy, Spain, Germany and in regions where Amazon Pinpoint is available.</p></note></li> </ul>"
12670+
}
1266512671
}
1266612672
},
1266712673
"traits": {
@@ -13253,6 +13259,12 @@
1325313259
"target": "com.amazonaws.pinpoint#__EndpointTypesElement"
1325413260
}
1325513261
},
13262+
"com.amazonaws.pinpoint#ListOf__TimezoneEstimationMethodsElement": {
13263+
"type": "list",
13264+
"member": {
13265+
"target": "com.amazonaws.pinpoint#__TimezoneEstimationMethodsElement"
13266+
}
13267+
},
1325613268
"com.amazonaws.pinpoint#ListOf__string": {
1325713269
"type": "list",
1325813270
"member": {
@@ -21116,6 +21128,12 @@
2111621128
"traits": {
2111721129
"smithy.api#documentation": "<p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>"
2111821130
}
21131+
},
21132+
"TimezoneEstimationMethods": {
21133+
"target": "com.amazonaws.pinpoint#ListOf__TimezoneEstimationMethodsElement",
21134+
"traits": {
21135+
"smithy.api#documentation": "<p>An array of time zone estimation methods, if any, to use for determining an <a href=\"https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-endpoints-endpoint-id.html\">Endpoints</a> time zone if the Endpoint does not have a value for the Demographic.Timezone attribute.</p> <ul> <li><p>PHONE_NUMBER - A time zone is determined based on the Endpoint.Address and Endpoint.Location.Country.</p></li> <li><p>POSTAL_CODE - A time zone is determined based on the Endpoint.Location.PostalCode and Endpoint.Location.Country.</p> <note><p>POSTAL_CODE detection is only supported in the United States, United Kingdom, Australia, New Zealand, Canada, France, Italy, Spain, Germany and in regions where Amazon Pinpoint is available.</p></note></li> </ul>"
21136+
}
2111921137
}
2112021138
},
2112121139
"traits": {
@@ -21289,6 +21307,23 @@
2128921307
}
2129021308
}
2129121309
},
21310+
"com.amazonaws.pinpoint#__TimezoneEstimationMethodsElement": {
21311+
"type": "enum",
21312+
"members": {
21313+
"PHONE_NUMBER": {
21314+
"target": "smithy.api#Unit",
21315+
"traits": {
21316+
"smithy.api#enumValue": "PHONE_NUMBER"
21317+
}
21318+
},
21319+
"POSTAL_CODE": {
21320+
"target": "smithy.api#Unit",
21321+
"traits": {
21322+
"smithy.api#enumValue": "POSTAL_CODE"
21323+
}
21324+
}
21325+
}
21326+
},
2129221327
"com.amazonaws.pinpoint#__blob": {
2129321328
"type": "blob"
2129421329
},

0 commit comments

Comments
 (0)