mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 06:28:12 +00:00
feat: setup account page for customer and centeralize the otps and phone usages to use the iam user
This commit is contained in:
@@ -81,6 +81,11 @@ import type {
|
||||
ForgotPasswordRequestPayload,
|
||||
ForgotPasswordVerifyPayload,
|
||||
ResetTicket,
|
||||
SendContactOtpPayload,
|
||||
SendContactOtpResponse,
|
||||
UpdateAccountNamePayload,
|
||||
UpdateContactPayload,
|
||||
UpdateContactResponse,
|
||||
} from "@/types/auth";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -147,6 +152,26 @@ export const api = {
|
||||
logout: endpoint<void, void>("auth", "logout", authService.logout),
|
||||
},
|
||||
|
||||
// The signed-in user's own IAM account — the phone/email that OTPs and SMS
|
||||
// actually go to. Separate from `companies`, which is business profile data.
|
||||
account: {
|
||||
sendContactOtp: endpoint<SendContactOtpPayload, SendContactOtpResponse>(
|
||||
"account",
|
||||
"sendContactOtp",
|
||||
authService.sendContactOtp,
|
||||
),
|
||||
updateContact: endpoint<UpdateContactPayload, UpdateContactResponse>(
|
||||
"account",
|
||||
"updateContact",
|
||||
authService.updateContact,
|
||||
),
|
||||
updateName: endpoint<UpdateAccountNamePayload, { success: true }>(
|
||||
"account",
|
||||
"updateName",
|
||||
authService.updateAccountName,
|
||||
),
|
||||
},
|
||||
|
||||
companies: {
|
||||
getInfo: endpoint<void, CompanyInfoResponse | null>(
|
||||
"companies",
|
||||
|
||||
Reference in New Issue
Block a user