@commercelayer/provisioning-sdk 2.10.2 → 3.0.0-beta.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 (199) hide show
  1. package/LICENSE +1 -1
  2. package/lib/actions.cjs +4 -0
  3. package/lib/actions.cjs.map +1 -0
  4. package/lib/actions.d.cts +15 -0
  5. package/lib/actions.d.ts +15 -0
  6. package/lib/actions.js +3 -0
  7. package/lib/actions.js.map +1 -0
  8. package/lib/{index.d.mts → api-BY0jb79k.d.cts} +540 -496
  9. package/lib/api-e4p3q-SB.d.ts +1636 -0
  10. package/lib/api.cjs +62 -0
  11. package/lib/api.cjs.map +1 -0
  12. package/lib/api.d.cts +2 -0
  13. package/lib/api.d.ts +2 -0
  14. package/lib/api.js +17 -0
  15. package/lib/api.js.map +1 -0
  16. package/lib/binding.cjs +14 -0
  17. package/lib/binding.cjs.map +1 -0
  18. package/lib/binding.d.cts +21 -0
  19. package/lib/binding.d.ts +21 -0
  20. package/lib/binding.js +5 -0
  21. package/lib/binding.js.map +1 -0
  22. package/lib/bundle.cjs +34 -0
  23. package/lib/bundle.cjs.map +1 -0
  24. package/lib/bundle.d.cts +27 -0
  25. package/lib/bundle.d.ts +25 -0
  26. package/lib/bundle.js +19 -0
  27. package/lib/bundle.js.map +1 -0
  28. package/lib/chunk-35GNS3WW.js +57 -0
  29. package/lib/chunk-35GNS3WW.js.map +1 -0
  30. package/lib/chunk-3ELZDTFF.js +41 -0
  31. package/lib/chunk-3ELZDTFF.js.map +1 -0
  32. package/lib/chunk-3FP4NVLD.cjs +16 -0
  33. package/lib/chunk-3FP4NVLD.cjs.map +1 -0
  34. package/lib/chunk-3XLKYXM6.cjs +84 -0
  35. package/lib/chunk-3XLKYXM6.cjs.map +1 -0
  36. package/lib/chunk-4Z4U45XQ.js +808 -0
  37. package/lib/chunk-4Z4U45XQ.js.map +1 -0
  38. package/lib/chunk-5KN7B3T2.cjs +118 -0
  39. package/lib/chunk-5KN7B3T2.cjs.map +1 -0
  40. package/lib/chunk-63TTSE4U.cjs +93 -0
  41. package/lib/chunk-63TTSE4U.cjs.map +1 -0
  42. package/lib/chunk-6I5KGZAU.js +90 -0
  43. package/lib/chunk-6I5KGZAU.js.map +1 -0
  44. package/lib/chunk-7OPCEEJV.cjs +88 -0
  45. package/lib/chunk-7OPCEEJV.cjs.map +1 -0
  46. package/lib/chunk-BWDFMGX6.cjs +84 -0
  47. package/lib/chunk-BWDFMGX6.cjs.map +1 -0
  48. package/lib/chunk-C6AOOHOR.cjs +61 -0
  49. package/lib/chunk-C6AOOHOR.cjs.map +1 -0
  50. package/lib/chunk-CFU5DNH2.cjs +19 -0
  51. package/lib/chunk-CFU5DNH2.cjs.map +1 -0
  52. package/lib/chunk-CLOSZJSZ.cjs +66 -0
  53. package/lib/chunk-CLOSZJSZ.cjs.map +1 -0
  54. package/lib/chunk-DTD2FIJ3.js +17 -0
  55. package/lib/chunk-DTD2FIJ3.js.map +1 -0
  56. package/lib/chunk-E2ERI2EX.js +114 -0
  57. package/lib/chunk-E2ERI2EX.js.map +1 -0
  58. package/lib/chunk-ELYBYKRM.cjs +32 -0
  59. package/lib/chunk-ELYBYKRM.cjs.map +1 -0
  60. package/lib/chunk-F2RLD5SN.cjs +816 -0
  61. package/lib/chunk-F2RLD5SN.cjs.map +1 -0
  62. package/lib/chunk-FOU52N6P.js +86 -0
  63. package/lib/chunk-FOU52N6P.js.map +1 -0
  64. package/lib/chunk-FWF7HBWB.js +78 -0
  65. package/lib/chunk-FWF7HBWB.js.map +1 -0
  66. package/lib/chunk-GES5UXTI.js +64 -0
  67. package/lib/chunk-GES5UXTI.js.map +1 -0
  68. package/lib/chunk-HAZ53WDW.cjs +26 -0
  69. package/lib/chunk-HAZ53WDW.cjs.map +1 -0
  70. package/lib/chunk-HOL7SMFN.cjs +59 -0
  71. package/lib/chunk-HOL7SMFN.cjs.map +1 -0
  72. package/lib/chunk-IW2T22VR.js +3 -0
  73. package/lib/chunk-IW2T22VR.js.map +1 -0
  74. package/lib/chunk-N567T7FT.cjs +4 -0
  75. package/lib/chunk-N567T7FT.cjs.map +1 -0
  76. package/lib/chunk-QRZGS4TB.js +30 -0
  77. package/lib/chunk-QRZGS4TB.js.map +1 -0
  78. package/lib/chunk-RDLVNJEW.js +82 -0
  79. package/lib/chunk-RDLVNJEW.js.map +1 -0
  80. package/lib/chunk-U2CAAK2J.js +59 -0
  81. package/lib/chunk-U2CAAK2J.js.map +1 -0
  82. package/lib/chunk-UB3WPGDV.js +12 -0
  83. package/lib/chunk-UB3WPGDV.js.map +1 -0
  84. package/lib/chunk-UYATAIX7.js +24 -0
  85. package/lib/chunk-UYATAIX7.js.map +1 -0
  86. package/lib/chunk-VAL4CE5R.js +82 -0
  87. package/lib/chunk-VAL4CE5R.js.map +1 -0
  88. package/lib/chunk-VFTFSHXQ.cjs +88 -0
  89. package/lib/chunk-VFTFSHXQ.cjs.map +1 -0
  90. package/lib/chunk-W6XILXYS.cjs +61 -0
  91. package/lib/chunk-W6XILXYS.cjs.map +1 -0
  92. package/lib/chunk-WRVLCJQZ.cjs +43 -0
  93. package/lib/chunk-WRVLCJQZ.cjs.map +1 -0
  94. package/lib/chunk-YS5PCY5D.js +76 -0
  95. package/lib/chunk-YS5PCY5D.js.map +1 -0
  96. package/lib/chunk-YYHZPR4Z.js +59 -0
  97. package/lib/chunk-YYHZPR4Z.js.map +1 -0
  98. package/lib/chunk-Z4IAVXOO.cjs +80 -0
  99. package/lib/chunk-Z4IAVXOO.cjs.map +1 -0
  100. package/lib/commercelayer.cjs +38 -0
  101. package/lib/commercelayer.cjs.map +1 -0
  102. package/lib/commercelayer.d.cts +58 -0
  103. package/lib/commercelayer.d.ts +56 -0
  104. package/lib/commercelayer.js +7 -0
  105. package/lib/commercelayer.js.map +1 -0
  106. package/lib/enum.cjs +52 -0
  107. package/lib/enum.cjs.map +1 -0
  108. package/lib/enum.d.cts +2 -0
  109. package/lib/enum.d.ts +2 -0
  110. package/lib/enum.js +3 -0
  111. package/lib/enum.js.map +1 -0
  112. package/lib/error-CVRdwnY9.d.cts +33 -0
  113. package/lib/error-CVRdwnY9.d.ts +33 -0
  114. package/lib/index.cjs +57 -0
  115. package/lib/index.cjs.map +1 -0
  116. package/lib/index.d.cts +14 -0
  117. package/lib/index.d.ts +9 -1591
  118. package/lib/index.js +26 -1
  119. package/lib/index.js.map +1 -0
  120. package/lib/model.cjs +4 -0
  121. package/lib/model.cjs.map +1 -0
  122. package/lib/model.d.cts +2 -0
  123. package/lib/model.d.ts +2 -0
  124. package/lib/model.js +3 -0
  125. package/lib/model.js.map +1 -0
  126. package/lib/resources/api_credentials.cjs +15 -0
  127. package/lib/resources/api_credentials.cjs.map +1 -0
  128. package/lib/resources/api_credentials.d.cts +5 -0
  129. package/lib/resources/api_credentials.d.ts +2 -0
  130. package/lib/resources/api_credentials.js +7 -0
  131. package/lib/resources/api_credentials.js.map +1 -0
  132. package/lib/resources/application_memberships.cjs +15 -0
  133. package/lib/resources/application_memberships.cjs.map +1 -0
  134. package/lib/resources/application_memberships.d.cts +5 -0
  135. package/lib/resources/application_memberships.d.ts +2 -0
  136. package/lib/resources/application_memberships.js +7 -0
  137. package/lib/resources/application_memberships.js.map +1 -0
  138. package/lib/resources/identity_providers.cjs +15 -0
  139. package/lib/resources/identity_providers.cjs.map +1 -0
  140. package/lib/resources/identity_providers.d.cts +5 -0
  141. package/lib/resources/identity_providers.d.ts +2 -0
  142. package/lib/resources/identity_providers.js +7 -0
  143. package/lib/resources/identity_providers.js.map +1 -0
  144. package/lib/resources/membership_profiles.cjs +15 -0
  145. package/lib/resources/membership_profiles.cjs.map +1 -0
  146. package/lib/resources/membership_profiles.d.cts +5 -0
  147. package/lib/resources/membership_profiles.d.ts +2 -0
  148. package/lib/resources/membership_profiles.js +7 -0
  149. package/lib/resources/membership_profiles.js.map +1 -0
  150. package/lib/resources/memberships.cjs +15 -0
  151. package/lib/resources/memberships.cjs.map +1 -0
  152. package/lib/resources/memberships.d.cts +5 -0
  153. package/lib/resources/memberships.d.ts +2 -0
  154. package/lib/resources/memberships.js +7 -0
  155. package/lib/resources/memberships.js.map +1 -0
  156. package/lib/resources/organizations.cjs +15 -0
  157. package/lib/resources/organizations.cjs.map +1 -0
  158. package/lib/resources/organizations.d.cts +5 -0
  159. package/lib/resources/organizations.d.ts +2 -0
  160. package/lib/resources/organizations.js +7 -0
  161. package/lib/resources/organizations.js.map +1 -0
  162. package/lib/resources/permissions.cjs +15 -0
  163. package/lib/resources/permissions.cjs.map +1 -0
  164. package/lib/resources/permissions.d.cts +5 -0
  165. package/lib/resources/permissions.d.ts +2 -0
  166. package/lib/resources/permissions.js +7 -0
  167. package/lib/resources/permissions.js.map +1 -0
  168. package/lib/resources/roles.cjs +15 -0
  169. package/lib/resources/roles.cjs.map +1 -0
  170. package/lib/resources/roles.d.cts +5 -0
  171. package/lib/resources/roles.d.ts +2 -0
  172. package/lib/resources/roles.js +7 -0
  173. package/lib/resources/roles.js.map +1 -0
  174. package/lib/resources/users.cjs +15 -0
  175. package/lib/resources/users.cjs.map +1 -0
  176. package/lib/resources/users.d.cts +5 -0
  177. package/lib/resources/users.d.ts +2 -0
  178. package/lib/resources/users.js +7 -0
  179. package/lib/resources/users.js.map +1 -0
  180. package/lib/resources/versions.cjs +15 -0
  181. package/lib/resources/versions.cjs.map +1 -0
  182. package/lib/resources/versions.d.cts +5 -0
  183. package/lib/resources/versions.d.ts +2 -0
  184. package/lib/resources/versions.js +7 -0
  185. package/lib/resources/versions.js.map +1 -0
  186. package/lib/static.cjs +17 -0
  187. package/lib/static.cjs.map +1 -0
  188. package/lib/static.d.cts +18 -0
  189. package/lib/static.d.ts +18 -0
  190. package/lib/static.js +8 -0
  191. package/lib/static.js.map +1 -0
  192. package/lib/version.cjs +20 -0
  193. package/lib/version.cjs.map +1 -0
  194. package/lib/version.d.cts +12 -0
  195. package/lib/version.d.ts +12 -0
  196. package/lib/version.js +3 -0
  197. package/lib/version.js.map +1 -0
  198. package/package.json +36 -26
  199. package/lib/index.mjs +0 -1
@@ -0,0 +1,18 @@
1
+ import { S as SdkError, A as ApiError } from './error-CVRdwnY9.js';
2
+ import { ae as ResourceTypeLock } from './api-e4p3q-SB.js';
3
+ import './actions.js';
4
+
5
+ declare const CommerceLayerProvisioningStatic: {
6
+ resources: (sort?: boolean) => readonly string[];
7
+ singletons: (sort?: boolean) => readonly string[];
8
+ isSingleton: (resource: ResourceTypeLock) => boolean;
9
+ isCreatable: (resource: ResourceTypeLock) => boolean;
10
+ isUpdatable: (resource: ResourceTypeLock) => boolean;
11
+ isDeletable: (resource: ResourceTypeLock) => boolean;
12
+ isSdkError: (error: unknown) => error is SdkError;
13
+ isApiError: (error: unknown) => error is ApiError;
14
+ isTokenExpired: (token: string) => boolean;
15
+ readonly schemaVersion: string;
16
+ };
17
+
18
+ export { CommerceLayerProvisioningStatic };
package/lib/static.js ADDED
@@ -0,0 +1,8 @@
1
+ export { CommerceLayerProvisioningStatic } from './chunk-3ELZDTFF.js';
2
+ import './chunk-E2ERI2EX.js';
3
+ import './chunk-4Z4U45XQ.js';
4
+ import './chunk-DTD2FIJ3.js';
5
+ import './chunk-UB3WPGDV.js';
6
+ import './chunk-YS5PCY5D.js';
7
+ //# sourceMappingURL=static.js.map
8
+ //# sourceMappingURL=static.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"static.js"}
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var chunk3FP4NVLD_cjs = require('./chunk-3FP4NVLD.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "API_SCHEMA_VERSION", {
8
+ enumerable: true,
9
+ get: function () { return chunk3FP4NVLD_cjs.API_SCHEMA_VERSION; }
10
+ });
11
+ Object.defineProperty(exports, "API_SUPPORTED_VERSIONS", {
12
+ enumerable: true,
13
+ get: function () { return chunk3FP4NVLD_cjs.API_SUPPORTED_VERSIONS; }
14
+ });
15
+ Object.defineProperty(exports, "SDK_VERSION", {
16
+ enumerable: true,
17
+ get: function () { return chunk3FP4NVLD_cjs.SDK_VERSION; }
18
+ });
19
+ //# sourceMappingURL=version.cjs.map
20
+ //# sourceMappingURL=version.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"version.cjs"}
@@ -0,0 +1,12 @@
1
+ declare const SDK_VERSION: string;
2
+ declare const API_SCHEMA_VERSION: string;
3
+ declare const API_SUPPORTED_VERSIONS: readonly [];
4
+ /**
5
+ * The API versions this build accepts as the `apiVersion` init option — the
6
+ * union of {@link API_SUPPORTED_VERSIONS}. On a legacy build the tuple is
7
+ * empty, so this resolves to `never` and the option can only be omitted (the
8
+ * legacy API is unversioned).
9
+ */
10
+ type ApiVersion = (typeof API_SUPPORTED_VERSIONS)[number];
11
+
12
+ export { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, type ApiVersion, SDK_VERSION };
@@ -0,0 +1,12 @@
1
+ declare const SDK_VERSION: string;
2
+ declare const API_SCHEMA_VERSION: string;
3
+ declare const API_SUPPORTED_VERSIONS: readonly [];
4
+ /**
5
+ * The API versions this build accepts as the `apiVersion` init option — the
6
+ * union of {@link API_SUPPORTED_VERSIONS}. On a legacy build the tuple is
7
+ * empty, so this resolves to `never` and the option can only be omitted (the
8
+ * legacy API is unversioned).
9
+ */
10
+ type ApiVersion = (typeof API_SUPPORTED_VERSIONS)[number];
11
+
12
+ export { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, type ApiVersion, SDK_VERSION };
package/lib/version.js ADDED
@@ -0,0 +1,3 @@
1
+ export { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, SDK_VERSION } from './chunk-UB3WPGDV.js';
2
+ //# sourceMappingURL=version.js.map
3
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"version.js"}
package/package.json CHANGED
@@ -1,62 +1,72 @@
1
1
  {
2
2
  "name": "@commercelayer/provisioning-sdk",
3
- "version": "2.10.2",
4
- "main": "lib/index.js",
3
+ "version": "3.0.0-beta.0",
4
+ "main": "lib/index.cjs",
5
5
  "types": "lib/index.d.ts",
6
- "module": "lib/index.mjs",
6
+ "module": "lib/index.js",
7
+ "type": "module",
8
+ "sideEffects": false,
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./lib/index.d.ts",
13
+ "default": "./lib/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./lib/index.d.cts",
17
+ "default": "./lib/index.cjs"
18
+ }
19
+ }
20
+ },
7
21
  "scripts": {
8
22
  "clean": "rm -rf ./.nyc_output ./node_modules/.cache ./coverage",
9
23
  "build": "tsup",
10
- "generate": "tsx gen/generator.ts",
11
- "generate-local": "pnpm generate --local",
24
+ "generate": "tsx ../sdk-generator/src/generator.ts && pnpm check",
25
+ "generate-local": "tsx ../sdk-generator/src/generator.ts --local && pnpm check",
12
26
  "lint": "biome check --enforce-assist=true",
13
27
  "check": "biome check --enforce-assist=true --write",
14
- "semantic-release": "semantic-release",
28
+ "ts:check": "tsc --noEmit -p tsconfig.json",
15
29
  "test": "vitest",
16
- "test-local": "tsx test/spot.ts",
17
30
  "coverage": "vitest run --coverage",
18
- "release": "pnpm upgrade && pnpm lint && pnpm build && pnpm test"
31
+ "verify:pack": "publint && attw --pack ."
19
32
  },
20
33
  "keywords": [
21
34
  "javascript",
22
35
  "ecommerce",
36
+ "jamstack",
23
37
  "commercelayer",
24
- "sdk",
25
38
  "provisioning"
26
39
  ],
27
40
  "author": "Pierluigi Viti <pierluigi@commercelayer.io>",
28
41
  "license": "MIT",
29
- "description": "Commerce Layer Provisioning SDK",
42
+ "description": "Commerce Layer Provisioning API Javascript SDK",
30
43
  "files": [
31
44
  "lib/**/*"
32
45
  ],
33
- "sideEffects": false,
34
46
  "engines": {
35
47
  "node": ">=20"
36
48
  },
37
49
  "devDependencies": {
38
- "@biomejs/biome": "2.4.8",
39
- "@commercelayer/js-auth": "^7.3.0",
40
- "@semantic-release/changelog": "^6.0.3",
41
- "@semantic-release/git": "^10.0.1",
50
+ "@arethetypeswrong/cli": "^0.18.2",
51
+ "@biomejs/biome": "^2.5.2",
52
+ "@commercelayer/js-auth": "^7.4.2",
53
+ "@commercelayer/sdk-generator": "0.0.0",
42
54
  "@types/debug": "^4.1.13",
43
- "@types/node": "^25.5.0",
44
- "@vitest/coverage-v8": "^4.1.2",
45
- "dotenv": "^17.4.0",
55
+ "@types/node": "^25.9.4",
56
+ "@vitest/coverage-v8": "^4.1.9",
57
+ "dotenv": "^17.4.2",
46
58
  "json-typescript": "^1.1.2",
47
59
  "jsonapi-typescript": "^0.1.3",
48
- "semantic-release": "^25.0.3",
60
+ "publint": "^0.3.24",
49
61
  "tsup": "^8.5.1",
50
- "tsx": "^4.21.0",
62
+ "tsx": "^4.22.4",
51
63
  "typescript": "^5.9.3",
52
- "vitest": "^4.1.2"
64
+ "vitest": "^4.1.9"
53
65
  },
54
- "repository": "github:commercelayer/provisioning-sdk",
55
- "bugs": "https://github.com/commercelayer/provisioning-sdk/issues",
66
+ "repository": "github:commercelayer/commercelayer-sdk",
67
+ "bugs": "https://github.com/commercelayer/commercelayer-sdk/issues",
56
68
  "publishConfig": {
57
69
  "access": "public"
58
70
  },
59
- "resolutions": {
60
- "ansi-regex": "5.0.1"
61
- }
71
+ "gitHead": "2094ed603562e4e4f22c2102042009cd327d2eb9"
62
72
  }
package/lib/index.mjs DELETED
@@ -1 +0,0 @@
1
- var rr=t=>{throw TypeError(t)};var Rr=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var sr=(t,e,r)=>e.has(t)||rr("Cannot "+r);var n=(t,e,r)=>(sr(t,e,"read from private field"),r?r.call(t):e.get(t)),c=(t,e,r)=>e.has(t)?rr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),l=(t,e,r,s)=>(sr(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r);var gr={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:15e3,requiredAttributes:["accessToken"]},jsonapi:{maxResourceIncluded:2}},b=gr;var hr=(t,...e)=>{},tr=t=>hr;try{let t=Rr("debug");t&&typeof t=="function"&&(tr=t)}catch{}var fr="clsdk",br=t=>tr(`${fr}:${t}`),f=br;var Pe=f("fetch"),H,J,W,ce=class ce extends Error{constructor(r,s,i){super(s);c(this,H);c(this,J);c(this,W);l(this,J,r),l(this,W,s),i&&l(this,H,i.errors)}get errors(){return n(this,H)}get status(){return n(this,J)}get statusText(){return n(this,W)}};H=new WeakMap,J=new WeakMap,W=new WeakMap,ce.isFetchError=r=>r instanceof ce;var D=ce,_e=async(t,e,r)=>{Pe("fetch: %s, %O, native[%s]",t,e||{},r?.fetch?"no":"yes");let s=r?.interceptors;s?.request?.onSuccess&&({url:t,options:e}=await s.request.onSuccess({url:t,options:e}));let o=await(r?.fetch||fetch)(t,e);o.ok?(s?.rawReader?.onSuccess&&await s.rawReader.onSuccess(o),s?.response?.onSuccess&&(o=await s.response.onSuccess(o))):s?.rawReader?.onFailure&&await s.rawReader.onFailure(o);let p=o.body&&o.status!==204?await o.text().then(a=>(Pe("response: %O",a),a?.trim()?JSON.parse(a):a)).catch(a=>{if(Pe("error: %s",a.message),o.ok)throw new y({message:"Error parsing API response body",type:"parse"})}):void 0;if(!o.ok){let a=new D(o.status,o.statusText,p);if(s?.response?.onFailure&&(a=await s.response.onFailure(a)),a)throw a}return p};var Q=(a=>(a.CLIENT="client",a.REQUEST="request",a.RESPONSE="response",a.CANCEL="cancel",a.PARSE="parse",a.TIMEOUT="timeout",a.TOKEN_REFRESH="token-refresh",a))(Q||{}),B=class B extends Error{static isSdkError(e){return e&&[B.NAME,x.NAME].includes(e.name)&&Object.values(Q).includes(e.type)}constructor(e){super(e.message),this.name=B.NAME,this.type=e.type||"client"}};B.NAME="SdkError";var y=B,K=class K extends y{constructor(r){super({...r,type:"response"});this.errors=[];this.name=K.NAME}static isApiError(r){return y.isSdkError(r)&&r.name===K.NAME&&r.type==="response"}first(){return this.errors?.length>0?this.errors[0]:void 0}};K.NAME="ApiError";var x=K,Pr=t=>t instanceof TypeError&&t.message!=="fetch failed",_r=t=>t instanceof DOMException&&t.name==="AbortError",Tr=t=>t instanceof DOMException&&t.name==="TimeoutError",ir=t=>{let e=["INVALID_TOKEN","UNAUTHORIZED"];return x.isApiError(t)&&t.status===401&&(e.includes(t.code||"")||t.errors&&t.errors.length>0&&e.includes(t.errors[0].code))},Te=t=>{if(y.isSdkError(t)||x.isApiError(t))throw t;let e=new y({message:t.message});if(D.isFetchError(t)){let r=new x(e);r.type="response",r.status=t.status,r.statusText=t.statusText,r.code=String(r.status),r.errors=t.errors||[],!r.message&&r.statusText&&(r.message=r.statusText),e=r}else Pr(t)?e.type="request":_r(t)?e.type="cancel":Tr(t)?e.type="timeout":(e.type="client",e.source=t);throw e};var or=t=>{try{return JSON.parse(atob(t.split(".")[1])).exp*1e3-Date.now()<0}catch{return!1}};var C=f("client"),Ce=t=>`https://provisioning.${t||b.default.domain}/api`,j,P,g,G,Me=class Me{constructor(e){c(this,j);c(this,P);c(this,g);c(this,G);C("new client instance %O",e),l(this,j,Ce(e.domain)),l(this,P,e.accessToken);let r={timeout:e.timeout||b.client.timeout,fetch:e.fetch,refreshToken:e.refreshToken},i={...this.customHeaders(e.headers),Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:`Bearer ${n(this,P)}`};e.userAgent&&(i["User-Agent"]=e.userAgent),r.headers=i,l(this,g,r),C("fetch config: %O",r),l(this,G,{})}static create(e){for(let r of b.client.requiredAttributes)if(!e||!e[r])throw new y({message:`Undefined '${r}' parameter`});return new Me(e)}get interceptors(){return n(this,G)}get requestHeaders(){return n(this,g).headers||(n(this,g).headers={}),n(this,g).headers}config(e){C("config %o",e);let r=n(this,g);return r.headers||(r.headers={}),e.timeout&&(r.timeout=e.timeout),e.userAgent&&this.userAgent(e.userAgent),e.fetch&&(n(this,g).fetch=e.fetch),e.refreshToken&&(n(this,g).refreshToken=e.refreshToken),e.domain&&l(this,j,Ce(e.domain)),e.accessToken&&(l(this,P,e.accessToken),r.headers.Authorization=`Bearer ${n(this,P)}`),e.headers&&(r.headers={...r.headers,...this.customHeaders(e.headers)}),this}userAgent(e){return e&&(this.requestHeaders["User-Agent"]=e),this}async request(e,r,s,i){C("request %s %s, %O, %O",e,r,s||{},i||{}),i?.userAgent&&C("User-Agent header ignored in request config");let o=i?.domain?Ce(i.domain):n(this,j),p=new URL(`${o}/${r}`),a=s?JSON.stringify({data:s}):void 0,T={...this.requestHeaders,...this.customHeaders(i?.headers)},O=i?.accessToken||n(this,P);O&&(T.Authorization=`Bearer ${O}`);let fe=i?.refreshToken||n(this,g).refreshToken,dr=i?.fetch||n(this,g).fetch,V={method:e,body:a,headers:T},Xe=i?.timeout||n(this,g).timeout;Xe&&(AbortSignal?.timeout?V.signal=AbortSignal.timeout(Xe):C("Timeout not set. Undefined function: %s","AbortSignal.timeout")),i?.params&&Object.entries(i?.params).forEach(([L,U])=>{p.searchParams.append(L,String(U))});let er={interceptors:this.interceptors,fetch:dr};try{return await _e(p,V,er).catch(L=>Te(L))}catch(L){if(ir(L)&&fe&&or(O)){C("Access token has expired");let U=await fe(n(this,P)).catch(be=>{C("Refresh token error: %s",be.message);let le=new y({message:"Error refreshing access token",type:"token-refresh"});throw le.source=be,le});if(U)return C("Access token refreshed"),this.config({accessToken:U}),l(this,P,U),V.headers&&(V.headers.Authorization=`Bearer ${U}`),await _e(p,V,er).catch(le=>Te(le))}else throw L}}customHeaders(e){let r={};if(e)for(let[s,i]of Object.entries(e))["accept","content-type","authorization","user-agent"].includes(s.toLowerCase())||(r[s]=i);return r}get currentAccessToken(){return n(this,P)}};j=new WeakMap,P=new WeakMap,g=new WeakMap,G=new WeakMap;var Ae=Me,nr=Ae;var q=t=>t?.type&&t.id&&$.includes(t.type),Oe=t=>t&&typeof t.type<"u"&&t.type&&$.includes(t.type);var ue=f("jsonapi"),S=t=>{let e;t.links&&delete t.links;let r=t.data,s=t.included;return r?Array.isArray(r)?e=r.map(i=>me(i,s)):e=me(r,s):e=r,e},ar=(t,e=[])=>e.find(s=>t.id===s.id&&t.type===s.type)||t,me=(t,e,r=[])=>{if(ue("denormalize resource: %O, %o",t,e||{}),!t)return t;let s={id:t.id,type:t.type,...t.attributes};return t.relationships&&Object.keys(t.relationships).forEach(i=>{let o=t.relationships[i].data;o?r.filter(p=>p.id===o.id&&p.type===o.type).length>=b.jsonapi.maxResourceIncluded?s[i]=o:Array.isArray(o)?s[i]=o.map(p=>me(ar(p,e),e,[...r,p])):s[i]=me(ar(o,e),e,[...r,o]):o===null&&(s[i]=null)}),ue("denormalized resource: %O",s),s},ye=t=>{ue("normalize resource: %O",t);let e={},r={};for(let i in t){if(["type","id"].includes(i))continue;let o=t[i];Array.isArray(o)&&o.length===1&&Oe(o[0])&&o[0].id===null?r[i]={data:[]}:o&&Oe(o)&&o.id===null?r[i]={data:null}:o&&(q(o)||Array.isArray(o)&&q(o[0]))?r[i]={data:o}:e[i]=o}let s={type:t.type,attributes:e,relationships:r};return q(t)&&(s.id=t.id),ue("normalized resource: %O",s),s};var pr=f("query"),lr=["_any","_all","_in","_not_in_or_null"],Cr=t=>lr.some(e=>t.endsWith(e)),cr=["_jcont"],Ar=t=>cr.some(e=>t.endsWith(e)),xe=t=>t&&(t.filters||t.pageNumber||t.pageSize||t.sort),F=(t,e)=>{pr("generate query string params: %O, %O",t,e);let r={};return t&&(t.include&&(r.include=t.include.join(",")),t.fields&&(Array.isArray(t.fields)&&(t.fields={[e.type||e]:t.fields}),Object.entries(t.fields).forEach(([s,i])=>{r[`fields[${s}]`]=i.join(",")})),xe(t)&&(t.sort&&(Array.isArray(t.sort)?r.sort=t.sort.join(","):r.sort=Object.entries(t.sort).map(([s,i])=>`${i==="desc"?"-":""}${s}`).join(",")),t.pageNumber&&(r["page[number]"]=String(t.pageNumber)),t.pageSize&&(r["page[size]"]=String(t.pageSize)),t.filters&&Object.entries(t.filters).forEach(([s,i])=>{let o;if(Array.isArray(i)){if(!Cr(s))throw new y({message:`Incorrect filter [${s}]: Array value is supported only for the following filters: ${lr.join(", ")}`,type:"request"});o=i.join(",")}else if(typeof i=="object"){if(!Ar(s))throw new y({message:`Incorrect filter [${s}]: Object value is supported only for the following filters: ${cr.join(", ")}`,type:"request"});o=JSON.stringify(i)}else o=String(i);r[`filter[q][${s}]`]=o})),pr("query string params: %O",r)),r};var A={resources:t=>t?[...$].sort():$,singletons:t=>t?[...de].sort():de,isSingleton:t=>de.includes(t),isSdkError:t=>y.isSdkError(t),isApiError:t=>x.isApiError(t),init:t=>ze(t),get schemaVersion(){return ve}};var M=f("resource"),Re=class extends Array{constructor(e,r){super(...r||[]),this.meta=e}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(e){return this.length&&e>=0?this[e]:void 0}hasNextPage(){return this.meta.currentPage<this.meta.pageCount}hasPrevPage(){return this.meta.currentPage>1}getRecordCount(){return this.meta.recordCount}getPageCount(){return this.meta.pageCount}get recordCount(){return this.meta.recordCount}get pageCount(){return this.meta.pageCount}};var h,Ne,Ee=class{constructor(e){c(this,h);c(this,Ne,{});l(this,h,nr.create(e)),this.localConfig(e)}localConfig(e){}config(e){return M("config %o",e),this.localConfig(e),n(this,h).config(e),this}get client(){return n(this,h)}async retrieve(e,r,s,i){let o=!("id"in e)||A.isSingleton(e.type);M("retrieve:%s %o, %O, %O",o?" singleton,":"",e,r||{},s||{});let p=F(r,e);s?.params&&Object.assign(p,s?.params);let a=`${i||e.type}${o?"":`/${e.id}`}`,T=await n(this,h).request("GET",a,void 0,{...s,params:p});return S(T)}async list(e,r,s){M("list: %o, %O, %O",e,r||{},s||{});let i=F(r,e);s?.params&&Object.assign(i,s?.params);let o=await n(this,h).request("GET",`${e.type}`,void 0,{...s,params:i}),p=S(o),a={pageCount:Number(o.meta?.page_count),recordCount:Number(o.meta?.record_count),currentPage:r?.pageNumber||b.default.pageNumber,recordsPerPage:r?.pageSize||b.default.pageSize};return new Re(a,p)}async create(e,r,s){M("create: %o, %O, %O",e,r||{},s||{});let i=F(r,e);s?.params&&Object.assign(i,s?.params);let o=ye(e),p=await n(this,h).request("POST",e.type,o,{...s,params:i});return S(p)}async update(e,r,s,i){let o=!("id"in e)||A.isSingleton(e.type);M("update:%s %o, %O, %O",o?" singleton,":"",e,r||{},s||{});let p=F(r,e);s?.params&&Object.assign(p,s?.params);let a=`${i||e.type}${o?"":`/${e.id}`}`,T=ye(e),O=await n(this,h).request("PATCH",a,T,{...s,params:p});return S(O)}async delete(e,r){M("delete: %o, %O",e,r||{}),await n(this,h).request("DELETE",`${e.type}/${e.id}`,void 0,r)}async fetch(e,r,s,i){M("fetch: %o, %O, %O",r,s||{},i||{});let o=F(s,e);i?.params&&Object.assign(o,i?.params);let p=await n(this,h).request("GET",r,void 0,{...i,params:o}),a=S(p);if(Array.isArray(a)){let T=s,O={pageCount:Number(p.meta?.page_count),recordCount:Number(p.meta?.record_count),currentPage:T?.pageNumber||b.default.pageNumber,recordsPerPage:T?.pageSize||b.default.pageSize};return new Re(O,a)}else return a}async action(e,r,s,i){M("action: %o %o, %O",e,r,i||{});let o={};i?.params&&Object.assign(o,i?.params);let p=s&&q(s)?ye(s):s;await n(this,h).request(e,r,p,{...i,params:o})}};h=new WeakMap,Ne=new WeakMap;var ge=class{constructor(e){M("new resource instance: %s",this.type()),this.resources=e}relationshipOneToOne(e){return e===null||typeof e=="string"?{id:e,type:this.type()}:{id:e.id,type:this.type()}}relationshipOneToMany(...e){return e===null||e.length===0||e[0]===null?[{id:null,type:this.type()}]:e.map(r=>({id:r,type:this.type()}))}path(){return this.type()}parse(e){try{let r=JSON.parse(e);if(r.data?.type!==this.type())throw new y({message:`Invalid resource type [${r.data?.type}]`,type:"parse"});return S(r)}catch(r){throw y.isSdkError(r)?r:new y({message:`Payload parse error [${r.message}]`,type:"parse"})}}async update(e,r,s){return this.resources.update({...e,type:this.type()},r,s,this.path())}},d=class extends ge{async retrieve(e,r,s){return this.resources.retrieve(typeof e=="string"?{type:this.type(),id:e}:e,r,s)}async list(e,r){return this.resources.list({type:this.type()},e,r)}async count(e,r){let s={filters:xe(e)?e.filters:e,pageNumber:1,pageSize:1},i=await this.list(s,r);return Promise.resolve(i.meta.recordCount)}},he=class extends ge{async retrieve(e,r){return this.resources.retrieve({type:this.type()},e,r,this.path())}},ur=Ee;var v=class v extends d{async create(e,r,s){return this.resources.create({...e,type:v.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:v.TYPE},r,s)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:v.TYPE}:e,r)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`api_credentials/${i}/organization`,r,s)}async role(e,r,s){let i=e.id||e;return this.resources.fetch({type:"roles"},`api_credentials/${i}/role`,r,s)}isApiCredential(e){return e.type&&e.type===v.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return v.TYPE}};v.TYPE="api_credentials";var Ie=v,Se=Ie;var z=class z extends d{async create(e,r,s){return this.resources.create({...e,type:z.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:z.TYPE},r,s)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:z.TYPE}:e,r)}async api_credential(e,r,s){let i=e.id||e;return this.resources.fetch({type:"api_credentials"},`application_memberships/${i}/api_credential`,r,s)}async membership(e,r,s){let i=e.id||e;return this.resources.fetch({type:"memberships"},`application_memberships/${i}/membership`,r,s)}async membership_profile(e,r,s){let i=e.id||e;return this.resources.fetch({type:"membership_profiles"},`application_memberships/${i}/membership_profile`,r,s)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`application_memberships/${i}/organization`,r,s)}async role(e,r,s){let i=e.id||e;return this.resources.fetch({type:"roles"},`application_memberships/${i}/role`,r,s)}isApplicationMembership(e){return e.type&&e.type===z.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return z.TYPE}};z.TYPE="application_memberships";var ke=z,we=ke;var _=class _ extends d{async create(e,r,s){return this.resources.create({...e,type:_.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:_.TYPE},r,s)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:_.TYPE}:e,r)}async user(e,r,s){let i=e.id||e;return this.resources.fetch({type:"users"},`identity_providers/${i}/user`,r,s)}async _disable(e,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_disable:!0},r,s)}async _enable(e,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_enable:!0},r,s)}isIdentityProvider(e){return e.type&&e.type===_.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return _.TYPE}};_.TYPE="identity_providers";var Le=_,Ue=Le;var E=class E extends d{async create(e,r,s){return this.resources.create({...e,type:E.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:E.TYPE},r,s)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:E.TYPE}:e,r)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`membership_profiles/${i}/organization`,r,s)}async application_memberships(e,r,s){let i=e.id||e;return this.resources.fetch({type:"application_memberships"},`membership_profiles/${i}/application_memberships`,r,s)}isMembershipProfile(e){return e.type&&e.type===E.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return E.TYPE}};E.TYPE="membership_profiles";var Qe=E,je=Qe;var N=class N extends d{async create(e,r,s){return this.resources.create({...e,type:N.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:N.TYPE},r,s)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:N.TYPE}:e,r)}async resend(e,r){let s=e.id||e;await this.resources.action("POST",`memberships/${s}/resend`,{},r)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`memberships/${i}/organization`,r,s)}async role(e,r,s){let i=e.id||e;return this.resources.fetch({type:"roles"},`memberships/${i}/role`,r,s)}async application_memberships(e,r,s){let i=e.id||e;return this.resources.fetch({type:"application_memberships"},`memberships/${i}/application_memberships`,r,s)}async membership_profile(e,r,s){let i=e.id||e;return this.resources.fetch({type:"membership_profiles"},`memberships/${i}/membership_profile`,r,s)}async versions(e,r,s){let i=e.id||e;return this.resources.fetch({type:"versions"},`memberships/${i}/versions`,r,s)}isMembership(e){return e.type&&e.type===N.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return N.TYPE}};N.TYPE="memberships";var qe=N,$e=qe;var k=class k extends d{async create(e,r,s){return this.resources.create({...e,type:k.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:k.TYPE},r,s)}async transfer_ownership(e,r,s){let i=e.id||e;await this.resources.action("PATCH",`organizations/${i}/transfer_ownership`,{...r},s)}async memberships(e,r,s){let i=e.id||e;return this.resources.fetch({type:"memberships"},`organizations/${i}/memberships`,r,s)}async roles(e,r,s){let i=e.id||e;return this.resources.fetch({type:"roles"},`organizations/${i}/roles`,r,s)}async permissions(e,r,s){let i=e.id||e;return this.resources.fetch({type:"permissions"},`organizations/${i}/permissions`,r,s)}async api_credentials(e,r,s){let i=e.id||e;return this.resources.fetch({type:"api_credentials"},`organizations/${i}/api_credentials`,r,s)}isOrganization(e){return e.type&&e.type===k.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return k.TYPE}};k.TYPE="organizations";var Fe=k,Ye=Fe;var w=class w extends d{async create(e,r,s){return this.resources.create({...e,type:w.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:w.TYPE},r,s)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`permissions/${i}/organization`,r,s)}async role(e,r,s){let i=e.id||e;return this.resources.fetch({type:"roles"},`permissions/${i}/role`,r,s)}async versions(e,r,s){let i=e.id||e;return this.resources.fetch({type:"versions"},`permissions/${i}/versions`,r,s)}isPermission(e){return e.type&&e.type===w.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return w.TYPE}};w.TYPE="permissions";var Ve=w,De=Ve;var I=class I extends d{async create(e,r,s){return this.resources.create({...e,type:I.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:I.TYPE},r,s)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`roles/${i}/organization`,r,s)}async permissions(e,r,s){let i=e.id||e;return this.resources.fetch({type:"permissions"},`roles/${i}/permissions`,r,s)}async memberships(e,r,s){let i=e.id||e;return this.resources.fetch({type:"memberships"},`roles/${i}/memberships`,r,s)}async api_credentials(e,r,s){let i=e.id||e;return this.resources.fetch({type:"api_credentials"},`roles/${i}/api_credentials`,r,s)}async versions(e,r,s){let i=e.id||e;return this.resources.fetch({type:"versions"},`roles/${i}/versions`,r,s)}async _add_missing_base_permissions(e,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_add_missing_base_permissions:!0},r,s)}isRole(e){return e.type&&e.type===I.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return I.TYPE}};I.TYPE="roles";var He=I,Je=He;var Y=class Y extends he{async update(e,r,s){return this.resources.update({...e,type:Y.TYPE},r,s,this.path())}isUser(e){return e.type&&e.type===Y.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Y.TYPE}path(){return"user"}};Y.TYPE="users";var We=Y,Be=We;var Z=class Z extends d{isVersion(e){return e.type&&e.type===Z.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Z.TYPE}};Z.TYPE="versions";var Ke=Z,Ge=Ke;var $=["api_credentials","application_memberships","identity_providers","memberships","membership_profiles","organizations","permissions","roles","users","versions"],de=["users"];var mr=f("commercelayer"),ve="1.0.15";var R,X,ee,re,se,te,ie,oe,ne,ae,pe,Ze=class{constructor(e){this.openApiSchemaVersion=ve;c(this,R);c(this,X);c(this,ee);c(this,re);c(this,se);c(this,te);c(this,ie);c(this,oe);c(this,ne);c(this,ae);c(this,pe);mr("new commercelayer provisioning instance %O",e),l(this,R,new ur(e))}get api_credentials(){return n(this,X)||l(this,X,new Se(n(this,R)))}get application_memberships(){return n(this,ee)||l(this,ee,new we(n(this,R)))}get identity_providers(){return n(this,re)||l(this,re,new Ue(n(this,R)))}get memberships(){return n(this,se)||l(this,se,new $e(n(this,R)))}get membership_profiles(){return n(this,te)||l(this,te,new je(n(this,R)))}get organizations(){return n(this,ie)||l(this,ie,new Ye(n(this,R)))}get permissions(){return n(this,oe)||l(this,oe,new De(n(this,R)))}get roles(){return n(this,ne)||l(this,ne,new Je(n(this,R)))}get user(){return n(this,ae)||l(this,ae,new Be(n(this,R)))}get versions(){return n(this,pe)||l(this,pe,new Ge(n(this,R)))}get currentAccessToken(){return n(this,R)?.client?.currentAccessToken}get interceptors(){return n(this,R).client.interceptors}localConfig(e){}config(e){return mr("config %o",e),this.localConfig(e),n(this,R).config(e),this}resources(){return A.resources()}singletons(){return A.singletons()}isSingleton(e){return A.isSingleton(e)}isApiError(e){return A.isApiError(e)}addRequestInterceptor(e,r){return this.interceptors.request={onSuccess:e,onFailure:r},1}addResponseInterceptor(e,r){return this.interceptors.response={onSuccess:e,onFailure:r},1}removeInterceptor(e,r=1){this.interceptors[e]=void 0}removeInterceptors(){this.removeInterceptor("request"),this.removeInterceptor("response"),this.removeRawResponseReader()}addRawResponseReader(e){let r={id:0,rawResponse:void 0,headers:void 0,ok:!0};async function s(i){if(r.rawResponse=await i?.clone().json().catch(()=>{}),r.ok=i.ok,e?.headers){let o={};i.headers.forEach((p,a)=>{o[a]=p}),r.headers=o}return i}return this.interceptors.rawReader={onSuccess:s,onFailure:s},r.id=1,r}removeRawResponseReader(){this.interceptors.rawReader=void 0}};R=new WeakMap,X=new WeakMap,ee=new WeakMap,re=new WeakMap,se=new WeakMap,te=new WeakMap,ie=new WeakMap,oe=new WeakMap,ne=new WeakMap,ae=new WeakMap,pe=new WeakMap;var yr=t=>new Ze(t),ze=yr;export{yr as CommerceLayerProvisioning,A as CommerceLayerProvisioningStatic,ze as default};