Interface RecipeInterface
Methods
createResetPasswordToken
- createResetPasswordToken(input: { userId: string }): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
Parameters
input: { userId: string }
Returns Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
getUserById
- getUserById(input: { userId: string }): Promise<undefined | User>
Parameters
input: { userId: string }
Returns Promise<undefined | User>
getUserByThirdPartyInfo
- getUserByThirdPartyInfo(input: { thirdPartyId: string; thirdPartyUserId: string }): Promise<undefined | User>
Parameters
input: { thirdPartyId: string; thirdPartyUserId: string }
thirdPartyId: string
thirdPartyUserId: string
Returns Promise<undefined | User>
getUsersByEmail
- getUsersByEmail(input: { email: string }): Promise<User[]>
Parameters
Returns Promise<User[]>
resetPasswordUsingToken
- resetPasswordUsingToken(input: { newPassword: string; token: string }): Promise<{ status: "OK" | "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
Parameters
input: { newPassword: string; token: string }
newPassword: string
token: string
Returns Promise<{ status: "OK" | "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
signIn
- signIn(input: { email: string; password: string }): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
Parameters
input: { email: string; password: string }
email: string
password: string
Returns Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
signInUp
- signInUp(input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { error: string; status: "FIELD_ERROR" }>
Parameters
input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string }
email: { id: string; isVerified: boolean }
id: string
isVerified: boolean
thirdPartyId: string
thirdPartyUserId: string
Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { error: string; status: "FIELD_ERROR" }>
signUp
- signUp(input: { email: string; password: string }): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
Parameters
input: { email: string; password: string }
email: string
password: string
Returns Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
updateEmailOrPassword
- updateEmailOrPassword(input: { email?: string; password?: string; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>
Parameters
input: { email?: string; password?: string; userId: string }
Optional email?: string
Optional password?: string
userId: string
Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>