import { noop } from "../../util"; import { cognitoFetch } from "../cognito-fetch"; type TGetIdentityIdParams = { region: string; identityPoolId: string; logins?: Record; debug?: (trace: any) => void; }; export const getIdentityId = async ({ region, identityPoolId, logins, debug = noop, }: TGetIdentityIdParams) => await cognitoFetch({ region, operation: "GetId", args: { IdentityPoolId: identityPoolId, Logins: logins }, debug, }); // TODO: this needs a guard for the response