@propeller-commerce/propeller-sdk-v2 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,55 @@ All notable changes to `@propeller-commerce/propeller-sdk-v2` are documented her
4
4
 
5
5
  ---
6
6
 
7
+ ## [0.13.0] - 2026-07-17
8
+
9
+ Makes the machine / spare-parts surface usable by a storefront. Previously
10
+ `machine` fetched its `sparePartProducts` with no argument, so a machine page
11
+ could not filter, sort, page or search its parts — the schema supported it, the
12
+ shipped document didn't.
13
+
14
+ ### Added
15
+
16
+ - `sparePartsMachineProductSearchInput: SparePartsMachineProductSearchInput`
17
+ variable on the `machine` and `machines` queries and the `machineCreate` /
18
+ `machineUpsert` mutations (every document that spreads `SparePartsMachineFields`
19
+ must declare it), applied as
20
+ `sparePartProducts(input: $sparePartsMachineProductSearchInput)`. Mirrors how
21
+ `CategoryFields` takes `$categoryProductSearchInput`.
22
+ Note the input is all-or-nothing: `language`, `page`, `offset` and `statuses`
23
+ are non-null on the schema, so any caller passing it must pass those four.
24
+ - `filterAvailableAttributeInput: FilterAvailableAttributeInput` variable on the
25
+ same four documents, applied as `filters(input: $filterAvailableAttributeInput)`
26
+ in `SparePartsResponseFields` — mirrors `ProductsResponseFields`. Without it a
27
+ machine's parts facets could not be requested, so a filter sidebar over spare
28
+ parts would render empty.
29
+ - `fetchOptions?: GraphQLFetchOptions` second parameter on
30
+ `machineService.getMachine` / `.getMachines` and their
31
+ `sparePartsMachineService` twins (plus both class shims), matching
32
+ `categoryService.getCategory`. Without it these methods could not carry a
33
+ cache hint, so machine pages had no way to opt into the data cache.
34
+ - `SparePartsMachineMinimalFields` fragment — the machine analogue of
35
+ `CategoryMinimalFields`, used for nested/child machines.
36
+
37
+ ### Changed
38
+
39
+ - `SparePartsMachineFields` now composes `SparePartsMachineMinimalFields` and
40
+ reuses the existing `SparePartsResponseFields` instead of inlining an
41
+ identical selection twice.
42
+ - Localized `name` / `description` / `slug` on machine selections now take
43
+ `(language: $language)`, matching `CategoryMinimalFields`. Selections for an
44
+ untranslated machine come back empty rather than as every language.
45
+ - Nested child machines no longer select `sparePartProducts`. Child nodes render
46
+ as cards (`id`/`name`/`slug`/`media`); previously every node dragged its whole
47
+ parts list along on every fetch.
48
+
49
+ ### Removed
50
+
51
+ - Unused `SearchSparePartsMachineInput` / `CreateSparePartsMachineInput` /
52
+ `UpsertSparePartsMachineInput` imports from both machine services.
53
+
54
+ ---
55
+
7
56
  ## [0.12.1] - 2026-07-08
8
57
 
9
58
  ### Added
@@ -1,4 +1,4 @@
1
- import type { AddOrderStatusesToOrderStatusSetInput, AddSurchargesToProductInput, AdminUsersSearchInput, AgentConversationCreateInput, AgentCreateInput, AgentMessageCreateInput, AgentSearchInput, AgentUpdateInput, AttributeCreateInput, AttributeCsvInput, AttributeDescriptionCreateInput, AttributeDescriptionCsvInput, AttributeDescriptionSearchInput, AttributeDescriptionUpdateInput, AttributeResultSearchInput, AttributeSearchInput, AttributeUpdateInput, Base64FileInput, BaseProductSearchInput, BulkCostPriceCreateInput, BulkCostPriceCsvInput, BulkCostPriceSearchInput, BulkCostPriceUpdateInput, BulkPriceCreateInput, BulkPriceCsvInput, BulkPriceSearchInput, BulkPriceUpdateInput, BundleAddItemsInput, BundleCreateInput, BundleSearchInput, BundleUpdateInput, BusinessRuleCreateInput, BusinessRuleDecisionTableAddColumnInput, BusinessRuleDecisionTableDeleteColumnInput, BusinessRuleDecisionTableDeleteRowInput, BusinessRuleDecisionTableMoveRowInput, BusinessRuleDecisionTableSearchInput, BusinessRuleDecisionTableSetCellInput, BusinessRuleDecisionTableUpdateInput, BusinessRuleSearchInput, BusinessRuleUpdateInput, CarrierCreateInput, CarrierUpdateInput, CarriersSearchInput, CartAcceptPurchaseAuthorizationRequestInput, CartActionCodeInput, CartDeleteItemInput, CartItemsBulkUpsertInput, CartSearchInput, CartSetContactInput, CartSetCustomerInput, CartSetUserInput, CategoryAddProductsClustersInput, CategoryCsvInput, CategoryProductSearchInput, CategoryRemoveProductsClustersInput, CategorySearchInput, ChannelCreateInput, ChannelUpdateInput, ClusterAssignProductsInput, ClusterBulkMoveInput, ClusterConfigCreateInput, ClusterConfigSearchInput, ClusterConfigSettingCreateInput, ClusterConfigSettingInput, ClusterConfigSettingUpdateInput, ClusterConfigUpdateInput, ClusterCreateInput, ClusterCsvInput, ClusterOptionCreateInput, ClusterOptionPaginatedSearchInput, ClusterOptionUpdateInput, ClusterSearchInput, ClusterUnassignProductsInput, ClusterUpdateInput, CompanyAddressCreateInput, CompanyAddressDeleteInput, CompanyAddressUpdateInput, CompanyCsvInput, CompanySearchArguments, CompanySearchIndexUpdateMappingInput, CompanySearchReindexInput, ComputedOrderlistsInput, ContactAddToCompaniesInput, ContactCompaniesSearchInput, ContactCsvInput, ContactPurchaseAuthorizationConfigSearchInput, ContactRemoveFromCompaniesInput, ContactSearchArguments, CostPriceCreateInput, CostPriceSearchInput, CostPriceUpdateInput, CreateAccountInput, CreateAuthenticationInput, CreateCategoryInput, CreateContactInput, CreateInventoryInput, CreateOrderStatusInput, CreateOrderStatusSetInput, CreatePaymentInput, CreateProductInput, CreateSparePartsMachineInput, CreateSurchargeInput, CreateTenantDto, CreateUserDto, CreateWarehouseAddressInput, CreateWarehouseInput, CrossupsellCreateInput, CrossupsellSearchInput, CrossupsellUpdateInput, CustomerAddressCreateInput, CustomerAddressDeleteInput, CustomerAddressUpdateInput, CustomerCsvInput, CustomerInput, CustomerSearchArguments, DeleteWarehouseAddressInput, DiscountCreateInput, DiscountCsvInput, DiscountSearchInput, DiscountUpdateInput, DocumentCsvInput, DocumentTemplateCreateInput, DocumentTemplateUpdateInput, EmailEventInput, EmailSendEventInput, EmailTemplateCreateInput, EmailTemplateUpdateInput, EventActionConfigSearchInput, EventToEmailConfigCreateInput, EventToEmailConfigUpdateInput, EventToWebHookConfigCreateInput, EventToWebHookConfigUpdateInput, ExchangeRefreshTokenInput, FavoriteListsCreateInput, FavoriteListsItemsInput, FavoriteListsSearchInput, FavoriteListsUpdateInput, FilterAvailableAttributeInput, GqlApiKeyCreateInput, GqlApiKeySearchInput, GqlApiKeyUpdateInput, ImageCsvInput, IncentiveRuleOrderItemSetCellInput, IncentiveRuleSetActionInput, IndexCategoriesInput, IndexClustersInput, IndexProductsInput, InventoryCsvInput, LoginInput, MagicTokenCreateInput, MagicTokenSearchInput, MagicTokenUpdateInput, MediaAttachmentInput, MediaDocumentInput, MediaDocumentProductSearchInput, MediaDocumentSearchInput, MediaImageInput, MediaImageProductSearchInput, MediaImageSearchInput, MediaVideoInput, MediaVideoProductSearchInput, MediaVideoSearchInput, OrderCreateInput, OrderRevisionSearchInput, OrderRevisionsInvalidateInput, OrderSearchArguments, OrderSetStatusInput, OrderStatusSearchByInput, OrderStatusSetSearchByInput, OrderStatusSetsSearchInput, OrderStatusesSearchInput, OrderUpdateAddressInput, OrderlistCompaniesInput, OrderlistCreateInput, OrderlistItemsInput, OrderlistSearchInput, OrderlistUpdateInput, OrderlistUsersInput, PasswordRecoveryLinkInput, PasswordResetLinkEmailInput, PayMethodCreateInput, PayMethodSearchInput, PayMethodUpdateInput, PaymentsSearchInput, PriceCalculateDefaultInput, PriceCalculateInput, PriceCalculateProductInput, PriceCreateInput, PriceCsvInput, PriceSearchInput, PriceUpdateInput, PricesheetAssignInput, PricesheetCreateInput, PricesheetCsvInput, PricesheetSearchInput, PricesheetUnassignInput, PricesheetUpdateInput, PricesheetsEffectiveInput, ProductBulkMoveInput, ProductCsvInput, ProductSearchByCategoryInput, ProductSearchInput, ProductSearchSearchInput, PurchaseAuthorizationConfigCreateInput, PurchaseAuthorizationConfigSearchInput, PurchaseAuthorizationConfigUpdateInput, RawProductSearchInput, RegisterContactInput, RegisterCustomerInput, RemoveOrderStatusesFromOrderStatusSetInput, RemoveSurchargesFromProductInput, RestApiKeyCreateInput, RestApiKeySearchInput, RestApiKeyUpdateInput, RoleCreateInput, RoleDefinitionCreateInput, RoleDefinitionSearchInput, RoleDefinitionUpdateInput, RoleSearchInput, RoleUpdateInput, SearchByInput, SearchSparePartsMachineInput, ShipmentCreateInput, ShipmentItemCreateInput, ShipmentItemSearchInput, ShipmentItemUpdateInput, ShipmentSearchInput, ShipmentUpdateInput, SourceInput, SurchargeSearchInput, TaxCreateInput, TaxSearchInput, TaxUpdateInput, TemplateErrorLogSearchInput, TemplateRenderInput, TemplateSearchInput, TenantCreateInput, TenantUpdateInput, TenderAddItemsInput, TenderDiscountInput, TenderPaymentInput, TenderPostageInput, TenderStartInput, TenderUpdateAddressInput, TenderUpdateInput, TenderUpdateItemInput, TicketCreateInput, TicketSearchInput, TicketUpdateInput, TrackAndTraceCreateInput, TrackAndTraceSearchInput, TrackAndTraceUpdateInput, TransformationsInput, TriggerContactSendWelcomeEmailEventInput, TriggerCustomEventInput, TriggerCustomerSendWelcomeEmailEventInput, TriggerOrderSendConfirmEventInput, TriggerQuoteSendEventInput, TriggerQuoteSendRequestEventInput, TriggerQuoteSendValidationEventInput, UpdateCategoryInput, UpdateContactInput, UpdateCustomerInput, UpdateInventoryInput, UpdateMediaAttachmentInput, UpdateMediaDocumentInput, UpdateMediaImageInput, UpdateMediaVideoInput, UpdateOrderStatusInput, UpdateOrderStatusSetInput, UpdatePaymentInput, UpdateProductInput, UpdateSurchargeInput, UpdateUserDto, UpdateWarehouseAddressInput, UpdateWarehouseInput, UpsertSparePartsMachineInput, UserBulkPriceProductInput, ValuesetCreateInput, ValuesetItemCreateInput, ValuesetItemSearchInput, ValuesetItemUpdateInput, ValuesetSearchInput, ValuesetUpdateInput, VerifyTokenInput, VideoCsvInput, WarehousesSearchInput, ZoneTaxCodeCreateInput, ZoneTaxCodeSearchInput, ZoneTaxCodeUpdateInput } from '../type';
1
+ import type { AddOrderStatusesToOrderStatusSetInput, AddSurchargesToProductInput, AdminUsersSearchInput, AgentConversationCreateInput, AgentCreateInput, AgentMessageCreateInput, AgentSearchInput, AgentUpdateInput, AttributeCreateInput, AttributeCsvInput, AttributeDescriptionCreateInput, AttributeDescriptionCsvInput, AttributeDescriptionSearchInput, AttributeDescriptionUpdateInput, AttributeResultSearchInput, AttributeSearchInput, AttributeUpdateInput, Base64FileInput, BaseProductSearchInput, BulkCostPriceCreateInput, BulkCostPriceCsvInput, BulkCostPriceSearchInput, BulkCostPriceUpdateInput, BulkPriceCreateInput, BulkPriceCsvInput, BulkPriceSearchInput, BulkPriceUpdateInput, BundleAddItemsInput, BundleCreateInput, BundleSearchInput, BundleUpdateInput, BusinessRuleCreateInput, BusinessRuleDecisionTableAddColumnInput, BusinessRuleDecisionTableDeleteColumnInput, BusinessRuleDecisionTableDeleteRowInput, BusinessRuleDecisionTableMoveRowInput, BusinessRuleDecisionTableSearchInput, BusinessRuleDecisionTableSetCellInput, BusinessRuleDecisionTableUpdateInput, BusinessRuleSearchInput, BusinessRuleUpdateInput, CarrierCreateInput, CarrierUpdateInput, CarriersSearchInput, CartAcceptPurchaseAuthorizationRequestInput, CartActionCodeInput, CartDeleteItemInput, CartItemsBulkUpsertInput, CartSearchInput, CartSetContactInput, CartSetCustomerInput, CartSetUserInput, CategoryAddProductsClustersInput, CategoryCsvInput, CategoryProductSearchInput, CategoryRemoveProductsClustersInput, CategorySearchInput, ChannelCreateInput, ChannelUpdateInput, ClusterAssignProductsInput, ClusterBulkMoveInput, ClusterConfigCreateInput, ClusterConfigSearchInput, ClusterConfigSettingCreateInput, ClusterConfigSettingInput, ClusterConfigSettingUpdateInput, ClusterConfigUpdateInput, ClusterCreateInput, ClusterCsvInput, ClusterOptionCreateInput, ClusterOptionPaginatedSearchInput, ClusterOptionUpdateInput, ClusterSearchInput, ClusterUnassignProductsInput, ClusterUpdateInput, CompanyAddressCreateInput, CompanyAddressDeleteInput, CompanyAddressUpdateInput, CompanyCsvInput, CompanySearchArguments, CompanySearchIndexUpdateMappingInput, CompanySearchReindexInput, ComputedOrderlistsInput, ContactAddToCompaniesInput, ContactCompaniesSearchInput, ContactCsvInput, ContactPurchaseAuthorizationConfigSearchInput, ContactRemoveFromCompaniesInput, ContactSearchArguments, CostPriceCreateInput, CostPriceSearchInput, CostPriceUpdateInput, CreateAccountInput, CreateAuthenticationInput, CreateCategoryInput, CreateContactInput, CreateInventoryInput, CreateOrderStatusInput, CreateOrderStatusSetInput, CreatePaymentInput, CreateProductInput, CreateSparePartsMachineInput, CreateSurchargeInput, CreateTenantDto, CreateUserDto, CreateWarehouseAddressInput, CreateWarehouseInput, CrossupsellCreateInput, CrossupsellSearchInput, CrossupsellUpdateInput, CustomerAddressCreateInput, CustomerAddressDeleteInput, CustomerAddressUpdateInput, CustomerCsvInput, CustomerInput, CustomerSearchArguments, DeleteWarehouseAddressInput, DiscountCreateInput, DiscountCsvInput, DiscountSearchInput, DiscountUpdateInput, DocumentCsvInput, DocumentTemplateCreateInput, DocumentTemplateUpdateInput, EmailEventInput, EmailSendEventInput, EmailTemplateCreateInput, EmailTemplateUpdateInput, EventActionConfigSearchInput, EventToEmailConfigCreateInput, EventToEmailConfigUpdateInput, EventToWebHookConfigCreateInput, EventToWebHookConfigUpdateInput, ExchangeRefreshTokenInput, FavoriteListsCreateInput, FavoriteListsItemsInput, FavoriteListsSearchInput, FavoriteListsUpdateInput, FilterAvailableAttributeInput, GqlApiKeyCreateInput, GqlApiKeySearchInput, GqlApiKeyUpdateInput, ImageCsvInput, IncentiveRuleOrderItemSetCellInput, IncentiveRuleSetActionInput, IndexCategoriesInput, IndexClustersInput, IndexProductsInput, InventoryCsvInput, LoginInput, MagicTokenCreateInput, MagicTokenSearchInput, MagicTokenUpdateInput, MediaAttachmentInput, MediaDocumentInput, MediaDocumentProductSearchInput, MediaDocumentSearchInput, MediaImageInput, MediaImageProductSearchInput, MediaImageSearchInput, MediaVideoInput, MediaVideoProductSearchInput, MediaVideoSearchInput, OrderCreateInput, OrderRevisionSearchInput, OrderRevisionsInvalidateInput, OrderSearchArguments, OrderSetStatusInput, OrderStatusSearchByInput, OrderStatusSetSearchByInput, OrderStatusSetsSearchInput, OrderStatusesSearchInput, OrderUpdateAddressInput, OrderlistCompaniesInput, OrderlistCreateInput, OrderlistItemsInput, OrderlistSearchInput, OrderlistUpdateInput, OrderlistUsersInput, PasswordRecoveryLinkInput, PasswordResetLinkEmailInput, PayMethodCreateInput, PayMethodSearchInput, PayMethodUpdateInput, PaymentsSearchInput, PriceCalculateDefaultInput, PriceCalculateInput, PriceCalculateProductInput, PriceCreateInput, PriceCsvInput, PriceSearchInput, PriceUpdateInput, PricesheetAssignInput, PricesheetCreateInput, PricesheetCsvInput, PricesheetSearchInput, PricesheetUnassignInput, PricesheetUpdateInput, PricesheetsEffectiveInput, ProductBulkMoveInput, ProductCsvInput, ProductSearchByCategoryInput, ProductSearchInput, ProductSearchSearchInput, PurchaseAuthorizationConfigCreateInput, PurchaseAuthorizationConfigSearchInput, PurchaseAuthorizationConfigUpdateInput, RawProductSearchInput, RegisterContactInput, RegisterCustomerInput, RemoveOrderStatusesFromOrderStatusSetInput, RemoveSurchargesFromProductInput, RestApiKeyCreateInput, RestApiKeySearchInput, RestApiKeyUpdateInput, RoleCreateInput, RoleDefinitionCreateInput, RoleDefinitionSearchInput, RoleDefinitionUpdateInput, RoleSearchInput, RoleUpdateInput, SearchByInput, SearchSparePartsMachineInput, ShipmentCreateInput, ShipmentItemCreateInput, ShipmentItemSearchInput, ShipmentItemUpdateInput, ShipmentSearchInput, ShipmentUpdateInput, SourceInput, SparePartsMachineProductSearchInput, SurchargeSearchInput, TaxCreateInput, TaxSearchInput, TaxUpdateInput, TemplateErrorLogSearchInput, TemplateRenderInput, TemplateSearchInput, TenantCreateInput, TenantUpdateInput, TenderAddItemsInput, TenderDiscountInput, TenderPaymentInput, TenderPostageInput, TenderStartInput, TenderUpdateAddressInput, TenderUpdateInput, TenderUpdateItemInput, TicketCreateInput, TicketSearchInput, TicketUpdateInput, TrackAndTraceCreateInput, TrackAndTraceSearchInput, TrackAndTraceUpdateInput, TransformationsInput, TriggerContactSendWelcomeEmailEventInput, TriggerCustomEventInput, TriggerCustomerSendWelcomeEmailEventInput, TriggerOrderSendConfirmEventInput, TriggerQuoteSendEventInput, TriggerQuoteSendRequestEventInput, TriggerQuoteSendValidationEventInput, UpdateCategoryInput, UpdateContactInput, UpdateCustomerInput, UpdateInventoryInput, UpdateMediaAttachmentInput, UpdateMediaDocumentInput, UpdateMediaImageInput, UpdateMediaVideoInput, UpdateOrderStatusInput, UpdateOrderStatusSetInput, UpdatePaymentInput, UpdateProductInput, UpdateSurchargeInput, UpdateUserDto, UpdateWarehouseAddressInput, UpdateWarehouseInput, UpsertSparePartsMachineInput, UserBulkPriceProductInput, ValuesetCreateInput, ValuesetItemCreateInput, ValuesetItemSearchInput, ValuesetItemUpdateInput, ValuesetSearchInput, ValuesetUpdateInput, VerifyTokenInput, VideoCsvInput, WarehousesSearchInput, ZoneTaxCodeCreateInput, ZoneTaxCodeSearchInput, ZoneTaxCodeUpdateInput } from '../type';
2
2
  import type { AddressType, TaxCode, YesNo } from '../enum';
3
3
  /**
4
4
  * Variables for the `addCompanyManager` GraphQL operation. Generated from the
@@ -2692,6 +2692,8 @@ export interface LoginVariables {
2692
2692
  export interface MachineCreateVariables {
2693
2693
  input: CreateSparePartsMachineInput;
2694
2694
  language?: string;
2695
+ sparePartsMachineProductSearchInput?: SparePartsMachineProductSearchInput;
2696
+ filterAvailableAttributeInput?: FilterAvailableAttributeInput;
2695
2697
  imageVariantFilters?: TransformationsInput;
2696
2698
  priceCalculateProductInput?: PriceCalculateProductInput;
2697
2699
  imageSearchFilters?: MediaImageProductSearchInput;
@@ -2715,6 +2717,8 @@ export interface MachineDeleteVariables {
2715
2717
  export interface MachinesVariables {
2716
2718
  input?: SearchSparePartsMachineInput;
2717
2719
  language?: string;
2720
+ sparePartsMachineProductSearchInput?: SparePartsMachineProductSearchInput;
2721
+ filterAvailableAttributeInput?: FilterAvailableAttributeInput;
2718
2722
  imageVariantFilters?: TransformationsInput;
2719
2723
  priceCalculateProductInput?: PriceCalculateProductInput;
2720
2724
  imageSearchFilters?: MediaImageProductSearchInput;
@@ -2730,6 +2734,8 @@ export interface MachinesVariables {
2730
2734
  export interface MachineUpsertVariables {
2731
2735
  input: UpsertSparePartsMachineInput;
2732
2736
  language?: string;
2737
+ sparePartsMachineProductSearchInput?: SparePartsMachineProductSearchInput;
2738
+ filterAvailableAttributeInput?: FilterAvailableAttributeInput;
2733
2739
  imageVariantFilters?: TransformationsInput;
2734
2740
  priceCalculateProductInput?: PriceCalculateProductInput;
2735
2741
  imageSearchFilters?: MediaImageProductSearchInput;
@@ -2748,6 +2754,8 @@ export interface MachineVariables {
2748
2754
  language?: string;
2749
2755
  source?: string;
2750
2756
  sourceId?: string;
2757
+ sparePartsMachineProductSearchInput?: SparePartsMachineProductSearchInput;
2758
+ filterAvailableAttributeInput?: FilterAvailableAttributeInput;
2751
2759
  imageVariantFilters?: TransformationsInput;
2752
2760
  priceCalculateProductInput?: PriceCalculateProductInput;
2753
2761
  imageSearchFilters?: MediaImageProductSearchInput;
@@ -3,66 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.document = void 0;
4
4
  /* Auto-generated. Do not edit. */
5
5
  exports.document = `fragment SparePartsMachineFields on SparePartsMachine {
6
+ ...SparePartsMachineMinimalFields
7
+ sparePartProducts(input: \$sparePartsMachineProductSearchInput) {
8
+ ...SparePartsResponseFields
9
+ }
10
+ machines {
11
+ ...SparePartsMachineMinimalFields
12
+ }
13
+ }
14
+
15
+ fragment SparePartsMachineMinimalFields on SparePartsMachine {
6
16
  id
7
17
  media {
8
18
  ...SparePartsMachineMediaImagesOnlyFields
9
19
  }
10
- sparePartProducts {
11
- items {
12
- ...SparePartFields
13
- }
14
- itemsFound
15
- offset
16
- page
17
- pages
18
- start
19
- end
20
- minPrice
21
- maxPrice
22
- filters {
23
- ...AttributeFilterFields
24
- }
25
- }
26
- name {
20
+ name(language: \$language) {
27
21
  ...LocalizedStringFields
28
22
  }
29
- description {
23
+ description(language: \$language) {
30
24
  ...LocalizedStringFields
31
25
  }
32
- slug {
26
+ slug(language: \$language) {
33
27
  ...LocalizedStringFields
34
28
  }
35
- machines {
36
- id
37
- media {
38
- ...SparePartsMachineMediaImagesOnlyFields
39
- }
40
- sparePartProducts {
41
- items {
42
- ...SparePartFields
43
- }
44
- itemsFound
45
- offset
46
- page
47
- pages
48
- start
49
- end
50
- minPrice
51
- maxPrice
52
- filters {
53
- ...AttributeFilterFields
54
- }
55
- }
56
- name {
57
- ...LocalizedStringFields
58
- }
59
- description {
60
- ...LocalizedStringFields
61
- }
62
- slug {
63
- ...LocalizedStringFields
64
- }
65
- }
66
29
  }
67
30
 
68
31
  fragment SparePartsMachineMediaImagesOnlyFields on SparePartsMachineMedia {
@@ -121,6 +84,23 @@ fragment LocalizedStringArrayFields on LocalizedStringArray {
121
84
  values
122
85
  }
123
86
 
87
+ fragment SparePartsResponseFields on SparePartsResponse {
88
+ items {
89
+ ...SparePartFields
90
+ }
91
+ itemsFound
92
+ offset
93
+ page
94
+ pages
95
+ start
96
+ end
97
+ minPrice
98
+ maxPrice
99
+ filters(input: \$filterAvailableAttributeInput) {
100
+ ...AttributeFilterFields
101
+ }
102
+ }
103
+
124
104
  fragment SparePartFields on SparePart {
125
105
  id
126
106
  sku
@@ -406,7 +386,7 @@ fragment AttributeFilterFields on AttributeFilter {
406
386
  }
407
387
  }
408
388
 
409
- query machine(\$id: String, \$slug: String, \$language: String, \$source: String, \$sourceId: String, \$imageVariantFilters: TransformationsInput!, \$priceCalculateProductInput: PriceCalculateProductInput, \$imageSearchFilters: MediaImageProductSearchInput) {
389
+ query machine(\$id: String, \$slug: String, \$language: String, \$source: String, \$sourceId: String, \$sparePartsMachineProductSearchInput: SparePartsMachineProductSearchInput, \$filterAvailableAttributeInput: FilterAvailableAttributeInput, \$imageVariantFilters: TransformationsInput!, \$priceCalculateProductInput: PriceCalculateProductInput, \$imageSearchFilters: MediaImageProductSearchInput) {
410
390
  machine(
411
391
  id: \$id
412
392
  slug: \$slug
@@ -3,66 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.document = void 0;
4
4
  /* Auto-generated. Do not edit. */
5
5
  exports.document = `fragment SparePartsMachineFields on SparePartsMachine {
6
+ ...SparePartsMachineMinimalFields
7
+ sparePartProducts(input: \$sparePartsMachineProductSearchInput) {
8
+ ...SparePartsResponseFields
9
+ }
10
+ machines {
11
+ ...SparePartsMachineMinimalFields
12
+ }
13
+ }
14
+
15
+ fragment SparePartsMachineMinimalFields on SparePartsMachine {
6
16
  id
7
17
  media {
8
18
  ...SparePartsMachineMediaImagesOnlyFields
9
19
  }
10
- sparePartProducts {
11
- items {
12
- ...SparePartFields
13
- }
14
- itemsFound
15
- offset
16
- page
17
- pages
18
- start
19
- end
20
- minPrice
21
- maxPrice
22
- filters {
23
- ...AttributeFilterFields
24
- }
25
- }
26
- name {
20
+ name(language: \$language) {
27
21
  ...LocalizedStringFields
28
22
  }
29
- description {
23
+ description(language: \$language) {
30
24
  ...LocalizedStringFields
31
25
  }
32
- slug {
26
+ slug(language: \$language) {
33
27
  ...LocalizedStringFields
34
28
  }
35
- machines {
36
- id
37
- media {
38
- ...SparePartsMachineMediaImagesOnlyFields
39
- }
40
- sparePartProducts {
41
- items {
42
- ...SparePartFields
43
- }
44
- itemsFound
45
- offset
46
- page
47
- pages
48
- start
49
- end
50
- minPrice
51
- maxPrice
52
- filters {
53
- ...AttributeFilterFields
54
- }
55
- }
56
- name {
57
- ...LocalizedStringFields
58
- }
59
- description {
60
- ...LocalizedStringFields
61
- }
62
- slug {
63
- ...LocalizedStringFields
64
- }
65
- }
66
29
  }
67
30
 
68
31
  fragment SparePartsMachineMediaImagesOnlyFields on SparePartsMachineMedia {
@@ -121,6 +84,23 @@ fragment LocalizedStringArrayFields on LocalizedStringArray {
121
84
  values
122
85
  }
123
86
 
87
+ fragment SparePartsResponseFields on SparePartsResponse {
88
+ items {
89
+ ...SparePartFields
90
+ }
91
+ itemsFound
92
+ offset
93
+ page
94
+ pages
95
+ start
96
+ end
97
+ minPrice
98
+ maxPrice
99
+ filters(input: \$filterAvailableAttributeInput) {
100
+ ...AttributeFilterFields
101
+ }
102
+ }
103
+
124
104
  fragment SparePartFields on SparePart {
125
105
  id
126
106
  sku
@@ -406,7 +386,7 @@ fragment AttributeFilterFields on AttributeFilter {
406
386
  }
407
387
  }
408
388
 
409
- mutation machineCreate(\$input: CreateSparePartsMachineInput!, \$language: String, \$imageVariantFilters: TransformationsInput!, \$priceCalculateProductInput: PriceCalculateProductInput, \$imageSearchFilters: MediaImageProductSearchInput) {
389
+ mutation machineCreate(\$input: CreateSparePartsMachineInput!, \$language: String, \$sparePartsMachineProductSearchInput: SparePartsMachineProductSearchInput, \$filterAvailableAttributeInput: FilterAvailableAttributeInput, \$imageVariantFilters: TransformationsInput!, \$priceCalculateProductInput: PriceCalculateProductInput, \$imageSearchFilters: MediaImageProductSearchInput) {
410
390
  machineCreate(input: \$input) {
411
391
  ...SparePartsMachineFields
412
392
  }
@@ -3,66 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.document = void 0;
4
4
  /* Auto-generated. Do not edit. */
5
5
  exports.document = `fragment SparePartsMachineFields on SparePartsMachine {
6
+ ...SparePartsMachineMinimalFields
7
+ sparePartProducts(input: \$sparePartsMachineProductSearchInput) {
8
+ ...SparePartsResponseFields
9
+ }
10
+ machines {
11
+ ...SparePartsMachineMinimalFields
12
+ }
13
+ }
14
+
15
+ fragment SparePartsMachineMinimalFields on SparePartsMachine {
6
16
  id
7
17
  media {
8
18
  ...SparePartsMachineMediaImagesOnlyFields
9
19
  }
10
- sparePartProducts {
11
- items {
12
- ...SparePartFields
13
- }
14
- itemsFound
15
- offset
16
- page
17
- pages
18
- start
19
- end
20
- minPrice
21
- maxPrice
22
- filters {
23
- ...AttributeFilterFields
24
- }
25
- }
26
- name {
20
+ name(language: \$language) {
27
21
  ...LocalizedStringFields
28
22
  }
29
- description {
23
+ description(language: \$language) {
30
24
  ...LocalizedStringFields
31
25
  }
32
- slug {
26
+ slug(language: \$language) {
33
27
  ...LocalizedStringFields
34
28
  }
35
- machines {
36
- id
37
- media {
38
- ...SparePartsMachineMediaImagesOnlyFields
39
- }
40
- sparePartProducts {
41
- items {
42
- ...SparePartFields
43
- }
44
- itemsFound
45
- offset
46
- page
47
- pages
48
- start
49
- end
50
- minPrice
51
- maxPrice
52
- filters {
53
- ...AttributeFilterFields
54
- }
55
- }
56
- name {
57
- ...LocalizedStringFields
58
- }
59
- description {
60
- ...LocalizedStringFields
61
- }
62
- slug {
63
- ...LocalizedStringFields
64
- }
65
- }
66
29
  }
67
30
 
68
31
  fragment SparePartsMachineMediaImagesOnlyFields on SparePartsMachineMedia {
@@ -121,6 +84,23 @@ fragment LocalizedStringArrayFields on LocalizedStringArray {
121
84
  values
122
85
  }
123
86
 
87
+ fragment SparePartsResponseFields on SparePartsResponse {
88
+ items {
89
+ ...SparePartFields
90
+ }
91
+ itemsFound
92
+ offset
93
+ page
94
+ pages
95
+ start
96
+ end
97
+ minPrice
98
+ maxPrice
99
+ filters(input: \$filterAvailableAttributeInput) {
100
+ ...AttributeFilterFields
101
+ }
102
+ }
103
+
124
104
  fragment SparePartFields on SparePart {
125
105
  id
126
106
  sku
@@ -406,7 +386,7 @@ fragment AttributeFilterFields on AttributeFilter {
406
386
  }
407
387
  }
408
388
 
409
- mutation machineUpsert(\$input: UpsertSparePartsMachineInput!, \$language: String, \$imageVariantFilters: TransformationsInput!, \$priceCalculateProductInput: PriceCalculateProductInput, \$imageSearchFilters: MediaImageProductSearchInput) {
389
+ mutation machineUpsert(\$input: UpsertSparePartsMachineInput!, \$language: String, \$sparePartsMachineProductSearchInput: SparePartsMachineProductSearchInput, \$filterAvailableAttributeInput: FilterAvailableAttributeInput, \$imageVariantFilters: TransformationsInput!, \$priceCalculateProductInput: PriceCalculateProductInput, \$imageSearchFilters: MediaImageProductSearchInput) {
410
390
  machineUpsert(input: \$input) {
411
391
  ...SparePartsMachineFields
412
392
  }
@@ -15,66 +15,29 @@ exports.document = `fragment SparePartsMachineResponseFields on SparePartsMachin
15
15
  }
16
16
 
17
17
  fragment SparePartsMachineFields on SparePartsMachine {
18
+ ...SparePartsMachineMinimalFields
19
+ sparePartProducts(input: \$sparePartsMachineProductSearchInput) {
20
+ ...SparePartsResponseFields
21
+ }
22
+ machines {
23
+ ...SparePartsMachineMinimalFields
24
+ }
25
+ }
26
+
27
+ fragment SparePartsMachineMinimalFields on SparePartsMachine {
18
28
  id
19
29
  media {
20
30
  ...SparePartsMachineMediaImagesOnlyFields
21
31
  }
22
- sparePartProducts {
23
- items {
24
- ...SparePartFields
25
- }
26
- itemsFound
27
- offset
28
- page
29
- pages
30
- start
31
- end
32
- minPrice
33
- maxPrice
34
- filters {
35
- ...AttributeFilterFields
36
- }
37
- }
38
- name {
32
+ name(language: \$language) {
39
33
  ...LocalizedStringFields
40
34
  }
41
- description {
35
+ description(language: \$language) {
42
36
  ...LocalizedStringFields
43
37
  }
44
- slug {
38
+ slug(language: \$language) {
45
39
  ...LocalizedStringFields
46
40
  }
47
- machines {
48
- id
49
- media {
50
- ...SparePartsMachineMediaImagesOnlyFields
51
- }
52
- sparePartProducts {
53
- items {
54
- ...SparePartFields
55
- }
56
- itemsFound
57
- offset
58
- page
59
- pages
60
- start
61
- end
62
- minPrice
63
- maxPrice
64
- filters {
65
- ...AttributeFilterFields
66
- }
67
- }
68
- name {
69
- ...LocalizedStringFields
70
- }
71
- description {
72
- ...LocalizedStringFields
73
- }
74
- slug {
75
- ...LocalizedStringFields
76
- }
77
- }
78
41
  }
79
42
 
80
43
  fragment SparePartsMachineMediaImagesOnlyFields on SparePartsMachineMedia {
@@ -133,6 +96,23 @@ fragment LocalizedStringArrayFields on LocalizedStringArray {
133
96
  values
134
97
  }
135
98
 
99
+ fragment SparePartsResponseFields on SparePartsResponse {
100
+ items {
101
+ ...SparePartFields
102
+ }
103
+ itemsFound
104
+ offset
105
+ page
106
+ pages
107
+ start
108
+ end
109
+ minPrice
110
+ maxPrice
111
+ filters(input: \$filterAvailableAttributeInput) {
112
+ ...AttributeFilterFields
113
+ }
114
+ }
115
+
136
116
  fragment SparePartFields on SparePart {
137
117
  id
138
118
  sku
@@ -418,7 +398,7 @@ fragment AttributeFilterFields on AttributeFilter {
418
398
  }
419
399
  }
420
400
 
421
- query machines(\$input: SearchSparePartsMachineInput, \$language: String, \$imageVariantFilters: TransformationsInput!, \$priceCalculateProductInput: PriceCalculateProductInput, \$imageSearchFilters: MediaImageProductSearchInput) {
401
+ query machines(\$input: SearchSparePartsMachineInput, \$language: String, \$sparePartsMachineProductSearchInput: SparePartsMachineProductSearchInput, \$filterAvailableAttributeInput: FilterAvailableAttributeInput, \$imageVariantFilters: TransformationsInput!, \$priceCalculateProductInput: PriceCalculateProductInput, \$imageSearchFilters: MediaImageProductSearchInput) {
422
402
  machines(input: \$input) {
423
403
  ...SparePartsMachineResponseFields
424
404
  }
@@ -1,6 +1,6 @@
1
1
  import { SparePartsMachine } from '../type/SparePartsMachine';
2
2
  import { SparePartsMachineResponse } from '../type/SparePartsMachineResponse';
3
- import { GraphQLClient } from '../client/GraphQLClient';
3
+ import { GraphQLClient, GraphQLFetchOptions } from '../client/GraphQLClient';
4
4
  import type { MachineCreateVariables, MachineUpsertVariables, MachineVariables, MachinesVariables } from '../generated/operationVariables';
5
5
  /**
6
6
  Service for managing machines (spare parts machines)
@@ -8,16 +8,29 @@ import type { MachineCreateVariables, MachineUpsertVariables, MachineVariables,
8
8
  export declare function machineService(client: GraphQLClient): {
9
9
  /**
10
10
  Retrieves a specific machine
11
- * @param variables Machine ID
11
+ * @param variables Variables for the machine query
12
+ * - id: string - Machine ID to fetch
13
+ * - slug: string - Machine slug to fetch
14
+ * - source / sourceId: string - External source / source identifier pair
15
+ * - language: string - Language for localized content
16
+ * - sparePartsMachineProductSearchInput: SparePartsMachineProductSearchInput -
17
+ * Search/filter/sort/paging input for the machine's `sparePartProducts`
18
+ * - priceCalculateProductInput: PriceCalculateProductInput - Price calculation input
19
+ * - imageSearchFilters: MediaImageProductSearchInput - Image search filters
20
+ * - imageVariantFilters: TransformationsInput! - Image transformation filters
21
+ * @param fetchOptions Transport-level hints (e.g. cache tags). Never serialised
22
+ * into the request body.
12
23
  * @returns Promise<SparePartsMachine> Machine data
13
24
  */
14
- getMachine(variables: MachineVariables): Promise<SparePartsMachine>;
25
+ getMachine(variables: MachineVariables, fetchOptions?: GraphQLFetchOptions): Promise<SparePartsMachine>;
15
26
  /**
16
27
  Retrieves machines with search criteria
17
28
  * @param variables Search input parameters
29
+ * @param fetchOptions Transport-level hints (e.g. cache tags). Never serialised
30
+ * into the request body.
18
31
  * @returns Promise<SparePartsMachineResponse> Machines response
19
32
  */
20
- getMachines(variables: MachinesVariables): Promise<SparePartsMachineResponse>;
33
+ getMachines(variables: MachinesVariables, fetchOptions?: GraphQLFetchOptions): Promise<SparePartsMachineResponse>;
21
34
  /**
22
35
  Creates a new machine
23
36
  * @param variables Machine creation input
@@ -39,14 +52,16 @@ export declare class MachineService {
39
52
  constructor(client: GraphQLClient);
40
53
  /**
41
54
  * Retrieves a specific machine
42
- * @param variables Machine ID
55
+ * @param variables Variables for the machine query
56
+ * @param fetchOptions Transport-level hints (e.g. cache tags)
43
57
  */
44
- getMachine(variables: MachineVariables): Promise<SparePartsMachine>;
58
+ getMachine(variables: MachineVariables, fetchOptions?: GraphQLFetchOptions): Promise<SparePartsMachine>;
45
59
  /**
46
60
  * Retrieves machines with search criteria
47
61
  * @param variables Search input parameters
62
+ * @param fetchOptions Transport-level hints (e.g. cache tags)
48
63
  */
49
- getMachines(variables: MachinesVariables): Promise<SparePartsMachineResponse>;
64
+ getMachines(variables: MachinesVariables, fetchOptions?: GraphQLFetchOptions): Promise<SparePartsMachineResponse>;
50
65
  /**
51
66
  * Creates a new machine
52
67
  * @param variables Machine creation input