@commercelayer/provisioning-sdk 2.10.1 → 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,61 @@
1
+ 'use strict';
2
+
3
+ var chunkF2RLD5SN_cjs = require('./chunk-F2RLD5SN.cjs');
4
+
5
+ // gen/resources/api_credentials.ts
6
+ var ApiCredentials = class _ApiCredentials extends chunkF2RLD5SN_cjs.ApiResource {
7
+ static TYPE = "api_credentials";
8
+ async create(resource, params, options) {
9
+ return this.resources.create(
10
+ { ...resource, type: _ApiCredentials.TYPE },
11
+ params,
12
+ options
13
+ );
14
+ }
15
+ async update(resource, params, options) {
16
+ return this.resources.update(
17
+ { ...resource, type: _ApiCredentials.TYPE },
18
+ params,
19
+ options
20
+ );
21
+ }
22
+ async delete(id, options) {
23
+ await this.resources.delete(typeof id === "string" ? { id, type: _ApiCredentials.TYPE } : id, options);
24
+ }
25
+ async organization(apiCredentialId, params, options) {
26
+ const _apiCredentialId = apiCredentialId.id || apiCredentialId;
27
+ return this.resources.fetch(
28
+ { type: "organizations" },
29
+ `api_credentials/${_apiCredentialId}/organization`,
30
+ params,
31
+ options
32
+ );
33
+ }
34
+ async role(apiCredentialId, params, options) {
35
+ const _apiCredentialId = apiCredentialId.id || apiCredentialId;
36
+ return this.resources.fetch(
37
+ { type: "roles" },
38
+ `api_credentials/${_apiCredentialId}/role`,
39
+ params,
40
+ options
41
+ );
42
+ }
43
+ isApiCredential(resource) {
44
+ return resource.type && resource.type === _ApiCredentials.TYPE;
45
+ }
46
+ relationship(id) {
47
+ return super.relationshipOneToOne(id);
48
+ }
49
+ relationshipToMany(...ids) {
50
+ return super.relationshipOneToMany(...ids);
51
+ }
52
+ type() {
53
+ return _ApiCredentials.TYPE;
54
+ }
55
+ };
56
+ var instance = new ApiCredentials();
57
+ var api_credentials_default = instance;
58
+
59
+ exports.api_credentials_default = api_credentials_default;
60
+ //# sourceMappingURL=chunk-W6XILXYS.cjs.map
61
+ //# sourceMappingURL=chunk-W6XILXYS.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../gen/resources/api_credentials.ts"],"names":["ApiResource"],"mappings":";;;;;AA4IA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuBA,6BAAA,CAA2B;AAAA,EACtD,OAAgB,IAAA,GAA0B,iBAAA;AAAA,EAE1C,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACwB;AACxB,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,gBAAe,IAAA,EAAK;AAAA,MACzC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACwB;AACxB,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,gBAAe,IAAA,EAAK;AAAA,MACzC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC9E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAO,OAAO,EAAA,KAAO,QAAA,GAAW,EAAE,EAAA,EAAI,IAAA,EAAM,eAAA,CAAe,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA,EACtG;AAAA,EAEA,MAAM,YAAA,CACJ,eAAA,EACA,MAAA,EACA,OAAA,EACuB;AACvB,IAAA,MAAM,gBAAA,GAAoB,gBAAkC,EAAA,IAAO,eAAA;AACnE,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,eAAA,EAAgB;AAAA,MACxB,mBAAmB,gBAAgB,CAAA,aAAA,CAAA;AAAA,MACnC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,IAAA,CACJ,eAAA,EACA,MAAA,EACA,OAAA,EACe;AACf,IAAA,MAAM,gBAAA,GAAoB,gBAAkC,EAAA,IAAO,eAAA;AACnE,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,OAAA,EAAQ;AAAA,MAChB,mBAAmB,gBAAgB,CAAA,KAAA,CAAA;AAAA,MACnC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,gBAAgB,QAAA,EAA0C;AACxD,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,eAAA,CAAe,IAAA;AAAA,EAC3D;AAAA,EAEA,aAAa,EAAA,EAAkD;AAC7D,IAAA,OAAO,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA,EACxD;AAAA,EAEA,sBAAsB,GAAA,EAAmC;AACvD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAwC,GAAG,GAAG,CAAA;AAAA,EAC7D;AAAA,EAEA,IAAA,GAA0B;AACxB,IAAA,OAAO,eAAA,CAAe,IAAA;AAAA,EACxB;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,cAAA,EAAe;AACpC,IAAO,uBAAA,GAAQ","file":"chunk-W6XILXYS.cjs","sourcesContent":["import type { QueryParamsRetrieve } from '@runtime/query'\nimport type {\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\n\nimport type { Organization, OrganizationType } from './organizations'\nimport type { Role, RoleType } from './roles'\n\ntype ApiCredentialType = 'api_credentials'\ntype ApiCredentialRel = ResourceRel & { type: ApiCredentialType }\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\ntype RoleRel = ResourceRel & { type: RoleType }\n\nexport type ApiCredentialSort = Pick<ApiCredential, 'id' | 'name' | 'mode'> & ResourceSort\n// export type ApiCredentialFilter = Pick<ApiCredential, 'id' | 'name' | 'kind' | 'confidential' | 'redirect_uri' | 'client_id' | 'scopes' | 'expires_in' | 'mode' | 'custom'> & ResourceFilter\n\n/**\n * The Api credential object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/api_credentials endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/api_credentials/object\n */\ninterface ApiCredential extends Resource {\n readonly type: ApiCredentialType\n\n /**\n * The API credential internal name.\n * @example ```\"My app\"```\n */\n name: string\n /**\n * The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.).\n * @example ```\"sales_channel\"```\n */\n kind: string\n /**\n * Indicates if the API credential it's confidential.\n * @example ```true```\n */\n confidential?: boolean | null\n /**\n * The API credential redirect URI.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n redirect_uri?: string | null\n /**\n * The API credential unique ID.\n * @example ```\"xxxx-yyyy-zzzz\"```\n */\n client_id?: string | null\n /**\n * The API credential unique secret.\n * @example ```\"xxxx-yyyy-zzzz\"```\n */\n client_secret?: string | null\n /**\n * The API credential scopes.\n * @example ```\"market:all market:9 market:122 market:6 stock_location:6 stock_location:33\"```\n */\n scopes?: string | null\n /**\n * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).\n * @example ```7200```\n */\n expires_in?: number | null\n /**\n * Indicates the environment the resource belongs to (one of `test` or `live`).\n * @example ```\"test\"```\n */\n mode?: string | null\n /**\n * Indicates if the API credential is used to create a custom app (e.g. fork a hosted app).\n */\n custom?: boolean | null\n\n organization?: Organization | null\n role?: Role | null\n}\n\ninterface ApiCredentialCreate extends ResourceCreate {\n /**\n * The API credential internal name.\n * @example ```\"My app\"```\n */\n name: string\n /**\n * The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.).\n * @example ```\"sales_channel\"```\n */\n kind: string\n /**\n * The API credential redirect URI.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n redirect_uri?: string | null\n /**\n * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).\n * @example ```7200```\n */\n expires_in?: number | null\n /**\n * Indicates the environment the resource belongs to (one of `test` or `live`).\n * @example ```\"test\"```\n */\n mode?: string | null\n /**\n * Indicates if the API credential is used to create a custom app (e.g. fork a hosted app).\n */\n custom?: boolean | null\n\n organization: OrganizationRel\n role?: RoleRel | null\n}\n\ninterface ApiCredentialUpdate extends ResourceUpdate {\n /**\n * The API credential internal name.\n * @example ```\"My app\"```\n */\n name?: string | null\n /**\n * The API credential redirect URI.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n redirect_uri?: string | null\n /**\n * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).\n * @example ```7200```\n */\n expires_in?: number | null\n\n role?: RoleRel | null\n}\n\nclass ApiCredentials extends ApiResource<ApiCredential> {\n static readonly TYPE: ApiCredentialType = 'api_credentials' as const\n\n async create(\n resource: ApiCredentialCreate,\n params?: QueryParamsRetrieve<ApiCredential>,\n options?: ResourcesConfig,\n ): Promise<ApiCredential> {\n return this.resources.create<ApiCredentialCreate, ApiCredential>(\n { ...resource, type: ApiCredentials.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: ApiCredentialUpdate,\n params?: QueryParamsRetrieve<ApiCredential>,\n options?: ResourcesConfig,\n ): Promise<ApiCredential> {\n return this.resources.update<ApiCredentialUpdate, ApiCredential>(\n { ...resource, type: ApiCredentials.TYPE },\n params,\n options,\n )\n }\n\n async delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n await this.resources.delete(typeof id === 'string' ? { id, type: ApiCredentials.TYPE } : id, options)\n }\n\n async organization(\n apiCredentialId: string | ApiCredential,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _apiCredentialId = (apiCredentialId as ApiCredential).id || (apiCredentialId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `api_credentials/${_apiCredentialId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async role(\n apiCredentialId: string | ApiCredential,\n params?: QueryParamsRetrieve<Role>,\n options?: ResourcesConfig,\n ): Promise<Role> {\n const _apiCredentialId = (apiCredentialId as ApiCredential).id || (apiCredentialId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `api_credentials/${_apiCredentialId}/role`,\n params,\n options,\n ) as unknown as Role\n }\n\n isApiCredential(resource: any): resource is ApiCredential {\n return resource.type && resource.type === ApiCredentials.TYPE\n }\n\n relationship(id: string | ResourceId | null): ApiCredentialRel {\n return super.relationshipOneToOne<ApiCredentialRel>(id)\n }\n\n relationshipToMany(...ids: string[]): ApiCredentialRel[] {\n return super.relationshipOneToMany<ApiCredentialRel>(...ids)\n }\n\n type(): ApiCredentialType {\n return ApiCredentials.TYPE\n }\n}\n\nconst instance = new ApiCredentials()\nexport default instance\n\nexport type { ApiCredential, ApiCredentialCreate, ApiCredentials, ApiCredentialType, ApiCredentialUpdate }\n"]}
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ var chunkF2RLD5SN_cjs = require('./chunk-F2RLD5SN.cjs');
4
+ var chunk3FP4NVLD_cjs = require('./chunk-3FP4NVLD.cjs');
5
+ var chunkVFTFSHXQ_cjs = require('./chunk-VFTFSHXQ.cjs');
6
+
7
+ // src/static.ts
8
+ var CommerceLayerProvisioningStatic = {
9
+ resources: (sort) => {
10
+ return chunkVFTFSHXQ_cjs.getResources(sort);
11
+ },
12
+ singletons: (sort) => {
13
+ return chunkVFTFSHXQ_cjs.getSingletons(sort);
14
+ },
15
+ isSingleton: (resource) => {
16
+ return chunkVFTFSHXQ_cjs.isSingleton(resource);
17
+ },
18
+ isCreatable: (resource) => {
19
+ return chunkVFTFSHXQ_cjs.isCreatable(resource);
20
+ },
21
+ isUpdatable: (resource) => {
22
+ return chunkVFTFSHXQ_cjs.isUpdatable(resource);
23
+ },
24
+ isDeletable: (resource) => {
25
+ return chunkVFTFSHXQ_cjs.isDeletable(resource);
26
+ },
27
+ isSdkError: (error) => {
28
+ return chunkF2RLD5SN_cjs.isSdkError(error);
29
+ },
30
+ isApiError: (error) => {
31
+ return chunkF2RLD5SN_cjs.isApiError(error);
32
+ },
33
+ isTokenExpired: (token) => {
34
+ return chunkF2RLD5SN_cjs.isTokenExpired(token);
35
+ },
36
+ get schemaVersion() {
37
+ return chunk3FP4NVLD_cjs.API_SCHEMA_VERSION;
38
+ }
39
+ };
40
+
41
+ exports.CommerceLayerProvisioningStatic = CommerceLayerProvisioningStatic;
42
+ //# sourceMappingURL=chunk-WRVLCJQZ.cjs.map
43
+ //# sourceMappingURL=chunk-WRVLCJQZ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/static.ts"],"names":["getResources","getSingletons","isSingleton","isCreatable","isUpdatable","isDeletable","isSdkError","isApiError","isTokenExpired","API_SCHEMA_VERSION"],"mappings":";;;;;;;AAOO,IAAM,+BAAA,GAAkC;AAAA,EAC7C,SAAA,EAAW,CAAC,IAAA,KAAsC;AAChD,IAAA,OAAOA,+BAAa,IAAI,CAAA;AAAA,EAC1B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,IAAA,KAAsC;AACjD,IAAA,OAAOC,gCAAc,IAAI,CAAA;AAAA,EAC3B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,cAAA,EAAgB,CAAC,KAAA,KAA2B;AAC1C,IAAA,OAAOC,iCAAe,KAAK,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,IAAI,aAAA,GAAwB;AAC1B,IAAA,OAAOC,oCAAA;AAAA,EACT;AACF","file":"chunk-WRVLCJQZ.cjs","sourcesContent":["import { type ApiError, isApiError, isSdkError, type SdkError } from '@runtime/error'\nimport { isTokenExpired } from '@runtime/util'\nimport type { ResourceTypeLock } from '../gen/enum'\nimport { getResources, getSingletons, isCreatable, isDeletable, isSingleton, isUpdatable } from '../gen/enum'\nimport { API_SCHEMA_VERSION } from './commercelayer'\n\n/* Static functions */\nexport const CommerceLayerProvisioningStatic = {\n resources: (sort?: boolean): readonly string[] => {\n return getResources(sort)\n },\n\n singletons: (sort?: boolean): readonly string[] => {\n return getSingletons(sort)\n },\n\n isSingleton: (resource: ResourceTypeLock): boolean => {\n return isSingleton(resource)\n },\n\n isCreatable: (resource: ResourceTypeLock): boolean => {\n return isCreatable(resource)\n },\n\n isUpdatable: (resource: ResourceTypeLock): boolean => {\n return isUpdatable(resource)\n },\n\n isDeletable: (resource: ResourceTypeLock): boolean => {\n return isDeletable(resource)\n },\n\n isSdkError: (error: unknown): error is SdkError => {\n return isSdkError(error)\n },\n\n isApiError: (error: unknown): error is ApiError => {\n return isApiError(error)\n },\n\n isTokenExpired: (token: string): boolean => {\n return isTokenExpired(token)\n },\n\n get schemaVersion(): string {\n return API_SCHEMA_VERSION\n },\n}\n"]}
@@ -0,0 +1,76 @@
1
+ // gen/enum.ts
2
+ var apiResources = [
3
+ // ##__API_RESOURCE_LIST_START__##
4
+ "api_credentials",
5
+ "application_memberships",
6
+ "identity_providers",
7
+ "memberships",
8
+ "membership_profiles",
9
+ "organizations",
10
+ "permissions",
11
+ "roles",
12
+ "users",
13
+ "versions"
14
+ // ##__API_RESOURCE_LIST_STOP__##
15
+ ];
16
+ var resourceList = apiResources;
17
+ var singletonList = [
18
+ // ##__API_RESOURCE_SINGLETON_START__##
19
+ "users"
20
+ // ##__API_RESOURCE_SINGLETON_STOP__##
21
+ ];
22
+ var creatableResources = [
23
+ // ##__API_RESOURCE_CREATABLE_START__##
24
+ "api_credentials",
25
+ "application_memberships",
26
+ "identity_providers",
27
+ "memberships",
28
+ "membership_profiles",
29
+ "organizations",
30
+ "permissions",
31
+ "roles"
32
+ // ##__API_RESOURCE_CREATABLE_STOP__##
33
+ ];
34
+ var updatableResources = [
35
+ // ##__API_RESOURCE_UPDATABLE_START__##
36
+ "api_credentials",
37
+ "application_memberships",
38
+ "identity_providers",
39
+ "memberships",
40
+ "membership_profiles",
41
+ "organizations",
42
+ "permissions",
43
+ "roles"
44
+ // ##__API_RESOURCE_UPDATABLE_STOP__##
45
+ ];
46
+ var deletableResources = [
47
+ // ##__API_RESOURCE_DELETABLE_START__##
48
+ "api_credentials",
49
+ "application_memberships",
50
+ "identity_providers",
51
+ "memberships",
52
+ "membership_profiles"
53
+ // ##__API_RESOURCE_DELETABLE_STOP__##
54
+ ];
55
+ function getResources(sort) {
56
+ return sort ? [...resourceList].sort() : resourceList;
57
+ }
58
+ function getSingletons(sort) {
59
+ return sort ? [...singletonList].sort() : singletonList;
60
+ }
61
+ function isSingleton(resource) {
62
+ return singletonList.includes(resource);
63
+ }
64
+ function isCreatable(resource) {
65
+ return creatableResources.includes(resource);
66
+ }
67
+ function isUpdatable(resource) {
68
+ return updatableResources.includes(resource);
69
+ }
70
+ function isDeletable(resource) {
71
+ return deletableResources.includes(resource);
72
+ }
73
+
74
+ export { creatableResources, deletableResources, getResources, getSingletons, isCreatable, isDeletable, isSingleton, isUpdatable, resourceList, singletonList, updatableResources };
75
+ //# sourceMappingURL=chunk-YS5PCY5D.js.map
76
+ //# sourceMappingURL=chunk-YS5PCY5D.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../gen/enum.ts"],"names":[],"mappings":";AAGA,IAAM,YAAA,GAAe;AAAA;AAAA,EAEnB,iBAAA;AAAA,EACA,yBAAA;AAAA,EACA,oBAAA;AAAA,EACA,aAAA;AAAA,EACA,qBAAA;AAAA,EACA,eAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA;AAAA;AAEF,CAAA;AAGO,IAAM,YAAA,GAA4C;AAGlD,IAAM,aAAA,GAAgB;AAAA;AAAA,EAE3B;AAAA;AAEF;AAsBO,IAAM,kBAAA,GAAqB;AAAA;AAAA,EAEhC,iBAAA;AAAA,EACA,yBAAA;AAAA,EACA,oBAAA;AAAA,EACA,aAAA;AAAA,EACA,qBAAA;AAAA,EACA,eAAA;AAAA,EACA,aAAA;AAAA,EACA;AAAA;AAEF;AAQO,IAAM,kBAAA,GAAqB;AAAA;AAAA,EAEhC,iBAAA;AAAA,EACA,yBAAA;AAAA,EACA,oBAAA;AAAA,EACA,aAAA;AAAA,EACA,qBAAA;AAAA,EACA,eAAA;AAAA,EACA,aAAA;AAAA,EACA;AAAA;AAEF;AAQO,IAAM,kBAAA,GAAqB;AAAA;AAAA,EAEhC,iBAAA;AAAA,EACA,yBAAA;AAAA,EACA,oBAAA;AAAA,EACA,aAAA;AAAA,EACA;AAAA;AAEF;AAQO,SAAS,aAAa,IAAA,EAA6C;AACxE,EAAA,OAAO,OAAO,CAAC,GAAG,YAAY,CAAA,CAAE,MAAK,GAAI,YAAA;AAC3C;AAEO,SAAS,cAAc,IAAA,EAAmC;AAC/D,EAAA,OAAO,OAAO,CAAC,GAAG,aAAa,CAAA,CAAE,MAAK,GAAI,aAAA;AAC5C;AAEO,SAAS,YAAY,QAAA,EAAqC;AAC/D,EAAA,OAAQ,aAAA,CAA8C,SAAS,QAAQ,CAAA;AACzE;AAEO,SAAS,YAAY,QAAA,EAAqC;AAC/D,EAAA,OAAQ,kBAAA,CAAmD,SAAS,QAAQ,CAAA;AAC9E;AAEO,SAAS,YAAY,QAAA,EAAqC;AAC/D,EAAA,OAAQ,kBAAA,CAAmD,SAAS,QAAQ,CAAA;AAC9E;AAEO,SAAS,YAAY,QAAA,EAAqC;AAC/D,EAAA,OAAQ,kBAAA,CAAmD,SAAS,QAAQ,CAAA;AAC9E","file":"chunk-YS5PCY5D.js","sourcesContent":["import type { Resource } from '@runtime/resource'\nimport type * as models from './model'\n\nconst apiResources = [\n // ##__API_RESOURCE_LIST_START__##\n 'api_credentials',\n 'application_memberships',\n 'identity_providers',\n 'memberships',\n 'membership_profiles',\n 'organizations',\n 'permissions',\n 'roles',\n 'users',\n 'versions',\n // ##__API_RESOURCE_LIST_STOP__##\n] as const\n\nexport type ResourceTypeLock = (typeof apiResources)[number]\nexport const resourceList: readonly ResourceTypeLock[] = apiResources\n\n// Singleton resources\nexport const singletonList = [\n // ##__API_RESOURCE_SINGLETON_START__##\n 'users',\n // ##__API_RESOURCE_SINGLETON_STOP__##\n] as const\n\n// Retrievable resources\nexport type RetrievableResourceType = ResourceTypeLock\n\nexport type RetrievableResource = Resource & {\n type: RetrievableResourceType\n}\n\n// Listable resources\nexport type ListableResourceType = Exclude<\n ResourceTypeLock,\n // ##__API_RESOURCE_NOT_LISTABLE_START__##\n 'users'\n // ##__API_RESOURCE_NOT_LISTABLE_STOP__##\n>\n\nexport type ListableResource = Resource & {\n type: ListableResourceType\n}\n\n// Creatable resources\nexport const creatableResources = [\n // ##__API_RESOURCE_CREATABLE_START__##\n 'api_credentials',\n 'application_memberships',\n 'identity_providers',\n 'memberships',\n 'membership_profiles',\n 'organizations',\n 'permissions',\n 'roles',\n // ##__API_RESOURCE_CREATABLE_STOP__##\n] as const\n\nexport type CreatableResourceType = (typeof creatableResources)[number]\nexport type CreatableResource = Resource & {\n type: CreatableResourceType\n}\n\n// Updatable resources\nexport const updatableResources = [\n // ##__API_RESOURCE_UPDATABLE_START__##\n 'api_credentials',\n 'application_memberships',\n 'identity_providers',\n 'memberships',\n 'membership_profiles',\n 'organizations',\n 'permissions',\n 'roles',\n // ##__API_RESOURCE_UPDATABLE_STOP__##\n] as const\n\nexport type UpdatableResourceType = (typeof updatableResources)[number]\nexport type UpdatableResource = Resource & {\n type: UpdatableResourceType\n}\n\n// Deletable resources\nexport const deletableResources = [\n // ##__API_RESOURCE_DELETABLE_START__##\n 'api_credentials',\n 'application_memberships',\n 'identity_providers',\n 'memberships',\n 'membership_profiles',\n // ##__API_RESOURCE_DELETABLE_STOP__##\n] as const\n\nexport type DeletableResourceType = (typeof deletableResources)[number]\nexport type DeletableResource = Resource & {\n type: DeletableResourceType\n}\n\n// Utility functions\nexport function getResources(sort?: boolean): readonly ResourceTypeLock[] {\n return sort ? [...resourceList].sort() : resourceList\n}\n\nexport function getSingletons(sort?: boolean): readonly string[] {\n return sort ? [...singletonList].sort() : singletonList\n}\n\nexport function isSingleton(resource: ResourceTypeLock): boolean {\n return (singletonList as readonly ResourceTypeLock[]).includes(resource)\n}\n\nexport function isCreatable(resource: ResourceTypeLock): boolean {\n return (creatableResources as readonly ResourceTypeLock[]).includes(resource)\n}\n\nexport function isUpdatable(resource: ResourceTypeLock): boolean {\n return (updatableResources as readonly ResourceTypeLock[]).includes(resource)\n}\n\nexport function isDeletable(resource: ResourceTypeLock): boolean {\n return (deletableResources as readonly ResourceTypeLock[]).includes(resource)\n}\n\n// Helper types\nexport type ResourceFields = {\n // ##__API_RESOURCE_FIELDS_START__##\n api_credentials: models.ApiCredential\n application_memberships: models.ApplicationMembership\n identity_providers: models.IdentityProvider\n memberships: models.Membership\n membership_profiles: models.MembershipProfile\n organizations: models.Organization\n permissions: models.Permission\n roles: models.Role\n users: models.User\n versions: models.Version\n // ##__API_RESOURCE_FIELDS_STOP__##\n}\n\nexport type ResourceSortFields = {\n // ##__API_RESOURCE_SORTABLE_FIELDS_START__##\n api_credentials: models.ApiCredentialSort\n application_memberships: models.ApplicationMembershipSort\n identity_providers: models.IdentityProviderSort\n memberships: models.MembershipSort\n membership_profiles: models.MembershipProfileSort\n organizations: models.OrganizationSort\n permissions: models.PermissionSort\n roles: models.RoleSort\n users: models.UserSort\n versions: models.VersionSort\n // ##__API_RESOURCE_SORTABLE_FIELDS_STOP__##\n}\n"]}
@@ -0,0 +1,59 @@
1
+ import { ApiResource } from './chunk-4Z4U45XQ.js';
2
+
3
+ // gen/resources/api_credentials.ts
4
+ var ApiCredentials = class _ApiCredentials extends ApiResource {
5
+ static TYPE = "api_credentials";
6
+ async create(resource, params, options) {
7
+ return this.resources.create(
8
+ { ...resource, type: _ApiCredentials.TYPE },
9
+ params,
10
+ options
11
+ );
12
+ }
13
+ async update(resource, params, options) {
14
+ return this.resources.update(
15
+ { ...resource, type: _ApiCredentials.TYPE },
16
+ params,
17
+ options
18
+ );
19
+ }
20
+ async delete(id, options) {
21
+ await this.resources.delete(typeof id === "string" ? { id, type: _ApiCredentials.TYPE } : id, options);
22
+ }
23
+ async organization(apiCredentialId, params, options) {
24
+ const _apiCredentialId = apiCredentialId.id || apiCredentialId;
25
+ return this.resources.fetch(
26
+ { type: "organizations" },
27
+ `api_credentials/${_apiCredentialId}/organization`,
28
+ params,
29
+ options
30
+ );
31
+ }
32
+ async role(apiCredentialId, params, options) {
33
+ const _apiCredentialId = apiCredentialId.id || apiCredentialId;
34
+ return this.resources.fetch(
35
+ { type: "roles" },
36
+ `api_credentials/${_apiCredentialId}/role`,
37
+ params,
38
+ options
39
+ );
40
+ }
41
+ isApiCredential(resource) {
42
+ return resource.type && resource.type === _ApiCredentials.TYPE;
43
+ }
44
+ relationship(id) {
45
+ return super.relationshipOneToOne(id);
46
+ }
47
+ relationshipToMany(...ids) {
48
+ return super.relationshipOneToMany(...ids);
49
+ }
50
+ type() {
51
+ return _ApiCredentials.TYPE;
52
+ }
53
+ };
54
+ var instance = new ApiCredentials();
55
+ var api_credentials_default = instance;
56
+
57
+ export { api_credentials_default };
58
+ //# sourceMappingURL=chunk-YYHZPR4Z.js.map
59
+ //# sourceMappingURL=chunk-YYHZPR4Z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../gen/resources/api_credentials.ts"],"names":[],"mappings":";;;AA4IA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuB,WAAA,CAA2B;AAAA,EACtD,OAAgB,IAAA,GAA0B,iBAAA;AAAA,EAE1C,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACwB;AACxB,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,gBAAe,IAAA,EAAK;AAAA,MACzC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACwB;AACxB,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,gBAAe,IAAA,EAAK;AAAA,MACzC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC9E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAO,OAAO,EAAA,KAAO,QAAA,GAAW,EAAE,EAAA,EAAI,IAAA,EAAM,eAAA,CAAe,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA,EACtG;AAAA,EAEA,MAAM,YAAA,CACJ,eAAA,EACA,MAAA,EACA,OAAA,EACuB;AACvB,IAAA,MAAM,gBAAA,GAAoB,gBAAkC,EAAA,IAAO,eAAA;AACnE,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,eAAA,EAAgB;AAAA,MACxB,mBAAmB,gBAAgB,CAAA,aAAA,CAAA;AAAA,MACnC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,IAAA,CACJ,eAAA,EACA,MAAA,EACA,OAAA,EACe;AACf,IAAA,MAAM,gBAAA,GAAoB,gBAAkC,EAAA,IAAO,eAAA;AACnE,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,OAAA,EAAQ;AAAA,MAChB,mBAAmB,gBAAgB,CAAA,KAAA,CAAA;AAAA,MACnC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,gBAAgB,QAAA,EAA0C;AACxD,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,eAAA,CAAe,IAAA;AAAA,EAC3D;AAAA,EAEA,aAAa,EAAA,EAAkD;AAC7D,IAAA,OAAO,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA,EACxD;AAAA,EAEA,sBAAsB,GAAA,EAAmC;AACvD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAwC,GAAG,GAAG,CAAA;AAAA,EAC7D;AAAA,EAEA,IAAA,GAA0B;AACxB,IAAA,OAAO,eAAA,CAAe,IAAA;AAAA,EACxB;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,cAAA,EAAe;AACpC,IAAO,uBAAA,GAAQ","file":"chunk-YYHZPR4Z.js","sourcesContent":["import type { QueryParamsRetrieve } from '@runtime/query'\nimport type {\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\n\nimport type { Organization, OrganizationType } from './organizations'\nimport type { Role, RoleType } from './roles'\n\ntype ApiCredentialType = 'api_credentials'\ntype ApiCredentialRel = ResourceRel & { type: ApiCredentialType }\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\ntype RoleRel = ResourceRel & { type: RoleType }\n\nexport type ApiCredentialSort = Pick<ApiCredential, 'id' | 'name' | 'mode'> & ResourceSort\n// export type ApiCredentialFilter = Pick<ApiCredential, 'id' | 'name' | 'kind' | 'confidential' | 'redirect_uri' | 'client_id' | 'scopes' | 'expires_in' | 'mode' | 'custom'> & ResourceFilter\n\n/**\n * The Api credential object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/api_credentials endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/api_credentials/object\n */\ninterface ApiCredential extends Resource {\n readonly type: ApiCredentialType\n\n /**\n * The API credential internal name.\n * @example ```\"My app\"```\n */\n name: string\n /**\n * The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.).\n * @example ```\"sales_channel\"```\n */\n kind: string\n /**\n * Indicates if the API credential it's confidential.\n * @example ```true```\n */\n confidential?: boolean | null\n /**\n * The API credential redirect URI.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n redirect_uri?: string | null\n /**\n * The API credential unique ID.\n * @example ```\"xxxx-yyyy-zzzz\"```\n */\n client_id?: string | null\n /**\n * The API credential unique secret.\n * @example ```\"xxxx-yyyy-zzzz\"```\n */\n client_secret?: string | null\n /**\n * The API credential scopes.\n * @example ```\"market:all market:9 market:122 market:6 stock_location:6 stock_location:33\"```\n */\n scopes?: string | null\n /**\n * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).\n * @example ```7200```\n */\n expires_in?: number | null\n /**\n * Indicates the environment the resource belongs to (one of `test` or `live`).\n * @example ```\"test\"```\n */\n mode?: string | null\n /**\n * Indicates if the API credential is used to create a custom app (e.g. fork a hosted app).\n */\n custom?: boolean | null\n\n organization?: Organization | null\n role?: Role | null\n}\n\ninterface ApiCredentialCreate extends ResourceCreate {\n /**\n * The API credential internal name.\n * @example ```\"My app\"```\n */\n name: string\n /**\n * The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.).\n * @example ```\"sales_channel\"```\n */\n kind: string\n /**\n * The API credential redirect URI.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n redirect_uri?: string | null\n /**\n * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).\n * @example ```7200```\n */\n expires_in?: number | null\n /**\n * Indicates the environment the resource belongs to (one of `test` or `live`).\n * @example ```\"test\"```\n */\n mode?: string | null\n /**\n * Indicates if the API credential is used to create a custom app (e.g. fork a hosted app).\n */\n custom?: boolean | null\n\n organization: OrganizationRel\n role?: RoleRel | null\n}\n\ninterface ApiCredentialUpdate extends ResourceUpdate {\n /**\n * The API credential internal name.\n * @example ```\"My app\"```\n */\n name?: string | null\n /**\n * The API credential redirect URI.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n redirect_uri?: string | null\n /**\n * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).\n * @example ```7200```\n */\n expires_in?: number | null\n\n role?: RoleRel | null\n}\n\nclass ApiCredentials extends ApiResource<ApiCredential> {\n static readonly TYPE: ApiCredentialType = 'api_credentials' as const\n\n async create(\n resource: ApiCredentialCreate,\n params?: QueryParamsRetrieve<ApiCredential>,\n options?: ResourcesConfig,\n ): Promise<ApiCredential> {\n return this.resources.create<ApiCredentialCreate, ApiCredential>(\n { ...resource, type: ApiCredentials.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: ApiCredentialUpdate,\n params?: QueryParamsRetrieve<ApiCredential>,\n options?: ResourcesConfig,\n ): Promise<ApiCredential> {\n return this.resources.update<ApiCredentialUpdate, ApiCredential>(\n { ...resource, type: ApiCredentials.TYPE },\n params,\n options,\n )\n }\n\n async delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n await this.resources.delete(typeof id === 'string' ? { id, type: ApiCredentials.TYPE } : id, options)\n }\n\n async organization(\n apiCredentialId: string | ApiCredential,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _apiCredentialId = (apiCredentialId as ApiCredential).id || (apiCredentialId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `api_credentials/${_apiCredentialId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async role(\n apiCredentialId: string | ApiCredential,\n params?: QueryParamsRetrieve<Role>,\n options?: ResourcesConfig,\n ): Promise<Role> {\n const _apiCredentialId = (apiCredentialId as ApiCredential).id || (apiCredentialId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `api_credentials/${_apiCredentialId}/role`,\n params,\n options,\n ) as unknown as Role\n }\n\n isApiCredential(resource: any): resource is ApiCredential {\n return resource.type && resource.type === ApiCredentials.TYPE\n }\n\n relationship(id: string | ResourceId | null): ApiCredentialRel {\n return super.relationshipOneToOne<ApiCredentialRel>(id)\n }\n\n relationshipToMany(...ids: string[]): ApiCredentialRel[] {\n return super.relationshipOneToMany<ApiCredentialRel>(...ids)\n }\n\n type(): ApiCredentialType {\n return ApiCredentials.TYPE\n }\n}\n\nconst instance = new ApiCredentials()\nexport default instance\n\nexport type { ApiCredential, ApiCredentialCreate, ApiCredentials, ApiCredentialType, ApiCredentialUpdate }\n"]}
@@ -0,0 +1,80 @@
1
+ 'use strict';
2
+
3
+ var chunkF2RLD5SN_cjs = require('./chunk-F2RLD5SN.cjs');
4
+
5
+ // gen/resources/organizations.ts
6
+ var Organizations = class _Organizations extends chunkF2RLD5SN_cjs.ApiResource {
7
+ static TYPE = "organizations";
8
+ async create(resource, params, options) {
9
+ return this.resources.create(
10
+ { ...resource, type: _Organizations.TYPE },
11
+ params,
12
+ options
13
+ );
14
+ }
15
+ async update(resource, params, options) {
16
+ return this.resources.update(
17
+ { ...resource, type: _Organizations.TYPE },
18
+ params,
19
+ options
20
+ );
21
+ }
22
+ async memberships(organizationId, params, options) {
23
+ const _organizationId = organizationId.id || organizationId;
24
+ return this.resources.fetch(
25
+ { type: "memberships" },
26
+ `organizations/${_organizationId}/memberships`,
27
+ params,
28
+ options
29
+ );
30
+ }
31
+ async roles(organizationId, params, options) {
32
+ const _organizationId = organizationId.id || organizationId;
33
+ return this.resources.fetch(
34
+ { type: "roles" },
35
+ `organizations/${_organizationId}/roles`,
36
+ params,
37
+ options
38
+ );
39
+ }
40
+ async permissions(organizationId, params, options) {
41
+ const _organizationId = organizationId.id || organizationId;
42
+ return this.resources.fetch(
43
+ { type: "permissions" },
44
+ `organizations/${_organizationId}/permissions`,
45
+ params,
46
+ options
47
+ );
48
+ }
49
+ async api_credentials(organizationId, params, options) {
50
+ const _organizationId = organizationId.id || organizationId;
51
+ return this.resources.fetch(
52
+ { type: "api_credentials" },
53
+ `organizations/${_organizationId}/api_credentials`,
54
+ params,
55
+ options
56
+ );
57
+ }
58
+ async transfer_ownership(organizationId, payload, options) {
59
+ const _organizationId = organizationId.id || organizationId;
60
+ await this.resources.action("PATCH", `organizations/${_organizationId}/transfer_ownership`, { ...payload }, options);
61
+ }
62
+ isOrganization(resource) {
63
+ return resource.type && resource.type === _Organizations.TYPE;
64
+ }
65
+ relationship(id) {
66
+ return super.relationshipOneToOne(id);
67
+ }
68
+ relationshipToMany(...ids) {
69
+ return super.relationshipOneToMany(...ids);
70
+ }
71
+ type() {
72
+ return _Organizations.TYPE;
73
+ }
74
+ };
75
+ var instance = new Organizations();
76
+ var organizations_default = instance;
77
+
78
+ exports.organizations_default = organizations_default;
79
+ //# sourceMappingURL=chunk-Z4IAVXOO.cjs.map
80
+ //# sourceMappingURL=chunk-Z4IAVXOO.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../gen/resources/organizations.ts"],"names":["ApiResource"],"mappings":";;;;;AAgcA,IAAM,aAAA,GAAN,MAAM,cAAA,SAAsBA,6BAAA,CAA0B;AAAA,EACpD,OAAgB,IAAA,GAAyB,eAAA;AAAA,EAEzC,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACuB;AACvB,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,eAAc,IAAA,EAAK;AAAA,MACxC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACuB;AACvB,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,eAAc,IAAA,EAAK;AAAA,MACxC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,WAAA,CACJ,cAAA,EACA,MAAA,EACA,OAAA,EACmC;AACnC,IAAA,MAAM,eAAA,GAAmB,eAAgC,EAAA,IAAO,cAAA;AAChE,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,aAAA,EAAc;AAAA,MACtB,iBAAiB,eAAe,CAAA,YAAA,CAAA;AAAA,MAChC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,KAAA,CACJ,cAAA,EACA,MAAA,EACA,OAAA,EAC6B;AAC7B,IAAA,MAAM,eAAA,GAAmB,eAAgC,EAAA,IAAO,cAAA;AAChE,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,OAAA,EAAQ;AAAA,MAChB,iBAAiB,eAAe,CAAA,MAAA,CAAA;AAAA,MAChC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,WAAA,CACJ,cAAA,EACA,MAAA,EACA,OAAA,EACmC;AACnC,IAAA,MAAM,eAAA,GAAmB,eAAgC,EAAA,IAAO,cAAA;AAChE,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,aAAA,EAAc;AAAA,MACtB,iBAAiB,eAAe,CAAA,YAAA,CAAA;AAAA,MAChC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,eAAA,CACJ,cAAA,EACA,MAAA,EACA,OAAA,EACsC;AACtC,IAAA,MAAM,eAAA,GAAmB,eAAgC,EAAA,IAAO,cAAA;AAChE,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,iBAAA,EAAkB;AAAA,MAC1B,iBAAiB,eAAe,CAAA,gBAAA,CAAA;AAAA,MAChC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,kBAAA,CACJ,cAAA,EACA,OAAA,EACA,OAAA,EACe;AACf,IAAA,MAAM,eAAA,GAAmB,eAAgC,EAAA,IAAO,cAAA;AAChE,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAO,OAAA,EAAS,CAAA,cAAA,EAAiB,eAAe,CAAA,mBAAA,CAAA,EAAuB,EAAE,GAAG,OAAA,EAAQ,EAAG,OAAO,CAAA;AAAA,EACrH;AAAA,EAEA,eAAe,QAAA,EAAyC;AACtD,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,cAAA,CAAc,IAAA;AAAA,EAC1D;AAAA,EAEA,aAAa,EAAA,EAAiD;AAC5D,IAAA,OAAO,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA,EACvD;AAAA,EAEA,sBAAsB,GAAA,EAAkC;AACtD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAuC,GAAG,GAAG,CAAA;AAAA,EAC5D;AAAA,EAEA,IAAA,GAAyB;AACvB,IAAA,OAAO,cAAA,CAAc,IAAA;AAAA,EACvB;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,aAAA,EAAc;AACnC,IAAO,qBAAA,GAAQ","file":"chunk-Z4IAVXOO.cjs","sourcesContent":["import type { QueryParamsList, QueryParamsRetrieve } from '@runtime/query'\nimport type {\n ListResponse,\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\nimport type { TransferOwnershipDataType } from '../../src/actions'\nimport type { ApiCredential } from './api_credentials'\nimport type { Membership } from './memberships'\nimport type { Permission } from './permissions'\nimport type { Role } from './roles'\n\ntype OrganizationType = 'organizations'\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\n\nexport type OrganizationSort = Pick<Organization, 'id' | 'name' | 'slug' | 'domain'> & ResourceSort\n// export type OrganizationFilter = Pick<Organization, 'id' | 'name' | 'slug' | 'domain' | 'contrast_color' | 'region'> & ResourceFilter\n\n/**\n * The Organization object is returned as part of the response body of each successful list, retrieve, create or update API call to the /api/organizations endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/organizations/object\n */\ninterface Organization extends Resource {\n readonly type: OrganizationType\n\n /**\n * The organization's internal name.\n * @example ```\"The Blue Brand\"```\n */\n name: string\n /**\n * The organization's slug name.\n * @example ```\"the-blue-brand\"```\n */\n slug?: string | null\n /**\n * The organization's domain.\n * @example ```\"the-blue-brand.commercelayer.io\"```\n */\n domain?: string | null\n /**\n * The organization's support phone.\n * @example ```\"+01 30800857\"```\n */\n support_phone?: string | null\n /**\n * The organization's support email.\n * @example ```\"support@bluebrand.com\"```\n */\n support_email?: string | null\n /**\n * The URL to the organization's logo.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n logo_url?: string | null\n /**\n * The URL to the organization's favicon.\n * @example ```\"https://bluebrand.com/img/favicon.ico\"```\n */\n favicon_url?: string | null\n /**\n * The organization's primary color.\n * @example ```\"#C8984E\"```\n */\n primary_color?: string | null\n /**\n * The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).\n * @example ```\"#FFFFCC\"```\n */\n contrast_color?: string | null\n /**\n * The organization's Google Tag Manager ID.\n * @example ```\"GTM-5FJXX6\"```\n */\n gtm_id?: string | null\n /**\n * The organization's Google Tag Manager ID for test.\n * @example ```\"GTM-5FJXX7\"```\n */\n gtm_id_test?: string | null\n /**\n * The region where the organization is located. The default value is `eu-west-1`.\n * @example ```\"eu-west-1\"```\n */\n region?: string | null\n /**\n * Indicates if the organization can switch to live mode.\n */\n can_switch_live?: boolean | null\n /**\n * Information about the current subscription such as the plan type, limits, and subscription totals counter.\n * @example ```{\"plan_type\":\"growth\",\"limits\":{\"markets\":5,\"skus\":10000,\"organizations\":2,\"memberships\":5},\"totals\":{\"organizations\":1,\"markets\":0,\"memberships\":2,\"skus\":0}}```\n */\n subscription_info?: Record<string, any> | null\n /**\n * The organization's configuration.\n * @example ```{\"mfe\":{\"language\":\"it-IT\",\"default\":{\"links\":{\"cart\":\"https://cart.example.com/:order_id?accessToken=:access_token\",\"checkout\":\"https://checkout.example.com/:order_id?accessToken=:access_token\",\"identity\":\"https://example.com/login\",\"microstore\":\"https://example.com/microstore/?accessToken=:access_token\",\"my_account\":\"https://example.com/my-custom-account?accessToken=:access_token\"},\"checkout\":{\"optional_billing_info\":false,\"thankyou_page\":\"https://example.com/thanks/:lang/:order_id\",\"billing_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"shipping_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"billing_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"shipping_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"default_country\":\"US\"},\"urls\":{\"privacy\":\"https://example.com/privacy/:lang\",\"terms\":\"https://example.com/terms/:lang\"}},\"market:id:ZKcv13rT\":{\"links\":{\"cart\":\"https://example.com/custom-cart/:order_id?accessToken=:access_token\"},\"checkout\":{\"thankyou_page\":\"https://example.com/thanks/:order_id\"}}},\"well-known\":{\"shopping\":{\"catalog_mcp_url\":\"https://catalog-mcp.example.com/mcp\",\"client_id\":\"abc123example\",\"locale_scopes\":{\"it-IT\":{\"id\":\"ZKcv13rT\"},\"en-US\":{\"id\":\"ZKcv13rT\"}},\"ui\":{\"domain\":\"\",\"csp\":{\"resourceDomains\":[\"https://data.commercelayer.app\",\"https://cdn.brand.com\"],\"baseUriDomains\":[],\"connectDomains\":[],\"frameDomains\":[]}}}}}```\n */\n config?: Record<string, any> | null\n /**\n * Enables the redirect on the new Auth API.\n * @example ```true```\n */\n api_auth_redirect?: boolean | null\n /**\n * Enables fragment caching for resources with related directive.\n */\n api_fragment_caching_enabled?: boolean | null\n /**\n * Enables the rules engine for flex promotions and price list rules.\n */\n api_rules_engine?: boolean | null\n /**\n * The fallback maximum number of conditions within a rules payload on a ruleable object, default is {API_RULES_ENGINE_MAX_CONDITIONS_SIZE}.\n * @example ```150```\n */\n api_rules_engine_max_conditions_size?: number | null\n /**\n * The fallback maximum number of rules within a rules payload on a ruleable object, default is {API_RULES_ENGINE_MAX_RULES_SIZE}.\n * @example ```15```\n */\n api_rules_engine_max_rules_size?: number | null\n /**\n * Forces the usage of the new Authentication API.\n * @example ```true```\n */\n api_new_auth?: boolean | null\n /**\n * Enables the purge of cached single resources when list is purged.\n */\n api_purge_single_resource?: boolean | null\n /**\n * The maximum length for the regular expressions, default is {API_MAX_REGEX_LENGTH}.\n * @example ```5000```\n */\n api_max_regex_length?: number | null\n /**\n * Indicates if AVS checking will be enforced during payment workflow by passing specific attributes, default is {ADDRESSES_AVS_CHECK}.\n * @example ```true```\n */\n addresses_avs_check?: boolean | null\n /**\n * Indicates if the phone attribute is required for addresses, default is {ADDRESSES_PHONE_REQUIRED}.\n * @example ```true```\n */\n addresses_phone_required?: boolean | null\n /**\n * Indicates if a sales channel application without customer can read and update just guest orders.\n * @example ```true```\n */\n orders_sales_channel_guest_only?: boolean | null\n /**\n * The minimum lapse in fraction of seconds to be observed between two consecutive shipments rebuilt. If shipments rebuilt is triggered within the minimum lapse, the update is performed, but no rebuilt is done.\n */\n orders_min_rebuild_shipments_lapse?: number | null\n /**\n * The minimum lapse in fraction of seconds to be observed between two consecutive order refreshes. If refresh is triggered within the minimum lapse, the update is performed, but no order refresh is done.\n */\n orders_min_refresh_lapse?: number | null\n /**\n * The maximum number line items allowed for a test order before disabling the autorefresh option.\n * @example ```50```\n */\n orders_autorefresh_cutoff_test?: number | null\n /**\n * The maximum number line items allowed for a live order before disabling the autorefresh option.\n * @example ```500```\n */\n orders_autorefresh_cutoff_live?: number | null\n /**\n * Enables orders number editing as a string in test (for enterprise plans only).\n */\n orders_number_editable_test?: boolean | null\n /**\n * Enables orders number editing as a string in live (for enterprise plans only).\n */\n orders_number_editable_live?: boolean | null\n /**\n * Enables to use the order number as payment reference on supported gateways.\n * @example ```true```\n */\n orders_number_as_reference?: boolean | null\n /**\n * Enables raising of API errors in case the provided coupon code is invalid, default is {ORDERS_INVALID_COUPON_ERRORS}.\n * @example ```true```\n */\n orders_invalid_coupon_errors?: boolean | null\n /**\n * Enables raising of API errors in case the provided gift card code is invalid, default is {ORDERS_INVALID_GIFT_CARD_ERRORS}.\n * @example ```true```\n */\n orders_invalid_gift_card_errors?: boolean | null\n /**\n * Enables the validation of the generated stock line items and stock transfers before placing the order, default is {ORDERS_VALIDATE_SHIPPING_STOCK}.\n */\n orders_validate_shipping_stock?: boolean | null\n /**\n * The maximum number of SKUs allowed for bundles, default is {BUNDLES_MAX_ITEMS_COUNT}.\n * @example ```10```\n */\n bundles_max_items_count?: number | null\n /**\n * The minimum length for coupon code, default is {COUPONS_MIN_CODE_LENGTH}.\n * @example ```8```\n */\n coupons_min_code_length?: number | null\n /**\n * The maximum length for coupon code, default is {COUPONS_MAX_CODE_LENGTH}.\n * @example ```40```\n */\n coupons_max_code_length?: number | null\n /**\n * Enables matching the gift card code by its exact value, instead of by its first charachters, default is {GIFT_CARDS_EXACT_CODE_MATCHING}.\n */\n gift_cards_exact_code_matching?: boolean | null\n /**\n * The minimum length for gift card code, default is {GIFT_CARDS_MIN_CODE_LENGTH}.\n * @example ```8```\n */\n gift_cards_min_code_length?: number | null\n /**\n * The maximum length for gift card code, default is {GIFT_CARDS_MAX_CODE_LENGTH}.\n * @example ```40```\n */\n gift_cards_max_code_length?: number | null\n /**\n * The maximum number of concurrent cleanups allowed for your organization, default is {CLEANUPS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n cleanups_max_concurrent_count?: number | null\n /**\n * The maximum number of concurrent exports allowed for your organization, default is {EXPORTS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n exports_max_concurrent_count?: number | null\n /**\n * The maximum number of concurrent imports allowed for your organization, default is {IMPORTS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n imports_max_concurrent_count?: number | null\n /**\n * Enables purging of cached resources upon succeeded imports.\n * @example ```true```\n */\n imports_purge_cache?: boolean | null\n /**\n * Disables the interruption of the import in case its errors exceeds the 10% threshold, default is {IMPORTS_SKIP_ERRORS}.\n */\n imports_skip_errors?: boolean | null\n /**\n * The maximum number for stock locations cutoff, default is {INVENTORY_MODELS_MAX_STOCK_LOCATIONS_CUTOFF}.\n * @example ```10```\n */\n inventory_models_max_stock_locations_cutoff?: number | null\n /**\n * The maximum number of active concurrent promotions allowed for your organization, default is {PROMOTIONS_MAX_CONCURRENT_COUNT}.\n * @example ```10```\n */\n promotions_max_concurrent_count?: number | null\n /**\n * The maximum number of conditions within a rules payload on a promotion object, default is {PROMOTIONS_MAX_CONDITIONS_SIZE}.\n * @example ```150```\n */\n promotions_max_conditions_size?: number | null\n /**\n * The maximum number of rules within a rules payload on a promotion object, default is {PROMOTIONS_MAX_RULES_SIZE}.\n * @example ```15```\n */\n promotions_max_rules_size?: number | null\n /**\n * The maximum number of conditions within a rules payload on a price list object, default is {PRICE_LISTS_MAX_CONDITIONS_SIZE}.\n * @example ```150```\n */\n price_lists_max_conditions_size?: number | null\n /**\n * The maximum number of rules within a rules payload on a price list object, default is {PRICE_LISTS_MAX_RULES_SIZE}.\n * @example ```15```\n */\n price_lists_max_rules_size?: number | null\n /**\n * Enables triggering of webhooks during imports, default is {IMPORTS_TRIGGER_WEBHOOKS}.\n * @example ```\"false\"```\n */\n imports_trigger_webhooks?: number | null\n /**\n * Enables the use of an external discount engine in place of the standard one, default is {DISCOUNT_ENGINES_ENABLED}.\n */\n discount_engines_enabled?: boolean | null\n /**\n * Enables raising of API errors in case of discount engine failure, default is {DISCOUNT_ENGINES_ERRORS}.\n */\n discount_engines_errors?: boolean | null\n /**\n * The maximum length for the tag name, default is {TAGS_MAX_NAME_LENGTH}.\n * @example ```25```\n */\n tags_max_name_length?: number | null\n /**\n * The maximum allowed number of tags for each resource, default is {TAGS_MAX_ALLOWED_NUMBER}.\n * @example ```10```\n */\n tags_max_allowed_number?: number | null\n /**\n * Enables raising of API errors in case of tax calculation failure, default is {TAX_CALCULATORS_ERRORS}.\n */\n tax_calculators_errors?: boolean | null\n /**\n * Enables raising of API errors in case of external promotion failure, default is {EXTERNAL_PROMOTIONS_ERRORS}.\n */\n external_promotions_errors?: boolean | null\n /**\n * Enables raising of API errors in case of external price failure, default is {EXTERNAL_PRICES_ERRORS}.\n * @example ```true```\n */\n external_prices_errors?: boolean | null\n /**\n * Enables the Sku discovery by similarity search.\n */\n skus_discovery?: boolean | null\n /**\n * Enables the creation of the authorization when the gateway event is received, even if there is no reference on Commerce Layer.\n */\n payment_gateways_transaction_on_event?: boolean | null\n\n memberships?: Membership[] | null\n roles?: Role[] | null\n permissions?: Permission[] | null\n api_credentials?: ApiCredential[] | null\n}\n\ninterface OrganizationCreate extends ResourceCreate {\n /**\n * The organization's internal name.\n * @example ```\"The Blue Brand\"```\n */\n name: string\n /**\n * The organization's support phone.\n * @example ```\"+01 30800857\"```\n */\n support_phone?: string | null\n /**\n * The organization's support email.\n * @example ```\"support@bluebrand.com\"```\n */\n support_email?: string | null\n /**\n * The URL to the organization's logo.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n logo_url?: string | null\n /**\n * The URL to the organization's favicon.\n * @example ```\"https://bluebrand.com/img/favicon.ico\"```\n */\n favicon_url?: string | null\n /**\n * The organization's primary color.\n * @example ```\"#C8984E\"```\n */\n primary_color?: string | null\n /**\n * The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).\n * @example ```\"#FFFFCC\"```\n */\n contrast_color?: string | null\n /**\n * The organization's Google Tag Manager ID.\n * @example ```\"GTM-5FJXX6\"```\n */\n gtm_id?: string | null\n /**\n * The organization's Google Tag Manager ID for test.\n * @example ```\"GTM-5FJXX7\"```\n */\n gtm_id_test?: string | null\n /**\n * The region where the organization is located. The default value is `eu-west-1`.\n * @example ```\"eu-west-1\"```\n */\n region?: string | null\n /**\n * The organization's configuration.\n * @example ```{\"mfe\":{\"language\":\"it-IT\",\"default\":{\"links\":{\"cart\":\"https://cart.example.com/:order_id?accessToken=:access_token\",\"checkout\":\"https://checkout.example.com/:order_id?accessToken=:access_token\",\"identity\":\"https://example.com/login\",\"microstore\":\"https://example.com/microstore/?accessToken=:access_token\",\"my_account\":\"https://example.com/my-custom-account?accessToken=:access_token\"},\"checkout\":{\"optional_billing_info\":false,\"thankyou_page\":\"https://example.com/thanks/:lang/:order_id\",\"billing_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"shipping_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"billing_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"shipping_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"default_country\":\"US\"},\"urls\":{\"privacy\":\"https://example.com/privacy/:lang\",\"terms\":\"https://example.com/terms/:lang\"}},\"market:id:ZKcv13rT\":{\"links\":{\"cart\":\"https://example.com/custom-cart/:order_id?accessToken=:access_token\"},\"checkout\":{\"thankyou_page\":\"https://example.com/thanks/:order_id\"}}},\"well-known\":{\"shopping\":{\"catalog_mcp_url\":\"https://catalog-mcp.example.com/mcp\",\"client_id\":\"abc123example\",\"locale_scopes\":{\"it-IT\":{\"id\":\"ZKcv13rT\"},\"en-US\":{\"id\":\"ZKcv13rT\"}},\"ui\":{\"domain\":\"\",\"csp\":{\"resourceDomains\":[\"https://data.commercelayer.app\",\"https://cdn.brand.com\"],\"baseUriDomains\":[],\"connectDomains\":[],\"frameDomains\":[]}}}}}```\n */\n config?: Record<string, any> | null\n}\n\ninterface OrganizationUpdate extends ResourceUpdate {\n /**\n * The organization's internal name.\n * @example ```\"The Blue Brand\"```\n */\n name?: string | null\n /**\n * The organization's support phone.\n * @example ```\"+01 30800857\"```\n */\n support_phone?: string | null\n /**\n * The organization's support email.\n * @example ```\"support@bluebrand.com\"```\n */\n support_email?: string | null\n /**\n * The URL to the organization's logo.\n * @example ```\"https://bluebrand.com/img/logo.svg\"```\n */\n logo_url?: string | null\n /**\n * The URL to the organization's favicon.\n * @example ```\"https://bluebrand.com/img/favicon.ico\"```\n */\n favicon_url?: string | null\n /**\n * The organization's primary color.\n * @example ```\"#C8984E\"```\n */\n primary_color?: string | null\n /**\n * The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).\n * @example ```\"#FFFFCC\"```\n */\n contrast_color?: string | null\n /**\n * The organization's Google Tag Manager ID.\n * @example ```\"GTM-5FJXX6\"```\n */\n gtm_id?: string | null\n /**\n * The organization's Google Tag Manager ID for test.\n * @example ```\"GTM-5FJXX7\"```\n */\n gtm_id_test?: string | null\n /**\n * The organization's configuration.\n * @example ```{\"mfe\":{\"language\":\"it-IT\",\"default\":{\"links\":{\"cart\":\"https://cart.example.com/:order_id?accessToken=:access_token\",\"checkout\":\"https://checkout.example.com/:order_id?accessToken=:access_token\",\"identity\":\"https://example.com/login\",\"microstore\":\"https://example.com/microstore/?accessToken=:access_token\",\"my_account\":\"https://example.com/my-custom-account?accessToken=:access_token\"},\"checkout\":{\"optional_billing_info\":false,\"thankyou_page\":\"https://example.com/thanks/:lang/:order_id\",\"billing_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"shipping_countries\":[{\"value\":\"ES\",\"label\":\"Espana\"},{\"value\":\"IT\",\"label\":\"Italia\"},{\"value\":\"US\",\"label\":\"Unites States of America\"}],\"billing_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"shipping_states\":{\"FR\":[{\"value\":\"PA\",\"label\":\"Paris\"},{\"value\":\"LY\",\"label\":\"Lyon\"},{\"value\":\"NI\",\"label\":\"Nice\"},{\"value\":\"MA\",\"label\":\"Marseille\"},{\"value\":\"BO\",\"label\":\"Bordeaux\"}]},\"default_country\":\"US\"},\"urls\":{\"privacy\":\"https://example.com/privacy/:lang\",\"terms\":\"https://example.com/terms/:lang\"}},\"market:id:ZKcv13rT\":{\"links\":{\"cart\":\"https://example.com/custom-cart/:order_id?accessToken=:access_token\"},\"checkout\":{\"thankyou_page\":\"https://example.com/thanks/:order_id\"}}},\"well-known\":{\"shopping\":{\"catalog_mcp_url\":\"https://catalog-mcp.example.com/mcp\",\"client_id\":\"abc123example\",\"locale_scopes\":{\"it-IT\":{\"id\":\"ZKcv13rT\"},\"en-US\":{\"id\":\"ZKcv13rT\"}},\"ui\":{\"domain\":\"\",\"csp\":{\"resourceDomains\":[\"https://data.commercelayer.app\",\"https://cdn.brand.com\"],\"baseUriDomains\":[],\"connectDomains\":[],\"frameDomains\":[]}}}}}```\n */\n config?: Record<string, any> | null\n}\n\nclass Organizations extends ApiResource<Organization> {\n static readonly TYPE: OrganizationType = 'organizations' as const\n\n async create(\n resource: OrganizationCreate,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n return this.resources.create<OrganizationCreate, Organization>(\n { ...resource, type: Organizations.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: OrganizationUpdate,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n return this.resources.update<OrganizationUpdate, Organization>(\n { ...resource, type: Organizations.TYPE },\n params,\n options,\n )\n }\n\n async memberships(\n organizationId: string | Organization,\n params?: QueryParamsList<Membership>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Membership>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<Membership>(\n { type: 'memberships' },\n `organizations/${_organizationId}/memberships`,\n params,\n options,\n ) as unknown as ListResponse<Membership>\n }\n\n async roles(\n organizationId: string | Organization,\n params?: QueryParamsList<Role>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Role>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `organizations/${_organizationId}/roles`,\n params,\n options,\n ) as unknown as ListResponse<Role>\n }\n\n async permissions(\n organizationId: string | Organization,\n params?: QueryParamsList<Permission>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Permission>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<Permission>(\n { type: 'permissions' },\n `organizations/${_organizationId}/permissions`,\n params,\n options,\n ) as unknown as ListResponse<Permission>\n }\n\n async api_credentials(\n organizationId: string | Organization,\n params?: QueryParamsList<ApiCredential>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<ApiCredential>> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n return this.resources.fetch<ApiCredential>(\n { type: 'api_credentials' },\n `organizations/${_organizationId}/api_credentials`,\n params,\n options,\n ) as unknown as ListResponse<ApiCredential>\n }\n\n async transfer_ownership(\n organizationId: string | Organization,\n payload: TransferOwnershipDataType,\n options?: ResourcesConfig,\n ): Promise<void> {\n const _organizationId = (organizationId as Organization).id || (organizationId as string)\n await this.resources.action('PATCH', `organizations/${_organizationId}/transfer_ownership`, { ...payload }, options)\n }\n\n isOrganization(resource: any): resource is Organization {\n return resource.type && resource.type === Organizations.TYPE\n }\n\n relationship(id: string | ResourceId | null): OrganizationRel {\n return super.relationshipOneToOne<OrganizationRel>(id)\n }\n\n relationshipToMany(...ids: string[]): OrganizationRel[] {\n return super.relationshipOneToMany<OrganizationRel>(...ids)\n }\n\n type(): OrganizationType {\n return Organizations.TYPE\n }\n}\n\nconst instance = new Organizations()\nexport default instance\n\nexport type { Organization, OrganizationCreate, Organizations, OrganizationType, OrganizationUpdate }\n"]}
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var chunk5KN7B3T2_cjs = require('./chunk-5KN7B3T2.cjs');
6
+ require('./chunk-F2RLD5SN.cjs');
7
+ require('./chunk-CFU5DNH2.cjs');
8
+ var chunk3FP4NVLD_cjs = require('./chunk-3FP4NVLD.cjs');
9
+ require('./chunk-VFTFSHXQ.cjs');
10
+
11
+
12
+
13
+ Object.defineProperty(exports, "CommerceLayerProvisioning", {
14
+ enumerable: true,
15
+ get: function () { return chunk5KN7B3T2_cjs.CommerceLayerProvisioning; }
16
+ });
17
+ Object.defineProperty(exports, "CommerceLayerProvisioningBaseClient", {
18
+ enumerable: true,
19
+ get: function () { return chunk5KN7B3T2_cjs.CommerceLayerProvisioningBaseClient; }
20
+ });
21
+ Object.defineProperty(exports, "default", {
22
+ enumerable: true,
23
+ get: function () { return chunk5KN7B3T2_cjs.commercelayer_default; }
24
+ });
25
+ Object.defineProperty(exports, "API_SCHEMA_VERSION", {
26
+ enumerable: true,
27
+ get: function () { return chunk3FP4NVLD_cjs.API_SCHEMA_VERSION; }
28
+ });
29
+ Object.defineProperty(exports, "API_SUPPORTED_VERSIONS", {
30
+ enumerable: true,
31
+ get: function () { return chunk3FP4NVLD_cjs.API_SUPPORTED_VERSIONS; }
32
+ });
33
+ Object.defineProperty(exports, "SDK_VERSION", {
34
+ enumerable: true,
35
+ get: function () { return chunk3FP4NVLD_cjs.SDK_VERSION; }
36
+ });
37
+ //# sourceMappingURL=commercelayer.cjs.map
38
+ //# sourceMappingURL=commercelayer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"commercelayer.cjs"}
@@ -0,0 +1,58 @@
1
+ import { A as ApiError } from './error-CVRdwnY9.cjs';
2
+ import { ah as ResourcesInitConfig, aC as ResourceAdapter, aD as RequestInterceptor, aE as ErrorInterceptor, aF as ResponseInterceptor, aG as InterceptorType, aH as RawResponseReader } from './api-BY0jb79k.cjs';
3
+ import { ApiVersion } from './version.cjs';
4
+ export { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, SDK_VERSION } from './version.cjs';
5
+ import './actions.cjs';
6
+
7
+ type SdkConfig = {
8
+ /** Set to `false` to omit the `X-CL-SDK` request header that identifies the SDK and its version. Defaults to `true`. */
9
+ telemetry?: boolean;
10
+ };
11
+ /**
12
+ * The `apiVersion` init option, conditioned on how the SDK was generated:
13
+ * - **Version-aware (unified) builds** — {@link API_SUPPORTED_VERSIONS} is
14
+ * non-empty — **require** `apiVersion`. The chosen value becomes a URL path
15
+ * segment (`/api/2026-05/orders`), keeping requests aligned with the version
16
+ * the types were generated for.
17
+ * - **Legacy builds** — empty {@link API_SUPPORTED_VERSIONS}, so {@link ApiVersion}
18
+ * is `never` — take **no** `apiVersion` argument. The API is unversioned
19
+ * (`/api/orders`).
20
+ */
21
+ type ApiVersionConfig = [ApiVersion] extends [never] ? {
22
+ apiVersion?: never;
23
+ } : {
24
+ apiVersion: ApiVersion;
25
+ };
26
+ type CommerceLayerInitConfig = SdkConfig & ApiVersionConfig & ResourcesInitConfig;
27
+ type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
28
+ declare class CommerceLayerProvisioningBaseClient {
29
+ readonly apiSchemaVersion: string;
30
+ readonly apiSupportedVersions: readonly [];
31
+ protected static cl: CommerceLayerProvisioningBaseClient;
32
+ static get(config?: CommerceLayerInitConfig): CommerceLayerProvisioningBaseClient;
33
+ protected readonly instanceAdapter: ResourceAdapter;
34
+ protected constructor(config: CommerceLayerInitConfig);
35
+ protected get adapter(): ResourceAdapter;
36
+ get currentOrganization(): string;
37
+ get currentAccessToken(): string;
38
+ /** The API version pinned via `apiVersion`, or `undefined` when requests are unversioned. */
39
+ get currentApiVersion(): string | undefined;
40
+ private get interceptors();
41
+ private localConfig;
42
+ config(config: CommerceLayerConfig): this;
43
+ resources(sort?: boolean): readonly string[];
44
+ isApiError(error: any): error is ApiError;
45
+ addRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number;
46
+ addResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number;
47
+ removeInterceptor(type: InterceptorType, _id?: number): void;
48
+ removeInterceptors(): void;
49
+ addRawResponseReader(options?: {
50
+ headers: boolean;
51
+ }): RawResponseReader;
52
+ removeRawResponseReader(): void;
53
+ }
54
+ declare const CommerceLayerProvisioning: (config: CommerceLayerInitConfig) => CommerceLayerProvisioningBaseClient;
55
+
56
+ // @ts-ignore
57
+ export = CommerceLayerProvisioning;
58
+ export { ApiVersion, type CommerceLayerConfig, type CommerceLayerInitConfig, CommerceLayerProvisioning, CommerceLayerProvisioningBaseClient };
@@ -0,0 +1,56 @@
1
+ import { A as ApiError } from './error-CVRdwnY9.js';
2
+ import { ah as ResourcesInitConfig, aC as ResourceAdapter, aD as RequestInterceptor, aE as ErrorInterceptor, aF as ResponseInterceptor, aG as InterceptorType, aH as RawResponseReader } from './api-e4p3q-SB.js';
3
+ import { ApiVersion } from './version.js';
4
+ export { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, SDK_VERSION } from './version.js';
5
+ import './actions.js';
6
+
7
+ type SdkConfig = {
8
+ /** Set to `false` to omit the `X-CL-SDK` request header that identifies the SDK and its version. Defaults to `true`. */
9
+ telemetry?: boolean;
10
+ };
11
+ /**
12
+ * The `apiVersion` init option, conditioned on how the SDK was generated:
13
+ * - **Version-aware (unified) builds** — {@link API_SUPPORTED_VERSIONS} is
14
+ * non-empty — **require** `apiVersion`. The chosen value becomes a URL path
15
+ * segment (`/api/2026-05/orders`), keeping requests aligned with the version
16
+ * the types were generated for.
17
+ * - **Legacy builds** — empty {@link API_SUPPORTED_VERSIONS}, so {@link ApiVersion}
18
+ * is `never` — take **no** `apiVersion` argument. The API is unversioned
19
+ * (`/api/orders`).
20
+ */
21
+ type ApiVersionConfig = [ApiVersion] extends [never] ? {
22
+ apiVersion?: never;
23
+ } : {
24
+ apiVersion: ApiVersion;
25
+ };
26
+ type CommerceLayerInitConfig = SdkConfig & ApiVersionConfig & ResourcesInitConfig;
27
+ type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
28
+ declare class CommerceLayerProvisioningBaseClient {
29
+ readonly apiSchemaVersion: string;
30
+ readonly apiSupportedVersions: readonly [];
31
+ protected static cl: CommerceLayerProvisioningBaseClient;
32
+ static get(config?: CommerceLayerInitConfig): CommerceLayerProvisioningBaseClient;
33
+ protected readonly instanceAdapter: ResourceAdapter;
34
+ protected constructor(config: CommerceLayerInitConfig);
35
+ protected get adapter(): ResourceAdapter;
36
+ get currentOrganization(): string;
37
+ get currentAccessToken(): string;
38
+ /** The API version pinned via `apiVersion`, or `undefined` when requests are unversioned. */
39
+ get currentApiVersion(): string | undefined;
40
+ private get interceptors();
41
+ private localConfig;
42
+ config(config: CommerceLayerConfig): this;
43
+ resources(sort?: boolean): readonly string[];
44
+ isApiError(error: any): error is ApiError;
45
+ addRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number;
46
+ addResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number;
47
+ removeInterceptor(type: InterceptorType, _id?: number): void;
48
+ removeInterceptors(): void;
49
+ addRawResponseReader(options?: {
50
+ headers: boolean;
51
+ }): RawResponseReader;
52
+ removeRawResponseReader(): void;
53
+ }
54
+ declare const CommerceLayerProvisioning: (config: CommerceLayerInitConfig) => CommerceLayerProvisioningBaseClient;
55
+
56
+ export { ApiVersion, type CommerceLayerConfig, type CommerceLayerInitConfig, CommerceLayerProvisioning, CommerceLayerProvisioningBaseClient, CommerceLayerProvisioning as default };
@@ -0,0 +1,7 @@
1
+ export { CommerceLayerProvisioning, CommerceLayerProvisioningBaseClient, commercelayer_default as default } from './chunk-E2ERI2EX.js';
2
+ import './chunk-4Z4U45XQ.js';
3
+ import './chunk-DTD2FIJ3.js';
4
+ export { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, SDK_VERSION } from './chunk-UB3WPGDV.js';
5
+ import './chunk-YS5PCY5D.js';
6
+ //# sourceMappingURL=commercelayer.js.map
7
+ //# sourceMappingURL=commercelayer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"commercelayer.js"}