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

Types: Customer to OrderState

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

The types of @poltura/theme-sdk/customer, Customer to OrderState.

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

Customer

A signed-in shopper.

idrequiredstring

The customer's id.

emailrequiredstring

The sign-in email address.

givenNamerequiredstring | null

The given name, or null.

familyNamerequiredstring | null

The family name, or null.

displayNamerequiredstring

The full name in the page language's name order; empty when neither name is set.

phonerequiredstring | null

The phone number, or null.

companyNamerequiredstring | null

The company name, or null.

isBusinessrequiredboolean

Whether the shopper buys as a business.

createdAtrequiredstring | null

When the account was created, as an ISO 8601 instant, or null.

CustomerState

The signed-in shopper and the way out.

customerrequiredCustomer | null

The signed-in shopper, or null when nobody is signed in or while it loads.

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

Whether the shopper is loading, ready, or failed to load.

signOutrequired() => Promise<void>

Signs the shopper out and goes to the home page.

EmailCodeKind

The emailed step a shopper finishes on the verify page: a new account, a sign-in, a new password, a moved store account, or an outside account's sign-in.

type EmailCodeKind = 'sign-up' | 'sign-in' | 'password-reset' | 'store-move' | 'outside-account'

EmailCodeStepState

The verify page's state: asking for the code, asking for what finishes the step, or a step that is gone.

kindrequiredEmailCodeKind | null

The step the shopper started, or null when this browser holds none.

phaserequired'code' | 'continue' | 'expired' | 'other-browser'

`code` until the code is typed, `continue` once held, `expired` when no step is left, `other-browser` when the link needs the browser that began it.

busyrequiredboolean

Whether a request is running.

asksrequired{ readonly currentPassword: boolean; readonly newPassword: boolean; }

What the `continue` phase asks besides the button: the earlier password of a moved store account, a new password for a sign-up or a too-weak moved one.

valuesrequired{ readonly code: string; readonly currentPassword: string; readonly password: string; readonly confirmPassword: string; }

What the shopper typed.

setValuerequired(field: 'code' | 'currentPassword' | 'password' | 'confirmPassword', value: string) => void

Changes one value.

errorrequiredstring | null

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

recipientrequiredstring | null

The masked address an emailed link signs in to, shown before the shopper continues, or null when the step names none.

signInHrefrequiredstring

The storefront path the `expired` phase signs the shopper in at: sign-in returning to a case email's page, or plain sign-in.

submitrequired() => Promise<void>

Sends the code in the `code` phase, finishes the step in the `continue` phase; finishing signs the shopper in and moves on to the page they came from.

FulfillmentStatus

Where an order's delivery is.

type FulfillmentStatus = 'unfulfilled' | 'partial' | 'shipped' | 'delivered' | 'cancelled'

Order

A placed order as its buyer sees it.

idrequiredstring

The order's id.

numberrequiredstring

The order number the shopper quotes.

hrefrequiredstring

The order's page in the account.

placedAtrequiredstring

When it was placed, as an ISO 8601 instant.

statusrequiredOrderStatus

Where the order is.

statusLabelrequiredstring

The status in the page language.

currencyCoderequiredCurrencyCode

The order's currency.

totalsrequiredCartTotals

What the order adds up to.

amountDuerequiredMoney

What the shopper still owes.

linesrequiredreadonly OrderLine[]

The ordered lines.

itemCountrequirednumber

How many units were ordered.

shippingAddressrequiredAddress | null

Where it ships, or null for a digital order.

billingAddressrequiredAddress | null

Where the invoice goes, or null.

shippingMethodrequiredstring | null

The delivery method the shopper chose, in the store's words, or null when the order has none.

pickupPointrequiredOrderPickupPoint | null

The locker or pickup point the parcel goes to, or null for door delivery and older orders.

paymentrequiredOrderPayment

The payment state.

fulfillmentrequiredOrderFulfillment

The delivery state.

documentsrequiredreadonly OrderDocument[]

Documents to download.

OrderDocument

A downloadable order document.

kindrequiredOrderDocumentKind

What kind of document it is.

labelrequiredstring

Its name in the page language.

hrefrequiredstring

Where it downloads from.

OrderDocumentKind

What kind of document an order has.

type OrderDocumentKind = 'invoice' | 'proForma' | 'creditNote' | 'receipt'

OrderFulfillment

An order's delivery state with its label and tracking.

statusrequiredFulfillmentStatus

Where the delivery is.

labelrequiredstring

The status in the page language.

trackingrequiredreadonly OrderTracking[]

Tracking per parcel.

OrderLine

One line of a placed order.

idrequiredstring

The line's id.

titlerequiredstring

The product's title.

variantTitlerequiredstring | null

The variant's title, or null for a single-variant product.

imagerequiredMediaImageRef | null

The line's image, or null.

quantityrequirednumber

How many units were ordered.

totalrequiredMoney

The line total.

isDigitalrequiredboolean

Whether the item is delivered digitally.

OrderPage

One page of the shopper's orders, newest first.

itemsrequiredreadonly OrderSummary[]

The orders on this page.

totalrequirednumber

How many orders the shopper has over every page.

pagerequirednumber

The page number, from 1.

pageCountrequirednumber

How many pages there are.

OrderPayment

An order's payment state with its label.

statusrequiredPaymentStatus

Where the payment is.

labelrequiredstring

The status in the page language.

OrderPickupPoint

The parcel locker or pickup point an order is delivered to.

namerequiredstring

The point's name, as the carrier lists it.

addressLinesrequiredreadonly string[]

The lines of its address, street first.

OrderState

One of the signed-in shopper's orders, as it loads.

orderrequiredOrder | null

The order, or null while it loads or when the shopper has no such order.

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

Whether the order is loading, ready, or failed to load.

Utoljára frissítve