Home > @vsf-enterprise/sapcc > useUserAddressesComposable

useUserAddressesComposable interface

Composable method allowing to fetch & user addresses


export interface useUserAddressesComposable 


Property Type Description
addAddress (props: AddUserAddressProps) => Promise<void> A method for adding a new user address
addresses ComputedProperty<Address[]> A list of saved user addresses
deleteAddress (props: DeleteUserAddressProps) => Promise<void> A method for deleting a user address
error ComputedProperty<UseUserAddressesError> An indicator of useUserAddresses composable methods errors
load (props?: LoadUserAddressesProps) => Promise<void> A method for loading user addresses
loading ComputedProperty<UseUserAddressesLoading> An indicator of useUserAddresses composable methods progress
setDefaultAddress (props: SetDefaultUserAddressProps) => Promise<void> A syntactic sugar method for setting user address as default. Calls updateAddress with address: { id: props.addressId, defaultAddress: true } under the hood
updateAddress (props: UpdateUserAddressProps) => Promise<void> A method for updating an existing user address