UNPKG

906 BTypeScriptView Raw
1import { Handler } from "../../handler";
2import { BaseTriggerEvent, StringMap } from "./_common";
3
4export interface BasePostConfirmationTriggerEvent<T extends string> extends BaseTriggerEvent<T> {
5 request: {
6 userAttributes: StringMap;
7 clientMetadata?: StringMap | undefined;
8 };
9}
10
11export type PostConfirmationConfirmSignUpTriggerEvent = BasePostConfirmationTriggerEvent<
12 "PostConfirmation_ConfirmSignUp"
13>;
14
15export type PostConfirmationConfirmForgotPassword = BasePostConfirmationTriggerEvent<
16 "PostConfirmation_ConfirmForgotPassword"
17>;
18
19/**
20 * @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-confirmation.html
21 */
22export type PostConfirmationTriggerEvent =
23 | PostConfirmationConfirmSignUpTriggerEvent
24 | PostConfirmationConfirmForgotPassword;
25
26export type PostConfirmationTriggerHandler = Handler<PostConfirmationTriggerEvent>;