Home > @shopware-pwa/composables > IUseUser
# IUseUser interface
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
interface for useUser composable
Signature:
export interface IUseUser
# Properties
Property | Type | Description |
---|---|---|
addAddress | (params: Partial<CustomerAddress>) => Promise<boolean> | (BETA) |
addresses | Ref<CustomerAddress[] | null> | (BETA) |
country | Ref<Country | null> | (BETA) |
deleteAddress | (addressId: string) => Promise<boolean> | (BETA) |
error | Ref<any> | (BETA) |
getOrderDetails | (orderId: string) => Promise<Order | undefined> | (BETA) |
isLoggedIn | Ref<boolean> | (BETA) |
loadAddresses | () => Promise<void> | (BETA) |
loadCountry | (countryId: string) => Promise<void> | (BETA) |
loading | Ref<boolean> | (BETA) |
loadOrders | () => Promise<void> | (BETA) |
loadSalutation | (salutationId: string) => Promise<void> | (BETA) |
login | ({ username, password, }: { username?: string; password?: string; }) => Promise<boolean> | (BETA) |
logout | () => Promise<void> | (BETA) |
markAddressAsDefault | ({ addressId, type, }: { addressId?: string; type?: AddressType; }) => Promise<string | boolean> | (BETA) |
onLogout | (fn: () => void) => void | (BETA) React on user logout |
onUserLogin | (fn: (params: { customer: Customer; }) => void) => void | (BETA) |
onUserRegister | (fn: () => void) => void | (BETA) |
orders | Ref<Order[] | null> | (BETA) |
refreshUser | () => Promise<void> | (BETA) |
register | ({}: CustomerRegistrationParams) => Promise<boolean> | (BETA) |
resetPassword | (resetPasswordData: CustomerResetPasswordParam) => Promise<boolean> | (BETA) |
salutation | Ref<Salutation | null> | (BETA) |
updateEmail | (updateEmailData: CustomerUpdateEmailParam) => Promise<boolean> | (BETA) |
updatePassword | (updatePasswordData: CustomerUpdatePasswordParam) => Promise<boolean> | (BETA) |
updatePersonalInfo | (personals: CustomerUpdateProfileParam) => Promise<boolean> | (BETA) |
user | Ref<Customer | null> | (BETA) |