Skip to content

feature-organization 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.

Contexts6
OrganizationContextThe context OrganizationProvider fills.
@evolve-storefront/feature-organization/context
useBusinessUnitIdThe active company id, or throw — for hooks/components that require one.
@evolve-storefront/feature-organization/context
useHasCapabilitiesTrue when the signed-in user holds every listed capability (gating).
@evolve-storefront/feature-organization/context
useOrganizationContextRead the injected business/session context.
@evolve-storefront/feature-organization/context
organizationDefaultsWhat the context holds without an OrganizationProvider: signed out, no business unit.
@evolve-storefront/feature-organization/context
OrganizationContextValueInjected business/session seam for the organization feature.
@evolve-storefront/feature-organization/context
GraphQL documents11
BusinessUnitAddressCreateAdds an address to the business unit's address book.
@evolve-storefront/feature-organization/queries
BusinessUnitAddressDeleteRemoves one address from the business unit's address book.
@evolve-storefront/feature-organization/queries
BusinessUnitAddressUpdateReplaces one address in the business unit's address book.
@evolve-storefront/feature-organization/queries
BusinessUnitAssociateInviteInvites someone by email to the business unit, with the roles given.
@evolve-storefront/feature-organization/queries
BusinessUnitAssociateRemoveRemoves an associate from the business unit.
@evolve-storefront/feature-organization/queries
BusinessUnitAssociateRolesUpdateReplaces an associate's roles in the business unit.
@evolve-storefront/feature-organization/queries
BusinessUnitSwitchMakes another business unit, and its store, the session's current one.
@evolve-storefront/feature-organization/queries
GetBusinessUnitOne business unit with its associates, the roles it offers and its billing address.
@evolve-storefront/feature-organization/queries
GetBusinessUnitAddressesOne page of the company's address book, optionally narrowed by a search term.
@evolve-storefront/feature-organization/queries
GetBusinessUnitsThe business units the signed-in customer belongs to, by id and name.
@evolve-storefront/feature-organization/queries
GetCurrentAssociateCapabilitiesThe roles the signed-in associate holds in one company, for the capabilities they grant.
@evolve-storefront/feature-organization/queries
Data and cache helpers3
invalidateBusinessUnitInvalidate a business unit after an associate/address change.
@evolve-storefront/feature-organization
setBusinessUnitCacheMerge a fresh business unit into the cache (post-mutation).
@evolve-storefront/feature-organization
organizationKeysreact-query key factory for the business-unit caches.
@evolve-storefront/feature-organization
Schemas6
createAddressFormSchemaBuild the address schema for a config + country.
@evolve-storefront/feature-organization/schemas
withStrictPhoneWrap any address schema with strict phone validation.
@evolve-storefront/feature-organization/schemas
AddressFormSchemaThe default-config schema — the public, statically-typed instance consumers already depend on.
@evolve-storefront/feature-organization/schemas
EditRolesFormSchemaEdit-roles form schema: a single role (simplified role model).
@evolve-storefront/feature-organization/schemas
InviteAssociateFormSchemaInvite-associate form schema: an email and one or more roles.
@evolve-storefront/feature-organization/schemas
StrictAddressFormSchemaStrict phone variant of the default AddressFormSchema, for the server.
@evolve-storefront/feature-organization/schemas
Other functions and constants26
localCompanyAddressMemorylocalStorage, per business unit.
@evolve-storefront/feature-organization/company-address-picker
memoryCompanyAddressMemoryIn memory, for this page only.
@evolve-storefront/feature-organization/company-address-picker
companyAddressTitleWhat a company address card is titled: the name the company gave the address, else where it is (addressLocationName, such as "Rotterdam · Trade Plaza 1").
@evolve-storefront/feature-organization/company-address-book
COMPANY_ADDRESS_CONFIGA company address belongs to the business, not to a person, so the company name is required and both personal names are optional.
@evolve-storefront/feature-organization/company-address-dialog
GetOrderApprovalRuleOne of a business unit's approval rules, or null when it has none by that id.
@evolve-storefront/feature-organization/approval/documents
GetOrderApprovalRulesOne page of a business unit's approval rules, optionally only active or inactive ones.
@evolve-storefront/feature-organization/approval/documents
GetOrderApprovalsOne page of a business unit's approval queue, with the count of each status.
@evolve-storefront/feature-organization/approval/documents
OrderApprovalRuleCreateCreates an approval rule.
@evolve-storefront/feature-organization/approval/documents
OrderApprovalRuleStatusUpdateTurns a rule on or off.
@evolve-storefront/feature-organization/approval/documents
OrderApprovalRuleUpdateChanges the given fields of a rule; version makes it fail if the rule changed meanwhile.
@evolve-storefront/feature-organization/approval/documents
OrderApprovalStatusUpdateApproves or rejects one flow; version makes it fail if the flow changed meanwhile.
@evolve-storefront/feature-organization/approval/documents
approvalKeysreact-query key factory for the approval caches, per business unit.
@evolve-storefront/feature-organization/approval/queries
ApproverTiersEditorWho approves a rule, step by step.
@evolve-storefront/feature-organization/approval/rule-form
ConditionBuilderWhich orders a rule applies to, as clauses: the order total, products by SKU, a line's quantity, the shipping country, or an order custom field.
@evolve-storefront/feature-organization/approval/rule-form
draftToCreateInputWhat creating the drafted rule sends.
@evolve-storefront/feature-organization/approval/rule-form
draftToUpdateInputWhat saving the drafted changes sends.
@evolve-storefront/feature-organization/approval/rule-form
emptyRuleDraftA new rule: active, every order, one tier with one empty group.
@evolve-storefront/feature-organization/approval/rule-form
ruleToDraftA rule as read, ready to edit.
@evolve-storefront/feature-organization/approval/rule-form
validateRuleDraftThe draft's errors before a request is made, keyed by input path, such as condition.clauses.2.orderTotal.amount: the paths the server's own errors use, so one set of field names shows both.
@evolve-storefront/feature-organization/approval/rule-form
ApprovalConditionSummaryWhich orders a rule applies to, in words: "Every order", one clause, or "All of" / "Any of" above a list.
@evolve-storefront/feature-organization/approval/rules
ApprovalRuleStatusSwitchSwitches a rule on or off at once, sending the version it was read at.
@evolve-storefront/feature-organization/approval/rules
ApproverTiersSummaryWho approves, in words.
@evolve-storefront/feature-organization/approval/rules
roleNamesRole keys as names, the key itself for a role the unit does not offer.
@evolve-storefront/feature-organization/approval/rules
ApprovalTableThe queue as a table: reference, order date and who ordered, with a link to the order per row and the pager below.
@evolve-storefront/feature-organization/approval/queue
ApprovalTableSkeletonPlaceholder rows for ApprovalTable, in its columns, while the page loads.
@evolve-storefront/feature-organization/approval/queue
ApproveRejectActionsApprove and reject controls, rejecting with an optional reason.
@evolve-storefront/feature-organization/approval/queue
Types54
AddressAn address (subset of schema Address).
@evolve-storefront/feature-organization
AddressInputWrite shape for an address (schema AddressInput).
@evolve-storefront/feature-organization
AddressResultA page of the company's address book (schema AddressResult).
@evolve-storefront/feature-organization
AssociateResultPaginated associates (schema BusinessUnitAssociateResult).
@evolve-storefront/feature-organization
BusinessUnitThe company account (schema BusinessUnit).
@evolve-storefront/feature-organization
BusinessUnitAssociateA company member (schema BusinessUnitAssociate).
@evolve-storefront/feature-organization
BusinessUnitCapabilityA framework-defined capability key (schema enum BusinessUnitCapability) — an engine-agnostic access grant, never a CT-native/role-name string.
@evolve-storefront/feature-organization
BusinessUnitMutationErrorTyped-error payload shared by the business-unit mutations (ValidationError).
@evolve-storefront/feature-organization
BusinessUnitMutationResult
@evolve-storefront/feature-organization
BusinessUnitRoleA company role (schema BusinessUnitRole).
@evolve-storefront/feature-organization
BusinessUnitSummaryA company the signed-in user can act within (for the switcher).
@evolve-storefront/feature-organization
BusinessUnitSwitchResultResult of switching the active company (schema BusinessUnitSwitchResponse).
@evolve-storefront/feature-organization
Salutation
@evolve-storefront/feature-organization
AddressFormInput
@evolve-storefront/feature-organization/schemas
EditRolesFormInput
@evolve-storefront/feature-organization/schemas
InviteAssociateFormInput
@evolve-storefront/feature-organization/schemas
StrictAddressFormInput
@evolve-storefront/feature-organization/schemas
InviteAssociateFormContextValueContext seeded by InviteAssociateForm so the composed pieces (Fields, Submit) read what they need without prop-drilling — which is what lets the dialog own the DialogFooter, and the submit button inside it, instead of the form rendering an actions row of its own.
@evolve-storefront/feature-organization/invite-associate-form
EditRolesFormContextValueContext seeded by EditRolesForm so the composed pieces (Fields, Submit) read what they need without prop-drilling — which is what lets the dialog own the DialogFooter, and the submit button inside it, instead of the form rendering an actions row of its own.
@evolve-storefront/feature-organization/edit-roles-form
CompanyAddressFilterA filter chip over the book, such as "Distribution centers"; the site says what matches.
@evolve-storefront/feature-organization/company-address-picker
CompanyAddressMemoryWhat a buyer keeps at hand in a company's book: the addresses used last, and starred ones.
@evolve-storefront/feature-organization/company-address-picker
CompanyAddressMemoryStoreWhere a buyer's recent and favorite company addresses are kept, per business unit.
@evolve-storefront/feature-organization/company-address-picker
CompanyAddressBookItemRendererRenders one company address.
@evolve-storefront/feature-organization/company-address-book
CompanyIdentityDetailOne more fact about the company, from the site's own records.
@evolve-storefront/feature-organization/company-identity
UseCompanyAddressFormResult
@evolve-storefront/feature-organization/company-address-dialog
ApprovalClauseOne condition on an order (schema union OrderApprovalClause).
@evolve-storefront/feature-organization/approval
ApprovalClauseInputA clause as written: exactly one field set (schema OrderApprovalClauseInput).
@evolve-storefront/feature-organization/approval
ApprovalComparisonOperator
@evolve-storefront/feature-organization/approval
ApprovalConditionWhich orders a rule applies to; no clauses is every order of its requesters.
@evolve-storefront/feature-organization/approval
ApprovalDeciderAn associate who decided a flow.
@evolve-storefront/feature-organization/approval
ApprovalMutationError
@evolve-storefront/feature-organization/approval
ApprovalOrderThe order an approval flow holds, as much of it as a queue row shows.
@evolve-storefront/feature-organization/approval
ApprovalRuleAn approval rule (schema OrderApprovalRule).
@evolve-storefront/feature-organization/approval
ApprovalRuleCreateInputWhat creating a rule takes (schema OrderApprovalRuleCreateInput).
@evolve-storefront/feature-organization/approval
ApprovalRuleResponse
@evolve-storefront/feature-organization/approval
ApprovalRuleStatus
@evolve-storefront/feature-organization/approval
ApprovalRuleUpdateInputOnly the fields given change; leaving out condition keeps the rule's own.
@evolve-storefront/feature-organization/approval
ApprovalSetOperator
@evolve-storefront/feature-organization/approval
ApprovalStatusMirrors the framework's OrderApprovalStatusType enum verbatim.
@evolve-storefront/feature-organization/approval
ApprovalTierTiers approve in order; in a tier every group approves, through any one of its roles.
@evolve-storefront/feature-organization/approval
OrderApprovalOne order's approval flow (schema OrderApproval).
@evolve-storefront/feature-organization/approval
OrderApprovalPageOne page of the queue, with the count of every status whatever the filter.
@evolve-storefront/feature-organization/approval
OrderApprovalResponse
@evolve-storefront/feature-organization/approval
ApprovalCustomFieldAn order custom field a site lets rules compare, from its own config.
@evolve-storefront/feature-organization/approval/rule-form
ClauseDraftA clause as the form edits it: amounts in major units, SKUs as typed.
@evolve-storefront/feature-organization/approval/rule-form
ClauseKind
@evolve-storefront/feature-organization/approval/rule-form
ConditionDraftThe condition as the form edits it: whether all or any clause has to hold, and the clauses.
@evolve-storefront/feature-organization/approval/rule-form
RuleDraftA rule as the form edits it.
@evolve-storefront/feature-organization/approval/rule-form
RuleDraftError
@evolve-storefront/feature-organization/approval/rule-form
RuleDraftErrorsWhy a field of the draft cannot be saved, by the input path the server also uses.
@evolve-storefront/feature-organization/approval/rule-form
ApprovalRoleA role the business unit offers: BusinessUnit.availableRoles, whose id is the role key.
@evolve-storefront/feature-organization/approval/rules
ApprovalRuleLinkRendererRenders a rule's edit link with the app's router.
@evolve-storefront/feature-organization/approval/rules
ApprovalOrderLinkRendererRenders a row's link to its order with the app's router; called only where the flow has one.
@evolve-storefront/feature-organization/approval/queue
ApprovalQueueItemRendererRenders one approval flow.
@evolve-storefront/feature-organization/approval/queue

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