Interface: UseSparePartsOptions
Defined in: composables/vue/useSpareParts.ts:47
Properties
companyId?
optionalcompanyId?:Ref<number|undefined,number|undefined>
Defined in: composables/vue/useSpareParts.ts:85
Active company — scopes the assortment.
configuration?
optionalconfiguration?:object
Defined in: composables/vue/useSpareParts.ts:108
Image filter config, mirroring useProductSearch's configuration.
anonymousUserId?
optionalanonymousUserId?:number
The channel's anonymous user — logged-out listings are scoped to it.
imageSearchFiltersGrid?
optionalimageSearchFiltersGrid?:unknown
imageVariantFiltersMedium?
optionalimageVariantFiltersMedium?:unknown
graphqlClient?
optionalgraphqlClient?:GraphQLClient
Defined in: composables/vue/useSpareParts.ts:49
SDK client. Without it the composable stays idle (controlled mode needs no client).
language
language:
Ref<string>
Defined in: composables/vue/useSpareParts.ts:61
Language for the spare parts themselves (the storefront language).
machineLanguage?
optionalmachineLanguage?:Ref<string|undefined,string|undefined>
Defined in: composables/vue/useSpareParts.ts:70
Language the MACHINE TREE is authored in. Defaults to language.
machine(slug:, language:) is language-scoped and hard-errors with
"No machine found for slug and language" when the machine has no name/slug
in that language. Machine trees are commonly maintained in one language
(typically EN) while their spare parts are localized.
machineLanguages?
optionalmachineLanguages?:Ref<string[] |undefined,string[] |undefined>
Defined in: composables/vue/useSpareParts.ts:79
Extra languages to try when the slug does not resolve in machineLanguage.
A slug resolves only in the language it was authored in, so a tree that is
only half-translated has machines reachable by an NL slug but not an EN
one. machineLanguage and language are always tried first; list the
shop's other locales here to cover the rest. Order is the try order.
onFiltersChange?
optionalonFiltersChange?: (filters) =>void
Defined in: composables/vue/useSpareParts.ts:115
Fired with the facet list after each fetch.
Parameters
filters
AttributeFilter[]
Returns
void
onItemsFoundChange?
optionalonItemsFoundChange?: (count) =>void
Defined in: composables/vue/useSpareParts.ts:119
Fired with the total item count after each fetch.
Parameters
count
number
Returns
void
onMachineChange?
optionalonMachineChange?: (machine) =>void
Defined in: composables/vue/useSpareParts.ts:123
Fired with the machine itself after each fetch (name, child machines, …).
Parameters
machine
SparePartsMachine
Returns
void
onPartsResponse?
optionalonPartsResponse?: (response) =>void
Defined in: composables/vue/useSpareParts.ts:121
Fired with the raw parts response after each fetch.
Parameters
response
SparePartsResponse
Returns
void
onPriceBoundsChange?
optionalonPriceBoundsChange?: (min,max) =>void
Defined in: composables/vue/useSpareParts.ts:117
Fired with the price-slider bounds after each fetch.
Parameters
min
number
max
number
Returns
void
page?
optionalpage?:Ref<number,number>
Defined in: composables/vue/useSpareParts.ts:106
Controlled page. When provided the composable renders (and fetches) this
page and goToPage becomes advisory — the host owns the number, typically
from the URL. Every other listing input was already an option, so its
absence read as "paging is internal" and it was not (PWP-995b). Omit it to
keep the previous uncontrolled behaviour.
pageSize?
optionalpageSize?:Ref<number,number>
Defined in: composables/vue/useSpareParts.ts:97
Items per page. Defaults to 12.
parts?
optionalparts?:Ref<SparePart[] |undefined,SparePart[] |undefined>
Defined in: composables/vue/useSpareParts.ts:55
Controlled mode: pre-fetched parts (e.g. SSR-seeded). When the ref's VALUE
is DEFINED the composable performs no fetching and echoes these back. Pass
[] (not undefined) to show an empty state while the host controls loading.
priceFilterMax?
optionalpriceFilterMax?:Ref<number|undefined,number|undefined>
Defined in: composables/vue/useSpareParts.ts:91
Price-range filter upper bound.
priceFilterMin?
optionalpriceFilterMin?:Ref<number|undefined,number|undefined>
Defined in: composables/vue/useSpareParts.ts:89
Price-range filter lower bound.
slug?
optionalslug?:Ref<string|undefined,string|undefined>
Defined in: composables/vue/useSpareParts.ts:57
Slug of the machine whose parts to list.
sortField?
optionalsortField?:Ref<string|undefined,string|undefined>
Defined in: composables/vue/useSpareParts.ts:93
Sort field.
sortOrder?
optionalsortOrder?:Ref<string|undefined,string|undefined>
Defined in: composables/vue/useSpareParts.ts:95
Sort direction.
taxZone?
optionaltaxZone?:string
Defined in: composables/vue/useSpareParts.ts:81
Tax zone for price calculation.
term?
optionalterm?:Ref<string|undefined,string|undefined>
Defined in: composables/vue/useSpareParts.ts:59
Free-text search, scoped server-side to this machine's parts.
textFilters?
optionaltextFilters?:Ref<ProductTextFilterInput[] |undefined,ProductTextFilterInput[] |undefined>
Defined in: composables/vue/useSpareParts.ts:87
Attribute (facet) filters.
user?
optionaluser?:Ref<Contact|Customer|null,Contact|Customer|null>
Defined in: composables/vue/useSpareParts.ts:83
Active user — drives userId scoping and contact/customer pricing.