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