// Resends the SignUp confirmation code to a user who has not yet confirmed. // Used when the original code expired or was lost. import { noop } from "../../util"; import { cognitoFetch } from "../cognito-fetch"; import { TClientMetadata } from "../cognito-fetch"; type TResendConfirmationCodeParams = { region: string; clientId: string; username: string; clientMetadata?: TClientMetadata; debug?: (trace: any) => void; }; export const resendConfirmationCode = async ({ region, clientId, username, clientMetadata, debug = noop, }: TResendConfirmationCodeParams) => await cognitoFetch({ region, operation: "ResendConfirmationCode", args: { ClientId: clientId, Username: username, ...(clientMetadata ? { ClientMetadata: clientMetadata } : {}), }, debug, });