API Reference
    Preparing search index...
    CustomMessageTriggerSchema: ZodObject<
        extendShape<
            {
                callerContext: ZodObject<
                    { awsSdkVersion: ZodString; clientId: ZodString },
                    "strip",
                    ZodTypeAny,
                    { awsSdkVersion: string; clientId: string },
                    { awsSdkVersion: string; clientId: string },
                >;
                region: ZodString;
                request: ZodObject<{}, "strip", ZodTypeAny, {}, {}>;
                response: ZodObject<{}, "strip", ZodTypeAny, {}, {}>;
                triggerSource: ZodString;
                userName: ZodOptional<ZodString>;
                userPoolId: ZodString;
                version: ZodString;
            },
            {
                request: ZodObject<
                    {
                        clientMetadata: ZodOptional<ZodRecord<ZodString, ZodString>>;
                        codeParameter: ZodString;
                        linkParameter: ZodNullable<ZodString>;
                        userAttributes: ZodRecord<ZodString, ZodString>;
                        usernameParameter: ZodNullable<ZodString>;
                    },
                    "strip",
                    ZodTypeAny,
                    {
                        clientMetadata?: Record<string, string>;
                        codeParameter: string;
                        linkParameter: null | string;
                        userAttributes: Record<string, string>;
                        usernameParameter: null | string;
                    },
                    {
                        clientMetadata?: Record<string, string>;
                        codeParameter: string;
                        linkParameter: null | string;
                        userAttributes: Record<string, string>;
                        usernameParameter: null | string;
                    },
                >;
                response: ZodObject<
                    {
                        emailMessage: ZodNullable<ZodString>;
                        emailSubject: ZodNullable<ZodString>;
                        smsMessage: ZodNullable<ZodString>;
                    },
                    "strip",
                    ZodTypeAny,
                    {
                        emailMessage: null
                        | string;
                        emailSubject: null | string;
                        smsMessage: null | string;
                    },
                    {
                        emailMessage: null
                        | string;
                        emailSubject: null | string;
                        smsMessage: null | string;
                    },
                >;
            },
        >,
        "strip",
        ZodTypeAny,
        {
            callerContext: { awsSdkVersion: string; clientId: string };
            region: string;
            request: {
                clientMetadata?: Record<string, string>;
                codeParameter: string;
                linkParameter: null | string;
                userAttributes: Record<string, string>;
                usernameParameter: null | string;
            };
            response: {
                emailMessage: null
                | string;
                emailSubject: null | string;
                smsMessage: null | string;
            };
            triggerSource: string;
            userName?: string;
            userPoolId: string;
            version: string;
        },
        {
            callerContext: { awsSdkVersion: string; clientId: string };
            region: string;
            request: {
                clientMetadata?: Record<string, string>;
                codeParameter: string;
                linkParameter: null | string;
                userAttributes: Record<string, string>;
                usernameParameter: null | string;
            };
            response: {
                emailMessage: null
                | string;
                emailSubject: null | string;
                smsMessage: null | string;
            };
            triggerSource: string;
            userName?: string;
            userPoolId: string;
            version: string;
        },
    > = ...

    A zod schema for a Cognito Custom Message trigger event.

    {
    "version": "1",
    "triggerSource": "CustomMessage_SignUp",
    "region": "us-east-1",
    "userPoolId": "us-east-1_ABC123",
    "userName": "johndoe",
    "callerContext": {
    "awsSdkVersion": "2.814.0",
    "clientId": "client123"
    },
    "request": {
    "userAttributes": {
    "email": "user@example.com",
    "name": "John Doe"
    },
    "codeParameter": "{####}",
    "usernameParameter": "string",
    "linkParameter": "string",
    "usernameParameter": null
    },
    "response": {
    "smsMessage": null,
    "emailMessage": null,
    "emailSubject": null,
    }
    }