@viu/emporix-sdk 2.22.0 → 2.25.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 (116) hide show
  1. package/CHANGELOG.md +144 -0
  2. package/README.md +16 -6
  3. package/dist/availability.cjs +118 -0
  4. package/dist/availability.cjs.map +1 -1
  5. package/dist/availability.d.cts +178 -2
  6. package/dist/availability.d.ts +178 -2
  7. package/dist/availability.js +1 -1
  8. package/dist/cart.cjs +156 -11
  9. package/dist/cart.cjs.map +1 -1
  10. package/dist/cart.d.cts +177 -4
  11. package/dist/cart.d.ts +177 -4
  12. package/dist/cart.js +1 -1
  13. package/dist/category.cjs +192 -2
  14. package/dist/category.cjs.map +1 -1
  15. package/dist/category.d.cts +399 -2
  16. package/dist/category.d.ts +399 -2
  17. package/dist/category.js +1 -1
  18. package/dist/checkout.d.cts +1 -1
  19. package/dist/checkout.d.ts +1 -1
  20. package/dist/{chunk-HD5RBCM6.js → chunk-27NLS646.js} +10 -2
  21. package/dist/chunk-27NLS646.js.map +1 -0
  22. package/dist/{chunk-MMX5FGMI.js → chunk-6PJFOX3A.js} +109 -2
  23. package/dist/chunk-6PJFOX3A.js.map +1 -0
  24. package/dist/chunk-HWVFF6B2.js +378 -0
  25. package/dist/chunk-HWVFF6B2.js.map +1 -0
  26. package/dist/chunk-LQFRJSVT.js +224 -0
  27. package/dist/chunk-LQFRJSVT.js.map +1 -0
  28. package/dist/chunk-P7G4LOOV.js +264 -0
  29. package/dist/chunk-P7G4LOOV.js.map +1 -0
  30. package/dist/{chunk-44F52KRE.js → chunk-QQMLN76U.js} +27 -2
  31. package/dist/chunk-QQMLN76U.js.map +1 -0
  32. package/dist/chunk-UNW6SFSB.js +363 -0
  33. package/dist/chunk-UNW6SFSB.js.map +1 -0
  34. package/dist/chunk-V3275BA7.js +181 -0
  35. package/dist/chunk-V3275BA7.js.map +1 -0
  36. package/dist/chunk-W2KBVWJ2.js +323 -0
  37. package/dist/chunk-W2KBVWJ2.js.map +1 -0
  38. package/dist/{chunk-5DWCYDQD.js → chunk-YVZ6GOLE.js} +158 -13
  39. package/dist/chunk-YVZ6GOLE.js.map +1 -0
  40. package/dist/chunk-ZOFGDNSX.js +305 -0
  41. package/dist/chunk-ZOFGDNSX.js.map +1 -0
  42. package/dist/companies.cjs +25 -0
  43. package/dist/companies.cjs.map +1 -1
  44. package/dist/companies.d.cts +15 -1
  45. package/dist/companies.d.ts +15 -1
  46. package/dist/companies.js +1 -1
  47. package/dist/contacts.cjs +8 -0
  48. package/dist/contacts.cjs.map +1 -1
  49. package/dist/contacts.d.cts +3 -1
  50. package/dist/contacts.d.ts +3 -1
  51. package/dist/contacts.js +1 -1
  52. package/dist/{context-CfXJcYKP.d.cts → context-DC5gSgKK.d.cts} +18 -0
  53. package/dist/{context-CfXJcYKP.d.ts → context-DC5gSgKK.d.ts} +18 -0
  54. package/dist/customer-groups-BqYsPCA6.d.cts +706 -0
  55. package/dist/customer-groups-CLm6Gu9U.d.ts +706 -0
  56. package/dist/customer-groups.cjs +200 -17
  57. package/dist/customer-groups.cjs.map +1 -1
  58. package/dist/customer-groups.d.cts +2 -110
  59. package/dist/customer-groups.d.ts +2 -110
  60. package/dist/customer-groups.js +1 -1
  61. package/dist/customer.d.cts +1 -1
  62. package/dist/customer.d.ts +1 -1
  63. package/dist/index.cjs +2231 -395
  64. package/dist/index.cjs.map +1 -1
  65. package/dist/index.d.cts +435 -13
  66. package/dist/index.d.ts +435 -13
  67. package/dist/index.js +679 -344
  68. package/dist/index.js.map +1 -1
  69. package/dist/locations.d.cts +1 -1
  70. package/dist/locations.d.ts +1 -1
  71. package/dist/media.d.cts +1 -1
  72. package/dist/media.d.ts +1 -1
  73. package/dist/orders.cjs +160 -2
  74. package/dist/orders.cjs.map +1 -1
  75. package/dist/orders.d.cts +222 -2
  76. package/dist/orders.d.ts +222 -2
  77. package/dist/orders.js +1 -1
  78. package/dist/payment.cjs +107 -0
  79. package/dist/payment.cjs.map +1 -1
  80. package/dist/payment.d.cts +300 -2
  81. package/dist/payment.d.ts +300 -2
  82. package/dist/payment.js +1 -1
  83. package/dist/price.cjs +197 -0
  84. package/dist/price.cjs.map +1 -1
  85. package/dist/price.d.cts +578 -2
  86. package/dist/price.d.ts +578 -2
  87. package/dist/price.js +1 -1
  88. package/dist/product.cjs +190 -0
  89. package/dist/product.cjs.map +1 -1
  90. package/dist/product.d.cts +504 -2
  91. package/dist/product.d.ts +504 -2
  92. package/dist/product.js +1 -1
  93. package/dist/segment.cjs +179 -0
  94. package/dist/segment.cjs.map +1 -1
  95. package/dist/segment.d.cts +182 -2
  96. package/dist/segment.d.ts +182 -2
  97. package/dist/segment.js +1 -1
  98. package/package.json +1 -1
  99. package/dist/chunk-36T4YPQJ.js +0 -106
  100. package/dist/chunk-36T4YPQJ.js.map +0 -1
  101. package/dist/chunk-3BTPX7IJ.js +0 -41
  102. package/dist/chunk-3BTPX7IJ.js.map +0 -1
  103. package/dist/chunk-44F52KRE.js.map +0 -1
  104. package/dist/chunk-5DWCYDQD.js.map +0 -1
  105. package/dist/chunk-A3LYJUD4.js +0 -108
  106. package/dist/chunk-A3LYJUD4.js.map +0 -1
  107. package/dist/chunk-DXOLWAOY.js +0 -188
  108. package/dist/chunk-DXOLWAOY.js.map +0 -1
  109. package/dist/chunk-FZMP5NQZ.js +0 -173
  110. package/dist/chunk-FZMP5NQZ.js.map +0 -1
  111. package/dist/chunk-HD5RBCM6.js.map +0 -1
  112. package/dist/chunk-IVCCGJN5.js +0 -63
  113. package/dist/chunk-IVCCGJN5.js.map +0 -1
  114. package/dist/chunk-MMX5FGMI.js.map +0 -1
  115. package/dist/chunk-NE7MIZPR.js +0 -144
  116. package/dist/chunk-NE7MIZPR.js.map +0 -1
package/dist/index.js CHANGED
@@ -2,33 +2,33 @@ import { LocationsService } from './chunk-IAOWDMTA.js';
2
2
  export { LocationsService } from './chunk-IAOWDMTA.js';
3
3
  import { MediaService } from './chunk-OTG2S2L4.js';
4
4
  export { MediaService } from './chunk-OTG2S2L4.js';
5
- import { OrdersService, SalesOrdersService } from './chunk-36T4YPQJ.js';
6
- export { OrdersService, SalesOrdersService } from './chunk-36T4YPQJ.js';
7
- import { auth, resolveToken, DefaultTokenProvider, CustomerRefreshRegistry, PaymentGatewayService } from './chunk-MMX5FGMI.js';
8
- export { CustomerRefreshRegistry, DefaultTokenProvider, PaymentGatewayService, auth, resolveToken } from './chunk-MMX5FGMI.js';
9
- import { PriceService } from './chunk-A3LYJUD4.js';
10
- export { PriceService } from './chunk-A3LYJUD4.js';
11
- import { ProductService } from './chunk-FZMP5NQZ.js';
12
- export { ProductService } from './chunk-FZMP5NQZ.js';
13
- import { SegmentService } from './chunk-NE7MIZPR.js';
14
- export { SegmentService } from './chunk-NE7MIZPR.js';
15
- import { AvailabilityService } from './chunk-IVCCGJN5.js';
16
- export { AvailabilityService } from './chunk-IVCCGJN5.js';
17
- import { CartService } from './chunk-5DWCYDQD.js';
18
- export { CartService } from './chunk-5DWCYDQD.js';
19
- import { CategoryService } from './chunk-DXOLWAOY.js';
20
- export { CategoryService } from './chunk-DXOLWAOY.js';
5
+ import { OrdersService, SalesOrdersService } from './chunk-P7G4LOOV.js';
6
+ export { OrdersService, SalesOrdersService } from './chunk-P7G4LOOV.js';
7
+ import { auth, resolveToken, DefaultTokenProvider, CustomerRefreshRegistry, PaymentGatewayService } from './chunk-6PJFOX3A.js';
8
+ export { CustomerRefreshRegistry, DefaultTokenProvider, PaymentGatewayService, auth, resolveToken } from './chunk-6PJFOX3A.js';
9
+ import { PriceService } from './chunk-ZOFGDNSX.js';
10
+ export { PriceService } from './chunk-ZOFGDNSX.js';
11
+ import { ProductService } from './chunk-UNW6SFSB.js';
12
+ export { ProductService } from './chunk-UNW6SFSB.js';
13
+ import { SegmentService } from './chunk-W2KBVWJ2.js';
14
+ export { SegmentService } from './chunk-W2KBVWJ2.js';
15
+ import { AvailabilityService } from './chunk-V3275BA7.js';
16
+ export { AvailabilityService } from './chunk-V3275BA7.js';
17
+ import { CartService } from './chunk-YVZ6GOLE.js';
18
+ export { CartService } from './chunk-YVZ6GOLE.js';
19
+ import { CategoryService } from './chunk-HWVFF6B2.js';
20
+ export { CategoryService } from './chunk-HWVFF6B2.js';
21
21
  export { iterateAll } from './chunk-GWJ2U2CP.js';
22
22
  import { resolveQuery } from './chunk-S5HEIQDK.js';
23
23
  export { resolveQuery } from './chunk-S5HEIQDK.js';
24
24
  import { CheckoutService } from './chunk-RYQVMR26.js';
25
25
  export { CheckoutService } from './chunk-RYQVMR26.js';
26
- import { CompaniesService } from './chunk-44F52KRE.js';
27
- export { CompaniesService } from './chunk-44F52KRE.js';
28
- import { ContactsService } from './chunk-HD5RBCM6.js';
29
- export { ContactsService } from './chunk-HD5RBCM6.js';
30
- import { CustomerGroupsService } from './chunk-3BTPX7IJ.js';
31
- export { CustomerGroupsService } from './chunk-3BTPX7IJ.js';
26
+ import { CompaniesService } from './chunk-QQMLN76U.js';
27
+ export { CompaniesService } from './chunk-QQMLN76U.js';
28
+ import { ContactsService } from './chunk-27NLS646.js';
29
+ export { ContactsService } from './chunk-27NLS646.js';
30
+ import { CustomerGroupsService, IamService } from './chunk-LQFRJSVT.js';
31
+ export { CustomerGroupsService, IamService } from './chunk-LQFRJSVT.js';
32
32
  import { CustomerService } from './chunk-PRN3T6TY.js';
33
33
  export { CustomerService } from './chunk-PRN3T6TY.js';
34
34
  import './chunk-3BDDYX3V.js';
@@ -61,7 +61,8 @@ function validateConfig(input) {
61
61
  expirationBufferSeconds: input.cache?.expirationBufferSeconds ?? 60,
62
62
  maxLifetimeSeconds: input.cache?.maxLifetimeSeconds ?? 3600
63
63
  },
64
- logger: input.logger
64
+ logger: input.logger,
65
+ fetch: input.fetch
65
66
  };
66
67
  }
67
68
 
@@ -350,9 +351,12 @@ var HttpClient = class {
350
351
  constructor(opts) {
351
352
  this.opts = opts;
352
353
  this.sleep = opts.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
354
+ this.doFetch = opts.fetch ?? ((...args) => globalThis.fetch(...args));
353
355
  }
354
356
  opts;
355
357
  sleep;
358
+ /** Resolved request fetch. The arrow keeps `globalThis.fetch` correctly bound. */
359
+ doFetch;
356
360
  buildHeaders(o, token, isFormData) {
357
361
  return {
358
362
  ...this.opts.requestContext?.language ? { "Accept-Language": this.opts.requestContext.language } : {},
@@ -408,7 +412,7 @@ var HttpClient = class {
408
412
  let res;
409
413
  let text;
410
414
  try {
411
- res = await Promise.race([fetch(url, init), overallBudget]);
415
+ res = await Promise.race([this.doFetch(url, init), overallBudget]);
412
416
  clearTimeout(connectTimer);
413
417
  connectTimer = void 0;
414
418
  const body = res.text();
@@ -512,7 +516,7 @@ var HttpClient = class {
512
516
  init.body = isFormData ? o.body : JSON.stringify(o.body);
513
517
  }
514
518
  try {
515
- return await fetch(url, init);
519
+ return await this.doFetch(url, init);
516
520
  } catch (err) {
517
521
  if (err.name === "AbortError") {
518
522
  throw new EmporixTimeoutError(
@@ -591,7 +595,7 @@ var HttpClient = class {
591
595
  };
592
596
 
593
597
  // package.json
594
- var version = "2.22.0";
598
+ var version = "2.25.0";
595
599
 
596
600
  // src/version.ts
597
601
  var SDK_VERSION = version;
@@ -630,7 +634,10 @@ function createCore(config) {
630
634
  retry: cfg.retry,
631
635
  timeouts: cfg.timeouts,
632
636
  customerRefresh,
633
- requestContext
637
+ requestContext,
638
+ // exactOptionalPropertyTypes: `{ fetch: undefined }` is a type error
639
+ // against `fetch?: typeof globalThis.fetch`, so spread conditionally.
640
+ ...cfg.fetch !== void 0 ? { fetch: cfg.fetch } : {}
634
641
  })
635
642
  });
636
643
  return {
@@ -661,6 +668,7 @@ function createCore(config) {
661
668
 
662
669
  // src/services/site.ts
663
670
  var ANON = auth.anonymous();
671
+ var SERVICE = auth.service();
664
672
  var SiteService = class {
665
673
  constructor(ctx) {
666
674
  this.ctx = ctx;
@@ -697,6 +705,114 @@ var SiteService = class {
697
705
  }
698
706
  return def;
699
707
  }
708
+ /** Lists just the tenant's site codes (`GET /siteslist`). Default auth: anonymous. */
709
+ async listCodes(authCtx = ANON) {
710
+ return this.ctx.http.request({
711
+ method: "GET",
712
+ path: `/site/${this.ctx.tenant}/siteslist`,
713
+ auth: authCtx
714
+ });
715
+ }
716
+ // --- Admin writes. Default auth: service. ---
717
+ /** Creates a site (`POST /sites`). Default auth: service. */
718
+ async create(input, authCtx = SERVICE) {
719
+ return this.ctx.http.request({
720
+ method: "POST",
721
+ path: `/site/${this.ctx.tenant}/sites`,
722
+ body: input,
723
+ auth: authCtx
724
+ });
725
+ }
726
+ /**
727
+ * Partially updates a site (`PATCH /sites/{siteCode}`). The endpoint responds
728
+ * 200 without a defined body, so nothing is returned — re-read with
729
+ * {@link get} when the updated site is needed. Default auth: service.
730
+ */
731
+ async update(siteCode, input, authCtx = SERVICE) {
732
+ await this.ctx.http.request({
733
+ method: "PATCH",
734
+ path: `/site/${this.ctx.tenant}/sites/${siteCode}`,
735
+ body: input,
736
+ auth: authCtx
737
+ });
738
+ }
739
+ /**
740
+ * Full-replaces a site (`PUT /sites/{siteCode}`). Like {@link update} it
741
+ * returns nothing (200 with no defined body). `options.expand` is forwarded as
742
+ * a query parameter. Default auth: service.
743
+ */
744
+ async replace(siteCode, input, options = {}, authCtx = SERVICE) {
745
+ await this.ctx.http.request({
746
+ method: "PUT",
747
+ path: `/site/${this.ctx.tenant}/sites/${siteCode}`,
748
+ ...options.expand === void 0 ? {} : { query: { expand: options.expand } },
749
+ body: input,
750
+ auth: authCtx
751
+ });
752
+ }
753
+ /** Deletes a site (`DELETE /sites/{siteCode}`). Default auth: service. */
754
+ async delete(siteCode, authCtx = SERVICE) {
755
+ await this.ctx.http.request({
756
+ method: "DELETE",
757
+ path: `/site/${this.ctx.tenant}/sites/${siteCode}`,
758
+ auth: authCtx
759
+ });
760
+ }
761
+ /**
762
+ * Site mixins (`/sites/{siteCode}/mixins`). Mixin content is an open map —
763
+ * the spec defines no structure. Reads default to anonymous, writes to
764
+ * service auth.
765
+ */
766
+ mixins = {
767
+ /** All mixin groups of a site, as a map of group name to content. */
768
+ list: async (siteCode, authCtx = ANON) => this.ctx.http.request({
769
+ method: "GET",
770
+ path: `/site/${this.ctx.tenant}/sites/${siteCode}/mixins`,
771
+ auth: authCtx
772
+ }),
773
+ /** One mixin group's content by name. */
774
+ get: async (siteCode, mixinName, authCtx = ANON) => this.ctx.http.request({
775
+ method: "GET",
776
+ path: `/site/${this.ctx.tenant}/sites/${siteCode}/mixins/${mixinName}`,
777
+ auth: authCtx
778
+ }),
779
+ /** Adds a mixin to a site. Default auth: service. */
780
+ create: async (siteCode, input, authCtx = SERVICE) => this.ctx.http.request({
781
+ method: "POST",
782
+ path: `/site/${this.ctx.tenant}/sites/${siteCode}/mixins`,
783
+ body: input,
784
+ auth: authCtx
785
+ }),
786
+ /**
787
+ * Partially updates a mixin (PATCH). Responds 200 without a defined body,
788
+ * so nothing is returned. Default auth: service.
789
+ */
790
+ update: async (siteCode, mixinName, input, authCtx = SERVICE) => {
791
+ await this.ctx.http.request({
792
+ method: "PATCH",
793
+ path: `/site/${this.ctx.tenant}/sites/${siteCode}/mixins/${mixinName}`,
794
+ body: input,
795
+ auth: authCtx
796
+ });
797
+ },
798
+ /** Full-replaces a mixin (PUT). Returns nothing, like {@link update}. Default auth: service. */
799
+ replace: async (siteCode, mixinName, input, authCtx = SERVICE) => {
800
+ await this.ctx.http.request({
801
+ method: "PUT",
802
+ path: `/site/${this.ctx.tenant}/sites/${siteCode}/mixins/${mixinName}`,
803
+ body: input,
804
+ auth: authCtx
805
+ });
806
+ },
807
+ /** Removes a mixin from a site. Default auth: service. */
808
+ delete: async (siteCode, mixinName, authCtx = SERVICE) => {
809
+ await this.ctx.http.request({
810
+ method: "DELETE",
811
+ path: `/site/${this.ctx.tenant}/sites/${siteCode}/mixins/${mixinName}`,
812
+ auth: authCtx
813
+ });
814
+ }
815
+ };
700
816
  };
701
817
 
702
818
  // src/services/session-context.ts
@@ -781,7 +897,7 @@ function isNotFound(err) {
781
897
  }
782
898
 
783
899
  // src/services/tenant-config.ts
784
- var SERVICE = { kind: "service" };
900
+ var SERVICE2 = { kind: "service" };
785
901
  var TenantConfigService = class {
786
902
  constructor(ctx) {
787
903
  this.ctx = ctx;
@@ -792,7 +908,7 @@ var TenantConfigService = class {
792
908
  return `/configuration/${this.ctx.tenant}/configurations`;
793
909
  }
794
910
  /** List tenant configurations, optionally filtered by `keys`. */
795
- async list(opts = {}, auth2 = SERVICE) {
911
+ async list(opts = {}, auth2 = SERVICE2) {
796
912
  const query = opts.keys && opts.keys.length > 0 ? { keys: opts.keys.join(",") } : void 0;
797
913
  return this.ctx.http.request({
798
914
  method: "GET",
@@ -802,7 +918,7 @@ var TenantConfigService = class {
802
918
  });
803
919
  }
804
920
  /** Retrieve one tenant configuration by key. */
805
- async get(key, auth2 = SERVICE) {
921
+ async get(key, auth2 = SERVICE2) {
806
922
  return this.ctx.http.request({
807
923
  method: "GET",
808
924
  path: `${this.base()}/${encodeURIComponent(key)}`,
@@ -810,7 +926,7 @@ var TenantConfigService = class {
810
926
  });
811
927
  }
812
928
  /** Create one or more tenant configurations (array in, array out). */
813
- async create(drafts, auth2 = SERVICE) {
929
+ async create(drafts, auth2 = SERVICE2) {
814
930
  return this.ctx.http.request({
815
931
  method: "POST",
816
932
  path: this.base(),
@@ -819,7 +935,7 @@ var TenantConfigService = class {
819
935
  });
820
936
  }
821
937
  /** Update one tenant configuration by key. */
822
- async update(key, draft, auth2 = SERVICE) {
938
+ async update(key, draft, auth2 = SERVICE2) {
823
939
  return this.ctx.http.request({
824
940
  method: "PUT",
825
941
  path: `${this.base()}/${encodeURIComponent(key)}`,
@@ -828,17 +944,29 @@ var TenantConfigService = class {
828
944
  });
829
945
  }
830
946
  /** Delete one tenant configuration by key. */
831
- async delete(key, auth2 = SERVICE) {
947
+ async delete(key, auth2 = SERVICE2) {
832
948
  await this.ctx.http.request({
833
949
  method: "DELETE",
834
950
  path: `${this.base()}/${encodeURIComponent(key)}`,
835
951
  auth: auth2
836
952
  });
837
953
  }
954
+ /**
955
+ * List the platform-wide global configurations
956
+ * (`GET /global-configurations`) — a separate resource from the tenant's own
957
+ * `/configurations`.
958
+ */
959
+ async listGlobal(auth2 = SERVICE2) {
960
+ return this.ctx.http.request({
961
+ method: "GET",
962
+ path: `/configuration/${this.ctx.tenant}/global-configurations`,
963
+ auth: auth2
964
+ });
965
+ }
838
966
  };
839
967
 
840
968
  // src/services/client-config.ts
841
- var SERVICE2 = { kind: "service" };
969
+ var SERVICE3 = { kind: "service" };
842
970
  var ClientConfigService = class {
843
971
  constructor(ctx) {
844
972
  this.ctx = ctx;
@@ -849,7 +977,7 @@ var ClientConfigService = class {
849
977
  return `/configuration/${this.ctx.tenant}/clients/${encodeURIComponent(client)}/configurations`;
850
978
  }
851
979
  /** List a client's configurations, optionally filtered by `keys`. */
852
- async list(client, opts = {}, auth2 = SERVICE2) {
980
+ async list(client, opts = {}, auth2 = SERVICE3) {
853
981
  const query = opts.keys && opts.keys.length > 0 ? { keys: opts.keys.join(",") } : void 0;
854
982
  return this.ctx.http.request({
855
983
  method: "GET",
@@ -859,7 +987,7 @@ var ClientConfigService = class {
859
987
  });
860
988
  }
861
989
  /** Retrieve one client configuration by key. */
862
- async get(client, key, auth2 = SERVICE2) {
990
+ async get(client, key, auth2 = SERVICE3) {
863
991
  return this.ctx.http.request({
864
992
  method: "GET",
865
993
  path: `${this.base(client)}/${encodeURIComponent(key)}`,
@@ -867,7 +995,7 @@ var ClientConfigService = class {
867
995
  });
868
996
  }
869
997
  /** Create one or more client configurations. Injects `client` into each item. */
870
- async create(client, drafts, auth2 = SERVICE2) {
998
+ async create(client, drafts, auth2 = SERVICE3) {
871
999
  const body = drafts.map((d) => ({ ...d, client }));
872
1000
  return this.ctx.http.request({
873
1001
  method: "POST",
@@ -877,7 +1005,7 @@ var ClientConfigService = class {
877
1005
  });
878
1006
  }
879
1007
  /** Update one client configuration by key. Injects `client` into the body. */
880
- async update(client, key, draft, auth2 = SERVICE2) {
1008
+ async update(client, key, draft, auth2 = SERVICE3) {
881
1009
  return this.ctx.http.request({
882
1010
  method: "PUT",
883
1011
  path: `${this.base(client)}/${encodeURIComponent(key)}`,
@@ -886,13 +1014,25 @@ var ClientConfigService = class {
886
1014
  });
887
1015
  }
888
1016
  /** Delete one client configuration by key. */
889
- async delete(client, key, auth2 = SERVICE2) {
1017
+ async delete(client, key, auth2 = SERVICE3) {
890
1018
  await this.ctx.http.request({
891
1019
  method: "DELETE",
892
1020
  path: `${this.base(client)}/${encodeURIComponent(key)}`,
893
1021
  auth: auth2
894
1022
  });
895
1023
  }
1024
+ /**
1025
+ * List the client ids that have configurations (`GET /clients`). Note this
1026
+ * targets `/configuration/{tenant}/clients` directly — the private `base`
1027
+ * helper appends `/configurations` for a specific client.
1028
+ */
1029
+ async listClients(auth2 = SERVICE3) {
1030
+ return this.ctx.http.request({
1031
+ method: "GET",
1032
+ path: `/configuration/${this.ctx.tenant}/clients`,
1033
+ auth: auth2
1034
+ });
1035
+ }
896
1036
  };
897
1037
 
898
1038
  // src/services/shopping-list.ts
@@ -993,7 +1133,7 @@ var ShoppingListService = class {
993
1133
  };
994
1134
 
995
1135
  // src/services/ai-rag-indexer.ts
996
- var SERVICE3 = { kind: "service" };
1136
+ var SERVICE4 = { kind: "service" };
997
1137
  var RagIndexerService = class {
998
1138
  constructor(ctx) {
999
1139
  this.ctx = ctx;
@@ -1004,7 +1144,7 @@ var RagIndexerService = class {
1004
1144
  return `/ai-rag-indexer/${this.ctx.tenant}/${encodeURIComponent(type)}`;
1005
1145
  }
1006
1146
  /** The indexable embedding field names for `type` (default `"PRODUCT"`). */
1007
- async ragMetadata(type = "PRODUCT", auth2 = SERVICE3) {
1147
+ async ragMetadata(type = "PRODUCT", auth2 = SERVICE4) {
1008
1148
  return this.ctx.http.request({
1009
1149
  method: "GET",
1010
1150
  path: `${this.base(type)}/rag-metadata`,
@@ -1012,7 +1152,7 @@ var RagIndexerService = class {
1012
1152
  });
1013
1153
  }
1014
1154
  /** The filterable metadata fields for `type` (default `"PRODUCT"`). */
1015
- async filterMetadata(type = "PRODUCT", auth2 = SERVICE3) {
1155
+ async filterMetadata(type = "PRODUCT", auth2 = SERVICE4) {
1016
1156
  return this.ctx.http.request({
1017
1157
  method: "GET",
1018
1158
  path: `${this.base(type)}/filter-metadata`,
@@ -1026,7 +1166,7 @@ var RagIndexerService = class {
1026
1166
  * @deprecated since 2026-06-18, removal 2026-12-01 — use the indexing service:
1027
1167
  * `client.indexing.createReindexJob({ entityType: "PRODUCT", rag: true })`.
1028
1168
  */
1029
- async reindex(type = "PRODUCT", auth2 = SERVICE3) {
1169
+ async reindex(type = "PRODUCT", auth2 = SERVICE4) {
1030
1170
  await this.ctx.http.request({
1031
1171
  method: "POST",
1032
1172
  path: `${this.base(type)}/reindex`,
@@ -1036,7 +1176,7 @@ var RagIndexerService = class {
1036
1176
  };
1037
1177
 
1038
1178
  // src/services/sequential-id.ts
1039
- var SERVICE4 = { kind: "service" };
1179
+ var SERVICE5 = { kind: "service" };
1040
1180
  var SequentialIdService = class {
1041
1181
  constructor(ctx) {
1042
1182
  this.ctx = ctx;
@@ -1047,7 +1187,7 @@ var SequentialIdService = class {
1047
1187
  return `/sequential-id/${this.ctx.tenant}/schemas`;
1048
1188
  }
1049
1189
  /** List all sequence schemas for the tenant. */
1050
- async listSchemas(auth2 = SERVICE4) {
1190
+ async listSchemas(auth2 = SERVICE5) {
1051
1191
  return this.ctx.http.request({
1052
1192
  method: "GET",
1053
1193
  path: this.base(),
@@ -1055,7 +1195,7 @@ var SequentialIdService = class {
1055
1195
  });
1056
1196
  }
1057
1197
  /** Retrieve one sequence schema by id. */
1058
- async getSchema(schemaId, auth2 = SERVICE4) {
1198
+ async getSchema(schemaId, auth2 = SERVICE5) {
1059
1199
  return this.ctx.http.request({
1060
1200
  method: "GET",
1061
1201
  path: `${this.base()}/${encodeURIComponent(schemaId)}`,
@@ -1063,7 +1203,7 @@ var SequentialIdService = class {
1063
1203
  });
1064
1204
  }
1065
1205
  /** Create a sequence schema. Schemas are immutable — there is no update. */
1066
- async createSchema(schema, auth2 = SERVICE4) {
1206
+ async createSchema(schema, auth2 = SERVICE5) {
1067
1207
  return this.ctx.http.request({
1068
1208
  method: "POST",
1069
1209
  path: this.base(),
@@ -1072,7 +1212,7 @@ var SequentialIdService = class {
1072
1212
  });
1073
1213
  }
1074
1214
  /** Delete a sequence schema by id. */
1075
- async deleteSchema(schemaId, auth2 = SERVICE4) {
1215
+ async deleteSchema(schemaId, auth2 = SERVICE5) {
1076
1216
  await this.ctx.http.request({
1077
1217
  method: "DELETE",
1078
1218
  path: `${this.base()}/${encodeURIComponent(schemaId)}`,
@@ -1080,7 +1220,7 @@ var SequentialIdService = class {
1080
1220
  });
1081
1221
  }
1082
1222
  /** Mark a schema active for its type (only one schema may be active per type). */
1083
- async setActiveSchema(schemaId, auth2 = SERVICE4) {
1223
+ async setActiveSchema(schemaId, auth2 = SERVICE5) {
1084
1224
  await this.ctx.http.request({
1085
1225
  method: "POST",
1086
1226
  path: `${this.base()}/${encodeURIComponent(schemaId)}/setActive`,
@@ -1088,7 +1228,7 @@ var SequentialIdService = class {
1088
1228
  });
1089
1229
  }
1090
1230
  /** Get the active schema for a given schema type. */
1091
- async listSchemasByType(schemaType, auth2 = SERVICE4) {
1231
+ async listSchemasByType(schemaType, auth2 = SERVICE5) {
1092
1232
  return this.ctx.http.request({
1093
1233
  method: "GET",
1094
1234
  path: `${this.base()}/types/${encodeURIComponent(schemaType)}`,
@@ -1100,7 +1240,7 @@ var SequentialIdService = class {
1100
1240
  * `sequenceKey` (independent sub-pool counter) and `placeholders`.
1101
1241
  * `opts.siteCode` derives time/country placeholders from the site's settings.
1102
1242
  */
1103
- async nextId(schemaType, body = {}, opts = {}, auth2 = SERVICE4) {
1243
+ async nextId(schemaType, body = {}, opts = {}, auth2 = SERVICE5) {
1104
1244
  const query = opts.siteCode ? { siteCode: opts.siteCode } : void 0;
1105
1245
  return this.ctx.http.request({
1106
1246
  method: "POST",
@@ -1115,7 +1255,7 @@ var SequentialIdService = class {
1115
1255
  * endpoint path omits the `{tenant}` segment — the service derives the
1116
1256
  * tenant from the token.
1117
1257
  */
1118
- async nextIdsBatch(req, auth2 = SERVICE4) {
1258
+ async nextIdsBatch(req, auth2 = SERVICE5) {
1119
1259
  return this.ctx.http.request({
1120
1260
  method: "POST",
1121
1261
  path: `/sequential-id/sequenceSchemaBatch/nextIds`,
@@ -1126,7 +1266,7 @@ var SequentialIdService = class {
1126
1266
  };
1127
1267
 
1128
1268
  // src/services/fee.ts
1129
- var SERVICE5 = { kind: "service" };
1269
+ var SERVICE6 = { kind: "service" };
1130
1270
  var FeeService = class {
1131
1271
  constructor(ctx) {
1132
1272
  this.ctx = ctx;
@@ -1149,7 +1289,7 @@ var FeeService = class {
1149
1289
  * returned page is full). Defaults match Emporix server defaults
1150
1290
  * (`pageNumber: 1`, `pageSize: 60`).
1151
1291
  */
1152
- async list(query = {}, auth2 = SERVICE5) {
1292
+ async list(query = {}, auth2 = SERVICE6) {
1153
1293
  const pageNumber = query.pageNumber ?? 1;
1154
1294
  const pageSize = query.pageSize ?? 60;
1155
1295
  const items = await this.ctx.http.request({
@@ -1161,7 +1301,7 @@ var FeeService = class {
1161
1301
  return { items, pageNumber, pageSize, hasNextPage: items.length === pageSize };
1162
1302
  }
1163
1303
  /** Retrieve one fee definition by id. */
1164
- async get(id, auth2 = SERVICE5) {
1304
+ async get(id, auth2 = SERVICE6) {
1165
1305
  return this.ctx.http.request({
1166
1306
  method: "GET",
1167
1307
  path: `${this.feesBase()}/${encodeURIComponent(id)}`,
@@ -1169,7 +1309,7 @@ var FeeService = class {
1169
1309
  });
1170
1310
  }
1171
1311
  /** Create a fee definition. */
1172
- async create(draft, auth2 = SERVICE5) {
1312
+ async create(draft, auth2 = SERVICE6) {
1173
1313
  return this.ctx.http.request({
1174
1314
  method: "POST",
1175
1315
  path: this.feesBase(),
@@ -1178,7 +1318,7 @@ var FeeService = class {
1178
1318
  });
1179
1319
  }
1180
1320
  /** Update a fee definition by id. */
1181
- async update(id, draft, auth2 = SERVICE5) {
1321
+ async update(id, draft, auth2 = SERVICE6) {
1182
1322
  return this.ctx.http.request({
1183
1323
  method: "PUT",
1184
1324
  path: `${this.feesBase()}/${encodeURIComponent(id)}`,
@@ -1187,7 +1327,7 @@ var FeeService = class {
1187
1327
  });
1188
1328
  }
1189
1329
  /** Delete a fee definition by id. */
1190
- async delete(id, auth2 = SERVICE5) {
1330
+ async delete(id, auth2 = SERVICE6) {
1191
1331
  await this.ctx.http.request({
1192
1332
  method: "DELETE",
1193
1333
  path: `${this.feesBase()}/${encodeURIComponent(id)}`,
@@ -1196,7 +1336,7 @@ var FeeService = class {
1196
1336
  }
1197
1337
  // --- Item-fee mappings ---
1198
1338
  /** List all item-fee mappings. */
1199
- async listItemFees(auth2 = SERVICE5) {
1339
+ async listItemFees(auth2 = SERVICE6) {
1200
1340
  return this.ctx.http.request({
1201
1341
  method: "GET",
1202
1342
  path: this.itemFeesBase(),
@@ -1204,7 +1344,7 @@ var FeeService = class {
1204
1344
  });
1205
1345
  }
1206
1346
  /** Fee mappings for one item YRN. */
1207
- async getItemFees(itemYrn, auth2 = SERVICE5) {
1347
+ async getItemFees(itemYrn, auth2 = SERVICE6) {
1208
1348
  return this.ctx.http.request({
1209
1349
  method: "GET",
1210
1350
  path: `${this.itemFeesBase()}/${encodeURIComponent(itemYrn)}/fees`,
@@ -1212,7 +1352,7 @@ var FeeService = class {
1212
1352
  });
1213
1353
  }
1214
1354
  /** Create an item-fee mapping. */
1215
- async createItemFee(draft, auth2 = SERVICE5) {
1355
+ async createItemFee(draft, auth2 = SERVICE6) {
1216
1356
  return this.ctx.http.request({
1217
1357
  method: "POST",
1218
1358
  path: this.itemFeesBase(),
@@ -1224,7 +1364,7 @@ var FeeService = class {
1224
1364
  * Set the fee list for an item YRN. Destructive replace by default; pass
1225
1365
  * `{ partial: true }` to merge (`?partial=true`).
1226
1366
  */
1227
- async setItemFees(itemYrn, feeIds, opts = {}, auth2 = SERVICE5) {
1367
+ async setItemFees(itemYrn, feeIds, opts = {}, auth2 = SERVICE6) {
1228
1368
  return this.ctx.http.request({
1229
1369
  method: "PUT",
1230
1370
  path: `${this.itemFeesBase()}/${encodeURIComponent(itemYrn)}/fees`,
@@ -1237,7 +1377,7 @@ var FeeService = class {
1237
1377
  * Delete item-fee mappings for a YRN. Without `feeId`, removes all mappings
1238
1378
  * for the YRN; with `feeId`, removes that single fee from the mapping.
1239
1379
  */
1240
- async deleteItemFees(itemYrn, feeId, auth2 = SERVICE5) {
1380
+ async deleteItemFees(itemYrn, feeId, auth2 = SERVICE6) {
1241
1381
  const base = `${this.itemFeesBase()}/${encodeURIComponent(itemYrn)}/fees`;
1242
1382
  await this.ctx.http.request({
1243
1383
  method: "DELETE",
@@ -1246,7 +1386,7 @@ var FeeService = class {
1246
1386
  });
1247
1387
  }
1248
1388
  /** Search item-fee mappings by item YRNs + site. */
1249
- async searchItemFees(search, auth2 = SERVICE5) {
1389
+ async searchItemFees(search, auth2 = SERVICE6) {
1250
1390
  return this.ctx.http.request({
1251
1391
  method: "POST",
1252
1392
  path: `${this.itemFeesBase()}/search`,
@@ -1256,7 +1396,7 @@ var FeeService = class {
1256
1396
  }
1257
1397
  // --- Product-fee mappings ---
1258
1398
  /** Fee mappings for a product id. */
1259
- async getProductFees(productId, auth2 = SERVICE5) {
1399
+ async getProductFees(productId, auth2 = SERVICE6) {
1260
1400
  return this.ctx.http.request({
1261
1401
  method: "GET",
1262
1402
  path: `${this.productFeesBase()}/${encodeURIComponent(productId)}/fees`,
@@ -1267,7 +1407,7 @@ var FeeService = class {
1267
1407
  * Set the fee list for a product id. Destructive replace by default; pass
1268
1408
  * `{ partial: true }` to merge (`?partial=true`).
1269
1409
  */
1270
- async setProductFees(productId, feeIds, opts = {}, auth2 = SERVICE5) {
1410
+ async setProductFees(productId, feeIds, opts = {}, auth2 = SERVICE6) {
1271
1411
  return this.ctx.http.request({
1272
1412
  method: "PUT",
1273
1413
  path: `${this.productFeesBase()}/${encodeURIComponent(productId)}/fees`,
@@ -1277,13 +1417,54 @@ var FeeService = class {
1277
1417
  });
1278
1418
  }
1279
1419
  /** Delete all fee mappings for a product id. */
1280
- async deleteProductFees(productId, auth2 = SERVICE5) {
1420
+ async deleteProductFees(productId, auth2 = SERVICE6) {
1281
1421
  await this.ctx.http.request({
1282
1422
  method: "DELETE",
1283
1423
  path: `${this.productFeesBase()}/${encodeURIComponent(productId)}/fees`,
1284
1424
  auth: auth2
1285
1425
  });
1286
1426
  }
1427
+ /**
1428
+ * Removes **one** fee from a product
1429
+ * (`DELETE /productFees/{productId}/fees/{feeId}`). Use
1430
+ * {@link deleteProductFees} to clear every fee of a product.
1431
+ */
1432
+ async deleteProductFee(productId, feeId, auth2 = SERVICE6) {
1433
+ await this.ctx.http.request({
1434
+ method: "DELETE",
1435
+ path: `${this.productFeesBase()}/${encodeURIComponent(productId)}/fees/${encodeURIComponent(feeId)}`,
1436
+ auth: auth2
1437
+ });
1438
+ }
1439
+ /**
1440
+ * Finds item fees for one product across several sites
1441
+ * (`POST /itemFees/searchByProductId`).
1442
+ */
1443
+ async searchItemFeesByProductId(search, auth2 = SERVICE6) {
1444
+ return this.ctx.http.request({
1445
+ method: "POST",
1446
+ path: `${this.itemFeesBase()}/searchByProductId`,
1447
+ auth: auth2,
1448
+ body: search,
1449
+ idempotent: true
1450
+ // pure read over POST — safe to replay on 5xx/429
1451
+ });
1452
+ }
1453
+ /**
1454
+ * Finds item fees for several products on one site
1455
+ * (`POST /itemFees/searchByProductIds`). Note the upstream asymmetry:
1456
+ * `productIds` is a comma-separated **string** and `siteCode` is singular.
1457
+ */
1458
+ async searchItemFeesByProductIds(search, auth2 = SERVICE6) {
1459
+ return this.ctx.http.request({
1460
+ method: "POST",
1461
+ path: `${this.itemFeesBase()}/searchByProductIds`,
1462
+ auth: auth2,
1463
+ body: search,
1464
+ idempotent: true
1465
+ // pure read over POST — safe to replay on 5xx/429
1466
+ });
1467
+ }
1287
1468
  };
1288
1469
 
1289
1470
  // src/services/cloud-functions.ts
@@ -1310,7 +1491,7 @@ var CloudFunctionsService = class {
1310
1491
  };
1311
1492
 
1312
1493
  // src/services/webhook.ts
1313
- var SERVICE6 = { kind: "service" };
1494
+ var SERVICE7 = { kind: "service" };
1314
1495
  var WebhookService = class {
1315
1496
  constructor(ctx) {
1316
1497
  this.ctx = ctx;
@@ -1321,7 +1502,7 @@ var WebhookService = class {
1321
1502
  return `/webhook/${this.ctx.tenant}`;
1322
1503
  }
1323
1504
  /** List the event-subscription catalog with each event's on/off state. */
1324
- async listEventSubscriptions(auth2 = SERVICE6) {
1505
+ async listEventSubscriptions(auth2 = SERVICE7) {
1325
1506
  return this.ctx.http.request({
1326
1507
  method: "GET",
1327
1508
  path: `${this.base()}/event-subscriptions`,
@@ -1334,7 +1515,7 @@ var WebhookService = class {
1334
1515
  * `code`/`status` (e.g. `results.filter(r => (r.code ?? 0) >= 400)`). Does
1335
1516
  * NOT throw on a 207 with failed items; only a non-2xx HTTP status throws.
1336
1517
  */
1337
- async updateEventSubscriptions(items, auth2 = SERVICE6) {
1518
+ async updateEventSubscriptions(items, auth2 = SERVICE7) {
1338
1519
  return this.ctx.http.request({
1339
1520
  method: "PATCH",
1340
1521
  path: `${this.base()}/event-subscriptions`,
@@ -1343,7 +1524,7 @@ var WebhookService = class {
1343
1524
  });
1344
1525
  }
1345
1526
  /** List delivery configurations. */
1346
- async listConfigs(auth2 = SERVICE6) {
1527
+ async listConfigs(auth2 = SERVICE7) {
1347
1528
  return this.ctx.http.request({
1348
1529
  method: "GET",
1349
1530
  path: `${this.base()}/config`,
@@ -1351,7 +1532,7 @@ var WebhookService = class {
1351
1532
  });
1352
1533
  }
1353
1534
  /** Retrieve one delivery configuration by code. */
1354
- async getConfig(code, auth2 = SERVICE6) {
1535
+ async getConfig(code, auth2 = SERVICE7) {
1355
1536
  return this.ctx.http.request({
1356
1537
  method: "GET",
1357
1538
  path: `${this.base()}/config/${encodeURIComponent(code)}`,
@@ -1359,7 +1540,7 @@ var WebhookService = class {
1359
1540
  });
1360
1541
  }
1361
1542
  /** Create a delivery configuration. Returns the server-assigned `{ code }`. */
1362
- async createConfig(draft, auth2 = SERVICE6) {
1543
+ async createConfig(draft, auth2 = SERVICE7) {
1363
1544
  return this.ctx.http.request({
1364
1545
  method: "POST",
1365
1546
  path: `${this.base()}/config`,
@@ -1368,7 +1549,7 @@ var WebhookService = class {
1368
1549
  });
1369
1550
  }
1370
1551
  /** Replace a delivery configuration by code (204). */
1371
- async replaceConfig(code, draft, auth2 = SERVICE6) {
1552
+ async replaceConfig(code, draft, auth2 = SERVICE7) {
1372
1553
  await this.ctx.http.request({
1373
1554
  method: "PUT",
1374
1555
  path: `${this.base()}/config/${encodeURIComponent(code)}`,
@@ -1380,7 +1561,7 @@ var WebhookService = class {
1380
1561
  * Partially update a delivery configuration by code (204). The body is an
1381
1562
  * **array** of `{ op, path, value }` operations (UPSERT / REMOVE).
1382
1563
  */
1383
- async patchConfig(code, patches, auth2 = SERVICE6) {
1564
+ async patchConfig(code, patches, auth2 = SERVICE7) {
1384
1565
  await this.ctx.http.request({
1385
1566
  method: "PATCH",
1386
1567
  path: `${this.base()}/config/${encodeURIComponent(code)}`,
@@ -1392,7 +1573,7 @@ var WebhookService = class {
1392
1573
  * Delete a delivery configuration by code. Pass `{ force: true }` to delete
1393
1574
  * the currently-active config (the server otherwise rejects it).
1394
1575
  */
1395
- async deleteConfig(code, opts = {}, auth2 = SERVICE6) {
1576
+ async deleteConfig(code, opts = {}, auth2 = SERVICE7) {
1396
1577
  await this.ctx.http.request({
1397
1578
  method: "DELETE",
1398
1579
  path: `${this.base()}/config/${encodeURIComponent(code)}`,
@@ -1401,7 +1582,7 @@ var WebhookService = class {
1401
1582
  });
1402
1583
  }
1403
1584
  /** Read delivery statistics over an optional `YYYY-MM` range. */
1404
- async getStatistics(query = {}, auth2 = SERVICE6) {
1585
+ async getStatistics(query = {}, auth2 = SERVICE7) {
1405
1586
  const q = {};
1406
1587
  if (query.fromYearMonth) q.fromYearMonth = query.fromYearMonth;
1407
1588
  if (query.toYearMonth) q.toYearMonth = query.toYearMonth;
@@ -1413,7 +1594,7 @@ var WebhookService = class {
1413
1594
  });
1414
1595
  }
1415
1596
  /** Obtain Svix dashboard access (URL / token). */
1416
- async getDashboardAccess(auth2 = SERVICE6) {
1597
+ async getDashboardAccess(auth2 = SERVICE7) {
1417
1598
  return this.ctx.http.request({
1418
1599
  method: "GET",
1419
1600
  path: `${this.base()}/dashboard-access`,
@@ -1423,7 +1604,10 @@ var WebhookService = class {
1423
1604
  };
1424
1605
 
1425
1606
  // src/services/schema.ts
1426
- var SERVICE7 = { kind: "service" };
1607
+ var SERVICE8 = { kind: "service" };
1608
+ function toJsonBlob(file) {
1609
+ return file instanceof Blob ? file : new Blob([JSON.stringify(file)], { type: "application/json" });
1610
+ }
1427
1611
  var SchemaService = class {
1428
1612
  constructor(ctx) {
1429
1613
  this.ctx = ctx;
@@ -1439,6 +1623,9 @@ var SchemaService = class {
1439
1623
  instancesBase(type) {
1440
1624
  return `${this.entitiesBase()}/${encodeURIComponent(type)}/instances`;
1441
1625
  }
1626
+ referencesBase() {
1627
+ return `/schema/${this.ctx.tenant}/references`;
1628
+ }
1442
1629
  // --- (A) Schemas ---------------------------------------------------------
1443
1630
  /**
1444
1631
  * List schemas, wrapped in the shared {@link PaginatedItems} envelope.
@@ -1446,7 +1633,7 @@ var SchemaService = class {
1446
1633
  * Pagination defaults match the rest of the SDK (`pageNumber: 1`,
1447
1634
  * `pageSize: 60`).
1448
1635
  */
1449
- async listSchemas(query = {}, auth2 = SERVICE7) {
1636
+ async listSchemas(query = {}, auth2 = SERVICE8) {
1450
1637
  const pageNumber = query.pageNumber ?? 1;
1451
1638
  const pageSize = query.pageSize ?? 60;
1452
1639
  const q = { pageNumber, pageSize };
@@ -1461,7 +1648,7 @@ var SchemaService = class {
1461
1648
  return { items, pageNumber, pageSize, hasNextPage: items.length === pageSize };
1462
1649
  }
1463
1650
  /** Retrieve one schema by id. */
1464
- async getSchema(id, auth2 = SERVICE7) {
1651
+ async getSchema(id, auth2 = SERVICE8) {
1465
1652
  return this.ctx.http.request({
1466
1653
  method: "GET",
1467
1654
  path: `${this.schemasBase()}/${encodeURIComponent(id)}`,
@@ -1469,7 +1656,7 @@ var SchemaService = class {
1469
1656
  });
1470
1657
  }
1471
1658
  /** Create a schema. */
1472
- async createSchema(draft, auth2 = SERVICE7) {
1659
+ async createSchema(draft, auth2 = SERVICE8) {
1473
1660
  return this.ctx.http.request({
1474
1661
  method: "POST",
1475
1662
  path: this.schemasBase(),
@@ -1482,7 +1669,7 @@ var SchemaService = class {
1482
1669
  * stale version yields 409 Conflict (propagated as the standard conflict
1483
1670
  * error).
1484
1671
  */
1485
- async updateSchema(id, draft, auth2 = SERVICE7) {
1672
+ async updateSchema(id, draft, auth2 = SERVICE8) {
1486
1673
  return this.ctx.http.request({
1487
1674
  method: "PUT",
1488
1675
  path: `${this.schemasBase()}/${encodeURIComponent(id)}`,
@@ -1491,7 +1678,7 @@ var SchemaService = class {
1491
1678
  });
1492
1679
  }
1493
1680
  /** Delete a schema by id. */
1494
- async deleteSchema(id, auth2 = SERVICE7) {
1681
+ async deleteSchema(id, auth2 = SERVICE8) {
1495
1682
  await this.ctx.http.request({
1496
1683
  method: "DELETE",
1497
1684
  path: `${this.schemasBase()}/${encodeURIComponent(id)}`,
@@ -1502,7 +1689,7 @@ var SchemaService = class {
1502
1689
  * Validate a schema document without persisting it (`POST /schemas/file`).
1503
1690
  * Returns the server's validation result verbatim.
1504
1691
  */
1505
- async validateSchemaFile(body, auth2 = SERVICE7) {
1692
+ async validateSchemaFile(body, auth2 = SERVICE8) {
1506
1693
  return this.ctx.http.request({
1507
1694
  method: "POST",
1508
1695
  path: `${this.schemasBase()}/file`,
@@ -1512,7 +1699,7 @@ var SchemaService = class {
1512
1699
  }
1513
1700
  // --- (B) Types -----------------------------------------------------------
1514
1701
  /** List entity types that currently have at least one schema. */
1515
- async listTypes(auth2 = SERVICE7) {
1702
+ async listTypes(auth2 = SERVICE8) {
1516
1703
  return this.ctx.http.request({
1517
1704
  method: "GET",
1518
1705
  path: `/schema/${this.ctx.tenant}/types`,
@@ -1520,7 +1707,7 @@ var SchemaService = class {
1520
1707
  });
1521
1708
  }
1522
1709
  /** Set the entity types a schema applies to (`PUT /schemas/{id}/types`). */
1523
- async setSchemaTypes(id, types, auth2 = SERVICE7) {
1710
+ async setSchemaTypes(id, types, auth2 = SERVICE8) {
1524
1711
  return this.ctx.http.request({
1525
1712
  method: "PUT",
1526
1713
  path: `${this.schemasBase()}/${encodeURIComponent(id)}/types`,
@@ -1530,7 +1717,7 @@ var SchemaService = class {
1530
1717
  }
1531
1718
  // --- (C) Custom entities -------------------------------------------------
1532
1719
  /** List custom-entity definitions. `expandSchemas` inlines each schema body. */
1533
- async listCustomEntities(opts = {}, auth2 = SERVICE7) {
1720
+ async listCustomEntities(opts = {}, auth2 = SERVICE8) {
1534
1721
  return this.ctx.http.request({
1535
1722
  method: "GET",
1536
1723
  path: this.entitiesBase(),
@@ -1539,7 +1726,7 @@ var SchemaService = class {
1539
1726
  });
1540
1727
  }
1541
1728
  /** Retrieve one custom-entity definition by id. */
1542
- async getCustomEntity(id, auth2 = SERVICE7) {
1729
+ async getCustomEntity(id, auth2 = SERVICE8) {
1543
1730
  return this.ctx.http.request({
1544
1731
  method: "GET",
1545
1732
  path: `${this.entitiesBase()}/${encodeURIComponent(id)}`,
@@ -1547,7 +1734,7 @@ var SchemaService = class {
1547
1734
  });
1548
1735
  }
1549
1736
  /** Create a custom-entity definition. */
1550
- async createCustomEntity(draft, auth2 = SERVICE7) {
1737
+ async createCustomEntity(draft, auth2 = SERVICE8) {
1551
1738
  return this.ctx.http.request({
1552
1739
  method: "POST",
1553
1740
  path: this.entitiesBase(),
@@ -1556,7 +1743,7 @@ var SchemaService = class {
1556
1743
  });
1557
1744
  }
1558
1745
  /** Update a custom-entity definition. */
1559
- async updateCustomEntity(id, draft, auth2 = SERVICE7) {
1746
+ async updateCustomEntity(id, draft, auth2 = SERVICE8) {
1560
1747
  return this.ctx.http.request({
1561
1748
  method: "PUT",
1562
1749
  path: `${this.entitiesBase()}/${encodeURIComponent(id)}`,
@@ -1569,7 +1756,7 @@ var SchemaService = class {
1569
1756
  * instances or schemas still reference it (propagated as the standard
1570
1757
  * conflict error).
1571
1758
  */
1572
- async deleteCustomEntity(id, auth2 = SERVICE7) {
1759
+ async deleteCustomEntity(id, auth2 = SERVICE8) {
1573
1760
  await this.ctx.http.request({
1574
1761
  method: "DELETE",
1575
1762
  path: `${this.entitiesBase()}/${encodeURIComponent(id)}`,
@@ -1581,7 +1768,7 @@ var SchemaService = class {
1581
1768
  * List a custom entity's instances, wrapped in {@link PaginatedItems}.
1582
1769
  * `type` is the custom-entity type and is always the first argument.
1583
1770
  */
1584
- async listInstances(type, query = {}, auth2 = SERVICE7) {
1771
+ async listInstances(type, query = {}, auth2 = SERVICE8) {
1585
1772
  const pageNumber = query.pageNumber ?? 1;
1586
1773
  const pageSize = query.pageSize ?? 60;
1587
1774
  const items = await this.ctx.http.request({
@@ -1593,7 +1780,7 @@ var SchemaService = class {
1593
1780
  return { items, pageNumber, pageSize, hasNextPage: items.length === pageSize };
1594
1781
  }
1595
1782
  /** Retrieve one instance by id. */
1596
- async getInstance(type, id, auth2 = SERVICE7) {
1783
+ async getInstance(type, id, auth2 = SERVICE8) {
1597
1784
  return this.ctx.http.request({
1598
1785
  method: "GET",
1599
1786
  path: `${this.instancesBase(type)}/${encodeURIComponent(id)}`,
@@ -1601,7 +1788,7 @@ var SchemaService = class {
1601
1788
  });
1602
1789
  }
1603
1790
  /** Create an instance of a custom entity. */
1604
- async createInstance(type, draft, auth2 = SERVICE7) {
1791
+ async createInstance(type, draft, auth2 = SERVICE8) {
1605
1792
  return this.ctx.http.request({
1606
1793
  method: "POST",
1607
1794
  path: this.instancesBase(type),
@@ -1610,7 +1797,7 @@ var SchemaService = class {
1610
1797
  });
1611
1798
  }
1612
1799
  /** Replace an instance (full `PUT`). */
1613
- async replaceInstance(type, id, draft, auth2 = SERVICE7) {
1800
+ async replaceInstance(type, id, draft, auth2 = SERVICE8) {
1614
1801
  return this.ctx.http.request({
1615
1802
  method: "PUT",
1616
1803
  path: `${this.instancesBase(type)}/${encodeURIComponent(id)}`,
@@ -1619,7 +1806,7 @@ var SchemaService = class {
1619
1806
  });
1620
1807
  }
1621
1808
  /** Partially update an instance (`PATCH`). */
1622
- async patchInstance(type, id, patch, auth2 = SERVICE7) {
1809
+ async patchInstance(type, id, patch, auth2 = SERVICE8) {
1623
1810
  return this.ctx.http.request({
1624
1811
  method: "PATCH",
1625
1812
  path: `${this.instancesBase(type)}/${encodeURIComponent(id)}`,
@@ -1633,7 +1820,7 @@ var SchemaService = class {
1633
1820
  * a per-item result array — a 207 is success, individual failures live in
1634
1821
  * each item's `code`/`status`.
1635
1822
  */
1636
- async bulkPatchInstances(type, items, auth2 = SERVICE7) {
1823
+ async bulkPatchInstances(type, items, auth2 = SERVICE8) {
1637
1824
  return this.ctx.http.request({
1638
1825
  method: "PATCH",
1639
1826
  path: `${this.instancesBase(type)}/bulk`,
@@ -1641,8 +1828,80 @@ var SchemaService = class {
1641
1828
  body: items
1642
1829
  });
1643
1830
  }
1831
+ /**
1832
+ * Create multiple instances in one request
1833
+ * (`POST /custom-entities/{type}/instances/bulk`). Returns a 207 envelope:
1834
+ * a per-item result array — a 207 is success, individual failures live in
1835
+ * each item's `code`/`status`.
1836
+ */
1837
+ async bulkCreateInstances(type, items, auth2 = SERVICE8) {
1838
+ return this.ctx.http.request({
1839
+ method: "POST",
1840
+ path: `${this.instancesBase(type)}/bulk`,
1841
+ auth: auth2,
1842
+ body: items
1843
+ });
1844
+ }
1845
+ /**
1846
+ * Upsert multiple instances in one request
1847
+ * (`PUT /custom-entities/{type}/instances/bulk`). Each item carries its `id`.
1848
+ * Returns the same 207 per-item envelope as {@link bulkCreateInstances}.
1849
+ */
1850
+ async bulkUpsertInstances(type, items, auth2 = SERVICE8) {
1851
+ return this.ctx.http.request({
1852
+ method: "PUT",
1853
+ path: `${this.instancesBase(type)}/bulk`,
1854
+ auth: auth2,
1855
+ body: items
1856
+ });
1857
+ }
1858
+ /**
1859
+ * Delete multiple instances by id
1860
+ * (`DELETE /custom-entities/{type}/instances/bulk`). Returns the same 207
1861
+ * per-item envelope as {@link bulkCreateInstances}.
1862
+ *
1863
+ * **Note:** the OpenAPI schema declares no request body for this operation,
1864
+ * but its description mandates one — "The IDs of items should be defined in
1865
+ * the request body as an array of strings" (example
1866
+ * `["firstId", "secondId"]`). The SDK follows the description and sends the
1867
+ * id array. Unverified against the live API.
1868
+ */
1869
+ async bulkDeleteInstances(type, ids, auth2 = SERVICE8) {
1870
+ return this.ctx.http.request({
1871
+ method: "DELETE",
1872
+ path: `${this.instancesBase(type)}/bulk`,
1873
+ auth: auth2,
1874
+ body: ids
1875
+ });
1876
+ }
1877
+ /**
1878
+ * Export custom entities and their schemas
1879
+ * (`POST /custom-entities/export`). Pass the entity types to include; the
1880
+ * result carries a base64 `data` payload plus `exportedAt`.
1881
+ */
1882
+ async exportCustomEntities(types, auth2 = SERVICE8) {
1883
+ return this.ctx.http.request({
1884
+ method: "POST",
1885
+ path: `${this.entitiesBase()}/export`,
1886
+ auth: auth2,
1887
+ body: types
1888
+ });
1889
+ }
1890
+ /**
1891
+ * Import custom entities and their schemas
1892
+ * (`POST /custom-entities/import`) from the base64 `data` produced by
1893
+ * {@link exportCustomEntities}.
1894
+ */
1895
+ async importCustomEntities(input, auth2 = SERVICE8) {
1896
+ await this.ctx.http.request({
1897
+ method: "POST",
1898
+ path: `${this.entitiesBase()}/import`,
1899
+ auth: auth2,
1900
+ body: input
1901
+ });
1902
+ }
1644
1903
  /** Delete an instance by id. */
1645
- async deleteInstance(type, id, auth2 = SERVICE7) {
1904
+ async deleteInstance(type, id, auth2 = SERVICE8) {
1646
1905
  await this.ctx.http.request({
1647
1906
  method: "DELETE",
1648
1907
  path: `${this.instancesBase(type)}/${encodeURIComponent(id)}`,
@@ -1653,7 +1912,7 @@ var SchemaService = class {
1653
1912
  * Structured search over a custom entity's instances
1654
1913
  * (`POST /instances/search`), wrapped in {@link PaginatedItems}.
1655
1914
  */
1656
- async searchInstances(type, body, auth2 = SERVICE7) {
1915
+ async searchInstances(type, body, auth2 = SERVICE8) {
1657
1916
  const items = await this.ctx.http.request({
1658
1917
  method: "POST",
1659
1918
  path: `${this.instancesBase(type)}/search`,
@@ -1662,10 +1921,84 @@ var SchemaService = class {
1662
1921
  });
1663
1922
  return { items, pageNumber: 1, pageSize: items.length, hasNextPage: false };
1664
1923
  }
1924
+ // --- (E) References ------------------------------------------------------
1925
+ /**
1926
+ * Reference entities (`/references`) — a schema plus an uploaded JSON file.
1927
+ * Create/update are `multipart/form-data` (parts `file` and `body`), like
1928
+ * the media service's blob upload. Default auth: service.
1929
+ */
1930
+ references = {
1931
+ /**
1932
+ * List references, wrapped in {@link PaginatedItems}. Pagination defaults
1933
+ * match the rest of this service (`pageNumber: 1`, `pageSize: 60`).
1934
+ */
1935
+ list: async (query = {}, auth2 = SERVICE8) => {
1936
+ const pageNumber = query.pageNumber ?? 1;
1937
+ const pageSize = query.pageSize ?? 60;
1938
+ const q = { pageNumber, pageSize };
1939
+ if (query.sort) q.sort = query.sort;
1940
+ if (query.q) q.q = query.q;
1941
+ if (query.fields) q.fields = query.fields;
1942
+ if (query.type) q.type = query.type;
1943
+ const items = await this.ctx.http.request({
1944
+ method: "GET",
1945
+ path: this.referencesBase(),
1946
+ auth: auth2,
1947
+ query: q
1948
+ });
1949
+ return { items, pageNumber, pageSize, hasNextPage: items.length === pageSize };
1950
+ },
1951
+ /** Retrieve one reference by id. */
1952
+ get: async (id, auth2 = SERVICE8) => this.ctx.http.request({
1953
+ method: "GET",
1954
+ path: `${this.referencesBase()}/${encodeURIComponent(id)}`,
1955
+ auth: auth2
1956
+ }),
1957
+ /**
1958
+ * Create a reference. `file` is the reference's JSON content — pass a
1959
+ * `Blob` to upload as-is, or a plain object to have it serialized into a
1960
+ * JSON blob. `body` carries the metadata.
1961
+ */
1962
+ create: async (input, auth2 = SERVICE8) => {
1963
+ const fd = new FormData();
1964
+ fd.set("file", toJsonBlob(input.file));
1965
+ fd.set("body", JSON.stringify(input.body));
1966
+ return this.ctx.http.request({
1967
+ method: "POST",
1968
+ path: this.referencesBase(),
1969
+ auth: auth2,
1970
+ body: fd
1971
+ });
1972
+ },
1973
+ /**
1974
+ * Update a reference (multipart, like {@link create}). `options.version`
1975
+ * enables optimistic locking — the server answers 409 on a stale version.
1976
+ */
1977
+ update: async (id, input, options = {}, auth2 = SERVICE8) => {
1978
+ const fd = new FormData();
1979
+ fd.set("file", toJsonBlob(input.file));
1980
+ fd.set("body", JSON.stringify(input.body));
1981
+ await this.ctx.http.request({
1982
+ method: "PUT",
1983
+ path: `${this.referencesBase()}/${encodeURIComponent(id)}`,
1984
+ ...options.version === void 0 ? {} : { query: { version: options.version } },
1985
+ auth: auth2,
1986
+ body: fd
1987
+ });
1988
+ },
1989
+ /** Delete a reference by id. */
1990
+ delete: async (id, auth2 = SERVICE8) => {
1991
+ await this.ctx.http.request({
1992
+ method: "DELETE",
1993
+ path: `${this.referencesBase()}/${encodeURIComponent(id)}`,
1994
+ auth: auth2
1995
+ });
1996
+ }
1997
+ };
1665
1998
  };
1666
1999
 
1667
2000
  // src/services/ai-resources.ts
1668
- var SERVICE8 = { kind: "service" };
2001
+ var SERVICE9 = { kind: "service" };
1669
2002
  var AgenticCrudResource = class {
1670
2003
  constructor(ctx, path) {
1671
2004
  this.ctx = ctx;
@@ -1677,15 +2010,15 @@ var AgenticCrudResource = class {
1677
2010
  return `${this.path}/${encodeURIComponent(id)}`;
1678
2011
  }
1679
2012
  /** List the collection (`GET {path}`). Optional `q`/paging/sort/fields/expand. */
1680
- list(query = {}, auth2 = SERVICE8) {
2013
+ list(query = {}, auth2 = SERVICE9) {
1681
2014
  return this.ctx.http.request({ method: "GET", path: this.path, auth: auth2, query: { ...query } });
1682
2015
  }
1683
2016
  /** Structured search (`POST {path}/search`). Body is `{ q? }`. */
1684
- search(query, auth2 = SERVICE8) {
2017
+ search(query, auth2 = SERVICE9) {
1685
2018
  return this.ctx.http.request({ method: "POST", path: `${this.path}/search`, auth: auth2, body: query });
1686
2019
  }
1687
2020
  /** Retrieve one entry by id (`GET {path}/{id}`). */
1688
- get(id, opts = {}, auth2 = SERVICE8) {
2021
+ get(id, opts = {}, auth2 = SERVICE9) {
1689
2022
  return this.ctx.http.request({ method: "GET", path: this.item(id), auth: auth2, query: { ...opts } });
1690
2023
  }
1691
2024
  /**
@@ -1693,7 +2026,7 @@ var AgenticCrudResource = class {
1693
2026
  * (HTTP 201) and `undefined` on update (HTTP 204). `{ force: true }`
1694
2027
  * cascade-disables dependents.
1695
2028
  */
1696
- upsert(id, body, opts = {}, auth2 = SERVICE8) {
2029
+ upsert(id, body, opts = {}, auth2 = SERVICE9) {
1697
2030
  return this.ctx.http.request({
1698
2031
  method: "PUT",
1699
2032
  path: this.item(id),
@@ -1706,11 +2039,11 @@ var AgenticCrudResource = class {
1706
2039
  * Partial update with an op array (`PATCH {path}/{id}`, 204). `ops` use the
1707
2040
  * upstream UPPERCASE enum (`ADD | REMOVE | REPLACE`), sent verbatim.
1708
2041
  */
1709
- async patch(id, ops, auth2 = SERVICE8) {
2042
+ async patch(id, ops, auth2 = SERVICE9) {
1710
2043
  await this.ctx.http.request({ method: "PATCH", path: this.item(id), auth: auth2, body: ops });
1711
2044
  }
1712
2045
  /** Delete by id (`DELETE {path}/{id}`). `{ force: true }` removes even if referenced. */
1713
- async delete(id, opts = {}, auth2 = SERVICE8) {
2046
+ async delete(id, opts = {}, auth2 = SERVICE9) {
1714
2047
  await this.ctx.http.request({
1715
2048
  method: "DELETE",
1716
2049
  path: this.item(id),
@@ -1727,19 +2060,19 @@ var JobsResource = class {
1727
2060
  ctx;
1728
2061
  base;
1729
2062
  /** List jobs (`GET /jobs`). */
1730
- list(query = {}, auth2 = SERVICE8) {
2063
+ list(query = {}, auth2 = SERVICE9) {
1731
2064
  return this.ctx.http.request({ method: "GET", path: `${this.base}/jobs`, auth: auth2, query: { ...query } });
1732
2065
  }
1733
2066
  /** Structured job search (`POST /jobs/search`). */
1734
- search(query, auth2 = SERVICE8) {
2067
+ search(query, auth2 = SERVICE9) {
1735
2068
  return this.ctx.http.request({ method: "POST", path: `${this.base}/jobs/search`, auth: auth2, body: query });
1736
2069
  }
1737
2070
  /** Retrieve one job (`GET /jobs/{jobId}`). */
1738
- get(jobId, auth2 = SERVICE8) {
2071
+ get(jobId, auth2 = SERVICE9) {
1739
2072
  return this.ctx.http.request({ method: "GET", path: `${this.base}/jobs/${encodeURIComponent(jobId)}`, auth: auth2 });
1740
2073
  }
1741
2074
  /** Delete one job (`DELETE /jobs/{jobId}`). */
1742
- async delete(jobId, auth2 = SERVICE8) {
2075
+ async delete(jobId, auth2 = SERVICE9) {
1743
2076
  await this.ctx.http.request({ method: "DELETE", path: `${this.base}/jobs/${encodeURIComponent(jobId)}`, auth: auth2 });
1744
2077
  }
1745
2078
  };
@@ -1751,11 +2084,11 @@ var TemplatesResource = class {
1751
2084
  ctx;
1752
2085
  path;
1753
2086
  /** List available templates (`GET /agentic/templates`). */
1754
- list(query = {}, auth2 = SERVICE8) {
2087
+ list(query = {}, auth2 = SERVICE9) {
1755
2088
  return this.ctx.http.request({ method: "GET", path: this.path, auth: auth2, query: { ...query } });
1756
2089
  }
1757
2090
  /** Structured template search (`POST /agentic/templates/search`). */
1758
- search(query, auth2 = SERVICE8) {
2091
+ search(query, auth2 = SERVICE9) {
1759
2092
  return this.ctx.http.request({ method: "POST", path: `${this.path}/search`, auth: auth2, body: query });
1760
2093
  }
1761
2094
  /**
@@ -1763,7 +2096,7 @@ var TemplatesResource = class {
1763
2096
  * (`POST /agentic/templates/{templateId}/agents`, HTTP 201). Returns the
1764
2097
  * created agent's id.
1765
2098
  */
1766
- clone(templateId, body, auth2 = SERVICE8) {
2099
+ clone(templateId, body, auth2 = SERVICE9) {
1767
2100
  return this.ctx.http.request({
1768
2101
  method: "POST",
1769
2102
  path: `${this.path}/${encodeURIComponent(templateId)}/agents`,
@@ -1780,27 +2113,27 @@ var LogsResource = class {
1780
2113
  ctx;
1781
2114
  path;
1782
2115
  /** List request logs (`GET /agentic/logs/requests`). */
1783
- listRequests(query = {}, auth2 = SERVICE8) {
2116
+ listRequests(query = {}, auth2 = SERVICE9) {
1784
2117
  return this.ctx.http.request({ method: "GET", path: `${this.path}/requests`, auth: auth2, query: { ...query } });
1785
2118
  }
1786
2119
  /** Retrieve one request log (`GET /agentic/logs/requests/{requestId}`). */
1787
- getRequest(requestId, auth2 = SERVICE8) {
2120
+ getRequest(requestId, auth2 = SERVICE9) {
1788
2121
  return this.ctx.http.request({ method: "GET", path: `${this.path}/requests/${encodeURIComponent(requestId)}`, auth: auth2 });
1789
2122
  }
1790
2123
  /** Structured request-log search (`POST /agentic/logs/requests/search`). */
1791
- searchRequests(query, auth2 = SERVICE8) {
2124
+ searchRequests(query, auth2 = SERVICE9) {
1792
2125
  return this.ctx.http.request({ method: "POST", path: `${this.path}/requests/search`, auth: auth2, body: query });
1793
2126
  }
1794
2127
  /** List session logs (`GET /agentic/logs/sessions`). */
1795
- listSessions(query = {}, auth2 = SERVICE8) {
2128
+ listSessions(query = {}, auth2 = SERVICE9) {
1796
2129
  return this.ctx.http.request({ method: "GET", path: `${this.path}/sessions`, auth: auth2, query: { ...query } });
1797
2130
  }
1798
2131
  /** Retrieve one session log (`GET /agentic/logs/sessions/{sessionId}`). */
1799
- getSession(sessionId, auth2 = SERVICE8) {
2132
+ getSession(sessionId, auth2 = SERVICE9) {
1800
2133
  return this.ctx.http.request({ method: "GET", path: `${this.path}/sessions/${encodeURIComponent(sessionId)}`, auth: auth2 });
1801
2134
  }
1802
2135
  /** Structured session-log search (`POST /agentic/logs/sessions/search`). */
1803
- searchSessions(query, auth2 = SERVICE8) {
2136
+ searchSessions(query, auth2 = SERVICE9) {
1804
2137
  return this.ctx.http.request({ method: "POST", path: `${this.path}/sessions/search`, auth: auth2, body: query });
1805
2138
  }
1806
2139
  };
@@ -1812,17 +2145,17 @@ var AnalyticsResource = class {
1812
2145
  ctx;
1813
2146
  path;
1814
2147
  /** Aggregated metrics (`GET /agentic/analytics`); scope with `agentId`. */
1815
- get(opts = {}, auth2 = SERVICE8) {
2148
+ get(opts = {}, auth2 = SERVICE9) {
1816
2149
  return this.ctx.http.request({ method: "GET", path: this.path, auth: auth2, query: { ...opts } });
1817
2150
  }
1818
2151
  /** Per-agent execution counts (`GET /agentic/analytics/executions`). `agentIds` required. */
1819
- executions(query, auth2 = SERVICE8) {
2152
+ executions(query, auth2 = SERVICE9) {
1820
2153
  return this.ctx.http.request({ method: "GET", path: `${this.path}/executions`, auth: auth2, query: { ...query } });
1821
2154
  }
1822
2155
  };
1823
2156
 
1824
2157
  // src/services/ai.ts
1825
- var SERVICE9 = { kind: "service" };
2158
+ var SERVICE10 = { kind: "service" };
1826
2159
  var AiService = class {
1827
2160
  constructor(ctx) {
1828
2161
  this.ctx = ctx;
@@ -1874,7 +2207,7 @@ var AiService = class {
1874
2207
  return this._analytics ??= new AnalyticsResource(this.ctx, `${this.base()}/agentic/analytics`);
1875
2208
  }
1876
2209
  /** Generate text from a single prompt (`POST /texts`). Honors `maxTokens`. */
1877
- async generateText(input, auth2 = SERVICE9) {
2210
+ async generateText(input, auth2 = SERVICE10) {
1878
2211
  return this.ctx.http.request({
1879
2212
  method: "POST",
1880
2213
  path: `${this.base()}/texts`,
@@ -1883,7 +2216,7 @@ var AiService = class {
1883
2216
  });
1884
2217
  }
1885
2218
  /** Run a chat completion over a message list (`POST /completions`). No `maxTokens`. */
1886
- async complete(input, auth2 = SERVICE9) {
2219
+ async complete(input, auth2 = SERVICE10) {
1887
2220
  return this.ctx.http.request({
1888
2221
  method: "POST",
1889
2222
  path: `${this.base()}/completions`,
@@ -1892,7 +2225,7 @@ var AiService = class {
1892
2225
  });
1893
2226
  }
1894
2227
  /** List all agentic agents. */
1895
- async listAgents(auth2 = SERVICE9) {
2228
+ async listAgents(auth2 = SERVICE10) {
1896
2229
  return this.ctx.http.request({
1897
2230
  method: "GET",
1898
2231
  path: `${this.base()}/agentic/agents`,
@@ -1900,7 +2233,7 @@ var AiService = class {
1900
2233
  });
1901
2234
  }
1902
2235
  /** Retrieve one agent by id. */
1903
- async getAgent(id, auth2 = SERVICE9) {
2236
+ async getAgent(id, auth2 = SERVICE10) {
1904
2237
  return this.ctx.http.request({
1905
2238
  method: "GET",
1906
2239
  path: `${this.base()}/agentic/agents/${encodeURIComponent(id)}`,
@@ -1908,7 +2241,7 @@ var AiService = class {
1908
2241
  });
1909
2242
  }
1910
2243
  /** Create-or-replace an agent by id (`PUT`). Takes the agent write shape. */
1911
- async upsertAgent(id, agent, auth2 = SERVICE9) {
2244
+ async upsertAgent(id, agent, auth2 = SERVICE10) {
1912
2245
  return this.ctx.http.request({
1913
2246
  method: "PUT",
1914
2247
  path: `${this.base()}/agentic/agents/${encodeURIComponent(id)}`,
@@ -1921,7 +2254,7 @@ var AiService = class {
1921
2254
  * UPPERCASE enum (`ADD | REMOVE | REPLACE`) and are sent verbatim — this is
1922
2255
  * NOT RFC-6902 JSON-Patch.
1923
2256
  */
1924
- async patchAgent(id, ops, auth2 = SERVICE9) {
2257
+ async patchAgent(id, ops, auth2 = SERVICE10) {
1925
2258
  return this.ctx.http.request({
1926
2259
  method: "PATCH",
1927
2260
  path: `${this.base()}/agentic/agents/${encodeURIComponent(id)}`,
@@ -1933,7 +2266,7 @@ var AiService = class {
1933
2266
  * Delete an agent by id. Pass `{ force: true }` to delete an agent that is
1934
2267
  * still referenced elsewhere (`?force=true`).
1935
2268
  */
1936
- async deleteAgent(id, auth2 = SERVICE9, opts = {}) {
2269
+ async deleteAgent(id, auth2 = SERVICE10, opts = {}) {
1937
2270
  await this.ctx.http.request({
1938
2271
  method: "DELETE",
1939
2272
  path: `${this.base()}/agentic/agents/${encodeURIComponent(id)}`,
@@ -1942,7 +2275,7 @@ var AiService = class {
1942
2275
  });
1943
2276
  }
1944
2277
  /** Server-side agent search (`POST /agentic/agents/search`). */
1945
- async searchAgents(query, auth2 = SERVICE9) {
2278
+ async searchAgents(query, auth2 = SERVICE10) {
1946
2279
  return this.ctx.http.request({
1947
2280
  method: "POST",
1948
2281
  path: `${this.base()}/agentic/agents/search`,
@@ -1954,7 +2287,7 @@ var AiService = class {
1954
2287
  * Synchronous agent chat (`POST /agentic/chat`). Returns the response
1955
2288
  * ARRAY verbatim (the upstream contract is an array, not a single object).
1956
2289
  */
1957
- async chat(input, auth2 = SERVICE9) {
2290
+ async chat(input, auth2 = SERVICE10) {
1958
2291
  return this.ctx.http.request({
1959
2292
  method: "POST",
1960
2293
  path: `${this.base()}/agentic/chat`,
@@ -1966,7 +2299,7 @@ var AiService = class {
1966
2299
  * Fire-and-forget agent chat (`POST /agentic/chat-async`, HTTP 201).
1967
2300
  * Returns the job-id ARRAY verbatim.
1968
2301
  */
1969
- async chatAsync(input, auth2 = SERVICE9) {
2302
+ async chatAsync(input, auth2 = SERVICE10) {
1970
2303
  return this.ctx.http.request({
1971
2304
  method: "POST",
1972
2305
  path: `${this.base()}/agentic/chat-async`,
@@ -1980,7 +2313,7 @@ var AiService = class {
1980
2313
  * stream body as an opaque string, so chunks are raw strings, not parsed
1981
2314
  * objects. Consume with `for await`.
1982
2315
  */
1983
- async *chatStream(input, opts = {}, auth2 = SERVICE9) {
2316
+ async *chatStream(input, opts = {}, auth2 = SERVICE10) {
1984
2317
  const events = this.ctx.http.requestStream({
1985
2318
  method: "POST",
1986
2319
  path: `${this.base()}/agentic/chat-stream`,
@@ -1991,7 +2324,7 @@ var AiService = class {
1991
2324
  for await (const ev of events) yield ev.data;
1992
2325
  }
1993
2326
  /** List stored agentic conversations (`GET /agentic/conversations`). */
1994
- async listConversations(auth2 = SERVICE9) {
2327
+ async listConversations(auth2 = SERVICE10) {
1995
2328
  return this.ctx.http.request({
1996
2329
  method: "GET",
1997
2330
  path: `${this.base()}/agentic/conversations`,
@@ -1999,7 +2332,7 @@ var AiService = class {
1999
2332
  });
2000
2333
  }
2001
2334
  /** Server-side conversation search (`POST /agentic/conversations/search`). */
2002
- async searchConversations(query, auth2 = SERVICE9) {
2335
+ async searchConversations(query, auth2 = SERVICE10) {
2003
2336
  return this.ctx.http.request({
2004
2337
  method: "POST",
2005
2338
  path: `${this.base()}/agentic/conversations/search`,
@@ -2009,7 +2342,7 @@ var AiService = class {
2009
2342
  }
2010
2343
  // --- Standalone agentic reads / bulk operations ------------------------
2011
2344
  /** List models available to the tenant, grouped by provider (`GET /agentic/models`). */
2012
- async listModels(auth2 = SERVICE9) {
2345
+ async listModels(auth2 = SERVICE10) {
2013
2346
  return this.ctx.http.request({
2014
2347
  method: "GET",
2015
2348
  path: `${this.base()}/agentic/models`,
@@ -2017,7 +2350,7 @@ var AiService = class {
2017
2350
  });
2018
2351
  }
2019
2352
  /** List commerce events available to agent triggers (`GET /agentic/commerce-events`). */
2020
- async listCommerceEvents(auth2 = SERVICE9) {
2353
+ async listCommerceEvents(auth2 = SERVICE10) {
2021
2354
  return this.ctx.http.request({
2022
2355
  method: "GET",
2023
2356
  path: `${this.base()}/agentic/commerce-events`,
@@ -2030,7 +2363,7 @@ var AiService = class {
2030
2363
  * `sessionId` must be threaded into subsequent chat calls to bind the file.
2031
2364
  * Pass `opts.sessionId` to attach to an existing session.
2032
2365
  */
2033
- async uploadAttachment(agentId, attachment, opts = {}, auth2 = SERVICE9) {
2366
+ async uploadAttachment(agentId, attachment, opts = {}, auth2 = SERVICE10) {
2034
2367
  const form = new FormData();
2035
2368
  form.append("attachment", attachment);
2036
2369
  return this.ctx.http.request({
@@ -2042,7 +2375,7 @@ var AiService = class {
2042
2375
  });
2043
2376
  }
2044
2377
  /** Export agents + components as a base64/checksum blob (`POST /agentic/agents/export`). */
2045
- async exportAgents(body, auth2 = SERVICE9) {
2378
+ async exportAgents(body, auth2 = SERVICE10) {
2046
2379
  return this.ctx.http.request({
2047
2380
  method: "POST",
2048
2381
  path: `${this.base()}/agentic/agents/export`,
@@ -2051,7 +2384,7 @@ var AiService = class {
2051
2384
  });
2052
2385
  }
2053
2386
  /** Import previously-exported agents (`POST /agentic/agents/import`). */
2054
- async importAgents(body, auth2 = SERVICE9) {
2387
+ async importAgents(body, auth2 = SERVICE10) {
2055
2388
  return this.ctx.http.request({
2056
2389
  method: "POST",
2057
2390
  path: `${this.base()}/agentic/agents/import`,
@@ -2062,7 +2395,7 @@ var AiService = class {
2062
2395
  };
2063
2396
 
2064
2397
  // src/services/tax.ts
2065
- var SERVICE10 = { kind: "service" };
2398
+ var SERVICE11 = { kind: "service" };
2066
2399
  var TaxService = class {
2067
2400
  constructor(ctx) {
2068
2401
  this.ctx = ctx;
@@ -2073,7 +2406,7 @@ var TaxService = class {
2073
2406
  return `/tax/${this.ctx.tenant}`;
2074
2407
  }
2075
2408
  /** List all per-location tax configurations. */
2076
- async listTaxConfigs(auth2 = SERVICE10) {
2409
+ async listTaxConfigs(auth2 = SERVICE11) {
2077
2410
  return this.ctx.http.request({
2078
2411
  method: "GET",
2079
2412
  path: `${this.base()}/taxes`,
@@ -2081,7 +2414,7 @@ var TaxService = class {
2081
2414
  });
2082
2415
  }
2083
2416
  /** Retrieve one tax configuration by its location (country) code. */
2084
- async getTaxConfig(locationCode, auth2 = SERVICE10) {
2417
+ async getTaxConfig(locationCode, auth2 = SERVICE11) {
2085
2418
  return this.ctx.http.request({
2086
2419
  method: "GET",
2087
2420
  path: `${this.base()}/taxes/${encodeURIComponent(locationCode)}`,
@@ -2089,7 +2422,7 @@ var TaxService = class {
2089
2422
  });
2090
2423
  }
2091
2424
  /** Create a tax configuration (`POST`). Returns the created `{ locationCode }`. */
2092
- async createTaxConfig(input, auth2 = SERVICE10) {
2425
+ async createTaxConfig(input, auth2 = SERVICE11) {
2093
2426
  return this.ctx.http.request({
2094
2427
  method: "POST",
2095
2428
  path: `${this.base()}/taxes`,
@@ -2101,7 +2434,7 @@ var TaxService = class {
2101
2434
  * Update a tax configuration by location code (`PUT`). `metadata.version` is
2102
2435
  * required (optimistic locking — a stale version yields 409).
2103
2436
  */
2104
- async updateTaxConfig(locationCode, input, auth2 = SERVICE10) {
2437
+ async updateTaxConfig(locationCode, input, auth2 = SERVICE11) {
2105
2438
  return this.ctx.http.request({
2106
2439
  method: "PUT",
2107
2440
  path: `${this.base()}/taxes/${encodeURIComponent(locationCode)}`,
@@ -2110,7 +2443,7 @@ var TaxService = class {
2110
2443
  });
2111
2444
  }
2112
2445
  /** Delete a tax configuration by location code. */
2113
- async deleteTaxConfig(locationCode, auth2 = SERVICE10) {
2446
+ async deleteTaxConfig(locationCode, auth2 = SERVICE11) {
2114
2447
  await this.ctx.http.request({
2115
2448
  method: "DELETE",
2116
2449
  path: `${this.base()}/taxes/${encodeURIComponent(locationCode)}`,
@@ -2121,7 +2454,7 @@ var TaxService = class {
2121
2454
  * Calculate net/gross values for a price (`PUT /taxes/calculation-commands`).
2122
2455
  * Single command in, single result out.
2123
2456
  */
2124
- async calculateTax(request, auth2 = SERVICE10) {
2457
+ async calculateTax(request, auth2 = SERVICE11) {
2125
2458
  return this.ctx.http.request({
2126
2459
  method: "PUT",
2127
2460
  path: `${this.base()}/taxes/calculation-commands`,
@@ -2132,7 +2465,7 @@ var TaxService = class {
2132
2465
  };
2133
2466
 
2134
2467
  // src/services/coupon.ts
2135
- var SERVICE11 = { kind: "service" };
2468
+ var SERVICE12 = { kind: "service" };
2136
2469
  var CouponService = class {
2137
2470
  constructor(ctx) {
2138
2471
  this.ctx = ctx;
@@ -2143,7 +2476,7 @@ var CouponService = class {
2143
2476
  return `/coupon/${this.ctx.tenant}`;
2144
2477
  }
2145
2478
  /** List coupons by criteria. Returns a plain array. */
2146
- async listCoupons(query = {}, auth2 = SERVICE11) {
2479
+ async listCoupons(query = {}, auth2 = SERVICE12) {
2147
2480
  return this.ctx.http.request({
2148
2481
  method: "GET",
2149
2482
  path: `${this.base()}/coupons`,
@@ -2152,7 +2485,7 @@ var CouponService = class {
2152
2485
  });
2153
2486
  }
2154
2487
  /** Retrieve one coupon by code. */
2155
- async getCoupon(code, auth2 = SERVICE11) {
2488
+ async getCoupon(code, auth2 = SERVICE12) {
2156
2489
  return this.ctx.http.request({
2157
2490
  method: "GET",
2158
2491
  path: `${this.base()}/coupons/${encodeURIComponent(code)}`,
@@ -2160,7 +2493,7 @@ var CouponService = class {
2160
2493
  });
2161
2494
  }
2162
2495
  /** Create a coupon (`POST`, HTTP 201). Returns the created resource's `{ id?, yrn? }`. */
2163
- async createCoupon(input, auth2 = SERVICE11) {
2496
+ async createCoupon(input, auth2 = SERVICE12) {
2164
2497
  return this.ctx.http.request({
2165
2498
  method: "POST",
2166
2499
  path: `${this.base()}/coupons`,
@@ -2169,7 +2502,7 @@ var CouponService = class {
2169
2502
  });
2170
2503
  }
2171
2504
  /** Replace a coupon by code (`PUT`). Resolves once the update is accepted. */
2172
- async updateCoupon(code, input, auth2 = SERVICE11) {
2505
+ async updateCoupon(code, input, auth2 = SERVICE12) {
2173
2506
  await this.ctx.http.request({
2174
2507
  method: "PUT",
2175
2508
  path: `${this.base()}/coupons/${encodeURIComponent(code)}`,
@@ -2178,7 +2511,7 @@ var CouponService = class {
2178
2511
  });
2179
2512
  }
2180
2513
  /** Partially update a coupon by code (`PATCH` merge body). */
2181
- async patchCoupon(code, patch, auth2 = SERVICE11) {
2514
+ async patchCoupon(code, patch, auth2 = SERVICE12) {
2182
2515
  await this.ctx.http.request({
2183
2516
  method: "PATCH",
2184
2517
  path: `${this.base()}/coupons/${encodeURIComponent(code)}`,
@@ -2187,7 +2520,7 @@ var CouponService = class {
2187
2520
  });
2188
2521
  }
2189
2522
  /** Delete a coupon by code. */
2190
- async deleteCoupon(code, auth2 = SERVICE11) {
2523
+ async deleteCoupon(code, auth2 = SERVICE12) {
2191
2524
  await this.ctx.http.request({
2192
2525
  method: "DELETE",
2193
2526
  path: `${this.base()}/coupons/${encodeURIComponent(code)}`,
@@ -2198,7 +2531,7 @@ var CouponService = class {
2198
2531
  * Check whether a coupon can be redeemed (`POST /validation`). Resolves when
2199
2532
  * redeemable; throws an `EmporixError` otherwise (no response body).
2200
2533
  */
2201
- async validateCoupon(code, redemption, auth2 = SERVICE11) {
2534
+ async validateCoupon(code, redemption, auth2 = SERVICE12) {
2202
2535
  await this.ctx.http.request({
2203
2536
  method: "POST",
2204
2537
  path: `${this.base()}/coupons/${encodeURIComponent(code)}/validation`,
@@ -2207,7 +2540,7 @@ var CouponService = class {
2207
2540
  });
2208
2541
  }
2209
2542
  /** List a coupon's redemptions by criteria. */
2210
- async listRedemptions(code, query = {}, auth2 = SERVICE11) {
2543
+ async listRedemptions(code, query = {}, auth2 = SERVICE12) {
2211
2544
  return this.ctx.http.request({
2212
2545
  method: "GET",
2213
2546
  path: `${this.base()}/coupons/${encodeURIComponent(code)}/redemptions`,
@@ -2216,7 +2549,7 @@ var CouponService = class {
2216
2549
  });
2217
2550
  }
2218
2551
  /** Redeem a coupon by creating a redemption (`POST`, HTTP 201). Returns the resource location. */
2219
- async redeemCoupon(code, redemption, auth2 = SERVICE11) {
2552
+ async redeemCoupon(code, redemption, auth2 = SERVICE12) {
2220
2553
  return this.ctx.http.request({
2221
2554
  method: "POST",
2222
2555
  path: `${this.base()}/coupons/${encodeURIComponent(code)}/redemptions`,
@@ -2225,7 +2558,7 @@ var CouponService = class {
2225
2558
  });
2226
2559
  }
2227
2560
  /** Retrieve one redemption by id. */
2228
- async getRedemption(code, id, auth2 = SERVICE11) {
2561
+ async getRedemption(code, id, auth2 = SERVICE12) {
2229
2562
  return this.ctx.http.request({
2230
2563
  method: "GET",
2231
2564
  path: `${this.base()}/coupons/${encodeURIComponent(code)}/redemptions/${encodeURIComponent(id)}`,
@@ -2233,7 +2566,7 @@ var CouponService = class {
2233
2566
  });
2234
2567
  }
2235
2568
  /** Delete a redemption by id. */
2236
- async deleteRedemption(code, id, auth2 = SERVICE11) {
2569
+ async deleteRedemption(code, id, auth2 = SERVICE12) {
2237
2570
  await this.ctx.http.request({
2238
2571
  method: "DELETE",
2239
2572
  path: `${this.base()}/coupons/${encodeURIComponent(code)}/redemptions/${encodeURIComponent(id)}`,
@@ -2241,7 +2574,7 @@ var CouponService = class {
2241
2574
  });
2242
2575
  }
2243
2576
  /** Retrieve a customer's referral coupon (resolves to an empty body when none exists). */
2244
- async getReferralCoupon(customerNumber, auth2 = SERVICE11) {
2577
+ async getReferralCoupon(customerNumber, auth2 = SERVICE12) {
2245
2578
  return this.ctx.http.request({
2246
2579
  method: "GET",
2247
2580
  path: `${this.base()}/referral-coupons/${encodeURIComponent(customerNumber)}`,
@@ -2249,7 +2582,7 @@ var CouponService = class {
2249
2582
  });
2250
2583
  }
2251
2584
  /** Create a referral coupon code for a customer (no request body). */
2252
- async createReferralCoupon(customerNumber, auth2 = SERVICE11) {
2585
+ async createReferralCoupon(customerNumber, auth2 = SERVICE12) {
2253
2586
  return this.ctx.http.request({
2254
2587
  method: "POST",
2255
2588
  path: `${this.base()}/referral-coupons/${encodeURIComponent(customerNumber)}`,
@@ -2259,7 +2592,7 @@ var CouponService = class {
2259
2592
  };
2260
2593
 
2261
2594
  // src/services/reward-points.ts
2262
- var SERVICE12 = { kind: "service" };
2595
+ var SERVICE13 = { kind: "service" };
2263
2596
  var RewardPointsService = class {
2264
2597
  constructor(ctx) {
2265
2598
  this.ctx = ctx;
@@ -2276,7 +2609,7 @@ var RewardPointsService = class {
2276
2609
  }
2277
2610
  // --- Admin: customer points management (service token) ---
2278
2611
  /** Batch summary across all customers. */
2279
- async listAllSummaries(query = {}, auth2 = SERVICE12) {
2612
+ async listAllSummaries(query = {}, auth2 = SERVICE13) {
2280
2613
  return this.ctx.http.request({
2281
2614
  method: "GET",
2282
2615
  path: `${this.base()}/summaryBatch`,
@@ -2285,7 +2618,7 @@ var RewardPointsService = class {
2285
2618
  });
2286
2619
  }
2287
2620
  /** Retrieve one customer's reward-points balance. */
2288
- async getCustomerPoints(customerId, auth2 = SERVICE12) {
2621
+ async getCustomerPoints(customerId, auth2 = SERVICE13) {
2289
2622
  return this.ctx.http.request({
2290
2623
  method: "GET",
2291
2624
  path: `${this.base()}/customer/${encodeURIComponent(customerId)}`,
@@ -2293,7 +2626,7 @@ var RewardPointsService = class {
2293
2626
  });
2294
2627
  }
2295
2628
  /** Create a reward-points entry for a customer. */
2296
- async createCustomerPoints(customerId, input, auth2 = SERVICE12) {
2629
+ async createCustomerPoints(customerId, input, auth2 = SERVICE13) {
2297
2630
  await this.ctx.http.request({
2298
2631
  method: "POST",
2299
2632
  path: `${this.base()}/customer/${encodeURIComponent(customerId)}`,
@@ -2302,7 +2635,7 @@ var RewardPointsService = class {
2302
2635
  });
2303
2636
  }
2304
2637
  /** Delete a customer's reward points. */
2305
- async deleteCustomerPoints(customerId, auth2 = SERVICE12) {
2638
+ async deleteCustomerPoints(customerId, auth2 = SERVICE13) {
2306
2639
  await this.ctx.http.request({
2307
2640
  method: "DELETE",
2308
2641
  path: `${this.base()}/customer/${encodeURIComponent(customerId)}`,
@@ -2310,7 +2643,7 @@ var RewardPointsService = class {
2310
2643
  });
2311
2644
  }
2312
2645
  /** Retrieve a reward-points summary for one customer. */
2313
- async getCustomerSummary(customerId, auth2 = SERVICE12) {
2646
+ async getCustomerSummary(customerId, auth2 = SERVICE13) {
2314
2647
  return this.ctx.http.request({
2315
2648
  method: "GET",
2316
2649
  path: `${this.base()}/customer/${encodeURIComponent(customerId)}/summary`,
@@ -2318,7 +2651,7 @@ var RewardPointsService = class {
2318
2651
  });
2319
2652
  }
2320
2653
  /** Add reward points for a customer. */
2321
- async addPoints(customerId, input, auth2 = SERVICE12) {
2654
+ async addPoints(customerId, input, auth2 = SERVICE13) {
2322
2655
  await this.ctx.http.request({
2323
2656
  method: "POST",
2324
2657
  path: `${this.base()}/customer/${encodeURIComponent(customerId)}/addPoints`,
@@ -2327,7 +2660,7 @@ var RewardPointsService = class {
2327
2660
  });
2328
2661
  }
2329
2662
  /** Redeem a customer's reward points (on behalf). */
2330
- async redeemPoints(customerId, input, auth2 = SERVICE12) {
2663
+ async redeemPoints(customerId, input, auth2 = SERVICE13) {
2331
2664
  await this.ctx.http.request({
2332
2665
  method: "POST",
2333
2666
  path: `${this.base()}/customer/${encodeURIComponent(customerId)}/redeemPoints`,
@@ -2378,7 +2711,7 @@ var RewardPointsService = class {
2378
2711
  }
2379
2712
  // --- Redeem options (tenant-scoped; read open to customer, management service-only) ---
2380
2713
  /** List redeem options. Defaults to the service token; pass a customer `auth` for storefront reads. */
2381
- async listRedeemOptions(auth2 = SERVICE12) {
2714
+ async listRedeemOptions(auth2 = SERVICE13) {
2382
2715
  return this.ctx.http.request({
2383
2716
  method: "GET",
2384
2717
  path: `${this.tenantBase()}/redeemOptions`,
@@ -2386,7 +2719,7 @@ var RewardPointsService = class {
2386
2719
  });
2387
2720
  }
2388
2721
  /** Create a redeem option. Returns the updated options list. */
2389
- async createRedeemOption(input, auth2 = SERVICE12) {
2722
+ async createRedeemOption(input, auth2 = SERVICE13) {
2390
2723
  return this.ctx.http.request({
2391
2724
  method: "POST",
2392
2725
  path: `${this.tenantBase()}/redeemOptions`,
@@ -2395,7 +2728,7 @@ var RewardPointsService = class {
2395
2728
  });
2396
2729
  }
2397
2730
  /** Update a redeem option by id. Resolves once accepted (no response body). */
2398
- async updateRedeemOption(redeemOptionId, input, auth2 = SERVICE12) {
2731
+ async updateRedeemOption(redeemOptionId, input, auth2 = SERVICE13) {
2399
2732
  await this.ctx.http.request({
2400
2733
  method: "PUT",
2401
2734
  path: `${this.tenantBase()}/redeemOptions/${encodeURIComponent(redeemOptionId)}`,
@@ -2404,7 +2737,7 @@ var RewardPointsService = class {
2404
2737
  });
2405
2738
  }
2406
2739
  /** Delete a redeem option by id. */
2407
- async deleteRedeemOption(redeemOptionId, auth2 = SERVICE12) {
2740
+ async deleteRedeemOption(redeemOptionId, auth2 = SERVICE13) {
2408
2741
  await this.ctx.http.request({
2409
2742
  method: "DELETE",
2410
2743
  path: `${this.tenantBase()}/redeemOptions/${encodeURIComponent(redeemOptionId)}`,
@@ -2414,7 +2747,7 @@ var RewardPointsService = class {
2414
2747
  };
2415
2748
 
2416
2749
  // src/services/brand.ts
2417
- var SERVICE13 = { kind: "service" };
2750
+ var SERVICE14 = { kind: "service" };
2418
2751
  var BrandService = class {
2419
2752
  constructor(ctx) {
2420
2753
  this.ctx = ctx;
@@ -2425,7 +2758,7 @@ var BrandService = class {
2425
2758
  return `/brand/brands`;
2426
2759
  }
2427
2760
  /** List all brands. */
2428
- async listBrands(query = {}, auth2 = SERVICE13) {
2761
+ async listBrands(query = {}, auth2 = SERVICE14) {
2429
2762
  return this.ctx.http.request({
2430
2763
  method: "GET",
2431
2764
  path: this.base(),
@@ -2434,7 +2767,7 @@ var BrandService = class {
2434
2767
  });
2435
2768
  }
2436
2769
  /** Retrieve one brand by id. */
2437
- async getBrand(brandId, auth2 = SERVICE13) {
2770
+ async getBrand(brandId, auth2 = SERVICE14) {
2438
2771
  return this.ctx.http.request({
2439
2772
  method: "GET",
2440
2773
  path: `${this.base()}/${encodeURIComponent(brandId)}`,
@@ -2442,7 +2775,7 @@ var BrandService = class {
2442
2775
  });
2443
2776
  }
2444
2777
  /** Create a brand. */
2445
- async createBrand(input, auth2 = SERVICE13) {
2778
+ async createBrand(input, auth2 = SERVICE14) {
2446
2779
  return this.ctx.http.request({
2447
2780
  method: "POST",
2448
2781
  path: this.base(),
@@ -2451,7 +2784,7 @@ var BrandService = class {
2451
2784
  });
2452
2785
  }
2453
2786
  /** Replace a brand by id. */
2454
- async updateBrand(brandId, input, auth2 = SERVICE13) {
2787
+ async updateBrand(brandId, input, auth2 = SERVICE14) {
2455
2788
  return this.ctx.http.request({
2456
2789
  method: "PUT",
2457
2790
  path: `${this.base()}/${encodeURIComponent(brandId)}`,
@@ -2460,7 +2793,7 @@ var BrandService = class {
2460
2793
  });
2461
2794
  }
2462
2795
  /** Partially update a brand by id. */
2463
- async patchBrand(brandId, patch, auth2 = SERVICE13) {
2796
+ async patchBrand(brandId, patch, auth2 = SERVICE14) {
2464
2797
  return this.ctx.http.request({
2465
2798
  method: "PATCH",
2466
2799
  path: `${this.base()}/${encodeURIComponent(brandId)}`,
@@ -2469,7 +2802,7 @@ var BrandService = class {
2469
2802
  });
2470
2803
  }
2471
2804
  /** Delete a brand by id. */
2472
- async deleteBrand(brandId, auth2 = SERVICE13) {
2805
+ async deleteBrand(brandId, auth2 = SERVICE14) {
2473
2806
  await this.ctx.http.request({
2474
2807
  method: "DELETE",
2475
2808
  path: `${this.base()}/${encodeURIComponent(brandId)}`,
@@ -2479,7 +2812,7 @@ var BrandService = class {
2479
2812
  };
2480
2813
 
2481
2814
  // src/services/label.ts
2482
- var SERVICE14 = { kind: "service" };
2815
+ var SERVICE15 = { kind: "service" };
2483
2816
  var LabelService = class {
2484
2817
  constructor(ctx) {
2485
2818
  this.ctx = ctx;
@@ -2490,7 +2823,7 @@ var LabelService = class {
2490
2823
  return `/label/labels`;
2491
2824
  }
2492
2825
  /** List all labels. */
2493
- async listLabels(query = {}, auth2 = SERVICE14) {
2826
+ async listLabels(query = {}, auth2 = SERVICE15) {
2494
2827
  return this.ctx.http.request({
2495
2828
  method: "GET",
2496
2829
  path: this.base(),
@@ -2499,7 +2832,7 @@ var LabelService = class {
2499
2832
  });
2500
2833
  }
2501
2834
  /** Retrieve one label by id. */
2502
- async getLabel(labelId, auth2 = SERVICE14) {
2835
+ async getLabel(labelId, auth2 = SERVICE15) {
2503
2836
  return this.ctx.http.request({
2504
2837
  method: "GET",
2505
2838
  path: `${this.base()}/${encodeURIComponent(labelId)}`,
@@ -2507,7 +2840,7 @@ var LabelService = class {
2507
2840
  });
2508
2841
  }
2509
2842
  /** Create a label. */
2510
- async createLabel(input, auth2 = SERVICE14) {
2843
+ async createLabel(input, auth2 = SERVICE15) {
2511
2844
  return this.ctx.http.request({
2512
2845
  method: "POST",
2513
2846
  path: this.base(),
@@ -2516,7 +2849,7 @@ var LabelService = class {
2516
2849
  });
2517
2850
  }
2518
2851
  /** Replace a label by id. */
2519
- async updateLabel(labelId, input, auth2 = SERVICE14) {
2852
+ async updateLabel(labelId, input, auth2 = SERVICE15) {
2520
2853
  return this.ctx.http.request({
2521
2854
  method: "PUT",
2522
2855
  path: `${this.base()}/${encodeURIComponent(labelId)}`,
@@ -2525,7 +2858,7 @@ var LabelService = class {
2525
2858
  });
2526
2859
  }
2527
2860
  /** Partially update a label by id. */
2528
- async patchLabel(labelId, patch, auth2 = SERVICE14) {
2861
+ async patchLabel(labelId, patch, auth2 = SERVICE15) {
2529
2862
  return this.ctx.http.request({
2530
2863
  method: "PATCH",
2531
2864
  path: `${this.base()}/${encodeURIComponent(labelId)}`,
@@ -2534,7 +2867,7 @@ var LabelService = class {
2534
2867
  });
2535
2868
  }
2536
2869
  /** Delete a label by id. */
2537
- async deleteLabel(labelId, auth2 = SERVICE14) {
2870
+ async deleteLabel(labelId, auth2 = SERVICE15) {
2538
2871
  await this.ctx.http.request({
2539
2872
  method: "DELETE",
2540
2873
  path: `${this.base()}/${encodeURIComponent(labelId)}`,
@@ -2544,7 +2877,7 @@ var LabelService = class {
2544
2877
  };
2545
2878
 
2546
2879
  // src/services/country.ts
2547
- var SERVICE15 = { kind: "service" };
2880
+ var SERVICE16 = { kind: "service" };
2548
2881
  var CountryService = class {
2549
2882
  constructor(ctx) {
2550
2883
  this.ctx = ctx;
@@ -2555,7 +2888,7 @@ var CountryService = class {
2555
2888
  return `/country/${this.ctx.tenant}`;
2556
2889
  }
2557
2890
  /** List all countries. */
2558
- async listCountries(query = {}, auth2 = SERVICE15) {
2891
+ async listCountries(query = {}, auth2 = SERVICE16) {
2559
2892
  return this.ctx.http.request({
2560
2893
  method: "GET",
2561
2894
  path: `${this.base()}/countries`,
@@ -2564,7 +2897,7 @@ var CountryService = class {
2564
2897
  });
2565
2898
  }
2566
2899
  /** Retrieve one country by code. */
2567
- async getCountry(countryCode, auth2 = SERVICE15) {
2900
+ async getCountry(countryCode, auth2 = SERVICE16) {
2568
2901
  return this.ctx.http.request({
2569
2902
  method: "GET",
2570
2903
  path: `${this.base()}/countries/${encodeURIComponent(countryCode)}`,
@@ -2572,7 +2905,7 @@ var CountryService = class {
2572
2905
  });
2573
2906
  }
2574
2907
  /** Partially update a country by code. Resolves once accepted (no response body). */
2575
- async patchCountry(countryCode, patch, auth2 = SERVICE15) {
2908
+ async patchCountry(countryCode, patch, auth2 = SERVICE16) {
2576
2909
  await this.ctx.http.request({
2577
2910
  method: "PATCH",
2578
2911
  path: `${this.base()}/countries/${encodeURIComponent(countryCode)}`,
@@ -2581,7 +2914,7 @@ var CountryService = class {
2581
2914
  });
2582
2915
  }
2583
2916
  /** List all regions. */
2584
- async listRegions(query = {}, auth2 = SERVICE15) {
2917
+ async listRegions(query = {}, auth2 = SERVICE16) {
2585
2918
  return this.ctx.http.request({
2586
2919
  method: "GET",
2587
2920
  path: `${this.base()}/regions`,
@@ -2590,7 +2923,7 @@ var CountryService = class {
2590
2923
  });
2591
2924
  }
2592
2925
  /** Retrieve one region by code. */
2593
- async getRegion(regionCode, auth2 = SERVICE15) {
2926
+ async getRegion(regionCode, auth2 = SERVICE16) {
2594
2927
  return this.ctx.http.request({
2595
2928
  method: "GET",
2596
2929
  path: `${this.base()}/regions/${encodeURIComponent(regionCode)}`,
@@ -2600,7 +2933,7 @@ var CountryService = class {
2600
2933
  };
2601
2934
 
2602
2935
  // src/services/currency.ts
2603
- var SERVICE16 = { kind: "service" };
2936
+ var SERVICE17 = { kind: "service" };
2604
2937
  var CurrencyService = class {
2605
2938
  constructor(ctx) {
2606
2939
  this.ctx = ctx;
@@ -2612,7 +2945,7 @@ var CurrencyService = class {
2612
2945
  }
2613
2946
  // --- Currencies ---
2614
2947
  /** List all currencies. */
2615
- async listCurrencies(query = {}, auth2 = SERVICE16) {
2948
+ async listCurrencies(query = {}, auth2 = SERVICE17) {
2616
2949
  return this.ctx.http.request({
2617
2950
  method: "GET",
2618
2951
  path: `${this.base()}/currencies`,
@@ -2621,7 +2954,7 @@ var CurrencyService = class {
2621
2954
  });
2622
2955
  }
2623
2956
  /** Retrieve one currency by code. */
2624
- async getCurrency(code, auth2 = SERVICE16) {
2957
+ async getCurrency(code, auth2 = SERVICE17) {
2625
2958
  return this.ctx.http.request({
2626
2959
  method: "GET",
2627
2960
  path: `${this.base()}/currencies/${encodeURIComponent(code)}`,
@@ -2629,7 +2962,7 @@ var CurrencyService = class {
2629
2962
  });
2630
2963
  }
2631
2964
  /** Create a currency. */
2632
- async createCurrency(input, auth2 = SERVICE16) {
2965
+ async createCurrency(input, auth2 = SERVICE17) {
2633
2966
  return this.ctx.http.request({
2634
2967
  method: "POST",
2635
2968
  path: `${this.base()}/currencies`,
@@ -2638,7 +2971,7 @@ var CurrencyService = class {
2638
2971
  });
2639
2972
  }
2640
2973
  /** Update a currency by code. */
2641
- async updateCurrency(code, input, auth2 = SERVICE16) {
2974
+ async updateCurrency(code, input, auth2 = SERVICE17) {
2642
2975
  return this.ctx.http.request({
2643
2976
  method: "PUT",
2644
2977
  path: `${this.base()}/currencies/${encodeURIComponent(code)}`,
@@ -2647,7 +2980,7 @@ var CurrencyService = class {
2647
2980
  });
2648
2981
  }
2649
2982
  /** Delete a currency by code. */
2650
- async deleteCurrency(code, auth2 = SERVICE16) {
2983
+ async deleteCurrency(code, auth2 = SERVICE17) {
2651
2984
  await this.ctx.http.request({
2652
2985
  method: "DELETE",
2653
2986
  path: `${this.base()}/currencies/${encodeURIComponent(code)}`,
@@ -2656,7 +2989,7 @@ var CurrencyService = class {
2656
2989
  }
2657
2990
  // --- Exchange rates ---
2658
2991
  /** List all exchange rates. */
2659
- async listExchangeRates(query = {}, auth2 = SERVICE16) {
2992
+ async listExchangeRates(query = {}, auth2 = SERVICE17) {
2660
2993
  return this.ctx.http.request({
2661
2994
  method: "GET",
2662
2995
  path: `${this.base()}/exchanges`,
@@ -2665,7 +2998,7 @@ var CurrencyService = class {
2665
2998
  });
2666
2999
  }
2667
3000
  /** Retrieve one exchange rate by code. */
2668
- async getExchangeRate(code, auth2 = SERVICE16) {
3001
+ async getExchangeRate(code, auth2 = SERVICE17) {
2669
3002
  return this.ctx.http.request({
2670
3003
  method: "GET",
2671
3004
  path: `${this.base()}/exchanges/${encodeURIComponent(code)}`,
@@ -2673,7 +3006,7 @@ var CurrencyService = class {
2673
3006
  });
2674
3007
  }
2675
3008
  /** Create an exchange rate. */
2676
- async createExchangeRate(input, auth2 = SERVICE16) {
3009
+ async createExchangeRate(input, auth2 = SERVICE17) {
2677
3010
  return this.ctx.http.request({
2678
3011
  method: "POST",
2679
3012
  path: `${this.base()}/exchanges`,
@@ -2682,7 +3015,7 @@ var CurrencyService = class {
2682
3015
  });
2683
3016
  }
2684
3017
  /** Update an exchange rate by code. */
2685
- async updateExchangeRate(code, input, auth2 = SERVICE16) {
3018
+ async updateExchangeRate(code, input, auth2 = SERVICE17) {
2686
3019
  return this.ctx.http.request({
2687
3020
  method: "PUT",
2688
3021
  path: `${this.base()}/exchanges/${encodeURIComponent(code)}`,
@@ -2691,7 +3024,7 @@ var CurrencyService = class {
2691
3024
  });
2692
3025
  }
2693
3026
  /** Delete an exchange rate by code. */
2694
- async deleteExchangeRate(code, auth2 = SERVICE16) {
3027
+ async deleteExchangeRate(code, auth2 = SERVICE17) {
2695
3028
  await this.ctx.http.request({
2696
3029
  method: "DELETE",
2697
3030
  path: `${this.base()}/exchanges/${encodeURIComponent(code)}`,
@@ -2701,7 +3034,7 @@ var CurrencyService = class {
2701
3034
  };
2702
3035
 
2703
3036
  // src/services/shipping.ts
2704
- var SERVICE17 = { kind: "service" };
3037
+ var SERVICE18 = { kind: "service" };
2705
3038
  var ShippingService = class {
2706
3039
  constructor(ctx) {
2707
3040
  this.ctx = ctx;
@@ -2716,7 +3049,7 @@ var ShippingService = class {
2716
3049
  }
2717
3050
  // --- Sites ---
2718
3051
  /** Find shipping-related sites by postal code (`POST /findSite`). */
2719
- async findSites(input, auth2 = SERVICE17) {
3052
+ async findSites(input, auth2 = SERVICE18) {
2720
3053
  return this.ctx.http.request({
2721
3054
  method: "POST",
2722
3055
  path: `${this.base()}/findSite`,
@@ -2726,7 +3059,7 @@ var ShippingService = class {
2726
3059
  }
2727
3060
  // --- Zones ---
2728
3061
  /** List shipping zones for a site. */
2729
- async listZones(site, query = {}, auth2 = SERVICE17) {
3062
+ async listZones(site, query = {}, auth2 = SERVICE18) {
2730
3063
  return this.ctx.http.request({
2731
3064
  method: "GET",
2732
3065
  path: `${this.siteBase(site)}/zones`,
@@ -2735,7 +3068,7 @@ var ShippingService = class {
2735
3068
  });
2736
3069
  }
2737
3070
  /** Retrieve one shipping zone. */
2738
- async getZone(site, zoneId, auth2 = SERVICE17) {
3071
+ async getZone(site, zoneId, auth2 = SERVICE18) {
2739
3072
  return this.ctx.http.request({
2740
3073
  method: "GET",
2741
3074
  path: `${this.siteBase(site)}/zones/${encodeURIComponent(zoneId)}`,
@@ -2743,7 +3076,7 @@ var ShippingService = class {
2743
3076
  });
2744
3077
  }
2745
3078
  /** Create a shipping zone. */
2746
- async createZone(site, zone, auth2 = SERVICE17) {
3079
+ async createZone(site, zone, auth2 = SERVICE18) {
2747
3080
  return this.ctx.http.request({
2748
3081
  method: "POST",
2749
3082
  path: `${this.siteBase(site)}/zones`,
@@ -2752,7 +3085,7 @@ var ShippingService = class {
2752
3085
  });
2753
3086
  }
2754
3087
  /** Replace a shipping zone. */
2755
- async updateZone(site, zoneId, zone, auth2 = SERVICE17) {
3088
+ async updateZone(site, zoneId, zone, auth2 = SERVICE18) {
2756
3089
  await this.ctx.http.request({
2757
3090
  method: "PUT",
2758
3091
  path: `${this.siteBase(site)}/zones/${encodeURIComponent(zoneId)}`,
@@ -2761,7 +3094,7 @@ var ShippingService = class {
2761
3094
  });
2762
3095
  }
2763
3096
  /** Partially update a shipping zone. */
2764
- async patchZone(site, zoneId, patch, auth2 = SERVICE17) {
3097
+ async patchZone(site, zoneId, patch, auth2 = SERVICE18) {
2765
3098
  await this.ctx.http.request({
2766
3099
  method: "PATCH",
2767
3100
  path: `${this.siteBase(site)}/zones/${encodeURIComponent(zoneId)}`,
@@ -2770,7 +3103,7 @@ var ShippingService = class {
2770
3103
  });
2771
3104
  }
2772
3105
  /** Delete a shipping zone. */
2773
- async deleteZone(site, zoneId, auth2 = SERVICE17) {
3106
+ async deleteZone(site, zoneId, auth2 = SERVICE18) {
2774
3107
  await this.ctx.http.request({
2775
3108
  method: "DELETE",
2776
3109
  path: `${this.siteBase(site)}/zones/${encodeURIComponent(zoneId)}`,
@@ -2779,7 +3112,7 @@ var ShippingService = class {
2779
3112
  }
2780
3113
  // --- Methods (per zone) ---
2781
3114
  /** List shipping methods of a zone. */
2782
- async listMethods(site, zoneId, query = {}, auth2 = SERVICE17) {
3115
+ async listMethods(site, zoneId, query = {}, auth2 = SERVICE18) {
2783
3116
  return this.ctx.http.request({
2784
3117
  method: "GET",
2785
3118
  path: `${this.siteBase(site)}/zones/${encodeURIComponent(zoneId)}/methods`,
@@ -2788,7 +3121,7 @@ var ShippingService = class {
2788
3121
  });
2789
3122
  }
2790
3123
  /** Retrieve one shipping method. */
2791
- async getMethod(site, zoneId, methodId, auth2 = SERVICE17) {
3124
+ async getMethod(site, zoneId, methodId, auth2 = SERVICE18) {
2792
3125
  return this.ctx.http.request({
2793
3126
  method: "GET",
2794
3127
  path: `${this.siteBase(site)}/zones/${encodeURIComponent(zoneId)}/methods/${encodeURIComponent(methodId)}`,
@@ -2796,7 +3129,7 @@ var ShippingService = class {
2796
3129
  });
2797
3130
  }
2798
3131
  /** Create a shipping method in a zone. */
2799
- async createMethod(site, zoneId, method, auth2 = SERVICE17) {
3132
+ async createMethod(site, zoneId, method, auth2 = SERVICE18) {
2800
3133
  return this.ctx.http.request({
2801
3134
  method: "POST",
2802
3135
  path: `${this.siteBase(site)}/zones/${encodeURIComponent(zoneId)}/methods`,
@@ -2805,7 +3138,7 @@ var ShippingService = class {
2805
3138
  });
2806
3139
  }
2807
3140
  /** Replace a shipping method. */
2808
- async updateMethod(site, zoneId, methodId, method, auth2 = SERVICE17) {
3141
+ async updateMethod(site, zoneId, methodId, method, auth2 = SERVICE18) {
2809
3142
  await this.ctx.http.request({
2810
3143
  method: "PUT",
2811
3144
  path: `${this.siteBase(site)}/zones/${encodeURIComponent(zoneId)}/methods/${encodeURIComponent(methodId)}`,
@@ -2814,7 +3147,7 @@ var ShippingService = class {
2814
3147
  });
2815
3148
  }
2816
3149
  /** Partially update a shipping method. */
2817
- async patchMethod(site, zoneId, methodId, patch, auth2 = SERVICE17) {
3150
+ async patchMethod(site, zoneId, methodId, patch, auth2 = SERVICE18) {
2818
3151
  await this.ctx.http.request({
2819
3152
  method: "PATCH",
2820
3153
  path: `${this.siteBase(site)}/zones/${encodeURIComponent(zoneId)}/methods/${encodeURIComponent(methodId)}`,
@@ -2823,7 +3156,7 @@ var ShippingService = class {
2823
3156
  });
2824
3157
  }
2825
3158
  /** Delete a shipping method. */
2826
- async deleteMethod(site, zoneId, methodId, auth2 = SERVICE17) {
3159
+ async deleteMethod(site, zoneId, methodId, auth2 = SERVICE18) {
2827
3160
  await this.ctx.http.request({
2828
3161
  method: "DELETE",
2829
3162
  path: `${this.siteBase(site)}/zones/${encodeURIComponent(zoneId)}/methods/${encodeURIComponent(methodId)}`,
@@ -2832,7 +3165,7 @@ var ShippingService = class {
2832
3165
  }
2833
3166
  // --- Cost / quote ---
2834
3167
  /** Calculate the final shipping cost (`POST /quote`). */
2835
- async quote(site, input, auth2 = SERVICE17) {
3168
+ async quote(site, input, auth2 = SERVICE18) {
2836
3169
  return this.ctx.http.request({
2837
3170
  method: "POST",
2838
3171
  path: `${this.siteBase(site)}/quote`,
@@ -2841,7 +3174,7 @@ var ShippingService = class {
2841
3174
  });
2842
3175
  }
2843
3176
  /** Calculate the minimum shipping cost (`POST /quote/minimum`). */
2844
- async quoteMinimum(site, input, auth2 = SERVICE17) {
3177
+ async quoteMinimum(site, input, auth2 = SERVICE18) {
2845
3178
  return this.ctx.http.request({
2846
3179
  method: "POST",
2847
3180
  path: `${this.siteBase(site)}/quote/minimum`,
@@ -2850,7 +3183,7 @@ var ShippingService = class {
2850
3183
  });
2851
3184
  }
2852
3185
  /** Calculate the shipping cost for a given slot (`POST /quote/slot`). */
2853
- async quoteSlot(site, input, auth2 = SERVICE17) {
3186
+ async quoteSlot(site, input, auth2 = SERVICE18) {
2854
3187
  return this.ctx.http.request({
2855
3188
  method: "POST",
2856
3189
  path: `${this.siteBase(site)}/quote/slot`,
@@ -2860,7 +3193,7 @@ var ShippingService = class {
2860
3193
  }
2861
3194
  // --- Groups ---
2862
3195
  /** List shipping groups for a site. */
2863
- async listGroups(site, query = {}, auth2 = SERVICE17) {
3196
+ async listGroups(site, query = {}, auth2 = SERVICE18) {
2864
3197
  return this.ctx.http.request({
2865
3198
  method: "GET",
2866
3199
  path: `${this.siteBase(site)}/groups`,
@@ -2869,7 +3202,7 @@ var ShippingService = class {
2869
3202
  });
2870
3203
  }
2871
3204
  /** Retrieve one shipping group. */
2872
- async getGroup(site, groupId, auth2 = SERVICE17) {
3205
+ async getGroup(site, groupId, auth2 = SERVICE18) {
2873
3206
  return this.ctx.http.request({
2874
3207
  method: "GET",
2875
3208
  path: `${this.siteBase(site)}/groups/${encodeURIComponent(groupId)}`,
@@ -2877,7 +3210,7 @@ var ShippingService = class {
2877
3210
  });
2878
3211
  }
2879
3212
  /** Create a shipping group. */
2880
- async createGroup(site, group, auth2 = SERVICE17) {
3213
+ async createGroup(site, group, auth2 = SERVICE18) {
2881
3214
  return this.ctx.http.request({
2882
3215
  method: "POST",
2883
3216
  path: `${this.siteBase(site)}/groups`,
@@ -2886,7 +3219,7 @@ var ShippingService = class {
2886
3219
  });
2887
3220
  }
2888
3221
  /** Replace a shipping group. */
2889
- async updateGroup(site, groupId, group, auth2 = SERVICE17) {
3222
+ async updateGroup(site, groupId, group, auth2 = SERVICE18) {
2890
3223
  await this.ctx.http.request({
2891
3224
  method: "PUT",
2892
3225
  path: `${this.siteBase(site)}/groups/${encodeURIComponent(groupId)}`,
@@ -2895,7 +3228,7 @@ var ShippingService = class {
2895
3228
  });
2896
3229
  }
2897
3230
  /** Delete a shipping group. */
2898
- async deleteGroup(site, groupId, auth2 = SERVICE17) {
3231
+ async deleteGroup(site, groupId, auth2 = SERVICE18) {
2899
3232
  await this.ctx.http.request({
2900
3233
  method: "DELETE",
2901
3234
  path: `${this.siteBase(site)}/groups/${encodeURIComponent(groupId)}`,
@@ -2904,7 +3237,7 @@ var ShippingService = class {
2904
3237
  }
2905
3238
  // --- Customer-group relations ---
2906
3239
  /** List customer-group relations for a site. */
2907
- async listCgRelations(site, query = {}, auth2 = SERVICE17) {
3240
+ async listCgRelations(site, query = {}, auth2 = SERVICE18) {
2908
3241
  return this.ctx.http.request({
2909
3242
  method: "GET",
2910
3243
  path: `${this.siteBase(site)}/cgrelations`,
@@ -2913,7 +3246,7 @@ var ShippingService = class {
2913
3246
  });
2914
3247
  }
2915
3248
  /** Retrieve a customer's customer-group relations. */
2916
- async getCgRelations(site, customerId, auth2 = SERVICE17) {
3249
+ async getCgRelations(site, customerId, auth2 = SERVICE18) {
2917
3250
  return this.ctx.http.request({
2918
3251
  method: "GET",
2919
3252
  path: `${this.siteBase(site)}/cgrelations/${encodeURIComponent(customerId)}`,
@@ -2921,7 +3254,7 @@ var ShippingService = class {
2921
3254
  });
2922
3255
  }
2923
3256
  /** Create a customer-group relation. */
2924
- async createCgRelation(site, relation, auth2 = SERVICE17) {
3257
+ async createCgRelation(site, relation, auth2 = SERVICE18) {
2925
3258
  return this.ctx.http.request({
2926
3259
  method: "POST",
2927
3260
  path: `${this.siteBase(site)}/cgrelations`,
@@ -2930,7 +3263,7 @@ var ShippingService = class {
2930
3263
  });
2931
3264
  }
2932
3265
  /** Update a customer's customer-group relations. */
2933
- async updateCgRelations(site, customerId, relation, auth2 = SERVICE17) {
3266
+ async updateCgRelations(site, customerId, relation, auth2 = SERVICE18) {
2934
3267
  await this.ctx.http.request({
2935
3268
  method: "PUT",
2936
3269
  path: `${this.siteBase(site)}/cgrelations/${encodeURIComponent(customerId)}`,
@@ -2939,7 +3272,7 @@ var ShippingService = class {
2939
3272
  });
2940
3273
  }
2941
3274
  /** Delete a customer's customer-group relation. */
2942
- async deleteCgRelation(site, customerId, auth2 = SERVICE17) {
3275
+ async deleteCgRelation(site, customerId, auth2 = SERVICE18) {
2943
3276
  await this.ctx.http.request({
2944
3277
  method: "DELETE",
2945
3278
  path: `${this.siteBase(site)}/cgrelations/${encodeURIComponent(customerId)}`,
@@ -2948,7 +3281,7 @@ var ShippingService = class {
2948
3281
  }
2949
3282
  // --- Phase 2: delivery windows ---
2950
3283
  /** Retrieve delivery windows for a delivery area + cart. */
2951
- async getAreaDeliveryWindows(deliveryAreaId, cartId, auth2 = SERVICE17) {
3284
+ async getAreaDeliveryWindows(deliveryAreaId, cartId, auth2 = SERVICE18) {
2952
3285
  return this.ctx.http.request({
2953
3286
  method: "GET",
2954
3287
  path: `${this.base()}/areaDeliveryTimes/${encodeURIComponent(deliveryAreaId)}/${encodeURIComponent(cartId)}`,
@@ -2956,7 +3289,7 @@ var ShippingService = class {
2956
3289
  });
2957
3290
  }
2958
3291
  /** Retrieve delivery windows for a cart. */
2959
- async getCartDeliveryWindows(cartId, auth2 = SERVICE17) {
3292
+ async getCartDeliveryWindows(cartId, auth2 = SERVICE18) {
2960
3293
  return this.ctx.http.request({
2961
3294
  method: "GET",
2962
3295
  path: `${this.base()}/actualDeliveryWindows/${encodeURIComponent(cartId)}`,
@@ -2964,7 +3297,7 @@ var ShippingService = class {
2964
3297
  });
2965
3298
  }
2966
3299
  /** Increment the delivery-window counter. */
2967
- async incrementDeliveryWindowCounter(input, auth2 = SERVICE17) {
3300
+ async incrementDeliveryWindowCounter(input, auth2 = SERVICE18) {
2968
3301
  await this.ctx.http.request({
2969
3302
  method: "POST",
2970
3303
  path: `${this.base()}/actualDeliveryWindows/incrementCounter`,
@@ -2973,7 +3306,7 @@ var ShippingService = class {
2973
3306
  });
2974
3307
  }
2975
3308
  /** Validate a delivery window. Resolves when valid; throws otherwise. */
2976
- async validateDeliveryWindow(input, auth2 = SERVICE17) {
3309
+ async validateDeliveryWindow(input, auth2 = SERVICE18) {
2977
3310
  await this.ctx.http.request({
2978
3311
  method: "POST",
2979
3312
  path: `${this.base()}/deliveryWindowValidation`,
@@ -2983,7 +3316,7 @@ var ShippingService = class {
2983
3316
  }
2984
3317
  // --- Phase 2: delivery times ---
2985
3318
  /** List all delivery times. */
2986
- async listDeliveryTimes(query = {}, auth2 = SERVICE17) {
3319
+ async listDeliveryTimes(query = {}, auth2 = SERVICE18) {
2987
3320
  return this.ctx.http.request({
2988
3321
  method: "GET",
2989
3322
  path: `${this.base()}/delivery-times`,
@@ -2992,7 +3325,7 @@ var ShippingService = class {
2992
3325
  });
2993
3326
  }
2994
3327
  /** Retrieve one delivery time. */
2995
- async getDeliveryTime(deliveryTimeId, auth2 = SERVICE17) {
3328
+ async getDeliveryTime(deliveryTimeId, auth2 = SERVICE18) {
2996
3329
  return this.ctx.http.request({
2997
3330
  method: "GET",
2998
3331
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}`,
@@ -3000,7 +3333,7 @@ var ShippingService = class {
3000
3333
  });
3001
3334
  }
3002
3335
  /** Create a delivery time. */
3003
- async createDeliveryTime(input, auth2 = SERVICE17) {
3336
+ async createDeliveryTime(input, auth2 = SERVICE18) {
3004
3337
  return this.ctx.http.request({
3005
3338
  method: "POST",
3006
3339
  path: `${this.base()}/delivery-times`,
@@ -3009,7 +3342,7 @@ var ShippingService = class {
3009
3342
  });
3010
3343
  }
3011
3344
  /** Create multiple delivery times (`POST /delivery-times/bulk`). */
3012
- async createDeliveryTimesBulk(inputs, auth2 = SERVICE17) {
3345
+ async createDeliveryTimesBulk(inputs, auth2 = SERVICE18) {
3013
3346
  return this.ctx.http.request({
3014
3347
  method: "POST",
3015
3348
  path: `${this.base()}/delivery-times/bulk`,
@@ -3018,7 +3351,7 @@ var ShippingService = class {
3018
3351
  });
3019
3352
  }
3020
3353
  /** Replace a delivery time. */
3021
- async updateDeliveryTime(deliveryTimeId, input, auth2 = SERVICE17) {
3354
+ async updateDeliveryTime(deliveryTimeId, input, auth2 = SERVICE18) {
3022
3355
  await this.ctx.http.request({
3023
3356
  method: "PUT",
3024
3357
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}`,
@@ -3027,7 +3360,7 @@ var ShippingService = class {
3027
3360
  });
3028
3361
  }
3029
3362
  /** Partially update a delivery time (JSON-Patch op array). */
3030
- async patchDeliveryTime(deliveryTimeId, ops, auth2 = SERVICE17) {
3363
+ async patchDeliveryTime(deliveryTimeId, ops, auth2 = SERVICE18) {
3031
3364
  await this.ctx.http.request({
3032
3365
  method: "PATCH",
3033
3366
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}`,
@@ -3036,7 +3369,7 @@ var ShippingService = class {
3036
3369
  });
3037
3370
  }
3038
3371
  /** Delete a delivery time. */
3039
- async deleteDeliveryTime(deliveryTimeId, auth2 = SERVICE17) {
3372
+ async deleteDeliveryTime(deliveryTimeId, auth2 = SERVICE18) {
3040
3373
  await this.ctx.http.request({
3041
3374
  method: "DELETE",
3042
3375
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}`,
@@ -3045,7 +3378,7 @@ var ShippingService = class {
3045
3378
  }
3046
3379
  // --- Phase 2: delivery time slots ---
3047
3380
  /** List slots of a delivery time. */
3048
- async listSlots(deliveryTimeId, auth2 = SERVICE17) {
3381
+ async listSlots(deliveryTimeId, auth2 = SERVICE18) {
3049
3382
  return this.ctx.http.request({
3050
3383
  method: "GET",
3051
3384
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}/slots`,
@@ -3053,7 +3386,7 @@ var ShippingService = class {
3053
3386
  });
3054
3387
  }
3055
3388
  /** Retrieve one slot. */
3056
- async getSlot(deliveryTimeId, slotId, auth2 = SERVICE17) {
3389
+ async getSlot(deliveryTimeId, slotId, auth2 = SERVICE18) {
3057
3390
  return this.ctx.http.request({
3058
3391
  method: "GET",
3059
3392
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}/slots/${encodeURIComponent(slotId)}`,
@@ -3061,7 +3394,7 @@ var ShippingService = class {
3061
3394
  });
3062
3395
  }
3063
3396
  /** Create a slot in a delivery time. */
3064
- async createSlot(deliveryTimeId, input, auth2 = SERVICE17) {
3397
+ async createSlot(deliveryTimeId, input, auth2 = SERVICE18) {
3065
3398
  return this.ctx.http.request({
3066
3399
  method: "POST",
3067
3400
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}/slots`,
@@ -3070,7 +3403,7 @@ var ShippingService = class {
3070
3403
  });
3071
3404
  }
3072
3405
  /** Replace a slot. */
3073
- async updateSlot(deliveryTimeId, slotId, input, auth2 = SERVICE17) {
3406
+ async updateSlot(deliveryTimeId, slotId, input, auth2 = SERVICE18) {
3074
3407
  await this.ctx.http.request({
3075
3408
  method: "PUT",
3076
3409
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}/slots/${encodeURIComponent(slotId)}`,
@@ -3079,7 +3412,7 @@ var ShippingService = class {
3079
3412
  });
3080
3413
  }
3081
3414
  /** Partially update a slot (JSON-Patch op array). */
3082
- async patchSlot(deliveryTimeId, slotId, ops, auth2 = SERVICE17) {
3415
+ async patchSlot(deliveryTimeId, slotId, ops, auth2 = SERVICE18) {
3083
3416
  await this.ctx.http.request({
3084
3417
  method: "PATCH",
3085
3418
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}/slots/${encodeURIComponent(slotId)}`,
@@ -3088,7 +3421,7 @@ var ShippingService = class {
3088
3421
  });
3089
3422
  }
3090
3423
  /** Delete a slot. */
3091
- async deleteSlot(deliveryTimeId, slotId, auth2 = SERVICE17) {
3424
+ async deleteSlot(deliveryTimeId, slotId, auth2 = SERVICE18) {
3092
3425
  await this.ctx.http.request({
3093
3426
  method: "DELETE",
3094
3427
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}/slots/${encodeURIComponent(slotId)}`,
@@ -3096,7 +3429,7 @@ var ShippingService = class {
3096
3429
  });
3097
3430
  }
3098
3431
  /** Delete all slots of a delivery time. */
3099
- async deleteAllSlots(deliveryTimeId, auth2 = SERVICE17) {
3432
+ async deleteAllSlots(deliveryTimeId, auth2 = SERVICE18) {
3100
3433
  await this.ctx.http.request({
3101
3434
  method: "DELETE",
3102
3435
  path: `${this.base()}/delivery-times/${encodeURIComponent(deliveryTimeId)}/slots`,
@@ -3105,7 +3438,7 @@ var ShippingService = class {
3105
3438
  }
3106
3439
  // --- Phase 2: delivery cycles ---
3107
3440
  /** Generate a delivery cycle (`POST /delivery-cycles/generate`). Returns the cycle id. */
3108
- async generateDeliveryCycle(input, auth2 = SERVICE17) {
3441
+ async generateDeliveryCycle(input, auth2 = SERVICE18) {
3109
3442
  return this.ctx.http.request({
3110
3443
  method: "POST",
3111
3444
  path: `${this.base()}/delivery-cycles/generate`,
@@ -3116,7 +3449,7 @@ var ShippingService = class {
3116
3449
  };
3117
3450
 
3118
3451
  // src/services/invoice.ts
3119
- var SERVICE18 = { kind: "service" };
3452
+ var SERVICE19 = { kind: "service" };
3120
3453
  var InvoiceService = class {
3121
3454
  constructor(ctx) {
3122
3455
  this.ctx = ctx;
@@ -3127,7 +3460,7 @@ var InvoiceService = class {
3127
3460
  return `/invoice/${this.ctx.tenant}/jobs/invoices`;
3128
3461
  }
3129
3462
  /** Create an invoice-generation job (`POST …/jobs/invoices`, 201). */
3130
- async createJob(draft, auth2 = SERVICE18) {
3463
+ async createJob(draft, auth2 = SERVICE19) {
3131
3464
  return this.ctx.http.request({
3132
3465
  method: "POST",
3133
3466
  path: this.base(),
@@ -3136,7 +3469,7 @@ var InvoiceService = class {
3136
3469
  });
3137
3470
  }
3138
3471
  /** Retrieve a job and its per-order results (`GET …/jobs/invoices/{jobId}`). */
3139
- async getJob(jobId, auth2 = SERVICE18) {
3472
+ async getJob(jobId, auth2 = SERVICE19) {
3140
3473
  return this.ctx.http.request({
3141
3474
  method: "GET",
3142
3475
  path: `${this.base()}/${encodeURIComponent(jobId)}`,
@@ -3291,7 +3624,7 @@ var QuoteReasonsResource = class {
3291
3624
  };
3292
3625
 
3293
3626
  // src/services/returns.ts
3294
- var SERVICE19 = { kind: "service" };
3627
+ var SERVICE20 = { kind: "service" };
3295
3628
  var ReturnsService = class {
3296
3629
  constructor(ctx) {
3297
3630
  this.ctx = ctx;
@@ -3302,7 +3635,7 @@ var ReturnsService = class {
3302
3635
  return `/return/${this.ctx.tenant}/returns`;
3303
3636
  }
3304
3637
  /** List returns (paged; supports `pageSize`/`pageNumber`/`sort`/`q`). */
3305
- async listReturns(query = {}, auth2 = SERVICE19) {
3638
+ async listReturns(query = {}, auth2 = SERVICE20) {
3306
3639
  return this.ctx.http.request({
3307
3640
  method: "GET",
3308
3641
  path: this.base(),
@@ -3311,7 +3644,7 @@ var ReturnsService = class {
3311
3644
  });
3312
3645
  }
3313
3646
  /** Retrieve one return by id. */
3314
- async getReturn(returnId, auth2 = SERVICE19) {
3647
+ async getReturn(returnId, auth2 = SERVICE20) {
3315
3648
  return this.ctx.http.request({
3316
3649
  method: "GET",
3317
3650
  path: `${this.base()}/${encodeURIComponent(returnId)}`,
@@ -3319,7 +3652,7 @@ var ReturnsService = class {
3319
3652
  });
3320
3653
  }
3321
3654
  /** Create a return. Returns the created `{ id }`. */
3322
- async createReturn(input, auth2 = SERVICE19) {
3655
+ async createReturn(input, auth2 = SERVICE20) {
3323
3656
  return this.ctx.http.request({
3324
3657
  method: "POST",
3325
3658
  path: this.base(),
@@ -3328,7 +3661,7 @@ var ReturnsService = class {
3328
3661
  });
3329
3662
  }
3330
3663
  /** Replace a return by id (`PUT`). */
3331
- async updateReturn(returnId, input, auth2 = SERVICE19) {
3664
+ async updateReturn(returnId, input, auth2 = SERVICE20) {
3332
3665
  await this.ctx.http.request({
3333
3666
  method: "PUT",
3334
3667
  path: `${this.base()}/${encodeURIComponent(returnId)}`,
@@ -3337,7 +3670,7 @@ var ReturnsService = class {
3337
3670
  });
3338
3671
  }
3339
3672
  /** Partially update a return by id (`PATCH`, JSON-Patch op-array). */
3340
- async patchReturn(returnId, ops, auth2 = SERVICE19) {
3673
+ async patchReturn(returnId, ops, auth2 = SERVICE20) {
3341
3674
  await this.ctx.http.request({
3342
3675
  method: "PATCH",
3343
3676
  path: `${this.base()}/${encodeURIComponent(returnId)}`,
@@ -3346,7 +3679,7 @@ var ReturnsService = class {
3346
3679
  });
3347
3680
  }
3348
3681
  /** Delete a return by id. */
3349
- async deleteReturn(returnId, auth2 = SERVICE19) {
3682
+ async deleteReturn(returnId, auth2 = SERVICE20) {
3350
3683
  await this.ctx.http.request({
3351
3684
  method: "DELETE",
3352
3685
  path: `${this.base()}/${encodeURIComponent(returnId)}`,
@@ -3356,7 +3689,7 @@ var ReturnsService = class {
3356
3689
  };
3357
3690
 
3358
3691
  // src/services/sepa-export.ts
3359
- var SERVICE20 = { kind: "service" };
3692
+ var SERVICE21 = { kind: "service" };
3360
3693
  var SepaExportService = class {
3361
3694
  constructor(ctx) {
3362
3695
  this.ctx = ctx;
@@ -3367,7 +3700,7 @@ var SepaExportService = class {
3367
3700
  return `/sepa-export/${this.ctx.tenant}`;
3368
3701
  }
3369
3702
  /** Retrieve a SEPA export file by id. Returns the raw file content (text). */
3370
- async getFile(fileId, auth2 = SERVICE20) {
3703
+ async getFile(fileId, auth2 = SERVICE21) {
3371
3704
  const path = `${this.base()}/files/${encodeURIComponent(fileId)}`;
3372
3705
  const res = await this.ctx.http.requestRaw({ method: "GET", path, auth: auth2 });
3373
3706
  if (!res.ok) {
@@ -3377,7 +3710,7 @@ var SepaExportService = class {
3377
3710
  return res.text();
3378
3711
  }
3379
3712
  /** List export jobs. */
3380
- async listJobs(query = {}, auth2 = SERVICE20) {
3713
+ async listJobs(query = {}, auth2 = SERVICE21) {
3381
3714
  return this.ctx.http.request({
3382
3715
  method: "GET",
3383
3716
  path: `${this.base()}/jobs`,
@@ -3386,7 +3719,7 @@ var SepaExportService = class {
3386
3719
  });
3387
3720
  }
3388
3721
  /** Create an export job. */
3389
- async createJob(input, auth2 = SERVICE20) {
3722
+ async createJob(input, auth2 = SERVICE21) {
3390
3723
  return this.ctx.http.request({
3391
3724
  method: "POST",
3392
3725
  path: `${this.base()}/jobs`,
@@ -3397,7 +3730,7 @@ var SepaExportService = class {
3397
3730
  };
3398
3731
 
3399
3732
  // src/services/indexing.ts
3400
- var SERVICE21 = { kind: "service" };
3733
+ var SERVICE22 = { kind: "service" };
3401
3734
  var IndexingService = class {
3402
3735
  constructor(ctx) {
3403
3736
  this.ctx = ctx;
@@ -3408,11 +3741,11 @@ var IndexingService = class {
3408
3741
  return `/indexing/${this.ctx.tenant}`;
3409
3742
  }
3410
3743
  /** List indexing configurations. */
3411
- async listConfigurations(auth2 = SERVICE21) {
3744
+ async listConfigurations(auth2 = SERVICE22) {
3412
3745
  return this.ctx.http.request({ method: "GET", path: `${this.base()}/configurations`, auth: auth2 });
3413
3746
  }
3414
3747
  /** Get a configuration by provider name. */
3415
- async getConfiguration(provider, auth2 = SERVICE21) {
3748
+ async getConfiguration(provider, auth2 = SERVICE22) {
3416
3749
  return this.ctx.http.request({
3417
3750
  method: "GET",
3418
3751
  path: `${this.base()}/configurations/${encodeURIComponent(provider)}`,
@@ -3420,7 +3753,7 @@ var IndexingService = class {
3420
3753
  });
3421
3754
  }
3422
3755
  /** Create a configuration. */
3423
- async createConfiguration(input, auth2 = SERVICE21) {
3756
+ async createConfiguration(input, auth2 = SERVICE22) {
3424
3757
  return this.ctx.http.request({
3425
3758
  method: "POST",
3426
3759
  path: `${this.base()}/configurations`,
@@ -3429,7 +3762,7 @@ var IndexingService = class {
3429
3762
  });
3430
3763
  }
3431
3764
  /** Update a configuration by provider name. */
3432
- async updateConfiguration(provider, input, auth2 = SERVICE21) {
3765
+ async updateConfiguration(provider, input, auth2 = SERVICE22) {
3433
3766
  await this.ctx.http.request({
3434
3767
  method: "PUT",
3435
3768
  path: `${this.base()}/configurations/${encodeURIComponent(provider)}`,
@@ -3438,7 +3771,7 @@ var IndexingService = class {
3438
3771
  });
3439
3772
  }
3440
3773
  /** Delete a configuration by provider name. */
3441
- async deleteConfiguration(provider, auth2 = SERVICE21) {
3774
+ async deleteConfiguration(provider, auth2 = SERVICE22) {
3442
3775
  await this.ctx.http.request({
3443
3776
  method: "DELETE",
3444
3777
  path: `${this.base()}/configurations/${encodeURIComponent(provider)}`,
@@ -3446,11 +3779,11 @@ var IndexingService = class {
3446
3779
  });
3447
3780
  }
3448
3781
  /** List public indexing configurations. */
3449
- async listPublicConfigurations(auth2 = SERVICE21) {
3782
+ async listPublicConfigurations(auth2 = SERVICE22) {
3450
3783
  return this.ctx.http.request({ method: "GET", path: `${this.base()}/public/configurations`, auth: auth2 });
3451
3784
  }
3452
3785
  /** Get a public configuration by provider name. */
3453
- async getPublicConfiguration(provider, auth2 = SERVICE21) {
3786
+ async getPublicConfiguration(provider, auth2 = SERVICE22) {
3454
3787
  return this.ctx.http.request({
3455
3788
  method: "GET",
3456
3789
  path: `${this.base()}/public/configurations/${encodeURIComponent(provider)}`,
@@ -3463,7 +3796,7 @@ var IndexingService = class {
3463
3796
  * (PRODUCT only). Resolves to the created job (`201`) or, when a job for that
3464
3797
  * `entityType` is already `IN_PROGRESS`, that running job (`200`).
3465
3798
  */
3466
- async createReindexJob(input, auth2 = SERVICE21) {
3799
+ async createReindexJob(input, auth2 = SERVICE22) {
3467
3800
  return this.ctx.http.request({
3468
3801
  method: "POST",
3469
3802
  path: `${this.base()}/reindex-jobs`,
@@ -3472,7 +3805,7 @@ var IndexingService = class {
3472
3805
  });
3473
3806
  }
3474
3807
  /** List reindex jobs (paginated). */
3475
- async listReindexJobs(opts = {}, auth2 = SERVICE21) {
3808
+ async listReindexJobs(opts = {}, auth2 = SERVICE22) {
3476
3809
  const pageNumber = opts.pageNumber ?? 1;
3477
3810
  const pageSize = opts.pageSize ?? 50;
3478
3811
  const query = { pageNumber, pageSize };
@@ -3486,7 +3819,7 @@ var IndexingService = class {
3486
3819
  return { items, pageNumber, pageSize, hasNextPage: items.length === pageSize };
3487
3820
  }
3488
3821
  /** Fetch one reindex job by id. */
3489
- async getReindexJob(reindexJobId, auth2 = SERVICE21) {
3822
+ async getReindexJob(reindexJobId, auth2 = SERVICE22) {
3490
3823
  return this.ctx.http.request({
3491
3824
  method: "GET",
3492
3825
  path: `${this.base()}/reindex-jobs/${encodeURIComponent(reindexJobId)}`,
@@ -3498,13 +3831,13 @@ var IndexingService = class {
3498
3831
  * @deprecated since 2026-06-18, removal 2026-12-01 — use {@link createReindexJob}
3499
3832
  * (`createReindexJob({ entityType: "PRODUCT" })`), which returns a trackable job.
3500
3833
  */
3501
- async reindex(input, auth2 = SERVICE21) {
3834
+ async reindex(input, auth2 = SERVICE22) {
3502
3835
  await this.ctx.http.request({ method: "POST", path: `${this.base()}/reindex`, auth: auth2, body: input });
3503
3836
  }
3504
3837
  };
3505
3838
 
3506
3839
  // src/services/unit-handling.ts
3507
- var SERVICE22 = { kind: "service" };
3840
+ var SERVICE23 = { kind: "service" };
3508
3841
  var UnitHandlingService = class {
3509
3842
  constructor(ctx) {
3510
3843
  this.ctx = ctx;
@@ -3515,7 +3848,7 @@ var UnitHandlingService = class {
3515
3848
  return `/unit-handling/${this.ctx.tenant}`;
3516
3849
  }
3517
3850
  /** Find units (filter/sort/page). */
3518
- async listUnits(query = {}, auth2 = SERVICE22) {
3851
+ async listUnits(query = {}, auth2 = SERVICE23) {
3519
3852
  return this.ctx.http.request({
3520
3853
  method: "GET",
3521
3854
  path: `${this.base()}/units`,
@@ -3524,7 +3857,7 @@ var UnitHandlingService = class {
3524
3857
  });
3525
3858
  }
3526
3859
  /** Retrieve a unit by code. */
3527
- async getUnit(unitCode, auth2 = SERVICE22) {
3860
+ async getUnit(unitCode, auth2 = SERVICE23) {
3528
3861
  return this.ctx.http.request({
3529
3862
  method: "GET",
3530
3863
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -3532,11 +3865,11 @@ var UnitHandlingService = class {
3532
3865
  });
3533
3866
  }
3534
3867
  /** Add a new unit. */
3535
- async createUnit(input, auth2 = SERVICE22) {
3868
+ async createUnit(input, auth2 = SERVICE23) {
3536
3869
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/units`, auth: auth2, body: input });
3537
3870
  }
3538
3871
  /** Update a unit by code. */
3539
- async updateUnit(unitCode, input, auth2 = SERVICE22) {
3872
+ async updateUnit(unitCode, input, auth2 = SERVICE23) {
3540
3873
  await this.ctx.http.request({
3541
3874
  method: "PUT",
3542
3875
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -3545,7 +3878,7 @@ var UnitHandlingService = class {
3545
3878
  });
3546
3879
  }
3547
3880
  /** Delete a unit by code. */
3548
- async deleteUnit(unitCode, auth2 = SERVICE22) {
3881
+ async deleteUnit(unitCode, auth2 = SERVICE23) {
3549
3882
  await this.ctx.http.request({
3550
3883
  method: "DELETE",
3551
3884
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -3553,7 +3886,7 @@ var UnitHandlingService = class {
3553
3886
  });
3554
3887
  }
3555
3888
  /** Delete multiple units by code (bulk). The codes are sent as the request body. */
3556
- async deleteUnits(codes, auth2 = SERVICE22) {
3889
+ async deleteUnits(codes, auth2 = SERVICE23) {
3557
3890
  await this.ctx.http.request({
3558
3891
  method: "DELETE",
3559
3892
  path: `${this.base()}/units`,
@@ -3562,7 +3895,7 @@ var UnitHandlingService = class {
3562
3895
  });
3563
3896
  }
3564
3897
  /** Fetch a conversion factor (`PUT /units/conversion-factor-commands`). */
3565
- async getConversionFactor(input, auth2 = SERVICE22) {
3898
+ async getConversionFactor(input, auth2 = SERVICE23) {
3566
3899
  return this.ctx.http.request({
3567
3900
  method: "PUT",
3568
3901
  path: `${this.base()}/units/conversion-factor-commands`,
@@ -3571,7 +3904,7 @@ var UnitHandlingService = class {
3571
3904
  });
3572
3905
  }
3573
3906
  /** Convert a value between units (`PUT /units/convert-unit-commands`). */
3574
- async convertUnit(input, auth2 = SERVICE22) {
3907
+ async convertUnit(input, auth2 = SERVICE23) {
3575
3908
  return this.ctx.http.request({
3576
3909
  method: "PUT",
3577
3910
  path: `${this.base()}/units/convert-unit-commands`,
@@ -3580,13 +3913,13 @@ var UnitHandlingService = class {
3580
3913
  });
3581
3914
  }
3582
3915
  /** List all unit types. */
3583
- async listUnitTypes(auth2 = SERVICE22) {
3916
+ async listUnitTypes(auth2 = SERVICE23) {
3584
3917
  return this.ctx.http.request({ method: "GET", path: `${this.base()}/types`, auth: auth2 });
3585
3918
  }
3586
3919
  };
3587
3920
 
3588
3921
  // src/services/catalog.ts
3589
- var SERVICE23 = { kind: "service" };
3922
+ var SERVICE24 = { kind: "service" };
3590
3923
  var CatalogService = class {
3591
3924
  constructor(ctx) {
3592
3925
  this.ctx = ctx;
@@ -3597,7 +3930,7 @@ var CatalogService = class {
3597
3930
  return `/catalog/${this.ctx.tenant}/catalogs`;
3598
3931
  }
3599
3932
  /** List catalogs (filtered/sorted). */
3600
- async listCatalogs(query = {}, auth2 = SERVICE23) {
3933
+ async listCatalogs(query = {}, auth2 = SERVICE24) {
3601
3934
  return this.ctx.http.request({
3602
3935
  method: "GET",
3603
3936
  path: this.base(),
@@ -3606,7 +3939,7 @@ var CatalogService = class {
3606
3939
  });
3607
3940
  }
3608
3941
  /** Retrieve a catalog by id. */
3609
- async getCatalog(catalogId, auth2 = SERVICE23) {
3942
+ async getCatalog(catalogId, auth2 = SERVICE24) {
3610
3943
  return this.ctx.http.request({
3611
3944
  method: "GET",
3612
3945
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -3614,7 +3947,7 @@ var CatalogService = class {
3614
3947
  });
3615
3948
  }
3616
3949
  /** Retrieve all catalogs that contain a category. */
3617
- async getCatalogsForCategory(categoryId, auth2 = SERVICE23) {
3950
+ async getCatalogsForCategory(categoryId, auth2 = SERVICE24) {
3618
3951
  return this.ctx.http.request({
3619
3952
  method: "GET",
3620
3953
  path: `${this.base()}/categories/${encodeURIComponent(categoryId)}`,
@@ -3622,11 +3955,11 @@ var CatalogService = class {
3622
3955
  });
3623
3956
  }
3624
3957
  /** Create a catalog. */
3625
- async createCatalog(input, auth2 = SERVICE23) {
3958
+ async createCatalog(input, auth2 = SERVICE24) {
3626
3959
  return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
3627
3960
  }
3628
3961
  /** Upsert a catalog by id (`PUT`). */
3629
- async updateCatalog(catalogId, input, auth2 = SERVICE23) {
3962
+ async updateCatalog(catalogId, input, auth2 = SERVICE24) {
3630
3963
  return this.ctx.http.request({
3631
3964
  method: "PUT",
3632
3965
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -3635,7 +3968,7 @@ var CatalogService = class {
3635
3968
  });
3636
3969
  }
3637
3970
  /** Partially update a catalog by id (`PATCH`). */
3638
- async patchCatalog(catalogId, patch, auth2 = SERVICE23) {
3971
+ async patchCatalog(catalogId, patch, auth2 = SERVICE24) {
3639
3972
  await this.ctx.http.request({
3640
3973
  method: "PATCH",
3641
3974
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -3644,7 +3977,7 @@ var CatalogService = class {
3644
3977
  });
3645
3978
  }
3646
3979
  /** Remove a catalog by id. */
3647
- async deleteCatalog(catalogId, auth2 = SERVICE23) {
3980
+ async deleteCatalog(catalogId, auth2 = SERVICE24) {
3648
3981
  await this.ctx.http.request({
3649
3982
  method: "DELETE",
3650
3983
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -3654,7 +3987,7 @@ var CatalogService = class {
3654
3987
  };
3655
3988
 
3656
3989
  // src/services/vendor.ts
3657
- var SERVICE24 = { kind: "service" };
3990
+ var SERVICE25 = { kind: "service" };
3658
3991
  var VendorService = class {
3659
3992
  constructor(ctx) {
3660
3993
  this.ctx = ctx;
@@ -3666,7 +3999,7 @@ var VendorService = class {
3666
3999
  }
3667
4000
  // --- Vendors ---
3668
4001
  /** List all vendors. */
3669
- async listVendors(query = {}, auth2 = SERVICE24) {
4002
+ async listVendors(query = {}, auth2 = SERVICE25) {
3670
4003
  return this.ctx.http.request({
3671
4004
  method: "GET",
3672
4005
  path: `${this.base()}/vendors`,
@@ -3675,7 +4008,7 @@ var VendorService = class {
3675
4008
  });
3676
4009
  }
3677
4010
  /** Retrieve a vendor by id. */
3678
- async getVendor(vendorId, auth2 = SERVICE24) {
4011
+ async getVendor(vendorId, auth2 = SERVICE25) {
3679
4012
  return this.ctx.http.request({
3680
4013
  method: "GET",
3681
4014
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -3683,7 +4016,7 @@ var VendorService = class {
3683
4016
  });
3684
4017
  }
3685
4018
  /** Search vendors (`POST /vendors/search`). A built filter in `q` is resolved to a string. */
3686
- async searchVendors(query, auth2 = SERVICE24) {
4019
+ async searchVendors(query, auth2 = SERVICE25) {
3687
4020
  const body = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
3688
4021
  return this.ctx.http.request({
3689
4022
  method: "POST",
@@ -3693,11 +4026,11 @@ var VendorService = class {
3693
4026
  });
3694
4027
  }
3695
4028
  /** Create a vendor. */
3696
- async createVendor(input, auth2 = SERVICE24) {
4029
+ async createVendor(input, auth2 = SERVICE25) {
3697
4030
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/vendors`, auth: auth2, body: input });
3698
4031
  }
3699
4032
  /** Upsert a vendor by id (`PUT`). */
3700
- async updateVendor(vendorId, input, auth2 = SERVICE24) {
4033
+ async updateVendor(vendorId, input, auth2 = SERVICE25) {
3701
4034
  await this.ctx.http.request({
3702
4035
  method: "PUT",
3703
4036
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -3706,7 +4039,7 @@ var VendorService = class {
3706
4039
  });
3707
4040
  }
3708
4041
  /** Delete a vendor by id. */
3709
- async deleteVendor(vendorId, auth2 = SERVICE24) {
4042
+ async deleteVendor(vendorId, auth2 = SERVICE25) {
3710
4043
  await this.ctx.http.request({
3711
4044
  method: "DELETE",
3712
4045
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -3715,7 +4048,7 @@ var VendorService = class {
3715
4048
  }
3716
4049
  // --- Vendor locations ---
3717
4050
  /** List all vendor locations. */
3718
- async listVendorLocations(query = {}, auth2 = SERVICE24) {
4051
+ async listVendorLocations(query = {}, auth2 = SERVICE25) {
3719
4052
  return this.ctx.http.request({
3720
4053
  method: "GET",
3721
4054
  path: `${this.base()}/locations`,
@@ -3724,7 +4057,7 @@ var VendorService = class {
3724
4057
  });
3725
4058
  }
3726
4059
  /** Retrieve a vendor location by id. */
3727
- async getVendorLocation(locationId, auth2 = SERVICE24) {
4060
+ async getVendorLocation(locationId, auth2 = SERVICE25) {
3728
4061
  return this.ctx.http.request({
3729
4062
  method: "GET",
3730
4063
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -3732,11 +4065,11 @@ var VendorService = class {
3732
4065
  });
3733
4066
  }
3734
4067
  /** Create a vendor location. */
3735
- async createVendorLocation(input, auth2 = SERVICE24) {
4068
+ async createVendorLocation(input, auth2 = SERVICE25) {
3736
4069
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/locations`, auth: auth2, body: input });
3737
4070
  }
3738
4071
  /** Upsert a vendor location by id (`PUT`). */
3739
- async updateVendorLocation(locationId, input, auth2 = SERVICE24) {
4072
+ async updateVendorLocation(locationId, input, auth2 = SERVICE25) {
3740
4073
  await this.ctx.http.request({
3741
4074
  method: "PUT",
3742
4075
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -3745,7 +4078,7 @@ var VendorService = class {
3745
4078
  });
3746
4079
  }
3747
4080
  /** Delete a vendor location by id. */
3748
- async deleteVendorLocation(locationId, auth2 = SERVICE24) {
4081
+ async deleteVendorLocation(locationId, auth2 = SERVICE25) {
3749
4082
  await this.ctx.http.request({
3750
4083
  method: "DELETE",
3751
4084
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -3755,7 +4088,7 @@ var VendorService = class {
3755
4088
  };
3756
4089
 
3757
4090
  // src/services/pick-pack.ts
3758
- var SERVICE25 = { kind: "service" };
4091
+ var SERVICE26 = { kind: "service" };
3759
4092
  var PickPackService = class {
3760
4093
  constructor(ctx) {
3761
4094
  this.ctx = ctx;
@@ -3769,7 +4102,7 @@ var PickPackService = class {
3769
4102
  return `${this.base()}/orders/${encodeURIComponent(orderId)}`;
3770
4103
  }
3771
4104
  /** List packlist orders. */
3772
- async listOrders(query = {}, auth2 = SERVICE25) {
4105
+ async listOrders(query = {}, auth2 = SERVICE26) {
3773
4106
  return this.ctx.http.request({
3774
4107
  method: "GET",
3775
4108
  path: `${this.base()}/orders`,
@@ -3778,19 +4111,19 @@ var PickPackService = class {
3778
4111
  });
3779
4112
  }
3780
4113
  /** Retrieve a packlist order by id. */
3781
- async getOrder(orderId, auth2 = SERVICE25) {
4114
+ async getOrder(orderId, auth2 = SERVICE26) {
3782
4115
  return this.ctx.http.request({ method: "GET", path: this.orderPath(orderId), auth: auth2 });
3783
4116
  }
3784
4117
  /** Update an order's status (`PATCH`). Returns an acknowledgement. */
3785
- async updateOrder(orderId, change, auth2 = SERVICE25) {
4118
+ async updateOrder(orderId, change, auth2 = SERVICE26) {
3786
4119
  return this.ctx.http.request({ method: "PATCH", path: this.orderPath(orderId), auth: auth2, body: change });
3787
4120
  }
3788
4121
  /** Finish an order. Returns an acknowledgement. */
3789
- async finishOrder(orderId, auth2 = SERVICE25) {
4122
+ async finishOrder(orderId, auth2 = SERVICE26) {
3790
4123
  return this.ctx.http.request({ method: "POST", path: `${this.orderPath(orderId)}/finish`, auth: auth2 });
3791
4124
  }
3792
4125
  /** List order cycles (ids). */
3793
- async listOrderCycles(query = {}, auth2 = SERVICE25) {
4126
+ async listOrderCycles(query = {}, auth2 = SERVICE26) {
3794
4127
  return this.ctx.http.request({
3795
4128
  method: "GET",
3796
4129
  path: `${this.base()}/orderCycles`,
@@ -3799,11 +4132,11 @@ var PickPackService = class {
3799
4132
  });
3800
4133
  }
3801
4134
  /** Add an assignee to an order. Returns an acknowledgement. */
3802
- async addAssignee(orderId, assignee, auth2 = SERVICE25) {
4135
+ async addAssignee(orderId, assignee, auth2 = SERVICE26) {
3803
4136
  return this.ctx.http.request({ method: "POST", path: `${this.orderPath(orderId)}/assignees`, auth: auth2, body: assignee });
3804
4137
  }
3805
4138
  /** Remove an assignee from an order. */
3806
- async removeAssignee(orderId, assigneeId, auth2 = SERVICE25) {
4139
+ async removeAssignee(orderId, assigneeId, auth2 = SERVICE26) {
3807
4140
  await this.ctx.http.request({
3808
4141
  method: "DELETE",
3809
4142
  path: `${this.orderPath(orderId)}/assignees/${encodeURIComponent(assigneeId)}`,
@@ -3811,15 +4144,15 @@ var PickPackService = class {
3811
4144
  });
3812
4145
  }
3813
4146
  /** Update packaging products for an order (`PUT`). Returns an acknowledgement. */
3814
- async updatePackaging(orderId, change, auth2 = SERVICE25) {
4147
+ async updatePackaging(orderId, change, auth2 = SERVICE26) {
3815
4148
  return this.ctx.http.request({ method: "PUT", path: `${this.orderPath(orderId)}/packaging`, auth: auth2, body: change });
3816
4149
  }
3817
4150
  /** Create a packing event. Returns an acknowledgement. */
3818
- async createEvent(event, auth2 = SERVICE25) {
4151
+ async createEvent(event, auth2 = SERVICE26) {
3819
4152
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/events`, auth: auth2, body: event });
3820
4153
  }
3821
4154
  /** List packing events. */
3822
- async listEvents(query = {}, auth2 = SERVICE25) {
4155
+ async listEvents(query = {}, auth2 = SERVICE26) {
3823
4156
  return this.ctx.http.request({
3824
4157
  method: "GET",
3825
4158
  path: `${this.base()}/events`,
@@ -3828,7 +4161,7 @@ var PickPackService = class {
3828
4161
  });
3829
4162
  }
3830
4163
  /** Trigger an order recalculation. Returns the created job's id. */
3831
- async triggerRecalculation(input, auth2 = SERVICE25) {
4164
+ async triggerRecalculation(input, auth2 = SERVICE26) {
3832
4165
  return this.ctx.http.request({
3833
4166
  method: "POST",
3834
4167
  path: `${this.base()}/jobs/recalculations`,
@@ -3837,7 +4170,7 @@ var PickPackService = class {
3837
4170
  });
3838
4171
  }
3839
4172
  /** Retrieve a recalculation job by id. */
3840
- async getRecalculationJob(jobId, auth2 = SERVICE25) {
4173
+ async getRecalculationJob(jobId, auth2 = SERVICE26) {
3841
4174
  return this.ctx.http.request({
3842
4175
  method: "GET",
3843
4176
  path: `${this.base()}/jobs/recalculations/${encodeURIComponent(jobId)}`,
@@ -3847,7 +4180,7 @@ var PickPackService = class {
3847
4180
  };
3848
4181
 
3849
4182
  // src/services/customer-admin.ts
3850
- var SERVICE26 = { kind: "service" };
4183
+ var SERVICE27 = { kind: "service" };
3851
4184
  var CustomerAdminService = class {
3852
4185
  constructor(ctx) {
3853
4186
  this.ctx = ctx;
@@ -3865,7 +4198,7 @@ var CustomerAdminService = class {
3865
4198
  }
3866
4199
  // --- Customers ---
3867
4200
  /** List customers. */
3868
- async listCustomers(query = {}, auth2 = SERVICE26) {
4201
+ async listCustomers(query = {}, auth2 = SERVICE27) {
3869
4202
  return this.ctx.http.request({
3870
4203
  method: "GET",
3871
4204
  path: this.base(),
@@ -3874,33 +4207,33 @@ var CustomerAdminService = class {
3874
4207
  });
3875
4208
  }
3876
4209
  /** Search customers (`POST /customers/search`). A built filter in `q` is resolved to a string. */
3877
- async searchCustomers(query, auth2 = SERVICE26) {
4210
+ async searchCustomers(query, auth2 = SERVICE27) {
3878
4211
  const body = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
3879
4212
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/search`, auth: auth2, body });
3880
4213
  }
3881
4214
  /** Retrieve a customer profile by number. */
3882
- async getCustomer(customerNumber, auth2 = SERVICE26) {
4215
+ async getCustomer(customerNumber, auth2 = SERVICE27) {
3883
4216
  return this.ctx.http.request({ method: "GET", path: this.customerPath(customerNumber), auth: auth2 });
3884
4217
  }
3885
4218
  /** Create a customer. */
3886
- async createCustomer(input, auth2 = SERVICE26) {
4219
+ async createCustomer(input, auth2 = SERVICE27) {
3887
4220
  return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
3888
4221
  }
3889
4222
  /** Upsert a customer profile by number (`PUT`). */
3890
- async upsertCustomer(customerNumber, input, auth2 = SERVICE26) {
4223
+ async upsertCustomer(customerNumber, input, auth2 = SERVICE27) {
3891
4224
  return this.ctx.http.request({ method: "PUT", path: this.customerPath(customerNumber), auth: auth2, body: input });
3892
4225
  }
3893
4226
  /** Partially update a customer profile (`PATCH`). */
3894
- async patchCustomer(customerNumber, patch, auth2 = SERVICE26) {
4227
+ async patchCustomer(customerNumber, patch, auth2 = SERVICE27) {
3895
4228
  await this.ctx.http.request({ method: "PATCH", path: this.customerPath(customerNumber), auth: auth2, body: patch });
3896
4229
  }
3897
4230
  /** Delete a customer profile. */
3898
- async deleteCustomer(customerNumber, auth2 = SERVICE26) {
4231
+ async deleteCustomer(customerNumber, auth2 = SERVICE27) {
3899
4232
  await this.ctx.http.request({ method: "DELETE", path: this.customerPath(customerNumber), auth: auth2 });
3900
4233
  }
3901
4234
  // --- Addresses ---
3902
4235
  /** List a customer's addresses. */
3903
- async listAddresses(customerNumber, auth2 = SERVICE26) {
4236
+ async listAddresses(customerNumber, auth2 = SERVICE27) {
3904
4237
  return this.ctx.http.request({
3905
4238
  method: "GET",
3906
4239
  path: `${this.customerPath(customerNumber)}/addresses`,
@@ -3908,11 +4241,11 @@ var CustomerAdminService = class {
3908
4241
  });
3909
4242
  }
3910
4243
  /** Retrieve one address. */
3911
- async getAddress(customerNumber, addressId, auth2 = SERVICE26) {
4244
+ async getAddress(customerNumber, addressId, auth2 = SERVICE27) {
3912
4245
  return this.ctx.http.request({ method: "GET", path: this.addressPath(customerNumber, addressId), auth: auth2 });
3913
4246
  }
3914
4247
  /** Add an address. */
3915
- async addAddress(customerNumber, input, auth2 = SERVICE26) {
4248
+ async addAddress(customerNumber, input, auth2 = SERVICE27) {
3916
4249
  return this.ctx.http.request({
3917
4250
  method: "POST",
3918
4251
  path: `${this.customerPath(customerNumber)}/addresses`,
@@ -3921,19 +4254,19 @@ var CustomerAdminService = class {
3921
4254
  });
3922
4255
  }
3923
4256
  /** Upsert an address by id (`PUT`). */
3924
- async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE26) {
4257
+ async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE27) {
3925
4258
  return this.ctx.http.request({ method: "PUT", path: this.addressPath(customerNumber, addressId), auth: auth2, body: input });
3926
4259
  }
3927
4260
  /** Partially update an address by id (`PATCH`). */
3928
- async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE26) {
4261
+ async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE27) {
3929
4262
  await this.ctx.http.request({ method: "PATCH", path: this.addressPath(customerNumber, addressId), auth: auth2, body: patch });
3930
4263
  }
3931
4264
  /** Delete an address by id. */
3932
- async deleteAddress(customerNumber, addressId, auth2 = SERVICE26) {
4265
+ async deleteAddress(customerNumber, addressId, auth2 = SERVICE27) {
3933
4266
  await this.ctx.http.request({ method: "DELETE", path: this.addressPath(customerNumber, addressId), auth: auth2 });
3934
4267
  }
3935
4268
  /** Add tags to an address (`?tags=` query). */
3936
- async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE26) {
4269
+ async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE27) {
3937
4270
  await this.ctx.http.request({
3938
4271
  method: "POST",
3939
4272
  path: `${this.addressPath(customerNumber, addressId)}/tags`,
@@ -3942,7 +4275,7 @@ var CustomerAdminService = class {
3942
4275
  });
3943
4276
  }
3944
4277
  /** Remove tags from an address (`?tags=` query). */
3945
- async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE26) {
4278
+ async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE27) {
3946
4279
  await this.ctx.http.request({
3947
4280
  method: "DELETE",
3948
4281
  path: `${this.addressPath(customerNumber, addressId)}/tags`,
@@ -3953,7 +4286,7 @@ var CustomerAdminService = class {
3953
4286
  };
3954
4287
 
3955
4288
  // src/services/approval.ts
3956
- var SERVICE27 = { kind: "service" };
4289
+ var SERVICE28 = { kind: "service" };
3957
4290
  var ApprovalService = class {
3958
4291
  constructor(ctx) {
3959
4292
  this.ctx = ctx;
@@ -3964,7 +4297,7 @@ var ApprovalService = class {
3964
4297
  return `/approval/${this.ctx.tenant}`;
3965
4298
  }
3966
4299
  /** List approvals (paged via `pageNumber`/`pageSize`/`sort`/`q`). Returns an array. */
3967
- async listApprovals(query = {}, auth2 = SERVICE27) {
4300
+ async listApprovals(query = {}, auth2 = SERVICE28) {
3968
4301
  return this.ctx.http.request({
3969
4302
  method: "GET",
3970
4303
  path: `${this.base()}/approvals`,
@@ -3973,7 +4306,7 @@ var ApprovalService = class {
3973
4306
  });
3974
4307
  }
3975
4308
  /** Retrieve a single approval by id. */
3976
- async getApproval(approvalId, auth2 = SERVICE27) {
4309
+ async getApproval(approvalId, auth2 = SERVICE28) {
3977
4310
  return this.ctx.http.request({
3978
4311
  method: "GET",
3979
4312
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -3981,7 +4314,7 @@ var ApprovalService = class {
3981
4314
  });
3982
4315
  }
3983
4316
  /** Create an approval request (cart or quote). Returns the created `{ id }`. */
3984
- async createApproval(input, auth2 = SERVICE27) {
4317
+ async createApproval(input, auth2 = SERVICE28) {
3985
4318
  return this.ctx.http.request({
3986
4319
  method: "POST",
3987
4320
  path: `${this.base()}/approvals`,
@@ -3990,7 +4323,7 @@ var ApprovalService = class {
3990
4323
  });
3991
4324
  }
3992
4325
  /** Approve/reject/amend an approval via a JSON-Patch op-array (`PATCH`). */
3993
- async updateApproval(approvalId, ops, auth2 = SERVICE27) {
4326
+ async updateApproval(approvalId, ops, auth2 = SERVICE28) {
3994
4327
  await this.ctx.http.request({
3995
4328
  method: "PATCH",
3996
4329
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -3999,7 +4332,7 @@ var ApprovalService = class {
3999
4332
  });
4000
4333
  }
4001
4334
  /** Delete an approval by id. */
4002
- async deleteApproval(approvalId, auth2 = SERVICE27) {
4335
+ async deleteApproval(approvalId, auth2 = SERVICE28) {
4003
4336
  await this.ctx.http.request({
4004
4337
  method: "DELETE",
4005
4338
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -4007,7 +4340,7 @@ var ApprovalService = class {
4007
4340
  });
4008
4341
  }
4009
4342
  /** Check whether an operation on a resource is permitted / needs approval. */
4010
- async checkPermitted(input, auth2 = SERVICE27) {
4343
+ async checkPermitted(input, auth2 = SERVICE28) {
4011
4344
  return this.ctx.http.request({
4012
4345
  method: "POST",
4013
4346
  path: `${this.base()}/approval/permitted`,
@@ -4016,7 +4349,7 @@ var ApprovalService = class {
4016
4349
  });
4017
4350
  }
4018
4351
  /** Search for users eligible to approve a resource. Returns an array. */
4019
- async searchApprovers(input, auth2 = SERVICE27) {
4352
+ async searchApprovers(input, auth2 = SERVICE28) {
4020
4353
  return this.ctx.http.request({
4021
4354
  method: "POST",
4022
4355
  path: `${this.base()}/search/users`,
@@ -4043,6 +4376,7 @@ var EmporixClient = class {
4043
4376
  contacts;
4044
4377
  locations;
4045
4378
  customerGroups;
4379
+ iam;
4046
4380
  orders;
4047
4381
  salesOrders;
4048
4382
  availability;
@@ -4116,6 +4450,7 @@ var EmporixClient = class {
4116
4450
  this.contacts = new ContactsService(mk(ContactsService.channel));
4117
4451
  this.locations = new LocationsService(mk(LocationsService.channel));
4118
4452
  this.customerGroups = new CustomerGroupsService(mk(CustomerGroupsService.channel));
4453
+ this.iam = new IamService(mk(IamService.channel));
4119
4454
  this.orders = new OrdersService(mk(OrdersService.channel));
4120
4455
  this.salesOrders = new SalesOrdersService(mk(SalesOrdersService.channel));
4121
4456
  this.availability = new AvailabilityService(mk(AvailabilityService.channel));