@commercelayer/provisioning-sdk 3.0.0-beta.2 → 3.0.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 (165) hide show
  1. package/README.md +23 -4
  2. package/lib/{api-C_E9e1ea.d.ts → api-CnrR2t1g.d.ts} +50 -26
  3. package/lib/{api-C4jp_9vb.d.cts → api-R3mMNn87.d.cts} +50 -26
  4. package/lib/api.cjs +23 -23
  5. package/lib/api.d.cts +1 -1
  6. package/lib/api.d.ts +1 -1
  7. package/lib/api.js +13 -13
  8. package/lib/binding.cjs +3 -3
  9. package/lib/binding.d.cts +4 -4
  10. package/lib/binding.d.ts +4 -4
  11. package/lib/binding.js +2 -2
  12. package/lib/bundle.cjs +17 -17
  13. package/lib/bundle.d.cts +1 -1
  14. package/lib/bundle.d.ts +1 -1
  15. package/lib/bundle.js +15 -15
  16. package/lib/{chunk-3PJNJ7B6.js → chunk-2FZWJMYX.js} +5 -5
  17. package/lib/chunk-2FZWJMYX.js.map +1 -0
  18. package/lib/{chunk-OROPOAHK.cjs → chunk-3UQ4UNHL.cjs} +6 -6
  19. package/lib/chunk-3UQ4UNHL.cjs.map +1 -0
  20. package/lib/{chunk-6MXIGF2G.cjs → chunk-5RZ2O2CJ.cjs} +10 -10
  21. package/lib/{chunk-6MXIGF2G.cjs.map → chunk-5RZ2O2CJ.cjs.map} +1 -1
  22. package/lib/{chunk-NDKGLF4B.cjs → chunk-5V2JEFHA.cjs} +4 -4
  23. package/lib/chunk-5V2JEFHA.cjs.map +1 -0
  24. package/lib/{chunk-T2U6MUX4.js → chunk-7BSFPWED.js} +3 -3
  25. package/lib/chunk-7BSFPWED.js.map +1 -0
  26. package/lib/{chunk-EVDEBFHZ.cjs → chunk-ATSYNXFW.cjs} +35 -13
  27. package/lib/chunk-ATSYNXFW.cjs.map +1 -0
  28. package/lib/{chunk-MHV7FMLE.cjs → chunk-B77PPXQ4.cjs} +4 -4
  29. package/lib/chunk-B77PPXQ4.cjs.map +1 -0
  30. package/lib/{chunk-ZWZHZ4SU.js → chunk-BOAFNR4A.js} +3 -3
  31. package/lib/chunk-BOAFNR4A.js.map +1 -0
  32. package/lib/{chunk-3NDVX4SE.cjs → chunk-C4PVJRMW.cjs} +4 -4
  33. package/lib/chunk-C4PVJRMW.cjs.map +1 -0
  34. package/lib/{chunk-GHXKZEH7.js → chunk-CR45TDCY.js} +30 -8
  35. package/lib/chunk-CR45TDCY.js.map +1 -0
  36. package/lib/{chunk-7YEOUGXO.js → chunk-D7JC6E6O.js} +3 -3
  37. package/lib/chunk-D7JC6E6O.js.map +1 -0
  38. package/lib/{chunk-DYMRH6LP.cjs → chunk-EXABJOAU.cjs} +4 -4
  39. package/lib/chunk-EXABJOAU.cjs.map +1 -0
  40. package/lib/{chunk-UILXNOZE.cjs → chunk-F52NPQLI.cjs} +4 -4
  41. package/lib/{chunk-UILXNOZE.cjs.map → chunk-F52NPQLI.cjs.map} +1 -1
  42. package/lib/{chunk-STPXKF53.js → chunk-H76I777K.js} +4 -4
  43. package/lib/{chunk-STPXKF53.js.map → chunk-H76I777K.js.map} +1 -1
  44. package/lib/{chunk-3ILNEP2F.cjs → chunk-HKSMUVBZ.cjs} +26 -26
  45. package/lib/{chunk-3ILNEP2F.cjs.map → chunk-HKSMUVBZ.cjs.map} +1 -1
  46. package/lib/{chunk-IRFPCJTG.js → chunk-IRSVIAA3.js} +3 -3
  47. package/lib/chunk-IRSVIAA3.js.map +1 -0
  48. package/lib/{chunk-WMUY7Z2Q.js → chunk-JEP7T7W5.js} +3 -3
  49. package/lib/chunk-JEP7T7W5.js.map +1 -0
  50. package/lib/{chunk-KO4FQ4V2.cjs → chunk-JO4BHGCD.cjs} +4 -4
  51. package/lib/chunk-JO4BHGCD.cjs.map +1 -0
  52. package/lib/{chunk-6FB54J7W.cjs → chunk-KOCBBI6X.cjs} +4 -4
  53. package/lib/chunk-KOCBBI6X.cjs.map +1 -0
  54. package/lib/{chunk-KT6LCJJQ.js → chunk-LWRSBPJL.js} +3 -3
  55. package/lib/chunk-LWRSBPJL.js.map +1 -0
  56. package/lib/{chunk-TY46WNR6.cjs → chunk-NYLVQKFV.cjs} +8 -8
  57. package/lib/{chunk-TY46WNR6.cjs.map → chunk-NYLVQKFV.cjs.map} +1 -1
  58. package/lib/{chunk-ECGUWRRG.js → chunk-OJYX2GPK.js} +3 -3
  59. package/lib/chunk-OJYX2GPK.js.map +1 -0
  60. package/lib/{chunk-YUNEDDTL.js → chunk-OO2DV22U.js} +14 -14
  61. package/lib/{chunk-YUNEDDTL.js.map → chunk-OO2DV22U.js.map} +1 -1
  62. package/lib/{chunk-FRLV5YFL.cjs → chunk-PG4GQVZI.cjs} +4 -4
  63. package/lib/{chunk-FRLV5YFL.cjs.map → chunk-PG4GQVZI.cjs.map} +1 -1
  64. package/lib/{chunk-CWXGTX7W.js → chunk-PKQGWLOZ.js} +4 -4
  65. package/lib/{chunk-CWXGTX7W.js.map → chunk-PKQGWLOZ.js.map} +1 -1
  66. package/lib/{chunk-FMHTNUZ4.cjs → chunk-RADEEFOM.cjs} +4 -4
  67. package/lib/chunk-RADEEFOM.cjs.map +1 -0
  68. package/lib/chunk-T7GAOLT5.js +12 -0
  69. package/lib/chunk-T7GAOLT5.js.map +1 -0
  70. package/lib/{chunk-XS6QLJHG.cjs → chunk-TVU45BYJ.cjs} +5 -5
  71. package/lib/chunk-TVU45BYJ.cjs.map +1 -0
  72. package/lib/{chunk-LTIWXCVE.js → chunk-VGP6LU6F.js} +3 -3
  73. package/lib/{chunk-LTIWXCVE.js.map → chunk-VGP6LU6F.js.map} +1 -1
  74. package/lib/{chunk-TXONK7R5.cjs → chunk-VUWMD2QC.cjs} +4 -4
  75. package/lib/chunk-VUWMD2QC.cjs.map +1 -0
  76. package/lib/{chunk-I4LPOTDO.js → chunk-YT2JKVV4.js} +3 -3
  77. package/lib/{chunk-I4LPOTDO.js.map → chunk-YT2JKVV4.js.map} +1 -1
  78. package/lib/{chunk-G4JBHI2H.js → chunk-ZJNUYDXX.js} +3 -3
  79. package/lib/chunk-ZJNUYDXX.js.map +1 -0
  80. package/lib/commercelayer.cjs +10 -10
  81. package/lib/commercelayer.d.cts +2 -2
  82. package/lib/commercelayer.d.ts +2 -2
  83. package/lib/commercelayer.js +4 -4
  84. package/lib/enum.d.cts +1 -1
  85. package/lib/enum.d.ts +1 -1
  86. package/lib/index.cjs +22 -22
  87. package/lib/index.cjs.map +1 -1
  88. package/lib/index.d.cts +1 -1
  89. package/lib/index.d.ts +1 -1
  90. package/lib/index.js +17 -17
  91. package/lib/index.js.map +1 -1
  92. package/lib/model.d.cts +1 -1
  93. package/lib/model.d.ts +1 -1
  94. package/lib/resources/api_credentials.cjs +5 -5
  95. package/lib/resources/api_credentials.d.cts +2 -2
  96. package/lib/resources/api_credentials.d.ts +1 -1
  97. package/lib/resources/api_credentials.js +4 -4
  98. package/lib/resources/application_memberships.cjs +5 -5
  99. package/lib/resources/application_memberships.d.cts +2 -2
  100. package/lib/resources/application_memberships.d.ts +1 -1
  101. package/lib/resources/application_memberships.js +4 -4
  102. package/lib/resources/identity_providers.cjs +5 -5
  103. package/lib/resources/identity_providers.d.cts +2 -2
  104. package/lib/resources/identity_providers.d.ts +1 -1
  105. package/lib/resources/identity_providers.js +4 -4
  106. package/lib/resources/membership_profiles.cjs +5 -5
  107. package/lib/resources/membership_profiles.d.cts +2 -2
  108. package/lib/resources/membership_profiles.d.ts +1 -1
  109. package/lib/resources/membership_profiles.js +4 -4
  110. package/lib/resources/memberships.cjs +5 -5
  111. package/lib/resources/memberships.d.cts +2 -2
  112. package/lib/resources/memberships.d.ts +1 -1
  113. package/lib/resources/memberships.js +4 -4
  114. package/lib/resources/organizations.cjs +5 -5
  115. package/lib/resources/organizations.d.cts +2 -2
  116. package/lib/resources/organizations.d.ts +1 -1
  117. package/lib/resources/organizations.js +4 -4
  118. package/lib/resources/permissions.cjs +5 -5
  119. package/lib/resources/permissions.d.cts +2 -2
  120. package/lib/resources/permissions.d.ts +1 -1
  121. package/lib/resources/permissions.js +4 -4
  122. package/lib/resources/roles.cjs +5 -5
  123. package/lib/resources/roles.d.cts +2 -2
  124. package/lib/resources/roles.d.ts +1 -1
  125. package/lib/resources/roles.js +4 -4
  126. package/lib/resources/users.cjs +5 -5
  127. package/lib/resources/users.d.cts +2 -2
  128. package/lib/resources/users.d.ts +1 -1
  129. package/lib/resources/users.js +4 -4
  130. package/lib/resources/versions.cjs +5 -5
  131. package/lib/resources/versions.d.cts +2 -2
  132. package/lib/resources/versions.d.ts +1 -1
  133. package/lib/resources/versions.js +4 -4
  134. package/lib/static.cjs +6 -6
  135. package/lib/static.d.cts +1 -1
  136. package/lib/static.d.ts +1 -1
  137. package/lib/static.js +5 -5
  138. package/lib/version.cjs +4 -4
  139. package/lib/version.d.cts +1 -1
  140. package/lib/version.d.ts +1 -1
  141. package/lib/version.js +1 -1
  142. package/package.json +8 -8
  143. package/lib/chunk-3NDVX4SE.cjs.map +0 -1
  144. package/lib/chunk-3PJNJ7B6.js.map +0 -1
  145. package/lib/chunk-6FB54J7W.cjs.map +0 -1
  146. package/lib/chunk-7YEOUGXO.js.map +0 -1
  147. package/lib/chunk-DYMRH6LP.cjs.map +0 -1
  148. package/lib/chunk-ECGUWRRG.js.map +0 -1
  149. package/lib/chunk-EVDEBFHZ.cjs.map +0 -1
  150. package/lib/chunk-FMHTNUZ4.cjs.map +0 -1
  151. package/lib/chunk-G4JBHI2H.js.map +0 -1
  152. package/lib/chunk-GHXKZEH7.js.map +0 -1
  153. package/lib/chunk-IRFPCJTG.js.map +0 -1
  154. package/lib/chunk-KO4FQ4V2.cjs.map +0 -1
  155. package/lib/chunk-KT6LCJJQ.js.map +0 -1
  156. package/lib/chunk-MHV7FMLE.cjs.map +0 -1
  157. package/lib/chunk-NDKGLF4B.cjs.map +0 -1
  158. package/lib/chunk-OROPOAHK.cjs.map +0 -1
  159. package/lib/chunk-SQLX22US.js +0 -12
  160. package/lib/chunk-SQLX22US.js.map +0 -1
  161. package/lib/chunk-T2U6MUX4.js.map +0 -1
  162. package/lib/chunk-TXONK7R5.cjs.map +0 -1
  163. package/lib/chunk-WMUY7Z2Q.js.map +0 -1
  164. package/lib/chunk-XS6QLJHG.cjs.map +0 -1
  165. package/lib/chunk-ZWZHZ4SU.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkEVDEBFHZ_cjs = require('./chunk-EVDEBFHZ.cjs');
3
+ var chunkATSYNXFW_cjs = require('./chunk-ATSYNXFW.cjs');
4
4
 
5
5
  // gen/resources/roles.ts
6
- var Roles = class _Roles extends chunkEVDEBFHZ_cjs.ApiResource {
6
+ var Roles = class _Roles extends chunkATSYNXFW_cjs.ApiResource {
7
7
  static TYPE = "roles";
8
8
  async create(resource, params, options) {
9
9
  return this.resources.create({ ...resource, type: _Roles.TYPE }, params, options);
@@ -80,5 +80,5 @@ var instance = new Roles();
80
80
  var roles_default = instance;
81
81
 
82
82
  exports.roles_default = roles_default;
83
- //# sourceMappingURL=chunk-KO4FQ4V2.cjs.map
84
- //# sourceMappingURL=chunk-KO4FQ4V2.cjs.map
83
+ //# sourceMappingURL=chunk-JO4BHGCD.cjs.map
84
+ //# sourceMappingURL=chunk-JO4BHGCD.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../gen/resources/roles.ts"],"names":["ApiResource"],"mappings":";;;;;AA0EA,IAAM,KAAA,GAAN,MAAM,MAAA,SAAcA,6BAAA,CAAkB;AAAA,EACpC,OAAgB,IAAA,GAAiB,OAAA;AAAA,EAEjC,MAAM,MAAA,CAAO,QAAA,EAAsB,MAAA,EAAoC,OAAA,EAA0C;AAC/G,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAyB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,MAAA,CAAM,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EACnG;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAAsB,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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 { ApiCredential } from './api_credentials'\nimport type { Membership } from './memberships'\nimport type { Organization, OrganizationType } from './organizations'\nimport type { Permission } from './permissions'\nimport type { Version } from './versions'\n\ntype RoleType = 'roles'\ntype RoleRel = ResourceRel & { type: RoleType }\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\n\nexport type RoleSort = Pick<Role, 'id' | 'name'> & ResourceSort\n// export type RoleFilter = Pick<Role, 'id' | 'name' | 'kind'> & ResourceFilter\n\n/**\n * The Role object is returned as part of the response body of each successful list, retrieve, create or update API call to the /api/roles endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/roles/object\n */\ninterface Role extends Resource {\n readonly type: RoleType\n\n /**\n * The role name.\n * @example ```\"Custom role\"```\n */\n name: string\n /**\n * The kind of role, one of: `custom`, `admin`, `read_only`.\n * @example ```\"custom\"```\n */\n kind: string\n\n organization?: Organization | null\n permissions?: Permission[] | null\n memberships?: Membership[] | null\n api_credentials?: ApiCredential[] | null\n versions?: Version[] | null\n}\n\ninterface RoleCreate extends ResourceCreate {\n /**\n * The role name.\n * @example ```\"Custom role\"```\n */\n name: string\n\n organization: OrganizationRel\n}\n\ninterface RoleUpdate extends ResourceUpdate {\n /**\n * The role name.\n * @example ```\"Custom role\"```\n */\n name?: string | null\n /**\n * Send this attribute if you want to update the role base permissions.\n * @example ```true```\n */\n _add_missing_base_permissions?: boolean | null\n}\n\nclass Roles extends ApiResource<Role> {\n static readonly TYPE: RoleType = 'roles' as const\n\n async create(resource: RoleCreate, params?: QueryParamsRetrieve<Role>, options?: ResourcesConfig): Promise<Role> {\n return this.resources.create<RoleCreate, Role>({ ...resource, type: Roles.TYPE }, params, options)\n }\n\n async update(resource: RoleUpdate, params?: QueryParamsRetrieve<Role>, options?: ResourcesConfig): Promise<Role> {\n return this.resources.update<RoleUpdate, Role>({ ...resource, type: Roles.TYPE }, params, options)\n }\n\n async organization(\n roleId: string | Role,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _roleId = (roleId as Role).id || (roleId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `roles/${_roleId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async permissions(\n roleId: string | Role,\n params?: QueryParamsList<Permission>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Permission>> {\n const _roleId = (roleId as Role).id || (roleId as string)\n return this.resources.fetch<Permission>(\n { type: 'permissions' },\n `roles/${_roleId}/permissions`,\n params,\n options,\n ) as unknown as ListResponse<Permission>\n }\n\n async memberships(\n roleId: string | Role,\n params?: QueryParamsList<Membership>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Membership>> {\n const _roleId = (roleId as Role).id || (roleId as string)\n return this.resources.fetch<Membership>(\n { type: 'memberships' },\n `roles/${_roleId}/memberships`,\n params,\n options,\n ) as unknown as ListResponse<Membership>\n }\n\n async api_credentials(\n roleId: string | Role,\n params?: QueryParamsList<ApiCredential>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<ApiCredential>> {\n const _roleId = (roleId as Role).id || (roleId as string)\n return this.resources.fetch<ApiCredential>(\n { type: 'api_credentials' },\n `roles/${_roleId}/api_credentials`,\n params,\n options,\n ) as unknown as ListResponse<ApiCredential>\n }\n\n async versions(\n roleId: string | Role,\n params?: QueryParamsList<Version>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Version>> {\n const _roleId = (roleId as Role).id || (roleId as string)\n return this.resources.fetch<Version>(\n { type: 'versions' },\n `roles/${_roleId}/versions`,\n params,\n options,\n ) as unknown as ListResponse<Version>\n }\n\n async _add_missing_base_permissions(\n id: string | Role,\n params?: QueryParamsRetrieve<Role>,\n options?: ResourcesConfig,\n ): Promise<Role> {\n return this.resources.update<RoleUpdate, Role>(\n { id: typeof id === 'string' ? id : id.id, type: Roles.TYPE, _add_missing_base_permissions: true },\n params,\n options,\n )\n }\n\n isRole(resource: any): resource is Role {\n return resource.type && resource.type === Roles.TYPE\n }\n\n relationship(id: string | ResourceId | null): RoleRel {\n return super.relationshipOneToOne<RoleRel>(id)\n }\n\n relationshipToMany(...ids: string[]): RoleRel[] {\n return super.relationshipOneToMany<RoleRel>(...ids)\n }\n\n type(): RoleType {\n return Roles.TYPE\n }\n}\n\nconst instance = new Roles()\nexport default instance\n\nexport type { Role, RoleCreate, Roles, RoleType, RoleUpdate }\n"]}
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkEVDEBFHZ_cjs = require('./chunk-EVDEBFHZ.cjs');
3
+ var chunkATSYNXFW_cjs = require('./chunk-ATSYNXFW.cjs');
4
4
 
5
5
  // gen/resources/users.ts
6
- var Users = class _Users extends chunkEVDEBFHZ_cjs.ApiSingleton {
6
+ var Users = class _Users extends chunkATSYNXFW_cjs.ApiSingleton {
7
7
  static TYPE = "users";
8
8
  async update(resource, params, options) {
9
9
  return this.resources.update({ ...resource, type: _Users.TYPE }, params, options, this.path());
@@ -28,5 +28,5 @@ var instance = new Users();
28
28
  var users_default = instance;
29
29
 
30
30
  exports.users_default = users_default;
31
- //# sourceMappingURL=chunk-6FB54J7W.cjs.map
32
- //# sourceMappingURL=chunk-6FB54J7W.cjs.map
31
+ //# sourceMappingURL=chunk-KOCBBI6X.cjs.map
32
+ //# sourceMappingURL=chunk-KOCBBI6X.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../gen/resources/users.ts"],"names":["ApiSingleton"],"mappings":";;;;;AA2EA,IAAM,KAAA,GAAN,MAAM,MAAA,SAAcA,8BAAA,CAAmB;AAAA,EACrC,OAAgB,IAAA,GAAiB,OAAA;AAAA,EAEjC,MAAM,MAAA,CAAO,QAAA,EAAsB,MAAA,EAAoC,OAAA,EAA0C;AAC/G,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAyB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,MAAA,CAAM,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAA,EAAS,IAAA,CAAK,MAAM,CAAA;AAAA,EAChH;AAAA,EAEA,OAAO,QAAA,EAAiC;AACtC,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,MAAA,CAAM,IAAA;AAAA,EAClD;AAAA,EAEA,aAAa,EAAA,EAAyC;AACpD,IAAA,OAAO,KAAA,CAAM,qBAA8B,EAAE,CAAA;AAAA,EAC/C;AAAA,EAEA,sBAAsB,GAAA,EAA0B;AAC9C,IAAA,OAAO,KAAA,CAAM,qBAAA,CAA+B,GAAG,GAAG,CAAA;AAAA,EACpD;AAAA,EAEA,IAAA,GAAiB;AACf,IAAA,OAAO,MAAA,CAAM,IAAA;AAAA,EACf;AAAA,EAEA,IAAA,GAAe;AACb,IAAA,OAAO,MAAA;AAAA,EACT;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,KAAA,EAAM;AAC3B,IAAO,aAAA,GAAQ","file":"chunk-KOCBBI6X.cjs","sourcesContent":["import type { QueryParamsRetrieve } from '@runtime/query'\nimport type {\n Resource,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n SingletonUpdate,\n} from '@runtime/resource'\nimport { ApiSingleton } from '@runtime/resource'\n\ntype UserType = 'users'\ntype UserRel = ResourceRel & { type: UserType }\n\nexport type UserSort = Pick<User, 'id' | 'email' | 'first_name' | 'last_name'> & ResourceSort\n// export type UserFilter = Pick<User, 'id' | 'email' | 'first_name' | 'last_name' | 'time_zone'> & ResourceFilter\n\n/**\n * The User object is returned as part of the response body of each successful retrieve or update API call to the /api/user endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/users/object\n */\ninterface User extends Resource {\n readonly type: UserType\n\n /**\n * The user email.\n * @example ```\"user@commercelayer.io\"```\n */\n email: string\n /**\n * The user first name. Maximum 100 characters. HTML is stripped.\n * @example ```\"John\"```\n */\n first_name: string\n /**\n * The user last name. Maximum 100 characters. HTML is stripped.\n * @example ```\"Doe\"```\n */\n last_name: string\n /**\n * The user preferred timezone.\n * @example ```\"UTC\"```\n */\n time_zone?: string | null\n /**\n * The user 2FA setting.\n * @example ```true```\n */\n otp_required_for_login: boolean\n}\n\ninterface UserUpdate extends SingletonUpdate {\n /**\n * The user email.\n * @example ```\"user@commercelayer.io\"```\n */\n email?: string | null\n /**\n * The user first name. Maximum 100 characters. HTML is stripped.\n * @example ```\"John\"```\n */\n first_name?: string | null\n /**\n * The user last name. Maximum 100 characters. HTML is stripped.\n * @example ```\"Doe\"```\n */\n last_name?: string | null\n /**\n * The user preferred timezone.\n * @example ```\"UTC\"```\n */\n time_zone?: string | null\n}\n\nclass Users extends ApiSingleton<User> {\n static readonly TYPE: UserType = 'users' as const\n\n async update(resource: UserUpdate, params?: QueryParamsRetrieve<User>, options?: ResourcesConfig): Promise<User> {\n return this.resources.update<UserUpdate, User>({ ...resource, type: Users.TYPE }, params, options, this.path())\n }\n\n isUser(resource: any): resource is User {\n return resource.type && resource.type === Users.TYPE\n }\n\n relationship(id: string | ResourceId | null): UserRel {\n return super.relationshipOneToOne<UserRel>(id)\n }\n\n relationshipToMany(...ids: string[]): UserRel[] {\n return super.relationshipOneToMany<UserRel>(...ids)\n }\n\n type(): UserType {\n return Users.TYPE\n }\n\n path(): string {\n return 'user'\n }\n}\n\nconst instance = new Users()\nexport default instance\n\nexport type { User, Users, UserType, UserUpdate }\n"]}
@@ -1,4 +1,4 @@
1
- import { ApiResource } from './chunk-GHXKZEH7.js';
1
+ import { ApiResource } from './chunk-CR45TDCY.js';
2
2
 
3
3
  // gen/resources/membership_profiles.ts
4
4
  var MembershipProfiles = class _MembershipProfiles extends ApiResource {
@@ -55,5 +55,5 @@ var instance = new MembershipProfiles();
55
55
  var membership_profiles_default = instance;
56
56
 
57
57
  export { membership_profiles_default };
58
- //# sourceMappingURL=chunk-KT6LCJJQ.js.map
59
- //# sourceMappingURL=chunk-KT6LCJJQ.js.map
58
+ //# sourceMappingURL=chunk-LWRSBPJL.js.map
59
+ //# sourceMappingURL=chunk-LWRSBPJL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../gen/resources/membership_profiles.ts"],"names":[],"mappings":";;;AAkFA,IAAM,kBAAA,GAAN,MAAM,mBAAA,SAA2B,WAAA,CAA+B;AAAA,EAC9D,OAAgB,IAAA,GAA8B,qBAAA;AAAA,EAE9C,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EAC4B;AAC5B,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,oBAAmB,IAAA,EAAK;AAAA,MAC7C,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EAC4B;AAC5B,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,oBAAmB,IAAA,EAAK;AAAA,MAC7C,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,mBAAA,CAAmB,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA,EAC1G;AAAA,EAEA,MAAM,YAAA,CACJ,mBAAA,EACA,MAAA,EACA,OAAA,EACuB;AACvB,IAAA,MAAM,oBAAA,GAAwB,oBAA0C,EAAA,IAAO,mBAAA;AAC/E,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,eAAA,EAAgB;AAAA,MACxB,uBAAuB,oBAAoB,CAAA,aAAA,CAAA;AAAA,MAC3C,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,uBAAA,CACJ,mBAAA,EACA,MAAA,EACA,OAAA,EAC8C;AAC9C,IAAA,MAAM,oBAAA,GAAwB,oBAA0C,EAAA,IAAO,mBAAA;AAC/E,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,yBAAA,EAA0B;AAAA,MAClC,uBAAuB,oBAAoB,CAAA,wBAAA,CAAA;AAAA,MAC3C,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,oBAAoB,QAAA,EAA8C;AAChE,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,mBAAA,CAAmB,IAAA;AAAA,EAC/D;AAAA,EAEA,aAAa,EAAA,EAAsD;AACjE,IAAA,OAAO,KAAA,CAAM,qBAA2C,EAAE,CAAA;AAAA,EAC5D;AAAA,EAEA,sBAAsB,GAAA,EAAuC;AAC3D,IAAA,OAAO,KAAA,CAAM,qBAAA,CAA4C,GAAG,GAAG,CAAA;AAAA,EACjE;AAAA,EAEA,IAAA,GAA8B;AAC5B,IAAA,OAAO,mBAAA,CAAmB,IAAA;AAAA,EAC5B;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,kBAAA,EAAmB;AACxC,IAAO,2BAAA,GAAQ","file":"chunk-LWRSBPJL.js","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 { ApplicationMembership, ApplicationMembershipType } from './application_memberships'\nimport type { Organization, OrganizationType } from './organizations'\n\ntype MembershipProfileType = 'membership_profiles'\ntype MembershipProfileRel = ResourceRel & { type: MembershipProfileType }\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\ntype ApplicationMembershipRel = ResourceRel & { type: ApplicationMembershipType }\n\nexport type MembershipProfileSort = Pick<MembershipProfile, 'id' | 'name'> & ResourceSort\n// export type MembershipProfileFilter = Pick<MembershipProfile, 'id' | 'name' | 'access_scope'> & ResourceFilter\n\n/**\n * The Membership profile object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/membership_profiles endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/membership_profiles/object\n */\ninterface MembershipProfile extends Resource {\n readonly type: MembershipProfileType\n\n /**\n * The membership profile name.\n * @example ```\"Marketing group\"```\n */\n name: string\n /**\n * Reflects the organization's access scope, either test_access or all_access.\n * @example ```true```\n */\n test_enabled: boolean\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope: 'live_access' | 'test_access' | 'all_access'\n\n organization?: Organization | null\n application_memberships?: ApplicationMembership[] | null\n}\n\ninterface MembershipProfileCreate extends ResourceCreate {\n /**\n * The membership profile name.\n * @example ```\"Marketing group\"```\n */\n name: string\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope: 'live_access' | 'test_access' | 'all_access'\n\n organization: OrganizationRel\n application_memberships?: ApplicationMembershipRel[] | null\n}\n\ninterface MembershipProfileUpdate extends ResourceUpdate {\n /**\n * The membership profile name.\n * @example ```\"Marketing group\"```\n */\n name?: string | null\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope?: 'live_access' | 'test_access' | 'all_access' | null\n\n application_memberships?: ApplicationMembershipRel[] | null\n}\n\nclass MembershipProfiles extends ApiResource<MembershipProfile> {\n static readonly TYPE: MembershipProfileType = 'membership_profiles' as const\n\n async create(\n resource: MembershipProfileCreate,\n params?: QueryParamsRetrieve<MembershipProfile>,\n options?: ResourcesConfig,\n ): Promise<MembershipProfile> {\n return this.resources.create<MembershipProfileCreate, MembershipProfile>(\n { ...resource, type: MembershipProfiles.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: MembershipProfileUpdate,\n params?: QueryParamsRetrieve<MembershipProfile>,\n options?: ResourcesConfig,\n ): Promise<MembershipProfile> {\n return this.resources.update<MembershipProfileUpdate, MembershipProfile>(\n { ...resource, type: MembershipProfiles.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: MembershipProfiles.TYPE } : id, options)\n }\n\n async organization(\n membershipProfileId: string | MembershipProfile,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _membershipProfileId = (membershipProfileId as MembershipProfile).id || (membershipProfileId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `membership_profiles/${_membershipProfileId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async application_memberships(\n membershipProfileId: string | MembershipProfile,\n params?: QueryParamsList<ApplicationMembership>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<ApplicationMembership>> {\n const _membershipProfileId = (membershipProfileId as MembershipProfile).id || (membershipProfileId as string)\n return this.resources.fetch<ApplicationMembership>(\n { type: 'application_memberships' },\n `membership_profiles/${_membershipProfileId}/application_memberships`,\n params,\n options,\n ) as unknown as ListResponse<ApplicationMembership>\n }\n\n isMembershipProfile(resource: any): resource is MembershipProfile {\n return resource.type && resource.type === MembershipProfiles.TYPE\n }\n\n relationship(id: string | ResourceId | null): MembershipProfileRel {\n return super.relationshipOneToOne<MembershipProfileRel>(id)\n }\n\n relationshipToMany(...ids: string[]): MembershipProfileRel[] {\n return super.relationshipOneToMany<MembershipProfileRel>(...ids)\n }\n\n type(): MembershipProfileType {\n return MembershipProfiles.TYPE\n }\n}\n\nconst instance = new MembershipProfiles()\nexport default instance\n\nexport type {\n MembershipProfile,\n MembershipProfileCreate,\n MembershipProfiles,\n MembershipProfileType,\n MembershipProfileUpdate,\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkEVDEBFHZ_cjs = require('./chunk-EVDEBFHZ.cjs');
4
- var chunkXS6QLJHG_cjs = require('./chunk-XS6QLJHG.cjs');
3
+ var chunkATSYNXFW_cjs = require('./chunk-ATSYNXFW.cjs');
4
+ var chunkTVU45BYJ_cjs = require('./chunk-TVU45BYJ.cjs');
5
5
  var chunkVFTFSHXQ_cjs = require('./chunk-VFTFSHXQ.cjs');
6
6
 
7
7
  // src/static.ts
@@ -25,19 +25,19 @@ var CommerceLayerProvisioningStatic = {
25
25
  return chunkVFTFSHXQ_cjs.isDeletable(resource);
26
26
  },
27
27
  isSdkError: (error) => {
28
- return chunkEVDEBFHZ_cjs.isSdkError(error);
28
+ return chunkATSYNXFW_cjs.isSdkError(error);
29
29
  },
30
30
  isApiError: (error) => {
31
- return chunkEVDEBFHZ_cjs.isApiError(error);
31
+ return chunkATSYNXFW_cjs.isApiError(error);
32
32
  },
33
33
  isTokenExpired: (token) => {
34
- return chunkEVDEBFHZ_cjs.isTokenExpired(token);
34
+ return chunkATSYNXFW_cjs.isTokenExpired(token);
35
35
  },
36
36
  get schemaVersion() {
37
- return chunkXS6QLJHG_cjs.API_SCHEMA_VERSION;
37
+ return chunkTVU45BYJ_cjs.API_SCHEMA_VERSION;
38
38
  }
39
39
  };
40
40
 
41
41
  exports.CommerceLayerProvisioningStatic = CommerceLayerProvisioningStatic;
42
- //# sourceMappingURL=chunk-TY46WNR6.cjs.map
43
- //# sourceMappingURL=chunk-TY46WNR6.cjs.map
42
+ //# sourceMappingURL=chunk-NYLVQKFV.cjs.map
43
+ //# sourceMappingURL=chunk-NYLVQKFV.cjs.map
@@ -1 +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-TY46WNR6.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"]}
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-NYLVQKFV.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"]}
@@ -1,4 +1,4 @@
1
- import { ApiResource } from './chunk-GHXKZEH7.js';
1
+ import { ApiResource } from './chunk-CR45TDCY.js';
2
2
 
3
3
  // gen/resources/organizations.ts
4
4
  var Organizations = class _Organizations extends ApiResource {
@@ -74,5 +74,5 @@ var instance = new Organizations();
74
74
  var organizations_default = instance;
75
75
 
76
76
  export { organizations_default };
77
- //# sourceMappingURL=chunk-ECGUWRRG.js.map
78
- //# sourceMappingURL=chunk-ECGUWRRG.js.map
77
+ //# sourceMappingURL=chunk-OJYX2GPK.js.map
78
+ //# sourceMappingURL=chunk-OJYX2GPK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../gen/resources/organizations.ts"],"names":[],"mappings":";;;AAycA,IAAM,aAAA,GAAN,MAAM,cAAA,SAAsB,WAAA,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,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,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-OJYX2GPK.js","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\n /**\n * The organization's domain.\n * @example ```\"the-blue-brand.commercelayer.io\"```\n */\n domain: 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 * Indicates if the organization can switch to live mode.\n */\n can_switch_live: boolean\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>\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 * Enables automatic restoration of the gift card balance when an order is cancelled or reopened for editing, default is {GIFT_CARDS_AUTO_RESTORE}.\n * @example ```true```\n */\n gift_cards_auto_restore?: boolean | 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 * Enables blocking a new refund (or compensation) on a capture while an earlier async refund on the same capture is still unresolved.\n */\n refunds_check_for_pending?: 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"]}
@@ -1,15 +1,15 @@
1
- import { CommerceLayerProvisioningBaseClient } from './chunk-CWXGTX7W.js';
2
- import { permissions_default } from './chunk-I4LPOTDO.js';
3
- import { roles_default } from './chunk-IRFPCJTG.js';
4
- import { users_default } from './chunk-ZWZHZ4SU.js';
5
- import { versions_default } from './chunk-G4JBHI2H.js';
6
- import { api_credentials_default } from './chunk-7YEOUGXO.js';
7
- import { application_memberships_default } from './chunk-LTIWXCVE.js';
8
- import { identity_providers_default } from './chunk-WMUY7Z2Q.js';
9
- import { membership_profiles_default } from './chunk-KT6LCJJQ.js';
10
- import { memberships_default } from './chunk-T2U6MUX4.js';
11
- import { organizations_default } from './chunk-ECGUWRRG.js';
12
- import { debug_default } from './chunk-GHXKZEH7.js';
1
+ import { CommerceLayerProvisioningBaseClient } from './chunk-PKQGWLOZ.js';
2
+ import { permissions_default } from './chunk-YT2JKVV4.js';
3
+ import { roles_default } from './chunk-IRSVIAA3.js';
4
+ import { users_default } from './chunk-BOAFNR4A.js';
5
+ import { versions_default } from './chunk-ZJNUYDXX.js';
6
+ import { api_credentials_default } from './chunk-D7JC6E6O.js';
7
+ import { application_memberships_default } from './chunk-VGP6LU6F.js';
8
+ import { identity_providers_default } from './chunk-JEP7T7W5.js';
9
+ import { membership_profiles_default } from './chunk-LWRSBPJL.js';
10
+ import { memberships_default } from './chunk-7BSFPWED.js';
11
+ import { organizations_default } from './chunk-OJYX2GPK.js';
12
+ import { debug_default } from './chunk-CR45TDCY.js';
13
13
 
14
14
  // gen/bundle.ts
15
15
  var debug = debug_default("bundle");
@@ -86,5 +86,5 @@ function CommerceLayerProvisioning(config) {
86
86
  var bundle_default = CommerceLayerProvisioning;
87
87
 
88
88
  export { CommerceLayerProvisioning, bundle_default };
89
- //# sourceMappingURL=chunk-YUNEDDTL.js.map
90
- //# sourceMappingURL=chunk-YUNEDDTL.js.map
89
+ //# sourceMappingURL=chunk-OO2DV22U.js.map
90
+ //# sourceMappingURL=chunk-OO2DV22U.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../gen/bundle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAKA,IAAM,KAAA,GAAQ,cAAM,QAAQ,CAAA;AAE5B,IAAM,+BAAA,GAAN,MAAM,gCAAA,SAAwC,mCAAA,CAAoC;AAAA;AAAA;AAAA,EAGhF,gBAAA;AAAA,EACA,wBAAA;AAAA,EACA,mBAAA;AAAA,EACA,YAAA;AAAA,EACA,oBAAA;AAAA,EACA,cAAA;AAAA,EACA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA;AAAA,EAGO,YAAY,MAAA,EAAiC;AAClD,IAAA,KAAA,CAAM,MAAM,CAAA;AACZ,IAAA,KAAA,CAAM,wCAAwC,MAAM,CAAA;AAAA,EAKtD;AAAA,EAEA,OAAO,IAAI,MAAA,EAAmE;AAC5E,IAAA,IAAI,QAAQ,OAAQ,gCAAA,CAAgC,EAAA,GAAK,IAAI,iCAAgC,MAAM,CAAA;AAAA,SAAA,IAC1F,CAAC,gCAAA,CAAgC,EAAA;AACxC,MAA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AA,CAAA;AAAA,EAC3F;AAAA,EACA,IAAI,KAAA,GAAmB;AACrB,IAAA,OAAO,KAAK,MAAA,KAAW,IAAA,CAAK,SAAa,aAAA,CAAM,WAAA,CAAY,KAAK,OAAO,CAAA,CAAA;AAAA,EACzE;AAAA,EACA,IAAI,IAAA,GAAkB;AACpB,IAAA,OAAO,KAAK,KAAA,KAAU,IAAA,CAAK,QAAY,aAAA,CAAK,WAAA,CAAY,KAAK,OAAO,CAAA,CAAA;AAAA,EACtE;AAAA,EACA,IAAI,QAAA,GAAyB;AAC3B,IAAA,OAAO,KAAK,SAAA,KAAc,IAAA,CAAK,YAAgB,gBAAA,CAAS,WAAA,CAAY,KAAK,OAAO,CAAA,CAAA;AAAA,EAClF;AAAA;AAAA;AAAA;AAAA;AAMF,CAAA;AAEA,SAAS,0BAA0B,MAAA,EAAkE;AACnG,EAAA,OAAO,+BAAA,CAAgC,IAAI,MAAM,CAAA;AACnD;AAEA,IAAO,cAAA,GAAQ","file":"chunk-YUNEDDTL.js","sourcesContent":["import Debug from '@runtime/debug'\nimport type { ResourceAdapter } from '@runtime/resource'\nimport { type CommerceLayerInitConfig, CommerceLayerProvisioningBaseClient } from '../src/commercelayer'\nimport * as api from './api'\n\nconst debug = Debug('bundle')\n\nclass CommerceLayerProvisioningClient extends CommerceLayerProvisioningBaseClient {\n // ##__CL_RESOURCES_DEF_START__##\n // ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n #api_credentials?: api.ApiCredentials\n #application_memberships?: api.ApplicationMemberships\n #identity_providers?: api.IdentityProviders\n #memberships?: api.Memberships\n #membership_profiles?: api.MembershipProfiles\n #organizations?: api.Organizations\n #permissions?: api.Permissions\n #roles?: api.Roles\n #user?: api.Users\n #versions?: api.Versions\n // ##__CL_RESOURCES_DEF_STOP__##\n\n public constructor(config: CommerceLayerInitConfig) {\n super(config)\n debug('new commercelayer bundle instance %O', config)\n\n // ##__CL_RESOURCES_INIT_START__##\n // ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n // ##__CL_RESOURCES_INIT_STOP__##\n }\n\n static get(config?: CommerceLayerInitConfig): CommerceLayerProvisioningClient {\n if (config) return (CommerceLayerProvisioningClient.cl = new CommerceLayerProvisioningClient(config))\n else if (!CommerceLayerProvisioningClient.cl)\n throw new Error('CommerceLayerProvisioning bundle client not initialized')\n return CommerceLayerProvisioningClient.cl as CommerceLayerProvisioningClient\n }\n\n // Bundle clients are isolated: route this instance's requests, config and\n // interceptors through the adapter built for it, not the process-global\n // static one. The resource accessors below bind to this same adapter.\n protected override get adapter(): ResourceAdapter {\n return this.instanceAdapter\n }\n\n // ##__CL_RESOURCES_LAZY_LOADING_START__##\n // ##__CL_RESOURCES_LAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = api.##__RESOURCE_TYPE__##.withAdapter(this.adapter)) }\n get api_credentials(): api.ApiCredentials {\n return this.#api_credentials || (this.#api_credentials = api.api_credentials.withAdapter(this.adapter))\n }\n get application_memberships(): api.ApplicationMemberships {\n return (\n this.#application_memberships ||\n (this.#application_memberships = api.application_memberships.withAdapter(this.adapter))\n )\n }\n get identity_providers(): api.IdentityProviders {\n return this.#identity_providers || (this.#identity_providers = api.identity_providers.withAdapter(this.adapter))\n }\n get memberships(): api.Memberships {\n return this.#memberships || (this.#memberships = api.memberships.withAdapter(this.adapter))\n }\n get membership_profiles(): api.MembershipProfiles {\n return this.#membership_profiles || (this.#membership_profiles = api.membership_profiles.withAdapter(this.adapter))\n }\n get organizations(): api.Organizations {\n return this.#organizations || (this.#organizations = api.organizations.withAdapter(this.adapter))\n }\n get permissions(): api.Permissions {\n return this.#permissions || (this.#permissions = api.permissions.withAdapter(this.adapter))\n }\n get roles(): api.Roles {\n return this.#roles || (this.#roles = api.roles.withAdapter(this.adapter))\n }\n get user(): api.Users {\n return this.#user || (this.#user = api.user.withAdapter(this.adapter))\n }\n get versions(): api.Versions {\n return this.#versions || (this.#versions = api.versions.withAdapter(this.adapter))\n }\n // ##__CL_RESOURCES_LAZY_LOADING_STOP__##\n\n // ##__CL_RESOURCES_ACCESSORS_ONLY_START__##\n // ##__CL_RESOURCES_ACCESSORS_ONLY_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return api.##__RESOURCE_TYPE__## }\n // ##__CL_RESOURCES_ACCESSORS_ONLY_STOP__##\n}\n\nfunction CommerceLayerProvisioning(config: CommerceLayerInitConfig): CommerceLayerProvisioningClient {\n return CommerceLayerProvisioningClient.get(config)\n}\n\nexport default CommerceLayerProvisioning\nexport { CommerceLayerProvisioning, type CommerceLayerProvisioningClient }\n"]}
1
+ {"version":3,"sources":["../gen/bundle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAKA,IAAM,KAAA,GAAQ,cAAM,QAAQ,CAAA;AAE5B,IAAM,+BAAA,GAAN,MAAM,gCAAA,SAAwC,mCAAA,CAAoC;AAAA;AAAA;AAAA,EAGhF,gBAAA;AAAA,EACA,wBAAA;AAAA,EACA,mBAAA;AAAA,EACA,YAAA;AAAA,EACA,oBAAA;AAAA,EACA,cAAA;AAAA,EACA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA;AAAA,EAGO,YAAY,MAAA,EAAiC;AAClD,IAAA,KAAA,CAAM,MAAM,CAAA;AACZ,IAAA,KAAA,CAAM,wCAAwC,MAAM,CAAA;AAAA,EAKtD;AAAA,EAEA,OAAO,IAAI,MAAA,EAAmE;AAC5E,IAAA,IAAI,QAAQ,OAAQ,gCAAA,CAAgC,EAAA,GAAK,IAAI,iCAAgC,MAAM,CAAA;AAAA,SAAA,IAC1F,CAAC,gCAAA,CAAgC,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,KAAK,OAAO,CAAA,CAAA;AAAA,EAC3F;AAAA,EACA,IAAI,KAAA,GAAmB;AACrB,IAAA,OAAO,KAAK,MAAA,KAAW,IAAA,CAAK,SAAa,aAAA,CAAM,WAAA,CAAY,KAAK,OAAO,CAAA,CAAA;AAAA,EACzE;AAAA,EACA,IAAI,IAAA,GAAkB;AACpB,IAAA,OAAO,KAAK,KAAA,KAAU,IAAA,CAAK,QAAY,aAAA,CAAK,WAAA,CAAY,KAAK,OAAO,CAAA,CAAA;AAAA,EACtE;AAAA,EACA,IAAI,QAAA,GAAyB;AAC3B,IAAA,OAAO,KAAK,SAAA,KAAc,IAAA,CAAK,YAAgB,gBAAA,CAAS,WAAA,CAAY,KAAK,OAAO,CAAA,CAAA;AAAA,EAClF;AAAA;AAAA;AAAA;AAAA;AAMF,CAAA;AAEA,SAAS,0BAA0B,MAAA,EAAkE;AACnG,EAAA,OAAO,+BAAA,CAAgC,IAAI,MAAM,CAAA;AACnD;AAEA,IAAO,cAAA,GAAQ","file":"chunk-OO2DV22U.js","sourcesContent":["import Debug from '@runtime/debug'\nimport type { ResourceAdapter } from '@runtime/resource'\nimport { type CommerceLayerInitConfig, CommerceLayerProvisioningBaseClient } from '../src/commercelayer'\nimport * as api from './api'\n\nconst debug = Debug('bundle')\n\nclass CommerceLayerProvisioningClient extends CommerceLayerProvisioningBaseClient {\n // ##__CL_RESOURCES_DEF_START__##\n // ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n #api_credentials?: api.ApiCredentials\n #application_memberships?: api.ApplicationMemberships\n #identity_providers?: api.IdentityProviders\n #memberships?: api.Memberships\n #membership_profiles?: api.MembershipProfiles\n #organizations?: api.Organizations\n #permissions?: api.Permissions\n #roles?: api.Roles\n #user?: api.Users\n #versions?: api.Versions\n // ##__CL_RESOURCES_DEF_STOP__##\n\n public constructor(config: CommerceLayerInitConfig) {\n super(config)\n debug('new commercelayer bundle instance %O', config)\n\n // ##__CL_RESOURCES_INIT_START__##\n // ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n // ##__CL_RESOURCES_INIT_STOP__##\n }\n\n static get(config?: CommerceLayerInitConfig): CommerceLayerProvisioningClient {\n if (config) return (CommerceLayerProvisioningClient.cl = new CommerceLayerProvisioningClient(config))\n else if (!CommerceLayerProvisioningClient.cl)\n throw new Error('CommerceLayerProvisioning bundle client not initialized')\n return CommerceLayerProvisioningClient.cl as CommerceLayerProvisioningClient\n }\n\n // Bundle clients are isolated: route this instance's requests, config and\n // interceptors through the adapter built for it, not the process-global\n // static one. The resource accessors below bind to this same adapter.\n protected override get adapter(): ResourceAdapter {\n return this.instanceAdapter\n }\n\n // ##__CL_RESOURCES_LAZY_LOADING_START__##\n // ##__CL_RESOURCES_LAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = api.##__RESOURCE_TYPE__##.withAdapter(this.adapter)) }\n get api_credentials(): api.ApiCredentials {\n return this.#api_credentials || (this.#api_credentials = api.api_credentials.withAdapter(this.adapter))\n }\n get application_memberships(): api.ApplicationMemberships {\n return (\n this.#application_memberships ||\n (this.#application_memberships = api.application_memberships.withAdapter(this.adapter))\n )\n }\n get identity_providers(): api.IdentityProviders {\n return this.#identity_providers || (this.#identity_providers = api.identity_providers.withAdapter(this.adapter))\n }\n get memberships(): api.Memberships {\n return this.#memberships || (this.#memberships = api.memberships.withAdapter(this.adapter))\n }\n get membership_profiles(): api.MembershipProfiles {\n return this.#membership_profiles || (this.#membership_profiles = api.membership_profiles.withAdapter(this.adapter))\n }\n get organizations(): api.Organizations {\n return this.#organizations || (this.#organizations = api.organizations.withAdapter(this.adapter))\n }\n get permissions(): api.Permissions {\n return this.#permissions || (this.#permissions = api.permissions.withAdapter(this.adapter))\n }\n get roles(): api.Roles {\n return this.#roles || (this.#roles = api.roles.withAdapter(this.adapter))\n }\n get user(): api.Users {\n return this.#user || (this.#user = api.user.withAdapter(this.adapter))\n }\n get versions(): api.Versions {\n return this.#versions || (this.#versions = api.versions.withAdapter(this.adapter))\n }\n // ##__CL_RESOURCES_LAZY_LOADING_STOP__##\n\n // ##__CL_RESOURCES_ACCESSORS_ONLY_START__##\n // ##__CL_RESOURCES_ACCESSORS_ONLY_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return api.##__RESOURCE_TYPE__## }\n // ##__CL_RESOURCES_ACCESSORS_ONLY_STOP__##\n}\n\nfunction CommerceLayerProvisioning(config: CommerceLayerInitConfig): CommerceLayerProvisioningClient {\n return CommerceLayerProvisioningClient.get(config)\n}\n\nexport default CommerceLayerProvisioning\nexport { CommerceLayerProvisioning, type CommerceLayerProvisioningClient }\n"]}
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkEVDEBFHZ_cjs = require('./chunk-EVDEBFHZ.cjs');
3
+ var chunkATSYNXFW_cjs = require('./chunk-ATSYNXFW.cjs');
4
4
 
5
5
  // gen/resources/permissions.ts
6
- var Permissions = class _Permissions extends chunkEVDEBFHZ_cjs.ApiResource {
6
+ var Permissions = class _Permissions extends chunkATSYNXFW_cjs.ApiResource {
7
7
  static TYPE = "permissions";
8
8
  async create(resource, params, options) {
9
9
  return this.resources.create({ ...resource, type: _Permissions.TYPE }, params, options);
@@ -55,5 +55,5 @@ var instance = new Permissions();
55
55
  var permissions_default = instance;
56
56
 
57
57
  exports.permissions_default = permissions_default;
58
- //# sourceMappingURL=chunk-FRLV5YFL.cjs.map
59
- //# sourceMappingURL=chunk-FRLV5YFL.cjs.map
58
+ //# sourceMappingURL=chunk-PG4GQVZI.cjs.map
59
+ //# sourceMappingURL=chunk-PG4GQVZI.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../gen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gC;AAChC,IAAA,MAAM,aAAA,GAAiB,aAA4B,EAAA,IAAO,YAAA;AAC1D,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,UAAA,EAAW;AAAA,MACnB,eAAe,aAAa,CAAA,SAAA,CAAA;AAAA,MAC5B,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,aAAa,QAAA,EAAuC;AAClD,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,YAAA,CAAY,IAAA;AAAA,EACxD;AAAA,EAEA,aAAa,EAAA,EAA+C;AAC1D,IAAA,OAAO,KAAA,CAAM,qBAAoC,EAAE,CAAA;AAAA,EACrD;AAAA,EAEA,sBAAsB,GAAA,EAAgC;AACpD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAqC,GAAG,GAAG,CAAA;AAAA,EAC1D;AAAA,EAEA,IAAA,GAAuB;AACrB,IAAA,OAAO,YAAA,CAAY,IAAA;AAAA,EACrB;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,WAAA,EAAY;AACjC,IAAO,mBAAA,GAAQ","file":"chunk-FRLV5YFL.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'\n\nimport type { Organization } from './organizations'\nimport type { Role, RoleType } from './roles'\nimport type { Version } from './versions'\n\ntype PermissionType = 'permissions'\ntype PermissionRel = ResourceRel & { type: PermissionType }\ntype RoleRel = ResourceRel & { type: RoleType }\n\nexport type PermissionSort = Pick<Permission, 'id'> & ResourceSort\n// export type PermissionFilter = Pick<Permission, 'id' | 'can_create' | 'can_read' | 'can_update' | 'can_destroy' | 'subject' | 'restrictions'> & ResourceFilter\n\n/**\n * The Permission object is returned as part of the response body of each successful list, retrieve, create or update API call to the /api/permissions endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/permissions/object\n */\ninterface Permission extends Resource {\n readonly type: PermissionType\n\n /**\n * Determines if the permission have access to create rights.\n */\n can_create: boolean\n /**\n * Determines if the permission have access to read rights.\n */\n can_read: boolean\n /**\n * Determines if the permission have access to update rights.\n */\n can_update: boolean\n /**\n * Determines if the permission have access to destroy rights.\n */\n can_destroy: boolean\n /**\n * The resource where this permission is applied.\n */\n subject: string\n /**\n * An object that contains additional restrictions.\n * @example ```{\"foo\":\"bar\"}```\n */\n restrictions?: Record<string, any> | null\n\n organization?: Organization | null\n role?: Role | null\n versions?: Version[] | null\n}\n\ninterface PermissionCreate extends ResourceCreate {\n /**\n * Determines if the permission have access to create rights.\n */\n can_create: boolean\n /**\n * Determines if the permission have access to read rights.\n */\n can_read: boolean\n /**\n * Determines if the permission have access to update rights.\n */\n can_update: boolean\n /**\n * Determines if the permission have access to destroy rights.\n */\n can_destroy: boolean\n /**\n * The resource where this permission is applied.\n */\n subject: string\n\n role: RoleRel\n}\n\ninterface PermissionUpdate extends ResourceUpdate {\n /**\n * Determines if the permission have access to create rights.\n */\n can_create?: boolean | null\n /**\n * Determines if the permission have access to read rights.\n */\n can_read?: boolean | null\n /**\n * Determines if the permission have access to update rights.\n */\n can_update?: boolean | null\n /**\n * Determines if the permission have access to destroy rights.\n */\n can_destroy?: boolean | null\n}\n\nclass Permissions extends ApiResource<Permission> {\n static readonly TYPE: PermissionType = 'permissions' as const\n\n async create(\n resource: PermissionCreate,\n params?: QueryParamsRetrieve<Permission>,\n options?: ResourcesConfig,\n ): Promise<Permission> {\n return this.resources.create<PermissionCreate, Permission>({ ...resource, type: Permissions.TYPE }, params, options)\n }\n\n async update(\n resource: PermissionUpdate,\n params?: QueryParamsRetrieve<Permission>,\n options?: ResourcesConfig,\n ): Promise<Permission> {\n return this.resources.update<PermissionUpdate, Permission>({ ...resource, type: Permissions.TYPE }, params, options)\n }\n\n async organization(\n permissionId: string | Permission,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _permissionId = (permissionId as Permission).id || (permissionId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `permissions/${_permissionId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async role(\n permissionId: string | Permission,\n params?: QueryParamsRetrieve<Role>,\n options?: ResourcesConfig,\n ): Promise<Role> {\n const _permissionId = (permissionId as Permission).id || (permissionId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `permissions/${_permissionId}/role`,\n params,\n options,\n ) as unknown as Role\n }\n\n async versions(\n permissionId: string | Permission,\n params?: QueryParamsList<Version>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Version>> {\n const _permissionId = (permissionId as Permission).id || (permissionId as string)\n return this.resources.fetch<Version>(\n { type: 'versions' },\n `permissions/${_permissionId}/versions`,\n params,\n options,\n ) as unknown as ListResponse<Version>\n }\n\n isPermission(resource: any): resource is Permission {\n return resource.type && resource.type === Permissions.TYPE\n }\n\n relationship(id: string | ResourceId | null): PermissionRel {\n return super.relationshipOneToOne<PermissionRel>(id)\n }\n\n relationshipToMany(...ids: string[]): PermissionRel[] {\n return super.relationshipOneToMany<PermissionRel>(...ids)\n }\n\n type(): PermissionType {\n return Permissions.TYPE\n }\n}\n\nconst instance = new Permissions()\nexport default instance\n\nexport type { Permission, PermissionCreate, Permissions, PermissionType, PermissionUpdate }\n"]}
1
+ {"version":3,"sources":["../gen/resources/permissions.ts"],"names":["ApiResource"],"mappings":";;;;;AA2GA,IAAM,WAAA,GAAN,MAAM,YAAA,SAAoBA,6BAAA,CAAwB;AAAA,EAChD,OAAgB,IAAA,GAAuB,aAAA;AAAA,EAEvC,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACqB;AACrB,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAqC,EAAE,GAAG,QAAA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,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,YAAA,CAAY,IAAA;AAAA,EACxD;AAAA,EAEA,aAAa,EAAA,EAA+C;AAC1D,IAAA,OAAO,KAAA,CAAM,qBAAoC,EAAE,CAAA;AAAA,EACrD;AAAA,EAEA,sBAAsB,GAAA,EAAgC;AACpD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAqC,GAAG,GAAG,CAAA;AAAA,EAC1D;AAAA,EAEA,IAAA,GAAuB;AACrB,IAAA,OAAO,YAAA,CAAY,IAAA;AAAA,EACrB;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,WAAA,EAAY;AACjC,IAAO,mBAAA,GAAQ","file":"chunk-PG4GQVZI.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'\n\nimport type { Organization } from './organizations'\nimport type { Role, RoleType } from './roles'\nimport type { Version } from './versions'\n\ntype PermissionType = 'permissions'\ntype PermissionRel = ResourceRel & { type: PermissionType }\ntype RoleRel = ResourceRel & { type: RoleType }\n\nexport type PermissionSort = Pick<Permission, 'id'> & ResourceSort\n// export type PermissionFilter = Pick<Permission, 'id' | 'can_create' | 'can_read' | 'can_update' | 'can_destroy' | 'subject' | 'restrictions'> & ResourceFilter\n\n/**\n * The Permission object is returned as part of the response body of each successful list, retrieve, create or update API call to the /api/permissions endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/permissions/object\n */\ninterface Permission extends Resource {\n readonly type: PermissionType\n\n /**\n * Determines if the permission have access to create rights.\n */\n can_create: boolean\n /**\n * Determines if the permission have access to read rights.\n */\n can_read: boolean\n /**\n * Determines if the permission have access to update rights.\n */\n can_update: boolean\n /**\n * Determines if the permission have access to destroy rights.\n */\n can_destroy: boolean\n /**\n * The resource where this permission is applied.\n */\n subject: string\n /**\n * An object that contains additional restrictions.\n * @example ```{\"foo\":\"bar\"}```\n */\n restrictions?: Record<string, any> | null\n\n organization?: Organization | null\n role?: Role | null\n versions?: Version[] | null\n}\n\ninterface PermissionCreate extends ResourceCreate {\n /**\n * Determines if the permission have access to create rights.\n */\n can_create: boolean\n /**\n * Determines if the permission have access to read rights.\n */\n can_read: boolean\n /**\n * Determines if the permission have access to update rights.\n */\n can_update: boolean\n /**\n * Determines if the permission have access to destroy rights.\n */\n can_destroy: boolean\n /**\n * The resource where this permission is applied.\n */\n subject: string\n\n role: RoleRel\n}\n\ninterface PermissionUpdate extends ResourceUpdate {\n /**\n * Determines if the permission have access to create rights.\n */\n can_create?: boolean | null\n /**\n * Determines if the permission have access to read rights.\n */\n can_read?: boolean | null\n /**\n * Determines if the permission have access to update rights.\n */\n can_update?: boolean | null\n /**\n * Determines if the permission have access to destroy rights.\n */\n can_destroy?: boolean | null\n}\n\nclass Permissions extends ApiResource<Permission> {\n static readonly TYPE: PermissionType = 'permissions' as const\n\n async create(\n resource: PermissionCreate,\n params?: QueryParamsRetrieve<Permission>,\n options?: ResourcesConfig,\n ): Promise<Permission> {\n return this.resources.create<PermissionCreate, Permission>({ ...resource, type: Permissions.TYPE }, params, options)\n }\n\n async update(\n resource: PermissionUpdate,\n params?: QueryParamsRetrieve<Permission>,\n options?: ResourcesConfig,\n ): Promise<Permission> {\n return this.resources.update<PermissionUpdate, Permission>({ ...resource, type: Permissions.TYPE }, params, options)\n }\n\n async organization(\n permissionId: string | Permission,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _permissionId = (permissionId as Permission).id || (permissionId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `permissions/${_permissionId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async role(\n permissionId: string | Permission,\n params?: QueryParamsRetrieve<Role>,\n options?: ResourcesConfig,\n ): Promise<Role> {\n const _permissionId = (permissionId as Permission).id || (permissionId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `permissions/${_permissionId}/role`,\n params,\n options,\n ) as unknown as Role\n }\n\n async versions(\n permissionId: string | Permission,\n params?: QueryParamsList<Version>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Version>> {\n const _permissionId = (permissionId as Permission).id || (permissionId as string)\n return this.resources.fetch<Version>(\n { type: 'versions' },\n `permissions/${_permissionId}/versions`,\n params,\n options,\n ) as unknown as ListResponse<Version>\n }\n\n isPermission(resource: any): resource is Permission {\n return resource.type && resource.type === Permissions.TYPE\n }\n\n relationship(id: string | ResourceId | null): PermissionRel {\n return super.relationshipOneToOne<PermissionRel>(id)\n }\n\n relationshipToMany(...ids: string[]): PermissionRel[] {\n return super.relationshipOneToMany<PermissionRel>(...ids)\n }\n\n type(): PermissionType {\n return Permissions.TYPE\n }\n}\n\nconst instance = new Permissions()\nexport default instance\n\nexport type { Permission, PermissionCreate, Permissions, PermissionType, PermissionUpdate }\n"]}
@@ -1,5 +1,5 @@
1
- import { debug_default, ApiResourceAdapter, isApiError } from './chunk-GHXKZEH7.js';
2
- import { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS } from './chunk-SQLX22US.js';
1
+ import { debug_default, ApiResourceAdapter, isApiError } from './chunk-CR45TDCY.js';
2
+ import { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS } from './chunk-T7GAOLT5.js';
3
3
  import { getResources } from './chunk-YS5PCY5D.js';
4
4
 
5
5
  // src/commercelayer.ts
@@ -110,5 +110,5 @@ var CommerceLayerProvisioning = (config) => {
110
110
  var commercelayer_default = CommerceLayerProvisioning;
111
111
 
112
112
  export { CommerceLayerProvisioning, CommerceLayerProvisioningBaseClient, commercelayer_default };
113
- //# sourceMappingURL=chunk-CWXGTX7W.js.map
114
- //# sourceMappingURL=chunk-CWXGTX7W.js.map
113
+ //# sourceMappingURL=chunk-PKQGWLOZ.js.map
114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MACb,OAAA,EAAS,MAAA;AAAA,MACT,EAAA,EAAI;AAAA,KACN;AAEA,IAAA,eAAe,uBAAuB,QAAA,EAA6C;AACjF,MAAA,MAAA,CAAO,WAAA,GAAc,MAAM,QAAA,EACvB,KAAA,GACD,IAAA,EAAK,CACL,MAAM,MAAM;AAAA,MAAC,CAAC,CAAA;AACjB,MAAA,MAAA,CAAO,KAAK,QAAA,CAAS,EAAA;AACrB,MAAA,IAAI,SAAS,OAAA,EAAS;AACpB,QAAA,MAAM,KAAiB,EAAC;AACxB,QAAA,QAAA,CAAS,OAAA,CAAQ,OAAA,CAAQ,CAAC,KAAA,EAAO,GAAA,KAAQ;AACvC,UAAA,EAAA,CAAG,GAAG,CAAA,GAAI,KAAA;AAAA,QACZ,CAAC,CAAA;AACD,QAAA,MAAA,CAAO,OAAA,GAAU,EAAA;AAAA,MACnB;AACA,MAAA,OAAO,QAAA;AAAA,IACT;AAE0B,IAAA,IAAA,CAAK,aAAa,SAAA,GAAY;AAAA,MACtD,SAAA,EAAW,sBAAA;AAAA,MACX,SAAA,EAAW;AAAA,KACb;AACA,IAAA,MAAA,CAAO,EAAA,GAAK,CAAA;AAEZ,IAAA,OAAO,MAAA;AAAA,EACT;AAAA,EAEA,uBAAA,GAAwE;AAKtE,IAAA,IAAA,CAAK,aAAa,SAAA,GAAY,MAAA;AAAA,EAChC;AACF;AAEA,IAAM,yBAAA,GAA4B,CAAC,MAAA,KAAyE;AAC1G,EAAA,OAAO,mCAAA,CAAoC,IAAI,MAAM,CAAA;AACvD;AAEA,IAAO,qBAAA,GAAQ","file":"chunk-CWXGTX7W.js","sourcesContent":["import Debug from '@runtime/debug'\nimport { type ApiError, isApiError } from '@runtime/error'\nimport type {\n ErrorInterceptor,\n HeadersObj,\n InterceptorManager,\n InterceptorType,\n RawResponseReader,\n RequestInterceptor,\n ResponseInterceptor,\n ResponseObj,\n} from '@runtime/interceptor'\nimport { ApiResourceAdapter, type ResourceAdapter, type ResourcesInitConfig } from '@runtime/resource'\n// import * as api from '../gen/api'\nimport { getResources } from '../gen/enum'\nimport { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, type ApiVersion, SDK_VERSION } from '../gen/version'\n\nconst debug = Debug('commercelayer')\n\nexport { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, type ApiVersion, SDK_VERSION }\n\n// SDK local configuration\ntype SdkConfig = {\n /** Set to `false` to omit the `X-CL-SDK` request header that identifies the SDK and its version. Defaults to `true`. */\n telemetry?: boolean\n}\n\n/**\n * The `apiVersion` init option, conditioned on how the SDK was generated:\n * - **Version-aware (unified) builds** — {@link API_SUPPORTED_VERSIONS} is\n * non-empty — **require** `apiVersion`. The chosen value becomes a URL path\n * segment (`/api/2026-05/orders`), keeping requests aligned with the version\n * the types were generated for.\n * - **Legacy builds** — empty {@link API_SUPPORTED_VERSIONS}, so {@link ApiVersion}\n * is `never` — take **no** `apiVersion` argument. The API is unversioned\n * (`/api/orders`).\n */\ntype ApiVersionConfig = [ApiVersion] extends [never] ? { apiVersion?: never } : { apiVersion: ApiVersion }\n\ntype CommerceLayerInitConfig = SdkConfig & ApiVersionConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\nclass CommerceLayerProvisioningBaseClient {\n readonly apiSchemaVersion = API_SCHEMA_VERSION\n readonly apiSupportedVersions = API_SUPPORTED_VERSIONS\n\n protected static cl: CommerceLayerProvisioningBaseClient\n\n static get(config?: CommerceLayerInitConfig): CommerceLayerProvisioningBaseClient {\n if (config) return (CommerceLayerProvisioningBaseClient.cl = new CommerceLayerProvisioningBaseClient(config))\n else if (!CommerceLayerProvisioningBaseClient.cl)\n throw new Error('CommerceLayerProvisioning client not initialized')\n return CommerceLayerProvisioningBaseClient.cl\n }\n\n // The ResourceAdapter created for this specific client instance. Every\n // `CommerceLayerProvisioning(config)` call builds a fresh adapter (its own ApiClient\n // with its own access token). The bundle client reads this so two clients\n // stay isolated; see the `adapter` seam below.\n protected readonly instanceAdapter: ResourceAdapter\n\n protected constructor(config: CommerceLayerInitConfig) {\n debug('new commercelayer instance %O', config)\n\n // `init` builds a new adapter AND sets the process-global static one.\n // We keep the return value so the bundle can bind resources to this\n // exact adapter; the static assignment stays for the plain SDK, whose\n // directly-imported resource singletons resolve through it.\n this.instanceAdapter = ApiResourceAdapter.init(config)\n }\n\n // Adapter seam. The base (plain SDK) reports the process-global static\n // adapter so `config()` and the getters below stay in sync with the\n // directly-imported resource singletons — unchanged behaviour. The bundle\n // overrides this to return its own `instanceAdapter`, isolating clients.\n protected get adapter(): ResourceAdapter {\n return ApiResourceAdapter.get()\n }\n\n get currentOrganization(): string {\n return this.adapter.client?.currentOrganization\n }\n get currentAccessToken(): string {\n return this.adapter.client?.currentAccessToken\n }\n /** The API version pinned via `apiVersion`, or `undefined` when requests are unversioned. */\n get currentApiVersion(): string | undefined {\n return this.adapter.client?.currentApiVersion\n }\n private get interceptors(): InterceptorManager {\n return this.adapter.client?.interceptors\n }\n\n private localConfig(_config: Partial<SdkConfig>): void {\n // if (config.abc) this.abc = config.abc\n }\n\n config(config: CommerceLayerConfig): this {\n debug('config %o', config)\n\n // CommerceLayerProvisioning config\n this.localConfig(config)\n // ResourceAdapter config\n this.adapter.config(config)\n\n return this\n }\n\n resources(sort?: boolean): readonly string[] {\n return getResources(sort)\n }\n\n isApiError(error: any): error is ApiError {\n return isApiError(error)\n }\n\n addRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number {\n this.interceptors.request = { onSuccess, onFailure }\n return 1\n }\n\n addResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number {\n this.interceptors.response = { onSuccess, onFailure }\n return 1\n }\n\n removeInterceptor(type: InterceptorType, _id: number = 1): void {\n this.interceptors[type] = undefined\n }\n\n removeInterceptors(): void {\n this.removeInterceptor('request')\n this.removeInterceptor('response')\n this.removeRawResponseReader()\n }\n\n addRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n const reader: RawResponseReader = {\n id: 0,\n rawResponse: undefined,\n headers: undefined,\n ok: true,\n }\n\n async function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n reader.rawResponse = await response\n ?.clone()\n .json()\n .catch(() => {})\n reader.ok = response.ok\n if (options?.headers) {\n const ho: HeadersObj = {}\n response.headers.forEach((value, key) => {\n ho[key] = value\n })\n reader.headers = ho\n }\n return response\n }\n\n /* const interceptor = */ this.interceptors.rawReader = {\n onSuccess: rawResponseInterceptor,\n onFailure: rawResponseInterceptor,\n }\n reader.id = 1 // interceptor\n\n return reader\n }\n\n removeRawResponseReader(/* reader: number | RawResponseReader */): void {\n /*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n this.interceptors.rawReader = undefined\n }\n}\n\nconst CommerceLayerProvisioning = (config: CommerceLayerInitConfig): CommerceLayerProvisioningBaseClient => {\n return CommerceLayerProvisioningBaseClient.get(config)\n}\n\nexport default CommerceLayerProvisioning\nexport type { CommerceLayerConfig, CommerceLayerInitConfig }\nexport { CommerceLayerProvisioning, CommerceLayerProvisioningBaseClient }\n"]}
1
+ {"version":3,"sources":["../src/commercelayer.ts"],"names":[],"mappings":";;;;;AAiBA,IAAM,KAAA,GAAQ,cAAM,eAAe,CAAA;AAyBnC,IAAM,mCAAA,GAAN,MAAM,oCAAA,CAAoC;AAAA,EAC/B,gBAAA,GAAmB,kBAAA;AAAA,EACnB,oBAAA,GAAuB,sBAAA;AAAA,EAEhC,OAAiB,EAAA;AAAA,EAEjB,OAAO,IAAI,MAAA,EAAuE;AAChF,IAAA,IAAI,QAAQ,OAAQ,oCAAA,CAAoC,EAAA,GAAK,IAAI,qCAAoC,MAAM,CAAA;AAAA,SAAA,IAClG,CAAC,oCAAA,CAAoC,EAAA;AAC5C,MAAA,MAAM,IAAI,MAAM,kDAAkD,CAAA;AACpE,IAAA,OAAO,oCAAA,CAAoC,EAAA;AAAA,EAC7C;AAAA;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A,IACT;AAE0B,IAAA,IAAA,CAAK,aAAa,SAAA,GAAY;AAAA,MACtD,SAAA,EAAW,sBAAA;AAAA,MACX,SAAA,EAAW;AAAA,KACb;AACA,IAAA,MAAA,CAAO,EAAA,GAAK,CAAA;AAEZ,IAAA,OAAO,MAAA;AAAA,EACT;AAAA,EAEA,uBAAA,GAAwE;AAKtE,IAAA,IAAA,CAAK,aAAa,SAAA,GAAY,MAAA;AAAA,EAChC;AACF;AAEA,IAAM,yBAAA,GAA4B,CAAC,MAAA,KAAyE;AAC1G,EAAA,OAAO,mCAAA,CAAoC,IAAI,MAAM,CAAA;AACvD;AAEA,IAAO,qBAAA,GAAQ","file":"chunk-PKQGWLOZ.js","sourcesContent":["import Debug from '@runtime/debug'\nimport { type ApiError, isApiError } from '@runtime/error'\nimport type {\n ErrorInterceptor,\n HeadersObj,\n InterceptorManager,\n InterceptorType,\n RawResponseReader,\n RequestInterceptor,\n ResponseInterceptor,\n ResponseObj,\n} from '@runtime/interceptor'\nimport { ApiResourceAdapter, type ResourceAdapter, type ResourcesInitConfig } from '@runtime/resource'\n// import * as api from '../gen/api'\nimport { getResources } from '../gen/enum'\nimport { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, type ApiVersion, SDK_VERSION } from '../gen/version'\n\nconst debug = Debug('commercelayer')\n\nexport { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, type ApiVersion, SDK_VERSION }\n\n// SDK local configuration\ntype SdkConfig = {\n /** Set to `false` to omit the `X-CL-SDK` request header that identifies the SDK and its version. Defaults to `true`. */\n telemetry?: boolean\n}\n\n/**\n * The `apiVersion` init option, conditioned on how the SDK was generated:\n * - **Version-aware (unified) builds** — {@link API_SUPPORTED_VERSIONS} is\n * non-empty — **require** `apiVersion`. The chosen value becomes a URL path\n * segment (`/api/2026-05/orders`), keeping requests aligned with the version\n * the types were generated for.\n * - **Legacy builds** — empty {@link API_SUPPORTED_VERSIONS}, so {@link ApiVersion}\n * is `never` — take **no** `apiVersion` argument. The API is unversioned\n * (`/api/orders`).\n */\ntype ApiVersionConfig = [ApiVersion] extends [never] ? { apiVersion?: never } : { apiVersion: ApiVersion }\n\ntype CommerceLayerInitConfig = SdkConfig & ApiVersionConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\nclass CommerceLayerProvisioningBaseClient {\n readonly apiSchemaVersion = API_SCHEMA_VERSION\n readonly apiSupportedVersions = API_SUPPORTED_VERSIONS\n\n protected static cl: CommerceLayerProvisioningBaseClient\n\n static get(config?: CommerceLayerInitConfig): CommerceLayerProvisioningBaseClient {\n if (config) return (CommerceLayerProvisioningBaseClient.cl = new CommerceLayerProvisioningBaseClient(config))\n else if (!CommerceLayerProvisioningBaseClient.cl)\n throw new Error('CommerceLayerProvisioning client not initialized')\n return CommerceLayerProvisioningBaseClient.cl\n }\n\n // The ResourceAdapter created for this specific client instance. Every\n // `CommerceLayerProvisioning(config)` call builds a fresh adapter (its own ApiClient\n // with its own access token). The bundle client reads this so two clients\n // stay isolated; see the `adapter` seam below.\n protected readonly instanceAdapter: ResourceAdapter\n\n protected constructor(config: CommerceLayerInitConfig) {\n debug('new commercelayer instance %O', config)\n\n // `init` builds a new adapter AND sets the process-global static one.\n // We keep the return value so the bundle can bind resources to this\n // exact adapter; the static assignment stays for the plain SDK, whose\n // directly-imported resource singletons resolve through it.\n this.instanceAdapter = ApiResourceAdapter.init(config)\n }\n\n // Adapter seam. The base (plain SDK) reports the process-global static\n // adapter so `config()` and the getters below stay in sync with the\n // directly-imported resource singletons — unchanged behaviour. The bundle\n // overrides this to return its own `instanceAdapter`, isolating clients.\n protected get adapter(): ResourceAdapter {\n return ApiResourceAdapter.get()\n }\n\n get currentOrganization(): string {\n return this.adapter.client?.currentOrganization\n }\n get currentAccessToken(): string {\n return this.adapter.client?.currentAccessToken\n }\n /** The API version pinned via `apiVersion`, or `undefined` when requests are unversioned. */\n get currentApiVersion(): string | undefined {\n return this.adapter.client?.currentApiVersion\n }\n private get interceptors(): InterceptorManager {\n return this.adapter.client?.interceptors\n }\n\n private localConfig(_config: Partial<SdkConfig>): void {\n // if (config.abc) this.abc = config.abc\n }\n\n config(config: CommerceLayerConfig): this {\n debug('config %o', config)\n\n // CommerceLayerProvisioning config\n this.localConfig(config)\n // ResourceAdapter config\n this.adapter.config(config)\n\n return this\n }\n\n resources(sort?: boolean): readonly string[] {\n return getResources(sort)\n }\n\n isApiError(error: any): error is ApiError {\n return isApiError(error)\n }\n\n addRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number {\n this.interceptors.request = { onSuccess, onFailure }\n return 1\n }\n\n addResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number {\n this.interceptors.response = { onSuccess, onFailure }\n return 1\n }\n\n removeInterceptor(type: InterceptorType, _id: number = 1): void {\n this.interceptors[type] = undefined\n }\n\n removeInterceptors(): void {\n this.removeInterceptor('request')\n this.removeInterceptor('response')\n this.removeRawResponseReader()\n }\n\n addRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n const reader: RawResponseReader = {\n id: 0,\n rawResponse: undefined,\n headers: undefined,\n ok: true,\n }\n\n async function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n reader.rawResponse = await response\n ?.clone()\n .json()\n .catch(() => {})\n reader.ok = response.ok\n if (options?.headers) {\n const ho: HeadersObj = {}\n response.headers.forEach((value, key) => {\n ho[key] = value\n })\n reader.headers = ho\n }\n return response\n }\n\n /* const interceptor = */ this.interceptors.rawReader = {\n onSuccess: rawResponseInterceptor,\n onFailure: rawResponseInterceptor,\n }\n reader.id = 1 // interceptor\n\n return reader\n }\n\n removeRawResponseReader(/* reader: number | RawResponseReader */): void {\n /*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n this.interceptors.rawReader = undefined\n }\n}\n\nconst CommerceLayerProvisioning = (config: CommerceLayerInitConfig): CommerceLayerProvisioningBaseClient => {\n return CommerceLayerProvisioningBaseClient.get(config)\n}\n\nexport default CommerceLayerProvisioning\nexport type { CommerceLayerConfig, CommerceLayerInitConfig }\nexport { CommerceLayerProvisioning, CommerceLayerProvisioningBaseClient }\n"]}
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkEVDEBFHZ_cjs = require('./chunk-EVDEBFHZ.cjs');
3
+ var chunkATSYNXFW_cjs = require('./chunk-ATSYNXFW.cjs');
4
4
 
5
5
  // gen/resources/memberships.ts
6
- var Memberships = class _Memberships extends chunkEVDEBFHZ_cjs.ApiResource {
6
+ var Memberships = class _Memberships extends chunkATSYNXFW_cjs.ApiResource {
7
7
  static TYPE = "memberships";
8
8
  async create(resource, params, options) {
9
9
  return this.resources.create({ ...resource, type: _Memberships.TYPE }, params, options);
@@ -80,5 +80,5 @@ var instance = new Memberships();
80
80
  var memberships_default = instance;
81
81
 
82
82
  exports.memberships_default = memberships_default;
83
- //# sourceMappingURL=chunk-FMHTNUZ4.cjs.map
84
- //# sourceMappingURL=chunk-FMHTNUZ4.cjs.map
83
+ //# sourceMappingURL=chunk-RADEEFOM.cjs.map
84
+ //# sourceMappingURL=chunk-RADEEFOM.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../gen/resources/memberships.ts"],"names":["ApiResource"],"mappings":";;;;;AA6GA,IAAM,WAAA,GAAN,MAAM,YAAA,SAAoBA,6BAAA,CAAwB;AAAA,EAChD,OAAgB,IAAA,GAAuB,aAAA;AAAA,EAEvC,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACqB;AACrB,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAqC,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,YAAA,CAAY,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EACrH;AAAA,EAEA,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EACqB;AACrB,IA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,GAAuB;AACrB,IAAA,OAAO,YAAA,CAAY,IAAA;AAAA,EACrB;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,WAAA,EAAY;AACjC,IAAO,mBAAA,GAAQ","file":"chunk-RADEEFOM.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 { ApplicationMembership, ApplicationMembershipType } from './application_memberships'\nimport type { MembershipProfile, MembershipProfileType } from './membership_profiles'\nimport type { Organization, OrganizationType } from './organizations'\nimport type { Role, RoleType } from './roles'\nimport type { Version } from './versions'\n\ntype MembershipType = 'memberships'\ntype MembershipRel = ResourceRel & { type: MembershipType }\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\ntype RoleRel = ResourceRel & { type: RoleType }\ntype ApplicationMembershipRel = ResourceRel & { type: ApplicationMembershipType }\ntype MembershipProfileRel = ResourceRel & { type: MembershipProfileType }\n\nexport type MembershipSort = Pick<Membership, 'id' | 'status'> & ResourceSort\n// export type MembershipFilter = Pick<Membership, 'id' | 'user_email' | 'status' | 'owner' | 'access_scope'> & ResourceFilter\n\n/**\n * The Membership object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/memberships endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/memberships/object\n */\ninterface Membership extends Resource {\n readonly type: MembershipType\n\n /**\n * The user email.\n * @example ```\"commercelayer@commercelayer.io\"```\n */\n user_email: string\n /**\n * The user first name.\n * @example ```\"John\"```\n */\n user_first_name: string\n /**\n * The user last name.\n * @example ```\"Doe\"```\n */\n user_last_name: string\n /**\n * The memberships status. One of `pending` (default), `active`.\n * @example ```\"pending\"```\n */\n status: 'pending' | 'active'\n /**\n * Indicates if the user it's the owner of the organization.\n * @example ```true```\n */\n owner: boolean\n /**\n * Reflects the organization's access scope, either test_access or all_access.\n * @example ```true```\n */\n test_enabled: boolean\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope?: 'live_access' | 'test_access' | 'all_access' | null\n\n organization?: Organization | null\n role?: Role | null\n application_memberships?: ApplicationMembership[] | null\n membership_profile?: MembershipProfile | null\n versions?: Version[] | null\n}\n\ninterface MembershipCreate extends ResourceCreate {\n /**\n * The user email.\n * @example ```\"commercelayer@commercelayer.io\"```\n */\n user_email: string\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope?: 'live_access' | 'test_access' | 'all_access' | null\n\n organization: OrganizationRel\n role: RoleRel\n application_memberships?: ApplicationMembershipRel[] | null\n membership_profile?: MembershipProfileRel | null\n}\n\ninterface MembershipUpdate extends ResourceUpdate {\n /**\n * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.\n * @example ```\"live_access\"```\n */\n access_scope?: 'live_access' | 'test_access' | 'all_access' | null\n\n role?: RoleRel | null\n application_memberships?: ApplicationMembershipRel[] | null\n membership_profile?: MembershipProfileRel | null\n}\n\nclass Memberships extends ApiResource<Membership> {\n static readonly TYPE: MembershipType = 'memberships' as const\n\n async create(\n resource: MembershipCreate,\n params?: QueryParamsRetrieve<Membership>,\n options?: ResourcesConfig,\n ): Promise<Membership> {\n return this.resources.create<MembershipCreate, Membership>({ ...resource, type: Memberships.TYPE }, params, options)\n }\n\n async update(\n resource: MembershipUpdate,\n params?: QueryParamsRetrieve<Membership>,\n options?: ResourcesConfig,\n ): Promise<Membership> {\n return this.resources.update<MembershipUpdate, Membership>({ ...resource, type: Memberships.TYPE }, params, options)\n }\n\n async delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n await this.resources.delete(typeof id === 'string' ? { id, type: Memberships.TYPE } : id, options)\n }\n\n async organization(\n membershipId: string | Membership,\n params?: QueryParamsRetrieve<Organization>,\n options?: ResourcesConfig,\n ): Promise<Organization> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<Organization>(\n { type: 'organizations' },\n `memberships/${_membershipId}/organization`,\n params,\n options,\n ) as unknown as Organization\n }\n\n async role(\n membershipId: string | Membership,\n params?: QueryParamsRetrieve<Role>,\n options?: ResourcesConfig,\n ): Promise<Role> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<Role>(\n { type: 'roles' },\n `memberships/${_membershipId}/role`,\n params,\n options,\n ) as unknown as Role\n }\n\n async application_memberships(\n membershipId: string | Membership,\n params?: QueryParamsList<ApplicationMembership>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<ApplicationMembership>> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<ApplicationMembership>(\n { type: 'application_memberships' },\n `memberships/${_membershipId}/application_memberships`,\n params,\n options,\n ) as unknown as ListResponse<ApplicationMembership>\n }\n\n async membership_profile(\n membershipId: string | Membership,\n params?: QueryParamsRetrieve<MembershipProfile>,\n options?: ResourcesConfig,\n ): Promise<MembershipProfile> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<MembershipProfile>(\n { type: 'membership_profiles' },\n `memberships/${_membershipId}/membership_profile`,\n params,\n options,\n ) as unknown as MembershipProfile\n }\n\n async versions(\n membershipId: string | Membership,\n params?: QueryParamsList<Version>,\n options?: ResourcesConfig,\n ): Promise<ListResponse<Version>> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n return this.resources.fetch<Version>(\n { type: 'versions' },\n `memberships/${_membershipId}/versions`,\n params,\n options,\n ) as unknown as ListResponse<Version>\n }\n\n async resend(membershipId: string | Membership, options?: ResourcesConfig): Promise<void> {\n const _membershipId = (membershipId as Membership).id || (membershipId as string)\n await this.resources.action('POST', `memberships/${_membershipId}/resend`, {}, options)\n }\n\n isMembership(resource: any): resource is Membership {\n return resource.type && resource.type === Memberships.TYPE\n }\n\n relationship(id: string | ResourceId | null): MembershipRel {\n return super.relationshipOneToOne<MembershipRel>(id)\n }\n\n relationshipToMany(...ids: string[]): MembershipRel[] {\n return super.relationshipOneToMany<MembershipRel>(...ids)\n }\n\n type(): MembershipType {\n return Memberships.TYPE\n }\n}\n\nconst instance = new Memberships()\nexport default instance\n\nexport type { Membership, MembershipCreate, Memberships, MembershipType, MembershipUpdate }\n"]}
@@ -0,0 +1,12 @@
1
+ // package.json
2
+ var package_default = {
3
+ version: "3.0.0"};
4
+
5
+ // gen/version.ts
6
+ var SDK_VERSION = package_default.version;
7
+ var API_SCHEMA_VERSION = "2026-05";
8
+ var API_SUPPORTED_VERSIONS = ["2026-05"];
9
+
10
+ export { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, SDK_VERSION };
11
+ //# sourceMappingURL=chunk-T7GAOLT5.js.map
12
+ //# sourceMappingURL=chunk-T7GAOLT5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../package.json","../gen/version.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,OAmEb,CAAA;;;ACnEO,IAAM,cAAsB,eAAA,CAAI;AAGhC,IAAM,kBAAA,GAA6B;AAGnC,IAAM,sBAAA,GAAyB,CAAC,SAAS","file":"chunk-T7GAOLT5.js","sourcesContent":["{\n \"name\": \"@commercelayer/provisioning-sdk\",\n \"version\": \"3.0.0\",\n \"main\": \"lib/index.cjs\",\n \"types\": \"lib/index.d.ts\",\n \"module\": \"lib/index.js\",\n \"type\": \"module\",\n \"sideEffects\": false,\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./lib/index.d.ts\",\n \"default\": \"./lib/index.js\"\n },\n \"require\": {\n \"types\": \"./lib/index.d.cts\",\n \"default\": \"./lib/index.cjs\"\n }\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"generate\": \"tsx ../sdk-generator/src/generator.ts && pnpm check\",\n \"generate-local\": \"tsx ../sdk-generator/src/generator.ts --local && pnpm check\",\n \"lint\": \"biome check --enforce-assist=true\",\n \"check\": \"biome check --enforce-assist=true --write\",\n \"ts:check\": \"tsc --noEmit -p tsconfig.json\",\n \"test\": \"vitest\",\n \"coverage\": \"vitest run --coverage\",\n \"verify:pack\": \"publint && attw --pack .\"\n },\n \"keywords\": [\n \"javascript\",\n \"ecommerce\",\n \"jamstack\",\n \"commercelayer\",\n \"provisioning\"\n ],\n \"author\": \"Pierluigi Viti <pierluigi@commercelayer.io>\",\n \"license\": \"MIT\",\n \"description\": \"Commerce Layer Provisioning API Javascript SDK\",\n \"files\": [\n \"lib/**/*\"\n ],\n \"engines\": {\n \"node\": \">=20\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.18.5\",\n \"@biomejs/biome\": \"^2.5.15\",\n \"@commercelayer/js-auth\": \"^8.0.1\",\n \"@commercelayer/sdk-generator\": \"workspace:*\",\n \"@types/debug\": \"^4.1.13\",\n \"@types/node\": \"^25.9.9\",\n \"@vitest/coverage-v8\": \"^5.0.3\",\n \"dotenv\": \"^18.0.5\",\n \"json-typescript\": \"^1.1.2\",\n \"jsonapi-typescript\": \"^0.1.3\",\n \"publint\": \"^0.3.25\",\n \"tsup\": \"^8.5.1\",\n \"tsx\": \"^4.23.15\",\n \"typescript\": \"^5.9.3\",\n \"vitest\": \"^5.0.3\"\n },\n \"repository\": \"github:commercelayer/commercelayer-sdk\",\n \"bugs\": \"https://github.com/commercelayer/commercelayer-sdk/issues\",\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n","import pkg from '../package.json' with { type: 'json' }\n\nexport const SDK_VERSION: string = pkg.version\n\n// Autogenerated API schema version, do not remove this line\nexport const API_SCHEMA_VERSION: string = '2026-05'\n\n// Autogenerated supported API versions, do not remove this line\nexport const API_SUPPORTED_VERSIONS = ['2026-05'] as const\n\n/**\n * The API versions this build accepts as the `apiVersion` init option — the\n * union of {@link API_SUPPORTED_VERSIONS}. On a legacy build the tuple is\n * empty, so this resolves to `never` and the option can only be omitted (the\n * legacy API is unversioned).\n */\nexport type ApiVersion = (typeof API_SUPPORTED_VERSIONS)[number]\n"]}
@@ -2,15 +2,15 @@
2
2
 
3
3
  // package.json
4
4
  var package_default = {
5
- version: "3.0.0-beta.2"};
5
+ version: "3.0.0"};
6
6
 
7
7
  // gen/version.ts
8
8
  var SDK_VERSION = package_default.version;
9
- var API_SCHEMA_VERSION = "latest";
10
- var API_SUPPORTED_VERSIONS = [];
9
+ var API_SCHEMA_VERSION = "2026-05";
10
+ var API_SUPPORTED_VERSIONS = ["2026-05"];
11
11
 
12
12
  exports.API_SCHEMA_VERSION = API_SCHEMA_VERSION;
13
13
  exports.API_SUPPORTED_VERSIONS = API_SUPPORTED_VERSIONS;
14
14
  exports.SDK_VERSION = SDK_VERSION;
15
- //# sourceMappingURL=chunk-XS6QLJHG.cjs.map
16
- //# sourceMappingURL=chunk-XS6QLJHG.cjs.map
15
+ //# sourceMappingURL=chunk-TVU45BYJ.cjs.map
16
+ //# sourceMappingURL=chunk-TVU45BYJ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../package.json","../gen/version.ts"],"names":[],"mappings":";;;AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,OAmEb,CAAA;;;ACnEO,IAAM,cAAsB,eAAA,CAAI;AAGhC,IAAM,kBAAA,GAA6B;AAGnC,IAAM,sBAAA,GAAyB,CAAC,SAAS","file":"chunk-TVU45BYJ.cjs","sourcesContent":["{\n \"name\": \"@commercelayer/provisioning-sdk\",\n \"version\": \"3.0.0\",\n \"main\": \"lib/index.cjs\",\n \"types\": \"lib/index.d.ts\",\n \"module\": \"lib/index.js\",\n \"type\": \"module\",\n \"sideEffects\": false,\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./lib/index.d.ts\",\n \"default\": \"./lib/index.js\"\n },\n \"require\": {\n \"types\": \"./lib/index.d.cts\",\n \"default\": \"./lib/index.cjs\"\n }\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"generate\": \"tsx ../sdk-generator/src/generator.ts && pnpm check\",\n \"generate-local\": \"tsx ../sdk-generator/src/generator.ts --local && pnpm check\",\n \"lint\": \"biome check --enforce-assist=true\",\n \"check\": \"biome check --enforce-assist=true --write\",\n \"ts:check\": \"tsc --noEmit -p tsconfig.json\",\n \"test\": \"vitest\",\n \"coverage\": \"vitest run --coverage\",\n \"verify:pack\": \"publint && attw --pack .\"\n },\n \"keywords\": [\n \"javascript\",\n \"ecommerce\",\n \"jamstack\",\n \"commercelayer\",\n \"provisioning\"\n ],\n \"author\": \"Pierluigi Viti <pierluigi@commercelayer.io>\",\n \"license\": \"MIT\",\n \"description\": \"Commerce Layer Provisioning API Javascript SDK\",\n \"files\": [\n \"lib/**/*\"\n ],\n \"engines\": {\n \"node\": \">=20\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.18.5\",\n \"@biomejs/biome\": \"^2.5.15\",\n \"@commercelayer/js-auth\": \"^8.0.1\",\n \"@commercelayer/sdk-generator\": \"workspace:*\",\n \"@types/debug\": \"^4.1.13\",\n \"@types/node\": \"^25.9.9\",\n \"@vitest/coverage-v8\": \"^5.0.3\",\n \"dotenv\": \"^18.0.5\",\n \"json-typescript\": \"^1.1.2\",\n \"jsonapi-typescript\": \"^0.1.3\",\n \"publint\": \"^0.3.25\",\n \"tsup\": \"^8.5.1\",\n \"tsx\": \"^4.23.15\",\n \"typescript\": \"^5.9.3\",\n \"vitest\": \"^5.0.3\"\n },\n \"repository\": \"github:commercelayer/commercelayer-sdk\",\n \"bugs\": \"https://github.com/commercelayer/commercelayer-sdk/issues\",\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n","import pkg from '../package.json' with { type: 'json' }\n\nexport const SDK_VERSION: string = pkg.version\n\n// Autogenerated API schema version, do not remove this line\nexport const API_SCHEMA_VERSION: string = '2026-05'\n\n// Autogenerated supported API versions, do not remove this line\nexport const API_SUPPORTED_VERSIONS = ['2026-05'] as const\n\n/**\n * The API versions this build accepts as the `apiVersion` init option — the\n * union of {@link API_SUPPORTED_VERSIONS}. On a legacy build the tuple is\n * empty, so this resolves to `never` and the option can only be omitted (the\n * legacy API is unversioned).\n */\nexport type ApiVersion = (typeof API_SUPPORTED_VERSIONS)[number]\n"]}
@@ -1,4 +1,4 @@
1
- import { ApiResource } from './chunk-GHXKZEH7.js';
1
+ import { ApiResource } from './chunk-CR45TDCY.js';
2
2
 
3
3
  // gen/resources/application_memberships.ts
4
4
  var ApplicationMemberships = class _ApplicationMemberships extends ApiResource {
@@ -82,5 +82,5 @@ var instance = new ApplicationMemberships();
82
82
  var application_memberships_default = instance;
83
83
 
84
84
  export { application_memberships_default };
85
- //# sourceMappingURL=chunk-LTIWXCVE.js.map
86
- //# sourceMappingURL=chunk-LTIWXCVE.js.map
85
+ //# sourceMappingURL=chunk-VGP6LU6F.js.map
86
+ //# sourceMappingURL=chunk-VGP6LU6F.js.map