@commercelayer/provisioning-sdk 2.10.2 → 3.0.0-beta.1
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/LICENSE +1 -1
- package/lib/actions.cjs +4 -0
- package/lib/actions.cjs.map +1 -0
- package/lib/actions.d.cts +15 -0
- package/lib/actions.d.ts +15 -0
- package/lib/actions.js +3 -0
- package/lib/actions.js.map +1 -0
- package/lib/{index.d.mts → api-BQ6Y-J8P.d.ts} +546 -495
- package/lib/api-BQZ9r4RA.d.cts +1643 -0
- package/lib/api.cjs +62 -0
- package/lib/api.cjs.map +1 -0
- package/lib/api.d.cts +2 -0
- package/lib/api.d.ts +2 -0
- package/lib/api.js +17 -0
- package/lib/api.js.map +1 -0
- package/lib/binding.cjs +14 -0
- package/lib/binding.cjs.map +1 -0
- package/lib/binding.d.cts +21 -0
- package/lib/binding.d.ts +21 -0
- package/lib/binding.js +5 -0
- package/lib/binding.js.map +1 -0
- package/lib/bundle.cjs +34 -0
- package/lib/bundle.cjs.map +1 -0
- package/lib/bundle.d.cts +27 -0
- package/lib/bundle.d.ts +25 -0
- package/lib/bundle.js +19 -0
- package/lib/bundle.js.map +1 -0
- package/lib/chunk-47HG76BX.cjs +19 -0
- package/lib/chunk-47HG76BX.cjs.map +1 -0
- package/lib/chunk-4GOUGGBM.js +114 -0
- package/lib/chunk-4GOUGGBM.js.map +1 -0
- package/lib/chunk-5D5YOHG4.cjs +93 -0
- package/lib/chunk-5D5YOHG4.cjs.map +1 -0
- package/lib/chunk-6B2AFMGT.js +82 -0
- package/lib/chunk-6B2AFMGT.js.map +1 -0
- package/lib/chunk-BFXJ3YNR.js +57 -0
- package/lib/chunk-BFXJ3YNR.js.map +1 -0
- package/lib/chunk-BI4FXO5V.cjs +43 -0
- package/lib/chunk-BI4FXO5V.cjs.map +1 -0
- package/lib/chunk-CESAPW7Z.js +90 -0
- package/lib/chunk-CESAPW7Z.js.map +1 -0
- package/lib/chunk-F2Z6XJTZ.js +59 -0
- package/lib/chunk-F2Z6XJTZ.js.map +1 -0
- package/lib/chunk-FHXWFSIQ.cjs +88 -0
- package/lib/chunk-FHXWFSIQ.cjs.map +1 -0
- package/lib/chunk-HNSO4ZPF.js +808 -0
- package/lib/chunk-HNSO4ZPF.js.map +1 -0
- package/lib/chunk-IW2T22VR.js +3 -0
- package/lib/chunk-IW2T22VR.js.map +1 -0
- package/lib/chunk-JDXNOZFC.cjs +66 -0
- package/lib/chunk-JDXNOZFC.cjs.map +1 -0
- package/lib/chunk-KJRFIWHK.cjs +61 -0
- package/lib/chunk-KJRFIWHK.cjs.map +1 -0
- package/lib/chunk-LISATEFD.cjs +26 -0
- package/lib/chunk-LISATEFD.cjs.map +1 -0
- package/lib/chunk-MANW7JPJ.js +12 -0
- package/lib/chunk-MANW7JPJ.js.map +1 -0
- package/lib/chunk-N567T7FT.cjs +4 -0
- package/lib/chunk-N567T7FT.cjs.map +1 -0
- package/lib/chunk-NFF6DWKZ.cjs +32 -0
- package/lib/chunk-NFF6DWKZ.cjs.map +1 -0
- package/lib/chunk-O6ACW64H.js +30 -0
- package/lib/chunk-O6ACW64H.js.map +1 -0
- package/lib/chunk-OAXFNHFA.js +59 -0
- package/lib/chunk-OAXFNHFA.js.map +1 -0
- package/lib/chunk-OEYUWL5K.js +41 -0
- package/lib/chunk-OEYUWL5K.js.map +1 -0
- package/lib/chunk-OKBMV3W5.cjs +59 -0
- package/lib/chunk-OKBMV3W5.cjs.map +1 -0
- package/lib/chunk-PIDJDUN3.js +86 -0
- package/lib/chunk-PIDJDUN3.js.map +1 -0
- package/lib/chunk-QRMCUYRK.js +24 -0
- package/lib/chunk-QRMCUYRK.js.map +1 -0
- package/lib/chunk-QTTL5EGB.cjs +816 -0
- package/lib/chunk-QTTL5EGB.cjs.map +1 -0
- package/lib/chunk-QVV2ORWB.cjs +61 -0
- package/lib/chunk-QVV2ORWB.cjs.map +1 -0
- package/lib/chunk-RSAADRRH.cjs +84 -0
- package/lib/chunk-RSAADRRH.cjs.map +1 -0
- package/lib/chunk-SZSANTXM.cjs +118 -0
- package/lib/chunk-SZSANTXM.cjs.map +1 -0
- package/lib/chunk-TOXS3OUT.cjs +80 -0
- package/lib/chunk-TOXS3OUT.cjs.map +1 -0
- package/lib/chunk-U76G3DPW.js +64 -0
- package/lib/chunk-U76G3DPW.js.map +1 -0
- package/lib/chunk-VFTFSHXQ.cjs +88 -0
- package/lib/chunk-VFTFSHXQ.cjs.map +1 -0
- package/lib/chunk-XCKSYX22.js +78 -0
- package/lib/chunk-XCKSYX22.js.map +1 -0
- package/lib/chunk-XV25RH6C.js +17 -0
- package/lib/chunk-XV25RH6C.js.map +1 -0
- package/lib/chunk-YFZRO7OE.cjs +84 -0
- package/lib/chunk-YFZRO7OE.cjs.map +1 -0
- package/lib/chunk-YLA6YCK5.cjs +16 -0
- package/lib/chunk-YLA6YCK5.cjs.map +1 -0
- package/lib/chunk-YS5PCY5D.js +76 -0
- package/lib/chunk-YS5PCY5D.js.map +1 -0
- package/lib/chunk-ZTAL3U2D.js +82 -0
- package/lib/chunk-ZTAL3U2D.js.map +1 -0
- package/lib/commercelayer.cjs +38 -0
- package/lib/commercelayer.cjs.map +1 -0
- package/lib/commercelayer.d.cts +58 -0
- package/lib/commercelayer.d.ts +56 -0
- package/lib/commercelayer.js +7 -0
- package/lib/commercelayer.js.map +1 -0
- package/lib/enum.cjs +52 -0
- package/lib/enum.cjs.map +1 -0
- package/lib/enum.d.cts +2 -0
- package/lib/enum.d.ts +2 -0
- package/lib/enum.js +3 -0
- package/lib/enum.js.map +1 -0
- package/lib/error-CVRdwnY9.d.cts +33 -0
- package/lib/error-CVRdwnY9.d.ts +33 -0
- package/lib/index.cjs +57 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.cts +14 -0
- package/lib/index.d.ts +9 -1591
- package/lib/index.js +26 -1
- package/lib/index.js.map +1 -0
- package/lib/model.cjs +4 -0
- package/lib/model.cjs.map +1 -0
- package/lib/model.d.cts +2 -0
- package/lib/model.d.ts +2 -0
- package/lib/model.js +3 -0
- package/lib/model.js.map +1 -0
- package/lib/resources/api_credentials.cjs +15 -0
- package/lib/resources/api_credentials.cjs.map +1 -0
- package/lib/resources/api_credentials.d.cts +5 -0
- package/lib/resources/api_credentials.d.ts +2 -0
- package/lib/resources/api_credentials.js +7 -0
- package/lib/resources/api_credentials.js.map +1 -0
- package/lib/resources/application_memberships.cjs +15 -0
- package/lib/resources/application_memberships.cjs.map +1 -0
- package/lib/resources/application_memberships.d.cts +5 -0
- package/lib/resources/application_memberships.d.ts +2 -0
- package/lib/resources/application_memberships.js +7 -0
- package/lib/resources/application_memberships.js.map +1 -0
- package/lib/resources/identity_providers.cjs +15 -0
- package/lib/resources/identity_providers.cjs.map +1 -0
- package/lib/resources/identity_providers.d.cts +5 -0
- package/lib/resources/identity_providers.d.ts +2 -0
- package/lib/resources/identity_providers.js +7 -0
- package/lib/resources/identity_providers.js.map +1 -0
- package/lib/resources/membership_profiles.cjs +15 -0
- package/lib/resources/membership_profiles.cjs.map +1 -0
- package/lib/resources/membership_profiles.d.cts +5 -0
- package/lib/resources/membership_profiles.d.ts +2 -0
- package/lib/resources/membership_profiles.js +7 -0
- package/lib/resources/membership_profiles.js.map +1 -0
- package/lib/resources/memberships.cjs +15 -0
- package/lib/resources/memberships.cjs.map +1 -0
- package/lib/resources/memberships.d.cts +5 -0
- package/lib/resources/memberships.d.ts +2 -0
- package/lib/resources/memberships.js +7 -0
- package/lib/resources/memberships.js.map +1 -0
- package/lib/resources/organizations.cjs +15 -0
- package/lib/resources/organizations.cjs.map +1 -0
- package/lib/resources/organizations.d.cts +5 -0
- package/lib/resources/organizations.d.ts +2 -0
- package/lib/resources/organizations.js +7 -0
- package/lib/resources/organizations.js.map +1 -0
- package/lib/resources/permissions.cjs +15 -0
- package/lib/resources/permissions.cjs.map +1 -0
- package/lib/resources/permissions.d.cts +5 -0
- package/lib/resources/permissions.d.ts +2 -0
- package/lib/resources/permissions.js +7 -0
- package/lib/resources/permissions.js.map +1 -0
- package/lib/resources/roles.cjs +15 -0
- package/lib/resources/roles.cjs.map +1 -0
- package/lib/resources/roles.d.cts +5 -0
- package/lib/resources/roles.d.ts +2 -0
- package/lib/resources/roles.js +7 -0
- package/lib/resources/roles.js.map +1 -0
- package/lib/resources/users.cjs +15 -0
- package/lib/resources/users.cjs.map +1 -0
- package/lib/resources/users.d.cts +5 -0
- package/lib/resources/users.d.ts +2 -0
- package/lib/resources/users.js +7 -0
- package/lib/resources/users.js.map +1 -0
- package/lib/resources/versions.cjs +15 -0
- package/lib/resources/versions.cjs.map +1 -0
- package/lib/resources/versions.d.cts +5 -0
- package/lib/resources/versions.d.ts +2 -0
- package/lib/resources/versions.js +7 -0
- package/lib/resources/versions.js.map +1 -0
- package/lib/static.cjs +17 -0
- package/lib/static.cjs.map +1 -0
- package/lib/static.d.cts +18 -0
- package/lib/static.d.ts +18 -0
- package/lib/static.js +8 -0
- package/lib/static.js.map +1 -0
- package/lib/version.cjs +20 -0
- package/lib/version.cjs.map +1 -0
- package/lib/version.d.cts +12 -0
- package/lib/version.d.ts +12 -0
- package/lib/version.js +3 -0
- package/lib/version.js.map +1 -0
- package/package.json +36 -26
- package/lib/index.mjs +0 -1
package/lib/index.js
CHANGED
|
@@ -1 +1,26 @@
|
|
|
1
|
-
"use strict";var Pe=Object.defineProperty;var Rr=Object.getOwnPropertyDescriptor;var gr=Object.getOwnPropertyNames;var hr=Object.prototype.hasOwnProperty;var sr=t=>{throw TypeError(t)};var fr=(t,e)=>{for(var r in e)Pe(t,r,{get:e[r],enumerable:!0})},br=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of gr(e))!hr.call(t,i)&&i!==r&&Pe(t,i,{get:()=>e[i],enumerable:!(s=Rr(e,i))||s.enumerable});return t};var Pr=t=>br(Pe({},"__esModule",{value:!0}),t);var tr=(t,e,r)=>e.has(t)||sr("Cannot "+r);var n=(t,e,r)=>(tr(t,e,"read from private field"),r?r.call(t):e.get(t)),c=(t,e,r)=>e.has(t)?sr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),l=(t,e,r,s)=>(tr(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r);var Nr={};fr(Nr,{CommerceLayerProvisioning:()=>Xe,CommerceLayerProvisioningStatic:()=>P,default:()=>de});module.exports=Pr(Nr);var _r={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:15e3,requiredAttributes:["accessToken"]},jsonapi:{maxResourceIncluded:2}},f=_r;var Tr=(t,...e)=>{},ir=t=>Tr;try{let t=require("debug");t&&typeof t=="function"&&(ir=t)}catch{}var Cr="clsdk",Ar=t=>ir(`${Cr}:${t}`),h=Ar;var _e=h("fetch"),D,H,J,le=class le extends Error{constructor(r,s,i){super(s);c(this,D);c(this,H);c(this,J);l(this,H,r),l(this,J,s),i&&l(this,D,i.errors)}get errors(){return n(this,D)}get status(){return n(this,H)}get statusText(){return n(this,J)}};D=new WeakMap,H=new WeakMap,J=new WeakMap,le.isFetchError=r=>r instanceof le;var V=le,Te=async(t,e,r)=>{_e("fetch: %s, %O, native[%s]",t,e||{},r?.fetch?"no":"yes");let s=r?.interceptors;s?.request?.onSuccess&&({url:t,options:e}=await s.request.onSuccess({url:t,options:e}));let o=await(r?.fetch||fetch)(t,e);o.ok?(s?.rawReader?.onSuccess&&await s.rawReader.onSuccess(o),s?.response?.onSuccess&&(o=await s.response.onSuccess(o))):s?.rawReader?.onFailure&&await s.rawReader.onFailure(o);let p=o.body&&o.status!==204?await o.text().then(a=>(_e("response: %O",a),a?.trim()?JSON.parse(a):a)).catch(a=>{if(_e("error: %s",a.message),o.ok)throw new m({message:"Error parsing API response body",type:"parse"})}):void 0;if(!o.ok){let a=new V(o.status,o.statusText,p);if(s?.response?.onFailure&&(a=await s.response.onFailure(a)),a)throw a}return p};var U=(a=>(a.CLIENT="client",a.REQUEST="request",a.RESPONSE="response",a.CANCEL="cancel",a.PARSE="parse",a.TIMEOUT="timeout",a.TOKEN_REFRESH="token-refresh",a))(U||{}),W=class W extends Error{static isSdkError(e){return e&&[W.NAME,O.NAME].includes(e.name)&&Object.values(U).includes(e.type)}constructor(e){super(e.message),this.name=W.NAME,this.type=e.type||"client"}};W.NAME="SdkError";var m=W,B=class B extends m{constructor(r){super({...r,type:"response"});this.errors=[];this.name=B.NAME}static isApiError(r){return m.isSdkError(r)&&r.name===B.NAME&&r.type==="response"}first(){return this.errors?.length>0?this.errors[0]:void 0}};B.NAME="ApiError";var O=B,Mr=t=>t instanceof TypeError&&t.message!=="fetch failed",Or=t=>t instanceof DOMException&&t.name==="AbortError",xr=t=>t instanceof DOMException&&t.name==="TimeoutError",or=t=>{let e=["INVALID_TOKEN","UNAUTHORIZED"];return O.isApiError(t)&&t.status===401&&(e.includes(t.code||"")||t.errors&&t.errors.length>0&&e.includes(t.errors[0].code))},Ce=t=>{if(m.isSdkError(t)||O.isApiError(t))throw t;let e=new m({message:t.message});if(V.isFetchError(t)){let r=new O(e);r.type="response",r.status=t.status,r.statusText=t.statusText,r.code=String(r.status),r.errors=t.errors||[],!r.message&&r.statusText&&(r.message=r.statusText),e=r}else Mr(t)?e.type="request":Or(t)?e.type="cancel":xr(t)?e.type="timeout":(e.type="client",e.source=t);throw e};var nr=t=>{try{return JSON.parse(atob(t.split(".")[1])).exp*1e3-Date.now()<0}catch{return!1}};var C=h("client"),Ae=t=>`https://provisioning.${t||f.default.domain}/api`,Q,b,R,K,Oe=class Oe{constructor(e){c(this,Q);c(this,b);c(this,R);c(this,K);C("new client instance %O",e),l(this,Q,Ae(e.domain)),l(this,b,e.accessToken);let r={timeout:e.timeout||f.client.timeout,fetch:e.fetch,refreshToken:e.refreshToken},i={...this.customHeaders(e.headers),Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:`Bearer ${n(this,b)}`};e.userAgent&&(i["User-Agent"]=e.userAgent),r.headers=i,l(this,R,r),C("fetch config: %O",r),l(this,K,{})}static create(e){for(let r of f.client.requiredAttributes)if(!e||!e[r])throw new m({message:`Undefined '${r}' parameter`});return new Oe(e)}get interceptors(){return n(this,K)}get requestHeaders(){return n(this,R).headers||(n(this,R).headers={}),n(this,R).headers}config(e){C("config %o",e);let r=n(this,R);return r.headers||(r.headers={}),e.timeout&&(r.timeout=e.timeout),e.userAgent&&this.userAgent(e.userAgent),e.fetch&&(n(this,R).fetch=e.fetch),e.refreshToken&&(n(this,R).refreshToken=e.refreshToken),e.domain&&l(this,Q,Ae(e.domain)),e.accessToken&&(l(this,b,e.accessToken),r.headers.Authorization=`Bearer ${n(this,b)}`),e.headers&&(r.headers={...r.headers,...this.customHeaders(e.headers)}),this}userAgent(e){return e&&(this.requestHeaders["User-Agent"]=e),this}async request(e,r,s,i){C("request %s %s, %O, %O",e,r,s||{},i||{}),i?.userAgent&&C("User-Agent header ignored in request config");let o=i?.domain?Ae(i.domain):n(this,Q),p=new URL(`${o}/${r}`),a=s?JSON.stringify({data:s}):void 0,T={...this.requestHeaders,...this.customHeaders(i?.headers)},M=i?.accessToken||n(this,b);M&&(T.Authorization=`Bearer ${M}`);let fe=i?.refreshToken||n(this,R).refreshToken,dr=i?.fetch||n(this,R).fetch,Y={method:e,body:a,headers:T},er=i?.timeout||n(this,R).timeout;er&&(AbortSignal?.timeout?Y.signal=AbortSignal.timeout(er):C("Timeout not set. Undefined function: %s","AbortSignal.timeout")),i?.params&&Object.entries(i?.params).forEach(([w,L])=>{p.searchParams.append(w,String(L))});let rr={interceptors:this.interceptors,fetch:dr};try{return await Te(p,Y,rr).catch(w=>Ce(w))}catch(w){if(or(w)&&fe&&nr(M)){C("Access token has expired");let L=await fe(n(this,b)).catch(be=>{C("Refresh token error: %s",be.message);let pe=new m({message:"Error refreshing access token",type:"token-refresh"});throw pe.source=be,pe});if(L)return C("Access token refreshed"),this.config({accessToken:L}),l(this,b,L),Y.headers&&(Y.headers.Authorization=`Bearer ${L}`),await Te(p,Y,rr).catch(pe=>Ce(pe))}else throw w}}customHeaders(e){let r={};if(e)for(let[s,i]of Object.entries(e))["accept","content-type","authorization","user-agent"].includes(s.toLowerCase())||(r[s]=i);return r}get currentAccessToken(){return n(this,b)}};Q=new WeakMap,b=new WeakMap,R=new WeakMap,K=new WeakMap;var Me=Oe,ar=Me;var j=t=>t?.type&&t.id&&q.includes(t.type),xe=t=>t&&typeof t.type<"u"&&t.type&&q.includes(t.type);var ce=h("jsonapi"),I=t=>{let e;t.links&&delete t.links;let r=t.data,s=t.included;return r?Array.isArray(r)?e=r.map(i=>ue(i,s)):e=ue(r,s):e=r,e},pr=(t,e=[])=>e.find(s=>t.id===s.id&&t.type===s.type)||t,ue=(t,e,r=[])=>{if(ce("denormalize resource: %O, %o",t,e||{}),!t)return t;let s={id:t.id,type:t.type,...t.attributes};return t.relationships&&Object.keys(t.relationships).forEach(i=>{let o=t.relationships[i].data;o?r.filter(p=>p.id===o.id&&p.type===o.type).length>=f.jsonapi.maxResourceIncluded?s[i]=o:Array.isArray(o)?s[i]=o.map(p=>ue(pr(p,e),e,[...r,p])):s[i]=ue(pr(o,e),e,[...r,o]):o===null&&(s[i]=null)}),ce("denormalized resource: %O",s),s},me=t=>{ce("normalize resource: %O",t);let e={},r={};for(let i in t){if(["type","id"].includes(i))continue;let o=t[i];Array.isArray(o)&&o.length===1&&xe(o[0])&&o[0].id===null?r[i]={data:[]}:o&&xe(o)&&o.id===null?r[i]={data:null}:o&&(j(o)||Array.isArray(o)&&j(o[0]))?r[i]={data:o}:e[i]=o}let s={type:t.type,attributes:e,relationships:r};return j(t)&&(s.id=t.id),ce("normalized resource: %O",s),s};var lr=h("query"),cr=["_any","_all","_in","_not_in_or_null"],vr=t=>cr.some(e=>t.endsWith(e)),ur=["_jcont"],zr=t=>ur.some(e=>t.endsWith(e)),ve=t=>t&&(t.filters||t.pageNumber||t.pageSize||t.sort),$=(t,e)=>{lr("generate query string params: %O, %O",t,e);let r={};return t&&(t.include&&(r.include=t.include.join(",")),t.fields&&(Array.isArray(t.fields)&&(t.fields={[e.type||e]:t.fields}),Object.entries(t.fields).forEach(([s,i])=>{r[`fields[${s}]`]=i.join(",")})),ve(t)&&(t.sort&&(Array.isArray(t.sort)?r.sort=t.sort.join(","):r.sort=Object.entries(t.sort).map(([s,i])=>`${i==="desc"?"-":""}${s}`).join(",")),t.pageNumber&&(r["page[number]"]=String(t.pageNumber)),t.pageSize&&(r["page[size]"]=String(t.pageSize)),t.filters&&Object.entries(t.filters).forEach(([s,i])=>{let o;if(Array.isArray(i)){if(!vr(s))throw new m({message:`Incorrect filter [${s}]: Array value is supported only for the following filters: ${cr.join(", ")}`,type:"request"});o=i.join(",")}else if(typeof i=="object"){if(!zr(s))throw new m({message:`Incorrect filter [${s}]: Object value is supported only for the following filters: ${ur.join(", ")}`,type:"request"});o=JSON.stringify(i)}else o=String(i);r[`filter[q][${s}]`]=o})),lr("query string params: %O",r)),r};var P={resources:t=>t?[...q].sort():q,singletons:t=>t?[...ye].sort():ye,isSingleton:t=>ye.includes(t),isSdkError:t=>m.isSdkError(t),isApiError:t=>O.isApiError(t),init:t=>de(t),get schemaVersion(){return ze}};var A=h("resource"),Re=class extends Array{constructor(e,r){super(...r||[]),this.meta=e}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(e){return this.length&&e>=0?this[e]:void 0}hasNextPage(){return this.meta.currentPage<this.meta.pageCount}hasPrevPage(){return this.meta.currentPage>1}getRecordCount(){return this.meta.recordCount}getPageCount(){return this.meta.pageCount}get recordCount(){return this.meta.recordCount}get pageCount(){return this.meta.pageCount}};var g,Ne,Ee=class{constructor(e){c(this,g);c(this,Ne,{});l(this,g,ar.create(e)),this.localConfig(e)}localConfig(e){}config(e){return A("config %o",e),this.localConfig(e),n(this,g).config(e),this}get client(){return n(this,g)}async retrieve(e,r,s,i){let o=!("id"in e)||P.isSingleton(e.type);A("retrieve:%s %o, %O, %O",o?" singleton,":"",e,r||{},s||{});let p=$(r,e);s?.params&&Object.assign(p,s?.params);let a=`${i||e.type}${o?"":`/${e.id}`}`,T=await n(this,g).request("GET",a,void 0,{...s,params:p});return I(T)}async list(e,r,s){A("list: %o, %O, %O",e,r||{},s||{});let i=$(r,e);s?.params&&Object.assign(i,s?.params);let o=await n(this,g).request("GET",`${e.type}`,void 0,{...s,params:i}),p=I(o),a={pageCount:Number(o.meta?.page_count),recordCount:Number(o.meta?.record_count),currentPage:r?.pageNumber||f.default.pageNumber,recordsPerPage:r?.pageSize||f.default.pageSize};return new Re(a,p)}async create(e,r,s){A("create: %o, %O, %O",e,r||{},s||{});let i=$(r,e);s?.params&&Object.assign(i,s?.params);let o=me(e),p=await n(this,g).request("POST",e.type,o,{...s,params:i});return I(p)}async update(e,r,s,i){let o=!("id"in e)||P.isSingleton(e.type);A("update:%s %o, %O, %O",o?" singleton,":"",e,r||{},s||{});let p=$(r,e);s?.params&&Object.assign(p,s?.params);let a=`${i||e.type}${o?"":`/${e.id}`}`,T=me(e),M=await n(this,g).request("PATCH",a,T,{...s,params:p});return I(M)}async delete(e,r){A("delete: %o, %O",e,r||{}),await n(this,g).request("DELETE",`${e.type}/${e.id}`,void 0,r)}async fetch(e,r,s,i){A("fetch: %o, %O, %O",r,s||{},i||{});let o=$(s,e);i?.params&&Object.assign(o,i?.params);let p=await n(this,g).request("GET",r,void 0,{...i,params:o}),a=I(p);if(Array.isArray(a)){let T=s,M={pageCount:Number(p.meta?.page_count),recordCount:Number(p.meta?.record_count),currentPage:T?.pageNumber||f.default.pageNumber,recordsPerPage:T?.pageSize||f.default.pageSize};return new Re(M,a)}else return a}async action(e,r,s,i){A("action: %o %o, %O",e,r,i||{});let o={};i?.params&&Object.assign(o,i?.params);let p=s&&j(s)?me(s):s;await n(this,g).request(e,r,p,{...i,params:o})}};g=new WeakMap,Ne=new WeakMap;var ge=class{constructor(e){A("new resource instance: %s",this.type()),this.resources=e}relationshipOneToOne(e){return e===null||typeof e=="string"?{id:e,type:this.type()}:{id:e.id,type:this.type()}}relationshipOneToMany(...e){return e===null||e.length===0||e[0]===null?[{id:null,type:this.type()}]:e.map(r=>({id:r,type:this.type()}))}path(){return this.type()}parse(e){try{let r=JSON.parse(e);if(r.data?.type!==this.type())throw new m({message:`Invalid resource type [${r.data?.type}]`,type:"parse"});return I(r)}catch(r){throw m.isSdkError(r)?r:new m({message:`Payload parse error [${r.message}]`,type:"parse"})}}async update(e,r,s){return this.resources.update({...e,type:this.type()},r,s,this.path())}},y=class extends ge{async retrieve(e,r,s){return this.resources.retrieve(typeof e=="string"?{type:this.type(),id:e}:e,r,s)}async list(e,r){return this.resources.list({type:this.type()},e,r)}async count(e,r){let s={filters:ve(e)?e.filters:e,pageNumber:1,pageSize:1},i=await this.list(s,r);return Promise.resolve(i.meta.recordCount)}},he=class extends ge{async retrieve(e,r){return this.resources.retrieve({type:this.type()},e,r,this.path())}},mr=Ee;var x=class x extends y{async create(e,r,s){return this.resources.create({...e,type:x.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:x.TYPE},r,s)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:x.TYPE}:e,r)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`api_credentials/${i}/organization`,r,s)}async role(e,r,s){let i=e.id||e;return this.resources.fetch({type:"roles"},`api_credentials/${i}/role`,r,s)}isApiCredential(e){return e.type&&e.type===x.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return x.TYPE}};x.TYPE="api_credentials";var Ie=x,Se=Ie;var v=class v extends y{async create(e,r,s){return this.resources.create({...e,type:v.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:v.TYPE},r,s)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:v.TYPE}:e,r)}async api_credential(e,r,s){let i=e.id||e;return this.resources.fetch({type:"api_credentials"},`application_memberships/${i}/api_credential`,r,s)}async membership(e,r,s){let i=e.id||e;return this.resources.fetch({type:"memberships"},`application_memberships/${i}/membership`,r,s)}async membership_profile(e,r,s){let i=e.id||e;return this.resources.fetch({type:"membership_profiles"},`application_memberships/${i}/membership_profile`,r,s)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`application_memberships/${i}/organization`,r,s)}async role(e,r,s){let i=e.id||e;return this.resources.fetch({type:"roles"},`application_memberships/${i}/role`,r,s)}isApplicationMembership(e){return e.type&&e.type===v.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return v.TYPE}};v.TYPE="application_memberships";var ke=v,we=ke;var _=class _ extends y{async create(e,r,s){return this.resources.create({...e,type:_.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:_.TYPE},r,s)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:_.TYPE}:e,r)}async user(e,r,s){let i=e.id||e;return this.resources.fetch({type:"users"},`identity_providers/${i}/user`,r,s)}async _disable(e,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_disable:!0},r,s)}async _enable(e,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_enable:!0},r,s)}isIdentityProvider(e){return e.type&&e.type===_.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return _.TYPE}};_.TYPE="identity_providers";var Le=_,Ue=Le;var z=class z extends y{async create(e,r,s){return this.resources.create({...e,type:z.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:z.TYPE},r,s)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:z.TYPE}:e,r)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`membership_profiles/${i}/organization`,r,s)}async application_memberships(e,r,s){let i=e.id||e;return this.resources.fetch({type:"application_memberships"},`membership_profiles/${i}/application_memberships`,r,s)}isMembershipProfile(e){return e.type&&e.type===z.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return z.TYPE}};z.TYPE="membership_profiles";var Qe=z,je=Qe;var E=class E extends y{async create(e,r,s){return this.resources.create({...e,type:E.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:E.TYPE},r,s)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:E.TYPE}:e,r)}async resend(e,r){let s=e.id||e;await this.resources.action("POST",`memberships/${s}/resend`,{},r)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`memberships/${i}/organization`,r,s)}async role(e,r,s){let i=e.id||e;return this.resources.fetch({type:"roles"},`memberships/${i}/role`,r,s)}async application_memberships(e,r,s){let i=e.id||e;return this.resources.fetch({type:"application_memberships"},`memberships/${i}/application_memberships`,r,s)}async membership_profile(e,r,s){let i=e.id||e;return this.resources.fetch({type:"membership_profiles"},`memberships/${i}/membership_profile`,r,s)}async versions(e,r,s){let i=e.id||e;return this.resources.fetch({type:"versions"},`memberships/${i}/versions`,r,s)}isMembership(e){return e.type&&e.type===E.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return E.TYPE}};E.TYPE="memberships";var qe=E,$e=qe;var S=class S extends y{async create(e,r,s){return this.resources.create({...e,type:S.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:S.TYPE},r,s)}async transfer_ownership(e,r,s){let i=e.id||e;await this.resources.action("PATCH",`organizations/${i}/transfer_ownership`,{...r},s)}async memberships(e,r,s){let i=e.id||e;return this.resources.fetch({type:"memberships"},`organizations/${i}/memberships`,r,s)}async roles(e,r,s){let i=e.id||e;return this.resources.fetch({type:"roles"},`organizations/${i}/roles`,r,s)}async permissions(e,r,s){let i=e.id||e;return this.resources.fetch({type:"permissions"},`organizations/${i}/permissions`,r,s)}async api_credentials(e,r,s){let i=e.id||e;return this.resources.fetch({type:"api_credentials"},`organizations/${i}/api_credentials`,r,s)}isOrganization(e){return e.type&&e.type===S.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return S.TYPE}};S.TYPE="organizations";var Fe=S,Ye=Fe;var k=class k extends y{async create(e,r,s){return this.resources.create({...e,type:k.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:k.TYPE},r,s)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`permissions/${i}/organization`,r,s)}async role(e,r,s){let i=e.id||e;return this.resources.fetch({type:"roles"},`permissions/${i}/role`,r,s)}async versions(e,r,s){let i=e.id||e;return this.resources.fetch({type:"versions"},`permissions/${i}/versions`,r,s)}isPermission(e){return e.type&&e.type===k.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return k.TYPE}};k.TYPE="permissions";var Ve=k,De=Ve;var N=class N extends y{async create(e,r,s){return this.resources.create({...e,type:N.TYPE},r,s)}async update(e,r,s){return this.resources.update({...e,type:N.TYPE},r,s)}async organization(e,r,s){let i=e.id||e;return this.resources.fetch({type:"organizations"},`roles/${i}/organization`,r,s)}async permissions(e,r,s){let i=e.id||e;return this.resources.fetch({type:"permissions"},`roles/${i}/permissions`,r,s)}async memberships(e,r,s){let i=e.id||e;return this.resources.fetch({type:"memberships"},`roles/${i}/memberships`,r,s)}async api_credentials(e,r,s){let i=e.id||e;return this.resources.fetch({type:"api_credentials"},`roles/${i}/api_credentials`,r,s)}async versions(e,r,s){let i=e.id||e;return this.resources.fetch({type:"versions"},`roles/${i}/versions`,r,s)}async _add_missing_base_permissions(e,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:N.TYPE,_add_missing_base_permissions:!0},r,s)}isRole(e){return e.type&&e.type===N.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return N.TYPE}};N.TYPE="roles";var He=N,Je=He;var F=class F extends he{async update(e,r,s){return this.resources.update({...e,type:F.TYPE},r,s,this.path())}isUser(e){return e.type&&e.type===F.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return F.TYPE}path(){return"user"}};F.TYPE="users";var We=F,Be=We;var G=class G extends y{isVersion(e){return e.type&&e.type===G.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return G.TYPE}};G.TYPE="versions";var Ke=G,Ge=Ke;var q=["api_credentials","application_memberships","identity_providers","memberships","membership_profiles","organizations","permissions","roles","users","versions"],ye=["users"];var yr=h("commercelayer"),ze="1.0.15";var d,Z,X,ee,re,se,te,ie,oe,ne,ae,Ze=class{constructor(e){this.openApiSchemaVersion=ze;c(this,d);c(this,Z);c(this,X);c(this,ee);c(this,re);c(this,se);c(this,te);c(this,ie);c(this,oe);c(this,ne);c(this,ae);yr("new commercelayer provisioning instance %O",e),l(this,d,new mr(e))}get api_credentials(){return n(this,Z)||l(this,Z,new Se(n(this,d)))}get application_memberships(){return n(this,X)||l(this,X,new we(n(this,d)))}get identity_providers(){return n(this,ee)||l(this,ee,new Ue(n(this,d)))}get memberships(){return n(this,re)||l(this,re,new $e(n(this,d)))}get membership_profiles(){return n(this,se)||l(this,se,new je(n(this,d)))}get organizations(){return n(this,te)||l(this,te,new Ye(n(this,d)))}get permissions(){return n(this,ie)||l(this,ie,new De(n(this,d)))}get roles(){return n(this,oe)||l(this,oe,new Je(n(this,d)))}get user(){return n(this,ne)||l(this,ne,new Be(n(this,d)))}get versions(){return n(this,ae)||l(this,ae,new Ge(n(this,d)))}get currentAccessToken(){return n(this,d)?.client?.currentAccessToken}get interceptors(){return n(this,d).client.interceptors}localConfig(e){}config(e){return yr("config %o",e),this.localConfig(e),n(this,d).config(e),this}resources(){return P.resources()}singletons(){return P.singletons()}isSingleton(e){return P.isSingleton(e)}isApiError(e){return P.isApiError(e)}addRequestInterceptor(e,r){return this.interceptors.request={onSuccess:e,onFailure:r},1}addResponseInterceptor(e,r){return this.interceptors.response={onSuccess:e,onFailure:r},1}removeInterceptor(e,r=1){this.interceptors[e]=void 0}removeInterceptors(){this.removeInterceptor("request"),this.removeInterceptor("response"),this.removeRawResponseReader()}addRawResponseReader(e){let r={id:0,rawResponse:void 0,headers:void 0,ok:!0};async function s(i){if(r.rawResponse=await i?.clone().json().catch(()=>{}),r.ok=i.ok,e?.headers){let o={};i.headers.forEach((p,a)=>{o[a]=p}),r.headers=o}return i}return this.interceptors.rawReader={onSuccess:s,onFailure:s},r.id=1,r}removeRawResponseReader(){this.interceptors.rawReader=void 0}};d=new WeakMap,Z=new WeakMap,X=new WeakMap,ee=new WeakMap,re=new WeakMap,se=new WeakMap,te=new WeakMap,ie=new WeakMap,oe=new WeakMap,ne=new WeakMap,ae=new WeakMap;var Xe=t=>new Ze(t),de=Xe;0&&(module.exports={CommerceLayerProvisioning,CommerceLayerProvisioningStatic});
|
|
1
|
+
export { CommerceLayerProvisioningStatic } from './chunk-OEYUWL5K.js';
|
|
2
|
+
import { bundle_default } from './chunk-CESAPW7Z.js';
|
|
3
|
+
export { bundle_default as CommerceLayerProvisioning } from './chunk-CESAPW7Z.js';
|
|
4
|
+
import './chunk-4GOUGGBM.js';
|
|
5
|
+
import './chunk-IW2T22VR.js';
|
|
6
|
+
import './chunk-BFXJ3YNR.js';
|
|
7
|
+
import './chunk-6B2AFMGT.js';
|
|
8
|
+
import './chunk-O6ACW64H.js';
|
|
9
|
+
import './chunk-QRMCUYRK.js';
|
|
10
|
+
import './chunk-F2Z6XJTZ.js';
|
|
11
|
+
import './chunk-PIDJDUN3.js';
|
|
12
|
+
import './chunk-U76G3DPW.js';
|
|
13
|
+
import './chunk-OAXFNHFA.js';
|
|
14
|
+
import './chunk-ZTAL3U2D.js';
|
|
15
|
+
import './chunk-XCKSYX22.js';
|
|
16
|
+
import './chunk-HNSO4ZPF.js';
|
|
17
|
+
import './chunk-XV25RH6C.js';
|
|
18
|
+
export { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, SDK_VERSION } from './chunk-MANW7JPJ.js';
|
|
19
|
+
export { resourceList, singletonList } from './chunk-YS5PCY5D.js';
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_default = bundle_default;
|
|
23
|
+
|
|
24
|
+
export { src_default as default };
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,IAAO,WAAA,GAAQ","file":"index.js","sourcesContent":["// SDK — single entry point exposing the bundle client. Unlike the Core API SDK\n// there is no tree-shakeable single-client surface.\nimport CommerceLayerProvisioning, { type CommerceLayerProvisioningClient } from '../gen/bundle'\n\nexport { API_SCHEMA_VERSION, API_SUPPORTED_VERSIONS, type ApiVersion, SDK_VERSION } from '../gen/version'\nexport { CommerceLayerProvisioning, type CommerceLayerProvisioningClient }\n\nexport default CommerceLayerProvisioning\n\n// The resource catalogue, as values. 2.10.2 exposed these; they must be real\n// value exports, not type-only, or consumers get bindings that fail at runtime.\nexport { resourceList, singletonList } from '../gen/enum'\n// Commerce Layer Provisioning static functions\nexport { CommerceLayerProvisioningStatic } from './static'\n\n/** ** TYPES ** **/\n\n// Curated rather than wildcarded. 2.10.2 built its surface from `export type *`\n// over api/model/query/resource, but sdk8's modules have different shapes: the\n// same wildcards re-export resource *instances* and enum helper *functions*\n// into the .d.ts while the runtime exports only six names — so consumers could\n// import bindings that typecheck and then fail at runtime.\n\n// Error types\nexport type { ApiError, ErrorType, SdkError } from '@runtime/error'\n// Raw response reader and request/response interceptors\nexport type { ErrorObj, HeadersObj, RequestObj, ResponseObj } from '@runtime/interceptor'\n// Query filter types\nexport type {\n QueryFields,\n QueryFilter,\n QueryInclude,\n QueryPageCursor,\n QueryPageNumber,\n QueryPageSize,\n QueryParams,\n QueryParamsList,\n QueryParamsRetrieve,\n QuerySort,\n} from '@runtime/query'\n// Resource types\nexport type {\n ApiResource,\n ApiSingleton,\n ListMeta,\n ListResponse,\n Metadata,\n Resource,\n ResourceCreate,\n ResourceFilter,\n ResourceId,\n ResourceRel,\n ResourceSort,\n ResourcesConfig,\n ResourcesInitConfig,\n ResourceType,\n ResourceUpdate,\n SingletonUpdate,\n} from '@runtime/resource'\n// Resource classes, as 2.10.2 exposed them\nexport type {\n ApiCredentials,\n ApplicationMemberships,\n IdentityProviders,\n MembershipProfiles,\n Memberships,\n Organizations,\n Permissions,\n Roles,\n Users,\n Versions,\n} from '../gen/api'\n// Resource API type unions\nexport type {\n CreatableResource,\n CreatableResourceType,\n DeletableResource,\n DeletableResourceType,\n ListableResource,\n ListableResourceType,\n ResourceFields,\n ResourceSortFields,\n ResourceTypeLock,\n RetrievableResource,\n RetrievableResourceType,\n UpdatableResource,\n UpdatableResourceType,\n} from '../gen/enum'\n// Resource model types — model.ts declares types only, so a wildcard is safe\nexport type * from '../gen/model'\n// Payload types for custom actions\nexport type { TransferOwnershipDataType } from './actions'\n// Client config types\nexport type { CommerceLayerConfig, CommerceLayerInitConfig } from './commercelayer'\n"]}
|
package/lib/model.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"model.cjs"}
|
package/lib/model.d.cts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { A as ApiCredential, a as ApiCredentialCreate, b as ApiCredentialSort, c as ApiCredentialUpdate, g as ApplicationMembership, h as ApplicationMembershipCreate, i as ApplicationMembershipSort, j as ApplicationMembershipUpdate, I as IdentityProvider, n as IdentityProviderCreate, o as IdentityProviderSort, p as IdentityProviderUpdate, M as Membership, u as MembershipCreate, v as MembershipProfile, w as MembershipProfileCreate, x as MembershipProfileSort, y as MembershipProfileUpdate, B as MembershipSort, F as MembershipUpdate, O as Organization, K as OrganizationCreate, N as OrganizationSort, P as OrganizationUpdate, R as Permission, S as PermissionCreate, T as PermissionSort, U as PermissionUpdate, al as Role, am as RoleCreate, an as RoleSort, ao as RoleUpdate, at as User, au as UserSort, av as UserUpdate, ax as Version, ay as VersionSort } from './api-BQZ9r4RA.cjs';
|
|
2
|
+
import './actions.cjs';
|
package/lib/model.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { A as ApiCredential, a as ApiCredentialCreate, b as ApiCredentialSort, c as ApiCredentialUpdate, g as ApplicationMembership, h as ApplicationMembershipCreate, i as ApplicationMembershipSort, j as ApplicationMembershipUpdate, I as IdentityProvider, n as IdentityProviderCreate, o as IdentityProviderSort, p as IdentityProviderUpdate, M as Membership, u as MembershipCreate, v as MembershipProfile, w as MembershipProfileCreate, x as MembershipProfileSort, y as MembershipProfileUpdate, B as MembershipSort, F as MembershipUpdate, O as Organization, K as OrganizationCreate, N as OrganizationSort, P as OrganizationUpdate, R as Permission, S as PermissionCreate, T as PermissionSort, U as PermissionUpdate, al as Role, am as RoleCreate, an as RoleSort, ao as RoleUpdate, at as User, au as UserSort, av as UserUpdate, ax as Version, ay as VersionSort } from './api-BQ6Y-J8P.js';
|
|
2
|
+
import './actions.js';
|
package/lib/model.js
ADDED
package/lib/model.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"model.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkKJRFIWHK_cjs = require('../chunk-KJRFIWHK.cjs');
|
|
4
|
+
require('../chunk-QTTL5EGB.cjs');
|
|
5
|
+
require('../chunk-47HG76BX.cjs');
|
|
6
|
+
require('../chunk-YLA6YCK5.cjs');
|
|
7
|
+
require('../chunk-VFTFSHXQ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkKJRFIWHK_cjs.api_credentials_default;
|
|
12
|
+
//# sourceMappingURL=api_credentials.cjs.map
|
|
13
|
+
|
|
14
|
+
module.exports = exports.default;
|
|
15
|
+
//# sourceMappingURL=api_credentials.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"api_credentials.cjs"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _default from '../api-BQZ9r4RA.cjs';
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
export = _default;
|
|
4
|
+
export { A as ApiCredential, a as ApiCredentialCreate, b as ApiCredentialSort, aX as ApiCredentialType, c as ApiCredentialUpdate, d as ApiCredentials } from '../api-BQZ9r4RA.cjs';
|
|
5
|
+
import '../actions.cjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { api_credentials_default as default } from '../chunk-F2Z6XJTZ.js';
|
|
2
|
+
import '../chunk-HNSO4ZPF.js';
|
|
3
|
+
import '../chunk-XV25RH6C.js';
|
|
4
|
+
import '../chunk-MANW7JPJ.js';
|
|
5
|
+
import '../chunk-YS5PCY5D.js';
|
|
6
|
+
//# sourceMappingURL=api_credentials.js.map
|
|
7
|
+
//# sourceMappingURL=api_credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"api_credentials.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkFHXWFSIQ_cjs = require('../chunk-FHXWFSIQ.cjs');
|
|
4
|
+
require('../chunk-QTTL5EGB.cjs');
|
|
5
|
+
require('../chunk-47HG76BX.cjs');
|
|
6
|
+
require('../chunk-YLA6YCK5.cjs');
|
|
7
|
+
require('../chunk-VFTFSHXQ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkFHXWFSIQ_cjs.application_memberships_default;
|
|
12
|
+
//# sourceMappingURL=application_memberships.cjs.map
|
|
13
|
+
|
|
14
|
+
module.exports = exports.default;
|
|
15
|
+
//# sourceMappingURL=application_memberships.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"application_memberships.cjs"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _default from '../api-BQZ9r4RA.cjs';
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
export = _default;
|
|
4
|
+
export { g as ApplicationMembership, h as ApplicationMembershipCreate, i as ApplicationMembershipSort, aR as ApplicationMembershipType, j as ApplicationMembershipUpdate, k as ApplicationMemberships } from '../api-BQZ9r4RA.cjs';
|
|
5
|
+
import '../actions.cjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { application_memberships_default as default } from '../chunk-PIDJDUN3.js';
|
|
2
|
+
import '../chunk-HNSO4ZPF.js';
|
|
3
|
+
import '../chunk-XV25RH6C.js';
|
|
4
|
+
import '../chunk-MANW7JPJ.js';
|
|
5
|
+
import '../chunk-YS5PCY5D.js';
|
|
6
|
+
//# sourceMappingURL=application_memberships.js.map
|
|
7
|
+
//# sourceMappingURL=application_memberships.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"application_memberships.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkJDXNOZFC_cjs = require('../chunk-JDXNOZFC.cjs');
|
|
4
|
+
require('../chunk-QTTL5EGB.cjs');
|
|
5
|
+
require('../chunk-47HG76BX.cjs');
|
|
6
|
+
require('../chunk-YLA6YCK5.cjs');
|
|
7
|
+
require('../chunk-VFTFSHXQ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkJDXNOZFC_cjs.identity_providers_default;
|
|
12
|
+
//# sourceMappingURL=identity_providers.cjs.map
|
|
13
|
+
|
|
14
|
+
module.exports = exports.default;
|
|
15
|
+
//# sourceMappingURL=identity_providers.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"identity_providers.cjs"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _default from '../api-BQZ9r4RA.cjs';
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
export = _default;
|
|
4
|
+
export { I as IdentityProvider, n as IdentityProviderCreate, o as IdentityProviderSort, a$ as IdentityProviderType, p as IdentityProviderUpdate, q as IdentityProviders } from '../api-BQZ9r4RA.cjs';
|
|
5
|
+
import '../actions.cjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { identity_providers_default as default } from '../chunk-U76G3DPW.js';
|
|
2
|
+
import '../chunk-HNSO4ZPF.js';
|
|
3
|
+
import '../chunk-XV25RH6C.js';
|
|
4
|
+
import '../chunk-MANW7JPJ.js';
|
|
5
|
+
import '../chunk-YS5PCY5D.js';
|
|
6
|
+
//# sourceMappingURL=identity_providers.js.map
|
|
7
|
+
//# sourceMappingURL=identity_providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"identity_providers.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkQVV2ORWB_cjs = require('../chunk-QVV2ORWB.cjs');
|
|
4
|
+
require('../chunk-QTTL5EGB.cjs');
|
|
5
|
+
require('../chunk-47HG76BX.cjs');
|
|
6
|
+
require('../chunk-YLA6YCK5.cjs');
|
|
7
|
+
require('../chunk-VFTFSHXQ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkQVV2ORWB_cjs.membership_profiles_default;
|
|
12
|
+
//# sourceMappingURL=membership_profiles.cjs.map
|
|
13
|
+
|
|
14
|
+
module.exports = exports.default;
|
|
15
|
+
//# sourceMappingURL=membership_profiles.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"membership_profiles.cjs"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _default from '../api-BQZ9r4RA.cjs';
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
export = _default;
|
|
4
|
+
export { v as MembershipProfile, w as MembershipProfileCreate, x as MembershipProfileSort, aJ as MembershipProfileType, y as MembershipProfileUpdate, z as MembershipProfiles } from '../api-BQZ9r4RA.cjs';
|
|
5
|
+
import '../actions.cjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { membership_profiles_default as default } from '../chunk-OAXFNHFA.js';
|
|
2
|
+
import '../chunk-HNSO4ZPF.js';
|
|
3
|
+
import '../chunk-XV25RH6C.js';
|
|
4
|
+
import '../chunk-MANW7JPJ.js';
|
|
5
|
+
import '../chunk-YS5PCY5D.js';
|
|
6
|
+
//# sourceMappingURL=membership_profiles.js.map
|
|
7
|
+
//# sourceMappingURL=membership_profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"membership_profiles.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkYFZRO7OE_cjs = require('../chunk-YFZRO7OE.cjs');
|
|
4
|
+
require('../chunk-QTTL5EGB.cjs');
|
|
5
|
+
require('../chunk-47HG76BX.cjs');
|
|
6
|
+
require('../chunk-YLA6YCK5.cjs');
|
|
7
|
+
require('../chunk-VFTFSHXQ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkYFZRO7OE_cjs.memberships_default;
|
|
12
|
+
//# sourceMappingURL=memberships.cjs.map
|
|
13
|
+
|
|
14
|
+
module.exports = exports.default;
|
|
15
|
+
//# sourceMappingURL=memberships.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"memberships.cjs"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { memberships_default as default } from '../chunk-ZTAL3U2D.js';
|
|
2
|
+
import '../chunk-HNSO4ZPF.js';
|
|
3
|
+
import '../chunk-XV25RH6C.js';
|
|
4
|
+
import '../chunk-MANW7JPJ.js';
|
|
5
|
+
import '../chunk-YS5PCY5D.js';
|
|
6
|
+
//# sourceMappingURL=memberships.js.map
|
|
7
|
+
//# sourceMappingURL=memberships.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"memberships.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkTOXS3OUT_cjs = require('../chunk-TOXS3OUT.cjs');
|
|
4
|
+
require('../chunk-QTTL5EGB.cjs');
|
|
5
|
+
require('../chunk-47HG76BX.cjs');
|
|
6
|
+
require('../chunk-YLA6YCK5.cjs');
|
|
7
|
+
require('../chunk-VFTFSHXQ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkTOXS3OUT_cjs.organizations_default;
|
|
12
|
+
//# sourceMappingURL=organizations.cjs.map
|
|
13
|
+
|
|
14
|
+
module.exports = exports.default;
|
|
15
|
+
//# sourceMappingURL=organizations.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"organizations.cjs"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _default from '../api-BQZ9r4RA.cjs';
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
export = _default;
|
|
4
|
+
export { O as Organization, K as OrganizationCreate, N as OrganizationSort, aV as OrganizationType, P as OrganizationUpdate, Q as Organizations } from '../api-BQZ9r4RA.cjs';
|
|
5
|
+
import '../actions.cjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { organizations_default as default } from '../chunk-XCKSYX22.js';
|
|
2
|
+
import '../chunk-HNSO4ZPF.js';
|
|
3
|
+
import '../chunk-XV25RH6C.js';
|
|
4
|
+
import '../chunk-MANW7JPJ.js';
|
|
5
|
+
import '../chunk-YS5PCY5D.js';
|
|
6
|
+
//# sourceMappingURL=organizations.js.map
|
|
7
|
+
//# sourceMappingURL=organizations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"organizations.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkOKBMV3W5_cjs = require('../chunk-OKBMV3W5.cjs');
|
|
4
|
+
require('../chunk-QTTL5EGB.cjs');
|
|
5
|
+
require('../chunk-47HG76BX.cjs');
|
|
6
|
+
require('../chunk-YLA6YCK5.cjs');
|
|
7
|
+
require('../chunk-VFTFSHXQ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkOKBMV3W5_cjs.permissions_default;
|
|
12
|
+
//# sourceMappingURL=permissions.cjs.map
|
|
13
|
+
|
|
14
|
+
module.exports = exports.default;
|
|
15
|
+
//# sourceMappingURL=permissions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"permissions.cjs"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { permissions_default as default } from '../chunk-BFXJ3YNR.js';
|
|
2
|
+
import '../chunk-HNSO4ZPF.js';
|
|
3
|
+
import '../chunk-XV25RH6C.js';
|
|
4
|
+
import '../chunk-MANW7JPJ.js';
|
|
5
|
+
import '../chunk-YS5PCY5D.js';
|
|
6
|
+
//# sourceMappingURL=permissions.js.map
|
|
7
|
+
//# sourceMappingURL=permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"permissions.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkRSAADRRH_cjs = require('../chunk-RSAADRRH.cjs');
|
|
4
|
+
require('../chunk-QTTL5EGB.cjs');
|
|
5
|
+
require('../chunk-47HG76BX.cjs');
|
|
6
|
+
require('../chunk-YLA6YCK5.cjs');
|
|
7
|
+
require('../chunk-VFTFSHXQ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkRSAADRRH_cjs.roles_default;
|
|
12
|
+
//# sourceMappingURL=roles.cjs.map
|
|
13
|
+
|
|
14
|
+
module.exports = exports.default;
|
|
15
|
+
//# sourceMappingURL=roles.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"roles.cjs"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { roles_default as default } from '../chunk-6B2AFMGT.js';
|
|
2
|
+
import '../chunk-HNSO4ZPF.js';
|
|
3
|
+
import '../chunk-XV25RH6C.js';
|
|
4
|
+
import '../chunk-MANW7JPJ.js';
|
|
5
|
+
import '../chunk-YS5PCY5D.js';
|
|
6
|
+
//# sourceMappingURL=roles.js.map
|
|
7
|
+
//# sourceMappingURL=roles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"roles.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkNFF6DWKZ_cjs = require('../chunk-NFF6DWKZ.cjs');
|
|
4
|
+
require('../chunk-QTTL5EGB.cjs');
|
|
5
|
+
require('../chunk-47HG76BX.cjs');
|
|
6
|
+
require('../chunk-YLA6YCK5.cjs');
|
|
7
|
+
require('../chunk-VFTFSHXQ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkNFF6DWKZ_cjs.users_default;
|
|
12
|
+
//# sourceMappingURL=users.cjs.map
|
|
13
|
+
|
|
14
|
+
module.exports = exports.default;
|
|
15
|
+
//# sourceMappingURL=users.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"users.cjs"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { users_default as default } from '../chunk-O6ACW64H.js';
|
|
2
|
+
import '../chunk-HNSO4ZPF.js';
|
|
3
|
+
import '../chunk-XV25RH6C.js';
|
|
4
|
+
import '../chunk-MANW7JPJ.js';
|
|
5
|
+
import '../chunk-YS5PCY5D.js';
|
|
6
|
+
//# sourceMappingURL=users.js.map
|
|
7
|
+
//# sourceMappingURL=users.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"users.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkLISATEFD_cjs = require('../chunk-LISATEFD.cjs');
|
|
4
|
+
require('../chunk-QTTL5EGB.cjs');
|
|
5
|
+
require('../chunk-47HG76BX.cjs');
|
|
6
|
+
require('../chunk-YLA6YCK5.cjs');
|
|
7
|
+
require('../chunk-VFTFSHXQ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkLISATEFD_cjs.versions_default;
|
|
12
|
+
//# sourceMappingURL=versions.cjs.map
|
|
13
|
+
|
|
14
|
+
module.exports = exports.default;
|
|
15
|
+
//# sourceMappingURL=versions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"versions.cjs"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { versions_default as default } from '../chunk-QRMCUYRK.js';
|
|
2
|
+
import '../chunk-HNSO4ZPF.js';
|
|
3
|
+
import '../chunk-XV25RH6C.js';
|
|
4
|
+
import '../chunk-MANW7JPJ.js';
|
|
5
|
+
import '../chunk-YS5PCY5D.js';
|
|
6
|
+
//# sourceMappingURL=versions.js.map
|
|
7
|
+
//# sourceMappingURL=versions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"versions.js"}
|
package/lib/static.cjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkBI4FXO5V_cjs = require('./chunk-BI4FXO5V.cjs');
|
|
4
|
+
require('./chunk-SZSANTXM.cjs');
|
|
5
|
+
require('./chunk-QTTL5EGB.cjs');
|
|
6
|
+
require('./chunk-47HG76BX.cjs');
|
|
7
|
+
require('./chunk-YLA6YCK5.cjs');
|
|
8
|
+
require('./chunk-VFTFSHXQ.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports, "CommerceLayerProvisioningStatic", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkBI4FXO5V_cjs.CommerceLayerProvisioningStatic; }
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=static.cjs.map
|
|
17
|
+
//# sourceMappingURL=static.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"static.cjs"}
|
package/lib/static.d.cts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { S as SdkError, A as ApiError } from './error-CVRdwnY9.cjs';
|
|
2
|
+
import { ae as ResourceTypeLock } from './api-BQZ9r4RA.cjs';
|
|
3
|
+
import './actions.cjs';
|
|
4
|
+
|
|
5
|
+
declare const CommerceLayerProvisioningStatic: {
|
|
6
|
+
resources: (sort?: boolean) => readonly string[];
|
|
7
|
+
singletons: (sort?: boolean) => readonly string[];
|
|
8
|
+
isSingleton: (resource: ResourceTypeLock) => boolean;
|
|
9
|
+
isCreatable: (resource: ResourceTypeLock) => boolean;
|
|
10
|
+
isUpdatable: (resource: ResourceTypeLock) => boolean;
|
|
11
|
+
isDeletable: (resource: ResourceTypeLock) => boolean;
|
|
12
|
+
isSdkError: (error: unknown) => error is SdkError;
|
|
13
|
+
isApiError: (error: unknown) => error is ApiError;
|
|
14
|
+
isTokenExpired: (token: string) => boolean;
|
|
15
|
+
readonly schemaVersion: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { CommerceLayerProvisioningStatic };
|