UNPKG

882 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<'PostConfirmation_ConfirmSignUp'>;
12
13export type PostConfirmationConfirmForgotPassword = BasePostConfirmationTriggerEvent<'PostConfirmation_ConfirmForgotPassword'>;
14
15/**
16 * @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-confirmation.html
17 */
18export type PostConfirmationTriggerEvent =
19 | PostConfirmationConfirmSignUpTriggerEvent
20 | PostConfirmationConfirmForgotPassword;
21
22export type PostConfirmationTriggerHandler = Handler<PostConfirmationTriggerEvent>;