Skip to content

Commit

Permalink
feat(client-pinpoint): Added time zone estimation support for journeys
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Jun 26, 2023
1 parent 46a6009 commit cd5ca74
Show file tree
Hide file tree
Showing 11 changed files with 104 additions and 11 deletions.
6 changes: 6 additions & 0 deletions clients/client-pinpoint/src/commands/CreateJourneyCommand.ts
Expand Up @@ -417,6 +417,9 @@ export interface CreateJourneyCommandOutput extends CreateJourneyResponse, __Met
* },
* ],
* },
* TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
* "PHONE_NUMBER" || "POSTAL_CODE",
* ],
* },
* };
* const command = new CreateJourneyCommand(input);
Expand Down Expand Up @@ -799,6 +802,9 @@ export interface CreateJourneyCommandOutput extends CreateJourneyResponse, __Met
* // },
* // ],
* // },
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
* // "PHONE_NUMBER" || "POSTAL_CODE",
* // ],
* // },
* // };
*
Expand Down
3 changes: 3 additions & 0 deletions clients/client-pinpoint/src/commands/DeleteJourneyCommand.ts
Expand Up @@ -427,6 +427,9 @@ export interface DeleteJourneyCommandOutput extends DeleteJourneyResponse, __Met
* // },
* // ],
* // },
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
* // "PHONE_NUMBER" || "POSTAL_CODE",
* // ],
* // },
* // };
*
Expand Down
Expand Up @@ -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";

Expand Down
3 changes: 3 additions & 0 deletions clients/client-pinpoint/src/commands/GetJourneyCommand.ts
Expand Up @@ -427,6 +427,9 @@ export interface GetJourneyCommandOutput extends GetJourneyResponse, __MetadataB
* // },
* // ],
* // },
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
* // "PHONE_NUMBER" || "POSTAL_CODE",
* // ],
* // },
* // };
*
Expand Down
3 changes: 3 additions & 0 deletions clients/client-pinpoint/src/commands/ListJourneysCommand.ts
Expand Up @@ -430,6 +430,9 @@ export interface ListJourneysCommandOutput extends ListJourneysResponse, __Metad
* // },
* // ],
* // },
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
* // "PHONE_NUMBER" || "POSTAL_CODE",
* // ],
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
6 changes: 6 additions & 0 deletions clients/client-pinpoint/src/commands/UpdateJourneyCommand.ts
Expand Up @@ -418,6 +418,9 @@ export interface UpdateJourneyCommandOutput extends UpdateJourneyResponse, __Met
* },
* ],
* },
* TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
* "PHONE_NUMBER" || "POSTAL_CODE",
* ],
* },
* };
* const command = new UpdateJourneyCommand(input);
Expand Down Expand Up @@ -800,6 +803,9 @@ export interface UpdateJourneyCommandOutput extends UpdateJourneyResponse, __Met
* // },
* // ],
* // },
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
* // "PHONE_NUMBER" || "POSTAL_CODE",
* // ],
* // },
* // };
*
Expand Down
Expand Up @@ -430,6 +430,9 @@ export interface UpdateJourneyStateCommandOutput extends UpdateJourneyStateRespo
* // },
* // ],
* // },
* // TimezoneEstimationMethods: [ // ListOf__TimezoneEstimationMethodsElement
* // "PHONE_NUMBER" || "POSTAL_CODE",
* // ],
* // },
* // };
*
Expand Down
35 changes: 25 additions & 10 deletions clients/client-pinpoint/src/models/models_0.ts
Expand Up @@ -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
Expand Down Expand Up @@ -4402,6 +4417,11 @@ export interface WriteJourneyRequest {
* <p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
*/
ClosedDays?: ClosedDays;

/**
* <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>
*/
TimezoneEstimationMethods?: (__TimezoneEstimationMethodsElement | string)[];
}

/**
Expand Down Expand Up @@ -4528,6 +4548,11 @@ export interface JourneyResponse {
* <p>The time when a journey will not send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
*/
ClosedDays?: ClosedDays;

/**
* <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>
*/
TimezoneEstimationMethods?: (__TimezoneEstimationMethodsElement | string)[];
}

/**
Expand Down Expand Up @@ -7597,13 +7622,3 @@ export interface GetCampaignVersionsRequest {
*/
Token?: string;
}

/**
* @public
*/
export interface GetCampaignVersionsResponse {
/**
* <p>Provides information about the configuration and other settings for all the campaigns that are associated with an application.</p>
*/
CampaignsResponse: CampaignsResponse | undefined;
}
11 changes: 11 additions & 0 deletions clients/client-pinpoint/src/models/models_1.ts
Expand Up @@ -22,6 +22,7 @@ import {
CampaignHook,
CampaignLimits,
CampaignResponse,
CampaignsResponse,
ChannelsResponse,
DefaultPushNotificationTemplate,
DeliveryStatus,
Expand Down Expand Up @@ -65,6 +66,16 @@ import {
WriteSegmentRequest,
} from "./models_0";

/**
* @public
*/
export interface GetCampaignVersionsResponse {
/**
* <p>Provides information about the configuration and other settings for all the campaigns that are associated with an application.</p>
*/
CampaignsResponse: CampaignsResponse | undefined;
}

/**
* @public
*/
Expand Down
7 changes: 7 additions & 0 deletions clients/client-pinpoint/src/protocols/Aws_restJson1.ts
Expand Up @@ -268,6 +268,7 @@ import {
import { VerifyOTPMessageCommandInput, VerifyOTPMessageCommandOutput } from "../commands/VerifyOTPMessageCommand";
import {
__EndpointTypesElement,
__TimezoneEstimationMethodsElement,
Activity,
AddressConfiguration,
ADMChannelRequest,
Expand Down Expand Up @@ -12868,6 +12869,8 @@ const se_JourneySchedule = (input: JourneySchedule, context: __SerdeContext): an

// se_ListOf__string omitted.

// se_ListOf__TimezoneEstimationMethodsElement omitted.

// se_ListOfClosedDaysRules omitted.

/**
Expand Down Expand Up @@ -13360,6 +13363,7 @@ const se_WriteJourneyRequest = (input: WriteJourneyRequest, context: __SerdeCont
StartActivity: [],
StartCondition: (_) => se_StartCondition(_, context),
State: [],
TimezoneEstimationMethods: _json,
WaitForQuietTime: [],
});
};
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -13921,6 +13926,8 @@ const de_JourneysResponse = (output: any, context: __SerdeContext): JourneysResp

// de_ListOf__string omitted.

// de_ListOf__TimezoneEstimationMethodsElement omitted.

// de_ListOfActivityResponse omitted.

/**
Expand Down
35 changes: 35 additions & 0 deletions codegen/sdk-codegen/aws-models/pinpoint.json
Expand Up @@ -12662,6 +12662,12 @@
"traits": {
"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>"
}
},
"TimezoneEstimationMethods": {
"target": "com.amazonaws.pinpoint#ListOf__TimezoneEstimationMethodsElement",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -21116,6 +21128,12 @@
"traits": {
"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>"
}
},
"TimezoneEstimationMethods": {
"target": "com.amazonaws.pinpoint#ListOf__TimezoneEstimationMethodsElement",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -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"
},
Expand Down

0 comments on commit cd5ca74

Please sign in to comment.