Skip to content

Commit

Permalink
fix: extend type for update account
Browse files Browse the repository at this point in the history
  • Loading branch information
darkoatanasovski committed Dec 7, 2022
1 parent 6bd308d commit f67de6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion types/account.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ export type UpdateCustomerPayload = {
firstName?: string;
lastName?: string;
externalData?: ExternalData;
};

export type ConsentsPayload = {
consents?: CustomerConsent[];
};

Expand Down Expand Up @@ -248,7 +251,7 @@ type GetCustomerConsents = CleengAuthRequest<GetCustomerConsentsPayload, GetCust
type ResetPassword = CleengRequest<ResetPasswordPayload, Record<string, unknown>>;
type ChangePassword = CleengRequest<ChangePasswordPayload, Record<string, unknown>>;
type GetCustomer = CleengAuthRequest<GetCustomerPayload, Customer>;
type UpdateCustomer = CleengAuthRequest<UpdateCustomerPayload, Customer>;
type UpdateCustomer = CleengAuthRequest<UpdateCustomerPayload & ConsentsPayload, Customer>;
type UpdateCustomerConsents = CleengAuthRequest<UpdateCustomerConsentsPayload, never>;
type RefreshToken = CleengRequest<RefreshTokenPayload, AuthData>;
type GetLocales = CleengEmptyRequest<LocalesData>;
Expand Down

0 comments on commit f67de6d

Please sign in to comment.