https://supertokens.com/ logo
Title
s

syntaxerror

02/21/2023, 12:22 PM
Is there any enums for js(or golang) side for actions like
EMAIL_EXISTS, PASSWORDLESS_CONSUME_CODE, PASSWORDLESS_CREATE_CODE
etc.. ? Or Should we compare with hardcoded strings or via creating our own constants for that purpose?
r

rp

02/21/2023, 12:24 PM
hey @syntaxerror for ts, the types are literals - so ts will prompt you based on the literals. For golang, we use structs and not strings
s

syntaxerror

02/21/2023, 12:26 PM
export declare type PreAndPostAPIHookAction = | "PASSWORDLESS_CREATE_CODE" | "PASSWORDLESS_CONSUME_CODE" | "PASSWORDLESS_RESEND_CODE" | "EMAIL_EXISTS" | "PHONE_NUMBER_EXISTS";
you meant that right?
r

rp

02/21/2023, 12:27 PM
yea