@softr/sdk
Version:
The SDK for building Softr apps on TanStack Start. It lets an app interact with Softr: auth, datasources, workflows and integrations.
18 lines • 992 B
TypeScript
//#region src/auth/methods/utils.d.ts
type Result<T, E = Error> = {
success: false;
error: E;
} | {
success: true;
data: T;
};
type AuthError = {
code: AuthErrorCode;
message: string;
};
type AuthErrorCode = "invalidCredentials" | "tooManyAttempts" | "emailTaken" | "invalidDetails" | "invalidCode" | "noAccount" | "accountDeactivated" | "notAuthenticated" | "emailDomainNotAllowed"
/** The plan of the app's workspace no longer includes this way to sign in, as after a downgrade. Another way in can still work. */ | "notEnabled" | "linkExpired" | "invalidName" | "invalidPhoto" | "fileTooLarge" | "notAnImage" | "avatarNotSupported"
/** Any call that signs a visitor in or up: the plan of the app's workspace has no room for this user. */ | "userLimitReached"
/** The visitor owes a second step that the plan of the app's workspace no longer includes. No way in works until the app owner changes the plan. */ | "secondFactorNotEnabled";
//#endregion
export { AuthError, Result };