import { z } from 'zod'; /** * Base schema including the common parameters for all Cognito trigger events. * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-working-with-lambda-triggers.html#cognito-user-pools-lambda-trigger-syntax-shared | Amazon Cognito Developer Guide} */ declare const CognitoTriggerBaseSchema: z.ZodObject<{ version: z.ZodString; triggerSource: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; request: z.ZodObject<{}, z.core.$strip>; response: z.ZodObject<{}, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Pre-Signup trigger event. * * @example * ```json * { * "version": "1", * "triggerSource": "PreSignUp_SignUp", * "region": "us-east-1", * "userPoolId": "us-east-1_ABC123", * "userName": "johndoe", * "callerContext": { * "awsSdkVersion": "2.814.0", * "clientId": "client123" * }, * "request": { * "userAttributes": { * "email": "johndoe@example.com", * "name": "John Doe" * }, * "validationData": null, * "clientMetadata": { * "someKey": "someValue" * } * }, * "response": { * "autoConfirmUser": false, * "autoVerifyEmail": false, * "autoVerifyPhone": false * } * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html | Amazon Cognito Developer Guide} */ declare const PreSignupTriggerSchema: z.ZodObject<{ version: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; triggerSource: z.ZodLiteral<"PreSignUp_SignUp">; request: z.ZodObject<{ userAttributes: z.ZodRecord; validationData: z.ZodNullable>; clientMetadata: z.ZodOptional>; userNotFound: z.ZodOptional; }, z.core.$strip>; response: z.ZodObject<{ autoConfirmUser: z.ZodLiteral; autoVerifyEmail: z.ZodLiteral; autoVerifyPhone: z.ZodLiteral; }, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Post-Confirmation trigger event. * * @example * ```json * { * "version": "1", * "triggerSource": "PostConfirmation_ConfirmSignUp", * "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" * }, * "clientMetadata": { * "customKey": "customValue" * } * }, * "response": {} * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-confirmation.html | Amazon Cognito Developer Guide} */ declare const PostConfirmationTriggerSchema: z.ZodObject<{ version: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; triggerSource: z.ZodLiteral<"PostConfirmation_ConfirmSignUp">; request: z.ZodObject<{ userAttributes: z.ZodRecord; clientMetadata: z.ZodOptional>; }, z.core.$strip>; response: z.ZodObject<{}, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Pre-Authentication trigger event. * * @example * ```json * { * "version": "1", * "triggerSource": "PreAuthentication_Authentication", * "region": "us-east-1", * "userPoolId": "us-east-1_ABC123", * "request": { * "userAttributes": { * "email": "user@example.com", * "name": "John Doe" * }, * "validationData": { * "someKey": "someValue" * }, * "userNotFound": false * }, * "response": {} * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-authentication.html | Amazon Cognito Developer Guide} */ declare const PreAuthenticationTriggerSchema: z.ZodObject<{ version: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; triggerSource: z.ZodLiteral<"PreAuthentication_Authentication">; request: z.ZodObject<{ userAttributes: z.ZodRecord; validationData: z.ZodOptional>; userNotFound: z.ZodOptional; }, z.core.$strip>; response: z.ZodObject<{}, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Post-Authentication trigger event. * * @example * ```json * { * "version": "1", * "triggerSource": "PostAuthentication_Authentication", * "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" * }, * "newDeviceUsed": true, * "clientMetadata": { * "customKey": "customValue" * } * }, * "response": {} * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-authentication.html | Amazon Cognito Developer Guide} */ declare const PostAuthenticationTriggerSchema: z.ZodObject<{ version: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; response: z.ZodObject<{}, z.core.$strip>; triggerSource: z.ZodLiteral<"PostAuthentication_Authentication">; request: z.ZodObject<{ userAttributes: z.ZodRecord; newDeviceUsed: z.ZodOptional; clientMetadata: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Pre-Token Generation trigger event group configuration. * * Use this schema to extend the {@link PreTokenGenerationTriggerRequestSchema} for the `groupConfiguration` property. */ declare const PreTokenGenerationTriggerGroupConfigurationSchema: z.ZodObject<{ groupsToOverride: z.ZodArray; iamRolesToOverride: z.ZodArray; preferredRole: z.ZodNullable; }, z.core.$strip>; /** * A zod schema for a Cognito Pre-Token Generation trigger event request. * * Use this schema to extend the {@link PreTokenGenerationTriggerSchemaV1} and {@link PreTokenGenerationTriggerSchemaV2AndV3} for the `request` property. */ declare const PreTokenGenerationTriggerRequestSchema: z.ZodObject<{ userAttributes: z.ZodRecord; groupConfiguration: z.ZodObject<{ groupsToOverride: z.ZodArray; iamRolesToOverride: z.ZodArray; preferredRole: z.ZodNullable; }, z.core.$strip>; clientMetadata: z.ZodOptional>; }, z.core.$strip>; /** * A zod schema for a Cognito Pre-Token Generation trigger event (version 1). * * @example * ```json * { * "version": "1", * "triggerSource": "TokenGeneration_Authentication", * "region": "us-east-1", * "userPoolId": "us-east-1_ABC123", * "userName": "johndoe", * "callerContext": { * "awsSdkVersion": "2.814.0", * "clientId": "client123" * }, * "request": { * "userAttributes": { "string": "string" }, * "groupConfiguration": { * "groupsToOverride": [ "string", "string" ], * "iamRolesToOverride": [ "string", "string" ], * "preferredRole": "string" * }, * "clientMetadata": { "string": "string" } * }, * "response": {} * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html | Amazon Cognito Developer Guide} */ declare const PreTokenGenerationTriggerSchemaV1: z.ZodObject<{ version: z.ZodString; triggerSource: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; response: z.ZodObject<{}, z.core.$strip>; request: z.ZodObject<{ userAttributes: z.ZodRecord; groupConfiguration: z.ZodObject<{ groupsToOverride: z.ZodArray; iamRolesToOverride: z.ZodArray; preferredRole: z.ZodNullable; }, z.core.$strip>; clientMetadata: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Pre-Token Generation trigger event (version 2 and 3). * * @example * ```json * { * "version": "2", * "triggerSource": "TokenGeneration_Authentication", * "region": "us-east-1", * "userPoolId": "us-east-1_ABC123", * "userName": "johndoe", * "callerContext": { * "awsSdkVersion": "2.814.0", * "clientId": "client123" * }, * "request": { * "userAttributes": { "string": "string" }, * "groupConfiguration": { * "groupsToOverride": [ "string", "string" ], * "iamRolesToOverride": [ "string", "string" ], * "preferredRole": "string" * }, * "scopes": [ "string", "string" ], * "clientMetadata": { "string": "string" } * }, * "response": {} * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html | Amazon Cognito Developer Guide} */ declare const PreTokenGenerationTriggerSchemaV2AndV3: z.ZodObject<{ version: z.ZodString; triggerSource: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; response: z.ZodObject<{}, z.core.$strip>; request: z.ZodObject<{ userAttributes: z.ZodRecord; groupConfiguration: z.ZodObject<{ groupsToOverride: z.ZodArray; iamRolesToOverride: z.ZodArray; preferredRole: z.ZodNullable; }, z.core.$strip>; clientMetadata: z.ZodOptional>; scopes: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Migrate User trigger event. * * @example * ```json * { * "version": "1", * "triggerSource": "UserMigration_Authentication", * "region": "us-east-1", * "userPoolId": "us-east-1_ABC123", * "userName": "johndoe", * "callerContext": { * "awsSdkVersion": "2.814.0", * "clientId": "client123" * }, * "request": { * "password": "string", * "validationData": { "key": "value" }, * "clientMetadata": { "key": "value" } * }, * "response": { * "userAttributes": null, * "finalUserStatus": null, * "messageAction": null, * "desiredDeliveryMediums": null, * "forceAliasCreation": null, * "enableSMSMFA": null * } * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-migrate-user.html | Amazon Cognito Developer Guide} */ declare const MigrateUserTriggerSchema: z.ZodObject<{ version: z.ZodString; triggerSource: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; userName: z.ZodString; request: z.ZodObject<{ password: z.ZodString; validationData: z.ZodOptional>; clientMetadata: z.ZodOptional>; }, z.core.$strip>; response: z.ZodObject<{ userAttributes: z.ZodNullable>; finalUserStatus: z.ZodNullable; messageAction: z.ZodNullable; desiredDeliveryMediums: z.ZodNullable>; forceAliasCreation: z.ZodNullable; enableSMSMFA: z.ZodNullable; }, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Custom Message trigger event. * * @example * ```json * { * "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, * } * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-message.html | Amazon Cognito Developer Guide} */ declare const CustomMessageTriggerSchema: z.ZodObject<{ version: z.ZodString; triggerSource: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; request: z.ZodObject<{ userAttributes: z.ZodRecord; codeParameter: z.ZodString; linkParameter: z.ZodNullable; usernameParameter: z.ZodNullable; clientMetadata: z.ZodOptional>; }, z.core.$strip>; response: z.ZodObject<{ smsMessage: z.ZodNullable; emailMessage: z.ZodNullable; emailSubject: z.ZodNullable; }, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Custom Email Sender trigger event. * * @example * ```json * { * "version": "1", * "triggerSource": "CustomEmailSender_SignUp", * "region": "us-east-1", * "userPoolId": "us-east-1_ABC123", * "userName": "johndoe", * "callerContext": { * "awsSdkVersion": "2.814.0", * "clientId": "client123" * }, * "request": { * "type": "customEmailSenderRequestV1", * "code": "string", * "clientMetadata": { "string": "string" }, * "userAttributes": { "string": "string" } * }, * "response": {} * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-email-sender.html | Amazon Cognito Developer Guide} */ declare const CustomEmailSenderTriggerSchema: z.ZodObject<{ version: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; response: z.ZodObject<{}, z.core.$strip>; triggerSource: z.ZodLiteral<"CustomEmailSender_SignUp">; request: z.ZodObject<{ type: z.ZodLiteral<"customEmailSenderRequestV1">; code: z.ZodString; clientMetadata: z.ZodOptional>; userAttributes: z.ZodRecord; }, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Custom SMS Sender trigger event. * * @example * ```json * { * "version": "1", * "triggerSource": "CustomSMSSender_SignUp", * "region": "us-east-1", * "userPoolId": "us-east-1_ABC123", * "userName": "johndoe", * "callerContext": { * "awsSdkVersion": "2.814.0", * "clientId": "client123" * }, * "request": { * "type": "customSMSSenderRequestV1", * "code": "string", * "clientMetadata": { * "string": "string" * }, * "userAttributes": { "string": "string" } * }, * "response": {} * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-sms-sender.html | Amazon Cognito Developer Guide} */ declare const CustomSMSSenderTriggerSchema: z.ZodObject<{ version: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; response: z.ZodObject<{}, z.core.$strip>; triggerSource: z.ZodLiteral<"CustomSMSSender_SignUp">; request: z.ZodObject<{ type: z.ZodLiteral<"customSMSSenderRequestV1">; code: z.ZodString; clientMetadata: z.ZodOptional>; userAttributes: z.ZodRecord; }, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Challenge Result. */ declare const ChallengeResultSchema: z.ZodObject<{ challengeName: z.ZodUnion, z.ZodLiteral<"SRP_A">, z.ZodLiteral<"PASSWORD_VERIFIER">, z.ZodLiteral<"SMS_MFA">, z.ZodLiteral<"EMAIL_OTP">, z.ZodLiteral<"SOFTWARE_TOKEN_MFA">, z.ZodLiteral<"DEVICE_SRP_AUTH">, z.ZodLiteral<"DEVICE_PASSWORD_VERIFIER">, z.ZodLiteral<"ADMIN_NO_SRP_AUTH">]>; challengeResult: z.ZodBoolean; challengeMetadata: z.ZodOptional; }, z.core.$strip>; /** * A zod schema for a Cognito Define Auth Challenge trigger event. * * @example * ```json * { * "version": "1", * "triggerSource": "DefineAuthChallenge_Authentication", * "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" }, * "session": [ * { * "challengeName": "SRP_A", * "challengeResult": true, * "challengeMetadata": "metadata" * } * ], * "clientMetadata": { "key": "value" }, * "userNotFound": false * }, * "response": { * "challengeName": "PASSWORD_VERIFIER", * "issueTokens": false, * "failAuthentication": false * } * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-define-auth-challenge.html | Amazon Cognito Developer Guide} */ declare const DefineAuthChallengeTriggerSchema: z.ZodObject<{ version: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; triggerSource: z.ZodLiteral<"DefineAuthChallenge_Authentication">; request: z.ZodObject<{ userAttributes: z.ZodRecord; session: z.ZodArray, z.ZodLiteral<"SRP_A">, z.ZodLiteral<"PASSWORD_VERIFIER">, z.ZodLiteral<"SMS_MFA">, z.ZodLiteral<"EMAIL_OTP">, z.ZodLiteral<"SOFTWARE_TOKEN_MFA">, z.ZodLiteral<"DEVICE_SRP_AUTH">, z.ZodLiteral<"DEVICE_PASSWORD_VERIFIER">, z.ZodLiteral<"ADMIN_NO_SRP_AUTH">]>; challengeResult: z.ZodBoolean; challengeMetadata: z.ZodOptional; }, z.core.$strip>>; clientMetadata: z.ZodOptional>; userNotFound: z.ZodOptional; }, z.core.$strip>; response: z.ZodObject<{ challengeName: z.ZodOptional>; issueTokens: z.ZodOptional>; failAuthentication: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Create Auth Challenge trigger event. * * @example * ```json * { * "version": "1", * "triggerSource": "CreateAuthChallenge_Authentication", * "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" }, * "challengeName": "CUSTOM_CHALLENGE", * "session": [ * { "challengeName": "SRP_A", "challengeResult": true, "challengeMetadata": "metadata" } * ], * "clientMetadata": { "key": "value" }, * "userNotFound": false * }, * "response": { * "publicChallengeParameters": { "captchaUrl": "url/123.jpg" }, * "privateChallengeParameters": { "answer": "5" }, * "challengeMetadata": "custom metadata" * } * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-create-auth-challenge.html | Amazon Cognito Developer Guide} */ declare const CreateAuthChallengeTriggerSchema: z.ZodObject<{ version: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; triggerSource: z.ZodLiteral<"CreateAuthChallenge_Authentication">; request: z.ZodObject<{ userAttributes: z.ZodRecord; challengeName: z.ZodString; session: z.ZodArray, z.ZodLiteral<"SRP_A">, z.ZodLiteral<"PASSWORD_VERIFIER">, z.ZodLiteral<"SMS_MFA">, z.ZodLiteral<"EMAIL_OTP">, z.ZodLiteral<"SOFTWARE_TOKEN_MFA">, z.ZodLiteral<"DEVICE_SRP_AUTH">, z.ZodLiteral<"DEVICE_PASSWORD_VERIFIER">, z.ZodLiteral<"ADMIN_NO_SRP_AUTH">]>; challengeResult: z.ZodBoolean; challengeMetadata: z.ZodOptional; }, z.core.$strip>>; clientMetadata: z.ZodOptional>; userNotFound: z.ZodOptional; }, z.core.$strip>; response: z.ZodObject<{ publicChallengeParameters: z.ZodOptional>>; privateChallengeParameters: z.ZodOptional>>; challengeMetadata: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; /** * A zod schema for a Cognito Verify Auth Challenge Response trigger event. * * @example * ```json * { * "version": "1", * "triggerSource": "VerifyAuthChallengeResponse_Authentication", * "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" }, * "privateChallengeParameters": { "answer": "expectedAnswer" }, * "challengeAnswer": "userAnswer", * "clientMetadata": { "key": "value" }, * "userNotFound": false * }, * "response": { * "answerCorrect": true * } * } * ``` * * @see {@link https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-verify-auth-challenge-response.html | Amazon Cognito Developer Guide} */ declare const VerifyAuthChallengeTriggerSchema: z.ZodObject<{ version: z.ZodString; region: z.ZodString; userPoolId: z.ZodString; userName: z.ZodOptional; callerContext: z.ZodObject<{ awsSdkVersion: z.ZodString; clientId: z.ZodString; }, z.core.$strip>; triggerSource: z.ZodLiteral<"VerifyAuthChallengeResponse_Authentication">; request: z.ZodObject<{ userAttributes: z.ZodRecord; privateChallengeParameters: z.ZodRecord; challengeAnswer: z.ZodString; clientMetadata: z.ZodOptional>; userNotFound: z.ZodOptional; }, z.core.$strip>; response: z.ZodObject<{ answerCorrect: z.ZodBoolean; }, z.core.$strip>; }, z.core.$strip>; export { ChallengeResultSchema, CognitoTriggerBaseSchema, CreateAuthChallengeTriggerSchema, CustomEmailSenderTriggerSchema, CustomMessageTriggerSchema, CustomSMSSenderTriggerSchema, DefineAuthChallengeTriggerSchema, MigrateUserTriggerSchema, PostAuthenticationTriggerSchema, PostConfirmationTriggerSchema, PreAuthenticationTriggerSchema, PreSignupTriggerSchema, PreTokenGenerationTriggerGroupConfigurationSchema, PreTokenGenerationTriggerRequestSchema, PreTokenGenerationTriggerSchemaV1, PreTokenGenerationTriggerSchemaV2AndV3, VerifyAuthChallengeTriggerSchema, }; //# sourceMappingURL=cognito.d.ts.map