From cd5ca74b53210ced2254546a90157aaceed942d0 Mon Sep 17 00:00:00 2001 From: awstools Date: Mon, 26 Jun 2023 18:13:56 +0000 Subject: [PATCH] feat(client-pinpoint): Added time zone estimation support for journeys --- .../src/commands/CreateJourneyCommand.ts | 6 ++++ .../src/commands/DeleteJourneyCommand.ts | 3 ++ .../commands/GetCampaignVersionsCommand.ts | 3 +- .../src/commands/GetJourneyCommand.ts | 3 ++ .../src/commands/ListJourneysCommand.ts | 3 ++ .../src/commands/UpdateJourneyCommand.ts | 6 ++++ .../src/commands/UpdateJourneyStateCommand.ts | 3 ++ .../client-pinpoint/src/models/models_0.ts | 35 +++++++++++++------ .../client-pinpoint/src/models/models_1.ts | 11 ++++++ .../src/protocols/Aws_restJson1.ts | 7 ++++ codegen/sdk-codegen/aws-models/pinpoint.json | 35 +++++++++++++++++++ 11 files changed, 104 insertions(+), 11 deletions(-) diff --git a/clients/client-pinpoint/src/commands/CreateJourneyCommand.ts b/clients/client-pinpoint/src/commands/CreateJourneyCommand.ts index 5076b6097fb5..a794c085b5b7 100644 --- a/clients/client-pinpoint/src/commands/CreateJourneyCommand.ts +++ b/clients/client-pinpoint/src/commands/CreateJourneyCommand.ts @@ -417,6 +417,9 @@ export interface CreateJourneyCommandOutput extends CreateJourneyResponse, __Met * }, * ], * }, + * TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement + * "PHONE_NUMBER" || "POSTAL_CODE", + * ], * }, * }; * const command = new CreateJourneyCommand(input); @@ -799,6 +802,9 @@ export interface CreateJourneyCommandOutput extends CreateJourneyResponse, __Met * // }, * // ], * // }, + * // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement + * // "PHONE_NUMBER" || "POSTAL_CODE", + * // ], * // }, * // }; * diff --git a/clients/client-pinpoint/src/commands/DeleteJourneyCommand.ts b/clients/client-pinpoint/src/commands/DeleteJourneyCommand.ts index 4d732ac63e56..fe5917117feb 100644 --- a/clients/client-pinpoint/src/commands/DeleteJourneyCommand.ts +++ b/clients/client-pinpoint/src/commands/DeleteJourneyCommand.ts @@ -427,6 +427,9 @@ export interface DeleteJourneyCommandOutput extends DeleteJourneyResponse, __Met * // }, * // ], * // }, + * // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement + * // "PHONE_NUMBER" || "POSTAL_CODE", + * // ], * // }, * // }; * diff --git a/clients/client-pinpoint/src/commands/GetCampaignVersionsCommand.ts b/clients/client-pinpoint/src/commands/GetCampaignVersionsCommand.ts index d4c665d18ce3..0d6ff5fd6011 100644 --- a/clients/client-pinpoint/src/commands/GetCampaignVersionsCommand.ts +++ b/clients/client-pinpoint/src/commands/GetCampaignVersionsCommand.ts @@ -13,7 +13,8 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { GetCampaignVersionsRequest, GetCampaignVersionsResponse } from "../models/models_0"; +import { GetCampaignVersionsRequest } from "../models/models_0"; +import { GetCampaignVersionsResponse } from "../models/models_1"; import { PinpointClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PinpointClient"; import { de_GetCampaignVersionsCommand, se_GetCampaignVersionsCommand } from "../protocols/Aws_restJson1"; diff --git a/clients/client-pinpoint/src/commands/GetJourneyCommand.ts b/clients/client-pinpoint/src/commands/GetJourneyCommand.ts index 692318988b0b..2d9a67c76f1c 100644 --- a/clients/client-pinpoint/src/commands/GetJourneyCommand.ts +++ b/clients/client-pinpoint/src/commands/GetJourneyCommand.ts @@ -427,6 +427,9 @@ export interface GetJourneyCommandOutput extends GetJourneyResponse, __MetadataB * // }, * // ], * // }, + * // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement + * // "PHONE_NUMBER" || "POSTAL_CODE", + * // ], * // }, * // }; * diff --git a/clients/client-pinpoint/src/commands/ListJourneysCommand.ts b/clients/client-pinpoint/src/commands/ListJourneysCommand.ts index 3c9795b09fd5..bc8d130249ff 100644 --- a/clients/client-pinpoint/src/commands/ListJourneysCommand.ts +++ b/clients/client-pinpoint/src/commands/ListJourneysCommand.ts @@ -430,6 +430,9 @@ export interface ListJourneysCommandOutput extends ListJourneysResponse, __Metad * // }, * // ], * // }, + * // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement + * // "PHONE_NUMBER" || "POSTAL_CODE", + * // ], * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-pinpoint/src/commands/UpdateJourneyCommand.ts b/clients/client-pinpoint/src/commands/UpdateJourneyCommand.ts index 3f8f1cb58acb..30494aced1de 100644 --- a/clients/client-pinpoint/src/commands/UpdateJourneyCommand.ts +++ b/clients/client-pinpoint/src/commands/UpdateJourneyCommand.ts @@ -418,6 +418,9 @@ export interface UpdateJourneyCommandOutput extends UpdateJourneyResponse, __Met * }, * ], * }, + * TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement + * "PHONE_NUMBER" || "POSTAL_CODE", + * ], * }, * }; * const command = new UpdateJourneyCommand(input); @@ -800,6 +803,9 @@ export interface UpdateJourneyCommandOutput extends UpdateJourneyResponse, __Met * // }, * // ], * // }, + * // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement + * // "PHONE_NUMBER" || "POSTAL_CODE", + * // ], * // }, * // }; * diff --git a/clients/client-pinpoint/src/commands/UpdateJourneyStateCommand.ts b/clients/client-pinpoint/src/commands/UpdateJourneyStateCommand.ts index 87517bd40a7c..caefd29adaf1 100644 --- a/clients/client-pinpoint/src/commands/UpdateJourneyStateCommand.ts +++ b/clients/client-pinpoint/src/commands/UpdateJourneyStateCommand.ts @@ -430,6 +430,9 @@ export interface UpdateJourneyStateCommandOutput extends UpdateJourneyStateRespo * // }, * // ], * // }, + * // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement + * // "PHONE_NUMBER" || "POSTAL_CODE", + * // ], * // }, * // }; * diff --git a/clients/client-pinpoint/src/models/models_0.ts b/clients/client-pinpoint/src/models/models_0.ts index 9de56a14779f..1166e107374a 100644 --- a/clients/client-pinpoint/src/models/models_0.ts +++ b/clients/client-pinpoint/src/models/models_0.ts @@ -28,6 +28,21 @@ export const __EndpointTypesElement = { */ export type __EndpointTypesElement = (typeof __EndpointTypesElement)[keyof typeof __EndpointTypesElement]; +/** + * @public + * @enum + */ +export const __TimezoneEstimationMethodsElement = { + PHONE_NUMBER: "PHONE_NUMBER", + POSTAL_CODE: "POSTAL_CODE", +} as const; + +/** + * @public + */ +export type __TimezoneEstimationMethodsElement = + (typeof __TimezoneEstimationMethodsElement)[keyof typeof __TimezoneEstimationMethodsElement]; + /** * @public * @enum @@ -4402,6 +4417,11 @@ export interface WriteJourneyRequest { *

The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.

*/ ClosedDays?: ClosedDays; + + /** + *

An array of time zone estimation methods, if any, to use for determining an Endpoints time zone if the Endpoint does not have a value for the Demographic.Timezone attribute.

+ */ + TimezoneEstimationMethods?: (__TimezoneEstimationMethodsElement | string)[]; } /** @@ -4528,6 +4548,11 @@ export interface JourneyResponse { *

The time when a journey will not send messages. QuietTime should be configured first and SendingSchedule should be set to true.

*/ ClosedDays?: ClosedDays; + + /** + *

An array of time zone estimation methods, if any, to use for determining an Endpoints time zone if the Endpoint does not have a value for the Demographic.Timezone attribute.

+ */ + TimezoneEstimationMethods?: (__TimezoneEstimationMethodsElement | string)[]; } /** @@ -7597,13 +7622,3 @@ export interface GetCampaignVersionsRequest { */ Token?: string; } - -/** - * @public - */ -export interface GetCampaignVersionsResponse { - /** - *

Provides information about the configuration and other settings for all the campaigns that are associated with an application.

- */ - CampaignsResponse: CampaignsResponse | undefined; -} diff --git a/clients/client-pinpoint/src/models/models_1.ts b/clients/client-pinpoint/src/models/models_1.ts index 8dc759eda712..bca98e622659 100644 --- a/clients/client-pinpoint/src/models/models_1.ts +++ b/clients/client-pinpoint/src/models/models_1.ts @@ -22,6 +22,7 @@ import { CampaignHook, CampaignLimits, CampaignResponse, + CampaignsResponse, ChannelsResponse, DefaultPushNotificationTemplate, DeliveryStatus, @@ -65,6 +66,16 @@ import { WriteSegmentRequest, } from "./models_0"; +/** + * @public + */ +export interface GetCampaignVersionsResponse { + /** + *

Provides information about the configuration and other settings for all the campaigns that are associated with an application.

+ */ + CampaignsResponse: CampaignsResponse | undefined; +} + /** * @public */ diff --git a/clients/client-pinpoint/src/protocols/Aws_restJson1.ts b/clients/client-pinpoint/src/protocols/Aws_restJson1.ts index 12e20cf14875..d9dde02781a3 100644 --- a/clients/client-pinpoint/src/protocols/Aws_restJson1.ts +++ b/clients/client-pinpoint/src/protocols/Aws_restJson1.ts @@ -268,6 +268,7 @@ import { import { VerifyOTPMessageCommandInput, VerifyOTPMessageCommandOutput } from "../commands/VerifyOTPMessageCommand"; import { __EndpointTypesElement, + __TimezoneEstimationMethodsElement, Activity, AddressConfiguration, ADMChannelRequest, @@ -12868,6 +12869,8 @@ const se_JourneySchedule = (input: JourneySchedule, context: __SerdeContext): an // se_ListOf__string omitted. +// se_ListOf__TimezoneEstimationMethodsElement omitted. + // se_ListOfClosedDaysRules omitted. /** @@ -13360,6 +13363,7 @@ const se_WriteJourneyRequest = (input: WriteJourneyRequest, context: __SerdeCont StartActivity: [], StartCondition: (_) => se_StartCondition(_, context), State: [], + TimezoneEstimationMethods: _json, WaitForQuietTime: [], }); }; @@ -13881,6 +13885,7 @@ const de_JourneyResponse = (output: any, context: __SerdeContext): JourneyRespon StartActivity: __expectString, StartCondition: (_: any) => de_StartCondition(_, context), State: __expectString, + TimezoneEstimationMethods: _json, WaitForQuietTime: __expectBoolean, tags: [, _json, `tags`], }) as any; @@ -13921,6 +13926,8 @@ const de_JourneysResponse = (output: any, context: __SerdeContext): JourneysResp // de_ListOf__string omitted. +// de_ListOf__TimezoneEstimationMethodsElement omitted. + // de_ListOfActivityResponse omitted. /** diff --git a/codegen/sdk-codegen/aws-models/pinpoint.json b/codegen/sdk-codegen/aws-models/pinpoint.json index 7b850ca3e6fe..90ed0d9d5f6c 100644 --- a/codegen/sdk-codegen/aws-models/pinpoint.json +++ b/codegen/sdk-codegen/aws-models/pinpoint.json @@ -12662,6 +12662,12 @@ "traits": { "smithy.api#documentation": "

The time when a journey will not send messages. QuietTime should be configured first and SendingSchedule should be set to true.

" } + }, + "TimezoneEstimationMethods": { + "target": "com.amazonaws.pinpoint#ListOf__TimezoneEstimationMethodsElement", + "traits": { + "smithy.api#documentation": "

An array of time zone estimation methods, if any, to use for determining an Endpoints time zone if the Endpoint does not have a value for the Demographic.Timezone attribute.

" + } } }, "traits": { @@ -13253,6 +13259,12 @@ "target": "com.amazonaws.pinpoint#__EndpointTypesElement" } }, + "com.amazonaws.pinpoint#ListOf__TimezoneEstimationMethodsElement": { + "type": "list", + "member": { + "target": "com.amazonaws.pinpoint#__TimezoneEstimationMethodsElement" + } + }, "com.amazonaws.pinpoint#ListOf__string": { "type": "list", "member": { @@ -21116,6 +21128,12 @@ "traits": { "smithy.api#documentation": "

The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.

" } + }, + "TimezoneEstimationMethods": { + "target": "com.amazonaws.pinpoint#ListOf__TimezoneEstimationMethodsElement", + "traits": { + "smithy.api#documentation": "

An array of time zone estimation methods, if any, to use for determining an Endpoints time zone if the Endpoint does not have a value for the Demographic.Timezone attribute.

" + } } }, "traits": { @@ -21289,6 +21307,23 @@ } } }, + "com.amazonaws.pinpoint#__TimezoneEstimationMethodsElement": { + "type": "enum", + "members": { + "PHONE_NUMBER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PHONE_NUMBER" + } + }, + "POSTAL_CODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "POSTAL_CODE" + } + } + } + }, "com.amazonaws.pinpoint#__blob": { "type": "blob" },