Interface: UseSparePartsOptions
Defined in: composables/vue/useSpareParts.ts:43
Properties
companyId?
optionalcompanyId?:Ref<number|undefined,number|undefined>
Defined in: composables/vue/useSpareParts.ts:72
Active company — scopes the assortment.
configuration?
optionalconfiguration?:object
Defined in: composables/vue/useSpareParts.ts:86
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:45
SDK client. Without it the composable stays idle (controlled mode needs no client).
language
language:
Ref<string>
Defined in: composables/vue/useSpareParts.ts:57
Language for the spare parts themselves (the storefront language).
machineLanguage?
optionalmachineLanguage?:Ref<string|undefined,string|undefined>
Defined in: composables/vue/useSpareParts.ts:66
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.
onFiltersChange?
optionalonFiltersChange?: (filters) =>void
Defined in: composables/vue/useSpareParts.ts:93
Fired with the facet list after each fetch.
Parameters
filters
AttributeFilter[]
Returns
void
onItemsFoundChange?
optionalonItemsFoundChange?: (count) =>void
Defined in: composables/vue/useSpareParts.ts:97
Fired with the total item count after each fetch.
Parameters
count
number
Returns
void
onMachineChange?
optionalonMachineChange?: (machine) =>void
Defined in: composables/vue/useSpareParts.ts:101
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:99
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:95
Fired with the price-slider bounds after each fetch.
Parameters
min
number
max
number
Returns
void
pageSize?
optionalpageSize?:Ref<number,number>
Defined in: composables/vue/useSpareParts.ts:84
Items per page. Defaults to 12.
parts?
optionalparts?:Ref<SparePart[] |undefined,SparePart[] |undefined>
Defined in: composables/vue/useSpareParts.ts:51
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:78
Price-range filter upper bound.
priceFilterMin?
optionalpriceFilterMin?:Ref<number|undefined,number|undefined>
Defined in: composables/vue/useSpareParts.ts:76
Price-range filter lower bound.
slug?
optionalslug?:Ref<string|undefined,string|undefined>
Defined in: composables/vue/useSpareParts.ts:53
Slug of the machine whose parts to list.
sortField?
optionalsortField?:Ref<string|undefined,string|undefined>
Defined in: composables/vue/useSpareParts.ts:80
Sort field.
sortOrder?
optionalsortOrder?:Ref<string|undefined,string|undefined>
Defined in: composables/vue/useSpareParts.ts:82
Sort direction.
taxZone?
optionaltaxZone?:string
Defined in: composables/vue/useSpareParts.ts:68
Tax zone for price calculation.
term?
optionalterm?:Ref<string|undefined,string|undefined>
Defined in: composables/vue/useSpareParts.ts:55
Free-text search, scoped server-side to this machine's parts.
textFilters?
optionaltextFilters?:Ref<ProductTextFilterInput[] |undefined,ProductTextFilterInput[] |undefined>
Defined in: composables/vue/useSpareParts.ts:74
Attribute (facet) filters.
user?
optionaluser?:Ref<Contact|Customer|null,Contact|Customer|null>
Defined in: composables/vue/useSpareParts.ts:70
Active user — drives userId scoping and contact/customer pricing.