Skip to content

feature-invoice advanced

Everything else the package exports, for when you go beyond its components and hooks, such as your own queries or cache updates. Most projects never need these.

Contexts7
InvoiceContextThe context InvoiceProvider fills.
@evolve-storefront/feature-invoice/context
useCanViewInvoicesWhether invoices may be shown/queried at all.
@evolve-storefront/feature-invoice/context
useInvoiceContextRead the injected auth/session/mode context.
@evolve-storefront/feature-invoice/context
useInvoiceScopeDerive the read scope from the injected mode.
@evolve-storefront/feature-invoice/context
invoiceDefaultsWhat the context holds without an InvoiceProvider: a signed-out consumer.
@evolve-storefront/feature-invoice/context
InvoiceContextValueInjected auth/session/mode seam for the invoice feature.
@evolve-storefront/feature-invoice/context
InvoiceModeConsumer (own invoices) vs business (company-scoped) — config, not a fork.
@evolve-storefront/feature-invoice/context
GraphQL documents6
GetBusinessInvoiceOne of a business unit's invoices, by id.
@evolve-storefront/feature-invoice/queries
GetBusinessInvoiceCreditThe business unit's credit, for CreditSummary; the backend works out available.
@evolve-storefront/feature-invoice/queries
GetBusinessInvoicesA business unit's invoices, paged, with search, status and date filters.
@evolve-storefront/feature-invoice/queries
GetCustomerInvoiceA personal buyer's single invoice.
@evolve-storefront/feature-invoice/queries
GetCustomerInvoicesThe signed-in customer's invoices, paged, with search, status and date filters.
@evolve-storefront/feature-invoice/queries
InvoicePayStart a payment against an invoice.
@evolve-storefront/feature-invoice/queries
Data and cache helpers2
invalidateInvoicesInvalidate every list cache for a scope (all pages / filters).
@evolve-storefront/feature-invoice
invoiceKeysreact-query key factory for the invoice list + detail caches.
@evolve-storefront/feature-invoice
Errors3
InvoicePaymentErrorThe gateway refused to start the payment.
@evolve-storefront/feature-invoice/hooks
InvoicePaymentNotConfiguredErrorInvoiceProvider was given no returnUrls.
@evolve-storefront/feature-invoice/hooks
InvoicePaymentRedirectMissingErrorThe payment was created and the gateway named nowhere to send the buyer.
@evolve-storefront/feature-invoice/hooks
Other functions and constants3
countsByStatus[{ status, count }] as a record by status; null stays null.
@evolve-storefront/feature-invoice/queries
readPayInvoiceResponseTurn paymentCreate's response into a destination or a throw.
@evolve-storefront/feature-invoice/hooks
OUTSTANDING_INVOICE_STATUSESThe states an invoice still owes money in: what RecentInvoices shows.
@evolve-storefront/feature-invoice/recent-invoices
Types15
InvoiceFull invoice for the detail view.
@evolve-storefront/feature-invoice
InvoiceClientDeviceWhich client is asking, since the offered methods differ by it (schema ClientDeviceType).
@evolve-storefront/feature-invoice
InvoiceCreditA business unit's credit: the limit, what is in use, and what is left.
@evolve-storefront/feature-invoice
InvoicePaymentMethodA payment method offered for an invoice.
@evolve-storefront/feature-invoice
InvoicePaymentMethodInputThe payment method to charge with, chosen from the ones the storefront offers.
@evolve-storefront/feature-invoice
InvoiceResultPaginated invoice list.
@evolve-storefront/feature-invoice
InvoiceReturnUrlsWhere the payment provider returns the buyer after paying an invoice.
@evolve-storefront/feature-invoice
InvoiceScopeRead scope — consumer (own invoices) vs business (company-scoped).
@evolve-storefront/feature-invoice
InvoiceStatusInvoice lifecycle status — the InvoiceStatusType enum, verbatim.
@evolve-storefront/feature-invoice
InvoiceStatusCountThe number of invoices in one status (schema InvoiceStatusCount).
@evolve-storefront/feature-invoice
InvoiceSummarySummary shape for the invoice list.
@evolve-storefront/feature-invoice
MoneyMoney (target Money): minor units + ISO currency.
@evolve-storefront/feature-invoice
PayInvoiceResult
@evolve-storefront/feature-invoice/hooks
PayInvoiceVariables
@evolve-storefront/feature-invoice/hooks
InvoiceListFilterNamesThe form field names, so they line up with what the page reads from its search params.
@evolve-storefront/feature-invoice/invoice-list

Not listed: 16 props and options types. They appear as the tables on the pages of what they type.