Is there any enums for js(or golang) side for acti...
# support-questions
s
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
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
export declare type PreAndPostAPIHookAction = | "PASSWORDLESS_CREATE_CODE" | "PASSWORDLESS_CONSUME_CODE" | "PASSWORDLESS_RESEND_CODE" | "EMAIL_EXISTS" | "PHONE_NUMBER_EXISTS";
you meant that right?
r
yea