Fejlesztőknek
Kezdj bele
Témák/Theme SDK/Modules/customer/Types: AccountSettingsPartProps to BusinessSignUp

Types: AccountSettingsPartProps to BusinessSignUp

Ez az oldal még csak angolul érhető el.

The types of @poltura/theme-sdk/customer, AccountSettingsPartProps to BusinessSignUp.

Ezen az oldalon
import { … } from '@poltura/theme-sdk/customer';

AccountSettingsPartProps

Props of the settings parts, from PersonalInfoForm to AccountDeletion.

classNamestring

Classes added to the part.

AccountNavItem

One entry of the account navigation.

idrequiredstring

The entry's id, stable across languages.

kindrequiredAccountNavKind

Whether the page is the account's own, an installed app's, or a store feature's.

hrefrequiredstring

Where the entry goes.

labelrequiredstring

The entry's text in the page language.

descriptionrequiredstring

A line about the page in the page language.

AccountNavKind

Which kind of page an account navigation entry opens.

type AccountNavKind = 'core' | 'app' | 'feature'

AccountView

The account area's shell: the shopper and the account navigation.

customerrequiredCustomer | null

The signed-in shopper, or null.

navigationrequiredreadonly AccountNavItem[]

The account navigation, in order.

isSignedInrequiredboolean

Whether a shopper is signed in.

isLoadingrequiredboolean

Whether the shopper is still loading.

Address

A postal address from the shopper's address book or an order.

idrequiredstring

The address's id.

givenNamerequiredstring

The recipient's given name.

familyNamerequiredstring

The recipient's family name.

companyNamerequiredstring | null

The company, or null.

line1requiredstring

The street address.

line2requiredstring | null

The apartment, suite or floor, or null.

cityrequiredstring

The city.

postalCoderequiredstring

The postal code.

regionrequiredstring | null

The state, province or county as free text, or null.

countryCoderequiredCountryCode

The country.

phonerequiredstring | null

The phone number, or null.

taxIdrequiredstring | null

The business buyer's tax id, or null.

isDefaultShippingrequiredboolean

Whether orders ship here by default.

isDefaultBillingrequiredboolean

Whether invoices go here by default.

AddressBookState

The signed-in shopper's address book with the actions that change it; the host stores every change.

addressesrequiredreadonly Address[]

The saved addresses.

statusrequired'loading' | 'ready' | 'error'

Whether the addresses are loading, ready, or failed to load.

isBusyrequiredboolean

Whether a change is being saved.

addrequired(input: AddressInput) => Promise<AddressResult>

Saves a new address.

updaterequired(id: string, input: AddressInput) => Promise<AddressResult>

Changes a saved address.

removerequired(id: string) => Promise<AddressResult>

Deletes a saved address.

setDefaultrequired(id: string, use: AddressUse) => Promise<AddressResult>

Makes a saved address the default for shipping or billing.

AddressInput

A postal address as the shopper enters it, before the address book stores it.

givenNamerequiredstring

The recipient's given name.

familyNamerequiredstring

The recipient's family name.

companyNamerequiredstring | null

The company, or null for a personal address.

line1requiredstring

The street address.

line2requiredstring | null

The apartment, suite or floor, or null.

cityrequiredstring

The city.

postalCoderequiredstring

The postal code.

regionrequiredstring | null

The state, province or county as free text, or null.

countryCoderequiredCountryCode

The country; one the store sells to.

phonerequiredstring | null

The phone number, or null.

taxIdrequiredstring | null

The business buyer's tax id, or null.

AddressResult

The outcome of an address book action.

okrequiredtrue

The action worked.

AddressUse

What an address book default is set for.

type AddressUse = 'shipping' | 'billing'

AuthField

A field of the sign-in, registration and password forms.

type AuthField = 'email' | 'password' | 'confirmPassword' | 'givenName' | 'familyName' | 'phone'

AuthFormState

A sign-in, registration or password form's values, errors and submit; credentials, captcha and sessions stay with the host.

moderequiredAuthMode

Which form it is.

fieldsrequiredreadonly AuthField[]

The fields this form asks for, in order.

valuesrequiredReadonly<Record<AuthField, string>>

What the shopper typed, per field.

setValuerequired(field: AuthField, value: string) => void

Changes one field and clears its error.

fieldErrorsrequiredReadonly<Partial<Record<AuthField, string>>>

Why a field is not valid, in the page language.

termsrequiredAuthTerms | null

The terms checkbox, or null when the form has none.

businessrequiredBusinessSignUp | null

Company sign-up on a registration form, or null when the form or the store has none.

errorrequiredstring | null

Why the last submit failed, in the page language, or null.

statusrequired'idle' | 'submitting' | 'done'

Whether the form is being filled, sent, or done; a done form shows its confirmation.

blurrequired(field: AuthField) => Promise<void>

Checks a field the shopper left, including the checks that need the network.

failrequired(message: string) => void

Shows a message as the form's error, for a way of signing in that runs outside the form.

resetrequired() => void

Clears the error and takes a finished form back to editing.

submitrequired() => Promise<void>

Validates the fields and sends the form; signing in also moves on to the page the shopper came from.

AuthMode

Which sign-in form is shown.

type AuthMode = 'signIn' | 'magicLink' | 'register' | 'forgotPassword' | 'resetPassword'

AuthTerms

The terms checkbox a registration form needs ticked before it sends.

acceptedrequiredboolean

Whether the shopper accepted the terms and the privacy policy.

setAcceptedrequired(accepted: boolean) => void

Ticks or clears the checkbox and clears its error.

errorrequiredstring | null

Why the form did not send for want of it, in the page language, or null.

BusinessSignUp

Signing up as a company on a registration form: the buyer type, company and tax number the host checks, and the tier applications.

requiredrequiredboolean

Whether the store asks every new account for company details, rather than offering them.

enabledrequiredboolean

Whether the shopper signs up as a company.

checkingrequiredboolean

Whether the tax number is being checked; the form does not send until it settles.

Utoljára frissítve