@forgecart/sdk 1.2.6 → 1.202606151453.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.
Files changed (43) hide show
  1. package/README.md +84 -1
  2. package/dist/admin-types.generated.d.ts +593 -33
  3. package/dist/admin.d.ts +4 -0
  4. package/dist/admin.generated.d.ts +82 -26
  5. package/dist/admin.generated.js +122 -2
  6. package/dist/admin.js +49 -43
  7. package/dist/client.generated.d.ts +40 -7
  8. package/dist/client.generated.js +162 -87
  9. package/dist/documents.generated.d.ts +38 -8
  10. package/dist/documents.generated.js +594 -36
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.js +1 -3
  13. package/dist/nest.generated.d.ts +13 -0
  14. package/dist/nest.generated.js +92 -0
  15. package/dist/shop-types.generated.d.ts +200 -13
  16. package/dist/shop.d.ts +2 -0
  17. package/dist/shop.generated.d.ts +13 -4
  18. package/dist/shop.generated.js +19 -1
  19. package/dist/shop.js +17 -15
  20. package/package.json +21 -4
  21. package/src/admin-types.generated.d.ts +10013 -0
  22. package/src/admin-types.generated.ts +1210 -88
  23. package/src/admin.generated.d.ts +806 -0
  24. package/src/admin.generated.ts +151 -27
  25. package/src/admin.ts +5 -1
  26. package/src/client.generated.d.ts +249 -0
  27. package/src/client.generated.ts +188 -39
  28. package/src/documents.generated.d.ts +473 -0
  29. package/src/documents.generated.ts +615 -27
  30. package/src/error-utils.d.ts +25 -0
  31. package/src/hook-event-map.generated.d.ts +243 -0
  32. package/src/index.d.ts +22 -0
  33. package/src/index.ts +1 -1
  34. package/src/nest.generated.ts +45 -0
  35. package/src/sdk-hook-subscription.generated.d.ts +29 -0
  36. package/src/sdk-plugin.generated.d.ts +38 -0
  37. package/src/sdk-types.generated.d.ts +56 -0
  38. package/src/shop-types.generated.d.ts +4786 -0
  39. package/src/shop-types.generated.ts +271 -13
  40. package/src/shop.generated.d.ts +213 -0
  41. package/src/shop.generated.ts +22 -5
  42. package/src/shop.ts +3 -1
  43. package/src/upload.d.ts +14 -0
package/dist/index.d.ts CHANGED
@@ -2,11 +2,11 @@ export { ForgeCartAdminClient } from './client.generated';
2
2
  export { ForgeCartShopClient } from './client.generated';
3
3
  export { ForgeCartClient, ClientError, QueryObservable } from './client.generated';
4
4
  export type { GraphQLErrorResponse } from './client.generated';
5
+ export type { ErrorHandler, LoginSession, LoginSessionChannel, AdminExternalAuthResult, AdminLoginAdministrator } from './client.generated';
5
6
  export type { ForgeCartAdminClientConfig } from './client.generated';
6
7
  export type { ForgeCartShopClientConfig } from './client.generated';
7
8
  export type { ForgeCartClientConfig } from './client.generated';
8
9
  export { TransactionContext } from './client.generated';
9
- export { ForgeCartGraphQLModule } from './client.generated';
10
10
  export { AdminNamespace } from './admin.generated';
11
11
  export { ShopNamespace } from './shop.generated';
12
12
  export type { ID, Type, ApiExtension, IRequestContext, HookHandler } from './sdk-types.generated';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lastValueFrom = exports.firstValueFrom = exports.Observable = exports.isErrorCode = exports.extractErrorMessage = exports.extractError = exports.extractErrorCode = exports.HookSubscriptionManager = exports.hookRespondDocument = exports.hookDispatchDocument = exports.ForgeCartPlugin = exports.SdkErrorCode = exports.SdkError = exports.ShopNamespace = exports.AdminNamespace = exports.ForgeCartGraphQLModule = exports.TransactionContext = exports.QueryObservable = exports.ClientError = exports.ForgeCartClient = exports.ForgeCartShopClient = exports.ForgeCartAdminClient = void 0;
3
+ exports.lastValueFrom = exports.firstValueFrom = exports.Observable = exports.isErrorCode = exports.extractErrorMessage = exports.extractError = exports.extractErrorCode = exports.HookSubscriptionManager = exports.hookRespondDocument = exports.hookDispatchDocument = exports.ForgeCartPlugin = exports.SdkErrorCode = exports.SdkError = exports.ShopNamespace = exports.AdminNamespace = exports.TransactionContext = exports.QueryObservable = exports.ClientError = exports.ForgeCartClient = exports.ForgeCartShopClient = exports.ForgeCartAdminClient = void 0;
4
4
  var client_generated_1 = require("./client.generated");
5
5
  Object.defineProperty(exports, "ForgeCartAdminClient", { enumerable: true, get: function () { return client_generated_1.ForgeCartAdminClient; } });
6
6
  var client_generated_2 = require("./client.generated");
@@ -11,8 +11,6 @@ Object.defineProperty(exports, "ClientError", { enumerable: true, get: function
11
11
  Object.defineProperty(exports, "QueryObservable", { enumerable: true, get: function () { return client_generated_3.QueryObservable; } });
12
12
  var client_generated_4 = require("./client.generated");
13
13
  Object.defineProperty(exports, "TransactionContext", { enumerable: true, get: function () { return client_generated_4.TransactionContext; } });
14
- var client_generated_5 = require("./client.generated");
15
- Object.defineProperty(exports, "ForgeCartGraphQLModule", { enumerable: true, get: function () { return client_generated_5.ForgeCartGraphQLModule; } });
16
14
  var admin_generated_1 = require("./admin.generated");
17
15
  Object.defineProperty(exports, "AdminNamespace", { enumerable: true, get: function () { return admin_generated_1.AdminNamespace; } });
18
16
  var shop_generated_1 = require("./shop.generated");
@@ -0,0 +1,13 @@
1
+ /**
2
+ * AUTO-GENERATED FILE — DO NOT EDIT
3
+ *
4
+ * This file was generated by @forgecart/client-sdk-generators.
5
+ * Any manual changes will be overwritten on the next generation run.
6
+ */
7
+ import { type DynamicModule } from '@nestjs/common';
8
+ import type { ForgeCartClientConfig, ForgeCartAdminClientConfig, ForgeCartShopClientConfig } from './client.generated';
9
+ export declare class ForgeCartGraphQLModule {
10
+ static forAdmin(config: ForgeCartAdminClientConfig): DynamicModule;
11
+ static forShop(config: ForgeCartShopClientConfig): DynamicModule;
12
+ static forRoot(config: ForgeCartClientConfig): DynamicModule;
13
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * AUTO-GENERATED FILE — DO NOT EDIT
5
+ *
6
+ * This file was generated by @forgecart/client-sdk-generators.
7
+ * Any manual changes will be overwritten on the next generation run.
8
+ */
9
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
10
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
11
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
12
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
13
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
14
+ var _, done = false;
15
+ for (var i = decorators.length - 1; i >= 0; i--) {
16
+ var context = {};
17
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
18
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
19
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
20
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
21
+ if (kind === "accessor") {
22
+ if (result === void 0) continue;
23
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
24
+ if (_ = accept(result.get)) descriptor.get = _;
25
+ if (_ = accept(result.set)) descriptor.set = _;
26
+ if (_ = accept(result.init)) initializers.unshift(_);
27
+ }
28
+ else if (_ = accept(result)) {
29
+ if (kind === "field") initializers.unshift(_);
30
+ else descriptor[key] = _;
31
+ }
32
+ }
33
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
34
+ done = true;
35
+ };
36
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
37
+ var useValue = arguments.length > 2;
38
+ for (var i = 0; i < initializers.length; i++) {
39
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
40
+ }
41
+ return useValue ? value : void 0;
42
+ };
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ exports.ForgeCartGraphQLModule = void 0;
45
+ const common_1 = require("@nestjs/common");
46
+ const client_generated_1 = require("./client.generated");
47
+ let ForgeCartGraphQLModule = (() => {
48
+ let _classDecorators = [(0, common_1.Module)({})];
49
+ let _classDescriptor;
50
+ let _classExtraInitializers = [];
51
+ let _classThis;
52
+ var ForgeCartGraphQLModule = class {
53
+ static { _classThis = this; }
54
+ static {
55
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
56
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
57
+ ForgeCartGraphQLModule = _classThis = _classDescriptor.value;
58
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
59
+ __runInitializers(_classThis, _classExtraInitializers);
60
+ }
61
+ static forAdmin(config) {
62
+ const client = new client_generated_1.ForgeCartAdminClient(config);
63
+ return {
64
+ module: ForgeCartGraphQLModule,
65
+ providers: [{ provide: client_generated_1.ForgeCartAdminClient, useValue: client }],
66
+ exports: [client_generated_1.ForgeCartAdminClient],
67
+ };
68
+ }
69
+ static forShop(config) {
70
+ const client = new client_generated_1.ForgeCartShopClient(config);
71
+ return {
72
+ module: ForgeCartGraphQLModule,
73
+ providers: [{ provide: client_generated_1.ForgeCartShopClient, useValue: client }],
74
+ exports: [client_generated_1.ForgeCartShopClient],
75
+ };
76
+ }
77
+ static forRoot(config) {
78
+ const client = new client_generated_1.ForgeCartClient(config);
79
+ return {
80
+ module: ForgeCartGraphQLModule,
81
+ providers: [
82
+ { provide: client_generated_1.ForgeCartClient, useValue: client },
83
+ { provide: client_generated_1.ForgeCartAdminClient, useValue: client.admin },
84
+ { provide: client_generated_1.ForgeCartShopClient, useValue: client.shop },
85
+ ],
86
+ exports: [client_generated_1.ForgeCartClient, client_generated_1.ForgeCartAdminClient, client_generated_1.ForgeCartShopClient],
87
+ };
88
+ }
89
+ };
90
+ return ForgeCartGraphQLModule = _classThis;
91
+ })();
92
+ exports.ForgeCartGraphQLModule = ForgeCartGraphQLModule;
@@ -538,6 +538,7 @@ export type Channel = {
538
538
  description: Scalars['String']['output'];
539
539
  id: Scalars['ID']['output'];
540
540
  outOfStockThreshold: Scalars['Int']['output'];
541
+ previewUrl: Scalars['String']['output'];
541
542
  pricesIncludeTax: Scalars['Boolean']['output'];
542
543
  secret?: Maybe<Scalars['String']['output']>;
543
544
  seller?: Maybe<Seller>;
@@ -569,6 +570,7 @@ export type ChannelPlugin = {
569
570
  updatedAt: Scalars['DateTime']['output'];
570
571
  };
571
572
  export type ChannelSettings = {
573
+ autoCurrencyExchange: Scalars['Boolean']['output'];
572
574
  channelId: Scalars['ID']['output'];
573
575
  chargeTaxOnShipping: Scalars['Boolean']['output'];
574
576
  companyAddress?: Maybe<CompanyAddress>;
@@ -577,13 +579,24 @@ export type ChannelSettings = {
577
579
  defaultFulfillmentHandlerCode?: Maybe<Scalars['String']['output']>;
578
580
  defaultPaymentProviderCode?: Maybe<Scalars['String']['output']>;
579
581
  defaultWeightUnit?: Maybe<WeightUnit>;
582
+ fxMarkupPercent: Scalars['Float']['output'];
583
+ fxRoundingRule: Scalars['String']['output'];
580
584
  id: Scalars['ID']['output'];
581
- manualShippingRates: Array<ManualShippingRate>;
582
585
  requireCustomerForCheckout: Scalars['Boolean']['output'];
583
586
  requiresShippingAddressValidation: Scalars['Boolean']['output'];
584
587
  shopName?: Maybe<Scalars['String']['output']>;
585
588
  taxOriginScope: Scalars['String']['output'];
586
589
  };
590
+ export type ChatHistoryInput = {
591
+ sessionId: Scalars['String']['input'];
592
+ skip?: InputMaybe<Scalars['Int']['input']>;
593
+ take?: InputMaybe<Scalars['Int']['input']>;
594
+ };
595
+ export type ChatSessionsInput = {
596
+ includeArchived?: InputMaybe<Scalars['Boolean']['input']>;
597
+ skip?: InputMaybe<Scalars['Int']['input']>;
598
+ take?: InputMaybe<Scalars['Int']['input']>;
599
+ };
587
600
  export type Collection = {
588
601
  createdAt: Scalars['DateTime']['output'];
589
602
  description?: Maybe<Scalars['String']['output']>;
@@ -713,6 +726,7 @@ export type CreateCarrierInput = {
713
726
  providerCode: Scalars['String']['input'];
714
727
  };
715
728
  export type CreateChannelInput = {
729
+ availableCurrencyCodes?: InputMaybe<Array<Scalars['String']['input']>>;
716
730
  availableLanguageCodes?: InputMaybe<Array<Scalars['String']['input']>>;
717
731
  code: Scalars['String']['input'];
718
732
  defaultCurrencyCode: Scalars['String']['input'];
@@ -823,6 +837,20 @@ export type CreateManageablePluginInput = {
823
837
  tags?: InputMaybe<Array<Scalars['String']['input']>>;
824
838
  toggable?: InputMaybe<Scalars['Boolean']['input']>;
825
839
  };
840
+ export type CreateMarketInput = {
841
+ countryCodes: Array<Scalars['String']['input']>;
842
+ currencyCode: Scalars['String']['input'];
843
+ enabled?: InputMaybe<Scalars['Boolean']['input']>;
844
+ languageCode?: InputMaybe<Scalars['String']['input']>;
845
+ name: Scalars['String']['input'];
846
+ };
847
+ export type CreateMissionInput = {
848
+ model: Scalars['String']['input'];
849
+ prompt: Scalars['String']['input'];
850
+ repos?: InputMaybe<Array<MissionRepoInput>>;
851
+ title?: InputMaybe<Scalars['String']['input']>;
852
+ workspaceId: Scalars['ID']['input'];
853
+ };
826
854
  export type CreateProductInput = {
827
855
  assetIds?: InputMaybe<Array<Scalars['ID']['input']>>;
828
856
  enabled?: InputMaybe<Scalars['Boolean']['input']>;
@@ -922,6 +950,16 @@ export type CreateSessionInput = {
922
950
  providerCode?: InputMaybe<Scalars['String']['input']>;
923
951
  tokenId?: InputMaybe<Scalars['ID']['input']>;
924
952
  };
953
+ export type CreateShippingGatewayRoutingRuleInput = {
954
+ countryCodes?: InputMaybe<Array<Scalars['String']['input']>>;
955
+ enabled?: InputMaybe<Scalars['Boolean']['input']>;
956
+ flatRates?: InputMaybe<Array<ShippingRoutingFlatRateInput>>;
957
+ fulfillmentType: ShippingRoutingFulfillmentType;
958
+ priority?: InputMaybe<Scalars['Int']['input']>;
959
+ providerCode?: InputMaybe<Scalars['String']['input']>;
960
+ scopeType: ShippingRoutingScopeType;
961
+ stockLocationId: Scalars['ID']['input'];
962
+ };
925
963
  export type CreateShopSubscriptionInput = {
926
964
  defaultTokenId?: InputMaybe<Scalars['ID']['input']>;
927
965
  items: Array<CreateSubscriptionItemInput>;
@@ -1146,6 +1184,11 @@ export type EmitCustomEventInput = {
1146
1184
  hookPoint: Scalars['String']['input'];
1147
1185
  payload?: InputMaybe<Scalars['JSON']['input']>;
1148
1186
  };
1187
+ export type EnqueueChatMessageInput = {
1188
+ interrupt: Scalars['Boolean']['input'];
1189
+ message: Scalars['String']['input'];
1190
+ sessionId: Scalars['String']['input'];
1191
+ };
1149
1192
  export type Entry = {
1150
1193
  createdAt: Scalars['DateTime']['output'];
1151
1194
  fields: Array<AcfFieldValueUnion>;
@@ -1468,19 +1511,20 @@ export type ManageablePluginConfigItemTranslation = {
1468
1511
  languageCode: Scalars['String']['output'];
1469
1512
  name: Scalars['String']['output'];
1470
1513
  };
1471
- export type ManualShippingRate = {
1472
- amount: Scalars['Int']['output'];
1473
- code: Scalars['String']['output'];
1474
- currency: Scalars['String']['output'];
1475
- estimatedDays?: Maybe<Scalars['Int']['output']>;
1514
+ export type Market = {
1515
+ channelId: Scalars['ID']['output'];
1516
+ countries: Array<Country>;
1517
+ createdAt: Scalars['DateTime']['output'];
1518
+ currencyCode: Scalars['String']['output'];
1519
+ enabled: Scalars['Boolean']['output'];
1520
+ id: Scalars['ID']['output'];
1521
+ languageCode?: Maybe<Scalars['String']['output']>;
1476
1522
  name: Scalars['String']['output'];
1523
+ updatedAt: Scalars['DateTime']['output'];
1477
1524
  };
1478
- export type ManualShippingRateInput = {
1479
- amount: Scalars['Int']['input'];
1480
- code: Scalars['String']['input'];
1481
- currency: Scalars['String']['input'];
1482
- estimatedDays?: InputMaybe<Scalars['Int']['input']>;
1483
- name: Scalars['String']['input'];
1525
+ export type MarketList = {
1526
+ items: Array<Market>;
1527
+ totalItems: Scalars['Int']['output'];
1484
1528
  };
1485
1529
  export type MarketingAttribution = {
1486
1530
  computedAt: Scalars['DateTime']['output'];
@@ -1572,6 +1616,46 @@ export type MergeFulfillmentRequestInput = {
1572
1616
  requestIdA: Scalars['ID']['input'];
1573
1617
  requestIdB: Scalars['ID']['input'];
1574
1618
  };
1619
+ export type Mission = {
1620
+ administratorId: Scalars['ID']['output'];
1621
+ branch?: Maybe<Scalars['String']['output']>;
1622
+ channelId: Scalars['ID']['output'];
1623
+ costCents?: Maybe<Scalars['Int']['output']>;
1624
+ createdAt: Scalars['DateTime']['output'];
1625
+ id: Scalars['ID']['output'];
1626
+ model: Scalars['String']['output'];
1627
+ podRef?: Maybe<Scalars['String']['output']>;
1628
+ prUrl?: Maybe<Scalars['String']['output']>;
1629
+ repos: Array<MissionRepoRef>;
1630
+ status: MissionStatus;
1631
+ title?: Maybe<Scalars['String']['output']>;
1632
+ updatedAt: Scalars['DateTime']['output'];
1633
+ workspaceId: Scalars['ID']['output'];
1634
+ };
1635
+ export type MissionList = {
1636
+ items: Array<Mission>;
1637
+ totalItems: Scalars['Int']['output'];
1638
+ };
1639
+ export type MissionListOptions = {
1640
+ skip?: InputMaybe<Scalars['Int']['input']>;
1641
+ sort?: InputMaybe<MissionSortParameter>;
1642
+ take?: InputMaybe<Scalars['Int']['input']>;
1643
+ };
1644
+ export type MissionRepoInput = {
1645
+ branch: Scalars['String']['input'];
1646
+ name: Scalars['String']['input'];
1647
+ owner: Scalars['String']['input'];
1648
+ };
1649
+ export type MissionRepoRef = {
1650
+ branch: Scalars['String']['output'];
1651
+ name: Scalars['String']['output'];
1652
+ owner: Scalars['String']['output'];
1653
+ };
1654
+ export type MissionSortParameter = {
1655
+ createdAt?: InputMaybe<SortOrder>;
1656
+ updatedAt?: InputMaybe<SortOrder>;
1657
+ };
1658
+ export type MissionStatus = 'AWAITING_USER' | 'COMPLETED' | 'FAILED' | 'INTERRUPTED' | 'PENDING' | 'RUNNING';
1575
1659
  export type ModifyOrderAddItemInput = {
1576
1660
  productVariantId: Scalars['ID']['input'];
1577
1661
  quantity: Scalars['Int']['input'];
@@ -1637,8 +1721,10 @@ export type Mutation = {
1637
1721
  resumeSubscription: BillingSubscription;
1638
1722
  saveToken: PaymentGatewayToken;
1639
1723
  selectShippingRate: Order;
1724
+ setCurrency: Channel;
1640
1725
  setCustomerForOrder: Order;
1641
1726
  setDefaultToken: PaymentGatewayToken;
1727
+ setLanguage: Channel;
1642
1728
  setMarketingIdentifiers: SetMarketingIdentifiersResult;
1643
1729
  setOrderBillingAddress: Order;
1644
1730
  setOrderShippingAddress: Order;
@@ -1746,12 +1832,18 @@ export type MutationsaveTokenArgs = {
1746
1832
  export type MutationselectShippingRateArgs = {
1747
1833
  input: SelectRateInput;
1748
1834
  };
1835
+ export type MutationsetCurrencyArgs = {
1836
+ currencyCode: Scalars['String']['input'];
1837
+ };
1749
1838
  export type MutationsetCustomerForOrderArgs = {
1750
1839
  input: SetCustomerInput;
1751
1840
  };
1752
1841
  export type MutationsetDefaultTokenArgs = {
1753
1842
  tokenId: Scalars['ID']['input'];
1754
1843
  };
1844
+ export type MutationsetLanguageArgs = {
1845
+ languageCode: Scalars['String']['input'];
1846
+ };
1755
1847
  export type MutationsetMarketingIdentifiersArgs = {
1756
1848
  input: SetMarketingIdentifiersInput;
1757
1849
  };
@@ -2107,6 +2199,14 @@ export type ProductVariantDimensions = {
2107
2199
  unit: DimensionUnit;
2108
2200
  width?: Maybe<Scalars['Float']['output']>;
2109
2201
  };
2202
+ export type ProductVariantPrice = {
2203
+ createdAt: Scalars['DateTime']['output'];
2204
+ currencyCode: Scalars['String']['output'];
2205
+ id: Scalars['ID']['output'];
2206
+ price: Scalars['Int']['output'];
2207
+ updatedAt: Scalars['DateTime']['output'];
2208
+ variantId: Scalars['ID']['output'];
2209
+ };
2110
2210
  export type ProductVariantSnapshot = {
2111
2211
  createdAt: Scalars['DateTime']['output'];
2112
2212
  id: Scalars['ID']['output'];
@@ -2383,6 +2483,10 @@ export type RemoveStockLocationFromChannelInput = {
2383
2483
  channelId: Scalars['ID']['input'];
2384
2484
  stockLocationId: Scalars['ID']['input'];
2385
2485
  };
2486
+ export type ReorderShippingGatewayRoutingRulesInput = {
2487
+ ruleIds: Array<Scalars['ID']['input']>;
2488
+ stockLocationId: Scalars['ID']['input'];
2489
+ };
2386
2490
  export type ReportDamagedStockInput = {
2387
2491
  note?: InputMaybe<Scalars['String']['input']>;
2388
2492
  quantity: Scalars['Int']['input'];
@@ -2422,6 +2526,10 @@ export type RespondToHookDispatchInput = {
2422
2526
  id: Scalars['String']['input'];
2423
2527
  subscriberId: Scalars['String']['input'];
2424
2528
  };
2529
+ export type ResumeChatSessionInput = {
2530
+ afterEventId: Scalars['Int']['input'];
2531
+ sessionId: Scalars['String']['input'];
2532
+ };
2425
2533
  export type Role = {
2426
2534
  code: Scalars['String']['output'];
2427
2535
  createdAt: Scalars['DateTime']['output'];
@@ -2582,6 +2690,10 @@ export type SendChatMessageInput = {
2582
2690
  message: Scalars['String']['input'];
2583
2691
  sessionId: Scalars['String']['input'];
2584
2692
  };
2693
+ export type SendMissionMessageInput = {
2694
+ message: Scalars['String']['input'];
2695
+ missionId: Scalars['ID']['input'];
2696
+ };
2585
2697
  export type SetBillingAddressInput = {
2586
2698
  address: CreateAddressInput;
2587
2699
  orderId: Scalars['ID']['input'];
@@ -2629,6 +2741,11 @@ export type SetMarketingIdentifiersResult = {
2629
2741
  identityId: Scalars['ID']['output'];
2630
2742
  rejected: Array<Scalars['String']['output']>;
2631
2743
  };
2744
+ export type SetPriceInput = {
2745
+ currencyCode: Scalars['String']['input'];
2746
+ price: Scalars['Int']['input'];
2747
+ variantId: Scalars['ID']['input'];
2748
+ };
2632
2749
  export type SetSafetyStockInput = {
2633
2750
  safetyStock: Scalars['Int']['input'];
2634
2751
  stockLocationId: Scalars['ID']['input'];
@@ -2692,6 +2809,29 @@ export type ShippingGatewayRateGroupLine = {
2692
2809
  weightUnit?: Maybe<Scalars['String']['output']>;
2693
2810
  width?: Maybe<Scalars['Float']['output']>;
2694
2811
  };
2812
+ export type ShippingGatewayRoutingFlatRate = {
2813
+ amount: Scalars['Int']['output'];
2814
+ code: Scalars['String']['output'];
2815
+ createdAt: Scalars['DateTime']['output'];
2816
+ currencyCode: Scalars['String']['output'];
2817
+ estimatedDays?: Maybe<Scalars['Int']['output']>;
2818
+ id: Scalars['ID']['output'];
2819
+ name: Scalars['String']['output'];
2820
+ updatedAt: Scalars['DateTime']['output'];
2821
+ };
2822
+ export type ShippingGatewayRoutingRule = {
2823
+ countries: Array<Country>;
2824
+ createdAt: Scalars['DateTime']['output'];
2825
+ enabled: Scalars['Boolean']['output'];
2826
+ flatRates: Array<ShippingGatewayRoutingFlatRate>;
2827
+ fulfillmentType: ShippingRoutingFulfillmentType;
2828
+ id: Scalars['ID']['output'];
2829
+ priority: Scalars['Int']['output'];
2830
+ providerCode?: Maybe<Scalars['String']['output']>;
2831
+ scopeType: ShippingRoutingScopeType;
2832
+ stockLocationId: Scalars['ID']['output'];
2833
+ updatedAt: Scalars['DateTime']['output'];
2834
+ };
2695
2835
  export type ShippingLine = {
2696
2836
  adjustments: Array<Adjustment>;
2697
2837
  createdAt: Scalars['DateTime']['output'];
@@ -2707,6 +2847,15 @@ export type ShippingProvider = {
2707
2847
  name: Scalars['String']['output'];
2708
2848
  pluginBacked: Scalars['Boolean']['output'];
2709
2849
  };
2850
+ export type ShippingRoutingFlatRateInput = {
2851
+ amount: Scalars['Int']['input'];
2852
+ code: Scalars['String']['input'];
2853
+ currencyCode: Scalars['String']['input'];
2854
+ estimatedDays?: InputMaybe<Scalars['Int']['input']>;
2855
+ name: Scalars['String']['input'];
2856
+ };
2857
+ export type ShippingRoutingFulfillmentType = 'MANUAL' | 'PROVIDER';
2858
+ export type ShippingRoutingScopeType = 'COUNTRIES' | 'DOMESTIC' | 'INTERNATIONAL';
2710
2859
  export type ShopAddItemToOrderInput = {
2711
2860
  quantity: Scalars['Int']['input'];
2712
2861
  variantId: Scalars['ID']['input'];
@@ -2724,6 +2873,10 @@ export type SplitFulfillmentRequestLineInput = {
2724
2873
  orderLineId: Scalars['ID']['input'];
2725
2874
  quantity: Scalars['Int']['input'];
2726
2875
  };
2876
+ export type StartChatSessionInput = {
2877
+ origin?: InputMaybe<Scalars['String']['input']>;
2878
+ title?: InputMaybe<Scalars['String']['input']>;
2879
+ };
2727
2880
  export type StockLevel = {
2728
2881
  id: Scalars['ID']['output'];
2729
2882
  safetyStock: Scalars['Int']['output'];
@@ -2974,6 +3127,7 @@ export type UpdateCarrierInput = {
2974
3127
  name?: InputMaybe<Scalars['String']['input']>;
2975
3128
  };
2976
3129
  export type UpdateChannelInput = {
3130
+ availableCurrencyCodes?: InputMaybe<Array<Scalars['String']['input']>>;
2977
3131
  availableLanguageCodes?: InputMaybe<Array<Scalars['String']['input']>>;
2978
3132
  code?: InputMaybe<Scalars['String']['input']>;
2979
3133
  defaultCurrencyCode?: InputMaybe<Scalars['String']['input']>;
@@ -2992,6 +3146,7 @@ export type UpdateChannelPluginConfigInput = {
2992
3146
  id: Scalars['ID']['input'];
2993
3147
  };
2994
3148
  export type UpdateChannelSettingsInput = {
3149
+ autoCurrencyExchange?: InputMaybe<Scalars['Boolean']['input']>;
2995
3150
  chargeTaxOnShipping?: InputMaybe<Scalars['Boolean']['input']>;
2996
3151
  companyAddress?: InputMaybe<CompanyAddressInput>;
2997
3152
  defaultDeploymentProviderCode?: InputMaybe<Scalars['String']['input']>;
@@ -2999,7 +3154,8 @@ export type UpdateChannelSettingsInput = {
2999
3154
  defaultFulfillmentHandlerCode?: InputMaybe<Scalars['String']['input']>;
3000
3155
  defaultPaymentProviderCode?: InputMaybe<Scalars['String']['input']>;
3001
3156
  defaultWeightUnit?: InputMaybe<WeightUnit>;
3002
- manualShippingRates?: InputMaybe<Array<ManualShippingRateInput>>;
3157
+ fxMarkupPercent?: InputMaybe<Scalars['Float']['input']>;
3158
+ fxRoundingRule?: InputMaybe<Scalars['String']['input']>;
3003
3159
  requireCustomerForCheckout?: InputMaybe<Scalars['Boolean']['input']>;
3004
3160
  requiresShippingAddressValidation?: InputMaybe<Scalars['Boolean']['input']>;
3005
3161
  shopName?: InputMaybe<Scalars['String']['input']>;
@@ -3095,6 +3251,14 @@ export type UpdateManageablePluginInput = {
3095
3251
  name?: InputMaybe<Scalars['String']['input']>;
3096
3252
  toggable?: InputMaybe<Scalars['Boolean']['input']>;
3097
3253
  };
3254
+ export type UpdateMarketInput = {
3255
+ countryCodes?: InputMaybe<Array<Scalars['String']['input']>>;
3256
+ currencyCode?: InputMaybe<Scalars['String']['input']>;
3257
+ enabled?: InputMaybe<Scalars['Boolean']['input']>;
3258
+ id: Scalars['ID']['input'];
3259
+ languageCode?: InputMaybe<Scalars['String']['input']>;
3260
+ name?: InputMaybe<Scalars['String']['input']>;
3261
+ };
3098
3262
  export type UpdateOnboardingProfileInput = {
3099
3263
  /**
3100
3264
  * When `true`, marks the profile step complete and advances
@@ -3201,6 +3365,16 @@ export type UpdateSellerInput = {
3201
3365
  id: Scalars['ID']['input'];
3202
3366
  name?: InputMaybe<Scalars['String']['input']>;
3203
3367
  };
3368
+ export type UpdateShippingGatewayRoutingRuleInput = {
3369
+ countryCodes?: InputMaybe<Array<Scalars['String']['input']>>;
3370
+ enabled?: InputMaybe<Scalars['Boolean']['input']>;
3371
+ flatRates?: InputMaybe<Array<ShippingRoutingFlatRateInput>>;
3372
+ fulfillmentType?: InputMaybe<ShippingRoutingFulfillmentType>;
3373
+ id: Scalars['ID']['input'];
3374
+ priority?: InputMaybe<Scalars['Int']['input']>;
3375
+ providerCode?: InputMaybe<Scalars['String']['input']>;
3376
+ scopeType?: InputMaybe<ShippingRoutingScopeType>;
3377
+ };
3204
3378
  export type UpdateShippingLabelInput = {
3205
3379
  carrier?: InputMaybe<Scalars['String']['input']>;
3206
3380
  labelId: Scalars['ID']['input'];
@@ -4030,6 +4204,19 @@ export type RemoveItemsFromOrderMutation = {
4030
4204
  errors: Array<Pick<BatchOrderLineError, 'index' | 'errorCode' | 'variables'>>;
4031
4205
  };
4032
4206
  };
4207
+ export type ShopChannelFieldFragment = Pick<Channel, 'id' | 'code' | 'defaultLanguageCode' | 'defaultCurrencyCode' | 'availableLanguageCodes' | 'availableCurrencyCodes' | 'pricesIncludeTax'>;
4208
+ export type SetCurrencyMutationVariables = Exact<{
4209
+ currencyCode: Scalars['String']['input'];
4210
+ }>;
4211
+ export type SetCurrencyMutation = {
4212
+ setCurrency: Pick<Channel, 'id' | 'code' | 'defaultLanguageCode' | 'defaultCurrencyCode' | 'availableLanguageCodes' | 'availableCurrencyCodes' | 'pricesIncludeTax'>;
4213
+ };
4214
+ export type SetLanguageMutationVariables = Exact<{
4215
+ languageCode: Scalars['String']['input'];
4216
+ }>;
4217
+ export type SetLanguageMutation = {
4218
+ setLanguage: Pick<Channel, 'id' | 'code' | 'defaultLanguageCode' | 'defaultCurrencyCode' | 'availableLanguageCodes' | 'availableCurrencyCodes' | 'pricesIncludeTax'>;
4219
+ };
4033
4220
  export type SetOrderShippingAddressMutationVariables = Exact<{
4034
4221
  input: CreateAddressInput;
4035
4222
  }>;
package/dist/shop.d.ts CHANGED
@@ -2,6 +2,7 @@ export { ShopNamespace } from './shop.generated';
2
2
  export { AcfCategory } from './shop.generated';
3
3
  export { AuthCategory } from './shop.generated';
4
4
  export { CartCategory } from './shop.generated';
5
+ export { ChannelCategory } from './shop.generated';
5
6
  export { CheckoutCategory } from './shop.generated';
6
7
  export { CollectionCategory } from './shop.generated';
7
8
  export { CustomerCategory } from './shop.generated';
@@ -16,3 +17,4 @@ export { ProductCategory } from './shop.generated';
16
17
  export { SearchCategory } from './shop.generated';
17
18
  export { ShippingCategory } from './shop.generated';
18
19
  export { SubscriptionCategory } from './shop.generated';
20
+ export type * from './shop-types.generated';
@@ -39,6 +39,12 @@ export declare class CartCategory {
39
39
  adjustOrderLines(variables: Types.AdjustOrderLinesMutationVariables): QueryObservable<Types.AdjustOrderLinesMutation>;
40
40
  removeItemsFromOrder(variables: Types.RemoveItemsFromOrderMutationVariables): QueryObservable<Types.RemoveItemsFromOrderMutation>;
41
41
  }
42
+ export declare class ChannelCategory {
43
+ private readonly client;
44
+ constructor(client: BaseGraphQLClient);
45
+ setCurrency(variables: Types.SetCurrencyMutationVariables): QueryObservable<Types.SetCurrencyMutation>;
46
+ setLanguage(variables: Types.SetLanguageMutationVariables): QueryObservable<Types.SetLanguageMutation>;
47
+ }
42
48
  export declare class CheckoutCategory {
43
49
  private readonly client;
44
50
  constructor(client: BaseGraphQLClient);
@@ -50,7 +56,7 @@ export declare class CollectionCategory {
50
56
  private readonly client;
51
57
  constructor(client: BaseGraphQLClient);
52
58
  shopCollection(variables: Types.ShopCollectionQueryVariables): QueryObservable<Types.ShopCollectionQuery>;
53
- shopCollections(variables: Types.ShopCollectionsQueryVariables): QueryObservable<Types.ShopCollectionsQuery>;
59
+ shopCollections(variables?: Types.ShopCollectionsQueryVariables): QueryObservable<Types.ShopCollectionsQuery>;
54
60
  }
55
61
  export declare class CustomerCategory {
56
62
  private readonly client;
@@ -75,7 +81,7 @@ export declare class FacetCategory {
75
81
  private readonly client;
76
82
  constructor(client: BaseGraphQLClient);
77
83
  shopFacet(variables: Types.ShopFacetQueryVariables): QueryObservable<Types.ShopFacetQuery>;
78
- shopFacets(variables: Types.ShopFacetsQueryVariables): QueryObservable<Types.ShopFacetsQuery>;
84
+ shopFacets(variables?: Types.ShopFacetsQueryVariables): QueryObservable<Types.ShopFacetsQuery>;
79
85
  }
80
86
  export declare class HookDispatchCategory {
81
87
  private readonly client;
@@ -128,8 +134,8 @@ export declare class PaymentCategory {
128
134
  export declare class ProductCategory {
129
135
  private readonly client;
130
136
  constructor(client: BaseGraphQLClient);
131
- shopProduct(variables: Types.ShopProductQueryVariables): QueryObservable<Types.ShopProductQuery>;
132
- shopProducts(variables: Types.ShopProductsQueryVariables): QueryObservable<Types.ShopProductsQuery>;
137
+ shopProduct(variables?: Types.ShopProductQueryVariables): QueryObservable<Types.ShopProductQuery>;
138
+ shopProducts(variables?: Types.ShopProductsQueryVariables): QueryObservable<Types.ShopProductsQuery>;
133
139
  shopProductOptionGroups(variables: Types.ShopProductOptionGroupsQueryVariables): QueryObservable<Types.ShopProductOptionGroupsQuery>;
134
140
  }
135
141
  export declare class SearchCategory {
@@ -162,6 +168,7 @@ export declare class ShopNamespace {
162
168
  private readonly _acf;
163
169
  private readonly _auth;
164
170
  private readonly _cart;
171
+ private readonly _channel;
165
172
  private readonly _checkout;
166
173
  private readonly _collection;
167
174
  private readonly _customer;
@@ -180,6 +187,7 @@ export declare class ShopNamespace {
180
187
  get acf(): AcfCategory;
181
188
  get auth(): AuthCategory;
182
189
  get cart(): CartCategory;
190
+ get channel(): ChannelCategory;
183
191
  get checkout(): CheckoutCategory;
184
192
  get collection(): CollectionCategory;
185
193
  get customer(): CustomerCategory;
@@ -198,6 +206,7 @@ export declare class ShopNamespace {
198
206
  export type Address = Types.ShopCustomerAddressFieldFragment;
199
207
  export type Adjustment = Types.ShopAdjustmentFieldFragment;
200
208
  export type BillingSubscription = Types.ShopBillingSubscriptionFieldsFragment;
209
+ export type Channel = Types.ShopChannelFieldFragment;
201
210
  export type Collection = Types.ShopCollectionFieldsFragment;
202
211
  export type Customer = Types.ShopCustomerFieldFragment;
203
212
  export type Facet = Types.ShopFacetFieldsFragment;