@commercelayer/provisioning-sdk 3.0.0-beta.3 → 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.
- package/README.md +23 -4
- package/lib/{api-CrVODncY.d.ts → api-CnrR2t1g.d.ts} +34 -25
- package/lib/{api-DtxN9ZNI.d.cts → api-R3mMNn87.d.cts} +34 -25
- package/lib/api.cjs +23 -23
- package/lib/api.d.cts +1 -1
- package/lib/api.d.ts +1 -1
- package/lib/api.js +13 -13
- package/lib/binding.cjs +3 -3
- package/lib/binding.d.cts +4 -4
- package/lib/binding.d.ts +4 -4
- package/lib/binding.js +2 -2
- package/lib/bundle.cjs +17 -17
- package/lib/bundle.d.cts +1 -1
- package/lib/bundle.d.ts +1 -1
- package/lib/bundle.js +15 -15
- package/lib/{chunk-QTXYKCKC.js → chunk-2FZWJMYX.js} +5 -5
- package/lib/chunk-2FZWJMYX.js.map +1 -0
- package/lib/{chunk-4TC4U7TK.cjs → chunk-3UQ4UNHL.cjs} +6 -6
- package/lib/chunk-3UQ4UNHL.cjs.map +1 -0
- package/lib/{chunk-H5YSO3AX.cjs → chunk-5RZ2O2CJ.cjs} +10 -10
- package/lib/{chunk-H5YSO3AX.cjs.map → chunk-5RZ2O2CJ.cjs.map} +1 -1
- package/lib/{chunk-PBYGXPJ6.cjs → chunk-5V2JEFHA.cjs} +4 -4
- package/lib/chunk-5V2JEFHA.cjs.map +1 -0
- package/lib/{chunk-5VPJA5UV.js → chunk-7BSFPWED.js} +3 -3
- package/lib/chunk-7BSFPWED.js.map +1 -0
- package/lib/{chunk-HVYM2S4K.cjs → chunk-ATSYNXFW.cjs} +8 -8
- package/lib/{chunk-HVYM2S4K.cjs.map → chunk-ATSYNXFW.cjs.map} +1 -1
- package/lib/{chunk-43XNULI4.cjs → chunk-B77PPXQ4.cjs} +4 -4
- package/lib/chunk-B77PPXQ4.cjs.map +1 -0
- package/lib/{chunk-6FFP3YXV.js → chunk-BOAFNR4A.js} +3 -3
- package/lib/chunk-BOAFNR4A.js.map +1 -0
- package/lib/{chunk-2H27UDGO.cjs → chunk-C4PVJRMW.cjs} +4 -4
- package/lib/chunk-C4PVJRMW.cjs.map +1 -0
- package/lib/{chunk-OTK6VLW5.js → chunk-CR45TDCY.js} +3 -3
- package/lib/{chunk-OTK6VLW5.js.map → chunk-CR45TDCY.js.map} +1 -1
- package/lib/{chunk-NDCVBYCJ.js → chunk-D7JC6E6O.js} +3 -3
- package/lib/chunk-D7JC6E6O.js.map +1 -0
- package/lib/{chunk-EUMMY3TQ.cjs → chunk-EXABJOAU.cjs} +4 -4
- package/lib/chunk-EXABJOAU.cjs.map +1 -0
- package/lib/{chunk-YAVEKFKE.cjs → chunk-F52NPQLI.cjs} +4 -4
- package/lib/{chunk-YAVEKFKE.cjs.map → chunk-F52NPQLI.cjs.map} +1 -1
- package/lib/{chunk-6PWTKNOC.js → chunk-H76I777K.js} +4 -4
- package/lib/{chunk-6PWTKNOC.js.map → chunk-H76I777K.js.map} +1 -1
- package/lib/{chunk-LV5XV2UF.cjs → chunk-HKSMUVBZ.cjs} +26 -26
- package/lib/{chunk-LV5XV2UF.cjs.map → chunk-HKSMUVBZ.cjs.map} +1 -1
- package/lib/{chunk-BFBXXP4Q.js → chunk-IRSVIAA3.js} +3 -3
- package/lib/chunk-IRSVIAA3.js.map +1 -0
- package/lib/{chunk-3PE2OE6B.js → chunk-JEP7T7W5.js} +3 -3
- package/lib/chunk-JEP7T7W5.js.map +1 -0
- package/lib/{chunk-4PMMCL4I.cjs → chunk-JO4BHGCD.cjs} +4 -4
- package/lib/chunk-JO4BHGCD.cjs.map +1 -0
- package/lib/{chunk-XKY46RI6.cjs → chunk-KOCBBI6X.cjs} +4 -4
- package/lib/chunk-KOCBBI6X.cjs.map +1 -0
- package/lib/{chunk-RWUBFJZ6.js → chunk-LWRSBPJL.js} +3 -3
- package/lib/chunk-LWRSBPJL.js.map +1 -0
- package/lib/{chunk-DTORLDNE.cjs → chunk-NYLVQKFV.cjs} +8 -8
- package/lib/{chunk-DTORLDNE.cjs.map → chunk-NYLVQKFV.cjs.map} +1 -1
- package/lib/{chunk-LSEKNECC.js → chunk-OJYX2GPK.js} +3 -3
- package/lib/chunk-OJYX2GPK.js.map +1 -0
- package/lib/{chunk-6MIFOPOB.js → chunk-OO2DV22U.js} +14 -14
- package/lib/{chunk-6MIFOPOB.js.map → chunk-OO2DV22U.js.map} +1 -1
- package/lib/{chunk-73VBQFUA.cjs → chunk-PG4GQVZI.cjs} +4 -4
- package/lib/{chunk-73VBQFUA.cjs.map → chunk-PG4GQVZI.cjs.map} +1 -1
- package/lib/{chunk-6SNLYMKG.js → chunk-PKQGWLOZ.js} +4 -4
- package/lib/{chunk-6SNLYMKG.js.map → chunk-PKQGWLOZ.js.map} +1 -1
- package/lib/{chunk-MT2XP4UJ.cjs → chunk-RADEEFOM.cjs} +4 -4
- package/lib/chunk-RADEEFOM.cjs.map +1 -0
- package/lib/chunk-T7GAOLT5.js +12 -0
- package/lib/chunk-T7GAOLT5.js.map +1 -0
- package/lib/{chunk-DDFTZDVN.cjs → chunk-TVU45BYJ.cjs} +5 -5
- package/lib/chunk-TVU45BYJ.cjs.map +1 -0
- package/lib/{chunk-37LZALYC.js → chunk-VGP6LU6F.js} +3 -3
- package/lib/{chunk-37LZALYC.js.map → chunk-VGP6LU6F.js.map} +1 -1
- package/lib/{chunk-YYM7BH33.cjs → chunk-VUWMD2QC.cjs} +4 -4
- package/lib/chunk-VUWMD2QC.cjs.map +1 -0
- package/lib/{chunk-3AXLHEDT.js → chunk-YT2JKVV4.js} +3 -3
- package/lib/{chunk-3AXLHEDT.js.map → chunk-YT2JKVV4.js.map} +1 -1
- package/lib/{chunk-IRQX6AG3.js → chunk-ZJNUYDXX.js} +3 -3
- package/lib/chunk-ZJNUYDXX.js.map +1 -0
- package/lib/commercelayer.cjs +10 -10
- package/lib/commercelayer.d.cts +2 -2
- package/lib/commercelayer.d.ts +2 -2
- package/lib/commercelayer.js +4 -4
- package/lib/enum.d.cts +1 -1
- package/lib/enum.d.ts +1 -1
- package/lib/index.cjs +22 -22
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +17 -17
- package/lib/model.d.cts +1 -1
- package/lib/model.d.ts +1 -1
- package/lib/resources/api_credentials.cjs +5 -5
- package/lib/resources/api_credentials.d.cts +2 -2
- package/lib/resources/api_credentials.d.ts +1 -1
- package/lib/resources/api_credentials.js +4 -4
- package/lib/resources/application_memberships.cjs +5 -5
- package/lib/resources/application_memberships.d.cts +2 -2
- package/lib/resources/application_memberships.d.ts +1 -1
- package/lib/resources/application_memberships.js +4 -4
- package/lib/resources/identity_providers.cjs +5 -5
- package/lib/resources/identity_providers.d.cts +2 -2
- package/lib/resources/identity_providers.d.ts +1 -1
- package/lib/resources/identity_providers.js +4 -4
- package/lib/resources/membership_profiles.cjs +5 -5
- package/lib/resources/membership_profiles.d.cts +2 -2
- package/lib/resources/membership_profiles.d.ts +1 -1
- package/lib/resources/membership_profiles.js +4 -4
- package/lib/resources/memberships.cjs +5 -5
- package/lib/resources/memberships.d.cts +2 -2
- package/lib/resources/memberships.d.ts +1 -1
- package/lib/resources/memberships.js +4 -4
- package/lib/resources/organizations.cjs +5 -5
- package/lib/resources/organizations.d.cts +2 -2
- package/lib/resources/organizations.d.ts +1 -1
- package/lib/resources/organizations.js +4 -4
- package/lib/resources/permissions.cjs +5 -5
- package/lib/resources/permissions.d.cts +2 -2
- package/lib/resources/permissions.d.ts +1 -1
- package/lib/resources/permissions.js +4 -4
- package/lib/resources/roles.cjs +5 -5
- package/lib/resources/roles.d.cts +2 -2
- package/lib/resources/roles.d.ts +1 -1
- package/lib/resources/roles.js +4 -4
- package/lib/resources/users.cjs +5 -5
- package/lib/resources/users.d.cts +2 -2
- package/lib/resources/users.d.ts +1 -1
- package/lib/resources/users.js +4 -4
- package/lib/resources/versions.cjs +5 -5
- package/lib/resources/versions.d.cts +2 -2
- package/lib/resources/versions.d.ts +1 -1
- package/lib/resources/versions.js +4 -4
- package/lib/static.cjs +6 -6
- package/lib/static.d.cts +1 -1
- package/lib/static.d.ts +1 -1
- package/lib/static.js +5 -5
- package/lib/version.cjs +4 -4
- package/lib/version.d.cts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +8 -8
- package/lib/chunk-2H27UDGO.cjs.map +0 -1
- package/lib/chunk-3PE2OE6B.js.map +0 -1
- package/lib/chunk-43XNULI4.cjs.map +0 -1
- package/lib/chunk-4PMMCL4I.cjs.map +0 -1
- package/lib/chunk-4TC4U7TK.cjs.map +0 -1
- package/lib/chunk-5VPJA5UV.js.map +0 -1
- package/lib/chunk-6FFP3YXV.js.map +0 -1
- package/lib/chunk-BFBXXP4Q.js.map +0 -1
- package/lib/chunk-DDFTZDVN.cjs.map +0 -1
- package/lib/chunk-EUMMY3TQ.cjs.map +0 -1
- package/lib/chunk-IRQX6AG3.js.map +0 -1
- package/lib/chunk-LSEKNECC.js.map +0 -1
- package/lib/chunk-MT2XP4UJ.cjs.map +0 -1
- package/lib/chunk-NDCVBYCJ.js.map +0 -1
- package/lib/chunk-PBYGXPJ6.cjs.map +0 -1
- package/lib/chunk-QTXYKCKC.js.map +0 -1
- package/lib/chunk-RWUBFJZ6.js.map +0 -1
- package/lib/chunk-VVSV5FR6.js +0 -12
- package/lib/chunk-VVSV5FR6.js.map +0 -1
- package/lib/chunk-XKY46RI6.cjs.map +0 -1
- package/lib/chunk-YYM7BH33.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/static.ts"],"names":[],"mappings":";;;;;AAOO,IAAM,+BAAA,GAAkC;AAAA,EAC7C,SAAA,EAAW,CAAC,IAAA,KAAsC;AAChD,IAAA,OAAO,aAAa,IAAI,CAAA;AAAA,EAC1B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,IAAA,KAAsC;AACjD,IAAA,OAAO,cAAc,IAAI,CAAA;AAAA,EAC3B,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AAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,WAAA,EAAa,CAAC,QAAA,KAAwC;AACpD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,UAAA,EAAY,CAAC,KAAA,KAAsC;AACjD,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA,EACzB,CAAA;AAAA,EAEA,cAAA,EAAgB,CAAC,KAAA,KAA2B;AAC1C,IAAA,OAAO,eAAe,KAAK,CAAA;AAAA,EAC7B,CAAA;AAAA,EAEA,IAAI,aAAA,GAAwB;AAC1B,IAAA,OAAO,kBAAA;AAAA,EACT;AACF","file":"chunk-H76I777K.js","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,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
3
|
+
var chunk5RZ2O2CJ_cjs = require('./chunk-5RZ2O2CJ.cjs');
|
|
4
|
+
var chunkPG4GQVZI_cjs = require('./chunk-PG4GQVZI.cjs');
|
|
5
|
+
var chunkJO4BHGCD_cjs = require('./chunk-JO4BHGCD.cjs');
|
|
6
|
+
var chunkKOCBBI6X_cjs = require('./chunk-KOCBBI6X.cjs');
|
|
7
|
+
var chunkEXABJOAU_cjs = require('./chunk-EXABJOAU.cjs');
|
|
8
|
+
var chunkB77PPXQ4_cjs = require('./chunk-B77PPXQ4.cjs');
|
|
9
|
+
var chunkF52NPQLI_cjs = require('./chunk-F52NPQLI.cjs');
|
|
10
|
+
var chunkVUWMD2QC_cjs = require('./chunk-VUWMD2QC.cjs');
|
|
11
|
+
var chunkC4PVJRMW_cjs = require('./chunk-C4PVJRMW.cjs');
|
|
12
|
+
var chunkRADEEFOM_cjs = require('./chunk-RADEEFOM.cjs');
|
|
13
|
+
var chunk5V2JEFHA_cjs = require('./chunk-5V2JEFHA.cjs');
|
|
14
|
+
var chunkATSYNXFW_cjs = require('./chunk-ATSYNXFW.cjs');
|
|
15
15
|
|
|
16
16
|
// gen/bundle.ts
|
|
17
|
-
var debug =
|
|
18
|
-
var CommerceLayerProvisioningClient = class _CommerceLayerProvisioningClient extends
|
|
17
|
+
var debug = chunkATSYNXFW_cjs.debug_default("bundle");
|
|
18
|
+
var CommerceLayerProvisioningClient = class _CommerceLayerProvisioningClient extends chunk5RZ2O2CJ_cjs.CommerceLayerProvisioningBaseClient {
|
|
19
19
|
// ##__CL_RESOURCES_DEF_START__##
|
|
20
20
|
// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##
|
|
21
21
|
#api_credentials;
|
|
@@ -48,34 +48,34 @@ var CommerceLayerProvisioningClient = class _CommerceLayerProvisioningClient ext
|
|
|
48
48
|
// ##__CL_RESOURCES_LAZY_LOADING_START__##
|
|
49
49
|
// ##__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)) }
|
|
50
50
|
get api_credentials() {
|
|
51
|
-
return this.#api_credentials || (this.#api_credentials =
|
|
51
|
+
return this.#api_credentials || (this.#api_credentials = chunkB77PPXQ4_cjs.api_credentials_default.withAdapter(this.adapter));
|
|
52
52
|
}
|
|
53
53
|
get application_memberships() {
|
|
54
|
-
return this.#application_memberships || (this.#application_memberships =
|
|
54
|
+
return this.#application_memberships || (this.#application_memberships = chunkF52NPQLI_cjs.application_memberships_default.withAdapter(this.adapter));
|
|
55
55
|
}
|
|
56
56
|
get identity_providers() {
|
|
57
|
-
return this.#identity_providers || (this.#identity_providers =
|
|
57
|
+
return this.#identity_providers || (this.#identity_providers = chunkVUWMD2QC_cjs.identity_providers_default.withAdapter(this.adapter));
|
|
58
58
|
}
|
|
59
59
|
get memberships() {
|
|
60
|
-
return this.#memberships || (this.#memberships =
|
|
60
|
+
return this.#memberships || (this.#memberships = chunkRADEEFOM_cjs.memberships_default.withAdapter(this.adapter));
|
|
61
61
|
}
|
|
62
62
|
get membership_profiles() {
|
|
63
|
-
return this.#membership_profiles || (this.#membership_profiles =
|
|
63
|
+
return this.#membership_profiles || (this.#membership_profiles = chunkC4PVJRMW_cjs.membership_profiles_default.withAdapter(this.adapter));
|
|
64
64
|
}
|
|
65
65
|
get organizations() {
|
|
66
|
-
return this.#organizations || (this.#organizations =
|
|
66
|
+
return this.#organizations || (this.#organizations = chunk5V2JEFHA_cjs.organizations_default.withAdapter(this.adapter));
|
|
67
67
|
}
|
|
68
68
|
get permissions() {
|
|
69
|
-
return this.#permissions || (this.#permissions =
|
|
69
|
+
return this.#permissions || (this.#permissions = chunkPG4GQVZI_cjs.permissions_default.withAdapter(this.adapter));
|
|
70
70
|
}
|
|
71
71
|
get roles() {
|
|
72
|
-
return this.#roles || (this.#roles =
|
|
72
|
+
return this.#roles || (this.#roles = chunkJO4BHGCD_cjs.roles_default.withAdapter(this.adapter));
|
|
73
73
|
}
|
|
74
74
|
get user() {
|
|
75
|
-
return this.#user || (this.#user =
|
|
75
|
+
return this.#user || (this.#user = chunkKOCBBI6X_cjs.users_default.withAdapter(this.adapter));
|
|
76
76
|
}
|
|
77
77
|
get versions() {
|
|
78
|
-
return this.#versions || (this.#versions =
|
|
78
|
+
return this.#versions || (this.#versions = chunkEXABJOAU_cjs.versions_default.withAdapter(this.adapter));
|
|
79
79
|
}
|
|
80
80
|
// ##__CL_RESOURCES_LAZY_LOADING_STOP__##
|
|
81
81
|
// ##__CL_RESOURCES_ACCESSORS_ONLY_START__##
|
|
@@ -89,5 +89,5 @@ var bundle_default = CommerceLayerProvisioning;
|
|
|
89
89
|
|
|
90
90
|
exports.CommerceLayerProvisioning = CommerceLayerProvisioning;
|
|
91
91
|
exports.bundle_default = bundle_default;
|
|
92
|
-
//# sourceMappingURL=chunk-
|
|
93
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-HKSMUVBZ.cjs.map
|
|
93
|
+
//# sourceMappingURL=chunk-HKSMUVBZ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../gen/bundle.ts"],"names":["debug_default","CommerceLayerProvisioningBaseClient","api_credentials_default","application_memberships_default","identity_providers_default","memberships_default","membership_profiles_default","organizations_default","permissions_default","roles_default","users_default","versions_default"],"mappings":";;;;;;;;;;;;;;;;AAKA,IAAM,KAAA,GAAQA,gCAAM,QAAQ,CAAA;AAE5B,IAAM,+BAAA,GAAN,MAAM,gCAAA,SAAwCC,qDAAA,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,MAAA,MAAM,IAAI,MAAM,yDAAyD,CAAA;AAC3E,IAAA,OAAO,gCAAA,CAAgC,EAAA;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA,EAKA,IAAuB,OAAA,GAA2B;AAChD,IAAA,OAAO,IAAA,CAAK,eAAA;AAAA,EACd;AAAA;AAAA;AAAA,EAIA,IAAI,eAAA,GAAsC;AACxC,IAAA,OAAO,KAAK,gBAAA,KAAqB,IAAA,CAAK,mBAAuBC,yCAAA,CAAgB,WAAA,CAAY,KAAK,OAAO,CAAA,CAAA;AAAA,EACvG;AAAA,EACA,IAAI,uBAAA,GAAsD;AACxD,IAAA,OACE,KAAK,wBAAA,KACJ,IAAA,CAAK,2BAA+BC,iDAAA,CAAwB,WAAA,CAAY,KAAK,OAAO,CAAA,CAAA;AAAA,EAEzF;AAAA,EACA,IAAI,kBAAA,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0B,MAAA,EAAkE;AACnG,EAAA,OAAO,+BAAA,CAAgC,IAAI,MAAM,CAAA;AACnD;AAEA,IAAO,cAAA,GAAQ","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../gen/bundle.ts"],"names":["debug_default","CommerceLayerProvisioningBaseClient","api_credentials_default","application_memberships_default","identity_providers_default","memberships_default","membership_profiles_default","organizations_default","permissions_default","roles_default","users_default","versions_default"],"mappings":";;;;;;;;;;;;;;;;AAKA,IAAM,KAAA,GAAQA,gCAAM,QAAQ,CAAA;AAE5B,IAAM,+BAAA,GAAN,MAAM,gCAAA,SAAwCC,qDAAA,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,MAAA,MAAM,IAAI,MAAM,yDAAyD,CAAA;AAC3E,IAAA,OAAO,gCAAA,CAAgC,EAAA;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA,EAKA,IAAuB,OAAA,GAA2B;AAChD,IAAA,OAAO,IAAA,CAAK,eAAA;AAAA,EACd;AAAA;AAAA;AAAA,EAIA,IAAI,eAAA,GAAsC;AACxC,IAAA,OAAO,KAAK,gBAAA,KAAqB,IAAA,CAAK,mBAAuBC,yCAAA,CAAgB,WAAA,CAAY,KAAK,OAAO,CAAA,CAAA;AA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,QAAA,GAAyB;AAC3B,IAAA,OAAO,KAAK,SAAA,KAAc,IAAA,CAAK,YAAgBC,kCAAA,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-HKSMUVBZ.cjs","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,4 +1,4 @@
|
|
|
1
|
-
import { ApiResource } from './chunk-
|
|
1
|
+
import { ApiResource } from './chunk-CR45TDCY.js';
|
|
2
2
|
|
|
3
3
|
// gen/resources/roles.ts
|
|
4
4
|
var Roles = class _Roles extends ApiResource {
|
|
@@ -78,5 +78,5 @@ var instance = new Roles();
|
|
|
78
78
|
var roles_default = instance;
|
|
79
79
|
|
|
80
80
|
export { roles_default };
|
|
81
|
-
//# sourceMappingURL=chunk-
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
81
|
+
//# sourceMappingURL=chunk-IRSVIAA3.js.map
|
|
82
|
+
//# sourceMappingURL=chunk-IRSVIAA3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../gen/resources/roles.ts"],"names":[],"mappings":";;;AA0EA,IAAM,KAAA,GAAN,MAAM,MAAA,SAAc,WAAA,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,MAAA,EAAoC,OAAA,EAA0C;AAC/G,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAyB,EAAE,GAAG,QA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;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,QAAA,CACJ,MAAA,EACA,MAAA,EACA,OAAA,EACgC;AAChC,IAAA,MAAM,OAAA,GAAW,OAAgB,EAAA,IAAO,MAAA;AACxC,IAAA,OAAO,KAAK,SAAA,CAAU,KAAA;AAAA,MACpB,EAAE,MAAM,UAAA,EAAW;AAAA,MACnB,SAAS,OAAO,CAAA,SAAA,CAAA;AAAA,MAChB,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,6BAAA,CACJ,EAAA,EACA,MAAA,EACA,OAAA,EACe;AACf,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,EAAA,EAAI,OAAO,EAAA,KAAO,QAAA,GAAW,EAAA,GAAK,EAAA,CAAG,EAAA,EAAI,IAAA,EAAM,MAAA,CAAM,IAAA,EAAM,6BAAA,EAA+B,IAAA,EAAK;AAAA,MACjG,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;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;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,KAAA,EAAM;AAC3B,IAAO,aAAA,GAAQ","file":"chunk-IRSVIAA3.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 { 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,4 +1,4 @@
|
|
|
1
|
-
import { ApiResource } from './chunk-
|
|
1
|
+
import { ApiResource } from './chunk-CR45TDCY.js';
|
|
2
2
|
|
|
3
3
|
// gen/resources/identity_providers.ts
|
|
4
4
|
var IdentityProviders = class _IdentityProviders extends ApiResource {
|
|
@@ -60,5 +60,5 @@ var instance = new IdentityProviders();
|
|
|
60
60
|
var identity_providers_default = instance;
|
|
61
61
|
|
|
62
62
|
export { identity_providers_default };
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
64
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-JEP7T7W5.js.map
|
|
64
|
+
//# sourceMappingURL=chunk-JEP7T7W5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../gen/resources/identity_providers.ts"],"names":[],"mappings":";;;AAgOA,IAAM,iBAAA,GAAN,MAAM,kBAAA,SAA0B,WAAA,CAA8B;AAAA,EAC5D,OAAgB,IAAA,GAA6B,oBAAA;AAAA,EAE7C,MAAM,MAAA,CACJ,QAAA,EACA,MAAA,EACA,OAAA,EAC2B;AAC3B,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA;AAAA,MACpB,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,mBAAkB,IAAA,EAAK;AAAA,MAC5C,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CACJ,QAAA,EACA,MAA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AA,EAAI,IAAA,EAAM,kBAAA,CAAkB,IAAA,EAAM,OAAA,EAAS,IAAA,EAAK;AAAA,MACvF,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,mBAAmB,QAAA,EAA6C;AAC9D,IAAA,OAAO,QAAA,CAAS,IAAA,IAAQ,QAAA,CAAS,IAAA,KAAS,kBAAA,CAAkB,IAAA;AAAA,EAC9D;AAAA,EAEA,aAAa,EAAA,EAAqD;AAChE,IAAA,OAAO,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA,EAC3D;AAAA,EAEA,sBAAsB,GAAA,EAAsC;AAC1D,IAAA,OAAO,KAAA,CAAM,qBAAA,CAA2C,GAAG,GAAG,CAAA;AAAA,EAChE;AAAA,EAEA,IAAA,GAA6B;AAC3B,IAAA,OAAO,kBAAA,CAAkB,IAAA;AAAA,EAC3B;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,iBAAA,EAAkB;AACvC,IAAO,0BAAA,GAAQ","file":"chunk-JEP7T7W5.js","sourcesContent":["import type { QueryParamsRetrieve } from '@runtime/query'\nimport type {\n Resource,\n ResourceCreate,\n ResourceId,\n ResourceRel,\n ResourceSort,\n /* ResourceFilter */ ResourcesConfig,\n ResourceUpdate,\n} from '@runtime/resource'\nimport { ApiResource } from '@runtime/resource'\n\nimport type { User } from './users'\n\ntype IdentityProviderType = 'identity_providers'\ntype IdentityProviderRel = ResourceRel & { type: IdentityProviderType }\n\nexport type IdentityProviderSort = Pick<\n IdentityProvider,\n | 'id'\n | 'name'\n | 'client_id'\n | 'client_secret'\n | 'issuer'\n | 'status'\n | 'domains'\n | 'token_url'\n | 'authorize_url'\n | 'jwks_url'\n | 'txt_record'\n | 'organization'\n | 'disabled_at'\n> &\n ResourceSort\n// export type IdentityProviderFilter = Pick<IdentityProvider, 'id' | 'name' | 'client_id' | 'client_secret' | 'issuer' | 'status' | 'domains' | 'token_url' | 'authorize_url' | 'jwks_url' | 'txt_record' | 'organization' | 'disabled_at'> & ResourceFilter\n\n/**\n * The Identity provider object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/identity_providers endpoint.\n *\n * @link https://docs.commercelayer.io/provisioning-api-reference/identity_providers/object\n */\ninterface IdentityProvider extends Resource {\n readonly type: IdentityProviderType\n\n /**\n * The name of the Identity provider.\n * @example ```\"Org auth0\"```\n */\n name: string\n /**\n * The client ID used for the auth workflow.\n * @example ```\"a6CDk5v1ZV99GrtOcfYVEZRnDDt\"```\n */\n client_id: string\n /**\n * The client secret used for the auth workflow.\n * @example ```\"s6CD55v1ZV99ArtOcfYVEZRnDDf\"```\n */\n client_secret: string\n /**\n * The issuer used for the auth workflow.\n * @example ```\"https://dev.auth987.com/\"```\n */\n issuer: string\n /**\n * The identity provider status. One of `pending` (default), `verified` or `error`.\n * @example ```\"pending\"```\n */\n status: 'pending' | 'verified' | 'error'\n /**\n * The list of domains in scope (comma-separated).\n * @example ```\"dev.auth987.com,stg.auth987.com\"```\n */\n domains: string\n /**\n * The token URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/oauth/token\"```\n */\n token_url: string\n /**\n * The authorize URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/authorize\"```\n */\n authorize_url: string\n /**\n * The JWKS key store URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/.well-known/jwks.json\"```\n */\n jwks_url: string\n /**\n * The TXT record value used to check the domain.\n * @example ```\"cl-verification=a6CDk5v\"```\n */\n txt_record: string\n /**\n * The organization identifier for authorize params.\n * @example ```\"org_76gsfs5gd\"```\n */\n organization?: string | null\n /**\n * Time at which this resource was disabled.\n * @example ```\"2018-01-01T12:00:00.000Z\"```\n */\n disabled_at?: string | null\n\n user?: User | null\n}\n\ninterface IdentityProviderCreate extends ResourceCreate {\n /**\n * The name of the Identity provider.\n * @example ```\"Org auth0\"```\n */\n name: string\n /**\n * The client ID used for the auth workflow.\n * @example ```\"a6CDk5v1ZV99GrtOcfYVEZRnDDt\"```\n */\n client_id: string\n /**\n * The client secret used for the auth workflow.\n * @example ```\"s6CD55v1ZV99ArtOcfYVEZRnDDf\"```\n */\n client_secret: string\n /**\n * The issuer used for the auth workflow.\n * @example ```\"https://dev.auth987.com/\"```\n */\n issuer: string\n /**\n * The list of domains in scope (comma-separated).\n * @example ```\"dev.auth987.com,stg.auth987.com\"```\n */\n domains: string\n /**\n * The token URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/oauth/token\"```\n */\n token_url: string\n /**\n * The authorize URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/authorize\"```\n */\n authorize_url: string\n /**\n * The JWKS key store URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/.well-known/jwks.json\"```\n */\n jwks_url: string\n /**\n * The organization identifier for authorize params.\n * @example ```\"org_76gsfs5gd\"```\n */\n organization?: string | null\n /**\n * Send this attribute if you want to mark this resource as disabled.\n * @example ```true```\n */\n _disable?: boolean | null\n /**\n * Send this attribute if you want to mark this resource as enabled.\n * @example ```true```\n */\n _enable?: boolean | null\n}\n\ninterface IdentityProviderUpdate extends ResourceUpdate {\n /**\n * The name of the Identity provider.\n * @example ```\"Org auth0\"```\n */\n name?: string | null\n /**\n * The client ID used for the auth workflow.\n * @example ```\"a6CDk5v1ZV99GrtOcfYVEZRnDDt\"```\n */\n client_id?: string | null\n /**\n * The client secret used for the auth workflow.\n * @example ```\"s6CD55v1ZV99ArtOcfYVEZRnDDf\"```\n */\n client_secret?: string | null\n /**\n * The issuer used for the auth workflow.\n * @example ```\"https://dev.auth987.com/\"```\n */\n issuer?: string | null\n /**\n * The list of domains in scope (comma-separated).\n * @example ```\"dev.auth987.com,stg.auth987.com\"```\n */\n domains?: string | null\n /**\n * The token URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/oauth/token\"```\n */\n token_url?: string | null\n /**\n * The authorize URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/authorize\"```\n */\n authorize_url?: string | null\n /**\n * The JWKS key store URL used for the auth workflow.\n * @example ```\"https://dev.auth987.com/.well-known/jwks.json\"```\n */\n jwks_url?: string | null\n /**\n * The organization identifier for authorize params.\n * @example ```\"org_76gsfs5gd\"```\n */\n organization?: string | null\n /**\n * Send this attribute if you want to mark this resource as disabled.\n * @example ```true```\n */\n _disable?: boolean | null\n /**\n * Send this attribute if you want to mark this resource as enabled.\n * @example ```true```\n */\n _enable?: boolean | null\n}\n\nclass IdentityProviders extends ApiResource<IdentityProvider> {\n static readonly TYPE: IdentityProviderType = 'identity_providers' as const\n\n async create(\n resource: IdentityProviderCreate,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.create<IdentityProviderCreate, IdentityProvider>(\n { ...resource, type: IdentityProviders.TYPE },\n params,\n options,\n )\n }\n\n async update(\n resource: IdentityProviderUpdate,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.update<IdentityProviderUpdate, IdentityProvider>(\n { ...resource, type: IdentityProviders.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: IdentityProviders.TYPE } : id, options)\n }\n\n async user(\n identityProviderId: string | IdentityProvider,\n params?: QueryParamsRetrieve<User>,\n options?: ResourcesConfig,\n ): Promise<User> {\n const _identityProviderId = (identityProviderId as IdentityProvider).id || (identityProviderId as string)\n return this.resources.fetch<User>(\n { type: 'users' },\n `identity_providers/${_identityProviderId}/user`,\n params,\n options,\n ) as unknown as User\n }\n\n async _disable(\n id: string | IdentityProvider,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.update<IdentityProviderUpdate, IdentityProvider>(\n { id: typeof id === 'string' ? id : id.id, type: IdentityProviders.TYPE, _disable: true },\n params,\n options,\n )\n }\n\n async _enable(\n id: string | IdentityProvider,\n params?: QueryParamsRetrieve<IdentityProvider>,\n options?: ResourcesConfig,\n ): Promise<IdentityProvider> {\n return this.resources.update<IdentityProviderUpdate, IdentityProvider>(\n { id: typeof id === 'string' ? id : id.id, type: IdentityProviders.TYPE, _enable: true },\n params,\n options,\n )\n }\n\n isIdentityProvider(resource: any): resource is IdentityProvider {\n return resource.type && resource.type === IdentityProviders.TYPE\n }\n\n relationship(id: string | ResourceId | null): IdentityProviderRel {\n return super.relationshipOneToOne<IdentityProviderRel>(id)\n }\n\n relationshipToMany(...ids: string[]): IdentityProviderRel[] {\n return super.relationshipOneToMany<IdentityProviderRel>(...ids)\n }\n\n type(): IdentityProviderType {\n return IdentityProviders.TYPE\n }\n}\n\nconst instance = new IdentityProviders()\nexport default instance\n\nexport type {\n IdentityProvider,\n IdentityProviderCreate,\n IdentityProviders,\n IdentityProviderType,\n IdentityProviderUpdate,\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkATSYNXFW_cjs = require('./chunk-ATSYNXFW.cjs');
|
|
4
4
|
|
|
5
5
|
// gen/resources/roles.ts
|
|
6
|
-
var Roles = class _Roles extends
|
|
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-
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
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"],"m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D;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;AACF,CAAA;AAEA,IAAM,QAAA,GAAW,IAAI,KAAA,EAAM;AAC3B,IAAO,aAAA,GAAQ","file":"chunk-JO4BHGCD.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 { 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
|
|
3
|
+
var chunkATSYNXFW_cjs = require('./chunk-ATSYNXFW.cjs');
|
|
4
4
|
|
|
5
5
|
// gen/resources/users.ts
|
|
6
|
-
var Users = class _Users extends
|
|
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-
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
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-
|
|
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-
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
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,E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M,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
|
|
4
|
-
var
|
|
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
|
|
28
|
+
return chunkATSYNXFW_cjs.isSdkError(error);
|
|
29
29
|
},
|
|
30
30
|
isApiError: (error) => {
|
|
31
|
-
return
|
|
31
|
+
return chunkATSYNXFW_cjs.isApiError(error);
|
|
32
32
|
},
|
|
33
33
|
isTokenExpired: (token) => {
|
|
34
|
-
return
|
|
34
|
+
return chunkATSYNXFW_cjs.isTokenExpired(token);
|
|
35
35
|
},
|
|
36
36
|
get schemaVersion() {
|
|
37
|
-
return
|
|
37
|
+
return chunkTVU45BYJ_cjs.API_SCHEMA_VERSION;
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
exports.CommerceLayerProvisioningStatic = CommerceLayerProvisioningStatic;
|
|
42
|
-
//# sourceMappingURL=chunk-
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
78
|
-
//# sourceMappingURL=chunk-
|
|
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,aAAA,EAAc;AAAA,MACtB,iBAAiB,eAAe,CAAA,YAAA,CAAA;AAAA,MAChC,MAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF;AAAA,EAEA,MAAM,KAAA,CACJ,cAAA,EACA,MAAA,EACA,OAAA,EAC6B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A;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-
|
|
2
|
-
import { permissions_default } from './chunk-
|
|
3
|
-
import { roles_default } from './chunk-
|
|
4
|
-
import { users_default } from './chunk-
|
|
5
|
-
import { versions_default } from './chunk-
|
|
6
|
-
import { api_credentials_default } from './chunk-
|
|
7
|
-
import { application_memberships_default } from './chunk-
|
|
8
|
-
import { identity_providers_default } from './chunk-
|
|
9
|
-
import { membership_profiles_default } from './chunk-
|
|
10
|
-
import { memberships_default } from './chunk-
|
|
11
|
-
import { organizations_default } from './chunk-
|
|
12
|
-
import { debug_default } from './chunk-
|
|
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-
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
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,MAAA,MAAM,IAAI,MAAM,yDAAyD,CAAA;AAC3E,IAAA,OAAO,gCAAA,CAAgC,EAAA;AAAA,E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F;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
|
|
3
|
+
var chunkATSYNXFW_cjs = require('./chunk-ATSYNXFW.cjs');
|
|
4
4
|
|
|
5
5
|
// gen/resources/permissions.ts
|
|
6
|
-
var Permissions = class _Permissions extends
|
|
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-
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-PG4GQVZI.cjs.map
|
|
59
|
+
//# sourceMappingURL=chunk-PG4GQVZI.cjs.map
|