@aifeatures/backend 0.3.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +2321 -175
- package/dist/index.d.ts +2321 -175
- package/dist/index.js +5 -5
- package/package.json +9 -8
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var U=Object.defineProperty;var rr=Object.getOwnPropertyDescriptor;var sr=Object.getOwnPropertyNames;var or=Object.prototype.hasOwnProperty;var nr=(e,r)=>{for(var s in r)U(e,s,{get:r[s],enumerable:!0})},ar=(e,r,s,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of sr(r))!or.call(e,n)&&n!==s&&U(e,n,{get:()=>r[n],enumerable:!(o=rr(r,n))||o.enumerable});return e};var ir=e=>ar(U({},"__esModule",{value:!0}),e);var mr={};nr(mr,{accountCancelSubscription:()=>zt,accountCreatePortalSession:()=>$t,accountLogin:()=>Ft,accountLogout:()=>Mt,accountManageCancel:()=>Qt,accountManageGetSubscription:()=>Jt,accountManagePortalSession:()=>_t,accountManageVerify:()=>Ht,accountMe:()=>jt,accountReactivateSubscription:()=>Bt,accountSubscribe:()=>qt,accountUpdateSubscriptionAddress:()=>Nt,accountVerify:()=>Vt,actOnManageLink:()=>Xt,adjustVariantInventory:()=>Ce,attachProductFile:()=>le,cancelSubscription:()=>Ne,createCartCheckout:()=>Gt,createCheckout:()=>At,createClient:()=>x,createConfig:()=>v,createCustomer:()=>Le,createEventDestination:()=>Et,createEventDestinationWithSiteToken:()=>ft,createForm:()=>nt,createFormWithSiteToken:()=>_e,createMultiItemTestOrder:()=>Se,createOption:()=>Te,createPreviewSession:()=>Je,createProduct:()=>ie,createProductWithSiteToken:()=>ne,createSite:()=>Xe,createTestOrder:()=>he,createTestSubscription:()=>Ee,createVariant:()=>ye,deleteEventDestination:()=>St,deleteEventDestinationWithSiteToken:()=>vt,deleteForm:()=>at,deleteOption:()=>be,deleteProduct:()=>ce,deleteSite:()=>Ye,deleteSubmission:()=>ut,deleteVariant:()=>Oe,downloadAttachment:()=>dt,downloadFile:()=>It,generateVariants:()=>me,getBusinessSummary:()=>Fe,getCartSummary:()=>Lt,getCustomer:()=>We,getEventDestination:()=>yt,getEventDestinationSecret:()=>Ot,getEventDestinationSecretWithSiteToken:()=>gt,getForm:()=>it,getGeo:()=>Ut,getNextPayout:()=>qe,getOrder:()=>ge,getOrderSession:()=>Wt,getPaymentsStatus:()=>se,getPerson:()=>je,getProduct:()=>pe,getPublicProduct:()=>xt,getSalesSummary:()=>Ve,getSite:()=>Ze,getSiteCheckoutPause:()=>tt,getSubmission:()=>lt,listCustomers:()=>Ge,listEventDeliveries:()=>Dt,listEventDeliveriesWithSiteToken:()=>Pt,listEventDestinations:()=>ht,listEventDestinationsWithSiteToken:()=>bt,listForms:()=>ot,listFormsWithSiteToken:()=>Qe,listOrdersWithSiteToken:()=>we,listPeople:()=>Me,listProducts:()=>ae,listProductsWithSiteToken:()=>oe,listSites:()=>Ke,listSubmissions:()=>pt,listSubscriptions:()=>Be,pauseSiteCheckout:()=>rt,reactivateSiteSubscriptionsTeardown:()=>He,refundOrder:()=>Pe,resendOrderReceipt:()=>ke,resetOrderDownloads:()=>xe,resetWebhookEvent:()=>Ae,resolveManageLink:()=>Kt,retryEventDelivery:()=>Tt,retryEventDeliveryWithSiteToken:()=>kt,revokeCustomerAccess:()=>Ue,rotateEventDestinationSecret:()=>mt,rotateEventDestinationSecretWithSiteToken:()=>wt,setOrderFulfillment:()=>ze,setProductSubscription:()=>de,setProductVariants:()=>Re,setVariantInventory:()=>ve,teardownSiteSubscriptions:()=>$e,updateCustomer:()=>Ie,updateEventDestination:()=>Rt,updateEventDestinationWithSiteToken:()=>Ct,updateForm:()=>ct,updateOption:()=>fe,updateProduct:()=>ue,updateSite:()=>et,updateSiteAccountRoute:()=>re,updateSiteDomains:()=>st,updateSitePayments:()=>te,updateVariant:()=>De});module.exports=ir(mr);var H=(e,r,s)=>{typeof s=="string"?e.append(r,s):e.append(r,JSON.stringify(s))};var F={bodySerializer:e=>JSON.stringify(e,(r,s)=>typeof s=="bigint"?s.toString():s)},V={bodySerializer:e=>{let r=new URLSearchParams;return Object.entries(e).forEach(([s,o])=>{o!=null&&(Array.isArray(o)?o.forEach(n=>H(r,s,n)):H(r,s,o))}),r.toString()}};var cr={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Tr=Object.entries(cr);var J=({onRequest:e,onSseError:r,onSseEvent:s,responseTransformer:o,responseValidator:n,sseDefaultRetryDelay:u,sseMaxRetryAttempts:c,sseMaxRetryDelay:i,sseSleepFn:p,url:d,...a})=>{let S,w=p??(l=>new Promise(y=>setTimeout(y,l)));return{stream:async function*(){let l=u??3e3,y=0,T=a.signal??new AbortController().signal;for(;!T.aborted;){y++;let g=a.headers instanceof Headers?a.headers:new Headers(a.headers);S!==void 0&&g.set("Last-Event-ID",S);try{let b={redirect:"follow",...a,body:a.serializedBody,headers:g,signal:T},D=new Request(d,b);e&&(D=await e(d,b));let E=await(a.fetch??globalThis.fetch)(D);if(!E.ok)throw new Error(`SSE failed: ${E.status} ${E.statusText}`);if(!E.body)throw new Error("No body in SSE response");let R=E.body.pipeThrough(new TextDecoderStream).getReader(),P="",q=()=>{try{R.cancel()}catch{}};T.addEventListener("abort",q);try{for(;;){let{done:Yt,value:Zt}=await R.read();if(Yt)break;P+=Zt,P=P.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
|
-
`);let z=
|
|
3
|
+
`);let z=P.split(`
|
|
4
4
|
|
|
5
|
-
`);
|
|
6
|
-
`),
|
|
7
|
-
`);try{b=JSON.parse(E),N=!0}catch{b=E}}N&&(n&&await n(b),a&&(b=await a(b))),t?.({data:b,event:B,id:y,retry:c}),I.length&&(yield b)}}}finally{C.removeEventListener("abort",W),f.releaseLock()}break}catch(T){if(r?.(T),p!==void 0&&O>=p)break;let R=Math.min(c*2**(O-1),i??3e4);await P(R)}}}()}};var Er=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Rr=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Cr=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},v=({allowReserved:e,explode:r,name:t,style:a,value:n})=>{if(!r){let i=(e?n:n.map(d=>encodeURIComponent(d))).join(Rr(a));switch(a){case"label":return`.${i}`;case"matrix":return`;${t}=${i}`;case"simple":return i;default:return`${t}=${i}`}}let u=Er(a),p=n.map(i=>a==="label"||a==="simple"?e?i:encodeURIComponent(i):w({allowReserved:e,name:t,value:i})).join(u);return a==="label"||a==="matrix"?u+p:p},w=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},U=({allowReserved:e,explode:r,name:t,style:a,value:n,valueOnly:u})=>{if(n instanceof Date)return u?n.toISOString():`${t}=${n.toISOString()}`;if(a!=="deepObject"&&!r){let d=[];Object.entries(n).forEach(([o,y])=>{d=[...d,o,e?y:encodeURIComponent(y)]});let l=d.join(",");switch(a){case"form":return`${t}=${l}`;case"label":return`.${l}`;case"matrix":return`;${t}=${l}`;default:return l}}let p=Cr(a),i=Object.entries(n).map(([d,l])=>w({allowReserved:e,name:a==="deepObject"?`${t}[${d}]`:d,value:l})).join(p);return a==="label"||a==="matrix"?p+i:i};var Tr=/\{[^{}]+\}/g,br=({path:e,url:r})=>{let t=r,a=r.match(Tr);if(a)for(let n of a){let u=!1,p=n.substring(1,n.length-1),i="simple";p.endsWith("*")&&(u=!0,p=p.substring(0,p.length-1)),p.startsWith(".")?(p=p.substring(1),i="label"):p.startsWith(";")&&(p=p.substring(1),i="matrix");let d=e[p];if(d==null)continue;if(Array.isArray(d)){t=t.replace(n,v({explode:u,name:p,style:i,value:d}));continue}if(typeof d=="object"){t=t.replace(n,U({explode:u,name:p,style:i,value:d,valueOnly:!0}));continue}if(i==="matrix"){t=t.replace(n,`;${w({name:p,value:d})}`);continue}let l=encodeURIComponent(i==="label"?`.${d}`:d);t=t.replace(n,l)}return t},H=({baseUrl:e,path:r,query:t,querySerializer:a,url:n})=>{let u=n.startsWith("/")?n:`/${n}`,p=(e??"")+u;r&&(p=br({path:r,url:p}));let i=t?a(t):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(p+=`?${i}`),p};function J(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var Q=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var _=({parameters:e={},...r}={})=>a=>{let n=[];if(a&&typeof a=="object")for(let u in a){let p=a[u];if(p==null)continue;let i=e[u]||r;if(Array.isArray(p)){let d=v({allowReserved:i.allowReserved,explode:!0,name:u,style:"form",value:p,...i.array});d&&n.push(d)}else if(typeof p=="object"){let d=U({allowReserved:i.allowReserved,explode:!0,name:u,style:"deepObject",value:p,...i.object});d&&n.push(d)}else{let d=w({allowReserved:i.allowReserved,name:u,value:p});d&&n.push(d)}}return n.join("&")},K=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},Dr=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,X=async({security:e,...r})=>{for(let t of e){if(Dr(r,t.name))continue;let a=await Q(t,r.auth);if(!a)continue;let n=t.name??"Authorization";switch(t.in){case"query":r.query||(r.query={}),r.query[n]=a;break;case"cookie":r.headers.append("Cookie",`${n}=${a}`);break;case"header":default:r.headers.set(n,a);break}}},V=e=>H({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:_(e.querySerializer),url:e.url}),q=(e,r)=>{let t={...e,...r};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=L(e.headers,r.headers),t},wr=e=>{let r=[];return e.forEach((t,a)=>{r.push([a,t])}),r},L=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let a=t instanceof Headers?wr(t):Object.entries(t);for(let[n,u]of a)if(u===null)r.delete(n);else if(Array.isArray(u))for(let p of u)r.append(n,p);else u!==void 0&&r.set(n,typeof u=="object"?JSON.stringify(u):u)}return r},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let a=this.getInterceptorIndex(r);return this.fns[a]?(this.fns[a]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},Y=()=>({error:new k,request:new k,response:new k}),Pr=_({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),gr={"Content-Type":"application/json"},D=(e={})=>({...A,headers:gr,parseAs:"auto",querySerializer:Pr,...e});var G=(e={})=>{let r=q(D(),e),t=()=>({...r}),a=l=>(r=q(r,l),t()),n=Y(),u=async l=>{let o={...r,...l,fetch:l.fetch??r.fetch??globalThis.fetch,headers:L(r.headers,l.headers),serializedBody:void 0};o.security&&await X({...o,security:o.security}),o.requestValidator&&await o.requestValidator(o),o.body!==void 0&&o.bodySerializer&&(o.serializedBody=o.bodySerializer(o.body)),(o.body===void 0||o.serializedBody==="")&&o.headers.delete("Content-Type");let y=V(o);return{opts:o,url:y}},p=async l=>{let{opts:o,url:y}=await u(l),P={redirect:"follow",...o,body:J(o)},S=new Request(y,P);for(let h of n.request.fns)h&&(S=await h(S,o));let F=o.fetch,c;try{c=await F(S)}catch(h){let m=h;for(let f of n.error.fns)f&&(m=await f(h,void 0,S,o));if(m=m||{},o.throwOnError)throw m;return o.responseStyle==="data"?void 0:{error:m,request:S,response:void 0}}for(let h of n.response.fns)h&&(c=await h(c,S,o));let O={request:S,response:c};if(c.ok){let h=(o.parseAs==="auto"?K(c.headers.get("Content-Type")):o.parseAs)??"json";if(c.status===204||c.headers.get("Content-Length")==="0"){let f;switch(h){case"arrayBuffer":case"blob":case"text":f=await c[h]();break;case"formData":f=new FormData;break;case"stream":f=c.body;break;case"json":default:f={};break}return o.responseStyle==="data"?f:{data:f,...O}}let m;switch(h){case"arrayBuffer":case"blob":case"formData":case"json":case"text":m=await c[h]();break;case"stream":return o.responseStyle==="data"?c.body:{data:c.body,...O}}return h==="json"&&(o.responseValidator&&await o.responseValidator(m),o.responseTransformer&&(m=await o.responseTransformer(m))),o.responseStyle==="data"?m:{data:m,...O}}let C=await c.text(),g;try{g=JSON.parse(C)}catch{}let T=g??C,R=T;for(let h of n.error.fns)h&&(R=await h(T,c,S,o));if(R=R||{},o.throwOnError)throw R;return o.responseStyle==="data"?void 0:{error:R,...O}},i=l=>o=>p({...o,method:l}),d=l=>async o=>{let{opts:y,url:P}=await u(o);return $({...y,body:y.body,headers:y.headers,method:l,onRequest:async(S,F)=>{let c=new Request(S,F);for(let O of n.request.fns)O&&(c=await O(c,y));return c},url:P})};return{buildUrl:V,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:t,head:i("HEAD"),interceptors:n,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:p,setConfig:a,sse:{connect:d("CONNECT"),delete:d("DELETE"),get:d("GET"),head:d("HEAD"),options:d("OPTIONS"),patch:d("PATCH"),post:d("POST"),put:d("PUT"),trace:d("TRACE")},trace:i("TRACE")}};var s=G(D({baseUrl:"https://aifeatures.dev"}));var Z=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/payments",...e,headers:{"Content-Type":"application/json",...e.headers}}),ee=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/payments/status",...e}),re=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products",...e}),te=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products",...e,headers:{"Content-Type":"application/json",...e.headers}}),se=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/products",...e}),oe=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/products",...e,headers:{"Content-Type":"application/json",...e.headers}}),ne=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}",...e}),ae=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}",...e}),ie=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),pe=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/file",...e,headers:{"Content-Type":"application/json",...e.headers}}),de=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/test-order",...e,headers:{"Content-Type":"application/json",...e.headers}}),ue=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/test-orders",...e,headers:{"Content-Type":"application/json",...e.headers}}),ce=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/variants",...e,headers:{"Content-Type":"application/json",...e.headers}}),le=e=>(e.client??s).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/variants",...e,headers:{"Content-Type":"application/json",...e.headers}}),he=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}",...e}),me=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),ye=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/options",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/options/{optionId}",...e}),fe=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/options/{optionId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??s).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}/inventory",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}/inventory/adjust",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders",...e}),Ce=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}",...e}),Te=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/refund",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/resend-receipt",...e}),De=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/reset-downloads",...e}),we=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/webhook-events/{eventId}/reset",...e}),Pe=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers",...e}),ge=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers/{customerId}",...e}),ke=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers/{customerId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/summary",...e}),Fe=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sales-summary",...e}),Ie=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/people",...e}),ve=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/people/{email}",...e}),Ue=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/payouts/next",...e}),Le=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/fulfillment",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms",...e}),Ae=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites",...e}),qe=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}",...e}),ze=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}",...e}),Be=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/checkout-pause",...e}),Me=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/checkout-pause",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/domains",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/forms",...e}),Je=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/forms",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qe=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}",...e}),_e=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}",...e}),Ke=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}/submissions",...e}),Ye=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/submissions/{submissionId}",...e}),Ze=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/submissions/{submissionId}",...e}),er=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/submissions/{submissionId}/attachments/{attachmentId}",...e}),rr=e=>(e.client??s).get({url:"/v1/p/{productId}",...e}),tr=e=>(e.client??s).post({url:"/v1/p/{productId}/checkout",...e,headers:{"Content-Type":"application/json",...e.headers}}),sr=e=>(e.client??s).post({url:"/v1/p/checkout",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(e.client??s).post({url:"/v1/p/checkout/summary",...e,headers:{"Content-Type":"application/json",...e.headers}}),nr=e=>(e.client??s).get({url:"/v1/o/session/{sessionId}",...e}),ar=e=>(e.client??s).get({url:"/v1/d/{token}",...e}),ir=e=>(e?.client??s).get({url:"/v1/geo",...e});0&&(module.exports={adjustVariantInventory,attachProductFile,createCartCheckout,createCheckout,createClient,createConfig,createCustomer,createForm,createFormWithSiteToken,createMultiItemTestOrder,createOption,createProduct,createProductWithSiteToken,createSite,createTestOrder,createVariant,deleteForm,deleteOption,deleteProduct,deleteSite,deleteSubmission,deleteVariant,downloadAttachment,downloadFile,getBusinessSummary,getCartSummary,getCustomer,getForm,getGeo,getNextPayout,getOrder,getOrderSession,getPaymentsStatus,getPerson,getProduct,getPublicProduct,getSalesSummary,getSite,getSiteCheckoutPause,getSubmission,listCustomers,listForms,listFormsWithSiteToken,listOrdersWithSiteToken,listPeople,listProducts,listProductsWithSiteToken,listSites,listSubmissions,pauseSiteCheckout,refundOrder,resendOrderReceipt,resetOrderDownloads,resetWebhookEvent,setOrderFulfillment,setProductVariants,setVariantInventory,updateCustomer,updateForm,updateOption,updateProduct,updateSite,updateSiteDomains,updateSitePayments,updateVariant});
|
|
5
|
+
`);P=z.pop()??"";for(let er of z){let tr=er.split(`
|
|
6
|
+
`),G=[],B;for(let O of tr)if(O.startsWith("data:"))G.push(O.replace(/^data:\s*/,""));else if(O.startsWith("event:"))B=O.replace(/^event:\s*/,"");else if(O.startsWith("id:"))S=O.replace(/^id:\s*/,"");else if(O.startsWith("retry:")){let $=Number.parseInt(O.replace(/^retry:\s*/,""),10);Number.isNaN($)||(l=$)}let f,N=!1;if(G.length){let O=G.join(`
|
|
7
|
+
`);try{f=JSON.parse(O),N=!0}catch{f=O}}N&&(n&&await n(f),o&&(f=await o(f))),s?.({data:f,event:B,id:S,retry:l}),G.length&&(yield f)}}}finally{T.removeEventListener("abort",q),R.releaseLock()}break}catch(b){if(r?.(b),c!==void 0&&y>=c)break;let D=Math.min(l*2**(y-1),i??3e4);await w(D)}}}()}};var pr=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ur=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},lr=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},L=({allowReserved:e,explode:r,name:s,style:o,value:n})=>{if(!r){let i=(e?n:n.map(p=>encodeURIComponent(p))).join(ur(o));switch(o){case"label":return`.${i}`;case"matrix":return`;${s}=${i}`;case"simple":return i;default:return`${s}=${i}`}}let u=pr(o),c=n.map(i=>o==="label"||o==="simple"?e?i:encodeURIComponent(i):C({allowReserved:e,name:s,value:i})).join(u);return o==="label"||o==="matrix"?u+c:c},C=({allowReserved:e,name:r,value:s})=>{if(s==null)return"";if(typeof s=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?s:encodeURIComponent(s)}`},W=({allowReserved:e,explode:r,name:s,style:o,value:n,valueOnly:u})=>{if(n instanceof Date)return u?n.toISOString():`${s}=${n.toISOString()}`;if(o!=="deepObject"&&!r){let p=[];Object.entries(n).forEach(([a,S])=>{p=[...p,a,e?S:encodeURIComponent(S)]});let d=p.join(",");switch(o){case"form":return`${s}=${d}`;case"label":return`.${d}`;case"matrix":return`;${s}=${d}`;default:return d}}let c=lr(o),i=Object.entries(n).map(([p,d])=>C({allowReserved:e,name:o==="deepObject"?`${s}[${p}]`:p,value:d})).join(c);return o==="label"||o==="matrix"?c+i:i};var dr=/\{[^{}]+\}/g,hr=({path:e,url:r})=>{let s=r,o=r.match(dr);if(o)for(let n of o){let u=!1,c=n.substring(1,n.length-1),i="simple";c.endsWith("*")&&(u=!0,c=c.substring(0,c.length-1)),c.startsWith(".")?(c=c.substring(1),i="label"):c.startsWith(";")&&(c=c.substring(1),i="matrix");let p=e[c];if(p==null)continue;if(Array.isArray(p)){s=s.replace(n,L({explode:u,name:c,style:i,value:p}));continue}if(typeof p=="object"){s=s.replace(n,W({explode:u,name:c,style:i,value:p,valueOnly:!0}));continue}if(i==="matrix"){s=s.replace(n,`;${C({name:c,value:p})}`);continue}let d=encodeURIComponent(i==="label"?`.${p}`:p);s=s.replace(n,d)}return s},Q=({baseUrl:e,path:r,query:s,querySerializer:o,url:n})=>{let u=n.startsWith("/")?n:`/${n}`,c=(e??"")+u;r&&(c=hr({path:r,url:c}));let i=s?o(s):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(c+=`?${i}`),c};function _(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var K=async(e,r)=>{let s=typeof r=="function"?await r(e):r;if(s)return e.scheme==="bearer"?`Bearer ${s}`:e.scheme==="basic"?`Basic ${btoa(s)}`:s};var X=({parameters:e={},...r}={})=>o=>{let n=[];if(o&&typeof o=="object")for(let u in o){let c=o[u];if(c==null)continue;let i=e[u]||r;if(Array.isArray(c)){let p=L({allowReserved:i.allowReserved,explode:!0,name:u,style:"form",value:c,...i.array});p&&n.push(p)}else if(typeof c=="object"){let p=W({allowReserved:i.allowReserved,explode:!0,name:u,style:"deepObject",value:c,...i.object});p&&n.push(p)}else{let p=C({allowReserved:i.allowReserved,name:u,value:c});p&&n.push(p)}}return n.join("&")},Y=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(s=>r.startsWith(s)))return"blob";if(r.startsWith("text/"))return"text"}},Er=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let s of e){if(Er(r,s.name))continue;let o=await K(s,r.auth);if(!o)continue;let n=s.name??"Authorization";switch(s.in){case"query":r.query||(r.query={}),r.query[n]=o;break;case"cookie":r.headers.append("Cookie",`${n}=${o}`);break;case"header":default:r.headers.set(n,o);break}}},M=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),j=(e,r)=>{let s={...e,...r};return s.baseUrl?.endsWith("/")&&(s.baseUrl=s.baseUrl.substring(0,s.baseUrl.length-1)),s.headers=I(e.headers,r.headers),s},Sr=e=>{let r=[];return e.forEach((s,o)=>{r.push([o,s])}),r},I=(...e)=>{let r=new Headers;for(let s of e){if(!s)continue;let o=s instanceof Headers?Sr(s):Object.entries(s);for(let[n,u]of o)if(u===null)r.delete(n);else if(Array.isArray(u))for(let c of u)r.append(n,c);else u!==void 0&&r.set(n,typeof u=="object"?JSON.stringify(u):u)}return r},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let s=this.getInterceptorIndex(r);this.fns[s]&&(this.fns[s]=null)}exists(r){let s=this.getInterceptorIndex(r);return!!this.fns[s]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,s){let o=this.getInterceptorIndex(r);return this.fns[o]?(this.fns[o]=s,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new k,request:new k,response:new k}),yr=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Rr={"Content-Type":"application/json"},v=(e={})=>({...F,headers:Rr,parseAs:"auto",querySerializer:yr,...e});var x=(e={})=>{let r=j(v(),e),s=()=>({...r}),o=d=>(r=j(r,d),s()),n=ee(),u=async d=>{let a={...r,...d,fetch:d.fetch??r.fetch??globalThis.fetch,headers:I(r.headers,d.headers),serializedBody:void 0};a.security&&await Z({...a,security:a.security}),a.requestValidator&&await a.requestValidator(a),a.body!==void 0&&a.bodySerializer&&(a.serializedBody=a.bodySerializer(a.body)),(a.body===void 0||a.serializedBody==="")&&a.headers.delete("Content-Type");let S=M(a);return{opts:a,url:S}},c=async d=>{let{opts:a,url:S}=await u(d),w={redirect:"follow",...a,body:_(a)},m=new Request(S,w);for(let h of n.request.fns)h&&(m=await h(m,a));let A=a.fetch,l;try{l=await A(m)}catch(h){let E=h;for(let R of n.error.fns)R&&(E=await R(h,void 0,m,a));if(E=E||{},a.throwOnError)throw E;return a.responseStyle==="data"?void 0:{error:E,request:m,response:void 0}}for(let h of n.response.fns)h&&(l=await h(l,m,a));let y={request:m,response:l};if(l.ok){let h=(a.parseAs==="auto"?Y(l.headers.get("Content-Type")):a.parseAs)??"json";if(l.status===204||l.headers.get("Content-Length")==="0"){let R;switch(h){case"arrayBuffer":case"blob":case"text":R=await l[h]();break;case"formData":R=new FormData;break;case"stream":R=l.body;break;case"json":default:R={};break}return a.responseStyle==="data"?R:{data:R,...y}}let E;switch(h){case"arrayBuffer":case"blob":case"formData":case"json":case"text":E=await l[h]();break;case"stream":return a.responseStyle==="data"?l.body:{data:l.body,...y}}return h==="json"&&(a.responseValidator&&await a.responseValidator(E),a.responseTransformer&&(E=await a.responseTransformer(E))),a.responseStyle==="data"?E:{data:E,...y}}let T=await l.text(),g;try{g=JSON.parse(T)}catch{}let b=g??T,D=b;for(let h of n.error.fns)h&&(D=await h(b,l,m,a));if(D=D||{},a.throwOnError)throw D;return a.responseStyle==="data"?void 0:{error:D,...y}},i=d=>a=>c({...a,method:d}),p=d=>async a=>{let{opts:S,url:w}=await u(a);return J({...S,body:S.body,headers:S.headers,method:d,onRequest:async(m,A)=>{let l=new Request(m,A);for(let y of n.request.fns)y&&(l=await y(l,S));return l},url:w})};return{buildUrl:M,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:s,head:i("HEAD"),interceptors:n,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:c,setConfig:o,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:i("TRACE")}};var t=x(v({baseUrl:"https://aifeatures.dev"}));var te=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/payments",...e,headers:{"Content-Type":"application/json",...e.headers}}),re=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/account-route",...e,headers:{"Content-Type":"application/json",...e.headers}}),se=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/payments/status",...e}),oe=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products",...e}),ne=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products",...e,headers:{"Content-Type":"application/json",...e.headers}}),ae=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/products",...e}),ie=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/products",...e,headers:{"Content-Type":"application/json",...e.headers}}),ce=e=>(e.client??t).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}",...e}),pe=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}",...e}),ue=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),le=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/file",...e,headers:{"Content-Type":"application/json",...e.headers}}),de=e=>(e.client??t).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/subscription",...e,headers:{"Content-Type":"application/json",...e.headers}}),he=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/test-order",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/test-subscription",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/test-orders",...e,headers:{"Content-Type":"application/json",...e.headers}}),ye=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/variants",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e.client??t).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/variants",...e,headers:{"Content-Type":"application/json",...e.headers}}),me=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/variants/generate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??t).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}",...e}),De=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/options",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(e.client??t).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/options/{optionId}",...e}),fe=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/options/{optionId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e.client??t).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}/inventory",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}/inventory/adjust",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders",...e}),ge=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}",...e}),Pe=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/refund",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/resend-receipt",...e}),xe=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/reset-downloads",...e}),Ae=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/webhook-events/{eventId}/reset",...e}),Ge=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers",...e}),Le=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers/{customerId}",...e}),Ie=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers/{customerId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers/{customerId}/revoke-access",...e}),Fe=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/summary",...e}),Ve=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sales-summary",...e}),Me=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/people",...e}),je=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/people/{email}",...e}),qe=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/payouts/next",...e}),ze=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/fulfillment",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/subscriptions",...e}),Ne=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/subscriptions/{subscriptionId}/cancel",...e}),$e=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/subscriptions/teardown",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/subscriptions/reactivate-teardown",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/preview-session",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qe=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms",...e}),_e=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites",...e}),Xe=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e.client??t).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}",...e}),Ze=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}",...e}),et=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),tt=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/checkout-pause",...e}),rt=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/checkout-pause",...e,headers:{"Content-Type":"application/json",...e.headers}}),st=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/domains",...e,headers:{"Content-Type":"application/json",...e.headers}}),ot=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/forms",...e}),nt=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/forms",...e,headers:{"Content-Type":"application/json",...e.headers}}),at=e=>(e.client??t).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}",...e}),it=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}",...e}),ct=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),pt=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}/submissions",...e}),ut=e=>(e.client??t).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/submissions/{submissionId}",...e}),lt=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/submissions/{submissionId}",...e}),dt=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/submissions/{submissionId}/attachments/{attachmentId}",...e}),ht=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/event-destinations",...e}),Et=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/event-destinations",...e,headers:{"Content-Type":"application/json",...e.headers}}),St=e=>(e.client??t).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/event-destinations/{destinationId}",...e}),yt=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/event-destinations/{destinationId}",...e}),Rt=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/event-destinations/{destinationId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),mt=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/event-destinations/{destinationId}/rotate-secret",...e}),Ot=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/event-destinations/{destinationId}/secret",...e}),Dt=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/event-destinations/{destinationId}/deliveries",...e}),Tt=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/event-destinations/{destinationId}/deliveries/{deliveryId}/retry",...e}),bt=e=>(e?.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/event-destinations",...e}),ft=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/event-destinations",...e,headers:{"Content-Type":"application/json",...e.headers}}),vt=e=>(e.client??t).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/event-destinations/{destinationId}",...e}),Ct=e=>(e.client??t).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/event-destinations/{destinationId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),wt=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/event-destinations/{destinationId}/rotate-secret",...e}),gt=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/event-destinations/{destinationId}/secret",...e}),Pt=e=>(e.client??t).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/event-destinations/{destinationId}/deliveries",...e}),kt=e=>(e.client??t).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/event-destinations/{destinationId}/deliveries/{deliveryId}/retry",...e}),xt=e=>(e.client??t).get({url:"/v1/p/{productId}",...e}),At=e=>(e.client??t).post({url:"/v1/p/{productId}/checkout",...e,headers:{"Content-Type":"application/json",...e.headers}}),Gt=e=>(e.client??t).post({url:"/v1/p/checkout",...e,headers:{"Content-Type":"application/json",...e.headers}}),Lt=e=>(e.client??t).post({url:"/v1/p/checkout/summary",...e,headers:{"Content-Type":"application/json",...e.headers}}),Wt=e=>(e.client??t).get({url:"/v1/o/session/{sessionId}",...e}),It=e=>(e.client??t).get({url:"/v1/d/{token}",...e}),Ut=e=>(e?.client??t).get({url:"/v1/geo",...e}),Ft=e=>(e.client??t).post({url:"/v1/account/login",...e,headers:{"Content-Type":"application/json",...e.headers}}),Vt=e=>(e.client??t).post({url:"/v1/account/verify",...e,headers:{"Content-Type":"application/json",...e.headers}}),Mt=e=>(e?.client??t).post({url:"/v1/account/logout",...e}),jt=e=>(e?.client??t).get({url:"/v1/account/me",...e}),qt=e=>(e.client??t).post({url:"/v1/account/subscribe",...e,headers:{"Content-Type":"application/json",...e.headers}}),zt=e=>(e.client??t).post({url:"/v1/account/subscriptions/{subscriptionId}/cancel",...e}),Bt=e=>(e.client??t).post({url:"/v1/account/subscriptions/{subscriptionId}/reactivate",...e}),Nt=e=>(e.client??t).post({url:"/v1/account/subscriptions/{subscriptionId}/address",...e,headers:{"Content-Type":"application/json",...e.headers}}),$t=e=>(e.client??t).post({url:"/v1/account/subscriptions/{subscriptionId}/portal-session",...e}),Ht=e=>(e.client??t).post({url:"/v1/account/manage/verify",...e,headers:{"Content-Type":"application/json",...e.headers}}),Jt=e=>(e?.client??t).get({url:"/v1/account/manage/subscription",...e}),Qt=e=>(e?.client??t).post({url:"/v1/account/manage/cancel",...e}),_t=e=>(e?.client??t).post({url:"/v1/account/manage/portal-session",...e}),Kt=e=>(e.client??t).get({url:"/v1/m/{token}",...e}),Xt=e=>(e.client??t).post({...V,url:"/v1/m/{token}",...e,headers:{"Content-Type":"application/x-www-form-urlencoded",...e.headers}});0&&(module.exports={accountCancelSubscription,accountCreatePortalSession,accountLogin,accountLogout,accountManageCancel,accountManageGetSubscription,accountManagePortalSession,accountManageVerify,accountMe,accountReactivateSubscription,accountSubscribe,accountUpdateSubscriptionAddress,accountVerify,actOnManageLink,adjustVariantInventory,attachProductFile,cancelSubscription,createCartCheckout,createCheckout,createClient,createConfig,createCustomer,createEventDestination,createEventDestinationWithSiteToken,createForm,createFormWithSiteToken,createMultiItemTestOrder,createOption,createPreviewSession,createProduct,createProductWithSiteToken,createSite,createTestOrder,createTestSubscription,createVariant,deleteEventDestination,deleteEventDestinationWithSiteToken,deleteForm,deleteOption,deleteProduct,deleteSite,deleteSubmission,deleteVariant,downloadAttachment,downloadFile,generateVariants,getBusinessSummary,getCartSummary,getCustomer,getEventDestination,getEventDestinationSecret,getEventDestinationSecretWithSiteToken,getForm,getGeo,getNextPayout,getOrder,getOrderSession,getPaymentsStatus,getPerson,getProduct,getPublicProduct,getSalesSummary,getSite,getSiteCheckoutPause,getSubmission,listCustomers,listEventDeliveries,listEventDeliveriesWithSiteToken,listEventDestinations,listEventDestinationsWithSiteToken,listForms,listFormsWithSiteToken,listOrdersWithSiteToken,listPeople,listProducts,listProductsWithSiteToken,listSites,listSubmissions,listSubscriptions,pauseSiteCheckout,reactivateSiteSubscriptionsTeardown,refundOrder,resendOrderReceipt,resetOrderDownloads,resetWebhookEvent,resolveManageLink,retryEventDelivery,retryEventDeliveryWithSiteToken,revokeCustomerAccess,rotateEventDestinationSecret,rotateEventDestinationSecretWithSiteToken,setOrderFulfillment,setProductSubscription,setProductVariants,setVariantInventory,teardownSiteSubscriptions,updateCustomer,updateEventDestination,updateEventDestinationWithSiteToken,updateForm,updateOption,updateProduct,updateSite,updateSiteAccountRoute,updateSiteDomains,updateSitePayments,updateVariant});
|