rebilly-js-sdk 62.116.1 → 62.116.2
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/CHANGELOG.md
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
## [62.116.
|
|
1
|
+
## [62.116.2](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.116.1...rebilly-js-sdk-v62.116.2) (2026-06-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **recomm,rebilly-js-sdk:** use SDK for registration settings ([#22135](https://github.com/Rebilly/rebilly/issues/22135)) ([22e3881](https://github.com/Rebilly/rebilly/commit/22e38815903221000d494ecdd4737a49fe51123c))
|
|
@@ -458,7 +458,7 @@ function C({ options: e }) {
|
|
|
458
458
|
}
|
|
459
459
|
function o() {
|
|
460
460
|
const i = {
|
|
461
|
-
"REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((g) => g).join("/")}@
|
|
461
|
+
"REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((g) => g).join("/")}@22e3881`
|
|
462
462
|
};
|
|
463
463
|
return e.apiKey && (i["REB-APIKEY"] = e.apiKey), i;
|
|
464
464
|
}
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
*
|
|
14
14
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
15
15
|
* Released under the MIT License.
|
|
16
|
-
*/var It=Tt;function L(e){return It(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var St=function(t){var s,r;return!(L(t)===!1||(s=t.constructor,typeof s!="function")||(r=s.prototype,L(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};const Et=qt,Pt=B,xt=St;function E(e,t){switch(Pt(e)){case"object":return Ct(e,t);case"array":return Dt(e,t);default:return Et(e)}}function Ct(e,t){if(typeof t=="function")return t(e);if(t||xt(e)){const s=new e.constructor;for(let r in e)s[r]=E(e[r],t);return s}return e}function Dt(e,t){const s=new e.constructor(e.length);for(let r=0;r<e.length;r++)s[r]=E(e[r],t);return s}var jt=E;const Mt=ct(jt);let Ot="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ft=(e=21)=>{let t="",s=e|0;for(;s--;)t+=Ot[Math.random()*64|0];return t};class Bt{constructor({id:t=null,created:s=null}={}){this.id=t||Ft(),this.created=s||new Date().getTime(),this.cancelSource=$.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,y(this,{exclude:["cancelSource","cancelToken","cancel"]})}}let Kt=class S{constructor(){if(S.instance)return S.instance;this.requests={},S.instance=this}getAll(){return Object.values(this.requests)}getById(t){return this.requests[t]}deleteById(t){this.requests[t]&&delete this.requests[t]}save(){const t=new Bt;return this.requests[t.id]=t,{id:t.id,cancelToken:t.cancelToken}}};const q=new Kt;class I{}M(I,"cancelById",(t,s)=>{try{q.getById(t).cancel(s),q.deleteById(t)}catch{}}),M(I,"cancelAll",async t=>{for(const s of q.getAll())await s.cancel(t),q.deleteById(s.id)});const Nt={cancelAll:async(...e)=>await I.cancelAll(...e)},b={request:"request",response:"response"},z=e=>{if(!Object.values(b).includes(e))throw new Error(`There is no such interceptor type as "${e}"`);return!0};function P({options:e}){const t=s();function s(){return $.create(n())}function r(){return t}function n(){return{baseURL:u(),timeout:e.requestTimeout,headers:o()}}function u(){let c=e.isSandbox?e.apiEndpoints.sandbox:e.apiEndpoints.live;return e.apiVersion&&(c=`${c}/${e.apiVersion}`),e.organizationId&&(c=`${c}/organizations/${e.organizationId}`),`${c}`}function o(){const i={"REB-API-CONSUMER":`${["Rebilly",e.appName,"js-sdk"].filter(g=>g).join("/")}@9402931`};return e.apiKey&&(i["REB-APIKEY"]=e.apiKey),i}function l(){return Mt(t.defaults.headers)}function a(c){e.requestTimeout=Number(c),t.defaults.timeout=e.requestTimeout}function p(c=e.jwt){const i=l();e.apiKey=null,e.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,t.defaults.headers=i}function v(c=e.publishableKey){const i=l();e.publishableKey=c,i.common.Authorization=`${c}`,t.defaults.headers=i}function D({host:c,port:i,auth:g}){t.defaults.proxy={host:c,port:i,auth:g}}function j({live:c=null,sandbox:i=null}){c&&(e.apiEndpoints.live=c),i&&(e.apiEndpoints.sandbox=i),t.defaults.baseURL=u()}function V(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return z(c)&&t.interceptors[b[c]].use(i,g)}function J(c,i){return z(c)&&t.interceptors[b[c]].eject(i)}function nr({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.request,{thenDelegate:c,catchDelegate:i})}function ur(c){J(b.request,c)}function or({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.response,{thenDelegate:c,catchDelegate:i})}function lr(c){J(b.response,c)}function d({request:c,isCollection:i,config:g}){const f=G(g),{id:R,cancelToken:hr}=q.save();f.cancelToken=hr;const X=async function(){try{const T=await c(f);return cr({response:T,isCollection:i,config:f})}catch(T){return W({error:T})}finally{q.deleteById(R)}}();return X.cancel=T=>I.cancelById(R,T),X}function cr({response:c,isCollection:i,config:g}){return i?new Z(c,g):new O(c,g)}function W({error:c}){if($.isCancel(c))throw new h.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new h.RebillyForbiddenError(c);case 404:throw new h.RebillyNotFoundError(c);case 405:throw new h.RebillyMethodNotAllowedError(c);case 409:throw new h.RebillyConflictError(c);case 422:throw new h.RebillyValidationError(c);default:throw new h.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new h.RebillyTimeoutError(c):new h.RebillyRequestError(c)}function ir(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(i=>c.params[i]!==null&&c.params[i]!=="").reduce((i,g)=>(i[g]=c.params[g],i),{})),c}function G(c={}){return{...ir(c)}}function Y(c,i={}){return d({request:g=>t.get(c,g),config:{params:i}})}function gr(c,i){return d({request:g=>t.get(c,g),config:{params:i},isCollection:!0})}function Q(c,i,g={}){let f={};return g.authenticate===!1&&(f={headers:l()},delete f.headers.common["REB-APIKEY"],delete f.headers.common.Authorization),g.params&&(f.params={...g.params}),d({request:R=>t.post(c,i,R),config:f})}function _(c,i,g={}){return d({request:f=>t.put(c,i,f),config:{params:g}})}function ar(c,i){return d({request:g=>t.patch(c,i,g),config:{}})}function mr(c){return d({request:i=>t.delete(c,i),config:{}})}function fr(c,i){return d({request:g=>t.delete(c,g),config:{data:{...i}}})}async function $r(c,i,g,f={}){if(i==="")return Q(c,g,{params:f});try{if((await Y(c)).response.status===200)throw new h.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(R){if(R.name==="RebillyNotFoundError")return _(c,g,f);throw R}}async function pr(c,i){const g=G(i);try{const f=await t.get(c,g);return new H(f,g)}catch(f){return W({error:f})}}return{getInstance:r,addRequestInterceptor:nr,removeRequestInterceptor:ur,addResponseInterceptor:or,removeResponseInterceptor:lr,setTimeout:a,setProxyAgent:D,setSessionToken:p,setPublishableKey:v,setEndpoints:j,get:Y,getAll:gr,post:Q,put:_,patch:ar,delete:mr,deleteAll:fr,create:$r,download:pr}}function Lt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("account-registration-settings",r)},create({id:t="",data:s}){return e.create(`account-registration-settings/${t}`,t,s)},get({id:t}){return e.get(`account-registration-settings/${t}`)},update({id:t,data:s}){return e.put(`account-registration-settings/${t}`,s)},delete({id:t}){return e.delete(`account-registration-settings/${t}`)}}}function zt({apiHandler:e}){return{forgotPassword({data:t}){return e.post("forgot-password",t,{authenticate:!1})}}}function Ut({apiHandler:e}){return{getAllowlistCollection({filter:t=null,sort:s=null,limit:r=null,offset:n=null}={}){const u={filter:t,sort:s,limit:r,offset:n};return e.getAll("allowlists",u)},storeAllowlist({data:t}){return e.post("allowlists",t)},getAllowlist({id:t}){return e.get(`allowlists/${t}`)},delete({id:t}){return e.delete(`allowlists/${t}`)}}}function Vt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("aml-checks",o)},get({id:t}){return e.get(`aml-checks/${t}`)},startReview({id:t}){return e.post(`aml-checks/${t}/start-review`)},stopReview({id:t}){return e.post(`aml-checks/${t}/stop-review`)},review({id:t,data:s}){return e.post(`aml-checks/${t}/review`,s)}}}function Jt({apiHandler:e}){return{getAmlSettings(){return e.get("aml-settings")},putAmlSettings({data:t}){return e.put("aml-settings",t)}}}function Wt({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null}={}){const u={filter:t,sort:s,limit:r,offset:n};return e.getAll("api-keys",u)},create({id:t="",data:s}){return e.create(`api-keys/${t}`,t,s)},get({id:t}){return e.get(`api-keys/${t}`)},update({id:t,data:s}){return e.put(`api-keys/${t}`,s)},delete({id:t}){return e.delete(`api-keys/${t}`)}}}function Gt({apiHandler:e}){return{get({applicationId:t}){return e.get(`application-instances/${t}`)},upsert({applicationId:t,data:s}){return e.put(`application-instances/${t}`,s)},delete({applicationId:t}){return e.delete(`application-instances/${t}`)},getConfiguration({applicationId:t}){return e.get(`application-instances/${t}/configuration`)},upsertConfiguration({applicationId:t,data:s}){return e.put(`application-instances/${t}/configuration`,s)}}}function Yt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("applications",a)},create({data:t}){return e.post("applications",t)},get({id:t}){return e.get(`applications/${t}`)},getInstances({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`applications/${t}/instances`,n)},getInstance({id:t,organizationId:s}){return e.get(`applications/${t}/instances/${s}`)}}}function Qt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("balance-transactions",u)},get({id:t}){return e.get(`balance-transactions/${t}`)}}}function _t({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("billing-portals",o)},create({id:t="",data:s}){return e.create(`billing-portals/${t}`,t,s)},get({id:t}){return e.get(`billing-portals/${t}`)},update({id:t,data:s}){return e.put(`billing-portals/${t}`,s)},delete({id:t}){return e.delete(`billing-portals/${t}`)}}}function Xt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("blocklists",o)},create({id:t="",data:s}){return e.create(`blocklists/${t}`,t,s)},get({id:t}){return e.get(`blocklists/${t}`)},delete({id:t}){return e.delete(`blocklists/${t}`)}}}function Zt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null}={}){const u={limit:t,offset:s,sort:r,filter:n};return e.getAll("broadcast-messages",u)},create({data:t}){return e.post("broadcast-messages",t)},get({id:t}){return e.get(`broadcast-messages/${t}`)},delete({id:t}){return e.delete(`broadcast-messages/${t}`)},update({id:t,data:s}){return e.patch(`broadcast-messages/${t}`,s)}}}function Ht({apiHandler:e}){return{create({data:t}){return e.post("cashiers",t)},get({id:t}){return e.get(`cashiers/${t}`)}}}function te({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("checkout-forms",o)},create({id:t="",data:s}){return e.create(`checkout-forms/${t}`,t,s)},get({id:t}){return e.get(`checkout-forms/${t}`)},update({id:t,data:s}){return e.put(`checkout-forms/${t}`,s)},delete({id:t}){return e.delete(`checkout-forms/${t}`)}}}function ee({apiHandler:e}){return{getAllRedemptions({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("coupons-redemptions",o)},redeem({data:t}){return e.post("coupons-redemptions",t)},getRedemption({id:t}){return e.get(`coupons-redemptions/${t}`)},cancelRedemption({id:t}){return e.post(`coupons-redemptions/${t}/cancel`)},getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("coupons",o)},create({id:t="",data:s}){return e.create(`coupons/${t}`,t,s)},get({id:t}){return e.get(`coupons/${t}`)},update({id:t,data:s}){return e.put(`coupons/${t}`,s)},setExpiration({id:t,data:s}){return e.post(`coupons/${t}/expiration`,s)}}}const w={Accept:"application/pdf"};function se({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("credit-memos",l)},create({id:t="",data:s}){return e.create(`credit-memos/${t}`,t,s)},get({id:t}){return e.get(`credit-memos/${t}`)},update({id:t,data:s}){return e.put(`credit-memos/${t}`,s)},patch({id:t,data:s}){return e.patch(`credit-memos/${t}`,s)},void({id:t}){return e.post(`credit-memos/${t}/void`)},refund({id:t}){return e.post(`credit-memos/${t}/refund`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`credit-memos/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`credit-memos/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`credit-memos/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`credit-memos/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`credit-memos/${t}`,s)}}}function re({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("custom-domains",o)},create({data:t}){return e.post("custom-domains",t)},get({domain:t}){return e.get(`custom-domains/${t}`)},delete({domain:t}){return e.delete(`custom-domains/${t}`)}}}function ne({apiHandler:e}){return{getAll({resource:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`custom-fields/${t}`,n)},get({resource:t,name:s}){return e.get(`custom-fields/${t}/${s}`)},create({resource:t,name:s,data:r}){return e.put(`custom-fields/${t}/${s}`,r)},update({resource:t,name:s,data:r}){return e.put(`custom-fields/${t}/${s}`,r)}}}function ue({apiHandler:e}){return{getAuthOptions(){return e.get("authentication-options")},updateAuthOptions({data:t}){return e.put("authentication-options",t)},getAllAuthTokens({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("authentication-tokens",r)},login({data:t}){return e.post("authentication-tokens",t)},verify({token:t}){return e.get(`authentication-tokens/${t}`)},logout({token:t}){return e.delete(`authentication-tokens/${t}`)},exchangeToken({token:t,data:s}){return e.post(`authentication-tokens/${t}/exchange`,s)},getAllCredentials({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("credentials",r)},createCredential({id:t="",data:s}){return e.create(`credentials/${t}`,t,s)},getCredential({id:t}){return e.get(`credentials/${t}`)},updateCredential({id:t,data:s}){return e.put(`credentials/${t}`,s)},deleteCredential({id:t}){return e.delete(`credentials/${t}`)},getAllResetPasswordTokens({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("password-tokens",r)},createResetPasswordToken({data:t}){return e.post("password-tokens",t)},getResetPasswordToken({id:t}){return e.get(`password-tokens/${t}`)},deleteResetPasswordToken({id:t}){return e.delete(`password-tokens/${t}`)}}}function oe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("customers",a)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`customers/${t}`,t,s,n)},get({id:t,expand:s=null,fields:r=null}){const n={expand:s,fields:r};return e.get(`customers/${t}`,n)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`customers/${t}`,s,n)},merge({id:t,targetCustomerId:s}){return e.delete(`customers/${t}?targetCustomerId=${s}`)},getLeadSource({id:t}){return e.get(`customers/${t}/lead-source`)},createLeadSource({id:t,data:s}){return e.put(`customers/${t}/lead-source`,s)},updateLeadSource({id:t,data:s}){return e.put(`customers/${t}/lead-source`,s)},deleteLeadSource({id:t}){return e.delete(`customers/${t}/lead-source`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`customers/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`customers/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`customers/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`customers/${t}/timeline/${s}`)},getCustomerCreditBalance({id:t}){return e.get(`customers/${t}/credit-balance`)}}}function le({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("deposit-custom-property-sets",u)},create({id:t="",data:s}){return e.create(`deposit-custom-property-sets/${t}`,t,s)},get({id:t}){return e.get(`deposit-custom-property-sets/${t}`)},update({id:t,data:s}){return e.put(`deposit-custom-property-sets/${t}`,s)},delete({id:t}){return e.delete(`deposit-custom-property-sets/${t}`)}}}function ce({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("deposit-requests",o)},create({data:t}){return e.post("deposit-requests",t)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`deposit-requests/${t}`,r)}}}function ie({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("deposit-strategies",u)},create({id:t="",data:s}){return e.create(`deposit-strategies/${t}`,t,s)},get({id:t}){return e.get(`deposit-strategies/${t}`)},update({id:t,data:s}){return e.put(`deposit-strategies/${t}`,s)},delete({id:t}){return e.delete(`deposit-strategies/${t}`)}}}function ge({apiHandler:e}){return{validate({data:t}){return e.post("digital-wallets/validation",t)},create({data:t}){return e.post("digital-wallets/onboarding/apple-pay",t)}}}function ae({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("disputes",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`disputes/${t}`,t,s,n)},get({id:t}){return e.get(`disputes/${t}`)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`disputes/${t}`,s,n)}}}function me({apiHandler:e}){return{verify({token:t}){return e.put(`email-delivery-setting-verifications/${t}`)},getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("email-delivery-settings",o)},create({data:t}){return e.post("email-delivery-settings",t)},get({id:t}){return e.get(`email-delivery-settings/${t}`)},delete({id:t}){return e.delete(`email-delivery-settings/${t}`)},update({id:t,data:s}){return e.patch(`email-delivery-settings/${t}`,s)},resendVerification({id:t}){return e.post(`email-delivery-settings/${t}/resend-email-verification`)}}}function fe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,q:r=null,sort:n=null,filter:u=null}={}){const o={limit:t,offset:s,q:r,sort:n,filter:u};return e.getAll("email-messages",o)},create({data:t}){return e.post("email-messages",t)},get({id:t}){return e.get(`email-messages/${t}`)},delete({id:t}){return e.delete(`email-messages/${t}`)},send({id:t,data:s={status:"outbox"}}){return e.patch(`email-messages/${t}`,s)}}}function $e({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("email-notifications",r)}}}function pe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null}={}){const u={limit:t,offset:s,filter:r,q:n};return e.getAll("events",u)},get({eventType:t}){return e.get(`events/${t}`)},getRules({eventType:t}){return e.get(`events/${t}/rules`)},createRules({eventType:t,data:s}){return e.put(`events/${t}/rules`,s)},updateRules({eventType:t,data:s}){return e.put(`events/${t}/rules`,s)},getAllTimelineMessages({eventType:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`events/${t}/timeline`,l)},createTimelineComment({eventType:t,data:s}){return e.post(`events/${t}/timeline`,s)},getTimelineMessage({eventType:t,messageId:s}){return e.get(`events/${t}/timeline/${s}`)},deleteTimelineMessage({eventType:t,messageId:s}){return e.delete(`events/${t}/timeline/${s}`)},getRulesHistory({eventType:t,limit:s=null,offset:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return e.getAll(`events/${t}/rules/history`,a)},getRulesVersionNumber({eventType:t,version:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/history/${s}`,n)},getRulesVersionDetail({eventType:t,version:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/versions/${s}`,n)},getAllDraftRulesets({eventType:t,limit:s=null,offset:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return e.getAll(`events/${t}/rules/drafts`,a)},createDraftRuleset({eventType:t,data:s}){return e.post(`events/${t}/rules/drafts`,s)},getDraftRuleset({eventType:t,id:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/drafts/${s}`,n)},updateDraftRuleset({eventType:t,id:s,data:r}){return e.put(`events/${t}/rules/drafts/${s}`,r)},deleteDraftRuleset({eventType:t,id:s}){return e.delete(`events/${t}/rules/drafts/${s}`)}}}function he({apiHandler:e}){return{get({resource:t,resourceId:s,service:r}){return e.get(`${t}/${s}/external-identifiers/${r}`)},sync({resource:t,resourceId:s,service:r}){return e.post(`${t}/${s}/external-identifiers/${r}`)},update({resource:t,resourceId:s,service:r,data:n}){return e.put(`${t}/${s}/external-identifiers/${r}`,n)},delete({resource:t,resourceId:s,service:r}){return e.delete(`${t}/${s}/external-identifiers/${r}`)}}}function ye({apiHandler:e}){return{getExternalServiceSettings(){return e.get("external-services-settings")},updateExternalServiceSettings({data:t}){return e.put("external-services-settings",t)}}}function Ae({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("fees",u)},create({id:t="",data:s}){return e.create(`fees/${t}`,t,s)},get({id:t}){return e.get(`fees/${t}`)},upsert({id:t,data:s}){return e.put(`fees/${t}`,s)},delete({id:t}){return e.delete(`fees/${t}`)},patch({id:t,data:s}){return e.patch(`fees/${t}`,s)}}}function Re({apiHandler:e}){return{getAllAttachments({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("attachments",a)},attach({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`attachments/${t}`,t,s,n)},getAttachment({id:t}){return e.get(`attachments/${t}`)},updateAttachment({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`attachments/${t}`,s,n)},detach({id:t}){return e.delete(`attachments/${t}`)},getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,fields:u=null,sort:o=null}={}){const l={limit:t,offset:s,filter:r,q:n,fields:u,sort:o};return e.getAll("files",l)},upload({fileObject:t}){return e.post("files",t)},get({id:t}){return e.get(`files/${t}`)},update({id:t,data:s}){return e.put(`files/${t}`,s)},delete({id:t}){return e.delete(`files/${t}`)},download({id:t}){const s={responseType:"arraybuffer"};return e.download(`files/${t}/download`,s)},detachAndDelete({id:t}){const s={filter:`fileId:${t}`};let r=[];const u=(async()=>{const o=this.getAllAttachments(s);r.push(o);const a=(await o).items.map(v=>this.detach({id:v.fields.id}));r=[...r,a],await Promise.all(a);const p=e.delete(`files/${t}`);return r.push(p),p})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:t,data:s={description:"",tags:[""]}}){const r=[],u=(async()=>{const o=this.upload({fileObject:t});r.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return r.push(a),a})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u}}}function be({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,fields:o=null}={}){const l={limit:t,offset:s,sort:r,filter:n,q:u,fields:o};return e.getAll("gateway-accounts",l)},create({id:t="",data:s}){return e.create(`gateway-accounts/${t}`,t,s)},get({id:t}){return e.get(`gateway-accounts/${t}`)},upsert({id:t,data:s}){return e.put(`gateway-accounts/${t}`,s)},delete({id:t}){return e.delete(`gateway-accounts/${t}`)},update({id:t,data:s}){return e.patch(`gateway-accounts/${t}`,s)},close({id:t}){return e.post(`gateway-accounts/${t}/close`)},disable({id:t}){return e.post(`gateway-accounts/${t}/disable`)},getAllDowntimeSchedules({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null}){const o={limit:s,offset:r,filter:n,sort:u};return e.getAll(`gateway-accounts/${t}/downtime-schedules`,o)},createDowntimeSchedule({id:t,data:s}){return e.post(`gateway-accounts/${t}/downtime-schedules`,s)},getDowntimeSchedule({id:t,downtimeId:s}){return e.get(`gateway-accounts/${t}/downtime-schedules/${s}`)},updateDowntimeSchedule({id:t,downtimeId:s,data:r}){return e.put(`gateway-accounts/${t}/downtime-schedules/${s}`,r)},deleteDowntimeSchedule({id:t,downtimeId:s}){return e.delete(`gateway-accounts/${t}/downtime-schedules/${s}`)},enable({id:t}){return e.post(`gateway-accounts/${t}/enable`)},getAllVolumeLimits({id:t}){return e.getAll(`gateway-accounts/${t}/limits`)},getVolumeLimit({id:t,limitId:s}){return e.get(`gateway-accounts/${t}/limits/${s}`)},updateVolumeLimit({id:t,limitId:s,data:r}){return e.put(`gateway-accounts/${t}/limits/${s}`,r)},deleteVolumeLimit({id:t,limitId:s}){return e.delete(`gateway-accounts/${t}/limits/${s}`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`gateway-accounts/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`gateway-accounts/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`gateway-accounts/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`gateway-accounts/${t}/timeline/${s}`)},checkCredentials({id:t}){return e.post(`gateway-accounts/${t}/check-credentials`)},getFinancialSettings({id:t}){return e.get(`gateway-accounts/${t}/financial-settings`)},setFinancialSettings({id:t,data:s}){return e.put(`gateway-accounts/${t}/financial-settings`,s)}}}function we({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("integrations",r)},get({label:t}){return e.get(`integrations/${t}`)}}}function ke({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("invoices",l)},create({id:t="",data:s}){return e.create(`invoices/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`invoices/${t}`,r)},update({id:t,data:s}){return e.put(`invoices/${t}`,s)},getAllInvoiceItems({id:t,limit:s=null,offset:r=null,expand:n=null}){const u={limit:s,offset:r,expand:n};return e.getAll(`invoices/${t}/items`,u)},createInvoiceItem({id:t,data:s}){return e.post(`invoices/${t}/items`,s)},getInvoiceItem({id:t,itemId:s}){return e.get(`invoices/${t}/items/${s}`)},updateInvoiceItem({id:t,itemId:s,data:r}){return e.put(`invoices/${t}/items/${s}`,r)},deleteInvoiceItem({id:t,itemId:s}){return e.delete(`invoices/${t}/items/${s}`)},issue({id:t,data:s}){return e.post(`invoices/${t}/issue`,s)},abandon({id:t}){return e.post(`invoices/${t}/abandon`)},void({id:t}){return e.post(`invoices/${t}/void`)},recalculate({id:t}){return e.post(`invoices/${t}/recalculate`)},reissue({id:t,data:s}){return e.post(`invoices/${t}/reissue`,s)},getAllTransactionAllocations({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`invoices/${t}/transaction-allocations`,n)},allocateCreditBalance({id:t,data:s}){return e.post(`invoices/${t}/allocate-credit-balance`,s)},applyTransaction({id:t,data:s}){return e.post(`invoices/${t}/transaction`,s)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`invoices/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`invoices/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`invoices/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`invoices/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`invoices/${t}`,s)}}}function ve({apiHandler:e}){return{getAllAccounts({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("journal-accounts",u)},createAccount({id:t="",data:s}){return e.create(`journal-accounts/${t}`,t,s)},getAccount({id:t}){return e.get(`journal-accounts/${t}`)},updateAccount({id:t,data:s}){return e.put(`journal-accounts/${t}`,s)}}}function de({apiHandler:e}){return{getAllEntries({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("journal-entries",u)},createEntry({id:t="",data:s}){return e.create(`journal-entries/${t}`,t,s)},getEntry({id:t}){return e.get(`journal-entries/${t}`)},updateEntry({id:t,data:s}){return e.put(`journal-entries/${t}`,s)}}}function qe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("journal-records",o)},create({id:t="",data:s}){return e.create(`journal-records/${t}`,t,s)},get({id:t}){return e.get(`journal-records/${t}`)},update({id:t,data:s}){return e.put(`journal-records/${t}`,s)},delete({id:t}){return e.delete(`journal-records/${t}`)}}}function Te({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("kyc-documents",o)},create({id:t="",data:s}){return e.create(`kyc-documents/${t}`,t,s)},get({id:t}){return e.get(`kyc-documents/${t}`)},update({id:t,data:s}){return e.put(`kyc-documents/${t}`,s)},accept({id:t}){return e.post(`kyc-documents/${t}/acceptance`)},matches({id:t,data:s}){return e.post(`kyc-documents/${t}/matches`,s)},reject({id:t,data:s}){return e.post(`kyc-documents/${t}/rejection`,s)},review({id:t}){return e.post(`kyc-documents/${t}/review`)},startReview({id:t}){return e.post(`kyc-documents/${t}/start-review`)},stopReview({id:t}){return e.post(`kyc-documents/${t}/stop-review`)}}}function Ie({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("kyc-requests",o)},create({data:t}){return e.post("kyc-requests",t)},get({id:t}){return e.get(`kyc-requests/${t}`)},delete({id:t}){return e.delete(`kyc-requests/${t}`)},update({id:t,data:s}){return e.patch(`kyc-requests/${t}`,s)}}}function Se({apiHandler:e}){return{getKycSettings(){return e.get("kyc-settings")},updateKycSettings({data:t}){return e.put("kyc-settings",t)}}}function Ee({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,fields:u=null,q:o=null}={}){const l={limit:t,offset:s,filter:r,sort:n,fields:u,q:o};return e.getAll("lists",l)},create({id:t="",data:s}){return e.create(`lists/${t}`,t,s)},getLatestVersion({id:t}){return e.get(`lists/${t}`)},update({id:t,data:s}){return e.put(`lists/${t}`,s)},delete({id:t}){return e.delete(`lists/${t}`)},getByVersion({id:t,version:s}){return e.get(`lists/${t}/${s}`)}}}function Pe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("memberships",u)},get({organizationId:t,userId:s}){return e.get(`memberships/${t}/${s}`)},update({organizationId:t,userId:s,data:r}){return e.put(`memberships/${t}/${s}`,r)},delete({organizationId:t,userId:s}){return e.delete(`memberships/${t}/${s}`)}}}function xe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-cancellations",u)},create({id:t="",data:s}){return e.create(`order-cancellations/${t}`,t,s)},get({id:t}){return e.get(`order-cancellations/${t}`)},update({id:t,data:s}){return e.put(`order-cancellations/${t}`,s)},delete({id:t}){return e.delete(`order-cancellations/${t}`)},patch({id:t,data:s}){return e.patch(`order-cancellations/${t}`,s)}}}function Ce({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-pauses",u)},pause({id:t="",data:s}){return e.create(`order-pauses/${t}`,t,s)},get({id:t}){return e.get(`order-pauses/${t}`)},update({id:t,data:s}){return e.put(`order-pauses/${t}`,s)},delete({id:t}){return e.delete(`order-pauses/${t}`)}}}function De({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-reactivations",u)},reactivate({data:t}){return e.post("order-reactivations",t)},get({id:t}){return e.get(`order-reactivations/${t}`)}}}function je({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("orders",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`orders/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`orders/${t}`,s,n)},getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}/upcoming-invoice`,r)},void({id:t}){return e.post(`orders/${t}/void`)},changeItems({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`orders/${t}/change-items`,s,n)},updateItem({id:t,itemId:s,data:r}){return e.patch(`orders/${t}/items/${s}`,r)},createInterimInvoice({id:t,data:s}){return e.post(`orders/${t}/interim-invoice`,s)},issueEarlyUpcomingInvoice({id:t,data:s}){return e.post(`orders/${t}/upcoming-invoice/issue`,s)}}}function Me({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("organization-exports",o)},create({data:t}){return e.post("organization-exports",t)},get({id:t}){return e.get(`organization-exports/${t}`)}}}function Oe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("organizations",o)},create({data:t}){return e.post("organizations",t)},get({id:t}){return e.get(`organizations/${t}`)},update({id:t,data:s}){return e.patch(`organizations/${t}`,s)}}}function Fe({apiHandler:e}){return{getAll({limit:t=null,q:s=null}={}){const r={limit:t,q:s};return e.getAll("payment-cards-bank-names",r)}}}function Be({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("payment-instruments",l)},create({data:t}){return e.post("payment-instruments",t)},get({id:t}){return e.get(`payment-instruments/${t}`)},update({id:t,data:s}){return e.patch(`payment-instruments/${t}`,s)},deactivate({id:t}){return e.post(`payment-instruments/${t}/deactivation`)},nameInquiry({id:t,data:s}){return e.post(`payment-instruments/${t}/name-inquiry`,s)}}}function Ke({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("payment-methods",r)},get({apiName:t}){return e.get(`payment-methods/${t}`)}}}function Ne({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("tokens",r)},create({data:t}){return e.post("tokens",t)},get({token:t}){return e.get(`tokens/${t}`)}}}function Le({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-request-allocations",u)},create({data:t}){return e.post("payout-request-allocations",t)},autoAllocate({data:t}){return e.post("payout-request-allocations/auto",t)},get({id:t}){return e.get(`payout-request-allocations/${t}`)},update({id:t,data:s}){return e.patch(`payout-request-allocations/${t}`,s)},process({data:t}){return e.post("payout-request-allocations/process",t)}}}function ze({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-request-batches",u)},create({data:t}){return e.post("payout-request-batches",t)},get({id:t}){return e.get(`payout-request-batches/${t}`)},patch({id:t,data:s}){return e.patch(`payout-request-batches/${t}`,s)},autoAllocate({id:t}){return e.post(`payout-request-batches/${t}/auto-allocate`)},approve({id:t}){return e.post(`payout-request-batches/${t}/approve`)},block({id:t,data:s}){return e.post(`payout-request-batches/${t}/block`,s)},preview({filter:t=null}){const s={filter:t};return e.get("payout-request-batches/preview",s)}}}function Ue({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-requests",u)},create({id:t="",data:s}){return e.create(`payout-requests/${t}`,t,s)},get({id:t}){return e.get(`payout-requests/${t}`)},update({id:t,data:s}){return e.put(`payout-requests/${t}`,s)},patch({id:t,data:s}){return e.patch(`payout-requests/${t}`,s)},cancel({id:t,data:s}){return e.post(`payout-requests/${t}/cancel`,s)},split({id:t,data:s}){return e.post(`payout-requests/${t}/split`,s)},getPaymentInstruments({id:t}){return e.get(`payout-requests/${t}/payment-instruments`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`payout-requests/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`payout-requests/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`payout-requests/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`payout-requests/${t}/timeline/${s}`)}}}function Ve({apiHandler:e}){return{create({data:t}){return e.post("payouts",t)}}}function Je({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("plans",o)},create({id:t="",data:s}){return e.create(`plans/${t}`,t,s)},get({id:t}){return e.get(`plans/${t}`)},update({id:t,data:s}){return e.put(`plans/${t}`,s)},delete({id:t}){return e.delete(`plans/${t}`)}}}function We({apiHandler:e}){return{order({data:t}){return e.post("previews/orders",t)},sendEmailRuleAction({data:t}){return e.post("previews/rule-actions/send-email",t)},webhook({data:t}){return e.post("previews/webhooks",t)}}}function Ge({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("products",o)},create({id:t="",data:s}){return e.create(`products/${t}`,t,s)},get({id:t}){return e.get(`products/${t}`)},update({id:t,data:s}){return e.put(`products/${t}`,s)},delete({id:t}){return e.delete(`products/${t}`)}}}function Ye({apiHandler:e}){return{startPermissionsEmulation({data:t}){return e.post("permissions-emulation",t)},stopPermissionsEmulation(){return e.delete("permissions-emulation")},get(){return e.get("profile")},update({data:t}){return e.put("profile",t)},getMfa(){return e.get("profile/mfa")},updateMfa(){return e.post("profile/mfa")},deleteMfa(){return e.delete("profile/mfa")},getDashboard(){return e.get("profile/dashboard")},updateDashboard({data:t}){return e.put("profile/dashboard",t)},getDashboardMetricReport({metric:t,periodStart:s,periodEnd:r}){const n={periodStart:s,periodEnd:r};return e.get(`profile/dashboard/metrics/${t}`,n)}}}function Qe({apiHandler:e}){return{readyToPay({data:t}){return e.post("ready-to-pay",t)}}}function _e({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,expand:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,expand:u};return e.getAll("quotes",o)},create({id:t="",data:s}){return e.create(`quotes/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`quotes/${t}`,r)},update({id:t,data:s}){return e.put(`quotes/${t}`,s)},patch({id:t,data:s}){return e.patch(`quotes/${t}`,s)},accept({id:t}){return e.post(`quotes/${t}/accept`)},cancel({id:t}){return e.post(`quotes/${t}/cancel`)},issue({id:t}){return e.post(`quotes/${t}/issue`)},recall({id:t}){return e.post(`quotes/${t}/recall`)},reject({id:t}){return e.post(`quotes/${t}/reject`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`quotes/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`quotes/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`quotes/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`quotes/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`quotes/${t}`,s)}}}function Xe({apiHandler:e}){return{get({resource:t,resourceId:s,service:r}){return e.get(`${t}/${s}/external-identifiers/${r}`)},sync({resource:t,resourceId:s,service:r}){return e.post(`${t}/${s}/external-identifiers/${r}`)},update({resource:t,resourceId:s,service:r,data:n}){return e.put(`${t}/${s}/external-identifiers/${r}`,n)},delete({resource:t,resourceId:s,service:r}){return e.delete(`${t}/${s}/external-identifiers/${r}`)}}}function Ze({apiHandler:e}){return{getAll(){return e.get("risk-score-rules")},updateRiskScoreRules({data:t}){return e.put("risk-score-rules",t)},getAllBlocklistRules(){return e.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:t}){return e.put("risk-score-rules/blocklists",t)}}}function He({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null,expand:o=null}={}){const l={limit:t,offset:s,filter:r,sort:n,q:u,expand:o};return e.getAll("roles",l)},create({id:t="",data:s}){return e.create(`roles/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`roles/${t}`,r)},update({id:t,data:s}){return e.put(`roles/${t}`,s)},delete({id:t}){return e.delete(`roles/${t}`)}}}function ts({apiHandler:e}){return{get({sort:t=null,limit:s=null,offset:r=null,q:n=null}){const u={sort:t,limit:s,offset:r,q:n};return e.get("search",u)}}}function es({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("grid-segments",o)},create({id:t="",data:s}){return e.create(`grid-segments/${t}`,t,s)},get({id:t}){return e.get(`grid-segments/${t}`)},update({id:t,data:s}){return e.put(`grid-segments/${t}`,s)},delete({id:t}){return e.delete(`grid-segments/${t}`)}}}function ss({apiHandler:e}){return{getAll({eventType:t}){return e.getAll(`send-through-attribution/${t}`)}}}function rs({apiHandler:e}){return{getAll({type:t,filter:s=null,limit:r=null,offset:n=null,sort:u=null,q:o=null}){const l={filter:s,limit:r,offset:n,sort:u,q:o};return e.getAll(`service-credentials/${t}`,l)},create({type:t,data:s}){return e.post(`service-credentials/${t}`,s)},get({type:t,id:s}){return e.get(`service-credentials/${t}/${s}`)},update({type:t,id:s,data:r}){return e.patch(`service-credentials/${t}/${s}`,r)},getItems({type:t,id:s,limit:r=null,offset:n=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const p={limit:r,offset:n,filter:u,q:o,fields:l,sort:a};return e.getAll(`service-credentials/${t}/${s}/items`,p)}}}function ns({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("shipping-rates",o)},create({id:t="",data:s}){return e.create(`shipping-rates/${t}`,t,s)},get({id:t}){return e.get(`shipping-rates/${t}`)},update({id:t,data:s}){return e.put(`shipping-rates/${t}`,s)},delete({id:t}){return e.delete(`shipping-rates/${t}`)}}}function us({apiHandler:e}){return{get(){return e.get("status")}}}function os({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-cancellations",u)},create({id:t="",data:s}){return e.create(`subscription-cancellations/${t}`,t,s)},get({id:t}){return e.get(`subscription-cancellations/${t}`)},delete({id:t}){return e.delete(`subscription-cancellations/${t}`)},patch({id:t,data:s}){return e.patch(`subscription-cancellations/${t}`,s)}}}function ls({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-pauses",u)},pause({id:t="",data:s}){return e.create(`subscription-pauses/${t}`,t,s)},get({id:t}){return e.get(`subscription-pauses/${t}`)},update({id:t,data:s}){return e.put(`subscription-pauses/${t}`,s)},delete({id:t}){return e.delete(`subscription-pauses/${t}`)}}}function cs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-reactivations",u)},reactivate({data:t}){return e.post("subscription-reactivations",t)},get({id:t}){return e.get(`subscription-reactivations/${t}`)}}}function is({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("subscriptions",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`subscriptions/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`subscriptions/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`subscriptions/${t}`,s,n)},delete({id:t}){return e.delete(`subscriptions/${t}`)},void({id:t}){return e.post(`subscriptions/${t}/void`)},changeItems({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`subscriptions/${t}/change-items`,s,n)},updateItem({id:t,itemId:s,data:r}){return e.patch(`subscriptions/${t}/items/${s}`,r)},createInterimInvoice({id:t,data:s}){return e.post(`subscriptions/${t}/interim-invoice`,s)},getAllUpcomingInvoices({id:t,expand:s=null}){const r={expand:s};return e.getAll(`subscriptions/${t}/upcoming-invoices`,r)},getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`subscriptions/${t}/upcoming-invoice`,r)},issueEarlyUpcomingInvoice({id:t,data:s}){return e.post(`subscriptions/${t}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:t,invoiceId:s,data:r}){return e.post(`subscriptions/${t}/upcoming-invoices/${s}/issue`,r)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`subscriptions/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`subscriptions/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`subscriptions/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`subscriptions/${t}/timeline/${s}`)}}}function gs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("tags",o)},create({data:t}){return e.post("tags",t)},get({tag:t}){return e.get(`tags/${t}`)},delete({tag:t}){return e.delete(`tags/${t}`)},update({tag:t,data:s}){return e.patch(`tags/${t}`,s)},tagCustomers({tag:t,data:s}){return e.post(`tags/${t}/customers`,s)},untagCustomers({tag:t,data:s}){return e.delete(`tags/${t}/customers`,s)},tagCustomer({tag:t,customerId:s}){return e.post(`tags/${t}/customers/${s}`)},untagCustomer({tag:t,customerId:s}){return e.delete(`tags/${t}/customers/${s}`)},tagKycDocuments({tag:t,data:s}){return e.post(`tags/${t}/kyc-documents`,s)},untagKycDocuments({tag:t,data:s}){return e.delete(`tags/${t}/kyc-documents`,s)},tagKycDocument({tag:t,kycDocumentId:s}){return e.post(`tags/${t}/kyc-documents/${s}`)},untagKycDocument({tag:t,kycDocumentId:s}){return e.delete(`tags/${t}/kyc-documents/${s}`)},tagAmlChecks({tag:t,data:s}){return e.post(`tags/${t}/aml-checks`,s)},untagAmlChecks({tag:t,data:s}){return e.delete(`tags/${t}/aml-checks`,s)},tagAmlCheck({tag:t,amlCheckId:s}){return e.post(`tags/${t}/aml-checks/${s}`)},untagAmlCheck({tag:t,amlCheckId:s}){return e.delete(`tags/${t}/aml-checks/${s}`)}}}function as({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tags-rules",o)},create({id:t="",data:s}){return e.create(`tags-rules/${t}`,t,s)},get({id:t}){return e.get(`tags-rules/${t}`)},update({id:t,data:s}){return e.put(`tags-rules/${t}`,s)},delete({id:t}){return e.delete(`tags-rules/${t}`)}}}function ms({apiHandler:e}){return{getAllApiLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,expand:o=null}={}){const l={limit:t,offset:s,sort:r,filter:n,q:u,expand:o};return e.getAll("tracking/api",l)},getApiLog({id:t}){return e.get(`tracking/api/${t}`)},getAllTaxTrackingLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/taxes",o)},getTaxTrackingLog({id:t}){return e.get(`tracking/taxes/${t}`)},getAllListsChangesHistory({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:t}){return e.get(`tracking/webhooks/${t}`)},resendWebhook({id:t}){return e.post(`tracking/webhooks/${t}/resend`)}}}function fs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null,expand:o=null}={}){const l={limit:t,offset:s,filter:r,q:n,sort:u,expand:o};return e.getAll("transactions",l)},create({data:t,expand:s=null}){const r={expand:s};return e.post("transactions",t,r)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`transactions/${t}`,r)},patch({id:t,data:s}){return e.patch(`transactions/${t}`,s)},query({id:t}){return e.post(`transactions/${t}/query`)},update({id:t,data:s}){return e.post(`transactions/${t}/update`,s)},refund({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`transactions/${t}/refund`,s,n)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`transactions/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`transactions/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`transactions/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`transactions/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`transactions/${t}`,s)}}}function $s({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("usages",o)},create({data:t}){return e.post("usages",t)},get({id:t}){return e.get(`usages/${t}`)},delete({id:t}){return e.delete(`usages/${t}`)}}}function ps({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("users",o)},create({id:t="",data:s}){return e.create(`users/${t}`,t,s)},get({id:t}){return e.get(`users/${t}`)},update({id:t,data:s}){return e.put(`users/${t}`,s)},getMfa({id:t}){return e.get(`users/${t}/mfa`)}}}function hs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null}={}){const n={limit:t,offset:s,filter:r};return e.getAll("webhooks",n)},create({id:t="",data:s}){return e.create(`webhooks/${t}`,t,s)},get({id:t}){return e.get(`webhooks/${t}`)},update({id:t,data:s}){return e.put(`webhooks/${t}`,s)},delete({id:t}){return e.delete(`webhooks/${t}`)}}}function ys({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,q:r=null,filter:n=null,sort:u=null}={}){const o={limit:t,offset:s,q:r,filter:n,sort:u};return e.getAll("websites",o)},create({id:t="",data:s}){return e.create(`websites/${t}`,t,s)},get({id:t}){return e.get(`websites/${t}`)},update({id:t,data:s}){return e.put(`websites/${t}`,s)},delete({id:t}){return e.delete(`websites/${t}`)}}}class As{constructor({apiHandler:t}){this.accountRegistrationSettings=Lt({apiHandler:t}),this.account=zt({apiHandler:t}),this.allowlists=Ut({apiHandler:t}),this.amlChecks=Vt({apiHandler:t}),this.amlSettings=Jt({apiHandler:t}),this.apiKeys=Wt({apiHandler:t}),this.applicationInstances=Gt({apiHandler:t}),this.applications=Yt({apiHandler:t}),this.balanceTransactions=Qt({apiHandler:t}),this.billingPortals=_t({apiHandler:t}),this.blocklists=Xt({apiHandler:t}),this.broadcastMessages=Zt({apiHandler:t}),this.cashiers=Ht({apiHandler:t}),this.checkoutForms=te({apiHandler:t}),this.coupons=ee({apiHandler:t}),this.creditMemos=se({apiHandler:t}),this.customDomains=re({apiHandler:t}),this.customFields=ne({apiHandler:t}),this.customerAuthentication=ue({apiHandler:t}),this.customers=oe({apiHandler:t}),this.depositCustomPropertySets=le({apiHandler:t}),this.depositRequests=ce({apiHandler:t}),this.depositStrategies=ie({apiHandler:t}),this.digitalWallets=ge({apiHandler:t}),this.disputes=ae({apiHandler:t}),this.emailDeliverySettings=me({apiHandler:t}),this.emailMessages=fe({apiHandler:t}),this.emailNotifications=$e({apiHandler:t}),this.events=pe({apiHandler:t}),this.externalIdentifiers=he({apiHandler:t}),this.externalServicesSettings=ye({apiHandler:t}),this.fees=Ae({apiHandler:t}),this.files=Re({apiHandler:t}),this.gatewayAccounts=be({apiHandler:t}),this.integrations=we({apiHandler:t}),this.invoices=ke({apiHandler:t}),this.journalAccounts=ve({apiHandler:t}),this.journalEntries=de({apiHandler:t}),this.journalRecords=qe({apiHandler:t}),this.kycDocuments=Te({apiHandler:t}),this.kycRequests=Ie({apiHandler:t}),this.kycSettings=Se({apiHandler:t}),this.lists=Ee({apiHandler:t}),this.memberships=Pe({apiHandler:t}),this.orderCancellations=xe({apiHandler:t}),this.orderPauses=Ce({apiHandler:t}),this.orderReactivations=De({apiHandler:t}),this.orders=je({apiHandler:t}),this.organizationExports=Me({apiHandler:t}),this.organizations=Oe({apiHandler:t}),this.paymentCardsBankNames=Fe({apiHandler:t}),this.paymentInstruments=Be({apiHandler:t}),this.paymentMethods=Ke({apiHandler:t}),this.paymentTokens=Ne({apiHandler:t}),this.payoutRequestAllocations=Le({apiHandler:t}),this.payoutRequestBatches=ze({apiHandler:t}),this.payoutRequests=Ue({apiHandler:t}),this.payouts=Ve({apiHandler:t}),this.plans=Je({apiHandler:t}),this.previews=We({apiHandler:t}),this.products=Ge({apiHandler:t}),this.profile=Ye({apiHandler:t}),this.purchase=Qe({apiHandler:t}),this.quotes=_e({apiHandler:t}),this.resource=Xe({apiHandler:t}),this.riskScoreRules=Ze({apiHandler:t}),this.roles=He({apiHandler:t}),this.search=ts({apiHandler:t}),this.segments=es({apiHandler:t}),this.sendThroughAttribution=ss({apiHandler:t}),this.serviceCredentials=rs({apiHandler:t}),this.shippingRates=ns({apiHandler:t}),this.status=us({apiHandler:t}),this.subscriptionCancellations=os({apiHandler:t}),this.subscriptionPauses=ls({apiHandler:t}),this.subscriptionReactivations=cs({apiHandler:t}),this.subscriptions=is({apiHandler:t}),this.tags=gs({apiHandler:t}),this.tagsRules=as({apiHandler:t}),this.tracking=ms({apiHandler:t}),this.transactions=fs({apiHandler:t}),this.usages=$s({apiHandler:t}),this.users=ps({apiHandler:t}),this.webhooks=hs({apiHandler:t}),this.websites=ys({apiHandler:t}),this.addRequestInterceptor=t.addRequestInterceptor,this.removeRequestInterceptor=t.removeRequestInterceptor,this.addResponseInterceptor=t.addResponseInterceptor,this.removeResponseInterceptor=t.removeResponseInterceptor,this.setTimeout=t.setTimeout,this.setProxyAgent=t.setProxyAgent,this.setSessionToken=t.setSessionToken,this.setPublishableKey=t.setPublishableKey,this.setEndpoints=t.setEndpoints,this.getCancellationToken=t.getCancellationToken,this.generateSignature=t.generateSignature}}function Rs({apiHandler:e}){return{getCustomerLifetimeSummaryMetrics({customerId:t}){return e.get(`customers/${t}/summary-metrics`)}}}function bs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,expand:n=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:t,offset:s,sort:r,expand:n,filter:u,q:o,criteria:l};return e.getAll("data-exports",a)},queue({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`data-exports/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`data-exports/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`data-exports/${t}`,s,n)},delete({id:t}){return e.delete(`data-exports/${t}`)}}}function ws({apiHandler:e}){return{getAmlCheckHistogramReport({periodStart:t=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationPeriod:r,metric:n,includePropagatedResults:u,filter:o};return e.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:t=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,filter:u=null}){const o={periodStart:t,periodEnd:s,aggregationPeriod:r,metric:n,filter:u};return e.get("histograms/transactions",o)}}}function ks({apiHandler:e}){return{getApiLogSummary({periodStart:t=null,periodEnd:s=null,filter:r=null,limit:n=null,offset:u=null}){const o={periodStart:t,periodEnd:s,filter:r,limit:n,offset:u};return e.get("reports/api-log-summary",o)},getAmlChecks({periodStart:t=null,periodEnd:s=null,metric:r=null,includePropagatedResults:n=null,filter:u=null}){const o={periodStart:t,periodEnd:s,metric:r,includePropagatedResults:n,filter:u};return e.get("reports/aml-checks",o)},getAmlChecksInheritedSummary({periodStart:t=null,periodEnd:s=null,filter:r=null}){const n={periodStart:t,periodEnd:s,filter:r};return e.get("reports/aml-checks-inherited-summary",n)},getCumulativeSubscriptions({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:t=null,periodEnd:s=null,metrics:r=null,segments:n=null}){const u={periodStart:t,periodEnd:s,metrics:r,segments:n};return e.get("reports/dashboard",u)},getDccMarkup({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/declined-transactions",l)},getDeferredRevenue({currency:t=null,asOfDate:s=null,limit:r=null,offset:n=null,filter:u=null}){const o={currency:t,asOfDate:s,limit:r,offset:n,filter:u};return e.get("reports/deferred-revenue",o)},getDisputes({aggregationField:t=null,periodMonth:s=null,limit:r=null,offset:n=null,filter:u=null}){const o={aggregationField:t,periodMonth:s,limit:r,offset:n,filter:u};return e.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:t,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null}){const o={periodStart:s,periodEnd:r,limit:n,offset:u};return e.get(`reports/events-triggered/${t}/rules`,o)},getFutureRenewals({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/future-renewals",u)},getJournal({currency:t=null,bookedFrom:s=null,bookedTo:r=null,recognizedAt:n=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:a=null}){const p={currency:t,bookedFrom:s,bookedTo:r,recognizedAt:n,aggregationField:u,limit:o,offset:l,filter:a};return e.get("reports/journal",p)},getJournalSummary({periodStart:t=null,periodEnd:s=null,currency:r=null,aggregationField:n=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:t,periodEnd:s,currency:r,aggregationField:n,amountField:u,journalAccountIds:o};return e.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-acceptance-summary",r)},getKycRejectionSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-rejection-summary",r)},getKycRequestSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-request-summary",r)},getMonthlyRecurringRevenue({currency:t,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={currency:t,periodStart:s,periodEnd:r,limit:n,offset:u};return e.get("reports/monthly-recurring-revenue",o)},getAnnualRecurringRevenue({currency:t,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={currency:t,periodStart:s,periodEnd:r,limit:n,offset:u};return e.get("reports/annual-recurring-revenue",o)},getRenewalSales({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:t=null,aggregationPeriod:s=null,includeSwitchedSubscriptions:r=null,periodStart:n=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:a=null,criteria:p=null}){const v={aggregationField:t,aggregationPeriod:s,includeSwitchedSubscriptions:r,periodStart:n,periodEnd:u,limit:o,offset:l,filter:a,criteria:p};return e.get("reports/retention-percentage",v)},getRetentionValue({aggregationField:t=null,aggregationPeriod:s=null,includeRefunds:r=null,includeDisputes:n=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:a=null,filter:p=null,sort:v=null,criteria:D=null}){const j={aggregationField:t,aggregationPeriod:s,includeRefunds:r,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:a,filter:p,sort:v,criteria:D};return e.get("reports/retention-value",j)},getRevenueWaterfall({currency:t,issuedFrom:s=null,issuedTo:r=null,recognizedTo:n=null}){const u={currency:t,issuedFrom:s,issuedTo:r,recognizedTo:n};return e.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:t=null,periodEnd:s=null,aggregationField:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return e.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/subscription-renewal",u)},getTax({periodStart:t=null,periodEnd:s=null,accountingMethod:r=null,limit:n=null,offset:u=null}){const o={periodStart:t,periodEnd:s,accountingMethod:r,limit:n,offset:u};return e.get("reports/tax",o)},getTimeSeriesTransaction({type:t=null,subaggregate:s=null,periodStart:r=null,periodEnd:n=null,limit:u=null,offset:o=null}){const l={type:t,subaggregate:s,periodStart:r,periodEnd:n,limit:u,offset:o};return e.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:t=null,periodEnd:s=null,aggregationField:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return e.get("reports/transactions",l)}}}function vs({apiHandler:e}){return{getSubscriptionSummaryMetrics({subscriptionId:t}){return e.get(`subscriptions/${t}/summary-metrics`)}}}function ds({apiHandler:e}){return{getActivityFeed({eventTypes:t=null,limit:s=1e3,offset:r=0}){const n={eventTypes:t,limit:s,offset:r};return e.getAll("activity-feed",n)},getTransaction({id:t="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return e.getAll(`transactions/${t}/timeline`,u)},getCustomer({id:t="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return e.getAll(`customers/${t}/timeline`,u)}}}function qs({apiHandler:e}){return{query(){return e.get("location")}}}const k={CustomersResource:Rs,DataExportsResource:bs,HistogramsResource:ws,ReportsResource:ks,SubscriptionsResource:vs,TimelinesResource:ds,LocationResource:qs};class Ts{constructor({apiHandler:t}){this.customers=k.CustomersResource({apiHandler:t}),this.dataExports=k.DataExportsResource({apiHandler:t}),this.histograms=k.HistogramsResource({apiHandler:t}),this.reports=k.ReportsResource({apiHandler:t}),this.subscriptions=k.SubscriptionsResource({apiHandler:t}),this.timelines=k.TimelinesResource({apiHandler:t}),this.location=k.LocationResource({apiHandler:t}),this.addRequestInterceptor=t.addRequestInterceptor,this.removeRequestInterceptor=t.removeRequestInterceptor,this.addResponseInterceptor=t.addResponseInterceptor,this.removeResponseInterceptor=t.removeResponseInterceptor,this.setTimeout=t.setTimeout,this.setProxyAgent=t.setProxyAgent,this.setSessionToken=t.setSessionToken,this.setEndpoints=t.setEndpoints,this.getCancellationToken=t.getCancellationToken}}function Is({apiHandler:e}){return{get({expand:t=null}={}){const s={expand:t};return e.get("account",s)},update({data:t}){return e.patch("account",t)},requestPasswordReset({data:t}){return e.post("account/forgot-password",t)},changePassword({data:t}){return e.patch("account/password",t)},resendEmailVerification({data:t}){return e.post("account/resend-verification",t)},confirmPasswordReset({token:t,data:s}){return e.post(`account/reset-password/${t}`,s)},verifyEmail({token:t}){return e.post(`account/verification/${t}`)},register({data:t}){return e.post("register",t)}}}function Ss({apiHandler:e}){return{login({data:t}){return e.post("login",t)},logout(){return e.post("logout")}}}function Es({apiHandler:e}){return{get({slug:t}){return e.get(`billing-portals/${t}`)}}}function Ps({apiHandler:e}){return{get({id:t}){return e.get(`cashiers/${t}`)},cancelPayoutRequests({id:t,data:s}){return e.post(`cashiers/${t}/cancel-payout-requests`,s)}}}function xs({apiHandler:e}){return{get({id:t}){return e.get(`checkout-forms/${t}`)}}}function Cs({apiHandler:e}){return{getAll({resource:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`custom-fields/${t}`,n)}}}function Ds({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`deposit-requests/${t}`,r)}}}function js({apiHandler:e}){return{create({data:t}){return e.post("deposit",t)}}}function Ms({apiHandler:e}){return{get({id:t}){return e.get(`deposit-strategies/${t}`)}}}function Os({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("invoices",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`invoices/${t}`,r)},update({id:t,data:s}){return e.patch(`invoices/${t}`,s)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`invoices/${t}`,s)}}}function Fs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("kyc-documents",r)},create({data:t}){return e.post("kyc-documents",t)},get({id:t}){return e.get(`kyc-documents/${t}`)},update({id:t,data:s}){return e.patch(`kyc-documents/${t}`,s)}}}function Bs({apiHandler:e}){return{create({data:t}){return e.post("kyc-liveness-sessions",t)},get({id:t}){return e.get(`kyc-liveness-sessions/${t}`)},finish({id:t}){return e.post(`kyc-liveness-sessions/${t}/finish`)}}}function Ks({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`kyc-requests/${t}`,r)}}}function Ns({apiHandler:e}){return{getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}/upcoming-invoice`,r)},getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("orders",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}`,r)},update({id:t,data:s}){return e.patch(`orders/${t}`,s)},cancel({id:t,data:s}){return e.post(`orders/${t}/cancellation`,s)},pause({id:t,data:s}){return e.post(`orders/${t}/pause`,s)}}}function Ls({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("payment-instruments",o)},create({data:t}){return e.post("payment-instruments",t)},get({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.get(`payment-instruments/${t}`,n)},update({id:t,data:s}){return e.patch(`payment-instruments/${t}`,s)},deactivate({id:t}){return e.post(`payment-instruments/${t}/deactivation`)},getSetupTransaction({id:t}){return e.get(`payment-instruments/${t}/setup`)},setup({id:t,data:s}){return e.post(`payment-instruments/${t}/setup`,s)}}}function zs({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("payout-requests",o)},create({data:t}){return e.post("payout-requests",t)},get({id:t}){return e.get(`payout-requests/${t}`)},update({id:t,data:s}){return e.patch(`payout-requests/${t}`,s)}}}function Us({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("plans",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`plans/${t}`,r)}}}function Vs({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("products",o)},get({id:t}){return e.get(`products/${t}`)}}}function Js({apiHandler:e}){return{payment({data:t}){return e.post("payment",t)},purchase({data:t}){return e.post("purchase",t)},preview({data:t}){return e.post("preview-purchase",t)},readyToPay({data:t}){return e.post("ready-to-pay",t)}}}function Ws({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`quotes/${t}`,r)},accept({id:t}){return e.post(`quotes/${t}/accept`)},reject({id:t}){return e.post(`quotes/${t}/reject`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`quotes/${t}`,s)}}}function Gs({apiHandler:e}){return{readyToPayout({data:t}){return e.post("ready-to-payout",t)}}}function Ys({apiHandler:e}){return{reactivation({data:t}){return e.post("subscription-reactivations",t)}}}function Qs({apiHandler:e}){return{changeItems({id:t,data:s}){return e.post(`subscriptions/${t}/change-items`,s)},create({data:t}){return e.post("subscriptions",t)}}}function _s({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("transactions",o)},get({id:t}){return e.get(`transactions/${t}`)},getDcc({id:t}){return e.get(`transactions/${t}/dcc`)},updateDcc({id:t,data:s}){return e.patch(`transactions/${t}/dcc`,s)},finishKyc({id:t,token:s}){return e.post(`transactions/${t}/${s}/continue`)},skipKyc({id:t,token:s}){return e.post(`transactions/${t}/${s}/bypass`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`transactions/${t}`,s)},update({id:t,data:s}){return e.patch(`transactions/${t}`,s)}}}function Xs({apiHandler:e}){return{get({id:t}){return e.get(`websites/${t}`)}}}class Zs{constructor({apiHandler:t}){this.account=Is({apiHandler:t}),this.authorization=Ss({apiHandler:t}),this.billingPortals=Es({apiHandler:t}),this.cashiers=Ps({apiHandler:t}),this.checkoutForms=xs({apiHandler:t}),this.customFields=Cs({apiHandler:t}),this.depositRequests=Ds({apiHandler:t}),this.deposit=js({apiHandler:t}),this.depositStrategies=Ms({apiHandler:t}),this.invoices=Os({apiHandler:t}),this.kycDocuments=Fs({apiHandler:t}),this.kycLivenessSessions=Bs({apiHandler:t}),this.kycRequests=Ks({apiHandler:t}),this.orders=Ns({apiHandler:t}),this.paymentInstruments=Ls({apiHandler:t}),this.payoutRequests=zs({apiHandler:t}),this.plans=Us({apiHandler:t}),this.products=Vs({apiHandler:t}),this.purchase=Js({apiHandler:t}),this.quotes=Ws({apiHandler:t}),this.readyToPayout=Gs({apiHandler:t}),this.subscriptionReactivations=Ys({apiHandler:t}),this.subscriptions=Qs({apiHandler:t}),this.transactions=_s({apiHandler:t}),this.websites=Xs({apiHandler:t}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=t.addRequestInterceptor,this.removeRequestInterceptor=t.removeRequestInterceptor,this.addResponseInterceptor=t.addResponseInterceptor,this.removeResponseInterceptor=t.removeResponseInterceptor,this.setTimeout=t.setTimeout,this.setProxyAgent=t.setProxyAgent,this.setSessionToken=t.setSessionToken,this.setPublishableKey=t.setPublishableKey,this.setEndpoints=t.setEndpoints,this.getCancellationToken=t.getCancellationToken,this.generateSignature=t.generateSignature}}function Hs({apiHandler:e}){return new As({apiHandler:e})}function tr({apiHandler:e}){return new Ts({apiHandler:e})}function er({apiHandler:e}){return new Zs({apiHandler:e})}const x={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},C=6e3;function U({apiKey:e=null,sandbox:t=!1,timeout:s=C,organizationId:r=null,urls:n=x,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:e,apiVersion:"",isSandbox:t,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=P({options:o});return Hs({apiHandler:l})}function sr({apiKey:e=null,sandbox:t=!1,timeout:s=C,organizationId:r=null,urls:n=x,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:e,apiVersion:"experimental",isSandbox:t,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=P({options:o});return tr({apiHandler:l})}function rr({publishableKey:e=null,jwt:t=null,sandbox:s=!1,timeout:r=C,organizationId:n=null,urls:u=x,internalOptions:o=null}={}){if(!u.live||!u.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof u.live!="string"||typeof u.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const l={apiEndpoints:u,publishableKey:e,jwt:t,apiVersion:"storefront",isSandbox:s,requestTimeout:r,organizationId:n,appName:(o==null?void 0:o.appName)??null},a=P({options:l});return a.setSessionToken(l.jwt),er({apiHandler:a})}m.RebillyAPI=U,m.RebillyErrors=h,m.RebillyExperimentalAPI=sr,m.RebillyStorefrontAPI=rr,m.cancellation=Nt,m.default=U,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
16
|
+
*/var It=Tt;function L(e){return It(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var St=function(t){var s,r;return!(L(t)===!1||(s=t.constructor,typeof s!="function")||(r=s.prototype,L(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};const Et=qt,Pt=B,xt=St;function E(e,t){switch(Pt(e)){case"object":return Ct(e,t);case"array":return Dt(e,t);default:return Et(e)}}function Ct(e,t){if(typeof t=="function")return t(e);if(t||xt(e)){const s=new e.constructor;for(let r in e)s[r]=E(e[r],t);return s}return e}function Dt(e,t){const s=new e.constructor(e.length);for(let r=0;r<e.length;r++)s[r]=E(e[r],t);return s}var jt=E;const Mt=ct(jt);let Ot="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ft=(e=21)=>{let t="",s=e|0;for(;s--;)t+=Ot[Math.random()*64|0];return t};class Bt{constructor({id:t=null,created:s=null}={}){this.id=t||Ft(),this.created=s||new Date().getTime(),this.cancelSource=$.CancelToken.source(),this.cancel=this.cancelSource.cancel,this.cancelToken=this.cancelSource.token,y(this,{exclude:["cancelSource","cancelToken","cancel"]})}}let Kt=class S{constructor(){if(S.instance)return S.instance;this.requests={},S.instance=this}getAll(){return Object.values(this.requests)}getById(t){return this.requests[t]}deleteById(t){this.requests[t]&&delete this.requests[t]}save(){const t=new Bt;return this.requests[t.id]=t,{id:t.id,cancelToken:t.cancelToken}}};const q=new Kt;class I{}M(I,"cancelById",(t,s)=>{try{q.getById(t).cancel(s),q.deleteById(t)}catch{}}),M(I,"cancelAll",async t=>{for(const s of q.getAll())await s.cancel(t),q.deleteById(s.id)});const Nt={cancelAll:async(...e)=>await I.cancelAll(...e)},b={request:"request",response:"response"},z=e=>{if(!Object.values(b).includes(e))throw new Error(`There is no such interceptor type as "${e}"`);return!0};function P({options:e}){const t=s();function s(){return $.create(n())}function r(){return t}function n(){return{baseURL:u(),timeout:e.requestTimeout,headers:o()}}function u(){let c=e.isSandbox?e.apiEndpoints.sandbox:e.apiEndpoints.live;return e.apiVersion&&(c=`${c}/${e.apiVersion}`),e.organizationId&&(c=`${c}/organizations/${e.organizationId}`),`${c}`}function o(){const i={"REB-API-CONSUMER":`${["Rebilly",e.appName,"js-sdk"].filter(g=>g).join("/")}@22e3881`};return e.apiKey&&(i["REB-APIKEY"]=e.apiKey),i}function l(){return Mt(t.defaults.headers)}function a(c){e.requestTimeout=Number(c),t.defaults.timeout=e.requestTimeout}function p(c=e.jwt){const i=l();e.apiKey=null,e.jwt=c,delete i.common["REB-APIKEY"],i.common.Authorization=`Bearer ${c}`,t.defaults.headers=i}function v(c=e.publishableKey){const i=l();e.publishableKey=c,i.common.Authorization=`${c}`,t.defaults.headers=i}function D({host:c,port:i,auth:g}){t.defaults.proxy={host:c,port:i,auth:g}}function j({live:c=null,sandbox:i=null}){c&&(e.apiEndpoints.live=c),i&&(e.apiEndpoints.sandbox=i),t.defaults.baseURL=u()}function V(c,{thenDelegate:i,catchDelegate:g=()=>{}}){return z(c)&&t.interceptors[b[c]].use(i,g)}function J(c,i){return z(c)&&t.interceptors[b[c]].eject(i)}function nr({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.request,{thenDelegate:c,catchDelegate:i})}function ur(c){J(b.request,c)}function or({thenDelegate:c,catchDelegate:i=()=>{}}){return V(b.response,{thenDelegate:c,catchDelegate:i})}function lr(c){J(b.response,c)}function d({request:c,isCollection:i,config:g}){const f=G(g),{id:R,cancelToken:hr}=q.save();f.cancelToken=hr;const X=async function(){try{const T=await c(f);return cr({response:T,isCollection:i,config:f})}catch(T){return W({error:T})}finally{q.deleteById(R)}}();return X.cancel=T=>I.cancelById(R,T),X}function cr({response:c,isCollection:i,config:g}){return i?new Z(c,g):new O(c,g)}function W({error:c}){if($.isCancel(c))throw new h.RebillyCanceledError(c);if(c.response)switch(Number(c.response.status)){case 401:throw new h.RebillyForbiddenError(c);case 404:throw new h.RebillyNotFoundError(c);case 405:throw new h.RebillyMethodNotAllowedError(c);case 409:throw new h.RebillyConflictError(c);case 422:throw new h.RebillyValidationError(c);default:throw new h.RebillyRequestError(c)}throw c.code==="ECONNABORTED"?new h.RebillyTimeoutError(c):new h.RebillyRequestError(c)}function ir(c){return c.params!==void 0&&(c.params=Object.keys(c.params).filter(i=>c.params[i]!==null&&c.params[i]!=="").reduce((i,g)=>(i[g]=c.params[g],i),{})),c}function G(c={}){return{...ir(c)}}function Y(c,i={}){return d({request:g=>t.get(c,g),config:{params:i}})}function gr(c,i){return d({request:g=>t.get(c,g),config:{params:i},isCollection:!0})}function Q(c,i,g={}){let f={};return g.authenticate===!1&&(f={headers:l()},delete f.headers.common["REB-APIKEY"],delete f.headers.common.Authorization),g.params&&(f.params={...g.params}),d({request:R=>t.post(c,i,R),config:f})}function _(c,i,g={}){return d({request:f=>t.put(c,i,f),config:{params:g}})}function ar(c,i){return d({request:g=>t.patch(c,i,g),config:{}})}function mr(c){return d({request:i=>t.delete(c,i),config:{}})}function fr(c,i){return d({request:g=>t.delete(c,g),config:{data:{...i}}})}async function $r(c,i,g,f={}){if(i==="")return Q(c,g,{params:f});try{if((await Y(c)).response.status===200)throw new h.RebillyConflictError({message:"A resource already exists with this ID. Please use a different ID."})}catch(R){if(R.name==="RebillyNotFoundError")return _(c,g,f);throw R}}async function pr(c,i){const g=G(i);try{const f=await t.get(c,g);return new H(f,g)}catch(f){return W({error:f})}}return{getInstance:r,addRequestInterceptor:nr,removeRequestInterceptor:ur,addResponseInterceptor:or,removeResponseInterceptor:lr,setTimeout:a,setProxyAgent:D,setSessionToken:p,setPublishableKey:v,setEndpoints:j,get:Y,getAll:gr,post:Q,put:_,patch:ar,delete:mr,deleteAll:fr,create:$r,download:pr}}function Lt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("account-registration-settings",r)},create({id:t="",data:s}){return e.create(`account-registration-settings/${t}`,t,s)},get({id:t}){return e.get(`account-registration-settings/${t}`)},update({id:t,data:s}){return e.put(`account-registration-settings/${t}`,s)},delete({id:t}){return e.delete(`account-registration-settings/${t}`)}}}function zt({apiHandler:e}){return{forgotPassword({data:t}){return e.post("forgot-password",t,{authenticate:!1})}}}function Ut({apiHandler:e}){return{getAllowlistCollection({filter:t=null,sort:s=null,limit:r=null,offset:n=null}={}){const u={filter:t,sort:s,limit:r,offset:n};return e.getAll("allowlists",u)},storeAllowlist({data:t}){return e.post("allowlists",t)},getAllowlist({id:t}){return e.get(`allowlists/${t}`)},delete({id:t}){return e.delete(`allowlists/${t}`)}}}function Vt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("aml-checks",o)},get({id:t}){return e.get(`aml-checks/${t}`)},startReview({id:t}){return e.post(`aml-checks/${t}/start-review`)},stopReview({id:t}){return e.post(`aml-checks/${t}/stop-review`)},review({id:t,data:s}){return e.post(`aml-checks/${t}/review`,s)}}}function Jt({apiHandler:e}){return{getAmlSettings(){return e.get("aml-settings")},putAmlSettings({data:t}){return e.put("aml-settings",t)}}}function Wt({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null}={}){const u={filter:t,sort:s,limit:r,offset:n};return e.getAll("api-keys",u)},create({id:t="",data:s}){return e.create(`api-keys/${t}`,t,s)},get({id:t}){return e.get(`api-keys/${t}`)},update({id:t,data:s}){return e.put(`api-keys/${t}`,s)},delete({id:t}){return e.delete(`api-keys/${t}`)}}}function Gt({apiHandler:e}){return{get({applicationId:t}){return e.get(`application-instances/${t}`)},upsert({applicationId:t,data:s}){return e.put(`application-instances/${t}`,s)},delete({applicationId:t}){return e.delete(`application-instances/${t}`)},getConfiguration({applicationId:t}){return e.get(`application-instances/${t}/configuration`)},upsertConfiguration({applicationId:t,data:s}){return e.put(`application-instances/${t}/configuration`,s)}}}function Yt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("applications",a)},create({data:t}){return e.post("applications",t)},get({id:t}){return e.get(`applications/${t}`)},getInstances({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`applications/${t}/instances`,n)},getInstance({id:t,organizationId:s}){return e.get(`applications/${t}/instances/${s}`)}}}function Qt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("balance-transactions",u)},get({id:t}){return e.get(`balance-transactions/${t}`)}}}function _t({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("billing-portals",o)},create({id:t="",data:s}){return e.create(`billing-portals/${t}`,t,s)},get({id:t}){return e.get(`billing-portals/${t}`)},update({id:t,data:s}){return e.put(`billing-portals/${t}`,s)},delete({id:t}){return e.delete(`billing-portals/${t}`)}}}function Xt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("blocklists",o)},create({id:t="",data:s}){return e.create(`blocklists/${t}`,t,s)},get({id:t}){return e.get(`blocklists/${t}`)},delete({id:t}){return e.delete(`blocklists/${t}`)}}}function Zt({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null}={}){const u={limit:t,offset:s,sort:r,filter:n};return e.getAll("broadcast-messages",u)},create({data:t}){return e.post("broadcast-messages",t)},get({id:t}){return e.get(`broadcast-messages/${t}`)},delete({id:t}){return e.delete(`broadcast-messages/${t}`)},update({id:t,data:s}){return e.patch(`broadcast-messages/${t}`,s)}}}function Ht({apiHandler:e}){return{create({data:t}){return e.post("cashiers",t)},get({id:t}){return e.get(`cashiers/${t}`)}}}function te({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("checkout-forms",o)},create({id:t="",data:s}){return e.create(`checkout-forms/${t}`,t,s)},get({id:t}){return e.get(`checkout-forms/${t}`)},update({id:t,data:s}){return e.put(`checkout-forms/${t}`,s)},delete({id:t}){return e.delete(`checkout-forms/${t}`)}}}function ee({apiHandler:e}){return{getAllRedemptions({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("coupons-redemptions",o)},redeem({data:t}){return e.post("coupons-redemptions",t)},getRedemption({id:t}){return e.get(`coupons-redemptions/${t}`)},cancelRedemption({id:t}){return e.post(`coupons-redemptions/${t}/cancel`)},getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("coupons",o)},create({id:t="",data:s}){return e.create(`coupons/${t}`,t,s)},get({id:t}){return e.get(`coupons/${t}`)},update({id:t,data:s}){return e.put(`coupons/${t}`,s)},setExpiration({id:t,data:s}){return e.post(`coupons/${t}/expiration`,s)}}}const w={Accept:"application/pdf"};function se({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("credit-memos",l)},create({id:t="",data:s}){return e.create(`credit-memos/${t}`,t,s)},get({id:t}){return e.get(`credit-memos/${t}`)},update({id:t,data:s}){return e.put(`credit-memos/${t}`,s)},patch({id:t,data:s}){return e.patch(`credit-memos/${t}`,s)},void({id:t}){return e.post(`credit-memos/${t}/void`)},refund({id:t}){return e.post(`credit-memos/${t}/refund`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`credit-memos/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`credit-memos/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`credit-memos/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`credit-memos/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`credit-memos/${t}`,s)}}}function re({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("custom-domains",o)},create({data:t}){return e.post("custom-domains",t)},get({domain:t}){return e.get(`custom-domains/${t}`)},delete({domain:t}){return e.delete(`custom-domains/${t}`)}}}function ne({apiHandler:e}){return{getAll({resource:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`custom-fields/${t}`,n)},get({resource:t,name:s}){return e.get(`custom-fields/${t}/${s}`)},create({resource:t,name:s,data:r}){return e.put(`custom-fields/${t}/${s}`,r)},update({resource:t,name:s,data:r}){return e.put(`custom-fields/${t}/${s}`,r)}}}function ue({apiHandler:e}){return{getAuthOptions(){return e.get("authentication-options")},updateAuthOptions({data:t}){return e.put("authentication-options",t)},getAllAuthTokens({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("authentication-tokens",r)},login({data:t}){return e.post("authentication-tokens",t)},verify({token:t}){return e.get(`authentication-tokens/${t}`)},logout({token:t}){return e.delete(`authentication-tokens/${t}`)},exchangeToken({token:t,data:s}){return e.post(`authentication-tokens/${t}/exchange`,s)},getAllCredentials({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("credentials",r)},createCredential({id:t="",data:s}){return e.create(`credentials/${t}`,t,s)},getCredential({id:t}){return e.get(`credentials/${t}`)},updateCredential({id:t,data:s}){return e.put(`credentials/${t}`,s)},deleteCredential({id:t}){return e.delete(`credentials/${t}`)},getAllResetPasswordTokens({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("password-tokens",r)},createResetPasswordToken({data:t}){return e.post("password-tokens",t)},getResetPasswordToken({id:t}){return e.get(`password-tokens/${t}`)},deleteResetPasswordToken({id:t}){return e.delete(`password-tokens/${t}`)}}}function oe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("customers",a)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`customers/${t}`,t,s,n)},get({id:t,expand:s=null,fields:r=null}){const n={expand:s,fields:r};return e.get(`customers/${t}`,n)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`customers/${t}`,s,n)},merge({id:t,targetCustomerId:s}){return e.delete(`customers/${t}?targetCustomerId=${s}`)},getLeadSource({id:t}){return e.get(`customers/${t}/lead-source`)},createLeadSource({id:t,data:s}){return e.put(`customers/${t}/lead-source`,s)},updateLeadSource({id:t,data:s}){return e.put(`customers/${t}/lead-source`,s)},deleteLeadSource({id:t}){return e.delete(`customers/${t}/lead-source`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`customers/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`customers/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`customers/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`customers/${t}/timeline/${s}`)},getCustomerCreditBalance({id:t}){return e.get(`customers/${t}/credit-balance`)}}}function le({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("deposit-custom-property-sets",u)},create({id:t="",data:s}){return e.create(`deposit-custom-property-sets/${t}`,t,s)},get({id:t}){return e.get(`deposit-custom-property-sets/${t}`)},update({id:t,data:s}){return e.put(`deposit-custom-property-sets/${t}`,s)},delete({id:t}){return e.delete(`deposit-custom-property-sets/${t}`)}}}function ce({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("deposit-requests",o)},create({data:t}){return e.post("deposit-requests",t)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`deposit-requests/${t}`,r)}}}function ie({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("deposit-strategies",u)},create({id:t="",data:s}){return e.create(`deposit-strategies/${t}`,t,s)},get({id:t}){return e.get(`deposit-strategies/${t}`)},update({id:t,data:s}){return e.put(`deposit-strategies/${t}`,s)},delete({id:t}){return e.delete(`deposit-strategies/${t}`)}}}function ge({apiHandler:e}){return{validate({data:t}){return e.post("digital-wallets/validation",t)},create({data:t}){return e.post("digital-wallets/onboarding/apple-pay",t)}}}function ae({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("disputes",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`disputes/${t}`,t,s,n)},get({id:t}){return e.get(`disputes/${t}`)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`disputes/${t}`,s,n)}}}function me({apiHandler:e}){return{verify({token:t}){return e.put(`email-delivery-setting-verifications/${t}`)},getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("email-delivery-settings",o)},create({data:t}){return e.post("email-delivery-settings",t)},get({id:t}){return e.get(`email-delivery-settings/${t}`)},delete({id:t}){return e.delete(`email-delivery-settings/${t}`)},update({id:t,data:s}){return e.patch(`email-delivery-settings/${t}`,s)},resendVerification({id:t}){return e.post(`email-delivery-settings/${t}/resend-email-verification`)}}}function fe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,q:r=null,sort:n=null,filter:u=null}={}){const o={limit:t,offset:s,q:r,sort:n,filter:u};return e.getAll("email-messages",o)},create({data:t}){return e.post("email-messages",t)},get({id:t}){return e.get(`email-messages/${t}`)},delete({id:t}){return e.delete(`email-messages/${t}`)},send({id:t,data:s={status:"outbox"}}){return e.patch(`email-messages/${t}`,s)}}}function $e({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("email-notifications",r)}}}function pe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null}={}){const u={limit:t,offset:s,filter:r,q:n};return e.getAll("events",u)},get({eventType:t}){return e.get(`events/${t}`)},getRules({eventType:t}){return e.get(`events/${t}/rules`)},createRules({eventType:t,data:s}){return e.put(`events/${t}/rules`,s)},updateRules({eventType:t,data:s}){return e.put(`events/${t}/rules`,s)},getAllTimelineMessages({eventType:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`events/${t}/timeline`,l)},createTimelineComment({eventType:t,data:s}){return e.post(`events/${t}/timeline`,s)},getTimelineMessage({eventType:t,messageId:s}){return e.get(`events/${t}/timeline/${s}`)},deleteTimelineMessage({eventType:t,messageId:s}){return e.delete(`events/${t}/timeline/${s}`)},getRulesHistory({eventType:t,limit:s=null,offset:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return e.getAll(`events/${t}/rules/history`,a)},getRulesVersionNumber({eventType:t,version:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/history/${s}`,n)},getRulesVersionDetail({eventType:t,version:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/versions/${s}`,n)},getAllDraftRulesets({eventType:t,limit:s=null,offset:r=null,filter:n=null,q:u=null,sort:o=null,fields:l=null}){const a={limit:s,offset:r,filter:n,q:u,sort:o,fields:l};return e.getAll(`events/${t}/rules/drafts`,a)},createDraftRuleset({eventType:t,data:s}){return e.post(`events/${t}/rules/drafts`,s)},getDraftRuleset({eventType:t,id:s,fields:r=null}){const n={fields:r};return e.get(`events/${t}/rules/drafts/${s}`,n)},updateDraftRuleset({eventType:t,id:s,data:r}){return e.put(`events/${t}/rules/drafts/${s}`,r)},deleteDraftRuleset({eventType:t,id:s}){return e.delete(`events/${t}/rules/drafts/${s}`)}}}function he({apiHandler:e}){return{get({resource:t,resourceId:s,service:r}){return e.get(`${t}/${s}/external-identifiers/${r}`)},sync({resource:t,resourceId:s,service:r}){return e.post(`${t}/${s}/external-identifiers/${r}`)},update({resource:t,resourceId:s,service:r,data:n}){return e.put(`${t}/${s}/external-identifiers/${r}`,n)},delete({resource:t,resourceId:s,service:r}){return e.delete(`${t}/${s}/external-identifiers/${r}`)}}}function ye({apiHandler:e}){return{getExternalServiceSettings(){return e.get("external-services-settings")},updateExternalServiceSettings({data:t}){return e.put("external-services-settings",t)}}}function Ae({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("fees",u)},create({id:t="",data:s}){return e.create(`fees/${t}`,t,s)},get({id:t}){return e.get(`fees/${t}`)},upsert({id:t,data:s}){return e.put(`fees/${t}`,s)},delete({id:t}){return e.delete(`fees/${t}`)},patch({id:t,data:s}){return e.patch(`fees/${t}`,s)}}}function Re({apiHandler:e}){return{getAllAttachments({limit:t=null,offset:s=null,filter:r=null,q:n=null,expand:u=null,fields:o=null,sort:l=null}={}){const a={limit:t,offset:s,filter:r,q:n,expand:u,fields:o,sort:l};return e.getAll("attachments",a)},attach({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`attachments/${t}`,t,s,n)},getAttachment({id:t}){return e.get(`attachments/${t}`)},updateAttachment({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`attachments/${t}`,s,n)},detach({id:t}){return e.delete(`attachments/${t}`)},getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,fields:u=null,sort:o=null}={}){const l={limit:t,offset:s,filter:r,q:n,fields:u,sort:o};return e.getAll("files",l)},upload({fileObject:t}){return e.post("files",t)},get({id:t}){return e.get(`files/${t}`)},update({id:t,data:s}){return e.put(`files/${t}`,s)},delete({id:t}){return e.delete(`files/${t}`)},download({id:t}){const s={responseType:"arraybuffer"};return e.download(`files/${t}/download`,s)},detachAndDelete({id:t}){const s={filter:`fileId:${t}`};let r=[];const u=(async()=>{const o=this.getAllAttachments(s);r.push(o);const a=(await o).items.map(v=>this.detach({id:v.fields.id}));r=[...r,a],await Promise.all(a);const p=e.delete(`files/${t}`);return r.push(p),p})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u},uploadAndUpdate({fileObject:t,data:s={description:"",tags:[""]}}){const r=[],u=(async()=>{const o=this.upload({fileObject:t});r.push(o),await o;const l={name:o.name,extension:o.extension,description:s.description,tags:s.tags,url:""},a=this.update({id:o.fields.id,data:l});return r.push(a),a})();return u.cancel=()=>{r.forEach(o=>o.cancel())},u}}}function be({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,fields:o=null}={}){const l={limit:t,offset:s,sort:r,filter:n,q:u,fields:o};return e.getAll("gateway-accounts",l)},create({id:t="",data:s}){return e.create(`gateway-accounts/${t}`,t,s)},get({id:t}){return e.get(`gateway-accounts/${t}`)},upsert({id:t,data:s}){return e.put(`gateway-accounts/${t}`,s)},delete({id:t}){return e.delete(`gateway-accounts/${t}`)},update({id:t,data:s}){return e.patch(`gateway-accounts/${t}`,s)},close({id:t}){return e.post(`gateway-accounts/${t}/close`)},disable({id:t}){return e.post(`gateway-accounts/${t}/disable`)},getAllDowntimeSchedules({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null}){const o={limit:s,offset:r,filter:n,sort:u};return e.getAll(`gateway-accounts/${t}/downtime-schedules`,o)},createDowntimeSchedule({id:t,data:s}){return e.post(`gateway-accounts/${t}/downtime-schedules`,s)},getDowntimeSchedule({id:t,downtimeId:s}){return e.get(`gateway-accounts/${t}/downtime-schedules/${s}`)},updateDowntimeSchedule({id:t,downtimeId:s,data:r}){return e.put(`gateway-accounts/${t}/downtime-schedules/${s}`,r)},deleteDowntimeSchedule({id:t,downtimeId:s}){return e.delete(`gateway-accounts/${t}/downtime-schedules/${s}`)},enable({id:t}){return e.post(`gateway-accounts/${t}/enable`)},getAllVolumeLimits({id:t}){return e.getAll(`gateway-accounts/${t}/limits`)},getVolumeLimit({id:t,limitId:s}){return e.get(`gateway-accounts/${t}/limits/${s}`)},updateVolumeLimit({id:t,limitId:s,data:r}){return e.put(`gateway-accounts/${t}/limits/${s}`,r)},deleteVolumeLimit({id:t,limitId:s}){return e.delete(`gateway-accounts/${t}/limits/${s}`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`gateway-accounts/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`gateway-accounts/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`gateway-accounts/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`gateway-accounts/${t}/timeline/${s}`)},checkCredentials({id:t}){return e.post(`gateway-accounts/${t}/check-credentials`)},getFinancialSettings({id:t}){return e.get(`gateway-accounts/${t}/financial-settings`)},setFinancialSettings({id:t,data:s}){return e.put(`gateway-accounts/${t}/financial-settings`,s)}}}function we({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("integrations",r)},get({label:t}){return e.get(`integrations/${t}`)}}}function ke({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("invoices",l)},create({id:t="",data:s}){return e.create(`invoices/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`invoices/${t}`,r)},update({id:t,data:s}){return e.put(`invoices/${t}`,s)},getAllInvoiceItems({id:t,limit:s=null,offset:r=null,expand:n=null}){const u={limit:s,offset:r,expand:n};return e.getAll(`invoices/${t}/items`,u)},createInvoiceItem({id:t,data:s}){return e.post(`invoices/${t}/items`,s)},getInvoiceItem({id:t,itemId:s}){return e.get(`invoices/${t}/items/${s}`)},updateInvoiceItem({id:t,itemId:s,data:r}){return e.put(`invoices/${t}/items/${s}`,r)},deleteInvoiceItem({id:t,itemId:s}){return e.delete(`invoices/${t}/items/${s}`)},issue({id:t,data:s}){return e.post(`invoices/${t}/issue`,s)},abandon({id:t}){return e.post(`invoices/${t}/abandon`)},void({id:t}){return e.post(`invoices/${t}/void`)},recalculate({id:t}){return e.post(`invoices/${t}/recalculate`)},reissue({id:t,data:s}){return e.post(`invoices/${t}/reissue`,s)},getAllTransactionAllocations({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`invoices/${t}/transaction-allocations`,n)},allocateCreditBalance({id:t,data:s}){return e.post(`invoices/${t}/allocate-credit-balance`,s)},applyTransaction({id:t,data:s}){return e.post(`invoices/${t}/transaction`,s)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`invoices/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`invoices/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`invoices/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`invoices/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`invoices/${t}`,s)}}}function ve({apiHandler:e}){return{getAllAccounts({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("journal-accounts",u)},createAccount({id:t="",data:s}){return e.create(`journal-accounts/${t}`,t,s)},getAccount({id:t}){return e.get(`journal-accounts/${t}`)},updateAccount({id:t,data:s}){return e.put(`journal-accounts/${t}`,s)}}}function de({apiHandler:e}){return{getAllEntries({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("journal-entries",u)},createEntry({id:t="",data:s}){return e.create(`journal-entries/${t}`,t,s)},getEntry({id:t}){return e.get(`journal-entries/${t}`)},updateEntry({id:t,data:s}){return e.put(`journal-entries/${t}`,s)}}}function qe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("journal-records",o)},create({id:t="",data:s}){return e.create(`journal-records/${t}`,t,s)},get({id:t}){return e.get(`journal-records/${t}`)},update({id:t,data:s}){return e.put(`journal-records/${t}`,s)},delete({id:t}){return e.delete(`journal-records/${t}`)}}}function Te({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("kyc-documents",o)},create({id:t="",data:s}){return e.create(`kyc-documents/${t}`,t,s)},get({id:t}){return e.get(`kyc-documents/${t}`)},update({id:t,data:s}){return e.put(`kyc-documents/${t}`,s)},accept({id:t}){return e.post(`kyc-documents/${t}/acceptance`)},matches({id:t,data:s}){return e.post(`kyc-documents/${t}/matches`,s)},reject({id:t,data:s}){return e.post(`kyc-documents/${t}/rejection`,s)},review({id:t}){return e.post(`kyc-documents/${t}/review`)},startReview({id:t}){return e.post(`kyc-documents/${t}/start-review`)},stopReview({id:t}){return e.post(`kyc-documents/${t}/stop-review`)}}}function Ie({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,expand:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,expand:u};return e.getAll("kyc-requests",o)},create({data:t}){return e.post("kyc-requests",t)},get({id:t}){return e.get(`kyc-requests/${t}`)},delete({id:t}){return e.delete(`kyc-requests/${t}`)},update({id:t,data:s}){return e.patch(`kyc-requests/${t}`,s)}}}function Se({apiHandler:e}){return{getKycSettings(){return e.get("kyc-settings")},updateKycSettings({data:t}){return e.put("kyc-settings",t)}}}function Ee({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,fields:u=null,q:o=null}={}){const l={limit:t,offset:s,filter:r,sort:n,fields:u,q:o};return e.getAll("lists",l)},create({id:t="",data:s}){return e.create(`lists/${t}`,t,s)},getLatestVersion({id:t}){return e.get(`lists/${t}`)},update({id:t,data:s}){return e.put(`lists/${t}`,s)},delete({id:t}){return e.delete(`lists/${t}`)},getByVersion({id:t,version:s}){return e.get(`lists/${t}/${s}`)}}}function Pe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("memberships",u)},get({organizationId:t,userId:s}){return e.get(`memberships/${t}/${s}`)},update({organizationId:t,userId:s,data:r}){return e.put(`memberships/${t}/${s}`,r)},delete({organizationId:t,userId:s}){return e.delete(`memberships/${t}/${s}`)}}}function xe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-cancellations",u)},create({id:t="",data:s}){return e.create(`order-cancellations/${t}`,t,s)},get({id:t}){return e.get(`order-cancellations/${t}`)},update({id:t,data:s}){return e.put(`order-cancellations/${t}`,s)},delete({id:t}){return e.delete(`order-cancellations/${t}`)},patch({id:t,data:s}){return e.patch(`order-cancellations/${t}`,s)}}}function Ce({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-pauses",u)},pause({id:t="",data:s}){return e.create(`order-pauses/${t}`,t,s)},get({id:t}){return e.get(`order-pauses/${t}`)},update({id:t,data:s}){return e.put(`order-pauses/${t}`,s)},delete({id:t}){return e.delete(`order-pauses/${t}`)}}}function De({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("order-reactivations",u)},reactivate({data:t}){return e.post("order-reactivations",t)},get({id:t}){return e.get(`order-reactivations/${t}`)}}}function je({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("orders",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`orders/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`orders/${t}`,s,n)},getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}/upcoming-invoice`,r)},void({id:t}){return e.post(`orders/${t}/void`)},changeItems({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`orders/${t}/change-items`,s,n)},updateItem({id:t,itemId:s,data:r}){return e.patch(`orders/${t}/items/${s}`,r)},createInterimInvoice({id:t,data:s}){return e.post(`orders/${t}/interim-invoice`,s)},issueEarlyUpcomingInvoice({id:t,data:s}){return e.post(`orders/${t}/upcoming-invoice/issue`,s)}}}function Me({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("organization-exports",o)},create({data:t}){return e.post("organization-exports",t)},get({id:t}){return e.get(`organization-exports/${t}`)}}}function Oe({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("organizations",o)},create({data:t}){return e.post("organizations",t)},get({id:t}){return e.get(`organizations/${t}`)},update({id:t,data:s}){return e.patch(`organizations/${t}`,s)}}}function Fe({apiHandler:e}){return{getAll({limit:t=null,q:s=null}={}){const r={limit:t,q:s};return e.getAll("payment-cards-bank-names",r)}}}function Be({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("payment-instruments",l)},create({data:t}){return e.post("payment-instruments",t)},get({id:t}){return e.get(`payment-instruments/${t}`)},update({id:t,data:s}){return e.patch(`payment-instruments/${t}`,s)},deactivate({id:t}){return e.post(`payment-instruments/${t}/deactivation`)},nameInquiry({id:t,data:s}){return e.post(`payment-instruments/${t}/name-inquiry`,s)}}}function Ke({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("payment-methods",r)},get({apiName:t}){return e.get(`payment-methods/${t}`)}}}function Ne({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("tokens",r)},create({data:t}){return e.post("tokens",t)},get({token:t}){return e.get(`tokens/${t}`)}}}function Le({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-request-allocations",u)},create({data:t}){return e.post("payout-request-allocations",t)},autoAllocate({data:t}){return e.post("payout-request-allocations/auto",t)},get({id:t}){return e.get(`payout-request-allocations/${t}`)},update({id:t,data:s}){return e.patch(`payout-request-allocations/${t}`,s)},process({data:t}){return e.post("payout-request-allocations/process",t)}}}function ze({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-request-batches",u)},create({data:t}){return e.post("payout-request-batches",t)},get({id:t}){return e.get(`payout-request-batches/${t}`)},patch({id:t,data:s}){return e.patch(`payout-request-batches/${t}`,s)},autoAllocate({id:t}){return e.post(`payout-request-batches/${t}/auto-allocate`)},approve({id:t}){return e.post(`payout-request-batches/${t}/approve`)},block({id:t,data:s}){return e.post(`payout-request-batches/${t}/block`,s)},preview({filter:t=null}){const s={filter:t};return e.get("payout-request-batches/preview",s)}}}function Ue({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("payout-requests",u)},create({id:t="",data:s}){return e.create(`payout-requests/${t}`,t,s)},get({id:t}){return e.get(`payout-requests/${t}`)},update({id:t,data:s}){return e.put(`payout-requests/${t}`,s)},patch({id:t,data:s}){return e.patch(`payout-requests/${t}`,s)},cancel({id:t,data:s}){return e.post(`payout-requests/${t}/cancel`,s)},split({id:t,data:s}){return e.post(`payout-requests/${t}/split`,s)},getPaymentInstruments({id:t}){return e.get(`payout-requests/${t}/payment-instruments`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`payout-requests/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`payout-requests/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`payout-requests/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`payout-requests/${t}/timeline/${s}`)}}}function Ve({apiHandler:e}){return{create({data:t}){return e.post("payouts",t)}}}function Je({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("plans",o)},create({id:t="",data:s}){return e.create(`plans/${t}`,t,s)},get({id:t}){return e.get(`plans/${t}`)},update({id:t,data:s}){return e.put(`plans/${t}`,s)},delete({id:t}){return e.delete(`plans/${t}`)}}}function We({apiHandler:e}){return{order({data:t}){return e.post("previews/orders",t)},sendEmailRuleAction({data:t}){return e.post("previews/rule-actions/send-email",t)},webhook({data:t}){return e.post("previews/webhooks",t)}}}function Ge({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("products",o)},create({id:t="",data:s}){return e.create(`products/${t}`,t,s)},get({id:t}){return e.get(`products/${t}`)},update({id:t,data:s}){return e.put(`products/${t}`,s)},delete({id:t}){return e.delete(`products/${t}`)}}}function Ye({apiHandler:e}){return{startPermissionsEmulation({data:t}){return e.post("permissions-emulation",t)},stopPermissionsEmulation(){return e.delete("permissions-emulation")},get(){return e.get("profile")},update({data:t}){return e.put("profile",t)},getMfa(){return e.get("profile/mfa")},updateMfa(){return e.post("profile/mfa")},deleteMfa(){return e.delete("profile/mfa")},getDashboard(){return e.get("profile/dashboard")},updateDashboard({data:t}){return e.put("profile/dashboard",t)},getDashboardMetricReport({metric:t,periodStart:s,periodEnd:r}){const n={periodStart:s,periodEnd:r};return e.get(`profile/dashboard/metrics/${t}`,n)}}}function Qe({apiHandler:e}){return{readyToPay({data:t}){return e.post("ready-to-pay",t)}}}function _e({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,expand:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,expand:u};return e.getAll("quotes",o)},create({id:t="",data:s}){return e.create(`quotes/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`quotes/${t}`,r)},update({id:t,data:s}){return e.put(`quotes/${t}`,s)},patch({id:t,data:s}){return e.patch(`quotes/${t}`,s)},accept({id:t}){return e.post(`quotes/${t}/accept`)},cancel({id:t}){return e.post(`quotes/${t}/cancel`)},issue({id:t}){return e.post(`quotes/${t}/issue`)},recall({id:t}){return e.post(`quotes/${t}/recall`)},reject({id:t}){return e.post(`quotes/${t}/reject`)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`quotes/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`quotes/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`quotes/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`quotes/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`quotes/${t}`,s)}}}function Xe({apiHandler:e}){return{get({resource:t,resourceId:s,service:r}){return e.get(`${t}/${s}/external-identifiers/${r}`)},sync({resource:t,resourceId:s,service:r}){return e.post(`${t}/${s}/external-identifiers/${r}`)},update({resource:t,resourceId:s,service:r,data:n}){return e.put(`${t}/${s}/external-identifiers/${r}`,n)},delete({resource:t,resourceId:s,service:r}){return e.delete(`${t}/${s}/external-identifiers/${r}`)}}}function Ze({apiHandler:e}){return{getAll(){return e.get("risk-score-rules")},updateRiskScoreRules({data:t}){return e.put("risk-score-rules",t)},getAllBlocklistRules(){return e.get("risk-score-rules/blocklists")},updateRiskScoreBlocklistRules({data:t}){return e.put("risk-score-rules/blocklists",t)}}}function He({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null,expand:o=null}={}){const l={limit:t,offset:s,filter:r,sort:n,q:u,expand:o};return e.getAll("roles",l)},create({id:t="",data:s}){return e.create(`roles/${t}`,t,s)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`roles/${t}`,r)},update({id:t,data:s}){return e.put(`roles/${t}`,s)},delete({id:t}){return e.delete(`roles/${t}`)}}}function ts({apiHandler:e}){return{get({sort:t=null,limit:s=null,offset:r=null,q:n=null}){const u={sort:t,limit:s,offset:r,q:n};return e.get("search",u)}}}function es({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("grid-segments",o)},create({id:t="",data:s}){return e.create(`grid-segments/${t}`,t,s)},get({id:t}){return e.get(`grid-segments/${t}`)},update({id:t,data:s}){return e.put(`grid-segments/${t}`,s)},delete({id:t}){return e.delete(`grid-segments/${t}`)}}}function ss({apiHandler:e}){return{getAll({eventType:t}){return e.getAll(`send-through-attribution/${t}`)}}}function rs({apiHandler:e}){return{getAll({type:t,filter:s=null,limit:r=null,offset:n=null,sort:u=null,q:o=null}){const l={filter:s,limit:r,offset:n,sort:u,q:o};return e.getAll(`service-credentials/${t}`,l)},create({type:t,data:s}){return e.post(`service-credentials/${t}`,s)},get({type:t,id:s}){return e.get(`service-credentials/${t}/${s}`)},update({type:t,id:s,data:r}){return e.patch(`service-credentials/${t}/${s}`,r)},getItems({type:t,id:s,limit:r=null,offset:n=null,filter:u=null,q:o=null,fields:l=null,sort:a=null}){const p={limit:r,offset:n,filter:u,q:o,fields:l,sort:a};return e.getAll(`service-credentials/${t}/${s}/items`,p)}}}function ns({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null,q:u=null}={}){const o={limit:t,offset:s,filter:r,sort:n,q:u};return e.getAll("shipping-rates",o)},create({id:t="",data:s}){return e.create(`shipping-rates/${t}`,t,s)},get({id:t}){return e.get(`shipping-rates/${t}`)},update({id:t,data:s}){return e.put(`shipping-rates/${t}`,s)},delete({id:t}){return e.delete(`shipping-rates/${t}`)}}}function us({apiHandler:e}){return{get(){return e.get("status")}}}function os({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-cancellations",u)},create({id:t="",data:s}){return e.create(`subscription-cancellations/${t}`,t,s)},get({id:t}){return e.get(`subscription-cancellations/${t}`)},delete({id:t}){return e.delete(`subscription-cancellations/${t}`)},patch({id:t,data:s}){return e.patch(`subscription-cancellations/${t}`,s)}}}function ls({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-pauses",u)},pause({id:t="",data:s}){return e.create(`subscription-pauses/${t}`,t,s)},get({id:t}){return e.get(`subscription-pauses/${t}`)},update({id:t,data:s}){return e.put(`subscription-pauses/${t}`,s)},delete({id:t}){return e.delete(`subscription-pauses/${t}`)}}}function cs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,sort:n=null}={}){const u={limit:t,offset:s,filter:r,sort:n};return e.getAll("subscription-reactivations",u)},reactivate({data:t}){return e.post("subscription-reactivations",t)},get({id:t}){return e.get(`subscription-reactivations/${t}`)}}}function is({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("subscriptions",l)},create({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`subscriptions/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`subscriptions/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`subscriptions/${t}`,s,n)},delete({id:t}){return e.delete(`subscriptions/${t}`)},void({id:t}){return e.post(`subscriptions/${t}/void`)},changeItems({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`subscriptions/${t}/change-items`,s,n)},updateItem({id:t,itemId:s,data:r}){return e.patch(`subscriptions/${t}/items/${s}`,r)},createInterimInvoice({id:t,data:s}){return e.post(`subscriptions/${t}/interim-invoice`,s)},getAllUpcomingInvoices({id:t,expand:s=null}){const r={expand:s};return e.getAll(`subscriptions/${t}/upcoming-invoices`,r)},getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`subscriptions/${t}/upcoming-invoice`,r)},issueEarlyUpcomingInvoice({id:t,data:s}){return e.post(`subscriptions/${t}/upcoming-invoice/issue`,s)},issueUpcomingInvoice({id:t,invoiceId:s,data:r}){return e.post(`subscriptions/${t}/upcoming-invoices/${s}/issue`,r)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`subscriptions/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`subscriptions/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`subscriptions/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`subscriptions/${t}/timeline/${s}`)}}}function gs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("tags",o)},create({data:t}){return e.post("tags",t)},get({tag:t}){return e.get(`tags/${t}`)},delete({tag:t}){return e.delete(`tags/${t}`)},update({tag:t,data:s}){return e.patch(`tags/${t}`,s)},tagCustomers({tag:t,data:s}){return e.post(`tags/${t}/customers`,s)},untagCustomers({tag:t,data:s}){return e.delete(`tags/${t}/customers`,s)},tagCustomer({tag:t,customerId:s}){return e.post(`tags/${t}/customers/${s}`)},untagCustomer({tag:t,customerId:s}){return e.delete(`tags/${t}/customers/${s}`)},tagKycDocuments({tag:t,data:s}){return e.post(`tags/${t}/kyc-documents`,s)},untagKycDocuments({tag:t,data:s}){return e.delete(`tags/${t}/kyc-documents`,s)},tagKycDocument({tag:t,kycDocumentId:s}){return e.post(`tags/${t}/kyc-documents/${s}`)},untagKycDocument({tag:t,kycDocumentId:s}){return e.delete(`tags/${t}/kyc-documents/${s}`)},tagAmlChecks({tag:t,data:s}){return e.post(`tags/${t}/aml-checks`,s)},untagAmlChecks({tag:t,data:s}){return e.delete(`tags/${t}/aml-checks`,s)},tagAmlCheck({tag:t,amlCheckId:s}){return e.post(`tags/${t}/aml-checks/${s}`)},untagAmlCheck({tag:t,amlCheckId:s}){return e.delete(`tags/${t}/aml-checks/${s}`)}}}function as({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tags-rules",o)},create({id:t="",data:s}){return e.create(`tags-rules/${t}`,t,s)},get({id:t}){return e.get(`tags-rules/${t}`)},update({id:t,data:s}){return e.put(`tags-rules/${t}`,s)},delete({id:t}){return e.delete(`tags-rules/${t}`)}}}function ms({apiHandler:e}){return{getAllApiLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null,expand:o=null}={}){const l={limit:t,offset:s,sort:r,filter:n,q:u,expand:o};return e.getAll("tracking/api",l)},getApiLog({id:t}){return e.get(`tracking/api/${t}`)},getAllTaxTrackingLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/taxes",o)},getTaxTrackingLog({id:t}){return e.get(`tracking/taxes/${t}`)},getAllListsChangesHistory({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/lists",o)},getAllWebhookTrackingLogs({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("tracking/webhooks",o)},getWebhookTrackingLog({id:t}){return e.get(`tracking/webhooks/${t}`)},resendWebhook({id:t}){return e.post(`tracking/webhooks/${t}/resend`)}}}function fs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null,expand:o=null}={}){const l={limit:t,offset:s,filter:r,q:n,sort:u,expand:o};return e.getAll("transactions",l)},create({data:t,expand:s=null}){const r={expand:s};return e.post("transactions",t,r)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`transactions/${t}`,r)},patch({id:t,data:s}){return e.patch(`transactions/${t}`,s)},query({id:t}){return e.post(`transactions/${t}/query`)},update({id:t,data:s}){return e.post(`transactions/${t}/update`,s)},refund({id:t,data:s,expand:r=null}){const n={expand:r};return e.post(`transactions/${t}/refund`,s,n)},getAllTimelineMessages({id:t,limit:s=null,offset:r=null,filter:n=null,sort:u=null,q:o=null}){const l={limit:s,offset:r,filter:n,sort:u,q:o};return e.getAll(`transactions/${t}/timeline`,l)},createTimelineComment({id:t,data:s}){return e.post(`transactions/${t}/timeline`,s)},getTimelineMessage({id:t,messageId:s}){return e.get(`transactions/${t}/timeline/${s}`)},deleteTimelineMessage({id:t,messageId:s}){return e.delete(`transactions/${t}/timeline/${s}`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`transactions/${t}`,s)}}}function $s({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("usages",o)},create({data:t}){return e.post("usages",t)},get({id:t}){return e.get(`usages/${t}`)},delete({id:t}){return e.delete(`usages/${t}`)}}}function ps({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,filter:n=null,q:u=null}={}){const o={limit:t,offset:s,sort:r,filter:n,q:u};return e.getAll("users",o)},create({id:t="",data:s}){return e.create(`users/${t}`,t,s)},get({id:t}){return e.get(`users/${t}`)},update({id:t,data:s}){return e.put(`users/${t}`,s)},getMfa({id:t}){return e.get(`users/${t}/mfa`)}}}function hs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null}={}){const n={limit:t,offset:s,filter:r};return e.getAll("webhooks",n)},create({id:t="",data:s}){return e.create(`webhooks/${t}`,t,s)},get({id:t}){return e.get(`webhooks/${t}`)},update({id:t,data:s}){return e.put(`webhooks/${t}`,s)},delete({id:t}){return e.delete(`webhooks/${t}`)}}}function ys({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,q:r=null,filter:n=null,sort:u=null}={}){const o={limit:t,offset:s,q:r,filter:n,sort:u};return e.getAll("websites",o)},create({id:t="",data:s}){return e.create(`websites/${t}`,t,s)},get({id:t}){return e.get(`websites/${t}`)},update({id:t,data:s}){return e.put(`websites/${t}`,s)},delete({id:t}){return e.delete(`websites/${t}`)}}}class As{constructor({apiHandler:t}){this.accountRegistrationSettings=Lt({apiHandler:t}),this.account=zt({apiHandler:t}),this.allowlists=Ut({apiHandler:t}),this.amlChecks=Vt({apiHandler:t}),this.amlSettings=Jt({apiHandler:t}),this.apiKeys=Wt({apiHandler:t}),this.applicationInstances=Gt({apiHandler:t}),this.applications=Yt({apiHandler:t}),this.balanceTransactions=Qt({apiHandler:t}),this.billingPortals=_t({apiHandler:t}),this.blocklists=Xt({apiHandler:t}),this.broadcastMessages=Zt({apiHandler:t}),this.cashiers=Ht({apiHandler:t}),this.checkoutForms=te({apiHandler:t}),this.coupons=ee({apiHandler:t}),this.creditMemos=se({apiHandler:t}),this.customDomains=re({apiHandler:t}),this.customFields=ne({apiHandler:t}),this.customerAuthentication=ue({apiHandler:t}),this.customers=oe({apiHandler:t}),this.depositCustomPropertySets=le({apiHandler:t}),this.depositRequests=ce({apiHandler:t}),this.depositStrategies=ie({apiHandler:t}),this.digitalWallets=ge({apiHandler:t}),this.disputes=ae({apiHandler:t}),this.emailDeliverySettings=me({apiHandler:t}),this.emailMessages=fe({apiHandler:t}),this.emailNotifications=$e({apiHandler:t}),this.events=pe({apiHandler:t}),this.externalIdentifiers=he({apiHandler:t}),this.externalServicesSettings=ye({apiHandler:t}),this.fees=Ae({apiHandler:t}),this.files=Re({apiHandler:t}),this.gatewayAccounts=be({apiHandler:t}),this.integrations=we({apiHandler:t}),this.invoices=ke({apiHandler:t}),this.journalAccounts=ve({apiHandler:t}),this.journalEntries=de({apiHandler:t}),this.journalRecords=qe({apiHandler:t}),this.kycDocuments=Te({apiHandler:t}),this.kycRequests=Ie({apiHandler:t}),this.kycSettings=Se({apiHandler:t}),this.lists=Ee({apiHandler:t}),this.memberships=Pe({apiHandler:t}),this.orderCancellations=xe({apiHandler:t}),this.orderPauses=Ce({apiHandler:t}),this.orderReactivations=De({apiHandler:t}),this.orders=je({apiHandler:t}),this.organizationExports=Me({apiHandler:t}),this.organizations=Oe({apiHandler:t}),this.paymentCardsBankNames=Fe({apiHandler:t}),this.paymentInstruments=Be({apiHandler:t}),this.paymentMethods=Ke({apiHandler:t}),this.paymentTokens=Ne({apiHandler:t}),this.payoutRequestAllocations=Le({apiHandler:t}),this.payoutRequestBatches=ze({apiHandler:t}),this.payoutRequests=Ue({apiHandler:t}),this.payouts=Ve({apiHandler:t}),this.plans=Je({apiHandler:t}),this.previews=We({apiHandler:t}),this.products=Ge({apiHandler:t}),this.profile=Ye({apiHandler:t}),this.purchase=Qe({apiHandler:t}),this.quotes=_e({apiHandler:t}),this.resource=Xe({apiHandler:t}),this.riskScoreRules=Ze({apiHandler:t}),this.roles=He({apiHandler:t}),this.search=ts({apiHandler:t}),this.segments=es({apiHandler:t}),this.sendThroughAttribution=ss({apiHandler:t}),this.serviceCredentials=rs({apiHandler:t}),this.shippingRates=ns({apiHandler:t}),this.status=us({apiHandler:t}),this.subscriptionCancellations=os({apiHandler:t}),this.subscriptionPauses=ls({apiHandler:t}),this.subscriptionReactivations=cs({apiHandler:t}),this.subscriptions=is({apiHandler:t}),this.tags=gs({apiHandler:t}),this.tagsRules=as({apiHandler:t}),this.tracking=ms({apiHandler:t}),this.transactions=fs({apiHandler:t}),this.usages=$s({apiHandler:t}),this.users=ps({apiHandler:t}),this.webhooks=hs({apiHandler:t}),this.websites=ys({apiHandler:t}),this.addRequestInterceptor=t.addRequestInterceptor,this.removeRequestInterceptor=t.removeRequestInterceptor,this.addResponseInterceptor=t.addResponseInterceptor,this.removeResponseInterceptor=t.removeResponseInterceptor,this.setTimeout=t.setTimeout,this.setProxyAgent=t.setProxyAgent,this.setSessionToken=t.setSessionToken,this.setPublishableKey=t.setPublishableKey,this.setEndpoints=t.setEndpoints,this.getCancellationToken=t.getCancellationToken,this.generateSignature=t.generateSignature}}function Rs({apiHandler:e}){return{getCustomerLifetimeSummaryMetrics({customerId:t}){return e.get(`customers/${t}/summary-metrics`)}}}function bs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,sort:r=null,expand:n=null,filter:u=null,q:o=null,criteria:l=null}={}){const a={limit:t,offset:s,sort:r,expand:n,filter:u,q:o,criteria:l};return e.getAll("data-exports",a)},queue({id:t="",data:s,expand:r=null}){const n={expand:r};return e.create(`data-exports/${t}`,t,s,n)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`data-exports/${t}`,r)},update({id:t,data:s,expand:r=null}){const n={expand:r};return e.put(`data-exports/${t}`,s,n)},delete({id:t}){return e.delete(`data-exports/${t}`)}}}function ws({apiHandler:e}){return{getAmlCheckHistogramReport({periodStart:t=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,includePropagatedResults:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationPeriod:r,metric:n,includePropagatedResults:u,filter:o};return e.get("histograms/aml-checks",l)},getTransactionHistogramReport({periodStart:t=null,periodEnd:s=null,aggregationPeriod:r=null,metric:n=null,filter:u=null}){const o={periodStart:t,periodEnd:s,aggregationPeriod:r,metric:n,filter:u};return e.get("histograms/transactions",o)}}}function ks({apiHandler:e}){return{getApiLogSummary({periodStart:t=null,periodEnd:s=null,filter:r=null,limit:n=null,offset:u=null}){const o={periodStart:t,periodEnd:s,filter:r,limit:n,offset:u};return e.get("reports/api-log-summary",o)},getAmlChecks({periodStart:t=null,periodEnd:s=null,metric:r=null,includePropagatedResults:n=null,filter:u=null}){const o={periodStart:t,periodEnd:s,metric:r,includePropagatedResults:n,filter:u};return e.get("reports/aml-checks",o)},getAmlChecksInheritedSummary({periodStart:t=null,periodEnd:s=null,filter:r=null}){const n={periodStart:t,periodEnd:s,filter:r};return e.get("reports/aml-checks-inherited-summary",n)},getCumulativeSubscriptions({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/cumulative-subscriptions",l)},getDashboardMetrics({periodStart:t=null,periodEnd:s=null,metrics:r=null,segments:n=null}){const u={periodStart:t,periodEnd:s,metrics:r,segments:n};return e.get("reports/dashboard",u)},getDccMarkup({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/dcc-markup",l)},getDeclinedTransactions({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/declined-transactions",l)},getDeferredRevenue({currency:t=null,asOfDate:s=null,limit:r=null,offset:n=null,filter:u=null}){const o={currency:t,asOfDate:s,limit:r,offset:n,filter:u};return e.get("reports/deferred-revenue",o)},getDisputes({aggregationField:t=null,periodMonth:s=null,limit:r=null,offset:n=null,filter:u=null}){const o={aggregationField:t,periodMonth:s,limit:r,offset:n,filter:u};return e.get("reports/disputes",o)},getEventsTriggeredSummary({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/events-triggered",u)},getTriggeredEventRuleReport({eventType:t,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null}){const o={periodStart:s,periodEnd:r,limit:n,offset:u};return e.get(`reports/events-triggered/${t}/rules`,o)},getFutureRenewals({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/future-renewals",u)},getJournal({currency:t=null,bookedFrom:s=null,bookedTo:r=null,recognizedAt:n=null,aggregationField:u=null,limit:o=null,offset:l=null,filter:a=null}){const p={currency:t,bookedFrom:s,bookedTo:r,recognizedAt:n,aggregationField:u,limit:o,offset:l,filter:a};return e.get("reports/journal",p)},getJournalSummary({periodStart:t=null,periodEnd:s=null,currency:r=null,aggregationField:n=null,amountField:u=null,journalAccountIds:o=null}){const l={periodStart:t,periodEnd:s,currency:r,aggregationField:n,amountField:u,journalAccountIds:o};return e.get("reports/journal-summary",l)},getKycAcceptanceSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-acceptance-summary",r)},getKycRejectionSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-rejection-summary",r)},getKycRequestSummary({periodStart:t=null,periodEnd:s=null}){const r={periodStart:t,periodEnd:s};return e.get("reports/kyc-request-summary",r)},getMonthlyRecurringRevenue({currency:t,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={currency:t,periodStart:s,periodEnd:r,limit:n,offset:u};return e.get("reports/monthly-recurring-revenue",o)},getAnnualRecurringRevenue({currency:t,periodStart:s,periodEnd:r,limit:n=null,offset:u=null}){const o={currency:t,periodStart:s,periodEnd:r,limit:n,offset:u};return e.get("reports/annual-recurring-revenue",o)},getRenewalSales({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/renewal-sales",u)},getRetentionPercentage({aggregationField:t=null,aggregationPeriod:s=null,includeSwitchedSubscriptions:r=null,periodStart:n=null,periodEnd:u=null,limit:o=null,offset:l=null,filter:a=null,criteria:p=null}){const v={aggregationField:t,aggregationPeriod:s,includeSwitchedSubscriptions:r,periodStart:n,periodEnd:u,limit:o,offset:l,filter:a,criteria:p};return e.get("reports/retention-percentage",v)},getRetentionValue({aggregationField:t=null,aggregationPeriod:s=null,includeRefunds:r=null,includeDisputes:n=null,periodStart:u=null,periodEnd:o=null,limit:l=null,offset:a=null,filter:p=null,sort:v=null,criteria:D=null}){const j={aggregationField:t,aggregationPeriod:s,includeRefunds:r,includeDisputes:n,periodStart:u,periodEnd:o,limit:l,offset:a,filter:p,sort:v,criteria:D};return e.get("reports/retention-value",j)},getRevenueWaterfall({currency:t,issuedFrom:s=null,issuedTo:r=null,recognizedTo:n=null}){const u={currency:t,issuedFrom:s,issuedTo:r,recognizedTo:n};return e.get("reports/revenue-waterfall",u)},getSubscriptionCancellation({periodStart:t=null,periodEnd:s=null,aggregationField:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return e.get("reports/subscription-cancellation",l)},getSubscriptionRenewal({periodStart:t=null,periodEnd:s=null,limit:r=null,offset:n=null}){const u={periodStart:t,periodEnd:s,limit:r,offset:n};return e.get("reports/subscription-renewal",u)},getTax({periodStart:t=null,periodEnd:s=null,accountingMethod:r=null,limit:n=null,offset:u=null}){const o={periodStart:t,periodEnd:s,accountingMethod:r,limit:n,offset:u};return e.get("reports/tax",o)},getTimeSeriesTransaction({type:t=null,subaggregate:s=null,periodStart:r=null,periodEnd:n=null,limit:u=null,offset:o=null}){const l={type:t,subaggregate:s,periodStart:r,periodEnd:n,limit:u,offset:o};return e.get("reports/time-series-transaction",l)},getTransactionsTimeDispute({aggregationField:t=null,periodStart:s=null,periodEnd:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={aggregationField:t,periodStart:s,periodEnd:r,limit:n,offset:u,filter:o};return e.get("reports/transactions-time-dispute",l)},getTransactions({periodStart:t=null,periodEnd:s=null,aggregationField:r=null,limit:n=null,offset:u=null,filter:o=null}){const l={periodStart:t,periodEnd:s,aggregationField:r,limit:n,offset:u,filter:o};return e.get("reports/transactions",l)}}}function vs({apiHandler:e}){return{getSubscriptionSummaryMetrics({subscriptionId:t}){return e.get(`subscriptions/${t}/summary-metrics`)}}}function ds({apiHandler:e}){return{getActivityFeed({eventTypes:t=null,limit:s=1e3,offset:r=0}){const n={eventTypes:t,limit:s,offset:r};return e.getAll("activity-feed",n)},getTransaction({id:t="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return e.getAll(`transactions/${t}/timeline`,u)},getCustomer({id:t="",eventTypes:s=null,limit:r=1e3,offset:n=0}){const u={eventTypes:s,limit:r,offset:n};return e.getAll(`customers/${t}/timeline`,u)}}}function qs({apiHandler:e}){return{query(){return e.get("location")}}}const k={CustomersResource:Rs,DataExportsResource:bs,HistogramsResource:ws,ReportsResource:ks,SubscriptionsResource:vs,TimelinesResource:ds,LocationResource:qs};class Ts{constructor({apiHandler:t}){this.customers=k.CustomersResource({apiHandler:t}),this.dataExports=k.DataExportsResource({apiHandler:t}),this.histograms=k.HistogramsResource({apiHandler:t}),this.reports=k.ReportsResource({apiHandler:t}),this.subscriptions=k.SubscriptionsResource({apiHandler:t}),this.timelines=k.TimelinesResource({apiHandler:t}),this.location=k.LocationResource({apiHandler:t}),this.addRequestInterceptor=t.addRequestInterceptor,this.removeRequestInterceptor=t.removeRequestInterceptor,this.addResponseInterceptor=t.addResponseInterceptor,this.removeResponseInterceptor=t.removeResponseInterceptor,this.setTimeout=t.setTimeout,this.setProxyAgent=t.setProxyAgent,this.setSessionToken=t.setSessionToken,this.setEndpoints=t.setEndpoints,this.getCancellationToken=t.getCancellationToken}}function Is({apiHandler:e}){return{get({expand:t=null}={}){const s={expand:t};return e.get("account",s)},update({data:t}){return e.patch("account",t)},requestPasswordReset({data:t}){return e.post("account/forgot-password",t)},changePassword({data:t}){return e.patch("account/password",t)},resendEmailVerification({data:t}){return e.post("account/resend-verification",t)},confirmPasswordReset({token:t,data:s}){return e.post(`account/reset-password/${t}`,s)},verifyEmail({token:t}){return e.post(`account/verification/${t}`)},register({data:t}){return e.post("register",t)}}}function Ss({apiHandler:e}){return{login({data:t}){return e.post("login",t)},logout(){return e.post("logout")}}}function Es({apiHandler:e}){return{get({slug:t}){return e.get(`billing-portals/${t}`)}}}function Ps({apiHandler:e}){return{get({id:t}){return e.get(`cashiers/${t}`)},cancelPayoutRequests({id:t,data:s}){return e.post(`cashiers/${t}/cancel-payout-requests`,s)}}}function xs({apiHandler:e}){return{get({id:t}){return e.get(`checkout-forms/${t}`)}}}function Cs({apiHandler:e}){return{getAll({resource:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.getAll(`custom-fields/${t}`,n)}}}function Ds({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`deposit-requests/${t}`,r)}}}function js({apiHandler:e}){return{create({data:t}){return e.post("deposit",t)}}}function Ms({apiHandler:e}){return{get({id:t}){return e.get(`deposit-strategies/${t}`)}}}function Os({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("invoices",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`invoices/${t}`,r)},update({id:t,data:s}){return e.patch(`invoices/${t}`,s)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`invoices/${t}`,s)}}}function Fs({apiHandler:e}){return{getAll({limit:t=null,offset:s=null}={}){const r={limit:t,offset:s};return e.getAll("kyc-documents",r)},create({data:t}){return e.post("kyc-documents",t)},get({id:t}){return e.get(`kyc-documents/${t}`)},update({id:t,data:s}){return e.patch(`kyc-documents/${t}`,s)}}}function Bs({apiHandler:e}){return{create({data:t}){return e.post("kyc-liveness-sessions",t)},get({id:t}){return e.get(`kyc-liveness-sessions/${t}`)},finish({id:t}){return e.post(`kyc-liveness-sessions/${t}/finish`)}}}function Ks({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`kyc-requests/${t}`,r)}}}function Ns({apiHandler:e}){return{getUpcomingInvoice({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}/upcoming-invoice`,r)},getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("orders",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`orders/${t}`,r)},update({id:t,data:s}){return e.patch(`orders/${t}`,s)},cancel({id:t,data:s}){return e.post(`orders/${t}/cancellation`,s)},pause({id:t,data:s}){return e.post(`orders/${t}/pause`,s)}}}function Ls({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("payment-instruments",o)},create({data:t}){return e.post("payment-instruments",t)},get({id:t,limit:s=null,offset:r=null}){const n={limit:s,offset:r};return e.get(`payment-instruments/${t}`,n)},update({id:t,data:s}){return e.patch(`payment-instruments/${t}`,s)},deactivate({id:t}){return e.post(`payment-instruments/${t}/deactivation`)},getSetupTransaction({id:t}){return e.get(`payment-instruments/${t}/setup`)},setup({id:t,data:s}){return e.post(`payment-instruments/${t}/setup`,s)}}}function zs({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("payout-requests",o)},create({data:t}){return e.post("payout-requests",t)},get({id:t}){return e.get(`payout-requests/${t}`)},update({id:t,data:s}){return e.patch(`payout-requests/${t}`,s)}}}function Us({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null,expand:o=null}={}){const l={filter:t,sort:s,limit:r,offset:n,q:u,expand:o};return e.getAll("plans",l)},get({id:t,expand:s=null}){const r={expand:s};return e.get(`plans/${t}`,r)}}}function Vs({apiHandler:e}){return{getAll({filter:t=null,sort:s=null,limit:r=null,offset:n=null,q:u=null}={}){const o={filter:t,sort:s,limit:r,offset:n,q:u};return e.getAll("products",o)},get({id:t}){return e.get(`products/${t}`)}}}function Js({apiHandler:e}){return{payment({data:t}){return e.post("payment",t)},purchase({data:t}){return e.post("purchase",t)},preview({data:t}){return e.post("preview-purchase",t)},readyToPay({data:t}){return e.post("ready-to-pay",t)}}}function Ws({apiHandler:e}){return{get({id:t,expand:s=null}){const r={expand:s};return e.get(`quotes/${t}`,r)},accept({id:t}){return e.post(`quotes/${t}/accept`)},reject({id:t}){return e.post(`quotes/${t}/reject`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`quotes/${t}`,s)}}}function Gs({apiHandler:e}){return{readyToPayout({data:t}){return e.post("ready-to-payout",t)}}}function Ys({apiHandler:e}){return{reactivation({data:t}){return e.post("subscription-reactivations",t)}}}function Qs({apiHandler:e}){return{changeItems({id:t,data:s}){return e.post(`subscriptions/${t}/change-items`,s)},create({data:t}){return e.post("subscriptions",t)}}}function _s({apiHandler:e}){return{getAll({limit:t=null,offset:s=null,filter:r=null,q:n=null,sort:u=null}={}){const o={limit:t,offset:s,filter:r,q:n,sort:u};return e.getAll("transactions",o)},get({id:t}){return e.get(`transactions/${t}`)},getDcc({id:t}){return e.get(`transactions/${t}/dcc`)},updateDcc({id:t,data:s}){return e.patch(`transactions/${t}/dcc`,s)},finishKyc({id:t,token:s}){return e.post(`transactions/${t}/${s}/continue`)},skipKyc({id:t,token:s}){return e.post(`transactions/${t}/${s}/bypass`)},downloadPDF({id:t}){const s={headers:w,responseType:"arraybuffer"};return e.download(`transactions/${t}`,s)},update({id:t,data:s}){return e.patch(`transactions/${t}`,s)}}}function Xs({apiHandler:e}){return{get({id:t}){return e.get(`websites/${t}`)}}}class Zs{constructor({apiHandler:t}){this.account=Is({apiHandler:t}),this.authorization=Ss({apiHandler:t}),this.billingPortals=Es({apiHandler:t}),this.cashiers=Ps({apiHandler:t}),this.checkoutForms=xs({apiHandler:t}),this.customFields=Cs({apiHandler:t}),this.depositRequests=Ds({apiHandler:t}),this.deposit=js({apiHandler:t}),this.depositStrategies=Ms({apiHandler:t}),this.invoices=Os({apiHandler:t}),this.kycDocuments=Fs({apiHandler:t}),this.kycLivenessSessions=Bs({apiHandler:t}),this.kycRequests=Ks({apiHandler:t}),this.orders=Ns({apiHandler:t}),this.paymentInstruments=Ls({apiHandler:t}),this.payoutRequests=zs({apiHandler:t}),this.plans=Us({apiHandler:t}),this.products=Vs({apiHandler:t}),this.purchase=Js({apiHandler:t}),this.quotes=Ws({apiHandler:t}),this.readyToPayout=Gs({apiHandler:t}),this.subscriptionReactivations=Ys({apiHandler:t}),this.subscriptions=Qs({apiHandler:t}),this.transactions=_s({apiHandler:t}),this.websites=Xs({apiHandler:t}),this.checkoutForm=this.checkoutForms,this.billingPortal=this.billingPortals,this.addRequestInterceptor=t.addRequestInterceptor,this.removeRequestInterceptor=t.removeRequestInterceptor,this.addResponseInterceptor=t.addResponseInterceptor,this.removeResponseInterceptor=t.removeResponseInterceptor,this.setTimeout=t.setTimeout,this.setProxyAgent=t.setProxyAgent,this.setSessionToken=t.setSessionToken,this.setPublishableKey=t.setPublishableKey,this.setEndpoints=t.setEndpoints,this.getCancellationToken=t.getCancellationToken,this.generateSignature=t.generateSignature}}function Hs({apiHandler:e}){return new As({apiHandler:e})}function tr({apiHandler:e}){return new Ts({apiHandler:e})}function er({apiHandler:e}){return new Zs({apiHandler:e})}const x={live:"https://api.rebilly.com",sandbox:"https://api-sandbox.rebilly.com"},C=6e3;function U({apiKey:e=null,sandbox:t=!1,timeout:s=C,organizationId:r=null,urls:n=x,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:e,apiVersion:"",isSandbox:t,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=P({options:o});return Hs({apiHandler:l})}function sr({apiKey:e=null,sandbox:t=!1,timeout:s=C,organizationId:r=null,urls:n=x,internalOptions:u=null}={}){if(!n.live||!n.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof n.live!="string"||typeof n.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const o={apiEndpoints:n,apiKey:e,apiVersion:"experimental",isSandbox:t,requestTimeout:s,jwt:null,organizationId:r,appName:(u==null?void 0:u.appName)??null},l=P({options:o});return tr({apiHandler:l})}function rr({publishableKey:e=null,jwt:t=null,sandbox:s=!1,timeout:r=C,organizationId:n=null,urls:u=x,internalOptions:o=null}={}){if(!u.live||!u.sandbox)throw new Error("RebillyAPI urls config must include a key for both `live` and `sandbox`");if(typeof u.live!="string"||typeof u.sandbox!="string")throw new Error("RebillyAPI urls config `live` and `sandbox` must be strings");const l={apiEndpoints:u,publishableKey:e,jwt:t,apiVersion:"storefront",isSandbox:s,requestTimeout:r,organizationId:n,appName:(o==null?void 0:o.appName)??null},a=P({options:l});return a.setSessionToken(l.jwt),er({apiHandler:a})}m.RebillyAPI=U,m.RebillyErrors=h,m.RebillyExperimentalAPI=sr,m.RebillyStorefrontAPI=rr,m.cancellation=Nt,m.default=U,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
package/src/api-instance.spec.js
CHANGED
|
@@ -21,6 +21,7 @@ describe('when I create an API instance', () => {
|
|
|
21
21
|
it('should expose resource methods', () => {
|
|
22
22
|
expect(typeof apiInstance.customers).toBe('object');
|
|
23
23
|
expect(typeof apiInstance.account).toBe('object');
|
|
24
|
+
expect(typeof apiInstance.accountRegistrationSettings).toBe('object');
|
|
24
25
|
expect(typeof apiInstance.apiKeys).toBe('object');
|
|
25
26
|
expect(typeof apiInstance.blocklists).toBe('object');
|
|
26
27
|
expect(typeof apiInstance.checkoutForms).toBe('object');
|