palbase 0.77.0 → 0.78.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/ai-sdk/index.js +2 -2
  3. package/dist/backend/engine.js +2 -2
  4. package/dist/backend/env.js +1 -1
  5. package/dist/backend/index.js +3 -3
  6. package/dist/backend/stack.js +1 -1
  7. package/dist/backend/test.js +2 -2
  8. package/dist/chunks/{34HGL5FX.js → 25KG2TVU.js} +1 -1
  9. package/dist/chunks/{GFBWGJW3.js → 2T3EX52E.js} +1 -1
  10. package/dist/chunks/{VOLGPAPR.js → 35KQJQ77.js} +2 -2
  11. package/dist/chunks/{ES24JS2D.js → 3TJFV35H.js} +2 -2
  12. package/dist/chunks/{FN5763FR.js → 3XF644A5.js} +2 -2
  13. package/dist/chunks/426QPZNS.js +13 -0
  14. package/dist/chunks/{U4VX7NKX.js → 4XE4HLPK.js} +2 -2
  15. package/dist/chunks/{WXT24CE5.js → 5KGMQFET.js} +1 -1
  16. package/dist/chunks/6Y4ICGZ7.js +2 -0
  17. package/dist/chunks/{G3PH5T6N.js → EUMY6SCM.js} +1 -1
  18. package/dist/chunks/{IZVBCAKH.js → FCCX2OTM.js} +2 -2
  19. package/dist/chunks/{RQJ4MX2H.js → IO5HB5B6.js} +2 -2
  20. package/dist/chunks/{AUOFL6RB.js → JY7YG3BO.js} +2 -2
  21. package/dist/chunks/{RRS7TQKX.js → L63FWRZX.js} +2 -2
  22. package/dist/chunks/{ONLXIZ6E.js → LONPNPNX.js} +2 -2
  23. package/dist/chunks/{DENZSXKJ.js → LXS7JHPJ.js} +2 -2
  24. package/dist/chunks/{QWXF6KWI.js → QWKOKJKM.js} +1 -1
  25. package/dist/chunks/{7RTPVUIH.js → RB4JQXKZ.js} +2 -2
  26. package/dist/chunks/{BDHVYVWT.js → ROV6TJZK.js} +1 -1
  27. package/dist/chunks/{KLK7HZZ7.js → TFPVJ3C3.js} +3 -3
  28. package/dist/chunks/{JOVXELK5.js → UUDOMSKW.js} +2 -2
  29. package/dist/chunks/{FE7ZBADH.js → VNUCKM7H.js} +1 -1
  30. package/dist/chunks/{ZZNNCI6A.js → WTFMJKDB.js} +2 -2
  31. package/dist/chunks/{F6OGRDZB.js → ZBTOHVML.js} +2 -2
  32. package/dist/chunks/{CYNLRAAW.js → ZIHVYOXE.js} +2 -2
  33. package/dist/cli.js +7 -3
  34. package/dist/cloud/index.js +2 -2
  35. package/dist/refuse/ai-sdk.js +1 -1
  36. package/dist/refuse/ai.js +1 -1
  37. package/dist/refuse/backend.js +1 -1
  38. package/dist/refuse/cloud.js +1 -1
  39. package/dist/refuse/server.js +1 -1
  40. package/dist/server/index.js +2 -2
  41. package/dist/server/testing.js +2 -2
  42. package/dist/web/index.js +2 -2
  43. package/dist/web/message.js +2 -2
  44. package/dist/web/palbe.js +2 -2
  45. package/dist/web/payments-ui.js +2 -2
  46. package/dist/web/paywall.js +2 -2
  47. package/dist/web/push-sw.js +1 -1
  48. package/dist/web/ssr.js +2 -2
  49. package/dist/web/vite.js +2 -2
  50. package/package.json +2 -2
  51. package/types/ai/src/chats.d.ts +7 -0
  52. package/types/backend/src/gateways.d.ts +2 -1
  53. package/types/cloud/src/generated/project.d.ts +1 -1
  54. package/types/internal/src/chat.d.ts +28 -0
  55. package/types/internal/src/modules/ai.d.ts +11 -7
  56. package/types/internal/src/modules/payments.d.ts +366 -24
  57. package/types/web/src/chat.d.ts +20 -0
  58. package/types/web/src/index.d.ts +1 -1
  59. package/dist/chunks/4M4GEXJS.js +0 -13
  60. package/dist/chunks/6WCN7VAZ.js +0 -2
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- /*! palbase 0.77.0 — Palbase SDK License (see LICENSE) */
2
+ /*! palbase 0.78.1 — Palbase SDK License (see LICENSE) */
3
3
  var Q0=Object.defineProperty;var wt=(e,t)=>{for(var n in t)Q0(e,n,{get:t[n],enumerable:!0})};import{parseArgs as MS}from"node:util";var eS=Symbol.for("palbase.data"),tS=globalThis,Ou=tS[eS]??=new WeakSet;function nS(e){return e instanceof Date||ArrayBuffer.isView(e)||e instanceof ArrayBuffer}function Fi(e){let t=[e];for(;t.length>0;){let n=t.pop();if(!(typeof n!="object"||n===null||Ou.has(n)||nS(n))){Ou.add(n);for(let s of Array.isArray(n)?n:Object.values(n))t.push(s)}}return e}var sS="X-PoW-Challenge-ID",aS="X-PoW-Nonce";function xu(e){if(typeof e!="object"||e===null)return null;let t=e;if(t.error!=="pow_required"||typeof t.challenge!="object"||t.challenge===null)return null;let{id:n,prefix:s,difficulty:a}=t.challenge;return typeof n!="string"||typeof s!="string"||typeof a!="number"||!Number.isInteger(a)||a<0?null:{id:n,prefix:s,difficulty:a}}function oS(e){return 8*2**e}var Oa;async function iS(){if(Oa)return Oa;let e=globalThis;if(e.process?.versions?.node!==void 0||e.process?.versions?.bun!==void 0)try{let s=(await import("node:crypto")).createHash;if(typeof s=="function")return Oa=a=>new Uint8Array(s("sha256").update(a).digest()),Oa}catch{}let t=new TextEncoder;return Oa=async n=>new Uint8Array(await crypto.subtle.digest("SHA-256",t.encode(n))),Oa}function rS(e){let t=0;for(let n of e){if(n===0){t+=8;continue}return t+Math.clz32(n)-24}return t}var lS=4096,pS=typeof globalThis.setImmediate=="function"?()=>new Promise(e=>globalThis.setImmediate(e)):()=>new Promise(e=>setTimeout(e,0));async function Lu(e,t={}){if(e.difficulty>24)throw new Error(`proof-of-work: difficulty ${e.difficulty} is above auth's ceiling of 24`);let n=await iS(),s=oS(e.difficulty),a=Date.now()+(t.timeLimitMs??12e4);for(let o=0;o<s;o++){if(o%lS===0&&o>0){if(await pS(),t.signal?.aborted)throw t.signal.reason??new DOMException("proof-of-work aborted","AbortError");if(Date.now()>a)throw new Error(`proof-of-work: gave up on difficulty ${e.difficulty} after ${o} attempts`)}let i=n(e.prefix+o),r=i instanceof Uint8Array?i:await i;if(rS(r)>=e.difficulty)return{[sS]:e.id,[aS]:String(o)}}throw new Error(`proof-of-work: no nonce for difficulty ${e.difficulty} within ${s} attempts`)}var G=class extends Error{status;code;requestId;retryAfter;body;op;get isNetworkError(){return this.code==="network_error"}constructor(t){super(t.message,t.cause===void 0?void 0:{cause:t.cause}),this.name="PalbaseError",this.op=t.op,this.status=t.status,this.code=t.code,this.requestId=t.requestId,this.retryAfter=t.retryAfter,this.body=t.body}};function c(e,t,n){let s=String(n);if(s===""||s==="."||s==="..")throw new G({op:e,status:0,code:"invalid_path_parameter",message:`${e}: ${t} cannot be ${s===""?"empty":JSON.stringify(s)}`});return encodeURIComponent(s)}var dS=new Set(["apikey","authorization"]),cS=64*1024;function pp(e){let t=Bi(e.baseUrl),n=e.fetch??globalThis.fetch,s=e.solveProofOfWork??!0,a=async(o,i)=>{let r=gS(t,o),l=new Headers;for(let[y,w]of Object.entries(o.headers??{}))w!=null&&!dS.has(y.toLowerCase())&&l.set(y,String(w));for(let[y,w]of Object.entries(i))l.set(y,w);await hS(o,e.credentials,l),l.has("accept")||l.set("accept","application/json");let p={method:o.method,headers:l,redirect:"manual",signal:o.signal,...o.keepalive?{keepalive:!0}:{}};o.body&&o.body.value!==void 0&&(l.set("content-type",o.body.contentType),p.body=yS(o.body.kind,o.body.value),xa(p.body)||(p.duplex="half"));let d;try{d=o.onUploadProgress&&e.xmlHttpRequest?await uS(e.xmlHttpRequest,o.op,r,p,o.onUploadProgress):await n(r,p)}catch(y){throw o.signal?.aborted||y instanceof G?y:new G({op:o.op,status:0,code:"network_error",message:`${o.op}: the request did not reach ${t.origin}`,cause:y})}let u=o.answers[d.status]??(o.ownResponse&&d.status>=200&&d.status<300?"raw":void 0);if(u===void 0)throw d.status>=200&&d.status<300?(await d.body?.cancel(),new G({op:o.op,status:d.status,code:"undeclared_answer",message:`${o.op}: the server answered ${d.status}, which its contract does not declare; the request may have taken effect`})):await bS(o.op,d);let m;switch(u){case"json":try{m=Fi(await d.json())}catch(y){throw new G({op:o.op,status:d.status,code:"invalid_json",message:`${o.op}: the answer is not JSON`,cause:y})}break;case"raw":m=d;break;default:await d.body?.cancel(),m=void 0}return{status:d.status,data:m,headers:d.headers}};return{async send(o){try{return await a(o,{})}catch(i){let r=s&&i instanceof G&&i.status===403?xu(i.body):null,l=o.body?.value;if(!r||o.body?.kind==="raw"&&!xa(l))throw i;let p=i,d;try{d=await Lu(r,{signal:o.signal})}catch(u){throw o.signal?.aborted?u:new G({op:o.op,status:403,code:"pow_unsolved",message:`${o.op}: ${u instanceof Error?u.message:String(u)}`,requestId:p.requestId,body:p.body,cause:u})}return a(o,d)}}}}function uS(e,t,n,s,a){return new Promise((o,i)=>{let r=s.signal;if(r?.aborted)return i(r.reason);let l=new e,p=()=>l.abort();r?.addEventListener("abort",p,{once:!0});let d=u=>{r?.removeEventListener("abort",p),u()};l.open(s.method??"GET",n.href),l.responseType="arraybuffer",new Headers(s.headers).forEach((u,m)=>l.setRequestHeader(m,u)),l.upload&&(l.upload.onprogress=u=>{u.lengthComputable&&a(u.loaded,u.total)}),l.onload=()=>d(()=>{if(l.responseURL!==""&&l.responseURL!==n.href){i(new G({op:t,status:0,code:"undeclared_redirect",message:`${t}: the server redirected; the answer is another address's, and was not read`}));return}if(l.status<200||l.status>599)return i(new TypeError(`${t}: answered ${l.status}`));let u=l.status===204||l.status===205||l.status===304;o(new Response(u?null:l.response,{status:l.status,statusText:l.statusText,headers:mS(l.getAllResponseHeaders())}))}),l.onerror=()=>d(()=>i(new TypeError(`${t}: the request failed`))),l.onabort=()=>d(()=>i(r?.reason??new DOMException("The request was aborted","AbortError"))),l.send(s.body)})}function mS(e){let t=new Headers;for(let n of e.split(/\r?\n/)){let s=n.indexOf(":");if(!(s<=0))try{t.append(n.slice(0,s).trim(),n.slice(s+1).trim())}catch{}}return t}function Bi(e){let t;try{t=new URL(e)}catch{throw new TypeError(`baseUrl ${JSON.stringify(e)} is not an absolute URL`)}let n=t.hostname==="localhost"||t.hostname.endsWith(".localhost")||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol!=="https:"&&!(t.protocol==="http:"&&n))throw new TypeError(`baseUrl must be https (http only for a loopback address): ${t.origin}`);if(t.username||t.password||t.search||t.hash)throw new TypeError("baseUrl carries no user, query or fragment");if(t.pathname!=="/"&&t.pathname!=="")throw new TypeError("baseUrl is the project origin alone, with no path");return t}function gS(e,t){if(!t.path.startsWith("/")||t.path.startsWith("//"))throw new G({op:t.op,status:0,code:"invalid_path",message:`${t.op}: path ${JSON.stringify(t.path)} is not absolute`});let n=new URL(t.path+fS(t.query),e);if(n.origin!==e.origin)throw new G({op:t.op,status:0,code:"invalid_path",message:`${t.op}: path leaves the project's origin`});return n}async function hS(e,t,n){if(e.auth.length===0)return;let s=e.auth.some(i=>i.includes("userJWT"))?await t.accessToken?.():void 0,a=i=>{switch(i){case"ApiKeyAuth":return!!(t.publishableKey??t.secretKey);case"SecretKeyAuth":case"AdminAuth":return!!(t.secretKey??t.token);case"PalbaseBearer":return!!t.token;case"userJWT":return!!s&&!t.token;default:return!1}},o=e.auth.filter(i=>i.every(a)).reduce((i,r)=>i===void 0||r.length>i.length?r:i,void 0);if(!o)throw new G({op:e.op,status:0,code:"missing_credential",message:`${e.op} needs one of: ${e.auth.map(i=>i.length===0?"nothing":i.join(" + ")).join(" | ")}`});for(let i of o)i==="ApiKeyAuth"?n.set("apikey",t.publishableKey??t.secretKey):(i==="SecretKeyAuth"||i==="AdminAuth"||i==="PalbaseBearer")&&t.token?n.set("authorization",`Bearer ${t.token}`):i==="SecretKeyAuth"||i==="AdminAuth"?n.set("apikey",t.secretKey):i==="userJWT"&&n.set("authorization",`Bearer ${s}`)}function yS(e,t){switch(e){case"json":return JSON.stringify(t);case"form":{let n=new URLSearchParams;for(let[s,a]of Object.entries(t))dp(n,s,a);return n}case"raw":return t}}function xa(e){return!!(e==null||typeof e=="string"||e instanceof URLSearchParams||e instanceof Blob||e instanceof FormData||e instanceof ArrayBuffer||ArrayBuffer.isView(e))}function fS(e){if(!e)return"";let t=new URLSearchParams;for(let[s,a]of Object.entries(e))dp(t,s,a);let n=t.toString();return n===""?"":`?${n}`}function dp(e,t,n){if(n!=null){if(Array.isArray(n)){for(let s of n)dp(e,t,s);return}if(n instanceof Date){e.append(t,n.toISOString());return}e.append(t,typeof n=="object"?JSON.stringify(n):String(n))}}async function bS(e,t){let n=await wS(t,cS).catch(()=>""),s;try{s=n===""?void 0:JSON.parse(n)}catch{s=n}let a=vS(s)?s:void 0,o=Number(t.headers.get("retry-after")),i=t.status>=300&&t.status<400;return new G({op:e,status:t.status,code:a?.error??(i?"undeclared_redirect":`http_${t.status}`),message:a?.error_description??(i?`${e}: the server redirected (${t.status}); the request was not followed, its credentials stay here`:`${e}: ${t.status} ${t.statusText}`.trim()),requestId:a?.request_id??t.headers.get("x-request-id")??void 0,retryAfter:a?.retry_after??(Number.isFinite(o)&&o>0?o:void 0),body:s})}async function wS(e,t){if(!e.body)return"";let n=e.body.getReader(),s=[],a=0;for(;a<t;){let{done:r,value:l}=await n.read();if(r)break;s.push(l),a+=l.byteLength}await n.cancel().catch(()=>{});let o=new Uint8Array(Math.min(a,t)),i=0;for(let r of s){let l=Math.min(r.byteLength,o.byteLength-i);if(o.set(r.subarray(0,l),i),i+=l,i>=o.byteLength)break}return new TextDecoder().decode(o)}function vS(e){return typeof e=="object"&&e!==null&&typeof e.error=="string"}var Ji={project:{type:"string",short:"P",value:"project",description:"the project (name or id; org/project when the name is in two organizations)"},env:{type:"string",short:"E",value:"env",description:"the project's environment (slug or ref)"},json:{type:"boolean",description:"print the answer as JSON"},"non-interactive":{type:"boolean",description:"never ask: refuse what would need a question"},yes:{type:"boolean",short:"y",description:"confirm a change to a production environment without asking"},debug:{type:"boolean",description:"print each request the command sends"},help:{type:"boolean",short:"h",description:"show help"}};var b=class extends Error{exitCode;hint;code;reported;constructor(t,n,s={}){super(n),this.name="CliError",this.code=t,this.hint=s.hint,this.exitCode=s.exitCode??1,this.reported=s.reported??!1}};function h(e,t){return new b("usage",e,{hint:t,exitCode:2})}var Hi=class{io;json;constructor(t,n){this.io=t,this.json=n}result(t,n){this.json?this.io.stdout(`${JSON.stringify(t,null,2)}
4
4
  `):n()}line(t=""){this.io.stdout(`${le(t)}
5
5
  `)}note(t){this.io.stderr(`${le(t)}
@@ -9,7 +9,7 @@ var Q0=Object.defineProperty;var wt=(e,t)=>{for(var n in t)Q0(e,n,{get:t[n],enum
9
9
  `);let i;try{i=await this.io.fetch(t,{method:n.method,headers:{...n.headers,...a},body:n.body,signal:n.signal,...s?{}:{duplex:"half"},redirect:"manual"})}catch(l){throw n.signal?.aborted?l:new b("network_error",`${new URL(t).origin} could not be reached: ${l instanceof Error?l.message:String(l)}`)}if(this.debug&&this.io.stderr(`< ${i.status} ${i.headers.get("x-request-id")??""}
10
10
  `),i.status!==503||!s||o>=LS||!xS.has(await gp(i)??""))return i;await i.body?.cancel();let r=Number(i.headers.get("retry-after")??"");await this.io.sleep((Number.isFinite(r)&&r>0?Math.min(r,30):1)*1e3)}}async exchange(t,n,s){let a=await this.token(),o=await this.send(t,n,s,a.value);if(o.status===401&&a.renewable){let i=await this.renew(await this.currentSession());o=await this.send(t,n,s,i.access_token)}return{res:o,renewable:a.renewable}}async answered(t,n,s,a){if(s.status===204)return;let o=await s.text(),i=o===""?void 0:IS(o);if(s.ok)return i;let r=i??{};throw s.status===401?r.error==="token_not_for_machines"?Vu(new URL(this.cloud.studioApi).host):a?La():this.tokenRefused("Studio"):new G({op:`${t} ${n}`,status:s.status,code:r.error??`http_${s.status}`,message:r.error_description??`Studio answered ${s.status}`,requestId:r.request_id??s.headers.get("x-request-id")??void 0,body:i})}tokenRefused(t){return(this.io.env.PALBASE_TOKEN??"").startsWith("pbe_")?new b("token_refused",`${t} refused PALBASE_TOKEN, an environment's token: it ended (a few hours at most), it was revoked, or what minted it no longer holds`,{hint:"mint another: palbase env:tokens:create --scope <scope> (an admin), or with the environment's secret key (Studio's POST /environments/{ref}/tokens)"}):(this.io.env.PALBASE_TOKEN??"").startsWith("pbu_")?new b("token_refused",`${t} refused PALBASE_TOKEN, an account token: it was revoked, it ended, or, in this organization, the one who made it left it`,{hint:"its maker makes a new one: palbase account:tokens:create <name>"}):new b("token_refused",`${t} refused PALBASE_TOKEN: it was revoked, it ended, or the one who made it no longer holds its role`,{hint:"an admin makes a new one: palbase tokens:create <name>"})}async token(){let t=this.io.env.PALBASE_TOKEN;return t&&t!==""?{value:t,renewable:!1}:{value:(await this.currentSession()).access_token,renewable:!0}}async renew(t){let n=await Fu(this.io,this.cloud,t);return await this.state.writeSession(n),this.session=n,n}async send(t,n,s,a){let o=`${this.cloud.studioApi}${OS}${n}`;this.debug&&this.io.stderr(`> ${t} ${o}
11
11
  `);try{let i=await this.io.fetch(o,{method:t,headers:{...a===void 0?{}:{authorization:`Bearer ${a}`},accept:"application/json",...s===void 0?{}:{"content-type":"application/json"}},body:s===void 0?void 0:JSON.stringify(s),redirect:"manual"});return this.debug&&this.io.stderr(`< ${i.status} ${i.headers.get("x-request-id")??""}
12
- `),i}catch(i){throw new b("network_error",`Studio (${this.cloud.studioApi}) could not be reached: ${i instanceof Error?i.message:String(i)}`)}}};function Vu(e){return new b("token_not_for_machines",`the platform's edge refused PALBASE_TOKEN at ${e}, taking it for a machine's address (token_not_for_machines): the token itself was not refused`,{hint:"nothing is wrong with the token: run this again in a few minutes, and tell Palbase if it lasts"})}async function gp(e){let t=await e.clone().json().catch(()=>null),n=t&&typeof t=="object"?t.error:void 0;return typeof n=="string"&&/^(console|token|edge)_/.test(n)?n:void 0}function IS(e){try{return JSON.parse(e)}catch{return e}}var Xu={version:"0.77.0"};var Qi=Xu.version;async function tm(e,t,n,s){let a=new Map(n.map(r=>[r.name,r])),o=e.includes("--json"),i=e.includes("--debug");try{let{name:r,at:l}=DS(e);if(r===void 0)return e.includes("--version")?(t.stdout(`palbase ${Qi}
12
+ `),i}catch(i){throw new b("network_error",`Studio (${this.cloud.studioApi}) could not be reached: ${i instanceof Error?i.message:String(i)}`)}}};function Vu(e){return new b("token_not_for_machines",`the platform's edge refused PALBASE_TOKEN at ${e}, taking it for a machine's address (token_not_for_machines): the token itself was not refused`,{hint:"nothing is wrong with the token: run this again in a few minutes, and tell Palbase if it lasts"})}async function gp(e){let t=await e.clone().json().catch(()=>null),n=t&&typeof t=="object"?t.error:void 0;return typeof n=="string"&&/^(console|token|edge)_/.test(n)?n:void 0}function IS(e){try{return JSON.parse(e)}catch{return e}}var Xu={version:"0.78.1"};var Qi=Xu.version;async function tm(e,t,n,s){let a=new Map(n.map(r=>[r.name,r])),o=e.includes("--json"),i=e.includes("--debug");try{let{name:r,at:l}=DS(e);if(r===void 0)return e.includes("--version")?(t.stdout(`palbase ${Qi}
13
13
  `),0):(t.stdout(em(n)),e.length===0||e.includes("--help")||e.includes("-h")?0:2);if(r==="help"){let E=e[l+1],C=E===void 0?void 0:a.get(E);if(E!==void 0&&!C)throw Yu(E,n);return t.stdout(C?Qu(C):em(n)),0}let p=a.get(r);if(!p)throw Yu(r,n);let d=[...e.slice(0,l),...e.slice(l+1)],u=d.includes("--")?d.slice(0,d.indexOf("--")):d;if(u.includes("--help")||u.includes("-h"))return t.stdout(Qu(p)),0;let{flags:m,positionals:y}=zS(p,d),w=p.args??{min:0,max:0};if(y.length<w.min)throw h(`${p.name} needs ${w.min===1?"an argument":`${w.min} arguments`}`,yp(p));if(y.length>w.max)throw h(`${p.name} takes ${w.max===0?"no argument":`at most ${w.max}`}: ${JSON.stringify(y.slice(w.max))} is left over`,yp(p));let v={project:m.project,env:m.env,json:m.json===!0,nonInteractive:m["non-interactive"]===!0,yes:m.yes===!0,debug:m.debug===!0},P=qu(t.env),A=new Xi(Ku(t.configDir,P)),T={io:t,state:A,out:new Hi(t,v.json),global:v,args:y,flags:m,interactive:t.interactive&&!v.nonInteractive,cloud:P,studio:new Zi(t,P,A,v.debug,s?.callPlatform)};return await p.run(T)??0}catch(r){return qS(r,t,o,i)}}function DS(e){let t=new Set;for(let[n,s]of Object.entries(Ji))s.type==="string"&&(t.add(`--${n}`),s.short&&t.add(`-${s.short}`));for(let n=0;n<e.length;n++){let s=e[n];if(s==="--")return{at:-1};if(t.has(s)){n++;continue}if(!s.startsWith("-"))return{name:s,at:n}}return{at:-1}}function zS(e,t){let n={...Ji,...e.flags??{}},s={};for(let[a,o]of Object.entries(n))s[a]={type:o.type,...o.short?{short:o.short}:{},...o.multiple?{multiple:!0}:{}};try{let{values:a,positionals:o}=MS({args:t,options:s,strict:!0,allowPositionals:!0});return{flags:a,positionals:o}}catch(a){throw h(a instanceof Error?a.message.replace(/^.*?: /,""):String(a),`palbase help ${e.name}`)}}function qS(e,t,n,s){let a="error",o,i,r=1,l;return e instanceof b?(a=e.code,o=e.message,i=e.hint,r=e.exitCode):e instanceof G?(a=e.code,o=e.message,l=e.requestId,e.code==="token_out_of_scope"&&t.env.PALBASE_TOKEN&&(o=`${e.op} refused PALBASE_TOKEN: ${e.message}`,i="this is the token's reach, fixed when it was minted: a person's yes does not change it \u2014 mint a token whose scopes name this call, or have a person run it signed in")):o=e instanceof Error?e.message:String(e),n&&e instanceof b&&e.reported||(n&&t.stdout(`${JSON.stringify({error:a,message:o,...i?{hint:i}:{},...l?{request_id:l}:{}},null,2)}
14
14
  `),t.stderr(`error: ${le(o)}${l?` (request ${le(l)})`:""}
15
15
  `),i&&t.stderr(` ${le(i)}
@@ -18,7 +18,7 @@ var Q0=Object.defineProperty;var wt=(e,t)=>{for(var n in t)Q0(e,n,{get:t[n],enum
18
18
  `)}
19
19
  `}function em(e){let t=new Map;for(let a of e){let o=a.name.includes(":")?a.name.slice(0,a.name.indexOf(":")):"";t.set(o,[...t.get(o)??[],a])}let n=Math.max(...e.map(a=>a.name.length)),s=["palbase \u2014 your Palbase organizations, projects and environments from the terminal","","usage: palbase <command> [flags]",""];for(let[a,o]of t){s.push(a===""?"Commands:":`${a}:`);for(let i of o)s.push(` ${i.name.padEnd(n)} ${i.summary}`);s.push("")}return s.push("palbase help <command> shows a command in full."),`${s.join(`
20
20
  `)}
21
- `}function Q(e,t){try{return c("palbase",e,t)}catch(n){throw n instanceof G&&n.code==="invalid_path_parameter"?new b("unsafe_path",`${e} cannot be ${t===""?"empty":JSON.stringify(t)}: a request's path cannot carry it`):n}}function fp(e){return{name:"login",summary:"sign in with your Studio account",details:["Shows a one-time code and opens Studio, where you approve it while signed in there.","The CLI then holds a session of yours: Studio lists it with your others, and ending it there signs the CLI out.","On a machine with no browser (a server, an agent), open the address it prints on any device."],flags:{"no-browser":{type:"boolean",description:"print the address instead of opening a browser"},...e?{owner:{type:"boolean",description:"Palbase's own project's owner: confirm with your passkey in this computer's browser, for 15 minutes of changes to it"}}:{}},scope:"none",async run(t){if(t.io.env.PALBASE_TOKEN)throw new b("token_in_use","PALBASE_TOKEN is set: the CLI acts with that token, and a sign-in would not be used",{hint:"unset PALBASE_TOKEN to sign in as yourself"});if(e&&t.flags.owner===!0){await e(t);return}let n=await Uu(t.io,t.cloud),s=`${t.cloud.studioWeb}/device`;t.out.note(""),t.out.note(` Enter this code in your browser: ${n.user_code}`),t.out.note("");let a=t.flags["no-browser"]!==!0&&t.interactive&&await t.io.openBrowser(s);t.out.note(a?`Opened ${s} \u2014 sign in there if asked, then enter the code.`:`Open ${s} on any device, sign in, and enter the code.`),t.out.note("Waiting for the approval\u2026");let o=await Wu(t.io,t.cloud,n);await t.state.writeSession(o),t.out.result({user:o.user},()=>t.out.line(`Signed in as ${o.user.email??o.user.id}.`))}}}var OK=fp(),nm={name:"logout",summary:"sign out: the session is ended at Palbase and forgotten on this computer",scope:"none",async run(e){if(e.io.env.PALBASE_TOKEN)throw new b("token_in_use","PALBASE_TOKEN is set: logout ends your own sign-in, and the CLI acts with the token",{hint:"unset PALBASE_TOKEN to sign out"});let t=await e.state.readSession();if(!t){e.out.result({signed_out:!0},()=>e.out.line("You were not signed in."));return}for(let[n,s]of Object.entries(await e.state.personalKeys()))try{await e.studio.request("DELETE",`/environments/${Q("the environment's ref",n)}/personal-key/${Q("the personal key's id",s.id)}`)}catch(a){a instanceof Error&&"status"in a&&a.status===404||e.out.warn(`your key at ${n} (${s.label}) could not be revoked: ${a instanceof Error?a.message:String(a)} \u2014 revoke it in Studio, or it ends ${s.expires_at}`)}await e.state.forgetPersonalKeys(),await e.state.forget("owner.json");try{await Bu(e.io,e.cloud,t)}catch(n){e.out.warn(`${n instanceof Error?n.message:String(n)} \u2014 end the session in Studio (Account \u203A Sessions)`)}await e.state.clearSession(),e.out.result({signed_out:!0},()=>e.out.line(`Signed out ${t.user.email??t.user.id}.`))}},sm={name:"whoami",summary:"the account the CLI acts as, and the environment chosen for this directory",scope:"account",async run(e){let t=e.io.env.PALBASE_TOKEN,n;if(t?.startsWith("pbu_")){let{organizations:a}=await e.studio.get("/orgs");n={id:`account token \u2026${t.slice(-4)}`,via:"token",organizations:a.length}}else if(t?.startsWith("pbo_")){let{organizations:a}=await e.studio.get("/orgs"),o=a[0];n={id:`token \u2026${t.slice(-4)}`,via:"token",...o&&{organization:{id:o.id,name:o.name,role:o.role}}}}else if(t){let a=up(t);n={id:String(a.sub??""),...typeof a.email=="string"?{email:a.email}:{},via:"token"}}else n={...(await e.studio.currentSession()).user,via:"session"};let s=await e.state.targetFor(e.io.cwd);e.out.result({user:n,target:s?.target??null,target_dir:s?.dir??null},()=>{e.out.line(n.organization?`an access token of ${le(n.organization.name)} (${n.organization.role}), ${n.id} (PALBASE_TOKEN)`:n.organizations!==void 0?`an ${n.id} (PALBASE_TOKEN): an admin of the ${n.organizations} organization${n.organizations===1?"":"s"} it opened`:`${n.email??n.id}${n.via==="token"?" (PALBASE_TOKEN)":""}`),s&&e.out.line(`${s.target.org_name} \u203A ${s.target.project_name} \u203A ${s.target.env_name} (${s.target.env_slug}) \u2014 chosen for ${s.dir}`)})}};var KS={name:"account:tokens:list",summary:"your account tokens (for a program that opens organizations): name, how many organizations they reach, when they end and were last used \u2014 never their values",scope:"account",async run(e){let{tokens:t}=await e.studio.get("/account/tokens");e.out.result({tokens:t},()=>{t.length===0?e.out.line("You have no account token yet: palbase account:tokens:create <name> makes one."):e.out.table(t,[{header:"name",value:n=>le(n.name)},{header:"token",value:n=>`pbu_\u2026${n.hint}`},{header:"organizations",value:n=>String(n.organizations)},{header:"ends",value:n=>n.expires_at.slice(0,10)},{header:"last used",value:n=>n.last_used_at?.slice(0,16).replace("T"," ")??"never"},{header:"id",value:n=>n.id}])})}},US={name:"account:tokens:create",summary:"make an account token for a program that opens organizations; its value is shown this once",usage:"<name> [--days <n>]",details:["Give it to the program as its secret (PALBASE_TOKEN, or palbase/cloud's token): it opens organizations \u2014 you their owner, the token their admin \u2014 and builds projects and environments there.","It reaches only the organizations it opened, never your others; it makes no token or key and changes no one's place. It ends after --days (default 90, at most 365), when it is revoked, and, in an organization, when you leave it."],args:{min:1,max:1},flags:{days:{type:"string",value:"n",description:"how many days it is good for (default 90)"}},scope:"account",async run(e){let t=e.flags.days===void 0?90:Number(e.flags.days);if(!Number.isInteger(t)||t<1||t>365)throw h("--days is a whole number from 1 to 365");let n=await e.studio.post("/account/tokens",{name:e.args[0],expires_in_days:t});e.out.result(n,()=>{e.out.line(`Made the account token ${le(n.name)} (until ${n.expires_at.slice(0,10)}).`),e.out.line(`token (shown this once \u2014 keep it as the program's secret PALBASE_TOKEN): ${n.token}`)})}},WS={name:"account:tokens:revoke",summary:"revoke one of your account tokens (by its name or id): refused from its next request on; the organizations it opened stay yours",usage:"<name|id>",args:{min:1,max:1},scope:"account",async run(e){let{tokens:t}=await e.studio.get("/account/tokens"),n=t.filter(s=>s.id===e.args[0]||s.name===e.args[0]);if(n.length===0)throw new b("no_such_token",`you have no account token ${JSON.stringify(e.args[0])}`,{hint:"palbase account:tokens:list shows them"});if(n.length>1)throw new b("ambiguous_token",`${JSON.stringify(e.args[0])} names more than one token`,{hint:"pass its id"});await e.studio.request("DELETE",`/account/tokens/${Q("the token's id",n[0].id)}`),e.out.result({revoked:n[0].id},()=>e.out.line(`Revoked the account token ${le(n[0].name)}.`))}},am=[KS,US,WS];var er={};wt(er,{client:()=>FS});function FS(e){return{async draftAgent(t){return e.send({op:"DraftAgent",method:"POST",path:"/ai/agent-drafts",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listAgents(t){return e.send({op:"ListAgents",method:"GET",path:"/ai/agents",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getAgent(t){return e.send({op:"GetAgent",method:"GET",path:"/ai/agents/"+c("GetAgent","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putAgent(t){return e.send({op:"PutAgent",method:"PUT",path:"/ai/agents/"+c("PutAgent","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteAgent(t){return e.send({op:"DeleteAgent",method:"DELETE",path:"/ai/agents/"+c("DeleteAgent","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async publishAgent(t){return e.send({op:"PublishAgent",method:"POST",path:"/ai/agents/"+c("PublishAgent","name",t.path.name)+"/publish",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rollbackAgent(t){return e.send({op:"RollbackAgent",method:"POST",path:"/ai/agents/"+c("RollbackAgent","name",t.path.name)+"/rollback",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listAgentVersions(t){return e.send({op:"ListAgentVersions",method:"GET",path:"/ai/agents/"+c("ListAgentVersions","name",t.path.name)+"/versions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async createAudioSpeech(t){return e.send({op:"CreateAudioSpeech",method:"POST",path:"/ai/audio/speech",auth:[["SecretKeyAuth"]],answers:{200:"raw"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createAudioTranscription(t){return e.send({op:"CreateAudioTranscription",method:"POST",path:"/ai/audio/transcriptions",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listChats(t){return e.send({op:"ListChats",method:"GET",path:"/ai/chats",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createChat(t){return e.send({op:"CreateChat",method:"POST",path:"/ai/chats",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChat(t){return e.send({op:"GetChat",method:"GET",path:"/ai/chats/"+c("GetChat","chat_id",t.path.chat_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteChat(t){return e.send({op:"DeleteChat",method:"DELETE",path:"/ai/chats/"+c("DeleteChat","chat_id",t.path.chat_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async decideChatApproval(t){return e.send({op:"DecideChatApproval",method:"POST",path:"/ai/chats/"+c("DecideChatApproval","chat_id",t.path.chat_id)+"/approvals/"+c("DecideChatApproval","approval_id",t.path.approval_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChatExecution(t){return e.send({op:"GetChatExecution",method:"GET",path:"/ai/chats/"+c("GetChatExecution","chat_id",t.path.chat_id)+"/execution",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async patchChatExecution(t){return e.send({op:"PatchChatExecution",method:"PATCH",path:"/ai/chats/"+c("PatchChatExecution","chat_id",t.path.chat_id)+"/execution",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async forkChat(t){return e.send({op:"ForkChat",method:"POST",path:"/ai/chats/"+c("ForkChat","chat_id",t.path.chat_id)+"/fork",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChatGoal(t){return e.send({op:"GetChatGoal",method:"GET",path:"/ai/chats/"+c("GetChatGoal","chat_id",t.path.chat_id)+"/goal",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async setChatGoal(t){return e.send({op:"SetChatGoal",method:"PUT",path:"/ai/chats/"+c("SetChatGoal","chat_id",t.path.chat_id)+"/goal",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async clearChatGoal(t){return e.send({op:"ClearChatGoal",method:"DELETE",path:"/ai/chats/"+c("ClearChatGoal","chat_id",t.path.chat_id)+"/goal",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},query:t.query,signal:t.signal})},async updateChatGoal(t){return e.send({op:"UpdateChatGoal",method:"PATCH",path:"/ai/chats/"+c("UpdateChatGoal","chat_id",t.path.chat_id)+"/goal",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async handoffChat(t){return e.send({op:"HandoffChat",method:"POST",path:"/ai/chats/"+c("HandoffChat","chat_id",t.path.chat_id)+"/handoff",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async putChatMember(t){return e.send({op:"PutChatMember",method:"PUT",path:"/ai/chats/"+c("PutChatMember","chat_id",t.path.chat_id)+"/members/"+c("PutChatMember","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteChatMember(t){return e.send({op:"DeleteChatMember",method:"DELETE",path:"/ai/chats/"+c("DeleteChatMember","chat_id",t.path.chat_id)+"/members/"+c("DeleteChatMember","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listChatMessages(t){return e.send({op:"ListChatMessages",method:"GET",path:"/ai/chats/"+c("ListChatMessages","chat_id",t.path.chat_id)+"/messages",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async sendChatMessage(t){return e.send({op:"SendChatMessage",method:"POST",path:"/ai/chats/"+c("SendChatMessage","chat_id",t.path.chat_id)+"/messages",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChatMessageAttachment(t){return e.send({op:"GetChatMessageAttachment",method:"GET",path:"/ai/chats/"+c("GetChatMessageAttachment","chat_id",t.path.chat_id)+"/messages/"+c("GetChatMessageAttachment","message_id",t.path.message_id)+"/attachments/"+c("GetChatMessageAttachment","position",t.path.position),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"raw"},signal:t.signal})},async listChatParts(t){return e.send({op:"ListChatParts",method:"GET",path:"/ai/chats/"+c("ListChatParts","chat_id",t.path.chat_id)+"/parts",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async putChatPipe(t){return e.send({op:"PutChatPipe",method:"PUT",path:"/ai/chats/"+c("PutChatPipe","chat_id",t.path.chat_id)+"/pipe",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteChatPipe(t){return e.send({op:"DeleteChatPipe",method:"DELETE",path:"/ai/chats/"+c("DeleteChatPipe","chat_id",t.path.chat_id)+"/pipe",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async sendSubagentMessage(t){return e.send({op:"SendSubagentMessage",method:"POST",path:"/ai/chats/"+c("SendSubagentMessage","chat_id",t.path.chat_id)+"/runs/"+c("SendSubagentMessage","run_id",t.path.run_id)+"/messages",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stopSubagent(t){return e.send({op:"StopSubagent",method:"POST",path:"/ai/chats/"+c("StopSubagent","chat_id",t.path.chat_id)+"/runs/"+c("StopSubagent","run_id",t.path.run_id)+"/stop",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stopChat(t){return e.send({op:"StopChat",method:"POST",path:"/ai/chats/"+c("StopChat","chat_id",t.path.chat_id)+"/stop",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTurnToolCalls(t){return e.send({op:"ListTurnToolCalls",method:"GET",path:"/ai/chats/"+c("ListTurnToolCalls","chat_id",t.path.chat_id)+"/tool-calls",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getChatToolCall(t){return e.send({op:"GetChatToolCall",method:"GET",path:"/ai/chats/"+c("GetChatToolCall","chat_id",t.path.chat_id)+"/tool-calls/"+c("GetChatToolCall","call_id",t.path.call_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async answerChatToolCall(t){return e.send({op:"AnswerChatToolCall",method:"POST",path:"/ai/chats/"+c("AnswerChatToolCall","chat_id",t.path.chat_id)+"/tool-outputs/"+c("AnswerChatToolCall","call_id",t.path.call_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listChatTurnArtifacts(t){return e.send({op:"ListChatTurnArtifacts",method:"GET",path:"/ai/chats/"+c("ListChatTurnArtifacts","chat_id",t.path.chat_id)+"/turns/"+c("ListChatTurnArtifacts","response_id",t.path.response_id)+"/artifacts",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getChatTurnArtifact(t){return e.send({op:"GetChatTurnArtifact",method:"GET",path:"/ai/chats/"+c("GetChatTurnArtifact","chat_id",t.path.chat_id)+"/turns/"+c("GetChatTurnArtifact","response_id",t.path.response_id)+"/artifacts/"+c("GetChatTurnArtifact","artifact_id",t.path.artifact_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"raw"},signal:t.signal})},async getChatTurnCost(t){return e.send({op:"GetChatTurnCost",method:"GET",path:"/ai/chats/"+c("GetChatTurnCost","chat_id",t.path.chat_id)+"/turns/"+c("GetChatTurnCost","response_id",t.path.response_id)+"/cost",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async startChatVoice(t){return e.send({op:"StartChatVoice",method:"POST",path:"/ai/chats/"+c("StartChatVoice","chat_id",t.path.chat_id)+"/voice",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChatVoice(t){return e.send({op:"GetChatVoice",method:"GET",path:"/ai/chats/"+c("GetChatVoice","chat_id",t.path.chat_id)+"/voice/"+c("GetChatVoice","voice_id",t.path.voice_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async closeChatVoice(t){return e.send({op:"CloseChatVoice",method:"DELETE",path:"/ai/chats/"+c("CloseChatVoice","chat_id",t.path.chat_id)+"/voice/"+c("CloseChatVoice","voice_id",t.path.voice_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async commandChatVoice(t){return e.send({op:"CommandChatVoice",method:"POST",path:"/ai/chats/"+c("CommandChatVoice","chat_id",t.path.chat_id)+"/voice/"+c("CommandChatVoice","voice_id",t.path.voice_id)+"/commands",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createEmbeddings(t){return e.send({op:"CreateEmbeddings",method:"POST",path:"/ai/embeddings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listEndpoints(t){return e.send({op:"ListEndpoints",method:"GET",path:"/ai/endpoints",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putEndpoint(t){return e.send({op:"PutEndpoint",method:"PUT",path:"/ai/endpoints/"+c("PutEndpoint","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteEndpoint(t){return e.send({op:"DeleteEndpoint",method:"DELETE",path:"/ai/endpoints/"+c("DeleteEndpoint","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listEnv(t){return e.send({op:"ListEnv",method:"GET",path:"/ai/env",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listEnvAllowances(t){return e.send({op:"ListEnvAllowances",method:"GET",path:"/ai/env/allowances",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async deleteEnvAllowance(t){return e.send({op:"DeleteEnvAllowance",method:"DELETE",path:"/ai/env/allowances/"+c("DeleteEnvAllowance","allowance_id",t.path.allowance_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listEnvHostRequests(t){return e.send({op:"ListEnvHostRequests",method:"GET",path:"/ai/env/host-requests",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async allowEnvHostRequest(t){return e.send({op:"AllowEnvHostRequest",method:"POST",path:"/ai/env/host-requests/"+c("AllowEnvHostRequest","request_id",t.path.request_id)+"/allow",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async dismissEnvHostRequest(t){return e.send({op:"DismissEnvHostRequest",method:"POST",path:"/ai/env/host-requests/"+c("DismissEnvHostRequest","request_id",t.path.request_id)+"/dismiss",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putEnv(t){return e.send({op:"PutEnv",method:"PUT",path:"/ai/env/"+c("PutEnv","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteEnv(t){return e.send({op:"DeleteEnv",method:"DELETE",path:"/ai/env/"+c("DeleteEnv","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async allowEnvHost(t){return e.send({op:"AllowEnvHost",method:"POST",path:"/ai/env/"+c("AllowEnvHost","key",t.path.key)+"/hosts",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listEnvironments(t){return e.send({op:"ListEnvironments",method:"GET",path:"/ai/environments",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createEnvironment(t){return e.send({op:"CreateEnvironment",method:"POST",path:"/ai/environments",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getEnvironment(t){return e.send({op:"GetEnvironment",method:"GET",path:"/ai/environments/"+c("GetEnvironment","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putEnvironment(t){return e.send({op:"PutEnvironment",method:"PUT",path:"/ai/environments/"+c("PutEnvironment","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteEnvironment(t){return e.send({op:"DeleteEnvironment",method:"DELETE",path:"/ai/environments/"+c("DeleteEnvironment","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async createImage(t){return e.send({op:"CreateImage",method:"POST",path:"/ai/images",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getImage(t){return e.send({op:"GetImage",method:"GET",path:"/ai/images/"+c("GetImage","image_id",t.path.image_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getImageFile(t){return e.send({op:"GetImageFile",method:"GET",path:"/ai/images/"+c("GetImageFile","image_id",t.path.image_id)+"/files/"+c("GetImageFile","position",t.path.position),auth:[["SecretKeyAuth"]],answers:{200:"raw"},signal:t.signal})},async getMachine(t){return e.send({op:"GetMachine",method:"GET",path:"/ai/machines/"+c("GetMachine","machine",t.path.machine),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteMachine(t){return e.send({op:"DeleteMachine",method:"DELETE",path:"/ai/machines/"+c("DeleteMachine","machine",t.path.machine),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},query:t.query,signal:t.signal})},async cordonMachine(t){return e.send({op:"CordonMachine",method:"POST",path:"/ai/machines/"+c("CordonMachine","machine",t.path.machine)+"/cordon",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async resumeMachine(t){return e.send({op:"ResumeMachine",method:"POST",path:"/ai/machines/"+c("ResumeMachine","machine",t.path.machine)+"/resume",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listModels(t){return e.send({op:"ListModels",method:"GET",path:"/ai/models",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async revokePoolKey(t){return e.send({op:"RevokePoolKey",method:"POST",path:"/ai/pool-keys/"+c("RevokePoolKey","key",t.path.key)+"/revoke",auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listPools(t){return e.send({op:"ListPools",method:"GET",path:"/ai/pools",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createPool(t){return e.send({op:"CreatePool",method:"POST",path:"/ai/pools",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deletePool(t){return e.send({op:"DeletePool",method:"DELETE",path:"/ai/pools/"+c("DeletePool","pool",t.path.pool),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listPoolKeys(t){return e.send({op:"ListPoolKeys",method:"GET",path:"/ai/pools/"+c("ListPoolKeys","pool",t.path.pool)+"/keys",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createPoolKey(t){return e.send({op:"CreatePoolKey",method:"POST",path:"/ai/pools/"+c("CreatePoolKey","pool",t.path.pool)+"/keys",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPoolState(t){return e.send({op:"GetPoolState",method:"GET",path:"/ai/pools/"+c("GetPoolState","pool",t.path.pool)+"/state",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listProviders(t){return e.send({op:"ListProviders",method:"GET",path:"/ai/providers",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async connectProvider(t){return e.send({op:"ConnectProvider",method:"PUT",path:"/ai/providers/"+c("ConnectProvider","provider",t.path.provider),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async disconnectProvider(t){return e.send({op:"DisconnectProvider",method:"DELETE",path:"/ai/providers/"+c("DisconnectProvider","provider",t.path.provider),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async createResponse(t){return e.send({op:"CreateResponse",method:"POST",path:"/ai/responses",auth:[["SecretKeyAuth"]],answers:{200:"raw",202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getResponse(t){return e.send({op:"GetResponse",method:"GET",path:"/ai/responses/"+c("GetResponse","response_id",t.path.response_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelResponse(t){return e.send({op:"CancelResponse",method:"POST",path:"/ai/responses/"+c("CancelResponse","response_id",t.path.response_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async followResponse(t){return e.send({op:"FollowResponse",method:"GET",path:"/ai/responses/"+c("FollowResponse","response_id",t.path.response_id)+"/live",auth:[["SecretKeyAuth"]],answers:{200:"raw"},query:t.query,signal:t.signal})},async getSettings(t){return e.send({op:"GetSettings",method:"GET",path:"/ai/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putSettings(t){return e.send({op:"PutSettings",method:"PUT",path:"/ai/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSpend(t){return e.send({op:"GetSpend",method:"GET",path:"/ai/spend",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async askSupport(t){return e.send({op:"AskSupport",method:"POST",path:"/ai/support-questions",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTools(t){return e.send({op:"ListTools",method:"GET",path:"/ai/tools",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listUsage(t){return e.send({op:"ListUsage",method:"GET",path:"/ai/usage",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async gatewayAudioSpeech(t){return e.send({op:"GatewayAudioSpeech",method:"POST",path:"/ai/v1/audio/speech",auth:[["SecretKeyAuth"]],answers:{200:"raw"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayAudioTranscriptions(t){return e.send({op:"GatewayAudioTranscriptions",method:"POST",path:"/ai/v1/audio/transcriptions",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayChatCompletions(t){return e.send({op:"GatewayChatCompletions",method:"POST",path:"/ai/v1/chat/completions",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayEmbeddings(t){return e.send({op:"GatewayEmbeddings",method:"POST",path:"/ai/v1/embeddings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayImagesGenerations(t){return e.send({op:"GatewayImagesGenerations",method:"POST",path:"/ai/v1/images/generations",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayAnthropicMessages(t){return e.send({op:"GatewayAnthropicMessages",method:"POST",path:"/ai/v1/messages",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayListModels(t){return e.send({op:"GatewayListModels",method:"GET",path:"/ai/v1/models",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async gatewayResponses(t){return e.send({op:"GatewayResponses",method:"POST",path:"/ai/v1/responses",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createVideo(t){return e.send({op:"CreateVideo",method:"POST",path:"/ai/videos",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getVideo(t){return e.send({op:"GetVideo",method:"GET",path:"/ai/videos/"+c("GetVideo","video_id",t.path.video_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelVideo(t){return e.send({op:"CancelVideo",method:"POST",path:"/ai/videos/"+c("CancelVideo","video_id",t.path.video_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listTriggers(t){return e.send({op:"ListTriggers",method:"GET",path:"/ai/triggers",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createTrigger(t){return e.send({op:"CreateTrigger",method:"POST",path:"/ai/triggers",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getTrigger(t){return e.send({op:"GetTrigger",method:"GET",path:"/ai/triggers/"+c("GetTrigger","trigger_id",t.path.trigger_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteTrigger(t){return e.send({op:"DeleteTrigger",method:"DELETE",path:"/ai/triggers/"+c("DeleteTrigger","trigger_id",t.path.trigger_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateTrigger(t){return e.send({op:"UpdateTrigger",method:"PATCH",path:"/ai/triggers/"+c("UpdateTrigger","trigger_id",t.path.trigger_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async testTrigger(t){return e.send({op:"TestTrigger",method:"POST",path:"/ai/triggers/"+c("TestTrigger","trigger_id",t.path.trigger_id)+"/test",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async invokeTriggerWebhook(t){return e.send({op:"InvokeTriggerWebhook",method:"POST",path:"/ai/triggers/"+c("InvokeTriggerWebhook","trigger_id",t.path.trigger_id)+"/hook",auth:[],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listWaits(t){return e.send({op:"ListWaits",method:"GET",path:"/ai/waits",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getWait(t){return e.send({op:"GetWait",method:"GET",path:"/ai/waits/"+c("GetWait","wait_id",t.path.wait_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async signalWait(t){return e.send({op:"SignalWait",method:"POST",path:"/ai/waits/"+c("SignalWait","wait_id",t.path.wait_id)+"/signal",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async cancelWait(t){return e.send({op:"CancelWait",method:"POST",path:"/ai/waits/"+c("CancelWait","wait_id",t.path.wait_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listWorkflowRuns(t){return e.send({op:"ListWorkflowRuns",method:"GET",path:"/ai/workflows/runs",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createWorkflowRun(t){return e.send({op:"CreateWorkflowRun",method:"POST",path:"/ai/workflows/runs",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getWorkflowRun(t){return e.send({op:"GetWorkflowRun",method:"GET",path:"/ai/workflows/runs/"+c("GetWorkflowRun","run_id",t.path.run_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async recordWorkflowStep(t){return e.send({op:"RecordWorkflowStep",method:"POST",path:"/ai/workflows/runs/"+c("RecordWorkflowStep","run_id",t.path.run_id)+"/steps/"+c("RecordWorkflowStep","step_key",t.path.step_key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async completeWorkflowRun(t){return e.send({op:"CompleteWorkflowRun",method:"POST",path:"/ai/workflows/runs/"+c("CompleteWorkflowRun","run_id",t.path.run_id)+"/complete",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async replayWorkflowRun(t){return e.send({op:"ReplayWorkflowRun",method:"POST",path:"/ai/workflows/runs/"+c("ReplayWorkflowRun","run_id",t.path.run_id)+"/replay",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stopRunTree(t){return e.send({op:"StopRunTree",method:"POST",path:"/ai/runs/"+c("StopRunTree","root_id",t.path.root_id)+"/stop-tree",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getMemory(t){return e.send({op:"GetMemory",method:"GET",path:"/ai/memory/"+c("GetMemory","namespace",t.path.namespace)+"/"+c("GetMemory","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putMemory(t){return e.send({op:"PutMemory",method:"PUT",path:"/ai/memory/"+c("PutMemory","namespace",t.path.namespace)+"/"+c("PutMemory","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMemory(t){return e.send({op:"DeleteMemory",method:"DELETE",path:"/ai/memory/"+c("DeleteMemory","namespace",t.path.namespace)+"/"+c("DeleteMemory","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async searchMemory(t){return e.send({op:"SearchMemory",method:"POST",path:"/ai/memory/search",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listActorGroupMembers(t){return e.send({op:"ListActorGroupMembers",method:"GET",path:"/ai/groups/"+c("ListActorGroupMembers","group_id",t.path.group_id)+"/members",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async addActorGroupMember(t){return e.send({op:"AddActorGroupMember",method:"POST",path:"/ai/groups/"+c("AddActorGroupMember","group_id",t.path.group_id)+"/members",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async broadcastActorGroup(t){return e.send({op:"BroadcastActorGroup",method:"POST",path:"/ai/groups/"+c("BroadcastActorGroup","group_id",t.path.group_id)+"/broadcast",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getA2AAgentCard(t){return e.send({op:"GetA2AAgentCard",method:"GET",path:"/.well-known/agent.json",auth:[],answers:{200:"json"},signal:t?.signal})},async callA2Arpc(t){return e.send({op:"CallA2ARPC",method:"POST",path:"/ai/a2a",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async putMcpUserCredential(t){return e.send({op:"PutMCPUserCredential",method:"POST",path:"/ai/endpoints/"+c("PutMCPUserCredential","name",t.path.name)+"/user-credentials/"+c("PutMCPUserCredential","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMcpUserCredential(t){return e.send({op:"DeleteMCPUserCredential",method:"DELETE",path:"/ai/endpoints/"+c("DeleteMCPUserCredential","name",t.path.name)+"/user-credentials/"+c("DeleteMCPUserCredential","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async startMcpoAuth(t){return e.send({op:"StartMCPOAuth",method:"GET",path:"/ai/endpoints/"+c("StartMCPOAuth","name",t.path.name)+"/oauth/start",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async completeMcpoAuthCallback(t){return e.send({op:"CompleteMCPOAuthCallback",method:"GET",path:"/ai/mcp/oauth/callback",auth:[],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listTemplates(t){return e.send({op:"ListTemplates",method:"GET",path:"/ai/templates",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getTemplate(t){return e.send({op:"GetTemplate",method:"GET",path:"/ai/templates/"+c("GetTemplate","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putTemplate(t){return e.send({op:"PutTemplate",method:"PUT",path:"/ai/templates/"+c("PutTemplate","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteTemplate(t){return e.send({op:"DeleteTemplate",method:"DELETE",path:"/ai/templates/"+c("DeleteTemplate","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async publishTemplate(t){return e.send({op:"PublishTemplate",method:"POST",path:"/ai/templates/"+c("PublishTemplate","name",t.path.name)+"/publish",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rollbackTemplate(t){return e.send({op:"RollbackTemplate",method:"POST",path:"/ai/templates/"+c("RollbackTemplate","name",t.path.name)+"/rollback",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTemplateVersions(t){return e.send({op:"ListTemplateVersions",method:"GET",path:"/ai/templates/"+c("ListTemplateVersions","name",t.path.name)+"/versions",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listUserSpend(t){return e.send({op:"ListUserSpend",method:"GET",path:"/ai/users/spend",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getUserQuota(t){return e.send({op:"GetUserQuota",method:"GET",path:"/ai/users/"+c("GetUserQuota","user_id",t.path.user_id)+"/quota",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putUserQuota(t){return e.send({op:"PutUserQuota",method:"PUT",path:"/ai/users/"+c("PutUserQuota","user_id",t.path.user_id)+"/quota",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteUserQuota(t){return e.send({op:"DeleteUserQuota",method:"DELETE",path:"/ai/users/"+c("DeleteUserQuota","user_id",t.path.user_id)+"/quota",auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async clientAttestChallenge(t){return e.send({op:"ClientAttestChallenge",method:"POST",path:"/ai/client/attest-challenge",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async runClientTemplate(t){return e.send({op:"RunClientTemplate",method:"POST",path:"/ai/client/templates/"+c("RunClientTemplate","name",t.path.name)+"/run",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async voiceClientTemplate(t){return e.send({op:"VoiceClientTemplate",method:"POST",path:"/ai/client/templates/"+c("VoiceClientTemplate","name",t.path.name)+"/voice",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createMachineKey(t){return e.send({op:"CreateMachineKey",method:"POST",path:"/ai/machine-keys",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMachines(t){return e.send({op:"ListMachines",method:"GET",path:"/ai/machines",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})}}}var Co={};wt(Co,{client:()=>BS});function BS(e){return{async listAudiences(t){return e.send({op:"ListAudiences",method:"GET",path:"/analytics/audiences",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createAudience(t){return e.send({op:"CreateAudience",method:"POST",path:"/analytics/audiences",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async previewAudience(t){return e.send({op:"PreviewAudience",method:"POST",path:"/analytics/audiences/preview",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getAudience(t){return e.send({op:"GetAudience",method:"GET",path:"/analytics/audiences/"+c("GetAudience","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteAudience(t){return e.send({op:"DeleteAudience",method:"DELETE",path:"/analytics/audiences/"+c("DeleteAudience","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateAudience(t){return e.send({op:"UpdateAudience",method:"PATCH",path:"/analytics/audiences/"+c("UpdateAudience","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listAudienceMembers(t){return e.send({op:"ListAudienceMembers",method:"GET",path:"/analytics/audiences/"+c("ListAudienceMembers","id",t.path.id)+"/members",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async alias(t){return e.send({op:"Alias",method:"POST",path:"/analytics/alias",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async batch(t){return e.send({op:"Batch",method:"POST",path:"/analytics/batch",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json",207:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getEventBreakdown(t){return e.send({op:"GetEventBreakdown",method:"GET",path:"/analytics/breakdown",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async capture(t){return e.send({op:"Capture",method:"POST",path:"/analytics/capture",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sendConsoleHistory(t){return e.send({op:"SendConsoleHistory",method:"POST",path:"/analytics/console-breadcrumbs",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getConsoleConfig(t){return e.send({op:"GetConsoleConfig",method:"GET",path:"/analytics/console-breadcrumbs/config",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listConsoleRecords(t){return e.send({op:"ListConsoleRecords",method:"GET",path:"/analytics/console-records",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listEventNames(t){return e.send({op:"ListEventNames",method:"GET",path:"/analytics/event-names",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listEvents(t){return e.send({op:"ListEvents",method:"GET",path:"/analytics/events",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getEventTimeline(t){return e.send({op:"GetEventTimeline",method:"GET",path:"/analytics/events/timeline",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async runFunnel(t){return e.send({op:"RunFunnel",method:"POST",path:"/analytics/funnel",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async identify(t){return e.send({op:"Identify",method:"POST",path:"/analytics/identify",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async page(t){return e.send({op:"Page",method:"POST",path:"/analytics/page",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sendPerf(t){return e.send({op:"SendPerf",method:"POST",path:"/analytics/perf",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPerfGroups(t){return e.send({op:"ListPerfGroups",method:"GET",path:"/analytics/perf/client",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getPerfConfig(t){return e.send({op:"GetPerfConfig",method:"GET",path:"/analytics/perf/config",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json",304:"empty"},headers:t?.headers,signal:t?.signal})},async getPerfTimeline(t){return e.send({op:"GetPerfTimeline",method:"GET",path:"/analytics/perf/timeline",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listRequestLines(t){return e.send({op:"ListRequestLines",method:"GET",path:"/analytics/requests",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getMachineTraffic(t){return e.send({op:"GetMachineTraffic",method:"GET",path:"/analytics/machines/"+c("GetMachineTraffic","name",t.path.name)+"/traffic",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async runRetention(t){return e.send({op:"RunRetention",method:"POST",path:"/analytics/retention",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async screen(t){return e.send({op:"Screen",method:"POST",path:"/analytics/screen",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSettings(t){return e.send({op:"GetSettings",method:"GET",path:"/analytics/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putSettings(t){return e.send({op:"PutSettings",method:"PUT",path:"/analytics/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSummary(t){return e.send({op:"GetSummary",method:"GET",path:"/analytics/summary",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listTraces(t){return e.send({op:"ListTraces",method:"GET",path:"/analytics/traces",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async sendTrace(t){return e.send({op:"SendTrace",method:"POST",path:"/analytics/traces",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sendTraceBatch(t){return e.send({op:"SendTraceBatch",method:"POST",path:"/analytics/traces/batch",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json",207:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getTraceHops(t){return e.send({op:"GetTraceHops",method:"GET",path:"/analytics/traces/by-trace",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listSessionTraces(t){return e.send({op:"ListSessionTraces",method:"GET",path:"/analytics/traces/session",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getTraceSummary(t){return e.send({op:"GetTraceSummary",method:"GET",path:"/analytics/traces/summary",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getTraceTimeline(t){return e.send({op:"GetTraceTimeline",method:"GET",path:"/analytics/traces/timeline",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async searchPeople(t){return e.send({op:"SearchPeople",method:"GET",path:"/analytics/people",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async setPersonProperties(t){return e.send({op:"SetPersonProperties",method:"POST",path:"/analytics/people",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPerson(t){return e.send({op:"GetPerson",method:"GET",path:"/analytics/people/"+c("GetPerson","person_id",t.path.person_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listPersonEvents(t){return e.send({op:"ListPersonEvents",method:"GET",path:"/analytics/people/"+c("ListPersonEvents","person_id",t.path.person_id)+"/events",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getEventCatalog(t){return e.send({op:"GetEventCatalog",method:"GET",path:"/analytics/catalog",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async defineEvent(t){return e.send({op:"DefineEvent",method:"PUT",path:"/analytics/catalog/"+c("DefineEvent","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var Oo={};wt(Oo,{client:()=>JS});function JS(e){return{async getAppleAppSiteAssociation(t){return e.send({op:"GetAppleAppSiteAssociation",method:"GET",path:"/.well-known/apple-app-site-association",auth:[],answers:{200:"json"},signal:t?.signal})},async getAssetLinks(t){return e.send({op:"GetAssetLinks",method:"GET",path:"/.well-known/assetlinks.json",auth:[],answers:{200:"json"},signal:t?.signal})},async getJwks(t){return e.send({op:"GetJWKS",method:"GET",path:"/.well-known/jwks.json",auth:[],answers:{200:"json"},signal:t?.signal})},async getOidcDiscovery(t){return e.send({op:"GetOIDCDiscovery",method:"GET",path:"/.well-known/openid-configuration",auth:[],answers:{200:"json"},signal:t?.signal})},async getWebAuthnRelatedOrigins(t){return e.send({op:"GetWebAuthnRelatedOrigins",method:"GET",path:"/.well-known/webauthn",auth:[],answers:{200:"json"},signal:t?.signal})},async adminVerifyDeviceAssertion(t){return e.send({op:"AdminVerifyDeviceAssertion",method:"POST",path:"/admin/attest/devices/assert",auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetAttestPolicy(t){return e.send({op:"AdminGetAttestPolicy",method:"GET",path:"/admin/attest/devices/attest-policy",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminGetAttestObservations(t){return e.send({op:"AdminGetAttestObservations",method:"GET",path:"/admin/attest/devices/observations",auth:[["AdminAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminRecordAttestObservations(t){return e.send({op:"AdminRecordAttestObservations",method:"POST",path:"/admin/attest/devices/observations",auth:[["AdminAuth"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListAuditEvents(t){return e.send({op:"AdminListAuditEvents",method:"GET",path:"/admin/audit",auth:[["AdminAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminExportAuditEvents(t){return e.send({op:"AdminExportAuditEvents",method:"GET",path:"/admin/audit/export",auth:[["AdminAuth"]],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async adminVerifyAuditTrail(t){return e.send({op:"AdminVerifyAuditTrail",method:"GET",path:"/admin/audit/verify",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminGetAuthSettings(t){return e.send({op:"AdminGetAuthSettings",method:"GET",path:"/admin/auth-settings",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminUpdateAuthSettings(t){return e.send({op:"AdminUpdateAuthSettings",method:"PUT",path:"/admin/auth-settings",auth:[["AdminAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetBreachWatch(t){return e.send({op:"AdminGetBreachWatch",method:"GET",path:"/admin/breach-watch",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminListHooks(t){return e.send({op:"AdminListHooks",method:"GET",path:"/admin/hooks",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminCreateHook(t){return e.send({op:"AdminCreateHook",method:"POST",path:"/admin/hooks",auth:[["AdminAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminUpdateHook(t){return e.send({op:"AdminUpdateHook",method:"PUT",path:"/admin/hooks/"+c("AdminUpdateHook","id",t.path.id),auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminDeleteHook(t){return e.send({op:"AdminDeleteHook",method:"DELETE",path:"/admin/hooks/"+c("AdminDeleteHook","id",t.path.id),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminListHookExecutions(t){return e.send({op:"AdminListHookExecutions",method:"GET",path:"/admin/hooks/"+c("AdminListHookExecutions","id",t.path.id)+"/executions",auth:[["AdminAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async adminListIntegrations(t){return e.send({op:"AdminListIntegrations",method:"GET",path:"/admin/integrations",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminPutIntegration(t){return e.send({op:"AdminPutIntegration",method:"PUT",path:"/admin/integrations/"+c("AdminPutIntegration","name",t.path.name),auth:[["AdminAuth"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminDeleteIntegration(t){return e.send({op:"AdminDeleteIntegration",method:"DELETE",path:"/admin/integrations/"+c("AdminDeleteIntegration","name",t.path.name),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminListOAuthClients(t){return e.send({op:"AdminListOAuthClients",method:"GET",path:"/admin/oauth-clients",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminCreateOAuthClient(t){return e.send({op:"AdminCreateOAuthClient",method:"POST",path:"/admin/oauth-clients",auth:[["AdminAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetOAuthClient(t){return e.send({op:"AdminGetOAuthClient",method:"GET",path:"/admin/oauth-clients/"+c("AdminGetOAuthClient","id",t.path.id),auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminDeleteOAuthClient(t){return e.send({op:"AdminDeleteOAuthClient",method:"DELETE",path:"/admin/oauth-clients/"+c("AdminDeleteOAuthClient","id",t.path.id),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminUpdateOAuthClient(t){return e.send({op:"AdminUpdateOAuthClient",method:"PATCH",path:"/admin/oauth-clients/"+c("AdminUpdateOAuthClient","id",t.path.id),auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListProviders(t){return e.send({op:"AdminListProviders",method:"GET",path:"/admin/providers",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminGetPhoneSettings(t){return e.send({op:"AdminGetPhoneSettings",method:"GET",path:"/admin/providers/phone/settings",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminUpdatePhoneSettings(t){return e.send({op:"AdminUpdatePhoneSettings",method:"PUT",path:"/admin/providers/phone/settings",auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminToggleProvider(t){return e.send({op:"AdminToggleProvider",method:"POST",path:"/admin/providers/"+c("AdminToggleProvider","name",t.path.name),auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListRoles(t){return e.send({op:"AdminListRoles",method:"GET",path:"/admin/roles",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminUpsertRole(t){return e.send({op:"AdminUpsertRole",method:"PUT",path:"/admin/roles/"+c("AdminUpsertRole","name",t.path.name),auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminDeleteRole(t){return e.send({op:"AdminDeleteRole",method:"DELETE",path:"/admin/roles/"+c("AdminDeleteRole","name",t.path.name),auth:[["AdminAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async adminListServiceAccounts(t){return e.send({op:"AdminListServiceAccounts",method:"GET",path:"/admin/service-accounts",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminCreateServiceAccount(t){return e.send({op:"AdminCreateServiceAccount",method:"POST",path:"/admin/service-accounts",auth:[["AdminAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetServiceAccount(t){return e.send({op:"AdminGetServiceAccount",method:"GET",path:"/admin/service-accounts/"+c("AdminGetServiceAccount","id",t.path.id),auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminRevokeServiceAccount(t){return e.send({op:"AdminRevokeServiceAccount",method:"DELETE",path:"/admin/service-accounts/"+c("AdminRevokeServiceAccount","id",t.path.id),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminRotateServiceAccount(t){return e.send({op:"AdminRotateServiceAccount",method:"POST",path:"/admin/service-accounts/"+c("AdminRotateServiceAccount","id",t.path.id)+"/rotate",auth:[["AdminAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async adminListSessions(t){return e.send({op:"AdminListSessions",method:"GET",path:"/admin/sessions",auth:[["AdminAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminRevokeSession(t){return e.send({op:"AdminRevokeSession",method:"DELETE",path:"/admin/sessions/"+c("AdminRevokeSession","id",t.path.id),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminListSigningKeys(t){return e.send({op:"AdminListSigningKeys",method:"GET",path:"/admin/signing-keys",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminRotateSigningKey(t){return e.send({op:"AdminRotateSigningKey",method:"POST",path:"/admin/signing-keys/rotate",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async socialAdminConfig(t){return e.send({op:"SocialAdminConfig",method:"GET",path:"/admin/social-auth",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async socialCredentialPut(t){return e.send({op:"SocialCredentialPut",method:"PUT",path:"/admin/social-auth/credentials/"+c("SocialCredentialPut","key",t.path.key),auth:[["AdminAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async socialCredentialDelete(t){return e.send({op:"SocialCredentialDelete",method:"DELETE",path:"/admin/social-auth/credentials/"+c("SocialCredentialDelete","key",t.path.key),auth:[["AdminAuth"]],answers:{204:"empty"},headers:t.headers,signal:t.signal})},async socialProviderPatch(t){return e.send({op:"SocialProviderPatch",method:"PATCH",path:"/admin/social-auth/providers/"+c("SocialProviderPatch","provider",t.path.provider),auth:[["AdminAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetStats(t){return e.send({op:"AdminGetStats",method:"GET",path:"/admin/stats",auth:[["AdminAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminSendTestTemplate(t){return e.send({op:"AdminSendTestTemplate",method:"POST",path:"/admin/templates/"+c("AdminSendTestTemplate","key",t.path.key)+"/send-test",auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListTestUsers(t){return e.send({op:"AdminListTestUsers",method:"GET",path:"/admin/test-users",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminCreateTestUsers(t){return e.send({op:"AdminCreateTestUsers",method:"POST",path:"/admin/test-users",auth:[["AdminAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminSetTestUserPhone(t){return e.send({op:"AdminSetTestUserPhone",method:"PUT",path:"/admin/test-users/phone",auth:[["AdminAuth"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminCreateTestSignupAddress(t){return e.send({op:"AdminCreateTestSignupAddress",method:"POST",path:"/admin/test-users/addresses",auth:[["AdminAuth"]],answers:{201:"json"},signal:t?.signal})},async adminDeleteTestUser(t){return e.send({op:"AdminDeleteTestUser",method:"DELETE",path:"/admin/test-users/"+c("AdminDeleteTestUser","uid",t.path.uid),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminCreateCustomToken(t){return e.send({op:"AdminCreateCustomToken",method:"POST",path:"/admin/token/custom",auth:[["AdminAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListUsers(t){return e.send({op:"AdminListUsers",method:"GET",path:"/admin/users",auth:[["AdminAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminCreateUser(t){return e.send({op:"AdminCreateUser",method:"POST",path:"/admin/users",auth:[["AdminAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminImportUsers(t){return e.send({op:"AdminImportUsers",method:"POST",path:"/admin/users/import",auth:[["AdminAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetUser(t){return e.send({op:"AdminGetUser",method:"GET",path:"/admin/users/"+c("AdminGetUser","uid",t.path.uid),auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminDeleteUser(t){return e.send({op:"AdminDeleteUser",method:"DELETE",path:"/admin/users/"+c("AdminDeleteUser","uid",t.path.uid),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminUpdateUser(t){return e.send({op:"AdminUpdateUser",method:"PATCH",path:"/admin/users/"+c("AdminUpdateUser","uid",t.path.uid),auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminBanUser(t){return e.send({op:"AdminBanUser",method:"POST",path:"/admin/users/"+c("AdminBanUser","uid",t.path.uid)+"/ban",auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetUserConsents(t){return e.send({op:"AdminGetUserConsents",method:"GET",path:"/admin/users/"+c("AdminGetUserConsents","uid",t.path.uid)+"/consents",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminRevokeUserCredentials(t){return e.send({op:"AdminRevokeUserCredentials",method:"POST",path:"/admin/users/"+c("AdminRevokeUserCredentials","uid",t.path.uid)+"/credentials/revoke-all",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminExportUser(t){return e.send({op:"AdminExportUser",method:"GET",path:"/admin/users/"+c("AdminExportUser","uid",t.path.uid)+"/export",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminListUserMfaFactors(t){return e.send({op:"AdminListUserMFAFactors",method:"GET",path:"/admin/users/"+c("AdminListUserMFAFactors","uid",t.path.uid)+"/mfa",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminResetUserMfa(t){return e.send({op:"AdminResetUserMFA",method:"DELETE",path:"/admin/users/"+c("AdminResetUserMFA","uid",t.path.uid)+"/mfa",auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminResetUserPassword(t){return e.send({op:"AdminResetUserPassword",method:"POST",path:"/admin/users/"+c("AdminResetUserPassword","uid",t.path.uid)+"/reset-password",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminListUserRoles(t){return e.send({op:"AdminListUserRoles",method:"GET",path:"/admin/users/"+c("AdminListUserRoles","uid",t.path.uid)+"/roles",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminAssignUserRole(t){return e.send({op:"AdminAssignUserRole",method:"PUT",path:"/admin/users/"+c("AdminAssignUserRole","uid",t.path.uid)+"/roles/"+c("AdminAssignUserRole","role",t.path.role),auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminRevokeUserRole(t){return e.send({op:"AdminRevokeUserRole",method:"DELETE",path:"/admin/users/"+c("AdminRevokeUserRole","uid",t.path.uid)+"/roles/"+c("AdminRevokeUserRole","role",t.path.role),auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminRevokeUserSessions(t){return e.send({op:"AdminRevokeUserSessions",method:"POST",path:"/admin/users/"+c("AdminRevokeUserSessions","uid",t.path.uid)+"/sessions/revoke-all",auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminUnbanUser(t){return e.send({op:"AdminUnbanUser",method:"POST",path:"/admin/users/"+c("AdminUnbanUser","uid",t.path.uid)+"/unban",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async signInAnonymously(t){return e.send({op:"SignInAnonymously",method:"POST",path:"/auth/anonymous",auth:[["ApiKeyAuth"]],answers:{201:"json"},headers:t?.headers,body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async convertAnonymousUser(t){return e.send({op:"ConvertAnonymousUser",method:"POST",path:"/auth/anonymous/convert",auth:[["ApiKeyAuth","userJWT"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async verifyAnonymousConversion(t){return e.send({op:"VerifyAnonymousConversion",method:"POST",path:"/auth/anonymous/convert/verify",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async devicePendingRequest(t){return e.send({op:"DevicePendingRequest",method:"GET",path:"/auth/device/requests/"+c("DevicePendingRequest","user_code",t.path.user_code),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async deviceVerifyPage(t){return e.send({op:"DeviceVerifyPage",method:"GET",path:"/auth/device/verify",auth:[["ApiKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async deviceVerifySubmit(t){return e.send({op:"DeviceVerifySubmit",method:"POST",path:"/auth/device/verify",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async listDevices(t){return e.send({op:"ListDevices",method:"GET",path:"/auth/devices",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async attestAndroidDevice(t){return e.send({op:"AttestAndroidDevice",method:"POST",path:"/auth/devices/attest/android",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async attestIosDevice(t){return e.send({op:"AttestIOSDevice",method:"POST",path:"/auth/devices/attest/ios",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async bindDeviceKey(t){return e.send({op:"BindDeviceKey",method:"POST",path:"/auth/devices/bind",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createDeviceChallenge(t){return e.send({op:"CreateDeviceChallenge",method:"POST",path:"/auth/devices/challenge",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t?.headers,signal:t?.signal})},async verifyAndroidIntegrity(t){return e.send({op:"VerifyAndroidIntegrity",method:"POST",path:"/auth/devices/verify/android",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteDevice(t){return e.send({op:"DeleteDevice",method:"DELETE",path:"/auth/devices/"+c("DeleteDevice","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async verifyDeviceSignature(t){return e.send({op:"VerifyDeviceSignature",method:"POST",path:"/auth/devices/"+c("VerifyDeviceSignature","id",t.path.id)+"/verify",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listIdentities(t){return e.send({op:"ListIdentities",method:"GET",path:"/auth/identities",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async unlinkIdentity(t){return e.send({op:"UnlinkIdentity",method:"DELETE",path:"/auth/identities/"+c("UnlinkIdentity","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async createInstallation(t){return e.send({op:"CreateInstallation",method:"POST",path:"/auth/installations",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async bindInstallation(t){return e.send({op:"BindInstallation",method:"POST",path:"/auth/installations/"+c("BindInstallation","id",t.path.id)+"/bind",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async refreshInstallation(t){return e.send({op:"RefreshInstallation",method:"POST",path:"/auth/installations/"+c("RefreshInstallation","id",t.path.id)+"/refresh",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async revokeInstallation(t){return e.send({op:"RevokeInstallation",method:"POST",path:"/auth/installations/"+c("RevokeInstallation","id",t.path.id)+"/revoke",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async unbindInstallation(t){return e.send({op:"UnbindInstallation",method:"POST",path:"/auth/installations/"+c("UnbindInstallation","id",t.path.id)+"/unbind",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async login(t){return e.send({op:"Login",method:"POST",path:"/auth/login",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async logout(t){return e.send({op:"Logout",method:"POST",path:"/auth/logout",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async magicLinkRequest(t){return e.send({op:"MagicLinkRequest",method:"POST",path:"/auth/magic-link",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async magicLinkVerify(t){return e.send({op:"MagicLinkVerify",method:"POST",path:"/auth/magic-link/verify",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getMe(t){return e.send({op:"GetMe",method:"GET",path:"/auth/me",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async updateMe(t){return e.send({op:"UpdateMe",method:"PATCH",path:"/auth/me",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaChallenge(t){return e.send({op:"MfaChallenge",method:"POST",path:"/auth/mfa/challenge",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaEmailChallenge(t){return e.send({op:"MfaEmailChallenge",method:"POST",path:"/auth/mfa/email/challenge",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaEmailEnroll(t){return e.send({op:"MfaEmailEnroll",method:"POST",path:"/auth/mfa/email/enroll",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async mfaEmailVerify(t){return e.send({op:"MfaEmailVerify",method:"POST",path:"/auth/mfa/email/verify",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaEnroll(t){return e.send({op:"MfaEnroll",method:"POST",path:"/auth/mfa/enroll",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaListFactors(t){return e.send({op:"MfaListFactors",method:"GET",path:"/auth/mfa/factors",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async mfaRemoveFactor(t){return e.send({op:"MfaRemoveFactor",method:"DELETE",path:"/auth/mfa/factors/"+c("MfaRemoveFactor","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaRecovery(t){return e.send({op:"MfaRecovery",method:"POST",path:"/auth/mfa/recovery",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaRegenerateRecoveryCodes(t){return e.send({op:"MfaRegenerateRecoveryCodes",method:"POST",path:"/auth/mfa/recovery-codes/regenerate",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async mfaSmsChallenge(t){return e.send({op:"MfaSMSChallenge",method:"POST",path:"/auth/mfa/sms/challenge",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaSmsEnroll(t){return e.send({op:"MfaSMSEnroll",method:"POST",path:"/auth/mfa/sms/enroll",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaSmsVerifyEnrollment(t){return e.send({op:"MfaSMSVerifyEnrollment",method:"POST",path:"/auth/mfa/sms/verify",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaVerifyEnrollment(t){return e.send({op:"MfaVerifyEnrollment",method:"POST",path:"/auth/mfa/verify",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async socialCallbackApple(t){return e.send({op:"SocialCallbackApple",method:"GET",path:"/auth/oauth/callback/apple",auth:[],answers:{},signal:t?.signal})},async socialCallbackApplePost(t){return e.send({op:"SocialCallbackApplePost",method:"POST",path:"/auth/oauth/callback/apple",auth:[],answers:{303:"redirect"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async socialCallbackGitHub(t){return e.send({op:"SocialCallbackGitHub",method:"GET",path:"/auth/oauth/callback/github",auth:[],answers:{303:"redirect"},query:t.query,signal:t.signal})},async socialCallbackGitHubPost(t){return e.send({op:"SocialCallbackGitHubPost",method:"POST",path:"/auth/oauth/callback/github",auth:[],answers:{},signal:t?.signal})},async socialCallbackGoogle(t){return e.send({op:"SocialCallbackGoogle",method:"GET",path:"/auth/oauth/callback/google",auth:[],answers:{303:"redirect"},query:t.query,signal:t.signal})},async socialCallbackGooglePost(t){return e.send({op:"SocialCallbackGooglePost",method:"POST",path:"/auth/oauth/callback/google",auth:[],answers:{},signal:t?.signal})},async socialCallbackMicrosoft(t){return e.send({op:"SocialCallbackMicrosoft",method:"GET",path:"/auth/oauth/callback/microsoft",auth:[],answers:{303:"redirect"},query:t.query,signal:t.signal})},async socialCallbackMicrosoftPost(t){return e.send({op:"SocialCallbackMicrosoftPost",method:"POST",path:"/auth/oauth/callback/microsoft",auth:[],answers:{},signal:t?.signal})},async socialConfig(t){return e.send({op:"SocialConfig",method:"GET",path:"/auth/oauth/config",auth:[["ApiKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async socialBegin(t){return e.send({op:"SocialBegin",method:"POST",path:"/auth/oauth/transactions",auth:[["ApiKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async socialCancel(t){return e.send({op:"SocialCancel",method:"POST",path:"/auth/oauth/transactions/"+c("SocialCancel","id",t.path.id)+"/cancel",auth:[["ApiKeyAuth"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async socialComplete(t){return e.send({op:"SocialComplete",method:"POST",path:"/auth/oauth/transactions/"+c("SocialComplete","id",t.path.id)+"/complete",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async requestPhoneOtp(t){return e.send({op:"RequestPhoneOTP",method:"POST",path:"/auth/otp",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async verifyPhoneOtp(t){return e.send({op:"VerifyPhoneOTP",method:"POST",path:"/auth/otp/verify",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async hostedRecoveryApprovalPage(t){return e.send({op:"HostedRecoveryApprovalPage",method:"GET",path:"/auth/pages/recovery-approval",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedRecoveryApprovalSubmit(t){return e.send({op:"HostedRecoveryApprovalSubmit",method:"POST",path:"/auth/pages/recovery-approval",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async hostedRecoveryContactPage(t){return e.send({op:"HostedRecoveryContactPage",method:"GET",path:"/auth/pages/recovery-contact",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedRecoveryContactSubmit(t){return e.send({op:"HostedRecoveryContactSubmit",method:"POST",path:"/auth/pages/recovery-contact",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async hostedResetPasswordPage(t){return e.send({op:"HostedResetPasswordPage",method:"GET",path:"/auth/pages/reset-password",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedResetPasswordSubmit(t){return e.send({op:"HostedResetPasswordSubmit",method:"POST",path:"/auth/pages/reset-password",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async hostedVerifyEmailPage(t){return e.send({op:"HostedVerifyEmailPage",method:"GET",path:"/auth/pages/verify-email",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedVerifyEmailSubmit(t){return e.send({op:"HostedVerifyEmailSubmit",method:"POST",path:"/auth/pages/verify-email",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async passwordChange(t){return e.send({op:"PasswordChange",method:"POST",path:"/auth/password/change",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async passwordResetRequest(t){return e.send({op:"PasswordResetRequest",method:"POST",path:"/auth/password/reset",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async passwordResetConfirm(t){return e.send({op:"PasswordResetConfirm",method:"POST",path:"/auth/password/reset/confirm",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async setPassword(t){return e.send({op:"SetPassword",method:"POST",path:"/auth/password/set",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async powChallenge(t){return e.send({op:"PowChallenge",method:"POST",path:"/auth/pow/challenge",auth:[["ApiKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async approveRecovery(t){return e.send({op:"ApproveRecovery",method:"POST",path:"/auth/recovery/approve",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listRecoveryContacts(t){return e.send({op:"ListRecoveryContacts",method:"GET",path:"/auth/recovery/contacts",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async addRecoveryContact(t){return e.send({op:"AddRecoveryContact",method:"POST",path:"/auth/recovery/contacts",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteRecoveryContact(t){return e.send({op:"DeleteRecoveryContact",method:"DELETE",path:"/auth/recovery/contacts/"+c("DeleteRecoveryContact","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async verifyRecoveryContact(t){return e.send({op:"VerifyRecoveryContact",method:"POST",path:"/auth/recovery/contacts/"+c("VerifyRecoveryContact","id",t.path.id)+"/verify",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async denyRecovery(t){return e.send({op:"DenyRecovery",method:"POST",path:"/auth/recovery/deny",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async initiateRecovery(t){return e.send({op:"InitiateRecovery",method:"POST",path:"/auth/recovery/initiate",auth:[["ApiKeyAuth"]],answers:{200:"json",202:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getRecoveryStatus(t){return e.send({op:"GetRecoveryStatus",method:"GET",path:"/auth/recovery/status",auth:[["ApiKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async resendVerification(t){return e.send({op:"ResendVerification",method:"POST",path:"/auth/resend-verification",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSessions(t){return e.send({op:"ListSessions",method:"GET",path:"/auth/sessions",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async revokeAllSessions(t){return e.send({op:"RevokeAllSessions",method:"DELETE",path:"/auth/sessions",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async revokeSession(t){return e.send({op:"RevokeSession",method:"DELETE",path:"/auth/sessions/"+c("RevokeSession","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async signup(t){return e.send({op:"Signup",method:"POST",path:"/auth/signup",auth:[["ApiKeyAuth"]],answers:{201:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stepUp(t){return e.send({op:"StepUp",method:"POST",path:"/auth/step-up",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stepUpStatus(t){return e.send({op:"StepUpStatus",method:"GET",path:"/auth/step-up/status",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async stepUpWebAuthnBegin(t){return e.send({op:"StepUpWebAuthnBegin",method:"POST",path:"/auth/step-up/webauthn/begin",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async stepUpSmsSend(t){return e.send({op:"StepUpSMSSend",method:"POST",path:"/auth/step-up/sms/send",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async exchangeCustomToken(t){return e.send({op:"ExchangeCustomToken",method:"POST",path:"/auth/token/exchange",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async refreshToken(t){return e.send({op:"RefreshToken",method:"POST",path:"/auth/token/refresh",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revokeRefreshToken(t){return e.send({op:"RevokeRefreshToken",method:"POST",path:"/auth/token/revoke",auth:[["ApiKeyAuth"]],answers:{200:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTransactions(t){return e.send({op:"ListTransactions",method:"GET",path:"/auth/transactions",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createTransaction(t){return e.send({op:"CreateTransaction",method:"POST",path:"/auth/transactions",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getTransaction(t){return e.send({op:"GetTransaction",method:"GET",path:"/auth/transactions/"+c("GetTransaction","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async approveTransaction(t){return e.send({op:"ApproveTransaction",method:"POST",path:"/auth/transactions/"+c("ApproveTransaction","id",t.path.id)+"/approve",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async denyTransaction(t){return e.send({op:"DenyTransaction",method:"POST",path:"/auth/transactions/"+c("DenyTransaction","id",t.path.id)+"/deny",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTrustedDevices(t){return e.send({op:"ListTrustedDevices",method:"GET",path:"/auth/trusted-devices",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async registerTrustedDevice(t){return e.send({op:"RegisterTrustedDevice",method:"POST",path:"/auth/trusted-devices",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revokeTrustedDevice(t){return e.send({op:"RevokeTrustedDevice",method:"DELETE",path:"/auth/trusted-devices/"+c("RevokeTrustedDevice","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async verifyTokenUser(t){return e.send({op:"VerifyTokenUser",method:"GET",path:"/auth/user",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async deleteAccount(t){return e.send({op:"DeleteAccount",method:"DELETE",path:"/auth/user",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async verifyEmail(t){return e.send({op:"VerifyEmail",method:"POST",path:"/auth/verify-email",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnListCredentials(t){return e.send({op:"WebauthnListCredentials",method:"GET",path:"/auth/webauthn/credentials",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async webauthnRenameCredential(t){return e.send({op:"WebauthnRenameCredential",method:"PUT",path:"/auth/webauthn/credentials/"+c("WebauthnRenameCredential","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnDeleteCredential(t){return e.send({op:"WebauthnDeleteCredential",method:"DELETE",path:"/auth/webauthn/credentials/"+c("WebauthnDeleteCredential","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async webauthnLoginBegin(t){return e.send({op:"WebauthnLoginBegin",method:"POST",path:"/auth/webauthn/login/begin",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async webauthnLoginFinish(t){return e.send({op:"WebauthnLoginFinish",method:"POST",path:"/auth/webauthn/login/finish",auth:[["ApiKeyAuth"]],answers:{200:"json"},query:t.query,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnRecoveryBegin(t){return e.send({op:"WebauthnRecoveryBegin",method:"POST",path:"/auth/webauthn/recovery/begin",auth:[["ApiKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async webauthnRecoveryFinish(t){return e.send({op:"WebauthnRecoveryFinish",method:"POST",path:"/auth/webauthn/recovery/finish",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnRecoveryRegisterBegin(t){return e.send({op:"WebauthnRecoveryRegisterBegin",method:"POST",path:"/auth/webauthn/recovery/register/begin",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async webauthnRecoveryRegisterFinish(t){return e.send({op:"WebauthnRecoveryRegisterFinish",method:"POST",path:"/auth/webauthn/recovery/register/finish",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnRegisterBegin(t){return e.send({op:"WebauthnRegisterBegin",method:"POST",path:"/auth/webauthn/register/begin",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async webauthnRegisterFinish(t){return e.send({op:"WebauthnRegisterFinish",method:"POST",path:"/auth/webauthn/register/finish",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnSignupBegin(t){return e.send({op:"WebauthnSignupBegin",method:"POST",path:"/auth/webauthn/signup/begin",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnSignupFinish(t){return e.send({op:"WebauthnSignupFinish",method:"POST",path:"/auth/webauthn/signup/finish",auth:[["ApiKeyAuth"]],answers:{201:"json"},query:t.query,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async oauthAuthorize(t){return e.send({op:"OauthAuthorize",method:"GET",path:"/oauth/authorize",auth:[],answers:{302:"redirect",303:"redirect"},query:t?.query,signal:t?.signal})},async oauthAuthorizePost(t){return e.send({op:"OauthAuthorizePost",method:"POST",path:"/oauth/authorize",auth:[],answers:{302:"redirect",303:"redirect"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async oauthAuthorizeCallback(t){return e.send({op:"OauthAuthorizeCallback",method:"GET",path:"/oauth/authorize/callback",auth:[],answers:{303:"redirect"},query:t.query,signal:t.signal})},async oauthAuthorizeEmailLink(t){return e.send({op:"OauthAuthorizeEmailLink",method:"GET",path:"/oauth/authorize/email",auth:[],answers:{200:"raw",303:"redirect"},query:t.query,signal:t.signal})},async oauthDeviceAuthorize(t){return e.send({op:"OauthDeviceAuthorize",method:"POST",path:"/oauth/device",auth:[["OAuthClient"],[]],answers:{200:"json"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async oauthIntrospect(t){return e.send({op:"OauthIntrospect",method:"POST",path:"/oauth/introspect",auth:[["AdminAuth"],["OAuthClient"],[]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async oauthLogout(t){return e.send({op:"OauthLogout",method:"GET",path:"/oauth/logout",auth:[],answers:{302:"redirect"},query:t?.query,signal:t?.signal})},async oauthLogoutPost(t){return e.send({op:"OauthLogoutPost",method:"POST",path:"/oauth/logout",auth:[],answers:{302:"redirect"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t?.body},signal:t?.signal})},async oauthPar(t){return e.send({op:"OauthPAR",method:"POST",path:"/oauth/par",auth:[["OAuthClient"],[]],answers:{201:"json"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async oauthRevoke(t){return e.send({op:"OauthRevoke",method:"POST",path:"/oauth/revoke",auth:[["OAuthClient"],[]],answers:{200:"empty"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async oauthToken(t){return e.send({op:"OauthToken",method:"POST",path:"/oauth/token",auth:[["OAuthClient"],[]],answers:{200:"json"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async oauthUserinfo(t){return e.send({op:"OauthUserinfo",method:"GET",path:"/oauth/userinfo",auth:[["OAuthAccessToken"]],answers:{200:"json"},signal:t?.signal})},async oauthUserinfoPost(t){return e.send({op:"OauthUserinfoPost",method:"POST",path:"/oauth/userinfo",auth:[["OAuthAccessToken"]],answers:{200:"json"},signal:t?.signal})},async ownerCliCode(t){return e.send({op:"OwnerCLICode",method:"POST",path:"/auth/cli/owner-code",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listConsentKeys(t){return e.send({op:"ListConsentKeys",method:"GET",path:"/auth/consents/keys",auth:[["ApiKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getConsents(t){return e.send({op:"GetConsents",method:"GET",path:"/auth/consents",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,headers:t.headers,signal:t.signal})},async chooseConsents(t){return e.send({op:"ChooseConsents",method:"PUT",path:"/auth/consents",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async linkConsents(t){return e.send({op:"LinkConsents",method:"POST",path:"/auth/consents/link",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetInstallationConsents(t){return e.send({op:"AdminGetInstallationConsents",method:"GET",path:"/admin/installations/"+c("AdminGetInstallationConsents","installation_id",t.path.installation_id)+"/consents",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminRefuseConsents(t){return e.send({op:"AdminRefuseConsents",method:"POST",path:"/admin/consents/refuse",auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminInviteUser(t){return e.send({op:"AdminInviteUser",method:"POST",path:"/admin/users/invite",auth:[["AdminAuth"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async acceptInvitation(t){return e.send({op:"AcceptInvitation",method:"POST",path:"/auth/invitations/accept",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async hostedAcceptInvitationPage(t){return e.send({op:"HostedAcceptInvitationPage",method:"GET",path:"/auth/pages/accept-invitation",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedAcceptInvitationSubmit(t){return e.send({op:"HostedAcceptInvitationSubmit",method:"POST",path:"/auth/pages/accept-invitation",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async hostedNotMePage(t){return e.send({op:"HostedNotMePage",method:"GET",path:"/auth/pages/not-me",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedNotMeSubmit(t){return e.send({op:"HostedNotMeSubmit",method:"POST",path:"/auth/pages/not-me",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})}}}var tr={};wt(tr,{client:()=>HS});function HS(e){return{async getCacheEntry(t){return e.send({op:"GetCacheEntry",method:"GET",path:"/cache/entry",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async putCacheEntry(t){return e.send({op:"PutCacheEntry",method:"PUT",path:"/cache/entry",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteCacheEntry(t){return e.send({op:"DeleteCacheEntry",method:"DELETE",path:"/cache/entry",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async incrementCacheEntry(t){return e.send({op:"IncrementCacheEntry",method:"POST",path:"/cache/entry/increment",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getCacheUsage(t){return e.send({op:"GetCacheUsage",method:"GET",path:"/cache/usage",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})}}}var nr={};wt(nr,{client:()=>VS});function VS(e){return{async listCalls(t){return e.send({op:"ListCalls",method:"GET",path:"/calls",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async startCall(t){return e.send({op:"StartCall",method:"POST",path:"/calls",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListCalls(t){return e.send({op:"AdminListCalls",method:"GET",path:"/calls/admin/calls",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminGetCall(t){return e.send({op:"AdminGetCall",method:"GET",path:"/calls/admin/calls/"+c("AdminGetCall","call_id",t.path.call_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminEndCall(t){return e.send({op:"AdminEndCall",method:"POST",path:"/calls/admin/calls/"+c("AdminEndCall","call_id",t.path.call_id)+"/end",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createCallTicket(t){return e.send({op:"CreateCallTicket",method:"POST",path:"/calls/admin/calls/"+c("CreateCallTicket","call_id",t.path.call_id)+"/tickets",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetCallTranscription(t){return e.send({op:"AdminGetCallTranscription",method:"GET",path:"/calls/admin/calls/"+c("AdminGetCallTranscription","call_id",t.path.call_id)+"/transcription",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async adminStartCallTranscription(t){return e.send({op:"AdminStartCallTranscription",method:"POST",path:"/calls/admin/calls/"+c("AdminStartCallTranscription","call_id",t.path.call_id)+"/transcription",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminStopCallTranscription(t){return e.send({op:"AdminStopCallTranscription",method:"DELETE",path:"/calls/admin/calls/"+c("AdminStopCallTranscription","call_id",t.path.call_id)+"/transcription",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminIngestCallTranscriptionAudio(t){return e.send({op:"AdminIngestCallTranscriptionAudio",method:"POST",path:"/calls/admin/calls/"+c("AdminIngestCallTranscriptionAudio","call_id",t.path.call_id)+"/transcription/audio",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},body:{kind:"raw",contentType:t.contentType??"multipart/form-data",value:t.body},signal:t.signal})},async getCallPlace(t){return e.send({op:"GetCallPlace",method:"GET",path:"/calls/places/"+c("GetCallPlace","place",t.path.place),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async watchCallPlace(t){return e.send({op:"WatchCallPlace",method:"POST",path:"/calls/places/"+c("WatchCallPlace","place",t.path.place)+"/watch",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async unwatchCallPlace(t){return e.send({op:"UnwatchCallPlace",method:"DELETE",path:"/calls/places/"+c("UnwatchCallPlace","place",t.path.place)+"/watch",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async getCallSettings(t){return e.send({op:"GetCallSettings",method:"GET",path:"/calls/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putCallSettings(t){return e.send({op:"PutCallSettings",method:"PUT",path:"/calls/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rotateCallHookSecret(t){return e.send({op:"RotateCallHookSecret",method:"POST",path:"/calls/settings/hook-secret",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getCall(t){return e.send({op:"GetCall",method:"GET",path:"/calls/"+c("GetCall","call_id",t.path.call_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async acceptCall(t){return e.send({op:"AcceptCall",method:"POST",path:"/calls/"+c("AcceptCall","call_id",t.path.call_id)+"/accept",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async declineCall(t){return e.send({op:"DeclineCall",method:"POST",path:"/calls/"+c("DeclineCall","call_id",t.path.call_id)+"/decline",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async callHeartbeat(t){return e.send({op:"CallHeartbeat",method:"POST",path:"/calls/"+c("CallHeartbeat","call_id",t.path.call_id)+"/heartbeat",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async joinCall(t){return e.send({op:"JoinCall",method:"POST",path:"/calls/"+c("JoinCall","call_id",t.path.call_id)+"/join",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async leaveCall(t){return e.send({op:"LeaveCall",method:"POST",path:"/calls/"+c("LeaveCall","call_id",t.path.call_id)+"/leave",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async getCallMedia(t){return e.send({op:"GetCallMedia",method:"POST",path:"/calls/"+c("GetCallMedia","call_id",t.path.call_id)+"/media",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async inviteToCall(t){return e.send({op:"InviteToCall",method:"POST",path:"/calls/"+c("InviteToCall","call_id",t.path.call_id)+"/participants",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCallTranscription(t){return e.send({op:"GetCallTranscription",method:"GET",path:"/calls/"+c("GetCallTranscription","call_id",t.path.call_id)+"/transcription",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async ingestCallTranscriptionAudio(t){return e.send({op:"IngestCallTranscriptionAudio",method:"POST",path:"/calls/"+c("IngestCallTranscriptionAudio","call_id",t.path.call_id)+"/transcription/audio",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json",201:"json"},body:{kind:"raw",contentType:t.contentType??"multipart/form-data",value:t.body},signal:t.signal})}}}var sr={};wt(sr,{client:()=>XS});function XS(e){return{async listBroadcasts(t){return e.send({op:"ListBroadcasts",method:"GET",path:"/campaigns/broadcasts",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createBroadcast(t){return e.send({op:"CreateBroadcast",method:"POST",path:"/campaigns/broadcasts",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async recordBroadcastConversion(t){return e.send({op:"RecordBroadcastConversion",method:"POST",path:"/campaigns/broadcasts/conversions",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getBroadcast(t){return e.send({op:"GetBroadcast",method:"GET",path:"/campaigns/broadcasts/"+c("GetBroadcast","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateBroadcast(t){return e.send({op:"UpdateBroadcast",method:"PUT",path:"/campaigns/broadcasts/"+c("UpdateBroadcast","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteBroadcast(t){return e.send({op:"DeleteBroadcast",method:"DELETE",path:"/campaigns/broadcasts/"+c("DeleteBroadcast","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async cancelBroadcast(t){return e.send({op:"CancelBroadcast",method:"POST",path:"/campaigns/broadcasts/"+c("CancelBroadcast","id",t.path.id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async pauseBroadcast(t){return e.send({op:"PauseBroadcast",method:"POST",path:"/campaigns/broadcasts/"+c("PauseBroadcast","id",t.path.id)+"/pause",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async startBroadcast(t){return e.send({op:"StartBroadcast",method:"POST",path:"/campaigns/broadcasts/"+c("StartBroadcast","id",t.path.id)+"/start",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getBroadcastStats(t){return e.send({op:"GetBroadcastStats",method:"GET",path:"/campaigns/broadcasts/"+c("GetBroadcastStats","id",t.path.id)+"/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listTrackingLinks(t){return e.send({op:"ListTrackingLinks",method:"GET",path:"/campaigns/links",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createTrackingLink(t){return e.send({op:"CreateTrackingLink",method:"POST",path:"/campaigns/links",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async attributeLinkConversion(t){return e.send({op:"AttributeLinkConversion",method:"POST",path:"/campaigns/links/attribute",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getTrackingLink(t){return e.send({op:"GetTrackingLink",method:"GET",path:"/campaigns/links/"+c("GetTrackingLink","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateTrackingLink(t){return e.send({op:"UpdateTrackingLink",method:"PUT",path:"/campaigns/links/"+c("UpdateTrackingLink","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteTrackingLink(t){return e.send({op:"DeleteTrackingLink",method:"DELETE",path:"/campaigns/links/"+c("DeleteTrackingLink","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async getTrackingLinkStats(t){return e.send({op:"GetTrackingLinkStats",method:"GET",path:"/campaigns/links/"+c("GetTrackingLinkStats","id",t.path.id)+"/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listOnSiteCampaigns(t){return e.send({op:"ListOnSiteCampaigns",method:"GET",path:"/campaigns/onsite",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createOnSiteCampaign(t){return e.send({op:"CreateOnSiteCampaign",method:"POST",path:"/campaigns/onsite",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createOnSiteImpression(t){return e.send({op:"CreateOnSiteImpression",method:"POST",path:"/campaigns/onsite/impressions",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async recordOnSiteEvent(t){return e.send({op:"RecordOnSiteEvent",method:"POST",path:"/campaigns/onsite/impressions/"+c("RecordOnSiteEvent","id",t.path.id)+"/events",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listOnSiteMessages(t){return e.send({op:"ListOnSiteMessages",method:"GET",path:"/campaigns/onsite/messages",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getOnSiteSettings(t){return e.send({op:"GetOnSiteSettings",method:"GET",path:"/campaigns/onsite/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putOnSiteSettings(t){return e.send({op:"PutOnSiteSettings",method:"PUT",path:"/campaigns/onsite/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listOnSiteTemplates(t){return e.send({op:"ListOnSiteTemplates",method:"GET",path:"/campaigns/onsite/templates",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getOnSiteCampaign(t){return e.send({op:"GetOnSiteCampaign",method:"GET",path:"/campaigns/onsite/"+c("GetOnSiteCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateOnSiteCampaign(t){return e.send({op:"UpdateOnSiteCampaign",method:"PUT",path:"/campaigns/onsite/"+c("UpdateOnSiteCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteOnSiteCampaign(t){return e.send({op:"DeleteOnSiteCampaign",method:"DELETE",path:"/campaigns/onsite/"+c("DeleteOnSiteCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async getOnSiteCampaignStats(t){return e.send({op:"GetOnSiteCampaignStats",method:"GET",path:"/campaigns/onsite/"+c("GetOnSiteCampaignStats","id",t.path.id)+"/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async redirectTrackingLink(t){return e.send({op:"RedirectTrackingLink",method:"GET",path:"/l/"+c("RedirectTrackingLink","slug",t.path.slug),auth:[[]],answers:{302:"redirect"},signal:t.signal})},async headTrackingLink(t){return e.send({op:"HeadTrackingLink",method:"HEAD",path:"/l/"+c("HeadTrackingLink","slug",t.path.slug),auth:[[]],answers:{302:"redirect"},signal:t.signal})}}}var ar={};wt(ar,{client:()=>YS});function YS(e){return{async listBrands(t){return e.send({op:"ListBrands",method:"GET",path:"/commerce/brands",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createBrand(t){return e.send({op:"CreateBrand",method:"POST",path:"/commerce/brands",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createCart(t){return e.send({op:"CreateCart",method:"POST",path:"/commerce/carts",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCart(t){return e.send({op:"GetCart",method:"GET",path:"/commerce/carts/"+c("GetCart","cart_id",t.path.cart_id),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateCart(t){return e.send({op:"UpdateCart",method:"PATCH",path:"/commerce/carts/"+c("UpdateCart","cart_id",t.path.cart_id),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async checkoutCart(t){return e.send({op:"CheckoutCart",method:"POST",path:"/commerce/carts/"+c("CheckoutCart","cart_id",t.path.cart_id)+"/checkout",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addCartItem(t){return e.send({op:"AddCartItem",method:"POST",path:"/commerce/carts/"+c("AddCartItem","cart_id",t.path.cart_id)+"/items",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteCartItem(t){return e.send({op:"DeleteCartItem",method:"DELETE",path:"/commerce/carts/"+c("DeleteCartItem","cart_id",t.path.cart_id)+"/items/"+c("DeleteCartItem","line_id",t.path.line_id),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateCartItem(t){return e.send({op:"UpdateCartItem",method:"PATCH",path:"/commerce/carts/"+c("UpdateCartItem","cart_id",t.path.cart_id)+"/items/"+c("UpdateCartItem","line_id",t.path.line_id),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mergeGuestCart(t){return e.send({op:"MergeGuestCart",method:"POST",path:"/commerce/carts/"+c("MergeGuestCart","cart_id",t.path.cart_id)+"/merge",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async applyCartPromoCode(t){return e.send({op:"ApplyCartPromoCode",method:"POST",path:"/commerce/carts/"+c("ApplyCartPromoCode","cart_id",t.path.cart_id)+"/promo-codes",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeCartPromoCode(t){return e.send({op:"RemoveCartPromoCode",method:"DELETE",path:"/commerce/carts/"+c("RemoveCartPromoCode","cart_id",t.path.cart_id)+"/promo-codes/"+c("RemoveCartPromoCode","code",t.path.code),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async selectCartShipping(t){return e.send({op:"SelectCartShipping",method:"POST",path:"/commerce/carts/"+c("SelectCartShipping","cart_id",t.path.cart_id)+"/shipping",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async storefrontListBrands(t){return e.send({op:"StorefrontListBrands",method:"GET",path:"/commerce/catalog/brands",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async storefrontListCategories(t){return e.send({op:"StorefrontListCategories",method:"GET",path:"/commerce/catalog/categories",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async storefrontListChannels(t){return e.send({op:"StorefrontListChannels",method:"GET",path:"/commerce/catalog/channels",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async storefrontListCollections(t){return e.send({op:"StorefrontListCollections",method:"GET",path:"/commerce/catalog/collections",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async storefrontListProducts(t){return e.send({op:"StorefrontListProducts",method:"GET",path:"/commerce/catalog/products",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async storefrontSearchProducts(t){return e.send({op:"StorefrontSearchProducts",method:"POST",path:"/commerce/catalog/search",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async storefrontSuggest(t){return e.send({op:"StorefrontSuggest",method:"GET",path:"/commerce/catalog/suggest",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async storefrontRecommendProducts(t){return e.send({op:"StorefrontRecommendProducts",method:"POST",path:"/commerce/catalog/recommend",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async storefrontProductRecommendations(t){return e.send({op:"StorefrontProductRecommendations",method:"GET",path:"/commerce/catalog/products/"+c("StorefrontProductRecommendations","product_id_or_handle",t.path.product_id_or_handle)+"/recommendations",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async storefrontGetProduct(t){return e.send({op:"StorefrontGetProduct",method:"GET",path:"/commerce/catalog/products/"+c("StorefrontGetProduct","product_id_or_handle",t.path.product_id_or_handle),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async storefrontListProductReviews(t){return e.send({op:"StorefrontListProductReviews",method:"GET",path:"/commerce/catalog/products/"+c("StorefrontListProductReviews","product_id_or_handle",t.path.product_id_or_handle)+"/reviews",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async storefrontListRegions(t){return e.send({op:"StorefrontListRegions",method:"GET",path:"/commerce/catalog/regions",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async storefrontListStores(t){return e.send({op:"StorefrontListStores",method:"GET",path:"/commerce/catalog/stores",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async storefrontGetStore(t){return e.send({op:"StorefrontGetStore",method:"GET",path:"/commerce/catalog/stores/"+c("StorefrontGetStore","store_id_or_slug",t.path.store_id_or_slug),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async storefrontListStoreReviews(t){return e.send({op:"StorefrontListStoreReviews",method:"GET",path:"/commerce/catalog/stores/"+c("StorefrontListStoreReviews","store_id_or_slug",t.path.store_id_or_slug)+"/reviews",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listCategories(t){return e.send({op:"ListCategories",method:"GET",path:"/commerce/categories",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createCategory(t){return e.send({op:"CreateCategory",method:"POST",path:"/commerce/categories",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listChannels(t){return e.send({op:"ListChannels",method:"GET",path:"/commerce/channels",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createChannel(t){return e.send({op:"CreateChannel",method:"POST",path:"/commerce/channels",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async attachChannelRegion(t){return e.send({op:"AttachChannelRegion",method:"PUT",path:"/commerce/channels/"+c("AttachChannelRegion","channel_id",t.path.channel_id)+"/regions/"+c("AttachChannelRegion","region_id",t.path.region_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async attachChannelStore(t){return e.send({op:"AttachChannelStore",method:"PUT",path:"/commerce/channels/"+c("AttachChannelStore","channel_id",t.path.channel_id)+"/stores/"+c("AttachChannelStore","store_id",t.path.store_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async detachChannelStore(t){return e.send({op:"DetachChannelStore",method:"DELETE",path:"/commerce/channels/"+c("DetachChannelStore","channel_id",t.path.channel_id)+"/stores/"+c("DetachChannelStore","store_id",t.path.store_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listCollections(t){return e.send({op:"ListCollections",method:"GET",path:"/commerce/collections",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createCollection(t){return e.send({op:"CreateCollection",method:"POST",path:"/commerce/collections",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addCollectionProduct(t){return e.send({op:"AddCollectionProduct",method:"PUT",path:"/commerce/collections/"+c("AddCollectionProduct","collection_id",t.path.collection_id)+"/products/"+c("AddCollectionProduct","product_id",t.path.product_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async removeCollectionProduct(t){return e.send({op:"RemoveCollectionProduct",method:"DELETE",path:"/commerce/collections/"+c("RemoveCollectionProduct","collection_id",t.path.collection_id)+"/products/"+c("RemoveCollectionProduct","product_id",t.path.product_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createDigitalAsset(t){return e.send({op:"CreateDigitalAsset",method:"POST",path:"/commerce/digital-assets",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateFulfillment(t){return e.send({op:"UpdateFulfillment",method:"PATCH",path:"/commerce/fulfillments/"+c("UpdateFulfillment","fulfillment_id",t.path.fulfillment_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addShipmentEvent(t){return e.send({op:"AddShipmentEvent",method:"POST",path:"/commerce/fulfillments/"+c("AddShipmentEvent","fulfillment_id",t.path.fulfillment_id)+"/events",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listDiscoveryStrategies(t){return e.send({op:"ListDiscoveryStrategies",method:"GET",path:"/commerce/discovery/strategies",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createDiscoveryStrategy(t){return e.send({op:"CreateDiscoveryStrategy",method:"POST",path:"/commerce/discovery/strategies",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getDiscoveryStrategy(t){return e.send({op:"GetDiscoveryStrategy",method:"GET",path:"/commerce/discovery/strategies/"+c("GetDiscoveryStrategy","strategy_id",t.path.strategy_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteDiscoveryStrategy(t){return e.send({op:"DeleteDiscoveryStrategy",method:"DELETE",path:"/commerce/discovery/strategies/"+c("DeleteDiscoveryStrategy","strategy_id",t.path.strategy_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateDiscoveryStrategy(t){return e.send({op:"UpdateDiscoveryStrategy",method:"PATCH",path:"/commerce/discovery/strategies/"+c("UpdateDiscoveryStrategy","strategy_id",t.path.strategy_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMerchandisingRules(t){return e.send({op:"ListMerchandisingRules",method:"GET",path:"/commerce/discovery/rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createMerchandisingRule(t){return e.send({op:"CreateMerchandisingRule",method:"POST",path:"/commerce/discovery/rules",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getMerchandisingRule(t){return e.send({op:"GetMerchandisingRule",method:"GET",path:"/commerce/discovery/rules/"+c("GetMerchandisingRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteMerchandisingRule(t){return e.send({op:"DeleteMerchandisingRule",method:"DELETE",path:"/commerce/discovery/rules/"+c("DeleteMerchandisingRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateMerchandisingRule(t){return e.send({op:"UpdateMerchandisingRule",method:"PATCH",path:"/commerce/discovery/rules/"+c("UpdateMerchandisingRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSearchSynonyms(t){return e.send({op:"ListSearchSynonyms",method:"GET",path:"/commerce/discovery/synonyms",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createSearchSynonym(t){return e.send({op:"CreateSearchSynonym",method:"POST",path:"/commerce/discovery/synonyms",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteSearchSynonym(t){return e.send({op:"DeleteSearchSynonym",method:"DELETE",path:"/commerce/discovery/synonyms/"+c("DeleteSearchSynonym","synonym_id",t.path.synonym_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async refreshDiscoverySignals(t){return e.send({op:"RefreshDiscoverySignals",method:"POST",path:"/commerce/discovery/signals/refresh",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listHooks(t){return e.send({op:"ListHooks",method:"GET",path:"/commerce/hooks",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async upsertHook(t){return e.send({op:"UpsertHook",method:"POST",path:"/commerce/hooks",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteHook(t){return e.send({op:"DeleteHook",method:"DELETE",path:"/commerce/hooks/"+c("DeleteHook","hook_id",t.path.hook_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listInventory(t){return e.send({op:"ListInventory",method:"GET",path:"/commerce/inventory",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adjustInventory(t){return e.send({op:"AdjustInventory",method:"POST",path:"/commerce/inventory/adjust",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async bulkSyncInventory(t){return e.send({op:"BulkSyncInventory",method:"POST",path:"/commerce/inventory/bulk-sync",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listInventoryMovements(t){return e.send({op:"ListInventoryMovements",method:"GET",path:"/commerce/inventory/movements",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listInvoices(t){return e.send({op:"ListInvoices",method:"GET",path:"/commerce/invoices",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createInvoice(t){return e.send({op:"CreateInvoice",method:"POST",path:"/commerce/invoices",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateInvoice(t){return e.send({op:"UpdateInvoice",method:"PATCH",path:"/commerce/invoices/"+c("UpdateInvoice","invoice_id",t.path.invoice_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listListings(t){return e.send({op:"ListListings",method:"GET",path:"/commerce/listings",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createListing(t){return e.send({op:"CreateListing",method:"POST",path:"/commerce/listings",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateListing(t){return e.send({op:"UpdateListing",method:"PATCH",path:"/commerce/listings/"+c("UpdateListing","listing_id",t.path.listing_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async importLicenseKeys(t){return e.send({op:"ImportLicenseKeys",method:"POST",path:"/commerce/listings/"+c("ImportLicenseKeys","listing_id",t.path.listing_id)+"/license-keys",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async upsertPrice(t){return e.send({op:"UpsertPrice",method:"POST",path:"/commerce/listings/"+c("UpsertPrice","listing_id",t.path.listing_id)+"/prices",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMyOrders(t){return e.send({op:"ListMyOrders",method:"GET",path:"/commerce/me/orders",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getMyOrder(t){return e.send({op:"GetMyOrder",method:"GET",path:"/commerce/me/orders/"+c("GetMyOrder","order_id",t.path.order_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async getMyOrderDownloads(t){return e.send({op:"GetMyOrderDownloads",method:"GET",path:"/commerce/me/orders/"+c("GetMyOrderDownloads","order_id",t.path.order_id)+"/downloads",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async createProductReview(t){return e.send({op:"CreateProductReview",method:"POST",path:"/commerce/me/products/"+c("CreateProductReview","product_id_or_handle",t.path.product_id_or_handle)+"/reviews",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMyReturns(t){return e.send({op:"ListMyReturns",method:"GET",path:"/commerce/me/returns",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async listMyReviews(t){return e.send({op:"ListMyReviews",method:"GET",path:"/commerce/me/reviews",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async mintReviewUploadUrl(t){return e.send({op:"MintReviewUploadURL",method:"POST",path:"/commerce/me/reviews/upload-url",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMyReview(t){return e.send({op:"DeleteMyReview",method:"DELETE",path:"/commerce/me/reviews/"+c("DeleteMyReview","review_id",t.path.review_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async voteReview(t){return e.send({op:"VoteReview",method:"POST",path:"/commerce/me/reviews/"+c("VoteReview","review_id",t.path.review_id)+"/vote",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async requestMyReturn(t){return e.send({op:"RequestMyReturn",method:"POST",path:"/commerce/me/store-orders/"+c("RequestMyReturn","store_order_id",t.path.store_order_id)+"/returns",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createStoreReview(t){return e.send({op:"CreateStoreReview",method:"POST",path:"/commerce/me/stores/"+c("CreateStoreReview","store_id_or_slug",t.path.store_id_or_slug)+"/reviews",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createMediaAsset(t){return e.send({op:"CreateMediaAsset",method:"POST",path:"/commerce/media",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listOrders(t){return e.send({op:"ListOrders",method:"GET",path:"/commerce/orders",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getGuestOrder(t){return e.send({op:"GetGuestOrder",method:"GET",path:"/commerce/orders/guest/"+c("GetGuestOrder","order_number",t.path.order_number),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getOrder(t){return e.send({op:"GetOrder",method:"GET",path:"/commerce/orders/"+c("GetOrder","order_id",t.path.order_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async markOrderPaid(t){return e.send({op:"MarkOrderPaid",method:"POST",path:"/commerce/orders/"+c("MarkOrderPaid","order_id",t.path.order_id)+"/mark-paid",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPriceLists(t){return e.send({op:"ListPriceLists",method:"GET",path:"/commerce/price-lists",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createPriceList(t){return e.send({op:"CreatePriceList",method:"POST",path:"/commerce/price-lists",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listProducts(t){return e.send({op:"ListProducts",method:"GET",path:"/commerce/products",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createProduct(t){return e.send({op:"CreateProduct",method:"POST",path:"/commerce/products",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createQuickProduct(t){return e.send({op:"CreateQuickProduct",method:"POST",path:"/commerce/products/quick",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getProduct(t){return e.send({op:"GetProduct",method:"GET",path:"/commerce/products/"+c("GetProduct","product_id",t.path.product_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateProduct(t){return e.send({op:"UpdateProduct",method:"PATCH",path:"/commerce/products/"+c("UpdateProduct","product_id",t.path.product_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async approveProduct(t){return e.send({op:"ApproveProduct",method:"POST",path:"/commerce/products/"+c("ApproveProduct","product_id",t.path.product_id)+"/approval",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async upsertProductOption(t){return e.send({op:"UpsertProductOption",method:"POST",path:"/commerce/products/"+c("UpsertProductOption","product_id",t.path.product_id)+"/options",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createVariant(t){return e.send({op:"CreateVariant",method:"POST",path:"/commerce/products/"+c("CreateVariant","product_id",t.path.product_id)+"/variants",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listRegions(t){return e.send({op:"ListRegions",method:"GET",path:"/commerce/regions",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createRegion(t){return e.send({op:"CreateRegion",method:"POST",path:"/commerce/regions",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateRegion(t){return e.send({op:"UpdateRegion",method:"PATCH",path:"/commerce/regions/"+c("UpdateRegion","region_id",t.path.region_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listReturns(t){return e.send({op:"ListReturns",method:"GET",path:"/commerce/returns",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async approveReturn(t){return e.send({op:"ApproveReturn",method:"POST",path:"/commerce/returns/"+c("ApproveReturn","return_id",t.path.return_id)+"/approve",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rejectReturn(t){return e.send({op:"RejectReturn",method:"POST",path:"/commerce/returns/"+c("RejectReturn","return_id",t.path.return_id)+"/reject",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async completeReturn(t){return e.send({op:"CompleteReturn",method:"POST",path:"/commerce/returns/"+c("CompleteReturn","return_id",t.path.return_id)+"/complete",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async receiveReturn(t){return e.send({op:"ReceiveReturn",method:"POST",path:"/commerce/returns/"+c("ReceiveReturn","return_id",t.path.return_id)+"/receive",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListReviews(t){return e.send({op:"AdminListReviews",method:"GET",path:"/commerce/reviews",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminDeleteReview(t){return e.send({op:"AdminDeleteReview",method:"DELETE",path:"/commerce/reviews/"+c("AdminDeleteReview","review_id",t.path.review_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async adminModerateReview(t){return e.send({op:"AdminModerateReview",method:"PATCH",path:"/commerce/reviews/"+c("AdminModerateReview","review_id",t.path.review_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCommerceSettings(t){return e.send({op:"GetCommerceSettings",method:"GET",path:"/commerce/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async updateCommerceSettings(t){return e.send({op:"UpdateCommerceSettings",method:"PUT",path:"/commerce/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSettlements(t){return e.send({op:"ListSettlements",method:"GET",path:"/commerce/settlements",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async generateSettlement(t){return e.send({op:"GenerateSettlement",method:"POST",path:"/commerce/settlements/generate",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async markSettlementPaid(t){return e.send({op:"MarkSettlementPaid",method:"POST",path:"/commerce/settlements/"+c("MarkSettlementPaid","settlement_id",t.path.settlement_id)+"/mark-paid",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listShippingOptions(t){return e.send({op:"ListShippingOptions",method:"GET",path:"/commerce/shipping-options",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createShippingOption(t){return e.send({op:"CreateShippingOption",method:"POST",path:"/commerce/shipping-options",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listShippingProfiles(t){return e.send({op:"ListShippingProfiles",method:"GET",path:"/commerce/shipping-profiles",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createShippingProfile(t){return e.send({op:"CreateShippingProfile",method:"POST",path:"/commerce/shipping-profiles",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listStockLocations(t){return e.send({op:"ListStockLocations",method:"GET",path:"/commerce/stock-locations",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createStockLocation(t){return e.send({op:"CreateStockLocation",method:"POST",path:"/commerce/stock-locations",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listStoreOrders(t){return e.send({op:"ListStoreOrders",method:"GET",path:"/commerce/store-orders",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getStoreOrder(t){return e.send({op:"GetStoreOrder",method:"GET",path:"/commerce/store-orders/"+c("GetStoreOrder","store_order_id",t.path.store_order_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelStoreOrder(t){return e.send({op:"CancelStoreOrder",method:"POST",path:"/commerce/store-orders/"+c("CancelStoreOrder","store_order_id",t.path.store_order_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createFulfillment(t){return e.send({op:"CreateFulfillment",method:"POST",path:"/commerce/store-orders/"+c("CreateFulfillment","store_order_id",t.path.store_order_id)+"/fulfillments",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createReturn(t){return e.send({op:"CreateReturn",method:"POST",path:"/commerce/store-orders/"+c("CreateReturn","store_order_id",t.path.store_order_id)+"/returns",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listStores(t){return e.send({op:"ListStores",method:"GET",path:"/commerce/stores",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createStore(t){return e.send({op:"CreateStore",method:"POST",path:"/commerce/stores",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getStore(t){return e.send({op:"GetStore",method:"GET",path:"/commerce/stores/"+c("GetStore","store_id",t.path.store_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateStore(t){return e.send({op:"UpdateStore",method:"PATCH",path:"/commerce/stores/"+c("UpdateStore","store_id",t.path.store_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerUpdateFulfillment(t){return e.send({op:"SellerUpdateFulfillment",method:"PATCH",path:"/commerce/stores/"+c("SellerUpdateFulfillment","store_id",t.path.store_id)+"/fulfillments/"+c("SellerUpdateFulfillment","fulfillment_id",t.path.fulfillment_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerAddShipmentEvent(t){return e.send({op:"SellerAddShipmentEvent",method:"POST",path:"/commerce/stores/"+c("SellerAddShipmentEvent","store_id",t.path.store_id)+"/fulfillments/"+c("SellerAddShipmentEvent","fulfillment_id",t.path.fulfillment_id)+"/events",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListInventory(t){return e.send({op:"SellerListInventory",method:"GET",path:"/commerce/stores/"+c("SellerListInventory","store_id",t.path.store_id)+"/inventory",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerAdjustInventory(t){return e.send({op:"SellerAdjustInventory",method:"POST",path:"/commerce/stores/"+c("SellerAdjustInventory","store_id",t.path.store_id)+"/inventory/adjust",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerBulkSyncInventory(t){return e.send({op:"SellerBulkSyncInventory",method:"POST",path:"/commerce/stores/"+c("SellerBulkSyncInventory","store_id",t.path.store_id)+"/inventory/bulk-sync",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListListings(t){return e.send({op:"SellerListListings",method:"GET",path:"/commerce/stores/"+c("SellerListListings","store_id",t.path.store_id)+"/listings",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerCreateListing(t){return e.send({op:"SellerCreateListing",method:"POST",path:"/commerce/stores/"+c("SellerCreateListing","store_id",t.path.store_id)+"/listings",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerUpdateListing(t){return e.send({op:"SellerUpdateListing",method:"PATCH",path:"/commerce/stores/"+c("SellerUpdateListing","store_id",t.path.store_id)+"/listings/"+c("SellerUpdateListing","listing_id",t.path.listing_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerImportLicenseKeys(t){return e.send({op:"SellerImportLicenseKeys",method:"POST",path:"/commerce/stores/"+c("SellerImportLicenseKeys","store_id",t.path.store_id)+"/listings/"+c("SellerImportLicenseKeys","listing_id",t.path.listing_id)+"/license-keys",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerUpsertPrice(t){return e.send({op:"SellerUpsertPrice",method:"POST",path:"/commerce/stores/"+c("SellerUpsertPrice","store_id",t.path.store_id)+"/listings/"+c("SellerUpsertPrice","listing_id",t.path.listing_id)+"/prices",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListStockLocations(t){return e.send({op:"SellerListStockLocations",method:"GET",path:"/commerce/stores/"+c("SellerListStockLocations","store_id",t.path.store_id)+"/locations",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerCreateStockLocation(t){return e.send({op:"SellerCreateStockLocation",method:"POST",path:"/commerce/stores/"+c("SellerCreateStockLocation","store_id",t.path.store_id)+"/locations",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addStoreMember(t){return e.send({op:"AddStoreMember",method:"POST",path:"/commerce/stores/"+c("AddStoreMember","store_id",t.path.store_id)+"/members",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeStoreMember(t){return e.send({op:"RemoveStoreMember",method:"DELETE",path:"/commerce/stores/"+c("RemoveStoreMember","store_id",t.path.store_id)+"/members/"+c("RemoveStoreMember","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerGetMetrics(t){return e.send({op:"SellerGetMetrics",method:"GET",path:"/commerce/stores/"+c("SellerGetMetrics","store_id",t.path.store_id)+"/metrics",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerListStoreOrders(t){return e.send({op:"SellerListStoreOrders",method:"GET",path:"/commerce/stores/"+c("SellerListStoreOrders","store_id",t.path.store_id)+"/orders",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async sellerGetStoreOrder(t){return e.send({op:"SellerGetStoreOrder",method:"GET",path:"/commerce/stores/"+c("SellerGetStoreOrder","store_id",t.path.store_id)+"/orders/"+c("SellerGetStoreOrder","store_order_id",t.path.store_order_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerCancelStoreOrder(t){return e.send({op:"SellerCancelStoreOrder",method:"POST",path:"/commerce/stores/"+c("SellerCancelStoreOrder","store_id",t.path.store_id)+"/orders/"+c("SellerCancelStoreOrder","store_order_id",t.path.store_order_id)+"/cancel",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerCreateFulfillment(t){return e.send({op:"SellerCreateFulfillment",method:"POST",path:"/commerce/stores/"+c("SellerCreateFulfillment","store_id",t.path.store_id)+"/orders/"+c("SellerCreateFulfillment","store_order_id",t.path.store_order_id)+"/fulfillments",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async onboardStorePaymentAccount(t){return e.send({op:"OnboardStorePaymentAccount",method:"POST",path:"/commerce/stores/"+c("OnboardStorePaymentAccount","store_id",t.path.store_id)+"/payment-accounts",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerOnboardPayouts(t){return e.send({op:"SellerOnboardPayouts",method:"POST",path:"/commerce/stores/"+c("SellerOnboardPayouts","store_id",t.path.store_id)+"/payouts/onboard",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerOnboardingLink(t){return e.send({op:"SellerOnboardingLink",method:"POST",path:"/commerce/stores/"+c("SellerOnboardingLink","store_id",t.path.store_id)+"/payouts/onboarding-link",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListProducts(t){return e.send({op:"SellerListProducts",method:"GET",path:"/commerce/stores/"+c("SellerListProducts","store_id",t.path.store_id)+"/products",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async sellerCreateProduct(t){return e.send({op:"SellerCreateProduct",method:"POST",path:"/commerce/stores/"+c("SellerCreateProduct","store_id",t.path.store_id)+"/products",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerCreateQuickProduct(t){return e.send({op:"SellerCreateQuickProduct",method:"POST",path:"/commerce/stores/"+c("SellerCreateQuickProduct","store_id",t.path.store_id)+"/products/quick",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerCreatePromotionRule(t){return e.send({op:"SellerCreatePromotionRule",method:"POST",path:"/commerce/stores/"+c("SellerCreatePromotionRule","store_id",t.path.store_id)+"/promotions/rules",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListReturns(t){return e.send({op:"SellerListReturns",method:"GET",path:"/commerce/stores/"+c("SellerListReturns","store_id",t.path.store_id)+"/returns",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerApproveReturn(t){return e.send({op:"SellerApproveReturn",method:"POST",path:"/commerce/stores/"+c("SellerApproveReturn","store_id",t.path.store_id)+"/returns/"+c("SellerApproveReturn","return_id",t.path.return_id)+"/approve",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerRejectReturn(t){return e.send({op:"SellerRejectReturn",method:"POST",path:"/commerce/stores/"+c("SellerRejectReturn","store_id",t.path.store_id)+"/returns/"+c("SellerRejectReturn","return_id",t.path.return_id)+"/reject",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerCompleteReturn(t){return e.send({op:"SellerCompleteReturn",method:"POST",path:"/commerce/stores/"+c("SellerCompleteReturn","store_id",t.path.store_id)+"/returns/"+c("SellerCompleteReturn","return_id",t.path.return_id)+"/complete",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerReceiveReturn(t){return e.send({op:"SellerReceiveReturn",method:"POST",path:"/commerce/stores/"+c("SellerReceiveReturn","store_id",t.path.store_id)+"/returns/"+c("SellerReceiveReturn","return_id",t.path.return_id)+"/receive",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListReviews(t){return e.send({op:"SellerListReviews",method:"GET",path:"/commerce/stores/"+c("SellerListReviews","store_id",t.path.store_id)+"/reviews",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async sellerReplyReview(t){return e.send({op:"SellerReplyReview",method:"POST",path:"/commerce/stores/"+c("SellerReplyReview","store_id",t.path.store_id)+"/reviews/"+c("SellerReplyReview","review_id",t.path.review_id)+"/reply",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListSettlements(t){return e.send({op:"SellerListSettlements",method:"GET",path:"/commerce/stores/"+c("SellerListSettlements","store_id",t.path.store_id)+"/settlements",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerCreateShippingOption(t){return e.send({op:"SellerCreateShippingOption",method:"POST",path:"/commerce/stores/"+c("SellerCreateShippingOption","store_id",t.path.store_id)+"/shipping-options",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTaxRates(t){return e.send({op:"ListTaxRates",method:"GET",path:"/commerce/tax-rates",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async upsertTaxRate(t){return e.send({op:"UpsertTaxRate",method:"PUT",path:"/commerce/tax-rates",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateVariant(t){return e.send({op:"UpdateVariant",method:"PATCH",path:"/commerce/variants/"+c("UpdateVariant","variant_id",t.path.variant_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async setBundleItems(t){return e.send({op:"SetBundleItems",method:"POST",path:"/commerce/variants/"+c("SetBundleItems","variant_id",t.path.variant_id)+"/bundle-items",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async recomputeVariantBuyBox(t){return e.send({op:"RecomputeVariantBuyBox",method:"POST",path:"/commerce/variants/"+c("RecomputeVariantBuyBox","variant_id",t.path.variant_id)+"/buybox/recompute",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async revokePromotionCode(t){return e.send({op:"RevokePromotionCode",method:"DELETE",path:"/promotions/codes/"+c("RevokePromotionCode","code_id",t.path.code_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async evaluatePromotions(t){return e.send({op:"EvaluatePromotions",method:"POST",path:"/promotions/evaluate",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async holdPromotions(t){return e.send({op:"HoldPromotions",method:"POST",path:"/promotions/holds",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async commitPromotionHold(t){return e.send({op:"CommitPromotionHold",method:"POST",path:"/promotions/holds/"+c("CommitPromotionHold","hold_id",t.path.hold_id)+"/commit",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async releasePromotionHold(t){return e.send({op:"ReleasePromotionHold",method:"POST",path:"/promotions/holds/"+c("ReleasePromotionHold","hold_id",t.path.hold_id)+"/release",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listPromotionRedemptions(t){return e.send({op:"ListPromotionRedemptions",method:"GET",path:"/promotions/redemptions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async reversePromotionRedemption(t){return e.send({op:"ReversePromotionRedemption",method:"POST",path:"/promotions/redemptions/"+c("ReversePromotionRedemption","redemption_id",t.path.redemption_id)+"/reverse",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listPromotionRules(t){return e.send({op:"ListPromotionRules",method:"GET",path:"/promotions/rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createPromotionRule(t){return e.send({op:"CreatePromotionRule",method:"POST",path:"/promotions/rules",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPromotionRule(t){return e.send({op:"GetPromotionRule",method:"GET",path:"/promotions/rules/"+c("GetPromotionRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async archivePromotionRule(t){return e.send({op:"ArchivePromotionRule",method:"DELETE",path:"/promotions/rules/"+c("ArchivePromotionRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updatePromotionRule(t){return e.send({op:"UpdatePromotionRule",method:"PATCH",path:"/promotions/rules/"+c("UpdatePromotionRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async upsertPromotionBudget(t){return e.send({op:"UpsertPromotionBudget",method:"PUT",path:"/promotions/rules/"+c("UpsertPromotionBudget","rule_id",t.path.rule_id)+"/budgets/"+c("UpsertPromotionBudget","currency",t.path.currency),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPromotionCodes(t){return e.send({op:"ListPromotionCodes",method:"GET",path:"/promotions/rules/"+c("ListPromotionCodes","rule_id",t.path.rule_id)+"/codes",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createPromotionCode(t){return e.send({op:"CreatePromotionCode",method:"POST",path:"/promotions/rules/"+c("CreatePromotionCode","rule_id",t.path.rule_id)+"/codes",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async generatePromotionCodeBatch(t){return e.send({op:"GeneratePromotionCodeBatch",method:"POST",path:"/promotions/rules/"+c("GeneratePromotionCodeBatch","rule_id",t.path.rule_id)+"/codes/batch",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var xo={};wt(xo,{client:()=>ZS});function ZS(e){return{async getValues(t){return e.send({op:"GetValues",method:"GET",path:"/flags",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},headers:t?.headers,signal:t?.signal})},async batchUserValues(t){return e.send({op:"BatchUserValues",method:"POST",path:"/flags/batch",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getDelta(t){return e.send({op:"GetDelta",method:"GET",path:"/flags/delta",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json",304:"empty"},query:t?.query,headers:t?.headers,signal:t?.signal})},async getEvaluations(t){return e.send({op:"GetEvaluations",method:"GET",path:"/flags/evaluations",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listExperiments(t){return e.send({op:"ListExperiments",method:"GET",path:"/flags/experiments",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async startExperiment(t){return e.send({op:"StartExperiment",method:"POST",path:"/flags/experiments",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getExperiment(t){return e.send({op:"GetExperiment",method:"GET",path:"/flags/experiments/"+c("GetExperiment","experiment_id",t.path.experiment_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getExperimentResults(t){return e.send({op:"GetExperimentResults",method:"GET",path:"/flags/experiments/"+c("GetExperimentResults","experiment_id",t.path.experiment_id)+"/results",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async stopExperiment(t){return e.send({op:"StopExperiment",method:"POST",path:"/flags/experiments/"+c("StopExperiment","experiment_id",t.path.experiment_id)+"/stop",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async declareExperimentWinner(t){return e.send({op:"DeclareExperimentWinner",method:"POST",path:"/flags/experiments/"+c("DeclareExperimentWinner","experiment_id",t.path.experiment_id)+"/winner",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCurrentInstallations(t){return e.send({op:"GetCurrentInstallations",method:"GET",path:"/flags/installations/current",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getInstallationsDaily(t){return e.send({op:"GetInstallationsDaily",method:"GET",path:"/flags/installations/daily",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getSnapshot(t){return e.send({op:"GetSnapshot",method:"GET",path:"/flags/snapshot",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json",304:"empty"},headers:t?.headers,signal:t?.signal})},async listDefinitions(t){return e.send({op:"ListDefinitions",method:"GET",path:"/flags/system",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getDefinition(t){return e.send({op:"GetDefinition",method:"GET",path:"/flags/system/"+c("GetDefinition","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putDefinition(t){return e.send({op:"PutDefinition",method:"PUT",path:"/flags/system/"+c("PutDefinition","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteDefinition(t){return e.send({op:"DeleteDefinition",method:"DELETE",path:"/flags/system/"+c("DeleteDefinition","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async activateTemplates(t){return e.send({op:"ActivateTemplates",method:"POST",path:"/flags/templates/activation",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getActiveTemplate(t){return e.send({op:"GetActiveTemplate",method:"GET",path:"/flags/templates/active",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getTemplateCapabilities(t){return e.send({op:"GetTemplateCapabilities",method:"GET",path:"/flags/templates/capabilities",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getTemplateDraft(t){return e.send({op:"GetTemplateDraft",method:"GET",path:"/flags/templates/draft",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createTemplateDraft(t){return e.send({op:"CreateTemplateDraft",method:"POST",path:"/flags/templates/draft",auth:[["SecretKeyAuth"]],answers:{201:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async discardTemplateDraft(t){return e.send({op:"DiscardTemplateDraft",method:"DELETE",path:"/flags/templates/draft",auth:[["SecretKeyAuth"]],answers:{204:"empty"},headers:t.headers,signal:t.signal})},async putTemplateParameter(t){return e.send({op:"PutTemplateParameter",method:"PUT",path:"/flags/templates/draft/parameters/"+c("PutTemplateParameter","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeTemplateParameter(t){return e.send({op:"RemoveTemplateParameter",method:"DELETE",path:"/flags/templates/draft/parameters/"+c("RemoveTemplateParameter","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},headers:t.headers,signal:t.signal})},async reviewTemplateDraft(t){return e.send({op:"ReviewTemplateDraft",method:"GET",path:"/flags/templates/draft/review",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async publishTemplate(t){return e.send({op:"PublishTemplate",method:"POST",path:"/flags/templates/publish",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPublishReceipt(t){return e.send({op:"GetPublishReceipt",method:"POST",path:"/flags/templates/publish/receipt",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async restoreTemplateVersion(t){return e.send({op:"RestoreTemplateVersion",method:"POST",path:"/flags/templates/restore/"+c("RestoreTemplateVersion","version",t.path.version),auth:[["SecretKeyAuth"]],answers:{201:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTemplateVersions(t){return e.send({op:"ListTemplateVersions",method:"GET",path:"/flags/templates/versions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getTemplateVersion(t){return e.send({op:"GetTemplateVersion",method:"GET",path:"/flags/templates/versions/"+c("GetTemplateVersion","version",t.path.version),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getUserValues(t){return e.send({op:"GetUserValues",method:"GET",path:"/flags/users/"+c("GetUserValues","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},headers:t.headers,signal:t.signal})},async putUserValues(t){return e.send({op:"PutUserValues",method:"PUT",path:"/flags/users/"+c("PutUserValues","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteUserValues(t){return e.send({op:"DeleteUserValues",method:"DELETE",path:"/flags/users/"+c("DeleteUserValues","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putUserValue(t){return e.send({op:"PutUserValue",method:"PUT",path:"/flags/users/"+c("PutUserValue","user_id",t.path.user_id)+"/"+c("PutUserValue","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteUserValue(t){return e.send({op:"DeleteUserValue",method:"DELETE",path:"/flags/users/"+c("DeleteUserValue","user_id",t.path.user_id)+"/"+c("DeleteUserValue","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},headers:t.headers,signal:t.signal})}}}var Lo={};wt(Lo,{client:()=>QS});function QS(e){return{async getAppleAccount(t){return e.send({op:"GetAppleAccount",method:"GET",path:"/iap/apple",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async disconnectApple(t){return e.send({op:"DisconnectApple",method:"DELETE",path:"/iap/apple",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getAppleAccountToken(t){return e.send({op:"GetAppleAccountToken",method:"POST",path:"/iap/apple/account-token",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async getAppleConnectPage(t){return e.send({op:"GetAppleConnectPage",method:"GET",path:"/iap/apple/connect",auth:[],answers:{200:"raw"},signal:t?.signal})},async connectAppleKey(t){return e.send({op:"ConnectAppleKey",method:"POST",path:"/iap/apple/connect",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createAppleGrant(t){return e.send({op:"CreateAppleGrant",method:"POST",path:"/iap/apple/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getAppleReadiness(t){return e.send({op:"GetAppleReadiness",method:"GET",path:"/iap/apple/readiness",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async reportAppleTransactions(t){return e.send({op:"ReportAppleTransactions",method:"POST",path:"/iap/apple/transactions",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async setXcodeCertificate(t){return e.send({op:"SetXcodeCertificate",method:"PUT",path:"/iap/apple/xcode-certificate",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async clearXcodeCertificate(t){return e.send({op:"ClearXcodeCertificate",method:"DELETE",path:"/iap/apple/xcode-certificate",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async setXcodeOfferKey(t){return e.send({op:"SetXcodeOfferKey",method:"PUT",path:"/iap/apple/xcode-offer-key",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCatalog(t){return e.send({op:"GetCatalog",method:"GET",path:"/iap/catalog",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async saveCatalog(t){return e.send({op:"SaveCatalog",method:"PUT",path:"/iap/catalog",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async planCatalog(t){return e.send({op:"PlanCatalog",method:"POST",path:"/iap/catalog/plans",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getCatalogPlan(t){return e.send({op:"GetCatalogPlan",method:"GET",path:"/iap/catalog/plans/"+c("GetCatalogPlan","plan_id",t.path.plan_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async confirmCatalogPlan(t){return e.send({op:"ConfirmCatalogPlan",method:"POST",path:"/iap/catalog/plans/"+c("ConfirmCatalogPlan","plan_id",t.path.plan_id)+"/confirm",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async declineCatalogPlan(t){return e.send({op:"DeclineCatalogPlan",method:"POST",path:"/iap/catalog/plans/"+c("DeclineCatalogPlan","plan_id",t.path.plan_id)+"/decline",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async listCatalogRevisions(t){return e.send({op:"ListCatalogRevisions",method:"GET",path:"/iap/catalog/revisions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getCatalogRevision(t){return e.send({op:"GetCatalogRevision",method:"GET",path:"/iap/catalog/revisions/"+c("GetCatalogRevision","revision",t.path.revision),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async restoreCatalogRevision(t){return e.send({op:"RestoreCatalogRevision",method:"POST",path:"/iap/catalog/revisions/"+c("RestoreCatalogRevision","revision",t.path.revision)+"/restore",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async validateCatalog(t){return e.send({op:"ValidateCatalog",method:"POST",path:"/iap/catalog/validate",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listCharts(t){return e.send({op:"ListCharts",method:"GET",path:"/iap/charts",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getChartsOverview(t){return e.send({op:"GetChartsOverview",method:"GET",path:"/iap/charts/overview",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getChart(t){return e.send({op:"GetChart",method:"GET",path:"/iap/charts/"+c("GetChart","chart",t.path.chart),auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async createCheckout(t){return e.send({op:"CreateCheckout",method:"POST",path:"/iap/checkout",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createCheckoutRedemption(t){return e.send({op:"CreateCheckoutRedemption",method:"POST",path:"/iap/checkout/redemption",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listCoupons(t){return e.send({op:"ListCoupons",method:"GET",path:"/iap/coupons",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createCoupon(t){return e.send({op:"CreateCoupon",method:"POST",path:"/iap/coupons",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async redeemCoupon(t){return e.send({op:"RedeemCoupon",method:"POST",path:"/iap/coupons/redeem",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCoupon(t){return e.send({op:"GetCoupon",method:"GET",path:"/iap/coupons/"+c("GetCoupon","coupon_key",t.path.coupon_key),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async revokeCoupon(t){return e.send({op:"RevokeCoupon",method:"DELETE",path:"/iap/coupons/"+c("RevokeCoupon","coupon_key",t.path.coupon_key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listCouponCodes(t){return e.send({op:"ListCouponCodes",method:"GET",path:"/iap/coupons/"+c("ListCouponCodes","coupon_key",t.path.coupon_key)+"/codes",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async searchCustomers(t){return e.send({op:"SearchCustomers",method:"GET",path:"/iap/customers",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getCustomer(t){return e.send({op:"GetCustomer",method:"GET",path:"/iap/customers/"+c("GetCustomer","customer_id",t.path.customer_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async grantCredits(t){return e.send({op:"GrantCredits",method:"POST",path:"/iap/customers/"+c("GrantCredits","customer_id",t.path.customer_id)+"/credits",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listCreditEntries(t){return e.send({op:"ListCreditEntries",method:"GET",path:"/iap/customers/"+c("ListCreditEntries","customer_id",t.path.customer_id)+"/credits/entries",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async forgiveCredits(t){return e.send({op:"ForgiveCredits",method:"POST",path:"/iap/customers/"+c("ForgiveCredits","customer_id",t.path.customer_id)+"/credits/forgive",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listCustomerGrants(t){return e.send({op:"ListCustomerGrants",method:"GET",path:"/iap/customers/"+c("ListCustomerGrants","customer_id",t.path.customer_id)+"/grants",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async grantEntitlement(t){return e.send({op:"GrantEntitlement",method:"POST",path:"/iap/customers/"+c("GrantEntitlement","customer_id",t.path.customer_id)+"/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revokeGrant(t){return e.send({op:"RevokeGrant",method:"DELETE",path:"/iap/customers/"+c("RevokeGrant","customer_id",t.path.customer_id)+"/grants/"+c("RevokeGrant","grant_id",t.path.grant_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async getCustomerHistory(t){return e.send({op:"GetCustomerHistory",method:"GET",path:"/iap/customers/"+c("GetCustomerHistory","customer_id",t.path.customer_id)+"/history",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async holdSpend(t){return e.send({op:"HoldSpend",method:"POST",path:"/iap/customers/"+c("HoldSpend","customer_id",t.path.customer_id)+"/holds",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async setCustomerLimit(t){return e.send({op:"SetCustomerLimit",method:"PUT",path:"/iap/customers/"+c("SetCustomerLimit","customer_id",t.path.customer_id)+"/limits/"+c("SetCustomerLimit","limit_key",t.path.limit_key),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async clearCustomerLimit(t){return e.send({op:"ClearCustomerLimit",method:"DELETE",path:"/iap/customers/"+c("ClearCustomerLimit","customer_id",t.path.customer_id)+"/limits/"+c("ClearCustomerLimit","limit_key",t.path.limit_key),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async grantLimit(t){return e.send({op:"GrantLimit",method:"POST",path:"/iap/customers/"+c("GrantLimit","customer_id",t.path.customer_id)+"/limits/"+c("GrantLimit","limit_key",t.path.limit_key)+"/grants",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async spend(t){return e.send({op:"Spend",method:"POST",path:"/iap/customers/"+c("Spend","customer_id",t.path.customer_id)+"/spend",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async commitSpend(t){return e.send({op:"CommitSpend",method:"POST",path:"/iap/customers/"+c("CommitSpend","customer_id",t.path.customer_id)+"/spends/"+c("CommitSpend","spend_id",t.path.spend_id)+"/commit",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async extendHold(t){return e.send({op:"ExtendHold",method:"POST",path:"/iap/customers/"+c("ExtendHold","customer_id",t.path.customer_id)+"/spends/"+c("ExtendHold","spend_id",t.path.spend_id)+"/extend",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async releaseSpend(t){return e.send({op:"ReleaseSpend",method:"POST",path:"/iap/customers/"+c("ReleaseSpend","customer_id",t.path.customer_id)+"/spends/"+c("ReleaseSpend","spend_id",t.path.spend_id)+"/release",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async reverseSpend(t){return e.send({op:"ReverseSpend",method:"POST",path:"/iap/customers/"+c("ReverseSpend","customer_id",t.path.customer_id)+"/spends/"+c("ReverseSpend","spend_id",t.path.spend_id)+"/reverse",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async cancelSubscription(t){return e.send({op:"CancelSubscription",method:"POST",path:"/iap/customers/"+c("CancelSubscription","customer_id",t.path.customer_id)+"/subscriptions/"+c("CancelSubscription","subscription_id",t.path.subscription_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async extendSubscription(t){return e.send({op:"ExtendSubscription",method:"POST",path:"/iap/customers/"+c("ExtendSubscription","customer_id",t.path.customer_id)+"/subscriptions/"+c("ExtendSubscription","subscription_id",t.path.subscription_id)+"/extend",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async refundSubscription(t){return e.send({op:"RefundSubscription",method:"POST",path:"/iap/customers/"+c("RefundSubscription","customer_id",t.path.customer_id)+"/subscriptions/"+c("RefundSubscription","subscription_id",t.path.subscription_id)+"/refund",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listExperiments(t){return e.send({op:"ListExperiments",method:"GET",path:"/iap/experiments",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async startExperiment(t){return e.send({op:"StartExperiment",method:"POST",path:"/iap/experiments",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getExperiment(t){return e.send({op:"GetExperiment",method:"GET",path:"/iap/experiments/"+c("GetExperiment","experiment_id",t.path.experiment_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getExperimentResults(t){return e.send({op:"GetExperimentResults",method:"GET",path:"/iap/experiments/"+c("GetExperimentResults","experiment_id",t.path.experiment_id)+"/results",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async stopExperiment(t){return e.send({op:"StopExperiment",method:"POST",path:"/iap/experiments/"+c("StopExperiment","experiment_id",t.path.experiment_id)+"/stop",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async declareExperimentWinner(t){return e.send({op:"DeclareExperimentWinner",method:"POST",path:"/iap/experiments/"+c("DeclareExperimentWinner","experiment_id",t.path.experiment_id)+"/winner",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getGoogleAccount(t){return e.send({op:"GetGoogleAccount",method:"GET",path:"/iap/google",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async connectGoogle(t){return e.send({op:"ConnectGoogle",method:"POST",path:"/iap/google",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async disconnectGoogle(t){return e.send({op:"DisconnectGoogle",method:"DELETE",path:"/iap/google",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getGoogleAccountId(t){return e.send({op:"GetGoogleAccountID",method:"POST",path:"/iap/google/account-id",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async reportGooglePurchases(t){return e.send({op:"ReportGooglePurchases",method:"POST",path:"/iap/google/purchases",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getMyCustomerInfo(t){return e.send({op:"GetMyCustomerInfo",method:"GET",path:"/iap/me",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async mergeGuest(t){return e.send({op:"MergeGuest",method:"POST",path:"/iap/me/merge",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createMergeGrant(t){return e.send({op:"CreateMergeGrant",method:"POST",path:"/iap/me/merge-grant",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},signal:t?.signal})},async setRefundDataConsent(t){return e.send({op:"SetRefundDataConsent",method:"PUT",path:"/iap/me/refund-data-consent",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getOfferings(t){return e.send({op:"GetOfferings",method:"GET",path:"/iap/offerings",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listMyOffers(t){return e.send({op:"ListMyOffers",method:"GET",path:"/iap/offers",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async getOfferStats(t){return e.send({op:"GetOfferStats",method:"GET",path:"/iap/offers/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async signAppleOffer(t){return e.send({op:"SignAppleOffer",method:"POST",path:"/iap/offers/"+c("SignAppleOffer","offer_key",t.path.offer_key)+"/apple-signature",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async claimOffer(t){return e.send({op:"ClaimOffer",method:"POST",path:"/iap/offers/"+c("ClaimOffer","offer_key",t.path.offer_key)+"/claim",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},signal:t.signal})},async recordOfferView(t){return e.send({op:"RecordOfferView",method:"POST",path:"/iap/offers/"+c("RecordOfferView","offer_key",t.path.offer_key)+"/views",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async listPaywalls(t){return e.send({op:"ListPaywalls",method:"GET",path:"/iap/paywalls",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createPaywall(t){return e.send({op:"CreatePaywall",method:"POST",path:"/iap/paywalls",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPaywallAssets(t){return e.send({op:"ListPaywallAssets",method:"GET",path:"/iap/paywalls/assets",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async registerPaywallAsset(t){return e.send({op:"RegisterPaywallAsset",method:"POST",path:"/iap/paywalls/assets",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deletePaywallAsset(t){return e.send({op:"DeletePaywallAsset",method:"DELETE",path:"/iap/paywalls/assets/"+c("DeletePaywallAsset","asset_id",t.path.asset_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listPaywallTemplates(t){return e.send({op:"ListPaywallTemplates",method:"GET",path:"/iap/paywalls/templates",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getPaywallTemplateAsset(t){return e.send({op:"GetPaywallTemplateAsset",method:"GET",path:"/iap/paywalls/templates/"+c("GetPaywallTemplateAsset","key",t.path.key)+"/assets/"+c("GetPaywallTemplateAsset","asset_id",t.path.asset_id),auth:[["SecretKeyAuth"]],answers:{200:"raw",304:"empty"},headers:t.headers,signal:t.signal})},async validatePaywall(t){return e.send({op:"ValidatePaywall",method:"POST",path:"/iap/paywalls/validate",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPaywall(t){return e.send({op:"GetPaywall",method:"GET",path:"/iap/paywalls/"+c("GetPaywall","paywall_id",t.path.paywall_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deletePaywall(t){return e.send({op:"DeletePaywall",method:"DELETE",path:"/iap/paywalls/"+c("DeletePaywall","paywall_id",t.path.paywall_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async savePaywallDraft(t){return e.send({op:"SavePaywallDraft",method:"PUT",path:"/iap/paywalls/"+c("SavePaywallDraft","paywall_id",t.path.paywall_id)+"/draft",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async publishPaywall(t){return e.send({op:"PublishPaywall",method:"POST",path:"/iap/paywalls/"+c("PublishPaywall","paywall_id",t.path.paywall_id)+"/publish",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async listPaywallVersions(t){return e.send({op:"ListPaywallVersions",method:"GET",path:"/iap/paywalls/"+c("ListPaywallVersions","paywall_id",t.path.paywall_id)+"/versions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getPaywallVersion(t){return e.send({op:"GetPaywallVersion",method:"GET",path:"/iap/paywalls/"+c("GetPaywallVersion","paywall_id",t.path.paywall_id)+"/versions/"+c("GetPaywallVersion","version",t.path.version),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listPlacements(t){return e.send({op:"ListPlacements",method:"GET",path:"/iap/placements",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listAttributeKeys(t){return e.send({op:"ListAttributeKeys",method:"GET",path:"/iap/placements/attributes",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async setPlacement(t){return e.send({op:"SetPlacement",method:"PUT",path:"/iap/placements/"+c("SetPlacement","placement",t.path.placement),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deletePlacement(t){return e.send({op:"DeletePlacement",method:"DELETE",path:"/iap/placements/"+c("DeletePlacement","placement",t.path.placement),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async recordPaywallExposure(t){return e.send({op:"RecordPaywallExposure",method:"POST",path:"/iap/placements/"+c("RecordPaywallExposure","placement",t.path.placement)+"/exposures",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPlacementPaywall(t){return e.send({op:"GetPlacementPaywall",method:"GET",path:"/iap/placements/"+c("GetPlacementPaywall","placement",t.path.placement)+"/paywall",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json",204:"empty",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async previewPlacement(t){return e.send({op:"PreviewPlacement",method:"POST",path:"/iap/placements/"+c("PreviewPlacement","placement",t.path.placement)+"/resolve-preview",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPlacementResults(t){return e.send({op:"GetPlacementResults",method:"GET",path:"/iap/placements/"+c("GetPlacementResults","placement",t.path.placement)+"/results",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getPlacementRules(t){return e.send({op:"GetPlacementRules",method:"GET",path:"/iap/placements/"+c("GetPlacementRules","placement",t.path.placement)+"/rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setPlacementRules(t){return e.send({op:"SetPlacementRules",method:"PUT",path:"/iap/placements/"+c("SetPlacementRules","placement",t.path.placement)+"/rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createPortalSession(t){return e.send({op:"CreatePortalSession",method:"POST",path:"/iap/portal",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getRedemptionPage(t){return e.send({op:"GetRedemptionPage",method:"GET",path:"/iap/redeem",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async redeemPurchase(t){return e.send({op:"RedeemPurchase",method:"POST",path:"/iap/redemptions/redeem",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSettings(t){return e.send({op:"GetSettings",method:"GET",path:"/iap/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async updateSettings(t){return e.send({op:"UpdateSettings",method:"PUT",path:"/iap/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async receiveAppleNotification(t){return e.send({op:"ReceiveAppleNotification",method:"POST",path:"/iap/webhooks/apple",auth:[],answers:{200:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async receiveGoogleNotification(t){return e.send({op:"ReceiveGoogleNotification",method:"POST",path:"/iap/webhooks/google",auth:[],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var or={};wt(or,{client:()=>e$});function e$(e){return{async listJourneys(t){return e.send({op:"ListJourneys",method:"GET",path:"/journeys",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createJourney(t){return e.send({op:"CreateJourney",method:"POST",path:"/journeys",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listBlueprints(t){return e.send({op:"ListBlueprints",method:"GET",path:"/journeys/blueprints",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listPersonRuns(t){return e.send({op:"ListPersonRuns",method:"GET",path:"/journeys/people/"+c("ListPersonRuns","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async simulateJourney(t){return e.send({op:"SimulateJourney",method:"POST",path:"/journeys/simulate",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listStoreBlueprints(t){return e.send({op:"ListStoreBlueprints",method:"GET",path:"/journeys/stores/"+c("ListStoreBlueprints","store_id",t.path.store_id)+"/blueprints",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async activateStoreBlueprint(t){return e.send({op:"ActivateStoreBlueprint",method:"POST",path:"/journeys/stores/"+c("ActivateStoreBlueprint","store_id",t.path.store_id)+"/blueprints",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteStoreBlueprint(t){return e.send({op:"DeleteStoreBlueprint",method:"DELETE",path:"/journeys/stores/"+c("DeleteStoreBlueprint","store_id",t.path.store_id)+"/blueprints/"+c("DeleteStoreBlueprint","key",t.path.key),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async validateJourney(t){return e.send({op:"ValidateJourney",method:"POST",path:"/journeys/validate",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getJourney(t){return e.send({op:"GetJourney",method:"GET",path:"/journeys/"+c("GetJourney","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateJourney(t){return e.send({op:"UpdateJourney",method:"PUT",path:"/journeys/"+c("UpdateJourney","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteJourney(t){return e.send({op:"DeleteJourney",method:"DELETE",path:"/journeys/"+c("DeleteJourney","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async copyJourney(t){return e.send({op:"CopyJourney",method:"POST",path:"/journeys/"+c("CopyJourney","key",t.path.key)+"/copy",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async publishJourney(t){return e.send({op:"PublishJourney",method:"POST",path:"/journeys/"+c("PublishJourney","key",t.path.key)+"/publish",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listJourneyRuns(t){return e.send({op:"ListJourneyRuns",method:"GET",path:"/journeys/"+c("ListJourneyRuns","key",t.path.key)+"/runs",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getJourneyStats(t){return e.send({op:"GetJourneyStats",method:"GET",path:"/journeys/"+c("GetJourneyStats","key",t.path.key)+"/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async stopJourney(t){return e.send({op:"StopJourney",method:"POST",path:"/journeys/"+c("StopJourney","key",t.path.key)+"/stop",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async testJourney(t){return e.send({op:"TestJourney",method:"POST",path:"/journeys/"+c("TestJourney","key",t.path.key)+"/test",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var Io={};wt(Io,{client:()=>t$});function t$(e){return{async listMachines(t){return e.send({op:"ListMachines",method:"GET",path:"/machines",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createMachine(t){return e.send({op:"CreateMachine",method:"POST",path:"/machines",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMachineSizes(t){return e.send({op:"ListMachineSizes",method:"GET",path:"/machines/sizes",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getMachineNetwork(t){return e.send({op:"GetMachineNetwork",method:"GET",path:"/machines/network",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async connectGitHub(t){return e.send({op:"ConnectGitHub",method:"POST",path:"/machines/github/connect",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listInstallations(t){return e.send({op:"ListInstallations",method:"GET",path:"/machines/github/installations",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async linkInstallation(t){return e.send({op:"LinkInstallation",method:"POST",path:"/machines/github/installations",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async shareInstallation(t){return e.send({op:"ShareInstallation",method:"POST",path:"/machines/github/installations/share",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async unlinkInstallation(t){return e.send({op:"UnlinkInstallation",method:"DELETE",path:"/machines/github/installations/"+c("UnlinkInstallation","installation",t.path.installation),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listRepositories(t){return e.send({op:"ListRepositories",method:"GET",path:"/machines/github/repositories",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getMachine(t){return e.send({op:"GetMachine",method:"GET",path:"/machines/"+c("GetMachine","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteMachine(t){return e.send({op:"DeleteMachine",method:"DELETE",path:"/machines/"+c("DeleteMachine","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateMachine(t){return e.send({op:"UpdateMachine",method:"PATCH",path:"/machines/"+c("UpdateMachine","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listBuilds(t){return e.send({op:"ListBuilds",method:"GET",path:"/machines/"+c("ListBuilds","name",t.path.name)+"/builds",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async deployMachine(t){return e.send({op:"DeployMachine",method:"POST",path:"/machines/"+c("DeployMachine","name",t.path.name)+"/builds",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMachinePreviews(t){return e.send({op:"ListMachinePreviews",method:"GET",path:"/machines/"+c("ListMachinePreviews","name",t.path.name)+"/previews",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putMachinePreview(t){return e.send({op:"PutMachinePreview",method:"PUT",path:"/machines/"+c("PutMachinePreview","name",t.path.name)+"/previews/"+c("PutMachinePreview","pull_request",t.path.pull_request),auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMachinePreview(t){return e.send({op:"DeleteMachinePreview",method:"DELETE",path:"/machines/"+c("DeleteMachinePreview","name",t.path.name)+"/previews/"+c("DeleteMachinePreview","pull_request",t.path.pull_request),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listMachineDomains(t){return e.send({op:"ListMachineDomains",method:"GET",path:"/machines/"+c("ListMachineDomains","name",t.path.name)+"/domains",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async addMachineDomain(t){return e.send({op:"AddMachineDomain",method:"POST",path:"/machines/"+c("AddMachineDomain","name",t.path.name)+"/domains",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMachineDomain(t){return e.send({op:"DeleteMachineDomain",method:"DELETE",path:"/machines/"+c("DeleteMachineDomain","name",t.path.name)+"/domains/"+c("DeleteMachineDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateMachineDomain(t){return e.send({op:"UpdateMachineDomain",method:"PATCH",path:"/machines/"+c("UpdateMachineDomain","name",t.path.name)+"/domains/"+c("UpdateMachineDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getBuild(t){return e.send({op:"GetBuild",method:"GET",path:"/machines/"+c("GetBuild","name",t.path.name)+"/builds/"+c("GetBuild","build",t.path.build),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getBuildLog(t){return e.send({op:"GetBuildLog",method:"GET",path:"/machines/"+c("GetBuildLog","name",t.path.name)+"/builds/"+c("GetBuildLog","build",t.path.build)+"/log",auth:[["SecretKeyAuth"]],answers:{200:"raw"},signal:t.signal})},async rollbackMachine(t){return e.send({op:"RollbackMachine",method:"POST",path:"/machines/"+c("RollbackMachine","name",t.path.name)+"/rollback",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listDatabases(t){return e.send({op:"ListDatabases",method:"GET",path:"/databases",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createDatabase(t){return e.send({op:"CreateDatabase",method:"POST",path:"/databases",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listDatabaseSizes(t){return e.send({op:"ListDatabaseSizes",method:"GET",path:"/databases/sizes",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getDatabase(t){return e.send({op:"GetDatabase",method:"GET",path:"/databases/"+c("GetDatabase","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteDatabase(t){return e.send({op:"DeleteDatabase",method:"DELETE",path:"/databases/"+c("DeleteDatabase","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateDatabase(t){return e.send({op:"UpdateDatabase",method:"PATCH",path:"/databases/"+c("UpdateDatabase","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async undeleteDatabase(t){return e.send({op:"UndeleteDatabase",method:"POST",path:"/databases/"+c("UndeleteDatabase","name",t.path.name)+"/undelete",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async purgeDatabase(t){return e.send({op:"PurgeDatabase",method:"POST",path:"/databases/"+c("PurgeDatabase","name",t.path.name)+"/purge",auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async getDatabaseCredentials(t){return e.send({op:"GetDatabaseCredentials",method:"GET",path:"/databases/"+c("GetDatabaseCredentials","name",t.path.name)+"/credentials",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async changeDatabasePassword(t){return e.send({op:"ChangeDatabasePassword",method:"POST",path:"/databases/"+c("ChangeDatabasePassword","name",t.path.name)+"/password",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async readMachineLogs(t){return e.send({op:"ReadMachineLogs",method:"GET",path:"/machines/"+c("ReadMachineLogs","name",t.path.name)+"/logs",auth:[["SecretKeyAuth"]],answers:{200:"raw"},query:t.query,signal:t.signal})},async execInMachine(t){return e.send({op:"ExecInMachine",method:"POST",path:"/machines/"+c("ExecInMachine","name",t.path.name)+"/exec",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMachineExecs(t){return e.send({op:"ListMachineExecs",method:"GET",path:"/machines/"+c("ListMachineExecs","name",t.path.name)+"/execs",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getMachineMetrics(t){return e.send({op:"GetMachineMetrics",method:"GET",path:"/machines/"+c("GetMachineMetrics","name",t.path.name)+"/metrics",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getMachineContract(t){return e.send({op:"GetMachineContract",method:"GET",path:"/machines/"+c("GetMachineContract","name",t.path.name)+"/openapi",auth:[["SecretKeyAuth"]],answers:{200:"json",304:"empty"},headers:t.headers,signal:t.signal})},async restoreDatabase(t){return e.send({op:"RestoreDatabase",method:"POST",path:"/databases/"+c("RestoreDatabase","name",t.path.name)+"/restore",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getDatabaseSchema(t){return e.send({op:"GetDatabaseSchema",method:"GET",path:"/databases/"+c("GetDatabaseSchema","name",t.path.name)+"/schema",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getDatabaseMetrics(t){return e.send({op:"GetDatabaseMetrics",method:"GET",path:"/databases/"+c("GetDatabaseMetrics","name",t.path.name)+"/metrics",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async queryDatabase(t){return e.send({op:"QueryDatabase",method:"POST",path:"/databases/"+c("QueryDatabase","name",t.path.name)+"/sql",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listCrons(t){return e.send({op:"ListCrons",method:"GET",path:"/machines/"+c("ListCrons","name",t.path.name)+"/crons",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listCronRuns(t){return e.send({op:"ListCronRuns",method:"GET",path:"/machines/"+c("ListCronRuns","name",t.path.name)+"/crons/"+c("ListCronRuns","cron",t.path.cron)+"/runs",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async runCron(t){return e.send({op:"RunCron",method:"POST",path:"/machines/"+c("RunCron","name",t.path.name)+"/crons/"+c("RunCron","cron",t.path.cron)+"/run",auth:[["SecretKeyAuth"]],answers:{201:"json"},signal:t.signal})},async pauseCron(t){return e.send({op:"PauseCron",method:"POST",path:"/machines/"+c("PauseCron","name",t.path.name)+"/crons/"+c("PauseCron","cron",t.path.cron)+"/pause",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async resumeCron(t){return e.send({op:"ResumeCron",method:"POST",path:"/machines/"+c("ResumeCron","name",t.path.name)+"/crons/"+c("ResumeCron","cron",t.path.cron)+"/resume",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listTasks(t){return e.send({op:"ListTasks",method:"GET",path:"/machines/"+c("ListTasks","name",t.path.name)+"/tasks",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async enqueueTask(t){return e.send({op:"EnqueueTask",method:"POST",path:"/machines/"+c("EnqueueTask","name",t.path.name)+"/tasks",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getTask(t){return e.send({op:"GetTask",method:"GET",path:"/machines/"+c("GetTask","name",t.path.name)+"/tasks/"+c("GetTask","task",t.path.task),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelTask(t){return e.send({op:"CancelTask",method:"POST",path:"/machines/"+c("CancelTask","name",t.path.name)+"/tasks/"+c("CancelTask","task",t.path.task)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async retryTask(t){return e.send({op:"RetryTask",method:"POST",path:"/machines/"+c("RetryTask","name",t.path.name)+"/tasks/"+c("RetryTask","task",t.path.task)+"/retry",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listTaskTypes(t){return e.send({op:"ListTaskTypes",method:"GET",path:"/machines/"+c("ListTaskTypes","name",t.path.name)+"/task-types",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async makeTemplatedTestUsers(t){return e.send({op:"MakeTemplatedTestUsers",method:"POST",path:"/machines/"+c("MakeTemplatedTestUsers","name",t.path.name)+"/test-users",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async templateTestUser(t){return e.send({op:"TemplateTestUser",method:"POST",path:"/machines/"+c("TemplateTestUser","name",t.path.name)+"/test-users/"+c("TemplateTestUser","user",t.path.user)+"/templates/"+c("TemplateTestUser","template",t.path.template),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteTemplatedTestUser(t){return e.send({op:"DeleteTemplatedTestUser",method:"DELETE",path:"/machines/"+c("DeleteTemplatedTestUser","name",t.path.name)+"/test-users/"+c("DeleteTemplatedTestUser","user",t.path.user),auth:[["SecretKeyAuth"]],answers:{200:"json",204:"empty"},headers:t.headers,signal:t.signal})},async listSites(t){return e.send({op:"ListSites",method:"GET",path:"/sites",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createSite(t){return e.send({op:"CreateSite",method:"POST",path:"/sites",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSite(t){return e.send({op:"GetSite",method:"GET",path:"/sites/"+c("GetSite","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteSite(t){return e.send({op:"DeleteSite",method:"DELETE",path:"/sites/"+c("DeleteSite","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateSite(t){return e.send({op:"UpdateSite",method:"PATCH",path:"/sites/"+c("UpdateSite","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSiteReleases(t){return e.send({op:"ListSiteReleases",method:"GET",path:"/sites/"+c("ListSiteReleases","name",t.path.name)+"/releases",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createSiteRelease(t){return e.send({op:"CreateSiteRelease",method:"POST",path:"/sites/"+c("CreateSiteRelease","name",t.path.name)+"/releases",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async uploadSiteFile(t){return e.send({op:"UploadSiteFile",method:"PUT",path:"/sites/"+c("UploadSiteFile","name",t.path.name)+"/releases/"+c("UploadSiteFile","release",t.path.release)+"/files/"+c("UploadSiteFile","digest",t.path.digest),auth:[["SecretKeyAuth"]],answers:{204:"empty"},body:{kind:"raw",contentType:t.contentType??"application/octet-stream",value:t.body},signal:t.signal})},async finishSiteRelease(t){return e.send({op:"FinishSiteRelease",method:"POST",path:"/sites/"+c("FinishSiteRelease","name",t.path.name)+"/releases/"+c("FinishSiteRelease","release",t.path.release)+"/finish",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async rollbackSite(t){return e.send({op:"RollbackSite",method:"POST",path:"/sites/"+c("RollbackSite","name",t.path.name)+"/rollback",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSiteBuilds(t){return e.send({op:"ListSiteBuilds",method:"GET",path:"/sites/"+c("ListSiteBuilds","name",t.path.name)+"/builds",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deploySite(t){return e.send({op:"DeploySite",method:"POST",path:"/sites/"+c("DeploySite","name",t.path.name)+"/builds",auth:[["SecretKeyAuth"]],answers:{202:"json"},signal:t.signal})},async listSitePreviews(t){return e.send({op:"ListSitePreviews",method:"GET",path:"/sites/"+c("ListSitePreviews","name",t.path.name)+"/previews",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listSiteDomains(t){return e.send({op:"ListSiteDomains",method:"GET",path:"/sites/"+c("ListSiteDomains","name",t.path.name)+"/domains",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async addSiteDomain(t){return e.send({op:"AddSiteDomain",method:"POST",path:"/sites/"+c("AddSiteDomain","name",t.path.name)+"/domains",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteSiteDomain(t){return e.send({op:"DeleteSiteDomain",method:"DELETE",path:"/sites/"+c("DeleteSiteDomain","name",t.path.name)+"/domains/"+c("DeleteSiteDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateSiteDomain(t){return e.send({op:"UpdateSiteDomain",method:"PATCH",path:"/sites/"+c("UpdateSiteDomain","name",t.path.name)+"/domains/"+c("UpdateSiteDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSiteBuild(t){return e.send({op:"GetSiteBuild",method:"GET",path:"/sites/"+c("GetSiteBuild","name",t.path.name)+"/builds/"+c("GetSiteBuild","build",t.path.build),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async authorizeSitePreview(t){return e.send({op:"AuthorizeSitePreview",method:"POST",path:"/sites/"+c("AuthorizeSitePreview","name",t.path.name)+"/previews/"+c("AuthorizeSitePreview","pull_request",t.path.pull_request)+"/authorize",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async authorizeMachinePreview(t){return e.send({op:"AuthorizeMachinePreview",method:"POST",path:"/machines/"+c("AuthorizeMachinePreview","name",t.path.name)+"/previews/"+c("AuthorizeMachinePreview","pull_request",t.path.pull_request)+"/authorize",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async openMachinePreview(t){return e.send({op:"OpenMachinePreview",method:"POST",path:"/machines/"+c("OpenMachinePreview","name",t.path.name)+"/previews/"+c("OpenMachinePreview","pull_request",t.path.pull_request)+"/open",auth:[["SecretKeyAuth"]],answers:{202:"json"},signal:t.signal})},async moveMachine(t){return e.send({op:"MoveMachine",method:"POST",path:"/machines/"+c("MoveMachine","name",t.path.name)+"/move",auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async moveSite(t){return e.send({op:"MoveSite",method:"POST",path:"/sites/"+c("MoveSite","name",t.path.name)+"/move",auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async moveDatabase(t){return e.send({op:"MoveDatabase",method:"POST",path:"/databases/"+c("MoveDatabase","name",t.path.name)+"/move",auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async cancelSiteBuild(t){return e.send({op:"CancelSiteBuild",method:"POST",path:"/sites/"+c("CancelSiteBuild","name",t.path.name)+"/builds/"+c("CancelSiteBuild","build",t.path.build)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelBuild(t){return e.send({op:"CancelBuild",method:"POST",path:"/machines/"+c("CancelBuild","name",t.path.name)+"/builds/"+c("CancelBuild","build",t.path.build)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listSiteHooks(t){return e.send({op:"ListSiteHooks",method:"GET",path:"/sites/"+c("ListSiteHooks","name",t.path.name)+"/hooks",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createSiteHook(t){return e.send({op:"CreateSiteHook",method:"POST",path:"/sites/"+c("CreateSiteHook","name",t.path.name)+"/hooks",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteSiteHook(t){return e.send({op:"DeleteSiteHook",method:"DELETE",path:"/sites/"+c("DeleteSiteHook","name",t.path.name)+"/hooks/"+c("DeleteSiteHook","hook",t.path.hook),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listMachineHooks(t){return e.send({op:"ListMachineHooks",method:"GET",path:"/machines/"+c("ListMachineHooks","name",t.path.name)+"/hooks",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createMachineHook(t){return e.send({op:"CreateMachineHook",method:"POST",path:"/machines/"+c("CreateMachineHook","name",t.path.name)+"/hooks",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMachineHook(t){return e.send({op:"DeleteMachineHook",method:"DELETE",path:"/machines/"+c("DeleteMachineHook","name",t.path.name)+"/hooks/"+c("DeleteMachineHook","hook",t.path.hook),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async detectProject(t){return e.send({op:"DetectProject",method:"GET",path:"/machines/github/detect",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async createPreviewPass(t){return e.send({op:"CreatePreviewPass",method:"POST",path:"/sites/"+c("CreatePreviewPass","name",t.path.name)+"/previews/pass",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPreviewLinks(t){return e.send({op:"ListPreviewLinks",method:"GET",path:"/sites/"+c("ListPreviewLinks","name",t.path.name)+"/previews/links",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createPreviewLink(t){return e.send({op:"CreatePreviewLink",method:"POST",path:"/sites/"+c("CreatePreviewLink","name",t.path.name)+"/previews/links",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deletePreviewLink(t){return e.send({op:"DeletePreviewLink",method:"DELETE",path:"/sites/"+c("DeletePreviewLink","name",t.path.name)+"/previews/links/"+c("DeletePreviewLink","link",t.path.link),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listEnvironmentDomains(t){return e.send({op:"ListEnvironmentDomains",method:"GET",path:"/domains",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async addEnvironmentDomain(t){return e.send({op:"AddEnvironmentDomain",method:"POST",path:"/domains",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteEnvironmentDomain(t){return e.send({op:"DeleteEnvironmentDomain",method:"DELETE",path:"/domains/"+c("DeleteEnvironmentDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async setEnvironmentSignInDomain(t){return e.send({op:"SetEnvironmentSignInDomain",method:"PATCH",path:"/domains/"+c("SetEnvironmentSignInDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var ir={};wt(ir,{client:()=>n$});function n$(e){return{async adminAccessLog(t){return e.send({op:"AdminAccessLog",method:"GET",path:"/messaging/admin/access-log",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminListConversations(t){return e.send({op:"AdminListConversations",method:"GET",path:"/messaging/admin/conversations",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminCreateConversation(t){return e.send({op:"AdminCreateConversation",method:"POST",path:"/messaging/admin/conversations",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetConversation(t){return e.send({op:"AdminGetConversation",method:"GET",path:"/messaging/admin/conversations/"+c("AdminGetConversation","conversation_id",t.path.conversation_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminDeleteConversation(t){return e.send({op:"AdminDeleteConversation",method:"DELETE",path:"/messaging/admin/conversations/"+c("AdminDeleteConversation","conversation_id",t.path.conversation_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async adminUpdateConversation(t){return e.send({op:"AdminUpdateConversation",method:"PATCH",path:"/messaging/admin/conversations/"+c("AdminUpdateConversation","conversation_id",t.path.conversation_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminAddMembers(t){return e.send({op:"AdminAddMembers",method:"POST",path:"/messaging/admin/conversations/"+c("AdminAddMembers","conversation_id",t.path.conversation_id)+"/members",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminRemoveMember(t){return e.send({op:"AdminRemoveMember",method:"DELETE",path:"/messaging/admin/conversations/"+c("AdminRemoveMember","conversation_id",t.path.conversation_id)+"/members/"+c("AdminRemoveMember","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async adminListMessages(t){return e.send({op:"AdminListMessages",method:"GET",path:"/messaging/admin/conversations/"+c("AdminListMessages","conversation_id",t.path.conversation_id)+"/messages",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async adminSendMessage(t){return e.send({op:"AdminSendMessage",method:"POST",path:"/messaging/admin/conversations/"+c("AdminSendMessage","conversation_id",t.path.conversation_id)+"/messages",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminDeleteMessage(t){return e.send({op:"AdminDeleteMessage",method:"DELETE",path:"/messaging/admin/conversations/"+c("AdminDeleteMessage","conversation_id",t.path.conversation_id)+"/messages/"+c("AdminDeleteMessage","message_id",t.path.message_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async adminFileUrl(t){return e.send({op:"AdminFileURL",method:"GET",path:"/messaging/admin/conversations/"+c("AdminFileURL","conversation_id",t.path.conversation_id)+"/messages/"+c("AdminFileURL","message_id",t.path.message_id)+"/attachments/"+c("AdminFileURL","attachment_id",t.path.attachment_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminPutProfile(t){return e.send({op:"AdminPutProfile",method:"PUT",path:"/messaging/admin/profiles/"+c("AdminPutProfile","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListReports(t){return e.send({op:"AdminListReports",method:"GET",path:"/messaging/admin/reports",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminGetReport(t){return e.send({op:"AdminGetReport",method:"GET",path:"/messaging/admin/reports/"+c("AdminGetReport","report_id",t.path.report_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminReportFileUrl(t){return e.send({op:"AdminReportFileURL",method:"GET",path:"/messaging/admin/reports/"+c("AdminReportFileURL","report_id",t.path.report_id)+"/attachments/"+c("AdminReportFileURL","attachment_id",t.path.attachment_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminResolveReport(t){return e.send({op:"AdminResolveReport",method:"POST",path:"/messaging/admin/reports/"+c("AdminResolveReport","report_id",t.path.report_id)+"/resolve",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listBlocks(t){return e.send({op:"ListBlocks",method:"GET",path:"/messaging/blocks",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async block(t){return e.send({op:"Block",method:"PUT",path:"/messaging/blocks/"+c("Block","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async unblock(t){return e.send({op:"Unblock",method:"DELETE",path:"/messaging/blocks/"+c("Unblock","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async listConversations(t){return e.send({op:"ListConversations",method:"GET",path:"/messaging/conversations",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async openDirectConversation(t){return e.send({op:"OpenDirectConversation",method:"POST",path:"/messaging/conversations/direct",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createGroup(t){return e.send({op:"CreateGroup",method:"POST",path:"/messaging/conversations/group",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getConversation(t){return e.send({op:"GetConversation",method:"GET",path:"/messaging/conversations/"+c("GetConversation","conversation_id",t.path.conversation_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async deleteConversation(t){return e.send({op:"DeleteConversation",method:"DELETE",path:"/messaging/conversations/"+c("DeleteConversation","conversation_id",t.path.conversation_id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async updateConversation(t){return e.send({op:"UpdateConversation",method:"PATCH",path:"/messaging/conversations/"+c("UpdateConversation","conversation_id",t.path.conversation_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async clearConversation(t){return e.send({op:"ClearConversation",method:"POST",path:"/messaging/conversations/"+c("ClearConversation","conversation_id",t.path.conversation_id)+"/clear",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async closeConversation(t){return e.send({op:"CloseConversation",method:"POST",path:"/messaging/conversations/"+c("CloseConversation","conversation_id",t.path.conversation_id)+"/close",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async joinGroup(t){return e.send({op:"JoinGroup",method:"POST",path:"/messaging/conversations/"+c("JoinGroup","conversation_id",t.path.conversation_id)+"/join",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async listMembers(t){return e.send({op:"ListMembers",method:"GET",path:"/messaging/conversations/"+c("ListMembers","conversation_id",t.path.conversation_id)+"/members",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async addMembers(t){return e.send({op:"AddMembers",method:"POST",path:"/messaging/conversations/"+c("AddMembers","conversation_id",t.path.conversation_id)+"/members",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeMember(t){return e.send({op:"RemoveMember",method:"DELETE",path:"/messaging/conversations/"+c("RemoveMember","conversation_id",t.path.conversation_id)+"/members/"+c("RemoveMember","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async updateMember(t){return e.send({op:"UpdateMember",method:"PATCH",path:"/messaging/conversations/"+c("UpdateMember","conversation_id",t.path.conversation_id)+"/members/"+c("UpdateMember","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMessages(t){return e.send({op:"ListMessages",method:"GET",path:"/messaging/conversations/"+c("ListMessages","conversation_id",t.path.conversation_id)+"/messages",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async sendMessage(t){return e.send({op:"SendMessage",method:"POST",path:"/messaging/conversations/"+c("SendMessage","conversation_id",t.path.conversation_id)+"/messages",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json",201:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getMessage(t){return e.send({op:"GetMessage",method:"GET",path:"/messaging/conversations/"+c("GetMessage","conversation_id",t.path.conversation_id)+"/messages/"+c("GetMessage","message_id",t.path.message_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async deleteMessage(t){return e.send({op:"DeleteMessage",method:"DELETE",path:"/messaging/conversations/"+c("DeleteMessage","conversation_id",t.path.conversation_id)+"/messages/"+c("DeleteMessage","message_id",t.path.message_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json",204:"empty"},query:t.query,signal:t.signal})},async editMessage(t){return e.send({op:"EditMessage",method:"PATCH",path:"/messaging/conversations/"+c("EditMessage","conversation_id",t.path.conversation_id)+"/messages/"+c("EditMessage","message_id",t.path.message_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async attachmentUrl(t){return e.send({op:"AttachmentURL",method:"GET",path:"/messaging/conversations/"+c("AttachmentURL","conversation_id",t.path.conversation_id)+"/messages/"+c("AttachmentURL","message_id",t.path.message_id)+"/attachments/"+c("AttachmentURL","attachment_id",t.path.attachment_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async react(t){return e.send({op:"React",method:"PUT",path:"/messaging/conversations/"+c("React","conversation_id",t.path.conversation_id)+"/messages/"+c("React","message_id",t.path.message_id)+"/reactions/"+c("React","emoji",t.path.emoji),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async unreact(t){return e.send({op:"Unreact",method:"DELETE",path:"/messaging/conversations/"+c("Unreact","conversation_id",t.path.conversation_id)+"/messages/"+c("Unreact","message_id",t.path.message_id)+"/reactions/"+c("Unreact","emoji",t.path.emoji),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async messageReaders(t){return e.send({op:"MessageReaders",method:"GET",path:"/messaging/conversations/"+c("MessageReaders","conversation_id",t.path.conversation_id)+"/messages/"+c("MessageReaders","message_id",t.path.message_id)+"/readers",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async listReplies(t){return e.send({op:"ListReplies",method:"GET",path:"/messaging/conversations/"+c("ListReplies","conversation_id",t.path.conversation_id)+"/messages/"+c("ListReplies","message_id",t.path.message_id)+"/replies",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async viewOnce(t){return e.send({op:"ViewOnce",method:"POST",path:"/messaging/conversations/"+c("ViewOnce","conversation_id",t.path.conversation_id)+"/messages/"+c("ViewOnce","message_id",t.path.message_id)+"/view",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async setConversationNotifications(t){return e.send({op:"SetConversationNotifications",method:"PUT",path:"/messaging/conversations/"+c("SetConversationNotifications","conversation_id",t.path.conversation_id)+"/notifications",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async reportScreenshot(t){return e.send({op:"ReportScreenshot",method:"POST",path:"/messaging/conversations/"+c("ReportScreenshot","conversation_id",t.path.conversation_id)+"/screenshot",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},signal:t.signal})},async typing(t){return e.send({op:"Typing",method:"POST",path:"/messaging/conversations/"+c("Typing","conversation_id",t.path.conversation_id)+"/typing",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createUpload(t){return e.send({op:"CreateUpload",method:"POST",path:"/messaging/conversations/"+c("CreateUpload","conversation_id",t.path.conversation_id)+"/uploads",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listOpenGroups(t){return e.send({op:"ListOpenGroups",method:"GET",path:"/messaging/groups/open",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getMyProfile(t){return e.send({op:"GetMyProfile",method:"GET",path:"/messaging/me",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async updateMyProfile(t){return e.send({op:"UpdateMyProfile",method:"PATCH",path:"/messaging/me",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async presence(t){return e.send({op:"Presence",method:"POST",path:"/messaging/me/presence",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t?.signal})},async getProfiles(t){return e.send({op:"GetProfiles",method:"GET",path:"/messaging/profiles",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async receipts(t){return e.send({op:"Receipts",method:"POST",path:"/messaging/receipts",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async report(t){return e.send({op:"Report",method:"POST",path:"/messaging/reports",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listScheduled(t){return e.send({op:"ListScheduled",method:"GET",path:"/messaging/scheduled",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async cancelScheduled(t){return e.send({op:"CancelScheduled",method:"DELETE",path:"/messaging/scheduled/"+c("CancelScheduled","scheduled_id",t.path.scheduled_id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async updateScheduled(t){return e.send({op:"UpdateScheduled",method:"PATCH",path:"/messaging/scheduled/"+c("UpdateScheduled","scheduled_id",t.path.scheduled_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async searchMessages(t){return e.send({op:"SearchMessages",method:"GET",path:"/messaging/search",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getSettings(t){return e.send({op:"GetSettings",method:"GET",path:"/messaging/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putSettings(t){return e.send({op:"PutSettings",method:"PUT",path:"/messaging/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rotateHookSecret(t){return e.send({op:"RotateHookSecret",method:"POST",path:"/messaging/settings/hook-secret",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async sync(t){return e.send({op:"Sync",method:"GET",path:"/messaging/sync",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listThreads(t){return e.send({op:"ListThreads",method:"GET",path:"/messaging/threads",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})}}}var No={};wt(No,{client:()=>s$});function s$(e){return{async getDeliverability(t){return e.send({op:"GetDeliverability",method:"GET",path:"/notify/deliverability",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listDevices(t){return e.send({op:"ListDevices",method:"GET",path:"/notify/devices",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async registerDevice(t){return e.send({op:"RegisterDevice",method:"POST",path:"/notify/devices",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getDeviceStats(t){return e.send({op:"GetDeviceStats",method:"GET",path:"/notify/devices/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async deleteMyDevice(t){return e.send({op:"DeleteMyDevice",method:"DELETE",path:"/notify/devices/"+c("DeleteMyDevice","device_id",t.path.device_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async sendEmail(t){return e.send({op:"SendEmail",method:"POST",path:"/notify/email",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listInAppCampaigns(t){return e.send({op:"ListInAppCampaigns",method:"GET",path:"/notify/in-app/campaigns",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createInAppCampaign(t){return e.send({op:"CreateInAppCampaign",method:"POST",path:"/notify/in-app/campaigns",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getInAppCampaign(t){return e.send({op:"GetInAppCampaign",method:"GET",path:"/notify/in-app/campaigns/"+c("GetInAppCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putInAppCampaign(t){return e.send({op:"PutInAppCampaign",method:"PUT",path:"/notify/in-app/campaigns/"+c("PutInAppCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteInAppCampaign(t){return e.send({op:"DeleteInAppCampaign",method:"DELETE",path:"/notify/in-app/campaigns/"+c("DeleteInAppCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async getInAppCampaignStats(t){return e.send({op:"GetInAppCampaignStats",method:"GET",path:"/notify/in-app/campaigns/"+c("GetInAppCampaignStats","id",t.path.id)+"/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async showInAppMessage(t){return e.send({op:"ShowInAppMessage",method:"POST",path:"/notify/in-app/impressions",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async reportInAppEvent(t){return e.send({op:"ReportInAppEvent",method:"POST",path:"/notify/in-app/impressions/"+c("ReportInAppEvent","id",t.path.id)+"/events",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{204:"empty"},idempotent:!0,query:t.query,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMyInAppMessages(t){return e.send({op:"ListMyInAppMessages",method:"GET",path:"/notify/in-app/messages",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listInAppTemplates(t){return e.send({op:"ListInAppTemplates",method:"GET",path:"/notify/in-app/templates",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listMyInbox(t){return e.send({op:"ListMyInbox",method:"GET",path:"/notify/inbox",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async sendInbox(t){return e.send({op:"SendInbox",method:"POST",path:"/notify/inbox",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listInboxMessages(t){return e.send({op:"ListInboxMessages",method:"GET",path:"/notify/inbox/messages",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async readMyInbox(t){return e.send({op:"ReadMyInbox",method:"POST",path:"/notify/inbox/read",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMyInboxMessage(t){return e.send({op:"DeleteMyInboxMessage",method:"DELETE",path:"/notify/inbox/"+c("DeleteMyInboxMessage","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listNotifyMessages(t){return e.send({op:"ListNotifyMessages",method:"GET",path:"/notify/messages",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getNotifyMessage(t){return e.send({op:"GetNotifyMessage",method:"GET",path:"/notify/messages/"+c("GetNotifyMessage","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelMessage(t){return e.send({op:"CancelMessage",method:"POST",path:"/notify/messages/"+c("CancelMessage","id",t.path.id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getMetricsSummary(t){return e.send({op:"GetMetricsSummary",method:"GET",path:"/notify/metrics/summary",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getMyPreferences(t){return e.send({op:"GetMyPreferences",method:"GET",path:"/notify/preferences",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async setMyPreferences(t){return e.send({op:"SetMyPreferences",method:"PUT",path:"/notify/preferences",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listNotifyProviders(t){return e.send({op:"ListNotifyProviders",method:"GET",path:"/notify/providers",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putNotifyProvider(t){return e.send({op:"PutNotifyProvider",method:"PUT",path:"/notify/providers/"+c("PutNotifyProvider","channel",t.path.channel)+"/"+c("PutNotifyProvider","provider",t.path.provider),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteNotifyProvider(t){return e.send({op:"DeleteNotifyProvider",method:"DELETE",path:"/notify/providers/"+c("DeleteNotifyProvider","channel",t.path.channel)+"/"+c("DeleteNotifyProvider","provider",t.path.provider),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async sendPush(t){return e.send({op:"SendPush",method:"POST",path:"/notify/push",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async recordPushReceipts(t){return e.send({op:"RecordPushReceipts",method:"POST",path:"/notify/receipts",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getNotifySettings(t){return e.send({op:"GetNotifySettings",method:"GET",path:"/notify/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putNotifySettings(t){return e.send({op:"PutNotifySettings",method:"PUT",path:"/notify/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sendSms(t){return e.send({op:"SendSMS",method:"POST",path:"/notify/sms",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listEmailTemplates(t){return e.send({op:"ListEmailTemplates",method:"GET",path:"/notify/templates/email",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getEmailTemplate(t){return e.send({op:"GetEmailTemplate",method:"GET",path:"/notify/templates/email/"+c("GetEmailTemplate","slug",t.path.slug)+"/"+c("GetEmailTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putEmailTemplate(t){return e.send({op:"PutEmailTemplate",method:"PUT",path:"/notify/templates/email/"+c("PutEmailTemplate","slug",t.path.slug)+"/"+c("PutEmailTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteEmailTemplate(t){return e.send({op:"DeleteEmailTemplate",method:"DELETE",path:"/notify/templates/email/"+c("DeleteEmailTemplate","slug",t.path.slug)+"/"+c("DeleteEmailTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listPushTemplates(t){return e.send({op:"ListPushTemplates",method:"GET",path:"/notify/templates/push",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getPushTemplate(t){return e.send({op:"GetPushTemplate",method:"GET",path:"/notify/templates/push/"+c("GetPushTemplate","slug",t.path.slug)+"/"+c("GetPushTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putPushTemplate(t){return e.send({op:"PutPushTemplate",method:"PUT",path:"/notify/templates/push/"+c("PutPushTemplate","slug",t.path.slug)+"/"+c("PutPushTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deletePushTemplate(t){return e.send({op:"DeletePushTemplate",method:"DELETE",path:"/notify/templates/push/"+c("DeletePushTemplate","slug",t.path.slug)+"/"+c("DeletePushTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listSmsTemplates(t){return e.send({op:"ListSMSTemplates",method:"GET",path:"/notify/templates/sms",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getSmsTemplate(t){return e.send({op:"GetSMSTemplate",method:"GET",path:"/notify/templates/sms/"+c("GetSMSTemplate","slug",t.path.slug)+"/"+c("GetSMSTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putSmsTemplate(t){return e.send({op:"PutSMSTemplate",method:"PUT",path:"/notify/templates/sms/"+c("PutSMSTemplate","slug",t.path.slug)+"/"+c("PutSMSTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteSmsTemplate(t){return e.send({op:"DeleteSMSTemplate",method:"DELETE",path:"/notify/templates/sms/"+c("DeleteSMSTemplate","slug",t.path.slug)+"/"+c("DeleteSMSTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listWhatsAppTemplates(t){return e.send({op:"ListWhatsAppTemplates",method:"GET",path:"/notify/templates/whatsapp",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getWhatsAppTemplate(t){return e.send({op:"GetWhatsAppTemplate",method:"GET",path:"/notify/templates/whatsapp/"+c("GetWhatsAppTemplate","slug",t.path.slug)+"/"+c("GetWhatsAppTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putWhatsAppTemplate(t){return e.send({op:"PutWhatsAppTemplate",method:"PUT",path:"/notify/templates/whatsapp/"+c("PutWhatsAppTemplate","slug",t.path.slug)+"/"+c("PutWhatsAppTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteWhatsAppTemplate(t){return e.send({op:"DeleteWhatsAppTemplate",method:"DELETE",path:"/notify/templates/whatsapp/"+c("DeleteWhatsAppTemplate","slug",t.path.slug)+"/"+c("DeleteWhatsAppTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listTestUserMessages(t){return e.send({op:"ListTestUserMessages",method:"GET",path:"/notify/test-users/"+c("ListTestUserMessages","user_id",t.path.user_id)+"/messages",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listTopics(t){return e.send({op:"ListTopics",method:"GET",path:"/notify/topics",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createTopic(t){return e.send({op:"CreateTopic",method:"POST",path:"/notify/topics",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteTopic(t){return e.send({op:"DeleteTopic",method:"DELETE",path:"/notify/topics/"+c("DeleteTopic","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async changeTopic(t){return e.send({op:"ChangeTopic",method:"PATCH",path:"/notify/topics/"+c("ChangeTopic","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addTopicSubscribers(t){return e.send({op:"AddTopicSubscribers",method:"POST",path:"/notify/topics/"+c("AddTopicSubscribers","name",t.path.name)+"/subscribers",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeTopicSubscriber(t){return e.send({op:"RemoveTopicSubscriber",method:"DELETE",path:"/notify/topics/"+c("RemoveTopicSubscriber","name",t.path.name)+"/subscribers/"+c("RemoveTopicSubscriber","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async followTopic(t){return e.send({op:"FollowTopic",method:"POST",path:"/notify/topics/"+c("FollowTopic","name",t.path.name)+"/subscription",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async unfollowTopic(t){return e.send({op:"UnfollowTopic",method:"DELETE",path:"/notify/topics/"+c("UnfollowTopic","name",t.path.name)+"/subscription",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listUserDevices(t){return e.send({op:"ListUserDevices",method:"GET",path:"/notify/users/"+c("ListUserDevices","user_id",t.path.user_id)+"/devices",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getUserPreferences(t){return e.send({op:"GetUserPreferences",method:"GET",path:"/notify/users/"+c("GetUserPreferences","user_id",t.path.user_id)+"/preferences",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setUserPreferences(t){return e.send({op:"SetUserPreferences",method:"PUT",path:"/notify/users/"+c("SetUserPreferences","user_id",t.path.user_id)+"/preferences",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async startVerification(t){return e.send({op:"StartVerification",method:"POST",path:"/notify/verifications",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async checkVerification(t){return e.send({op:"CheckVerification",method:"POST",path:"/notify/verifications/check",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async receiveSendGridEvents(t){return e.send({op:"ReceiveSendGridEvents",method:"POST",path:"/notify/webhooks/email/sendgrid",auth:[],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async receiveTwilioStatus(t){return e.send({op:"ReceiveTwilioStatus",method:"POST",path:"/notify/webhooks/sms/twilio",auth:[],answers:{204:"empty"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async receiveTwilioText(t){return e.send({op:"ReceiveTwilioText",method:"POST",path:"/notify/webhooks/sms/twilio/inbound",auth:[],answers:{204:"empty"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async receiveVonageReceiptQuery(t){return e.send({op:"ReceiveVonageReceiptQuery",method:"GET",path:"/notify/webhooks/sms/vonage",auth:[],answers:{204:"empty"},query:t?.query,signal:t?.signal})},async receiveVonageReceipt(t){return e.send({op:"ReceiveVonageReceipt",method:"POST",path:"/notify/webhooks/sms/vonage",auth:[],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async subscribeMetaWebhook(t){return e.send({op:"SubscribeMetaWebhook",method:"GET",path:"/notify/webhooks/whatsapp/meta",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async receiveMetaNotification(t){return e.send({op:"ReceiveMetaNotification",method:"POST",path:"/notify/webhooks/whatsapp/meta",auth:[],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getWebPushStatus(t){return e.send({op:"GetWebPushStatus",method:"GET",path:"/notify/webpush",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getWebPushKey(t){return e.send({op:"GetWebPushKey",method:"GET",path:"/notify/webpush/key",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async sendWhatsApp(t){return e.send({op:"SendWhatsApp",method:"POST",path:"/notify/whatsapp",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listWhatsAppInbound(t){return e.send({op:"ListWhatsAppInbound",method:"GET",path:"/notify/whatsapp/inbound",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})}}}var Mo={};wt(Mo,{client:()=>a$});function a$(e){return{async auditCashFlow(t){return e.send({op:"AuditCashFlow",method:"GET",path:"/payments/audit/cashflow",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async auditDrift(t){return e.send({op:"AuditDrift",method:"GET",path:"/payments/audit/drift",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async auditLedger(t){return e.send({op:"AuditLedger",method:"GET",path:"/payments/audit/ledger",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async exportAuditLedgerCsv(t){return e.send({op:"ExportAuditLedgerCSV",method:"GET",path:"/payments/audit/ledger/export",auth:[["SecretKeyAuth"]],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async providerCallbackGet(t){return e.send({op:"ProviderCallbackGet",method:"GET",path:"/payments/callback/"+c("ProviderCallbackGet","provider",t.path.provider)+"/"+c("ProviderCallbackGet","attempt_id",t.path.attempt_id),auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async providerCallbackPost(t){return e.send({op:"ProviderCallbackPost",method:"POST",path:"/payments/callback/"+c("ProviderCallbackPost","provider",t.path.provider)+"/"+c("ProviderCallbackPost","attempt_id",t.path.attempt_id),auth:[],answers:{200:"raw"},signal:t.signal})},async getCapabilities(t){return e.send({op:"GetCapabilities",method:"GET",path:"/payments/capabilities",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listChannels(t){return e.send({op:"ListChannels",method:"GET",path:"/payments/channels",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async connectChannel(t){return e.send({op:"ConnectChannel",method:"POST",path:"/payments/channels",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createChannelGrant(t){return e.send({op:"CreateChannelGrant",method:"POST",path:"/payments/channels/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChannel(t){return e.send({op:"GetChannel",method:"GET",path:"/payments/channels/"+c("GetChannel","channel_key",t.path.channel_key),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteChannel(t){return e.send({op:"DeleteChannel",method:"DELETE",path:"/payments/channels/"+c("DeleteChannel","channel_key",t.path.channel_key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async checkChannel(t){return e.send({op:"CheckChannel",method:"POST",path:"/payments/channels/"+c("CheckChannel","channel_key",t.path.channel_key)+"/check",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setDefaultChannel(t){return e.send({op:"SetDefaultChannel",method:"POST",path:"/payments/channels/"+c("SetDefaultChannel","channel_key",t.path.channel_key)+"/default",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async connectChannelPage(t){return e.send({op:"ConnectChannelPage",method:"GET",path:"/payments/connect",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async connectChannelSubmit(t){return e.send({op:"ConnectChannelSubmit",method:"POST",path:"/payments/connect",auth:[],answers:{200:"json"},signal:t?.signal})},async listDisputes(t){return e.send({op:"ListDisputes",method:"GET",path:"/payments/disputes",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async lookupInstallments(t){return e.send({op:"LookupInstallments",method:"POST",path:"/payments/installments",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listIntents(t){return e.send({op:"ListIntents",method:"GET",path:"/payments/intents",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createIntent(t){return e.send({op:"CreateIntent",method:"POST",path:"/payments/intents",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getIntent(t){return e.send({op:"GetIntent",method:"GET",path:"/payments/intents/"+c("GetIntent","intent_id",t.path.intent_id),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listIntentAttempts(t){return e.send({op:"ListIntentAttempts",method:"GET",path:"/payments/intents/"+c("ListIntentAttempts","intent_id",t.path.intent_id)+"/attempts",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelIntent(t){return e.send({op:"CancelIntent",method:"POST",path:"/payments/intents/"+c("CancelIntent","intent_id",t.path.intent_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async settlePendingRefund(t){return e.send({op:"SettlePendingRefund",method:"POST",path:"/payments/intents/"+c("SettlePendingRefund","intent_id",t.path.intent_id)+"/pending-refund",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async captureIntent(t){return e.send({op:"CaptureIntent",method:"POST",path:"/payments/intents/"+c("CaptureIntent","intent_id",t.path.intent_id)+"/capture",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async confirmIntent(t){return e.send({op:"ConfirmIntent",method:"POST",path:"/payments/intents/"+c("ConfirmIntent","intent_id",t.path.intent_id)+"/confirm",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async submitIntentOtp(t){return e.send({op:"SubmitIntentOTP",method:"POST",path:"/payments/intents/"+c("SubmitIntentOTP","intent_id",t.path.intent_id)+"/otp",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMyMethods(t){return e.send({op:"ListMyMethods",method:"GET",path:"/payments/me/methods",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async addMyMethod(t){return e.send({op:"AddMyMethod",method:"POST",path:"/payments/me/methods",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async deleteMyMethod(t){return e.send({op:"DeleteMyMethod",method:"DELETE",path:"/payments/me/methods/"+c("DeleteMyMethod","method_id",t.path.method_id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async createMyPortal(t){return e.send({op:"CreateMyPortal",method:"POST",path:"/payments/me/portal",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getMyProfile(t){return e.send({op:"GetMyProfile",method:"GET",path:"/payments/me/profile",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async updateMyProfile(t){return e.send({op:"UpdateMyProfile",method:"PUT",path:"/payments/me/profile",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMySubscriptions(t){return e.send({op:"ListMySubscriptions",method:"GET",path:"/payments/me/subscriptions",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async cancelMySubscription(t){return e.send({op:"CancelMySubscription",method:"POST",path:"/payments/me/subscriptions/"+c("CancelMySubscription","subscription_id",t.path.subscription_id)+"/cancel",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async listMyWallets(t){return e.send({op:"ListMyWallets",method:"GET",path:"/payments/me/wallets",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async createMySpendToken(t){return e.send({op:"CreateMySpendToken",method:"POST",path:"/payments/me/wallets/spend-tokens",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async topUpMyWallet(t){return e.send({op:"TopUpMyWallet",method:"POST",path:"/payments/me/wallets/top-up",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listRefunds(t){return e.send({op:"ListRefunds",method:"GET",path:"/payments/refunds",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createRefund(t){return e.send({op:"CreateRefund",method:"POST",path:"/payments/refunds",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listRoutingRules(t){return e.send({op:"ListRoutingRules",method:"GET",path:"/payments/routing-rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async replaceRoutingRules(t){return e.send({op:"ReplaceRoutingRules",method:"PUT",path:"/payments/routing-rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSellerAccount(t){return e.send({op:"GetSellerAccount",method:"GET",path:"/payments/seller-accounts/"+c("GetSellerAccount","seller_ref",t.path.seller_ref),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listSellerLedger(t){return e.send({op:"ListSellerLedger",method:"GET",path:"/payments/seller-accounts/"+c("ListSellerLedger","seller_ref",t.path.seller_ref)+"/ledger",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getSettings(t){return e.send({op:"GetSettings",method:"GET",path:"/payments/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async updateSettings(t){return e.send({op:"UpdateSettings",method:"PUT",path:"/payments/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPaymentSplits(t){return e.send({op:"ListPaymentSplits",method:"GET",path:"/payments/splits",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async updatePaymentSplit(t){return e.send({op:"UpdatePaymentSplit",method:"PUT",path:"/payments/splits/"+c("UpdatePaymentSplit","split_id",t.path.split_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async approvePaymentSplit(t){return e.send({op:"ApprovePaymentSplit",method:"POST",path:"/payments/splits/"+c("ApprovePaymentSplit","split_id",t.path.split_id)+"/approve",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async disapprovePaymentSplit(t){return e.send({op:"DisapprovePaymentSplit",method:"POST",path:"/payments/splits/"+c("DisapprovePaymentSplit","split_id",t.path.split_id)+"/disapprove",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async refundPaymentSplit(t){return e.send({op:"RefundPaymentSplit",method:"POST",path:"/payments/splits/"+c("RefundPaymentSplit","split_id",t.path.split_id)+"/refund",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stripeAppCallback(t){return e.send({op:"StripeAppCallback",method:"GET",path:"/payments/stripe/app/callback",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async createStripeAppGrant(t){return e.send({op:"CreateStripeAppGrant",method:"POST",path:"/payments/stripe/app/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async stripeAppInstallPage(t){return e.send({op:"StripeAppInstallPage",method:"GET",path:"/payments/stripe/app/install",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async stripeAppInstallStart(t){return e.send({op:"StripeAppInstallStart",method:"POST",path:"/payments/stripe/app/install",auth:[],answers:{303:"redirect"},signal:t?.signal})},async listSubMerchants(t){return e.send({op:"ListSubMerchants",method:"GET",path:"/payments/sub-merchants",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async upsertSubMerchant(t){return e.send({op:"UpsertSubMerchant",method:"POST",path:"/payments/sub-merchants",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSubMerchant(t){return e.send({op:"GetSubMerchant",method:"GET",path:"/payments/sub-merchants/"+c("GetSubMerchant","sub_merchant_id",t.path.sub_merchant_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createSubMerchantOnboardingLink(t){return e.send({op:"CreateSubMerchantOnboardingLink",method:"POST",path:"/payments/sub-merchants/"+c("CreateSubMerchantOnboardingLink","sub_merchant_id",t.path.sub_merchant_id)+"/onboarding-link",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async syncSubMerchant(t){return e.send({op:"SyncSubMerchant",method:"POST",path:"/payments/sub-merchants/"+c("SyncSubMerchant","sub_merchant_id",t.path.sub_merchant_id)+"/sync",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listSubscriptions(t){return e.send({op:"ListSubscriptions",method:"GET",path:"/payments/subscriptions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createSubscription(t){return e.send({op:"CreateSubscription",method:"POST",path:"/payments/subscriptions",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async cancelSubscription(t){return e.send({op:"CancelSubscription",method:"POST",path:"/payments/subscriptions/"+c("CancelSubscription","subscription_id",t.path.subscription_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async extendSubscription(t){return e.send({op:"ExtendSubscription",method:"POST",path:"/payments/subscriptions/"+c("ExtendSubscription","subscription_id",t.path.subscription_id)+"/extend",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listWallets(t){return e.send({op:"ListWallets",method:"GET",path:"/payments/wallets",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async upsertWallet(t){return e.send({op:"UpsertWallet",method:"POST",path:"/payments/wallets",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async chargeWallet(t){return e.send({op:"ChargeWallet",method:"POST",path:"/payments/wallets/charge",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async creditWallet(t){return e.send({op:"CreditWallet",method:"POST",path:"/payments/wallets/credit",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCustomerWallets(t){return e.send({op:"GetCustomerWallets",method:"GET",path:"/payments/wallets/customers/"+c("GetCustomerWallets","customer_id",t.path.customer_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async freezeWallet(t){return e.send({op:"FreezeWallet",method:"PUT",path:"/payments/wallets/customers/"+c("FreezeWallet","customer_id",t.path.customer_id)+"/"+c("FreezeWallet","wallet_key",t.path.wallet_key)+"/freeze",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createWalletHold(t){return e.send({op:"CreateWalletHold",method:"POST",path:"/payments/wallets/holds",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async commitWalletHold(t){return e.send({op:"CommitWalletHold",method:"POST",path:"/payments/wallets/holds/"+c("CommitWalletHold","hold_id",t.path.hold_id)+"/commit",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async releaseWalletHold(t){return e.send({op:"ReleaseWalletHold",method:"POST",path:"/payments/wallets/holds/"+c("ReleaseWalletHold","hold_id",t.path.hold_id)+"/release",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async voidPendingWalletCredits(t){return e.send({op:"VoidPendingWalletCredits",method:"POST",path:"/payments/wallets/pending/void",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async transferWallet(t){return e.send({op:"TransferWallet",method:"POST",path:"/payments/wallets/transfer",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async iyzicoWebhook(t){return e.send({op:"IyzicoWebhook",method:"POST",path:"/payments/webhooks/iyzico",auth:[],answers:{200:"empty"},signal:t?.signal})},async stripeWebhook(t){return e.send({op:"StripeWebhook",method:"POST",path:"/payments/webhooks/stripe",auth:[],answers:{200:"empty"},signal:t?.signal})},async stripeAppWebhook(t){return e.send({op:"StripeAppWebhook",method:"POST",path:"/payments/webhooks/stripe-app",auth:[],answers:{200:"empty"},signal:t?.signal})},async stripeConnectWebhook(t){return e.send({op:"StripeConnectWebhook",method:"POST",path:"/payments/webhooks/stripe/connect",auth:[],answers:{200:"empty"},signal:t?.signal})}}}var Do={};wt(Do,{client:()=>o$});function o$(e){return{async broadcast(t){return e.send({op:"Broadcast",method:"POST",path:"/realtime/broadcast",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChannels(t){return e.send({op:"GetChannels",method:"GET",path:"/realtime/channels",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putChannels(t){return e.send({op:"PutChannels",method:"PUT",path:"/realtime/channels",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getLimits(t){return e.send({op:"GetLimits",method:"GET",path:"/realtime/limits",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putLimits(t){return e.send({op:"PutLimits",method:"PUT",path:"/realtime/limits",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revalidate(t){return e.send({op:"Revalidate",method:"POST",path:"/realtime/revalidate",auth:[["SecretKeyAuth"]],answers:{202:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async writeState(t){return e.send({op:"WriteState",method:"POST",path:"/realtime/state",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getStats(t){return e.send({op:"GetStats",method:"GET",path:"/realtime/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})}}}var zo={};wt(zo,{client:()=>i$});function i$(e){return{async listSecretAudit(t){return e.send({op:"ListSecretAudit",method:"GET",path:"/secrets/audit",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listFieldKeys(t){return e.send({op:"ListFieldKeys",method:"GET",path:"/secrets/fields",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getFieldKeys(t){return e.send({op:"GetFieldKeys",method:"GET",path:"/secrets/fields/keys",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async openFields(t){return e.send({op:"OpenFields",method:"POST",path:"/secrets/fields/open",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sealPlaceholder(t){return e.send({op:"SealPlaceholder",method:"POST",path:"/secrets/fields/placeholder",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rotateFieldKeys(t){return e.send({op:"RotateFieldKeys",method:"POST",path:"/secrets/fields/rotate",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async listTransitKeys(t){return e.send({op:"ListTransitKeys",method:"GET",path:"/secrets/transit",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getTransitKeys(t){return e.send({op:"GetTransitKeys",method:"GET",path:"/secrets/transit/keys",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getTransitPublicKeys(t){return e.send({op:"GetTransitPublicKeys",method:"GET",path:"/secrets/transit/public",auth:[["ApiKeyAuth"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async rotateTransitKeys(t){return e.send({op:"RotateTransitKeys",method:"POST",path:"/secrets/transit/rotate",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t?.headers,body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async retireTransitKey(t){return e.send({op:"RetireTransitKey",method:"POST",path:"/secrets/transit/"+c("RetireTransitKey","kid",t.path.kid)+"/retire",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async listSecrets(t){return e.send({op:"ListSecrets",method:"GET",path:"/secrets/"+c("ListSecrets","environment",t.path.environment),auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getEnvironmentValues(t){return e.send({op:"GetEnvironmentValues",method:"GET",path:"/secrets/"+c("GetEnvironmentValues","environment",t.path.environment)+"/values",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getSecret(t){return e.send({op:"GetSecret",method:"GET",path:"/secrets/"+c("GetSecret","environment",t.path.environment)+"/"+c("GetSecret","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putSecret(t){return e.send({op:"PutSecret",method:"PUT",path:"/secrets/"+c("PutSecret","environment",t.path.environment)+"/"+c("PutSecret","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteSecret(t){return e.send({op:"DeleteSecret",method:"DELETE",path:"/secrets/"+c("DeleteSecret","environment",t.path.environment)+"/"+c("DeleteSecret","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async rollbackSecret(t){return e.send({op:"RollbackSecret",method:"POST",path:"/secrets/"+c("RollbackSecret","environment",t.path.environment)+"/"+c("RollbackSecret","name",t.path.name)+"/rollback",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSecretVersions(t){return e.send({op:"ListSecretVersions",method:"GET",path:"/secrets/"+c("ListSecretVersions","environment",t.path.environment)+"/"+c("ListSecretVersions","name",t.path.name)+"/versions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})}}}var qo={};wt(qo,{client:()=>r$});function r$(e){return{async listBuckets(t){return e.send({op:"ListBuckets",method:"GET",path:"/storage/buckets",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getBucket(t){return e.send({op:"GetBucket",method:"GET",path:"/storage/buckets/"+c("GetBucket","bucket",t.path.bucket),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putBucket(t){return e.send({op:"PutBucket",method:"PUT",path:"/storage/buckets/"+c("PutBucket","bucket",t.path.bucket),auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteBucket(t){return e.send({op:"DeleteBucket",method:"DELETE",path:"/storage/buckets/"+c("DeleteBucket","bucket",t.path.bucket),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async copyObject(t){return e.send({op:"CopyObject",method:"POST",path:"/storage/buckets/"+c("CopyObject","bucket",t.path.bucket)+"/copy",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async moveObject(t){return e.send({op:"MoveObject",method:"POST",path:"/storage/buckets/"+c("MoveObject","bucket",t.path.bucket)+"/move",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listObjects(t){return e.send({op:"ListObjects",method:"GET",path:"/storage/buckets/"+c("ListObjects","bucket",t.path.bucket)+"/objects",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getObject(t){return e.send({op:"GetObject",method:"GET",path:"/storage/buckets/"+c("GetObject","bucket",t.path.bucket)+"/objects/"+c("GetObject","path",t.path.path),auth:[["SecretKeyAuth"]],answers:{200:"raw",206:"raw",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async putObject(t){return e.send({op:"PutObject",method:"PUT",path:"/storage/buckets/"+c("PutObject","bucket",t.path.bucket)+"/objects/"+c("PutObject","path",t.path.path),auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},query:t.query,headers:t.headers,body:{kind:"raw",contentType:t.contentType??"application/octet-stream",value:t.body},signal:t.signal})},async deleteObject(t){return e.send({op:"DeleteObject",method:"DELETE",path:"/storage/buckets/"+c("DeleteObject","bucket",t.path.bucket)+"/objects/"+c("DeleteObject","path",t.path.path),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async headObject(t){return e.send({op:"HeadObject",method:"HEAD",path:"/storage/buckets/"+c("HeadObject","bucket",t.path.bucket)+"/objects/"+c("HeadObject","path",t.path.path),auth:[["SecretKeyAuth"]],answers:{200:"empty",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async createSignedUrl(t){return e.send({op:"CreateSignedUrl",method:"POST",path:"/storage/buckets/"+c("CreateSignedUrl","bucket",t.path.bucket)+"/signed-urls",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createUploadUrl(t){return e.send({op:"CreateUploadUrl",method:"POST",path:"/storage/buckets/"+c("CreateUploadUrl","bucket",t.path.bucket)+"/upload-urls",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPublicObject(t){return e.send({op:"GetPublicObject",method:"GET",path:"/storage/public/"+c("GetPublicObject","bucket",t.path.bucket)+"/"+c("GetPublicObject","path",t.path.path),auth:[],answers:{200:"raw",206:"raw",302:"redirect",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async headPublicObject(t){return e.send({op:"HeadPublicObject",method:"HEAD",path:"/storage/public/"+c("HeadPublicObject","bucket",t.path.bucket)+"/"+c("HeadPublicObject","path",t.path.path),auth:[],answers:{200:"empty",302:"redirect",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async getSignedObject(t){return e.send({op:"GetSignedObject",method:"GET",path:"/storage/signed/"+c("GetSignedObject","bucket",t.path.bucket)+"/"+c("GetSignedObject","path",t.path.path),auth:[],answers:{200:"raw",206:"raw",302:"redirect",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async putSignedObject(t){return e.send({op:"PutSignedObject",method:"PUT",path:"/storage/signed/"+c("PutSignedObject","bucket",t.path.bucket)+"/"+c("PutSignedObject","path",t.path.path),auth:[],answers:{200:"json",201:"json"},query:t.query,headers:t.headers,body:{kind:"raw",contentType:t.contentType??"application/octet-stream",value:t.body},signal:t.signal})},async headSignedObject(t){return e.send({op:"HeadSignedObject",method:"HEAD",path:"/storage/signed/"+c("HeadSignedObject","bucket",t.path.bucket)+"/"+c("HeadSignedObject","path",t.path.path),auth:[],answers:{200:"empty",302:"redirect",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async getStorageStats(t){return e.send({op:"GetStorageStats",method:"GET",path:"/storage/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async upload(t){return e.send({op:"Upload",method:"POST",path:"/storage/upload/"+c("Upload","machine",t.path.machine)+"/"+c("Upload","route",t.path.route),auth:[["ApiKeyAuth","userJWT"],["ApiKeyAuth"]],answers:{},body:{kind:"raw",contentType:t.contentType??"multipart/form-data",value:t.body},signal:t.signal})}}}var Go={};wt(Go,{client:()=>l$});function l$(e){return{async listActions(t){return e.send({op:"ListActions",method:"GET",path:"/stores/actions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getAction(t){return e.send({op:"GetAction",method:"GET",path:"/stores/actions/"+c("GetAction","action_id",t.path.action_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async confirmAction(t){return e.send({op:"ConfirmAction",method:"POST",path:"/stores/actions/"+c("ConfirmAction","action_id",t.path.action_id)+"/confirm",auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async declineAction(t){return e.send({op:"DeclineAction",method:"POST",path:"/stores/actions/"+c("DeclineAction","action_id",t.path.action_id)+"/decline",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async getAppleAccount(t){return e.send({op:"GetAppleAccount",method:"GET",path:"/stores/apple",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async disconnectApple(t){return e.send({op:"DisconnectApple",method:"DELETE",path:"/stores/apple",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async checkAppleAccount(t){return e.send({op:"CheckAppleAccount",method:"POST",path:"/stores/apple/check",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async createAppleGrant(t){return e.send({op:"CreateAppleGrant",method:"POST",path:"/stores/apple/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getSandboxReadiness(t){return e.send({op:"GetSandboxReadiness",method:"GET",path:"/stores/apple/readiness",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listSandboxTesters(t){return e.send({op:"ListSandboxTesters",method:"GET",path:"/stores/apple/sandbox-testers",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async clearSandboxPurchaseHistory(t){return e.send({op:"ClearSandboxPurchaseHistory",method:"POST",path:"/stores/apple/sandbox-testers/clear-purchase-history",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateSandboxTester(t){return e.send({op:"UpdateSandboxTester",method:"PATCH",path:"/stores/apple/sandbox-testers/"+c("UpdateSandboxTester","tester_id",t.path.tester_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listApps(t){return e.send({op:"ListApps",method:"GET",path:"/stores/apps",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listFeedback(t){return e.send({op:"ListFeedback",method:"GET",path:"/stores/apps/"+c("ListFeedback","app_id",t.path.app_id)+"/feedback",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getFeedback(t){return e.send({op:"GetFeedback",method:"GET",path:"/stores/apps/"+c("GetFeedback","app_id",t.path.app_id)+"/feedback/"+c("GetFeedback","kind",t.path.kind)+"/"+c("GetFeedback","feedback_id",t.path.feedback_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listGroups(t){return e.send({op:"ListGroups",method:"GET",path:"/stores/apps/"+c("ListGroups","app_id",t.path.app_id)+"/groups",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createGroup(t){return e.send({op:"CreateGroup",method:"POST",path:"/stores/apps/"+c("CreateGroup","app_id",t.path.app_id)+"/groups",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async linkApp(t){return e.send({op:"LinkApp",method:"POST",path:"/stores/apps/"+c("LinkApp","app_id",t.path.app_id)+"/link",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getListing(t){return e.send({op:"GetListing",method:"GET",path:"/stores/apps/"+c("GetListing","app_id",t.path.app_id)+"/listing",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setListing(t){return e.send({op:"SetListing",method:"PUT",path:"/stores/apps/"+c("SetListing","app_id",t.path.app_id)+"/listing",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async planListing(t){return e.send({op:"PlanListing",method:"POST",path:"/stores/apps/"+c("PlanListing","app_id",t.path.app_id)+"/listing/plan",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async createPackage(t){return e.send({op:"CreatePackage",method:"POST",path:"/stores/apps/"+c("CreatePackage","app_id",t.path.app_id)+"/packages",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async uploadScreenshot(t){return e.send({op:"UploadScreenshot",method:"PUT",path:"/stores/apps/"+c("UploadScreenshot","app_id",t.path.app_id)+"/screenshots",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,query:t.query,headers:t.headers,body:{kind:"raw",contentType:t.contentType??"image/png",value:t.body},signal:t.signal})},async getReviewInfo(t){return e.send({op:"GetReviewInfo",method:"GET",path:"/stores/apps/"+c("GetReviewInfo","app_id",t.path.app_id)+"/testflight/review-info",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async setReviewInfo(t){return e.send({op:"SetReviewInfo",method:"PUT",path:"/stores/apps/"+c("SetReviewInfo","app_id",t.path.app_id)+"/testflight/review-info",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getUploadKey(t){return e.send({op:"GetUploadKey",method:"GET",path:"/stores/apps/"+c("GetUploadKey","app_id",t.path.app_id)+"/upload-key",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getAppStoreVersion(t){return e.send({op:"GetAppStoreVersion",method:"GET",path:"/stores/apps/"+c("GetAppStoreVersion","app_id",t.path.app_id)+"/version",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async prepareAppStoreVersion(t){return e.send({op:"PrepareAppStoreVersion",method:"PUT",path:"/stores/apps/"+c("PrepareAppStoreVersion","app_id",t.path.app_id)+"/version",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async planPhasedRelease(t){return e.send({op:"PlanPhasedRelease",method:"POST",path:"/stores/apps/"+c("PlanPhasedRelease","app_id",t.path.app_id)+"/version/phased-release",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async planReleaseVersion(t){return e.send({op:"PlanReleaseVersion",method:"POST",path:"/stores/apps/"+c("PlanReleaseVersion","app_id",t.path.app_id)+"/version/release",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async planSubmitReview(t){return e.send({op:"PlanSubmitReview",method:"POST",path:"/stores/apps/"+c("PlanSubmitReview","app_id",t.path.app_id)+"/version/submit",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async planWithdrawReview(t){return e.send({op:"PlanWithdrawReview",method:"POST",path:"/stores/apps/"+c("PlanWithdrawReview","app_id",t.path.app_id)+"/version/withdraw",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async getAppVitals(t){return e.send({op:"GetAppVitals",method:"GET",path:"/stores/apps/"+c("GetAppVitals","app_id",t.path.app_id)+"/vitals",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getAppWebhook(t){return e.send({op:"GetAppWebhook",method:"GET",path:"/stores/apps/"+c("GetAppWebhook","app_id",t.path.app_id)+"/webhook",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async makeAppWebhook(t){return e.send({op:"MakeAppWebhook",method:"POST",path:"/stores/apps/"+c("MakeAppWebhook","app_id",t.path.app_id)+"/webhook",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async pingAppWebhook(t){return e.send({op:"PingAppWebhook",method:"POST",path:"/stores/apps/"+c("PingAppWebhook","app_id",t.path.app_id)+"/webhook/ping",auth:[["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async downloadSignedBundle(t){return e.send({op:"DownloadSignedBundle",method:"GET",path:"/stores/bundles",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async getConnectPage(t){return e.send({op:"GetConnectPage",method:"GET",path:"/stores/connect",auth:[],answers:{200:"raw"},signal:t?.signal})},async connectAppleKey(t){return e.send({op:"ConnectAppleKey",method:"POST",path:"/stores/connect",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getGoogleAccount(t){return e.send({op:"GetGoogleAccount",method:"GET",path:"/stores/google",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async connectGoogle(t){return e.send({op:"ConnectGoogle",method:"POST",path:"/stores/google",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async disconnectGoogle(t){return e.send({op:"DisconnectGoogle",method:"DELETE",path:"/stores/google",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async checkGoogleAccount(t){return e.send({op:"CheckGoogleAccount",method:"POST",path:"/stores/google/check",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async deleteGroup(t){return e.send({op:"DeleteGroup",method:"DELETE",path:"/stores/groups/"+c("DeleteGroup","group_id",t.path.group_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async renameGroup(t){return e.send({op:"RenameGroup",method:"PATCH",path:"/stores/groups/"+c("RenameGroup","group_id",t.path.group_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addGroupBuild(t){return e.send({op:"AddGroupBuild",method:"POST",path:"/stores/groups/"+c("AddGroupBuild","group_id",t.path.group_id)+"/builds",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTesters(t){return e.send({op:"ListTesters",method:"GET",path:"/stores/groups/"+c("ListTesters","group_id",t.path.group_id)+"/testers",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setTesters(t){return e.send({op:"SetTesters",method:"PUT",path:"/stores/groups/"+c("SetTesters","group_id",t.path.group_id)+"/testers",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPackages(t){return e.send({op:"ListPackages",method:"GET",path:"/stores/packages",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getPackage(t){return e.send({op:"GetPackage",method:"GET",path:"/stores/packages/"+c("GetPackage","package_id",t.path.package_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async uploadArtifact(t){return e.send({op:"UploadArtifact",method:"PUT",path:"/stores/packages/"+c("UploadArtifact","package_id",t.path.package_id)+"/artifact",auth:[],answers:{200:"json"},headers:t.headers,body:{kind:"raw",contentType:t.contentType??"application/octet-stream",value:t.body},signal:t.signal})},async planBetaReview(t){return e.send({op:"PlanBetaReview",method:"POST",path:"/stores/packages/"+c("PlanBetaReview","package_id",t.path.package_id)+"/beta-review",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async listDeliveries(t){return e.send({op:"ListDeliveries",method:"GET",path:"/stores/packages/"+c("ListDeliveries","package_id",t.path.package_id)+"/deliveries",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deliver(t){return e.send({op:"Deliver",method:"POST",path:"/stores/packages/"+c("Deliver","package_id",t.path.package_id)+"/deliveries",auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSignedBundleLink(t){return e.send({op:"GetSignedBundleLink",method:"POST",path:"/stores/packages/"+c("GetSignedBundleLink","package_id",t.path.package_id)+"/deliveries/"+c("GetSignedBundleLink","channel",t.path.channel)+"/bundle-link",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async planExpire(t){return e.send({op:"PlanExpire",method:"POST",path:"/stores/packages/"+c("PlanExpire","package_id",t.path.package_id)+"/expire",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async planExportCompliance(t){return e.send({op:"PlanExportCompliance",method:"POST",path:"/stores/packages/"+c("PlanExportCompliance","package_id",t.path.package_id)+"/export-compliance",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async setWhatToTest(t){return e.send({op:"SetWhatToTest",method:"PUT",path:"/stores/packages/"+c("SetWhatToTest","package_id",t.path.package_id)+"/what-to-test",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async takeAppleWebhook(t){return e.send({op:"TakeAppleWebhook",method:"POST",path:"/stores/webhooks/apple/"+c("TakeAppleWebhook","app_id",t.path.app_id),auth:[],answers:{200:"empty"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getAppleSession(t){return e.send({op:"GetAppleSession",method:"GET",path:"/stores/apple/session",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async disconnectAppleSession(t){return e.send({op:"DisconnectAppleSession",method:"DELETE",path:"/stores/apple/session",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async checkAppleSession(t){return e.send({op:"CheckAppleSession",method:"POST",path:"/stores/apple/session/check",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async createAppleIdGrant(t){return e.send({op:"CreateAppleIDGrant",method:"POST",path:"/stores/apple/session/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getAppleIdPage(t){return e.send({op:"GetAppleIDPage",method:"GET",path:"/stores/connect/apple-id",auth:[],answers:{200:"raw"},signal:t?.signal})},async signInAppleId(t){return e.send({op:"SignInAppleID",method:"POST",path:"/stores/connect/apple-id",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async submitAppleIdCode(t){return e.send({op:"SubmitAppleIDCode",method:"POST",path:"/stores/connect/apple-id/code",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async chooseAppleIdTeam(t){return e.send({op:"ChooseAppleIDTeam",method:"POST",path:"/stores/connect/apple-id/team",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getAppReview(t){return e.send({op:"GetAppReview",method:"GET",path:"/stores/apps/"+c("GetAppReview","app_id",t.path.app_id)+"/review",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getReviewAttachment(t){return e.send({op:"GetReviewAttachment",method:"GET",path:"/stores/apps/"+c("GetReviewAttachment","app_id",t.path.app_id)+"/review/threads/"+c("GetReviewAttachment","thread_id",t.path.thread_id)+"/attachments/"+c("GetReviewAttachment","attachment_id",t.path.attachment_id),auth:[["SecretKeyAuth"]],answers:{200:"raw"},signal:t.signal})},async setReviewDraft(t){return e.send({op:"SetReviewDraft",method:"PUT",path:"/stores/apps/"+c("SetReviewDraft","app_id",t.path.app_id)+"/review/threads/"+c("SetReviewDraft","thread_id",t.path.thread_id)+"/draft",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sendReviewDraft(t){return e.send({op:"SendReviewDraft",method:"POST",path:"/stores/apps/"+c("SendReviewDraft","app_id",t.path.app_id)+"/review/threads/"+c("SendReviewDraft","thread_id",t.path.thread_id)+"/draft/send",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async getAppPrivacy(t){return e.send({op:"GetAppPrivacy",method:"GET",path:"/stores/apps/"+c("GetAppPrivacy","app_id",t.path.app_id)+"/privacy",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setAppPrivacy(t){return e.send({op:"SetAppPrivacy",method:"PUT",path:"/stores/apps/"+c("SetAppPrivacy","app_id",t.path.app_id)+"/privacy",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async makeAppRecord(t){return e.send({op:"MakeAppRecord",method:"POST",path:"/stores/apps/"+c("MakeAppRecord","app_id",t.path.app_id)+"/record",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeAppRecord(t){return e.send({op:"RemoveAppRecord",method:"DELETE",path:"/stores/apps/"+c("RemoveAppRecord","app_id",t.path.app_id)+"/record",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listMadeAppleKeys(t){return e.send({op:"ListMadeAppleKeys",method:"GET",path:"/stores/apple/keys",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async makeAppleKey(t){return e.send({op:"MakeAppleKey",method:"POST",path:"/stores/apple/keys",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revokeMadeAppleKey(t){return e.send({op:"RevokeMadeAppleKey",method:"DELETE",path:"/stores/apple/keys/"+c("RevokeMadeAppleKey","key_id",t.path.key_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async shareAppleSession(t){return e.send({op:"ShareAppleSession",method:"PUT",path:"/stores/apple/session/shares/"+c("ShareAppleSession","environment",t.path.environment),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async unshareAppleSession(t){return e.send({op:"UnshareAppleSession",method:"DELETE",path:"/stores/apple/session/shares/"+c("UnshareAppleSession","environment",t.path.environment),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async getInstallPage(t){return e.send({op:"GetInstallPage",method:"GET",path:"/stores/install",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async getInstallStatus(t){return e.send({op:"GetInstallStatus",method:"GET",path:"/stores/install/status",auth:[],answers:{200:"json"},query:t.query,signal:t.signal})},async retryInstall(t){return e.send({op:"RetryInstall",method:"POST",path:"/stores/install/retry",auth:[],answers:{204:"empty"},query:t.query,signal:t.signal})},async getInstallEnrollment(t){return e.send({op:"GetInstallEnrollment",method:"GET",path:"/stores/install/enroll",auth:[],answers:{200:"raw",303:"redirect"},query:t.query,signal:t.signal})},async registerInstallDevice(t){return e.send({op:"RegisterInstallDevice",method:"POST",path:"/stores/install/device",auth:[],answers:{200:"raw",301:"redirect"},query:t.query,body:{kind:"raw",contentType:t.contentType??"application/pkcs7-signature",value:t.body},signal:t.signal})},async getInstallManifest(t){return e.send({op:"GetInstallManifest",method:"GET",path:"/stores/install/manifest",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async getInstallBuild(t){return e.send({op:"GetInstallBuild",method:"GET",path:"/stores/install/app",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async headInstallBuild(t){return e.send({op:"HeadInstallBuild",method:"HEAD",path:"/stores/install/app",auth:[],answers:{200:"empty"},query:t.query,signal:t.signal})},async getInstallIcon(t){return e.send({op:"GetInstallIcon",method:"GET",path:"/stores/install/icon",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async listInvitations(t){return e.send({op:"ListInvitations",method:"GET",path:"/stores/packages/"+c("ListInvitations","package_id",t.path.package_id)+"/invitations",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async invitePerson(t){return e.send({op:"InvitePerson",method:"POST",path:"/stores/packages/"+c("InvitePerson","package_id",t.path.package_id)+"/invitations",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revokeInvitation(t){return e.send({op:"RevokeInvitation",method:"DELETE",path:"/stores/invitations/"+c("RevokeInvitation","invitation_id",t.path.invitation_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listDevices(t){return e.send({op:"ListDevices",method:"GET",path:"/stores/devices",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})}}}var rr={};wt(rr,{client:()=>p$});function p$(e){return{async listWorkspaces(t){return e.send({op:"ListWorkspaces",method:"GET",path:"/workspaces",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createWorkspace(t){return e.send({op:"CreateWorkspace",method:"POST",path:"/workspaces",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async testWorkspaceByos(t){return e.send({op:"TestWorkspaceBYOS",method:"POST",path:"/workspaces/byos/test",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listProjectS3Keys(t){return e.send({op:"ListProjectS3Keys",method:"GET",path:"/workspaces/s3-keys",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createProjectS3Key(t){return e.send({op:"CreateProjectS3Key",method:"POST",path:"/workspaces/s3-keys",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async deleteProjectS3Key(t){return e.send({op:"DeleteProjectS3Key",method:"DELETE",path:"/workspaces/s3-keys/"+c("DeleteProjectS3Key","token_id",t.path.token_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async getWorkspace(t){return e.send({op:"GetWorkspace",method:"GET",path:"/workspaces/"+c("GetWorkspace","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteWorkspace(t){return e.send({op:"DeleteWorkspace",method:"DELETE",path:"/workspaces/"+c("DeleteWorkspace","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},query:t.query,signal:t.signal})},async updateWorkspaceStorage(t){return e.send({op:"UpdateWorkspaceStorage",method:"PUT",path:"/workspaces/"+c("UpdateWorkspaceStorage","id",t.path.id)+"/storage",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getWorkspaceFiles(t){return e.send({op:"GetWorkspaceFiles",method:"GET",path:"/workspaces/"+c("GetWorkspaceFiles","id",t.path.id)+"/files",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async putWorkspaceFile(t){return e.send({op:"PutWorkspaceFile",method:"PUT",path:"/workspaces/"+c("PutWorkspaceFile","id",t.path.id)+"/files",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,body:{kind:"raw",contentType:t.contentType??"application/octet-stream",value:t.body},signal:t.signal})},async deleteWorkspaceFile(t){return e.send({op:"DeleteWorkspaceFile",method:"DELETE",path:"/workspaces/"+c("DeleteWorkspaceFile","id",t.path.id)+"/files",auth:[["SecretKeyAuth"]],answers:{204:"empty"},query:t.query,signal:t.signal})},async listWorkspaceTokens(t){return e.send({op:"ListWorkspaceTokens",method:"GET",path:"/workspaces/"+c("ListWorkspaceTokens","id",t.path.id)+"/tokens",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async createWorkspaceToken(t){return e.send({op:"CreateWorkspaceToken",method:"POST",path:"/workspaces/"+c("CreateWorkspaceToken","id",t.path.id)+"/tokens",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteWorkspaceToken(t){return e.send({op:"DeleteWorkspaceToken",method:"DELETE",path:"/workspaces/"+c("DeleteWorkspaceToken","id",t.path.id)+"/tokens/"+c("DeleteWorkspaceToken","token_id",t.path.token_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listWorkspaceLocks(t){return e.send({op:"ListWorkspaceLocks",method:"GET",path:"/workspaces/"+c("ListWorkspaceLocks","id",t.path.id)+"/locks",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async acquireWorkspaceLock(t){return e.send({op:"AcquireWorkspaceLock",method:"POST",path:"/workspaces/"+c("AcquireWorkspaceLock","id",t.path.id)+"/locks",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async releaseWorkspaceLock(t){return e.send({op:"ReleaseWorkspaceLock",method:"DELETE",path:"/workspaces/"+c("ReleaseWorkspaceLock","id",t.path.id)+"/locks",auth:[["SecretKeyAuth"]],answers:{204:"empty"},query:t.query,signal:t.signal})},async getSyncHead(t){return e.send({op:"GetSyncHead",method:"GET",path:"/workspaces/sync/head",auth:[],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getSyncChanges(t){return e.send({op:"GetSyncChanges",method:"GET",path:"/workspaces/sync/changes",auth:[],answers:{200:"json"},query:t?.query,signal:t?.signal})},async publishSyncChanges(t){return e.send({op:"PublishSyncChanges",method:"POST",path:"/workspaces/sync/publish",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async requestSyncUploadGrants(t){return e.send({op:"RequestSyncUploadGrants",method:"POST",path:"/workspaces/sync/blobs/upload-grants",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async requestSyncDownloadGrants(t){return e.send({op:"RequestSyncDownloadGrants",method:"POST",path:"/workspaces/sync/blobs/download-grants",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async downloadSignedSyncBlob(t){return e.send({op:"DownloadSignedSyncBlob",method:"GET",path:"/workspaces/sync/blobs/"+c("DownloadSignedSyncBlob","digest",t.path.digest),auth:[],answers:{200:"empty"},signal:t.signal})},async uploadSignedSyncBlob(t){return e.send({op:"UploadSignedSyncBlob",method:"PUT",path:"/workspaces/sync/blobs/"+c("UploadSignedSyncBlob","digest",t.path.digest),auth:[],answers:{200:"empty"},signal:t.signal})},async streamSyncEvents(t){return e.send({op:"StreamSyncEvents",method:"GET",path:"/workspaces/sync/events",auth:[],answers:{200:"raw"},signal:t?.signal})}}}var lr={attempts:3,maxWaitSeconds:30},d$=new Set([429,502,503,504]);function bp(e,t=lr){let n=t.sleep??m$;return{async send(s){let a=c$(s),o=a.body,i=!o||o.kind!=="raw"||xa(o.value),r=(a.method==="GET"||a.method==="HEAD"||a.idempotent===!0)&&i;for(let l=1;;l++)try{return await e.send(a)}catch(p){if(!r||l>=t.attempts||!(p instanceof G)||a.signal?.aborted)throw p;let d=u$(p,l,t.maxWaitSeconds);if(d===void 0)throw p;await n(d*1e3,a.signal)}}}}function c$(e){return e.idempotent?Object.entries(e.headers??{}).some(([n,s])=>n.toLowerCase()==="idempotency-key"&&s!==void 0&&s!==null&&s!=="")?e:{...e,headers:{...e.headers,"Idempotency-Key":g$()}}:e}function u$(e,t,n){return d$.has(e.status)||e.code==="network_error"?e.retryAfter!==void 0?e.retryAfter<=n?e.retryAfter:void 0:Math.min(.5*2**(t-1),n)*(.8+Math.random()*.4):void 0}function m$(e,t){return new Promise((n,s)=>{if(t?.aborted)return s(t.reason);let a=()=>{clearTimeout(o),s(t?.reason)},o=setTimeout(()=>{t?.removeEventListener("abort",a),n()},e);t?.addEventListener("abort",a,{once:!0})})}function g$(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=[...e].map(n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}import{hostname as h$}from"node:os";var y$=new Set(["apikey","authorization",hp]);function f$(e){let t={accept:"application/json"};for(let[n,s]of Object.entries(e??{}))s!=null&&!y$.has(n.toLowerCase())&&(t[n.toLowerCase()]=String(s));return t}function b$(e,t,n){let s=null;try{s=n.startsWith("/")?new URL(n,e):null}catch{s=null}if(!s||s.origin!==new URL(e).origin)throw new G({op:t,status:0,code:"invalid_path",message:`${t}: a module's path stays at its environment's address`});return s.href}async function w$(e){let t=e.status===204||e.status===304?"":await e.text();if(t!=="")try{return JSON.parse(t)}catch{return t}}function v$(e,t,n){let s=n??{},a=Number(t.headers.get("retry-after")??"");return new G({op:e,status:t.status,code:typeof s.error=="string"?s.error:`http_${t.status}`,message:pr(n,t.status),requestId:typeof s.request_id=="string"?s.request_id:t.headers.get("x-request-id")??void 0,retryAfter:Number.isFinite(a)&&a>0?a:typeof s.retry_after=="number"?s.retry_after:void 0,body:n})}var Hs=class{bytes;contentType;constructor(t,n){this.bytes=t,this.contentType=n}};function k$(e){return e instanceof Hs?{headers:{"content-type":e.contentType,"content-length":String(e.bytes.size)},body:e.bytes}:e===void 0?{headers:{}}:{headers:{"content-type":"application/json"},body:JSON.stringify(e)}}async function et(e,t,n,s,a,o){if(e.callPlatform&&t===cp)return e.callPlatform(e,n,s,a,o);let i=`${n} ${s}`,r=k$(a),l=await e.module(b$(Qt(e.cloud,t),i,s),{method:n,headers:{...f$(o),...r.headers},body:r.body}),p=await w$(l);if(l.status>=200&&l.status<300)return{status:l.status,body:Fi(p),etag:l.headers.get("etag")??void 0};throw v$(i,l,p)}var _$=10080*60*1e3;async function wp(e,t,n=!1){let s=await e.state.personalKey(t);if(!n&&s&&Date.parse(s.expires_at)-e.io.now()>_$)return s;let a=await e.post(`/environments/${Q("the environment's ref",t)}/personal-key`,{host:h$().slice(0,100)||"computer"});return await e.state.keepPersonalKey(t,a),a}function pr(e,t){let n=e??{},s=typeof n.error_description=="string"?n.error_description:`the module answered ${t}`,a=Array.isArray(n.field_errors)?n.field_errors.flatMap(o=>{let{pointer:i,message:r}=o??{};return typeof r=="string"?[`${typeof i=="string"&&i!==""?`${i}: `:""}${r}`]:[]}):[];return a.length>0?`${s}: ${a.join("; ")}`:s}import{relative as S$}from"node:path";async function Ia(e,t){let n=await e.run("git",["rev-parse","--show-toplevel"],{cwd:t});if(n.code!==0)return null;let s=n.stdout.trim(),a=await e.run("git",["remote","get-url","origin"],{cwd:t}),o=await e.run("git",["rev-parse","--abbrev-ref","HEAD"],{cwd:t}),i=o.code===0?o.stdout.trim():"";return{root:s,repository:a.code===0?$$(a.stdout.trim()):void 0,branch:i!==""&&i!=="HEAD"?i:void 0,path:S$(s,t).split("\\").join("/")}}function $$(e){let t=/^(?:https?:\/\/(?:[^@/]+@)?github\.com\/|git@github\.com:|ssh:\/\/git@github\.com\/)([A-Za-z0-9-]+)\/([A-Za-z0-9._-]+?)(?:\.git)?\/?$/.exec(e);return t?`${t[1]}/${t[2]}`:void 0}async function Na(e,t){let n=await rt(e);return new Map(n.filter(s=>s.project_id===t.project_id).map(s=>[s.ref,s.slug]))}function as(e,t){return t?e.get(t.ref)??t.ref:""}var Mt="main";async function rt(e){let[t,n]=await Promise.all([e.get("/environments"),e.get("/orgs")]),s=new Map(n.organizations.map(a=>[a.id,a.name]));return t.environments.map(a=>({...a,org_name:s.get(a.organization_id)??a.organization_id}))}function Ge(e){return{org_id:e.organization_id,org_name:e.org_name,project_id:e.project_id,project_name:e.project_name,env_ref:e.ref,env_slug:e.slug,env_name:e.name}}function ee(e){return`${e.org_name} \u203A ${e.project_name} \u203A ${e.env_name}${e.env_name!==e.env_slug?` (${e.env_slug})`:""}`}function wn(e){return(e.env.PALBASE_TOKEN??"").startsWith("pbe_")}async function Ko(e){let[t]=await rt(e.studio);if(!t)throw new b("token_refused","Studio names no environment for PALBASE_TOKEN",{hint:"mint another: palbase env:tokens:create"});let n=Ge(t),s=i=>new b("token_environment",`PALBASE_TOKEN is ${ee(n)}'s environment token: it acts there alone, not in ${i}`,{hint:"mint one there: palbase env:tokens:create -P <project> -E <env>"}),{project:a,env:o}=e.global;if(a!==void 0&&t.project_id!==a&&!_p(t.project_name,a.slice(a.indexOf("/")+1)))throw s(a);if(o!==void 0&&o!==t.slug&&o!==t.ref)throw s(o);if(a===void 0&&o===void 0){let i=await e.state.targetFor(e.io.cwd);if(i&&i.target.env_ref!==t.ref)throw s(`${ee(i.target)}, chosen for ${i.dir}`)}return t}async function f(e){if(wn(e.io))return Ge(await Ko(e));let{project:t,env:n}=e.global;if(t!==void 0||n!==void 0){let i=await rt(e.studio),r;if(t!==void 0)r=As(i,t);else{let l=await e.state.targetFor(e.io.cwd);if(!l)throw kp("-E names an environment of the project chosen here, and none is chosen: add -P <project>");r=i.filter(p=>p.project_id===l.target.project_id)}if(n!==void 0){let l=r.find(p=>p.slug===n||p.ref===n);if(!l)throw new b("no_such_environment",`the project has no environment ${JSON.stringify(n)}`,{hint:`its environments: ${r.map(p=>p.slug).join(", ")}`});return Ge(l)}return r.length===1?Ge(r[0]):Ge(await vp(e,r,"Which environment?"))}let s=await e.state.targetFor(e.io.cwd);if(s)return s.target;if(!e.interactive)throw kp("no environment is chosen for this directory");let a=await rt(e.studio);if(a.length===0)throw new b("no_environments","your account reaches no environment yet",{hint:"make one: palbase projects:create <name>"});let o=Ge(await vp(e,a,"Which environment?"));return e.out.note(`Acting on ${ee(o)}. palbase use remembers it for this directory.`),o}async function Vs(e){return(await Ss(e)).t}async function Ss(e){if(wn(e.io))return{t:Ge(await Ko(e)),by:"token"};let t=await e.state.targetFor(e.io.cwd);if(e.global.project===void 0&&e.global.env===void 0&&t)return{t:t.target,by:"here"};let n=await rm(e,t?.target);if(e.global.env!==void 0)return{t:Ge(Sp(n,e.global.env)),by:"env"};let s=n.find(a=>a.ref===t?.target.env_ref);return s?{t:Ge(s),by:"here"}:{t:Ge(n.find(a=>a.slug===Mt)??n[0]),by:"fallback"}}function dr(e,t){return e.by==="fallback"?t:`${t}${t.includes("?")?"&":"?"}environment=${encodeURIComponent(e.t.env_ref)}`}var im=1e3;async function $s(e){let t=[],n=new Set,s;for(;;){let a=await e(s);if(t.push(...a.items),!a.next)return t;if(n.has(a.next)||n.size>=im)throw new b("list_unending",`the platform's list did not end: ${n.has(a.next)?`it gave the cursor ${JSON.stringify(a.next)} twice`:`it ran past ${im} pages`}`);n.add(a.next),s=a.next}}async function Xs(e,t,n,s,a){if(t.by==="env"||t.by==="token"||t.by==="here"&&(n.environment?.ref??t.t.env_ref)===t.t.env_ref)return;let o=(await s()).filter(r=>r.name===n.name);if(o.length<2)return;let i=await Na(e.studio,t.t);throw new b("ambiguous_name",`${a} is held by more than one of ${t.t.project_name}'s environments: ${o.map(r=>as(i,r.environment)).join(", ")}`,{hint:"name the environment: -E <env>"})}async function Ys(e){if(wn(e.io))return Ge(await Ko(e));let t=await e.state.targetFor(e.io.cwd);if(e.global.project===void 0&&e.global.env===void 0&&t)return t.target;let n=await rm(e,t?.target);if(e.global.env!==void 0)return Ge(Sp(n,e.global.env));let s=n.find(o=>o.ref===t?.target.env_ref);if(s)return Ge(s);let a=n[0].project_name;if(!e.interactive)throw h(`which environment of ${a} is it bound to? name it with -E <env>`,`its environments: ${n.map(o=>o.slug).join(", ")}`);return Ge(await vp(e,n,le(`Which environment of ${a} does it belong to?`)))}async function Zs(e,t,n,s){if(!n||n.ref===t.env_ref)return t;let a=(await rt(e.studio)).find(o=>o.ref===n.ref);if(e.global.env!==void 0){let o=a?.slug??n.name??n.ref;throw new b("bound_elsewhere",`${s} is bound to ${t.project_name}'s environment ${o}, not ${t.env_slug}`,{hint:`leave -E out: the command acts where it is bound${a?` (or name it, -E ${a.slug})`:""}`})}if(!a)throw new b("environment_out_of_reach",`${s} is bound to ${t.project_name}'s environment ${n.name||n.ref}, which your account does not reach`,{hint:"an admin of the project's organization adds you to that environment"});return Ge(a)}function cr(e,t,n){return e.global.env===void 0?n:`${n}${n.includes("?")?"&":"?"}environment=${encodeURIComponent(t.env_ref)}`}async function Uo(e,t,n){let s=(await rt(e.studio)).filter(a=>a.project_id===t.project_id);return Sp(s,n)}function Ce(e){return`The ${e} is the project's: the command acts in the environment it is bound to. -E picks it where two environments hold its name, and is refused when it names another.`}var Qs="It is bound to the environment -E names, or to the one chosen for this directory: a person at the terminal is asked which, anyone else names it with -E.";async function rm(e,t){let n=await rt(e.studio);if(e.global.project!==void 0)return As(n,e.global.project);if(t){let a=n.filter(o=>o.project_id===t.project_id);if(a.length===0)throw new b("no_such_project",`the project chosen here (${t.project_name}) is not among yours any more`,{hint:"palbase use another"});return a}if(!e.interactive)throw new b("no_target","which project? none is chosen for this directory",{hint:"pass -P <project>, or choose one here with palbase use"});if(n.length===0)throw new b("no_environments","your account reaches no environment yet",{hint:"make one: palbase projects:create <name>"});let s=[...new Map(n.map(a=>[a.project_id,a])).values()];for(s.forEach((a,o)=>e.out.note(` ${String(o+1).padStart(2)}) ${a.org_name} \u203A ${a.project_name}`));;){let a=Number((await e.io.prompt(`Which project? [1-${s.length}] `)).trim());if(Number.isInteger(a)&&a>=1&&a<=s.length){let o=s[a-1];return e.out.note(`Acting on ${o.org_name} \u203A ${o.project_name}. palbase use remembers one for this directory.`),n.filter(i=>i.project_id===o.project_id)}e.out.note(`answer with a number from 1 to ${s.length}`)}}function Sp(e,t){let n=e.find(s=>s.slug===t||s.ref===t);if(!n)throw new b("no_such_environment",`the project has no environment ${JSON.stringify(t)}`,{hint:`its environments: ${e.map(s=>s.slug).join(", ")}`});return n}function As(e,t){let n=e.filter(l=>l.project_id===t);if(n.length>0)return n;let s=t.indexOf("/"),[a,o]=s>=0?[t.slice(0,s),t.slice(s+1)]:[void 0,t],i=e.filter(l=>_p(l.project_name,o)&&(a===void 0||_p(l.org_name,a)||l.organization_id===a)),r=new Set(i.map(l=>l.project_id));if(r.size===0)throw new b("no_such_project",`no project ${JSON.stringify(t)} among yours`,{hint:"palbase projects:list shows them"});if(r.size>1){let l=[...new Set(i.map(p=>`${p.org_name}/${p.project_name}`))].join(", ");throw new b("ambiguous_project",`${JSON.stringify(t)} is a project in more than one organization: ${l}`,{hint:"name it as org/project"})}return i}async function k(e,t,n,s){e.out.note(`${ee(t)}: ${n}${e.global.yes?" (confirmed with -y)":""}`);let a=t.env_slug===Mt;if(!a&&s===void 0||e.global.yes)return;if(!e.interactive){let i=wn(e.io)?"confirm with -y: with PALBASE_TOKEN, -y is the go-ahead (the CLI asks no one else, and a person's yes elsewhere is not one)":"confirm with -y";throw new b("confirmation_needed",a?`${t.project_name} \u203A ${t.env_name} is the project's production environment`:s,{hint:i})}let o=(await e.io.prompt(le(`${a?`This is ${t.project_name}'s production environment`:s}. Go ahead? [y/N] `))).trim().toLowerCase();if(o!=="y"&&o!=="yes")throw new b("cancelled","nothing was changed")}async function vp(e,t,n){if(!e.interactive)throw kp(`${n.replace(/\?$/,"")}: ${t.map(s=>`${s.project_name}/${s.slug}`).join(", ")}`);for(t.forEach((s,a)=>e.out.note(` ${String(a+1).padStart(2)}) ${ee(Ge(s))}`));;){let s=(await e.io.prompt(`${n} [1-${t.length}] `)).trim(),a=Number(s);if(Number.isInteger(a)&&a>=1&&a<=t.length)return t[a-1];e.out.note(`answer with a number from 1 to ${t.length}`)}}function kp(e){return new b("no_target",e,{hint:"choose one here with palbase use, or pass -P <project> -E <env>"})}function _p(e,t){return e.localeCompare(t,void 0,{sensitivity:"accent"})===0}import{randomUUID as A$}from"node:crypto";import{readFile as R$}from"node:fs/promises";import{resolve as P$}from"node:path";var j$=6,$p=0,lm=[];async function T$(e){$p<j$?$p++:await new Promise(t=>lm.push(t));try{return await e()}finally{let t=lm.shift();t?t():$p--}}async function Rt(e,t,n,s,a,o){return T$(()=>et(e.studio,t.env_ref,n,s,a,o))}async function g(e,t,n,s,a,o){return(await Rt(e,t,n,s,a,o)).body}async function Pt(e,t,n){let s=await Rt(e,t,"GET",n);return{body:s.body,etag:s.etag}}function vt(e){return e?{"if-match":e}:void 0}function D(){return{"idempotency-key":A$()}}function R(e){return encodeURIComponent(e)}function Rs(e){return e.map(t=>{let n=t.indexOf("=");if(n<=0)throw h(`a setting is key=value, not ${JSON.stringify(t)}`);let s=t.slice(0,n).split(".");if(s.some(a=>a===""||a==="__proto__"||a==="constructor"||a==="prototype"))throw h(`${JSON.stringify(t.slice(0,n))} is not a key`);return{path:s,value:qn(t.slice(n+1))}})}function qn(e){try{return JSON.parse(e)}catch{return e}}function Ps(e,t){let n=structuredClone(e);for(let{path:s,value:a}of t){let o=n;for(let i of s.slice(0,-1)){let r=o[i];(typeof r!="object"||r===null)&&(o[i]={}),o=o[i]}o[s[s.length-1]]=a}return n}function os(e,t){return[...new Set([...Object.keys(e),...Object.keys(t)])].filter(n=>!Dt(e[n],t[n])).sort()}function pm(e){return JSON.stringify(e,(t,n)=>n!==null&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.entries(n).sort(([s],[a])=>s<a?-1:s>a?1:0)):n)}function Dt(e,t){return pm(e)===pm(t)}function kt(e){return e===void 0?"(not set)":typeof e=="string"&&e!==""?e:JSON.stringify(e)}function Ma(e,t){let n=Object.keys(t).sort(),s=Math.max(0,...n.map(a=>a.length));for(let a of n)e.out.line(`${a.padEnd(s)} ${kt(t[a])}`)}function zt(e,t,n){e.out.result({settings:n,changed:[]},()=>e.out.line(`Nothing to change: ${t} already ${t.endsWith("s")?"are":"is"} so.`))}async function ze(e,t,n){let s;if(t!==void 0&&t!=="-")try{s=await R$(P$(e.io.cwd,t),"utf8")}catch(a){throw new b("unreadable_file",`${t} could not be read: ${a instanceof Error?a.message:String(a)}`)}else e.io.interactive&&e.out.note(`Reading ${n} from stdin; end it with Ctrl-D.`),s=await e.io.readStdin();if(s.trim()==="")throw h(`no ${n} was given`,t===void 0?"pass --file <path>, or pipe it in":void 0);return s}function Ne(e,t){try{return JSON.parse(e)}catch(n){throw h(`${t} is not JSON: ${n instanceof Error?n.message:String(n)}`)}}async function lt(e,t){e.io.interactive&&e.out.note(`Paste ${t}, then Ctrl-D (it is read from stdin, never from the command line):`);let n=(await e.io.readStdin()).trim();if(n==="")throw h(`no ${t} was piped in`,"pipe it in: palbase \u2026 < file");return n}function Da(e){if(e.flags.enable===!0&&e.flags.disable===!0)throw h("--enable and --disable are one or the other");if(e.flags.enable===!0)return!0;if(e.flags.disable===!0)return!1}function Gn(e,t){if(e!==void 0){if(e==="yes"||e==="true")return!0;if(e==="no"||e==="false")return!1;throw h(`--${t} is yes or no`)}}function Me(e){return e===void 0?void 0:(Array.isArray(e)?e:[e]).flatMap(n=>String(n).split(",")).map(n=>n.trim()).filter(n=>n!=="")}function we(e,t){if(e===void 0)return;let n=Number(e);if(!Number.isInteger(n)||n<0)throw h(`--${t} is a whole number`);return n}var Wo={enable:{type:"boolean",description:"turn it on"},disable:{type:"boolean",description:"turn it off"}};async function Ee(e,t,n){try{await n(),e.done(t)}catch(s){if(!(s instanceof G))throw s;e.left(`${t}: refused \u2014 ${s.message}`)}}function Ze(e,t){return e.filter(n=>n.key.startsWith(t)).map(n=>({...n,name:n.key.slice(t.length)}))}function Ap(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>!(t==null||t===""||Array.isArray(t)&&t.length===0)))}import{writeFile as E$}from"node:fs/promises";var C$=/^[A-Z][A-Z0-9_]{0,127}$/,za={dev:{type:"boolean",description:"the development set (what a backend on a developer's computer reads, and a machine started with it), not production \u2014 whatever the environment is named"}};function qa(e){return e.flags.dev===!0?"development":"production"}function Fo(e){let t=e.args[0];if(!C$.test(t))throw h(`${JSON.stringify(t)} is not a secret's name: capital letters, digits and _, a letter first`);return t}async function Rp(e,t,n){try{let s=await $s(async a=>{let o=await g(e,t,"GET",`/machines?limit=100&environment=${encodeURIComponent(t.env_ref)}${a?`&cursor=${encodeURIComponent(a)}`:""}`);return{items:o.machines,next:o.next_cursor}});return{using:s.filter(a=>a.secrets===n).map(a=>a.name).sort(),others:s.filter(a=>a.secrets!==n)}}catch(s){return{unread:s instanceof Error?s.message:String(s)}}}function Pp(e,t,n,s){if("unread"in s){e.out.note(`which machines start with the ${n} set could not be read (${s.unread}): palbase machines:list -E ${t.env_slug} says each one's`);return}if(s.using.length>0){let r=s.using.join(", ");e.out.line(`${r} ${s.using.length===1?"starts":"start"} with the ${n} set: rolling out with the new value \u2014 palbase machines:list -E ${t.env_slug} shows it until every copy runs it.`);return}let a=n==="production"?"development":"production",o=n==="development"?" Only a backend run on a computer (palbase run, env:pull) reads it.":"";if(s.others.length===0){n==="production"&&e.out.note(`${ee(t)} has no machine yet: one started with the ${n} set reads it.`);return}let i=s.others.map(r=>`${r.name} starts with ${r.secrets?`the ${r.secrets} set`:"no set"}`).join(", ");e.out.warn(`no machine of ${ee(t)} starts with the ${n} set (${i}): this value reaches none of them.${o} palbase machines:update <name> --secrets ${n} starts a machine with it; ${n==="production"?"--dev writes":"leaving --dev out writes"} the ${a} set.`)}async function ea(e,t,n){let s=[],a;do{let o=await g(e,t,"GET",`/secrets/${n}?limit=1000${a?`&cursor=${encodeURIComponent(a)}`:""}`);s.push(...o.secrets),a=o.next_cursor}while(a);return s}var O$={name:"secrets:list",summary:"the environment's secrets by name, with their version \u2014 never their values",usage:"[--dev]",flags:za,scope:"environment",async run(e){let t=await f(e),n=qa(e),s=await ea(e,t,n);e.out.result({set:n,secrets:s},()=>{s.length===0&&e.out.line(`No ${n} secrets.`);for(let a of s)e.out.line(`${a.name} v${a.version} ${a.updated_at}`)})}},x$={name:"secrets:set",summary:"set a secret: its value is read from stdin, never from the command line",usage:"<NAME> [--dev] < value",details:["An environment has two sets, production and development, whatever the environment is named: Development's machines may start with its production set. A machine starts with the set it names (machines:update --secrets), and a change of that set rolls it out with the new value; a backend run with palbase run or env:pull reads development.","It says which of the environment's machines start with the set, and warns when none does."],args:{min:1,max:1},flags:za,scope:"environment",async run(e){let t=await f(e),n=Fo(e),s=qa(e),a=await lt(e,`the value of ${n}`);await k(e,t,`set the ${s} secret ${n}`);let o=await g(e,t,"PUT",`/secrets/${s}/${n}`,{value:a}),i=await Rp(e,t,s);e.out.result({set:s,name:n,version:o.version,environment:t.env_slug,machines:"using"in i?i.using:null},()=>{e.out.line(`Set ${n} v${o.version} in the ${s} set of ${ee(t)}.`),Pp(e,t,s,i)})}},L$={name:"secrets:unset",summary:"take a secret away",usage:"<NAME> [--dev]",args:{min:1,max:1},flags:za,scope:"environment",async run(e){let t=await f(e),n=Fo(e),s=qa(e);await k(e,t,`take away the ${s} secret ${n}`),await g(e,t,"DELETE",`/secrets/${s}/${n}`);let a=await Rp(e,t,s);e.out.result({set:s,name:n,deleted:!0,environment:t.env_slug,machines:"using"in a?a.using:null},()=>{e.out.line(`Took ${n} away from the ${s} set of ${ee(t)}.`),Pp(e,t,s,a)})}},I$={name:"secrets:get",summary:"print one development secret's value (an admin's): a production secret's is never read back",usage:"<NAME> --dev",details:["A production secret's value is never read back, by anyone: only the machines that start with it are given it, and it is changed by setting it again (secrets:set). The development set is what a backend on your computer reads (palbase run, env:pull): secrets:get NAME --dev prints one."],args:{min:1,max:1},flags:za,scope:"environment",async run(e){let t=await f(e),n=Fo(e),s=await g(e,t,"GET",`/secrets/${qa(e)}/${n}`);e.out.result({name:n,version:s.version,value:s.value},()=>e.out.line(s.value))}},N$={name:"secrets:versions",summary:"a secret's versions, newest first \u2014 never their values",usage:"<NAME> [--dev]",args:{min:1,max:1},flags:za,scope:"environment",async run(e){let t=await f(e),n=Fo(e),s=await g(e,t,"GET",`/secrets/${qa(e)}/${n}/versions`);e.out.result(s,()=>{for(let a of s.versions)e.out.line(`v${a.version} ${a.created_at}${a.current?" (current)":""}`)})}},M$={name:"secrets:rollback",summary:"put a secret back to one of its versions (a new version with that value)",usage:"<NAME> --version <n> [--dev]",args:{min:1,max:1},flags:{...za,version:{type:"string",value:"n",description:"the version to go back to"}},scope:"environment",async run(e){let t=await f(e),n=Fo(e),s=Number(e.flags.version);if(!Number.isInteger(s)||s<1)throw h("--version is a version number (secrets:versions lists them)");let a=qa(e);await k(e,t,`put the ${a} secret ${n} back to v${s}`);let o=await g(e,t,"POST",`/secrets/${a}/${n}/rollback`,{version:s}),i=await Rp(e,t,a);e.out.result({set:a,name:n,version:o.version,environment:t.env_slug,machines:"using"in i?i.using:null},()=>{e.out.line(`${n} in the ${a} set of ${ee(t)} is v${s}'s value again, as v${o.version}.`),Pp(e,t,a,i)})}},D$={name:"secrets:audit",summary:"every read and write of the environment's secrets, newest first: which secret, which key did it, when \u2014 never a value",usage:"[--name <NAME>] [--dev | --prod] [--limit <n>]",details:["A backend that reads the secrets at boot (palbase run, a machine) shows here as a read, with the key it read with: palbase keys:list names the key.","An encrypted column's values opened through Palbase (Studio's table, a secret key) are recorded under the column's address: --name patients.tc lists who opened them, and when."],flags:{name:{type:"string",value:"NAME",description:"only this secret's, or an encrypted field's opens (table.column)"},dev:{type:"boolean",description:"only the development secrets"},prod:{type:"boolean",description:"only the production secrets"},limit:{type:"string",value:"n",description:"how many (default 30)"}},scope:"environment",async run(e){let t=await f(e);if(e.flags.dev===!0&&e.flags.prod===!0)throw h("--dev or --prod, not both");let n=Number(e.flags.limit??30);if(!Number.isInteger(n)||n<1||n>500)throw h("--limit is a whole number from 1 to 500");let s=new URLSearchParams({limit:String(n),...e.flags.name?{name:e.flags.name}:{},...e.flags.dev===!0?{environment:"development"}:e.flags.prod===!0?{environment:"production"}:{}}),a=await g(e,t,"GET",`/secrets/audit?${s}`);e.out.result(a,()=>{a.entries.length===0?e.out.line("No read or write of a secret yet."):e.out.table(a.entries,[{header:"when",value:o=>o.at.slice(0,19).replace("T"," ")},{header:"what",value:o=>o.action},{header:"set",value:o=>o.environment??""},{header:"secret",value:o=>o.name?`${o.name}${o.version?` v${o.version}`:""}`:"every one"},{header:"key",value:o=>o.key_id}])})}};function dm(e,t){e.out.table(t.keys,[{header:"key",value:n=>`${n.id}${n.id===t.current?" (in force)":""}`},{header:"in force from",value:n=>n.activates_at.slice(0,19).replace("T"," ")},{header:"made by",value:n=>n.created_by}])}var z$={name:"fields:list",summary:"the keys the environment's encrypted database fields are sealed with \u2014 never the keys themselves",scope:"environment",async run(e){let t=await f(e),n=await g(e,t,"GET","/secrets/fields");e.out.result(n,()=>dm(e,n))}},q$={name:"fields:rotate",summary:"make a new key for the environment's encrypted fields (an owner's or an admin's)",details:["It comes into force in five minutes: by then every running backend has fetched it. New values are sealed with it from then on; a palbase/backend app seals its older values again with it, in the background.","The older keys go on opening what they sealed."],scope:"environment",async run(e){let t=await f(e);await k(e,t,"rotate the encrypted fields' key");let n=await g(e,t,"POST","/secrets/fields/rotate"),s=n.keys[n.keys.length-1];e.out.result(n,()=>{e.out.line(`Made ${s.id} in ${ee(t)}: in force from ${s.activates_at.slice(0,19).replace("T"," ")} UTC.`),dm(e,n)})}},G$={name:"fields:keys",summary:"download the environment's field keys into a file (its owner's): what opens a dump of its database elsewhere",usage:"--out <file>",details:["The file opens every encrypted field of the environment: keep it as you would the database's password. It is the shape palbase/server's Fields reads: new Fields({ fetch: async () => JSON.parse(readFileSync(file, 'utf8')) }).","The download is in the secrets audit trail (secrets:audit)."],flags:{out:{type:"string",value:"file",description:"where the keys go (made readable by you alone); never the screen"}},scope:"environment",async run(e){let t=e.flags.out;if(!t)throw h("fields:keys writes the keys into a file: --out <file> (never onto the screen, which keeps them)");let n=await f(e),s=await g(e,n,"GET","/secrets/fields/keys");await E$(t,`${JSON.stringify(s,null,2)}
21
+ `}function Q(e,t){try{return c("palbase",e,t)}catch(n){throw n instanceof G&&n.code==="invalid_path_parameter"?new b("unsafe_path",`${e} cannot be ${t===""?"empty":JSON.stringify(t)}: a request's path cannot carry it`):n}}function fp(e){return{name:"login",summary:"sign in with your Studio account",details:["Shows a one-time code and opens Studio, where you approve it while signed in there.","The CLI then holds a session of yours: Studio lists it with your others, and ending it there signs the CLI out.","On a machine with no browser (a server, an agent), open the address it prints on any device."],flags:{"no-browser":{type:"boolean",description:"print the address instead of opening a browser"},...e?{owner:{type:"boolean",description:"Palbase's own project's owner: confirm with your passkey in this computer's browser, for 15 minutes of changes to it"}}:{}},scope:"none",async run(t){if(t.io.env.PALBASE_TOKEN)throw new b("token_in_use","PALBASE_TOKEN is set: the CLI acts with that token, and a sign-in would not be used",{hint:"unset PALBASE_TOKEN to sign in as yourself"});if(e&&t.flags.owner===!0){await e(t);return}let n=await Uu(t.io,t.cloud),s=`${t.cloud.studioWeb}/device`;t.out.note(""),t.out.note(` Enter this code in your browser: ${n.user_code}`),t.out.note("");let a=t.flags["no-browser"]!==!0&&t.interactive&&await t.io.openBrowser(s);t.out.note(a?`Opened ${s} \u2014 sign in there if asked, then enter the code.`:`Open ${s} on any device, sign in, and enter the code.`),t.out.note("Waiting for the approval\u2026");let o=await Wu(t.io,t.cloud,n);await t.state.writeSession(o),t.out.result({user:o.user},()=>t.out.line(`Signed in as ${o.user.email??o.user.id}.`))}}}var OK=fp(),nm={name:"logout",summary:"sign out: the session is ended at Palbase and forgotten on this computer",scope:"none",async run(e){if(e.io.env.PALBASE_TOKEN)throw new b("token_in_use","PALBASE_TOKEN is set: logout ends your own sign-in, and the CLI acts with the token",{hint:"unset PALBASE_TOKEN to sign out"});let t=await e.state.readSession();if(!t){e.out.result({signed_out:!0},()=>e.out.line("You were not signed in."));return}for(let[n,s]of Object.entries(await e.state.personalKeys()))try{await e.studio.request("DELETE",`/environments/${Q("the environment's ref",n)}/personal-key/${Q("the personal key's id",s.id)}`)}catch(a){a instanceof Error&&"status"in a&&a.status===404||e.out.warn(`your key at ${n} (${s.label}) could not be revoked: ${a instanceof Error?a.message:String(a)} \u2014 revoke it in Studio, or it ends ${s.expires_at}`)}await e.state.forgetPersonalKeys(),await e.state.forget("owner.json");try{await Bu(e.io,e.cloud,t)}catch(n){e.out.warn(`${n instanceof Error?n.message:String(n)} \u2014 end the session in Studio (Account \u203A Sessions)`)}await e.state.clearSession(),e.out.result({signed_out:!0},()=>e.out.line(`Signed out ${t.user.email??t.user.id}.`))}},sm={name:"whoami",summary:"the account the CLI acts as, and the environment chosen for this directory",scope:"account",async run(e){let t=e.io.env.PALBASE_TOKEN,n;if(t?.startsWith("pbu_")){let{organizations:a}=await e.studio.get("/orgs");n={id:`account token \u2026${t.slice(-4)}`,via:"token",organizations:a.length}}else if(t?.startsWith("pbo_")){let{organizations:a}=await e.studio.get("/orgs"),o=a[0];n={id:`token \u2026${t.slice(-4)}`,via:"token",...o&&{organization:{id:o.id,name:o.name,role:o.role}}}}else if(t){let a=up(t);n={id:String(a.sub??""),...typeof a.email=="string"?{email:a.email}:{},via:"token"}}else n={...(await e.studio.currentSession()).user,via:"session"};let s=await e.state.targetFor(e.io.cwd);e.out.result({user:n,target:s?.target??null,target_dir:s?.dir??null},()=>{e.out.line(n.organization?`an access token of ${le(n.organization.name)} (${n.organization.role}), ${n.id} (PALBASE_TOKEN)`:n.organizations!==void 0?`an ${n.id} (PALBASE_TOKEN): an admin of the ${n.organizations} organization${n.organizations===1?"":"s"} it opened`:`${n.email??n.id}${n.via==="token"?" (PALBASE_TOKEN)":""}`),s&&e.out.line(`${s.target.org_name} \u203A ${s.target.project_name} \u203A ${s.target.env_name} (${s.target.env_slug}) \u2014 chosen for ${s.dir}`)})}};var KS={name:"account:tokens:list",summary:"your account tokens (for a program that opens organizations): name, how many organizations they reach, when they end and were last used \u2014 never their values",scope:"account",async run(e){let{tokens:t}=await e.studio.get("/account/tokens");e.out.result({tokens:t},()=>{t.length===0?e.out.line("You have no account token yet: palbase account:tokens:create <name> makes one."):e.out.table(t,[{header:"name",value:n=>le(n.name)},{header:"token",value:n=>`pbu_\u2026${n.hint}`},{header:"organizations",value:n=>String(n.organizations)},{header:"ends",value:n=>n.expires_at.slice(0,10)},{header:"last used",value:n=>n.last_used_at?.slice(0,16).replace("T"," ")??"never"},{header:"id",value:n=>n.id}])})}},US={name:"account:tokens:create",summary:"make an account token for a program that opens organizations; its value is shown this once",usage:"<name> [--days <n>]",details:["Give it to the program as its secret (PALBASE_TOKEN, or palbase/cloud's token): it opens organizations \u2014 you their owner, the token their admin \u2014 and builds projects and environments there.","It reaches only the organizations it opened, never your others; it makes no token or key and changes no one's place. It ends after --days (default 90, at most 365), when it is revoked, and, in an organization, when you leave it."],args:{min:1,max:1},flags:{days:{type:"string",value:"n",description:"how many days it is good for (default 90)"}},scope:"account",async run(e){let t=e.flags.days===void 0?90:Number(e.flags.days);if(!Number.isInteger(t)||t<1||t>365)throw h("--days is a whole number from 1 to 365");let n=await e.studio.post("/account/tokens",{name:e.args[0],expires_in_days:t});e.out.result(n,()=>{e.out.line(`Made the account token ${le(n.name)} (until ${n.expires_at.slice(0,10)}).`),e.out.line(`token (shown this once \u2014 keep it as the program's secret PALBASE_TOKEN): ${n.token}`)})}},WS={name:"account:tokens:revoke",summary:"revoke one of your account tokens (by its name or id): refused from its next request on; the organizations it opened stay yours",usage:"<name|id>",args:{min:1,max:1},scope:"account",async run(e){let{tokens:t}=await e.studio.get("/account/tokens"),n=t.filter(s=>s.id===e.args[0]||s.name===e.args[0]);if(n.length===0)throw new b("no_such_token",`you have no account token ${JSON.stringify(e.args[0])}`,{hint:"palbase account:tokens:list shows them"});if(n.length>1)throw new b("ambiguous_token",`${JSON.stringify(e.args[0])} names more than one token`,{hint:"pass its id"});await e.studio.request("DELETE",`/account/tokens/${Q("the token's id",n[0].id)}`),e.out.result({revoked:n[0].id},()=>e.out.line(`Revoked the account token ${le(n[0].name)}.`))}},am=[KS,US,WS];var er={};wt(er,{client:()=>FS});function FS(e){return{async draftAgent(t){return e.send({op:"DraftAgent",method:"POST",path:"/ai/agent-drafts",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listAgents(t){return e.send({op:"ListAgents",method:"GET",path:"/ai/agents",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getAgent(t){return e.send({op:"GetAgent",method:"GET",path:"/ai/agents/"+c("GetAgent","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putAgent(t){return e.send({op:"PutAgent",method:"PUT",path:"/ai/agents/"+c("PutAgent","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteAgent(t){return e.send({op:"DeleteAgent",method:"DELETE",path:"/ai/agents/"+c("DeleteAgent","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async publishAgent(t){return e.send({op:"PublishAgent",method:"POST",path:"/ai/agents/"+c("PublishAgent","name",t.path.name)+"/publish",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rollbackAgent(t){return e.send({op:"RollbackAgent",method:"POST",path:"/ai/agents/"+c("RollbackAgent","name",t.path.name)+"/rollback",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listAgentVersions(t){return e.send({op:"ListAgentVersions",method:"GET",path:"/ai/agents/"+c("ListAgentVersions","name",t.path.name)+"/versions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async createAudioSpeech(t){return e.send({op:"CreateAudioSpeech",method:"POST",path:"/ai/audio/speech",auth:[["SecretKeyAuth"]],answers:{200:"raw"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createAudioTranscription(t){return e.send({op:"CreateAudioTranscription",method:"POST",path:"/ai/audio/transcriptions",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listChats(t){return e.send({op:"ListChats",method:"GET",path:"/ai/chats",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createChat(t){return e.send({op:"CreateChat",method:"POST",path:"/ai/chats",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChat(t){return e.send({op:"GetChat",method:"GET",path:"/ai/chats/"+c("GetChat","chat_id",t.path.chat_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteChat(t){return e.send({op:"DeleteChat",method:"DELETE",path:"/ai/chats/"+c("DeleteChat","chat_id",t.path.chat_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async decideChatApproval(t){return e.send({op:"DecideChatApproval",method:"POST",path:"/ai/chats/"+c("DecideChatApproval","chat_id",t.path.chat_id)+"/approvals/"+c("DecideChatApproval","approval_id",t.path.approval_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChatExecution(t){return e.send({op:"GetChatExecution",method:"GET",path:"/ai/chats/"+c("GetChatExecution","chat_id",t.path.chat_id)+"/execution",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async patchChatExecution(t){return e.send({op:"PatchChatExecution",method:"PATCH",path:"/ai/chats/"+c("PatchChatExecution","chat_id",t.path.chat_id)+"/execution",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async forkChat(t){return e.send({op:"ForkChat",method:"POST",path:"/ai/chats/"+c("ForkChat","chat_id",t.path.chat_id)+"/fork",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChatGoal(t){return e.send({op:"GetChatGoal",method:"GET",path:"/ai/chats/"+c("GetChatGoal","chat_id",t.path.chat_id)+"/goal",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async setChatGoal(t){return e.send({op:"SetChatGoal",method:"PUT",path:"/ai/chats/"+c("SetChatGoal","chat_id",t.path.chat_id)+"/goal",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async clearChatGoal(t){return e.send({op:"ClearChatGoal",method:"DELETE",path:"/ai/chats/"+c("ClearChatGoal","chat_id",t.path.chat_id)+"/goal",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},query:t.query,signal:t.signal})},async updateChatGoal(t){return e.send({op:"UpdateChatGoal",method:"PATCH",path:"/ai/chats/"+c("UpdateChatGoal","chat_id",t.path.chat_id)+"/goal",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async handoffChat(t){return e.send({op:"HandoffChat",method:"POST",path:"/ai/chats/"+c("HandoffChat","chat_id",t.path.chat_id)+"/handoff",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async putChatMember(t){return e.send({op:"PutChatMember",method:"PUT",path:"/ai/chats/"+c("PutChatMember","chat_id",t.path.chat_id)+"/members/"+c("PutChatMember","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteChatMember(t){return e.send({op:"DeleteChatMember",method:"DELETE",path:"/ai/chats/"+c("DeleteChatMember","chat_id",t.path.chat_id)+"/members/"+c("DeleteChatMember","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listChatMessages(t){return e.send({op:"ListChatMessages",method:"GET",path:"/ai/chats/"+c("ListChatMessages","chat_id",t.path.chat_id)+"/messages",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async sendChatMessage(t){return e.send({op:"SendChatMessage",method:"POST",path:"/ai/chats/"+c("SendChatMessage","chat_id",t.path.chat_id)+"/messages",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChatMessageAttachment(t){return e.send({op:"GetChatMessageAttachment",method:"GET",path:"/ai/chats/"+c("GetChatMessageAttachment","chat_id",t.path.chat_id)+"/messages/"+c("GetChatMessageAttachment","message_id",t.path.message_id)+"/attachments/"+c("GetChatMessageAttachment","position",t.path.position),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"raw"},signal:t.signal})},async listChatParts(t){return e.send({op:"ListChatParts",method:"GET",path:"/ai/chats/"+c("ListChatParts","chat_id",t.path.chat_id)+"/parts",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async putChatPipe(t){return e.send({op:"PutChatPipe",method:"PUT",path:"/ai/chats/"+c("PutChatPipe","chat_id",t.path.chat_id)+"/pipe",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteChatPipe(t){return e.send({op:"DeleteChatPipe",method:"DELETE",path:"/ai/chats/"+c("DeleteChatPipe","chat_id",t.path.chat_id)+"/pipe",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async sendSubagentMessage(t){return e.send({op:"SendSubagentMessage",method:"POST",path:"/ai/chats/"+c("SendSubagentMessage","chat_id",t.path.chat_id)+"/runs/"+c("SendSubagentMessage","run_id",t.path.run_id)+"/messages",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stopSubagent(t){return e.send({op:"StopSubagent",method:"POST",path:"/ai/chats/"+c("StopSubagent","chat_id",t.path.chat_id)+"/runs/"+c("StopSubagent","run_id",t.path.run_id)+"/stop",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stopChat(t){return e.send({op:"StopChat",method:"POST",path:"/ai/chats/"+c("StopChat","chat_id",t.path.chat_id)+"/stop",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTurnToolCalls(t){return e.send({op:"ListTurnToolCalls",method:"GET",path:"/ai/chats/"+c("ListTurnToolCalls","chat_id",t.path.chat_id)+"/tool-calls",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getChatToolCall(t){return e.send({op:"GetChatToolCall",method:"GET",path:"/ai/chats/"+c("GetChatToolCall","chat_id",t.path.chat_id)+"/tool-calls/"+c("GetChatToolCall","call_id",t.path.call_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async answerChatToolCall(t){return e.send({op:"AnswerChatToolCall",method:"POST",path:"/ai/chats/"+c("AnswerChatToolCall","chat_id",t.path.chat_id)+"/tool-outputs/"+c("AnswerChatToolCall","call_id",t.path.call_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listChatTurnArtifacts(t){return e.send({op:"ListChatTurnArtifacts",method:"GET",path:"/ai/chats/"+c("ListChatTurnArtifacts","chat_id",t.path.chat_id)+"/turns/"+c("ListChatTurnArtifacts","response_id",t.path.response_id)+"/artifacts",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getChatTurnArtifact(t){return e.send({op:"GetChatTurnArtifact",method:"GET",path:"/ai/chats/"+c("GetChatTurnArtifact","chat_id",t.path.chat_id)+"/turns/"+c("GetChatTurnArtifact","response_id",t.path.response_id)+"/artifacts/"+c("GetChatTurnArtifact","artifact_id",t.path.artifact_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"raw"},signal:t.signal})},async getChatTurnCost(t){return e.send({op:"GetChatTurnCost",method:"GET",path:"/ai/chats/"+c("GetChatTurnCost","chat_id",t.path.chat_id)+"/turns/"+c("GetChatTurnCost","response_id",t.path.response_id)+"/cost",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async startChatVoice(t){return e.send({op:"StartChatVoice",method:"POST",path:"/ai/chats/"+c("StartChatVoice","chat_id",t.path.chat_id)+"/voice",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChatVoice(t){return e.send({op:"GetChatVoice",method:"GET",path:"/ai/chats/"+c("GetChatVoice","chat_id",t.path.chat_id)+"/voice/"+c("GetChatVoice","voice_id",t.path.voice_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async closeChatVoice(t){return e.send({op:"CloseChatVoice",method:"DELETE",path:"/ai/chats/"+c("CloseChatVoice","chat_id",t.path.chat_id)+"/voice/"+c("CloseChatVoice","voice_id",t.path.voice_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async commandChatVoice(t){return e.send({op:"CommandChatVoice",method:"POST",path:"/ai/chats/"+c("CommandChatVoice","chat_id",t.path.chat_id)+"/voice/"+c("CommandChatVoice","voice_id",t.path.voice_id)+"/commands",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createEmbeddings(t){return e.send({op:"CreateEmbeddings",method:"POST",path:"/ai/embeddings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listEndpoints(t){return e.send({op:"ListEndpoints",method:"GET",path:"/ai/endpoints",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putEndpoint(t){return e.send({op:"PutEndpoint",method:"PUT",path:"/ai/endpoints/"+c("PutEndpoint","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteEndpoint(t){return e.send({op:"DeleteEndpoint",method:"DELETE",path:"/ai/endpoints/"+c("DeleteEndpoint","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listEnv(t){return e.send({op:"ListEnv",method:"GET",path:"/ai/env",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listEnvAllowances(t){return e.send({op:"ListEnvAllowances",method:"GET",path:"/ai/env/allowances",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async deleteEnvAllowance(t){return e.send({op:"DeleteEnvAllowance",method:"DELETE",path:"/ai/env/allowances/"+c("DeleteEnvAllowance","allowance_id",t.path.allowance_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listEnvHostRequests(t){return e.send({op:"ListEnvHostRequests",method:"GET",path:"/ai/env/host-requests",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async allowEnvHostRequest(t){return e.send({op:"AllowEnvHostRequest",method:"POST",path:"/ai/env/host-requests/"+c("AllowEnvHostRequest","request_id",t.path.request_id)+"/allow",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async dismissEnvHostRequest(t){return e.send({op:"DismissEnvHostRequest",method:"POST",path:"/ai/env/host-requests/"+c("DismissEnvHostRequest","request_id",t.path.request_id)+"/dismiss",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putEnv(t){return e.send({op:"PutEnv",method:"PUT",path:"/ai/env/"+c("PutEnv","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteEnv(t){return e.send({op:"DeleteEnv",method:"DELETE",path:"/ai/env/"+c("DeleteEnv","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async allowEnvHost(t){return e.send({op:"AllowEnvHost",method:"POST",path:"/ai/env/"+c("AllowEnvHost","key",t.path.key)+"/hosts",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listEnvironments(t){return e.send({op:"ListEnvironments",method:"GET",path:"/ai/environments",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createEnvironment(t){return e.send({op:"CreateEnvironment",method:"POST",path:"/ai/environments",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getEnvironment(t){return e.send({op:"GetEnvironment",method:"GET",path:"/ai/environments/"+c("GetEnvironment","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putEnvironment(t){return e.send({op:"PutEnvironment",method:"PUT",path:"/ai/environments/"+c("PutEnvironment","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteEnvironment(t){return e.send({op:"DeleteEnvironment",method:"DELETE",path:"/ai/environments/"+c("DeleteEnvironment","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async createImage(t){return e.send({op:"CreateImage",method:"POST",path:"/ai/images",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getImage(t){return e.send({op:"GetImage",method:"GET",path:"/ai/images/"+c("GetImage","image_id",t.path.image_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getImageFile(t){return e.send({op:"GetImageFile",method:"GET",path:"/ai/images/"+c("GetImageFile","image_id",t.path.image_id)+"/files/"+c("GetImageFile","position",t.path.position),auth:[["SecretKeyAuth"]],answers:{200:"raw"},signal:t.signal})},async getMachine(t){return e.send({op:"GetMachine",method:"GET",path:"/ai/machines/"+c("GetMachine","machine",t.path.machine),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteMachine(t){return e.send({op:"DeleteMachine",method:"DELETE",path:"/ai/machines/"+c("DeleteMachine","machine",t.path.machine),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},query:t.query,signal:t.signal})},async cordonMachine(t){return e.send({op:"CordonMachine",method:"POST",path:"/ai/machines/"+c("CordonMachine","machine",t.path.machine)+"/cordon",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async resumeMachine(t){return e.send({op:"ResumeMachine",method:"POST",path:"/ai/machines/"+c("ResumeMachine","machine",t.path.machine)+"/resume",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listModels(t){return e.send({op:"ListModels",method:"GET",path:"/ai/models",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async revokePoolKey(t){return e.send({op:"RevokePoolKey",method:"POST",path:"/ai/pool-keys/"+c("RevokePoolKey","key",t.path.key)+"/revoke",auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listPools(t){return e.send({op:"ListPools",method:"GET",path:"/ai/pools",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createPool(t){return e.send({op:"CreatePool",method:"POST",path:"/ai/pools",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deletePool(t){return e.send({op:"DeletePool",method:"DELETE",path:"/ai/pools/"+c("DeletePool","pool",t.path.pool),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listPoolKeys(t){return e.send({op:"ListPoolKeys",method:"GET",path:"/ai/pools/"+c("ListPoolKeys","pool",t.path.pool)+"/keys",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createPoolKey(t){return e.send({op:"CreatePoolKey",method:"POST",path:"/ai/pools/"+c("CreatePoolKey","pool",t.path.pool)+"/keys",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPoolState(t){return e.send({op:"GetPoolState",method:"GET",path:"/ai/pools/"+c("GetPoolState","pool",t.path.pool)+"/state",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listProviders(t){return e.send({op:"ListProviders",method:"GET",path:"/ai/providers",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async connectProvider(t){return e.send({op:"ConnectProvider",method:"PUT",path:"/ai/providers/"+c("ConnectProvider","provider",t.path.provider),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async disconnectProvider(t){return e.send({op:"DisconnectProvider",method:"DELETE",path:"/ai/providers/"+c("DisconnectProvider","provider",t.path.provider),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async createResponse(t){return e.send({op:"CreateResponse",method:"POST",path:"/ai/responses",auth:[["SecretKeyAuth"]],answers:{200:"raw",202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getResponse(t){return e.send({op:"GetResponse",method:"GET",path:"/ai/responses/"+c("GetResponse","response_id",t.path.response_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelResponse(t){return e.send({op:"CancelResponse",method:"POST",path:"/ai/responses/"+c("CancelResponse","response_id",t.path.response_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async followResponse(t){return e.send({op:"FollowResponse",method:"GET",path:"/ai/responses/"+c("FollowResponse","response_id",t.path.response_id)+"/live",auth:[["SecretKeyAuth"]],answers:{200:"raw"},query:t.query,signal:t.signal})},async getSettings(t){return e.send({op:"GetSettings",method:"GET",path:"/ai/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putSettings(t){return e.send({op:"PutSettings",method:"PUT",path:"/ai/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSpend(t){return e.send({op:"GetSpend",method:"GET",path:"/ai/spend",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async askSupport(t){return e.send({op:"AskSupport",method:"POST",path:"/ai/support-questions",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTools(t){return e.send({op:"ListTools",method:"GET",path:"/ai/tools",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listUsage(t){return e.send({op:"ListUsage",method:"GET",path:"/ai/usage",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async gatewayAudioSpeech(t){return e.send({op:"GatewayAudioSpeech",method:"POST",path:"/ai/v1/audio/speech",auth:[["SecretKeyAuth"]],answers:{200:"raw"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayAudioTranscriptions(t){return e.send({op:"GatewayAudioTranscriptions",method:"POST",path:"/ai/v1/audio/transcriptions",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayChatCompletions(t){return e.send({op:"GatewayChatCompletions",method:"POST",path:"/ai/v1/chat/completions",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayEmbeddings(t){return e.send({op:"GatewayEmbeddings",method:"POST",path:"/ai/v1/embeddings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayImagesGenerations(t){return e.send({op:"GatewayImagesGenerations",method:"POST",path:"/ai/v1/images/generations",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayAnthropicMessages(t){return e.send({op:"GatewayAnthropicMessages",method:"POST",path:"/ai/v1/messages",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async gatewayListModels(t){return e.send({op:"GatewayListModels",method:"GET",path:"/ai/v1/models",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async gatewayResponses(t){return e.send({op:"GatewayResponses",method:"POST",path:"/ai/v1/responses",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createVideo(t){return e.send({op:"CreateVideo",method:"POST",path:"/ai/videos",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getVideo(t){return e.send({op:"GetVideo",method:"GET",path:"/ai/videos/"+c("GetVideo","video_id",t.path.video_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelVideo(t){return e.send({op:"CancelVideo",method:"POST",path:"/ai/videos/"+c("CancelVideo","video_id",t.path.video_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listTriggers(t){return e.send({op:"ListTriggers",method:"GET",path:"/ai/triggers",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createTrigger(t){return e.send({op:"CreateTrigger",method:"POST",path:"/ai/triggers",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getTrigger(t){return e.send({op:"GetTrigger",method:"GET",path:"/ai/triggers/"+c("GetTrigger","trigger_id",t.path.trigger_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteTrigger(t){return e.send({op:"DeleteTrigger",method:"DELETE",path:"/ai/triggers/"+c("DeleteTrigger","trigger_id",t.path.trigger_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateTrigger(t){return e.send({op:"UpdateTrigger",method:"PATCH",path:"/ai/triggers/"+c("UpdateTrigger","trigger_id",t.path.trigger_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async testTrigger(t){return e.send({op:"TestTrigger",method:"POST",path:"/ai/triggers/"+c("TestTrigger","trigger_id",t.path.trigger_id)+"/test",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async invokeTriggerWebhook(t){return e.send({op:"InvokeTriggerWebhook",method:"POST",path:"/ai/triggers/"+c("InvokeTriggerWebhook","trigger_id",t.path.trigger_id)+"/hook",auth:[],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listWaits(t){return e.send({op:"ListWaits",method:"GET",path:"/ai/waits",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getWait(t){return e.send({op:"GetWait",method:"GET",path:"/ai/waits/"+c("GetWait","wait_id",t.path.wait_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async signalWait(t){return e.send({op:"SignalWait",method:"POST",path:"/ai/waits/"+c("SignalWait","wait_id",t.path.wait_id)+"/signal",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async cancelWait(t){return e.send({op:"CancelWait",method:"POST",path:"/ai/waits/"+c("CancelWait","wait_id",t.path.wait_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listWorkflowRuns(t){return e.send({op:"ListWorkflowRuns",method:"GET",path:"/ai/workflows/runs",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createWorkflowRun(t){return e.send({op:"CreateWorkflowRun",method:"POST",path:"/ai/workflows/runs",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getWorkflowRun(t){return e.send({op:"GetWorkflowRun",method:"GET",path:"/ai/workflows/runs/"+c("GetWorkflowRun","run_id",t.path.run_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async recordWorkflowStep(t){return e.send({op:"RecordWorkflowStep",method:"POST",path:"/ai/workflows/runs/"+c("RecordWorkflowStep","run_id",t.path.run_id)+"/steps/"+c("RecordWorkflowStep","step_key",t.path.step_key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async completeWorkflowRun(t){return e.send({op:"CompleteWorkflowRun",method:"POST",path:"/ai/workflows/runs/"+c("CompleteWorkflowRun","run_id",t.path.run_id)+"/complete",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async replayWorkflowRun(t){return e.send({op:"ReplayWorkflowRun",method:"POST",path:"/ai/workflows/runs/"+c("ReplayWorkflowRun","run_id",t.path.run_id)+"/replay",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stopRunTree(t){return e.send({op:"StopRunTree",method:"POST",path:"/ai/runs/"+c("StopRunTree","root_id",t.path.root_id)+"/stop-tree",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getMemory(t){return e.send({op:"GetMemory",method:"GET",path:"/ai/memory/"+c("GetMemory","namespace",t.path.namespace)+"/"+c("GetMemory","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putMemory(t){return e.send({op:"PutMemory",method:"PUT",path:"/ai/memory/"+c("PutMemory","namespace",t.path.namespace)+"/"+c("PutMemory","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMemory(t){return e.send({op:"DeleteMemory",method:"DELETE",path:"/ai/memory/"+c("DeleteMemory","namespace",t.path.namespace)+"/"+c("DeleteMemory","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async searchMemory(t){return e.send({op:"SearchMemory",method:"POST",path:"/ai/memory/search",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listActorGroupMembers(t){return e.send({op:"ListActorGroupMembers",method:"GET",path:"/ai/groups/"+c("ListActorGroupMembers","group_id",t.path.group_id)+"/members",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async addActorGroupMember(t){return e.send({op:"AddActorGroupMember",method:"POST",path:"/ai/groups/"+c("AddActorGroupMember","group_id",t.path.group_id)+"/members",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async broadcastActorGroup(t){return e.send({op:"BroadcastActorGroup",method:"POST",path:"/ai/groups/"+c("BroadcastActorGroup","group_id",t.path.group_id)+"/broadcast",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getA2AAgentCard(t){return e.send({op:"GetA2AAgentCard",method:"GET",path:"/.well-known/agent.json",auth:[],answers:{200:"json"},signal:t?.signal})},async callA2Arpc(t){return e.send({op:"CallA2ARPC",method:"POST",path:"/ai/a2a",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async putMcpUserCredential(t){return e.send({op:"PutMCPUserCredential",method:"POST",path:"/ai/endpoints/"+c("PutMCPUserCredential","name",t.path.name)+"/user-credentials/"+c("PutMCPUserCredential","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMcpUserCredential(t){return e.send({op:"DeleteMCPUserCredential",method:"DELETE",path:"/ai/endpoints/"+c("DeleteMCPUserCredential","name",t.path.name)+"/user-credentials/"+c("DeleteMCPUserCredential","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async startMcpoAuth(t){return e.send({op:"StartMCPOAuth",method:"GET",path:"/ai/endpoints/"+c("StartMCPOAuth","name",t.path.name)+"/oauth/start",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async completeMcpoAuthCallback(t){return e.send({op:"CompleteMCPOAuthCallback",method:"GET",path:"/ai/mcp/oauth/callback",auth:[],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listTemplates(t){return e.send({op:"ListTemplates",method:"GET",path:"/ai/templates",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getTemplate(t){return e.send({op:"GetTemplate",method:"GET",path:"/ai/templates/"+c("GetTemplate","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putTemplate(t){return e.send({op:"PutTemplate",method:"PUT",path:"/ai/templates/"+c("PutTemplate","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteTemplate(t){return e.send({op:"DeleteTemplate",method:"DELETE",path:"/ai/templates/"+c("DeleteTemplate","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async publishTemplate(t){return e.send({op:"PublishTemplate",method:"POST",path:"/ai/templates/"+c("PublishTemplate","name",t.path.name)+"/publish",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rollbackTemplate(t){return e.send({op:"RollbackTemplate",method:"POST",path:"/ai/templates/"+c("RollbackTemplate","name",t.path.name)+"/rollback",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTemplateVersions(t){return e.send({op:"ListTemplateVersions",method:"GET",path:"/ai/templates/"+c("ListTemplateVersions","name",t.path.name)+"/versions",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listUserSpend(t){return e.send({op:"ListUserSpend",method:"GET",path:"/ai/users/spend",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getUserQuota(t){return e.send({op:"GetUserQuota",method:"GET",path:"/ai/users/"+c("GetUserQuota","user_id",t.path.user_id)+"/quota",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putUserQuota(t){return e.send({op:"PutUserQuota",method:"PUT",path:"/ai/users/"+c("PutUserQuota","user_id",t.path.user_id)+"/quota",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteUserQuota(t){return e.send({op:"DeleteUserQuota",method:"DELETE",path:"/ai/users/"+c("DeleteUserQuota","user_id",t.path.user_id)+"/quota",auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async clientAttestChallenge(t){return e.send({op:"ClientAttestChallenge",method:"POST",path:"/ai/client/attest-challenge",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async runClientTemplate(t){return e.send({op:"RunClientTemplate",method:"POST",path:"/ai/client/templates/"+c("RunClientTemplate","name",t.path.name)+"/run",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async voiceClientTemplate(t){return e.send({op:"VoiceClientTemplate",method:"POST",path:"/ai/client/templates/"+c("VoiceClientTemplate","name",t.path.name)+"/voice",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createMachineKey(t){return e.send({op:"CreateMachineKey",method:"POST",path:"/ai/machine-keys",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMachines(t){return e.send({op:"ListMachines",method:"GET",path:"/ai/machines",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})}}}var Co={};wt(Co,{client:()=>BS});function BS(e){return{async listAudiences(t){return e.send({op:"ListAudiences",method:"GET",path:"/analytics/audiences",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createAudience(t){return e.send({op:"CreateAudience",method:"POST",path:"/analytics/audiences",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async previewAudience(t){return e.send({op:"PreviewAudience",method:"POST",path:"/analytics/audiences/preview",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getAudience(t){return e.send({op:"GetAudience",method:"GET",path:"/analytics/audiences/"+c("GetAudience","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteAudience(t){return e.send({op:"DeleteAudience",method:"DELETE",path:"/analytics/audiences/"+c("DeleteAudience","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateAudience(t){return e.send({op:"UpdateAudience",method:"PATCH",path:"/analytics/audiences/"+c("UpdateAudience","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listAudienceMembers(t){return e.send({op:"ListAudienceMembers",method:"GET",path:"/analytics/audiences/"+c("ListAudienceMembers","id",t.path.id)+"/members",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async alias(t){return e.send({op:"Alias",method:"POST",path:"/analytics/alias",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async batch(t){return e.send({op:"Batch",method:"POST",path:"/analytics/batch",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json",207:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getEventBreakdown(t){return e.send({op:"GetEventBreakdown",method:"GET",path:"/analytics/breakdown",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async capture(t){return e.send({op:"Capture",method:"POST",path:"/analytics/capture",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sendConsoleHistory(t){return e.send({op:"SendConsoleHistory",method:"POST",path:"/analytics/console-breadcrumbs",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getConsoleConfig(t){return e.send({op:"GetConsoleConfig",method:"GET",path:"/analytics/console-breadcrumbs/config",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listConsoleRecords(t){return e.send({op:"ListConsoleRecords",method:"GET",path:"/analytics/console-records",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listEventNames(t){return e.send({op:"ListEventNames",method:"GET",path:"/analytics/event-names",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listEvents(t){return e.send({op:"ListEvents",method:"GET",path:"/analytics/events",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getEventTimeline(t){return e.send({op:"GetEventTimeline",method:"GET",path:"/analytics/events/timeline",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async runFunnel(t){return e.send({op:"RunFunnel",method:"POST",path:"/analytics/funnel",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async identify(t){return e.send({op:"Identify",method:"POST",path:"/analytics/identify",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async page(t){return e.send({op:"Page",method:"POST",path:"/analytics/page",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sendPerf(t){return e.send({op:"SendPerf",method:"POST",path:"/analytics/perf",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPerfGroups(t){return e.send({op:"ListPerfGroups",method:"GET",path:"/analytics/perf/client",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getPerfConfig(t){return e.send({op:"GetPerfConfig",method:"GET",path:"/analytics/perf/config",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json",304:"empty"},headers:t?.headers,signal:t?.signal})},async getPerfTimeline(t){return e.send({op:"GetPerfTimeline",method:"GET",path:"/analytics/perf/timeline",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listRequestLines(t){return e.send({op:"ListRequestLines",method:"GET",path:"/analytics/requests",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getMachineTraffic(t){return e.send({op:"GetMachineTraffic",method:"GET",path:"/analytics/machines/"+c("GetMachineTraffic","name",t.path.name)+"/traffic",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async runRetention(t){return e.send({op:"RunRetention",method:"POST",path:"/analytics/retention",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async screen(t){return e.send({op:"Screen",method:"POST",path:"/analytics/screen",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSettings(t){return e.send({op:"GetSettings",method:"GET",path:"/analytics/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putSettings(t){return e.send({op:"PutSettings",method:"PUT",path:"/analytics/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSummary(t){return e.send({op:"GetSummary",method:"GET",path:"/analytics/summary",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listTraces(t){return e.send({op:"ListTraces",method:"GET",path:"/analytics/traces",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async sendTrace(t){return e.send({op:"SendTrace",method:"POST",path:"/analytics/traces",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sendTraceBatch(t){return e.send({op:"SendTraceBatch",method:"POST",path:"/analytics/traces/batch",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"json",207:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getTraceHops(t){return e.send({op:"GetTraceHops",method:"GET",path:"/analytics/traces/by-trace",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listSessionTraces(t){return e.send({op:"ListSessionTraces",method:"GET",path:"/analytics/traces/session",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getTraceSummary(t){return e.send({op:"GetTraceSummary",method:"GET",path:"/analytics/traces/summary",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getTraceTimeline(t){return e.send({op:"GetTraceTimeline",method:"GET",path:"/analytics/traces/timeline",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async searchPeople(t){return e.send({op:"SearchPeople",method:"GET",path:"/analytics/people",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async setPersonProperties(t){return e.send({op:"SetPersonProperties",method:"POST",path:"/analytics/people",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{202:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPerson(t){return e.send({op:"GetPerson",method:"GET",path:"/analytics/people/"+c("GetPerson","person_id",t.path.person_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listPersonEvents(t){return e.send({op:"ListPersonEvents",method:"GET",path:"/analytics/people/"+c("ListPersonEvents","person_id",t.path.person_id)+"/events",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getEventCatalog(t){return e.send({op:"GetEventCatalog",method:"GET",path:"/analytics/catalog",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async defineEvent(t){return e.send({op:"DefineEvent",method:"PUT",path:"/analytics/catalog/"+c("DefineEvent","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var Oo={};wt(Oo,{client:()=>JS});function JS(e){return{async getAppleAppSiteAssociation(t){return e.send({op:"GetAppleAppSiteAssociation",method:"GET",path:"/.well-known/apple-app-site-association",auth:[],answers:{200:"json"},signal:t?.signal})},async getAssetLinks(t){return e.send({op:"GetAssetLinks",method:"GET",path:"/.well-known/assetlinks.json",auth:[],answers:{200:"json"},signal:t?.signal})},async getJwks(t){return e.send({op:"GetJWKS",method:"GET",path:"/.well-known/jwks.json",auth:[],answers:{200:"json"},signal:t?.signal})},async getOidcDiscovery(t){return e.send({op:"GetOIDCDiscovery",method:"GET",path:"/.well-known/openid-configuration",auth:[],answers:{200:"json"},signal:t?.signal})},async getWebAuthnRelatedOrigins(t){return e.send({op:"GetWebAuthnRelatedOrigins",method:"GET",path:"/.well-known/webauthn",auth:[],answers:{200:"json"},signal:t?.signal})},async adminVerifyDeviceAssertion(t){return e.send({op:"AdminVerifyDeviceAssertion",method:"POST",path:"/admin/attest/devices/assert",auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetAttestPolicy(t){return e.send({op:"AdminGetAttestPolicy",method:"GET",path:"/admin/attest/devices/attest-policy",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminGetAttestObservations(t){return e.send({op:"AdminGetAttestObservations",method:"GET",path:"/admin/attest/devices/observations",auth:[["AdminAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminRecordAttestObservations(t){return e.send({op:"AdminRecordAttestObservations",method:"POST",path:"/admin/attest/devices/observations",auth:[["AdminAuth"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListAuditEvents(t){return e.send({op:"AdminListAuditEvents",method:"GET",path:"/admin/audit",auth:[["AdminAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminExportAuditEvents(t){return e.send({op:"AdminExportAuditEvents",method:"GET",path:"/admin/audit/export",auth:[["AdminAuth"]],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async adminVerifyAuditTrail(t){return e.send({op:"AdminVerifyAuditTrail",method:"GET",path:"/admin/audit/verify",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminGetAuthSettings(t){return e.send({op:"AdminGetAuthSettings",method:"GET",path:"/admin/auth-settings",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminUpdateAuthSettings(t){return e.send({op:"AdminUpdateAuthSettings",method:"PUT",path:"/admin/auth-settings",auth:[["AdminAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetBreachWatch(t){return e.send({op:"AdminGetBreachWatch",method:"GET",path:"/admin/breach-watch",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminListHooks(t){return e.send({op:"AdminListHooks",method:"GET",path:"/admin/hooks",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminCreateHook(t){return e.send({op:"AdminCreateHook",method:"POST",path:"/admin/hooks",auth:[["AdminAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminUpdateHook(t){return e.send({op:"AdminUpdateHook",method:"PUT",path:"/admin/hooks/"+c("AdminUpdateHook","id",t.path.id),auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminDeleteHook(t){return e.send({op:"AdminDeleteHook",method:"DELETE",path:"/admin/hooks/"+c("AdminDeleteHook","id",t.path.id),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminListHookExecutions(t){return e.send({op:"AdminListHookExecutions",method:"GET",path:"/admin/hooks/"+c("AdminListHookExecutions","id",t.path.id)+"/executions",auth:[["AdminAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async adminListIntegrations(t){return e.send({op:"AdminListIntegrations",method:"GET",path:"/admin/integrations",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminPutIntegration(t){return e.send({op:"AdminPutIntegration",method:"PUT",path:"/admin/integrations/"+c("AdminPutIntegration","name",t.path.name),auth:[["AdminAuth"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminDeleteIntegration(t){return e.send({op:"AdminDeleteIntegration",method:"DELETE",path:"/admin/integrations/"+c("AdminDeleteIntegration","name",t.path.name),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminListOAuthClients(t){return e.send({op:"AdminListOAuthClients",method:"GET",path:"/admin/oauth-clients",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminCreateOAuthClient(t){return e.send({op:"AdminCreateOAuthClient",method:"POST",path:"/admin/oauth-clients",auth:[["AdminAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetOAuthClient(t){return e.send({op:"AdminGetOAuthClient",method:"GET",path:"/admin/oauth-clients/"+c("AdminGetOAuthClient","id",t.path.id),auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminDeleteOAuthClient(t){return e.send({op:"AdminDeleteOAuthClient",method:"DELETE",path:"/admin/oauth-clients/"+c("AdminDeleteOAuthClient","id",t.path.id),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminUpdateOAuthClient(t){return e.send({op:"AdminUpdateOAuthClient",method:"PATCH",path:"/admin/oauth-clients/"+c("AdminUpdateOAuthClient","id",t.path.id),auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListProviders(t){return e.send({op:"AdminListProviders",method:"GET",path:"/admin/providers",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminGetPhoneSettings(t){return e.send({op:"AdminGetPhoneSettings",method:"GET",path:"/admin/providers/phone/settings",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminUpdatePhoneSettings(t){return e.send({op:"AdminUpdatePhoneSettings",method:"PUT",path:"/admin/providers/phone/settings",auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminToggleProvider(t){return e.send({op:"AdminToggleProvider",method:"POST",path:"/admin/providers/"+c("AdminToggleProvider","name",t.path.name),auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListRoles(t){return e.send({op:"AdminListRoles",method:"GET",path:"/admin/roles",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminUpsertRole(t){return e.send({op:"AdminUpsertRole",method:"PUT",path:"/admin/roles/"+c("AdminUpsertRole","name",t.path.name),auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminDeleteRole(t){return e.send({op:"AdminDeleteRole",method:"DELETE",path:"/admin/roles/"+c("AdminDeleteRole","name",t.path.name),auth:[["AdminAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async adminListServiceAccounts(t){return e.send({op:"AdminListServiceAccounts",method:"GET",path:"/admin/service-accounts",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminCreateServiceAccount(t){return e.send({op:"AdminCreateServiceAccount",method:"POST",path:"/admin/service-accounts",auth:[["AdminAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetServiceAccount(t){return e.send({op:"AdminGetServiceAccount",method:"GET",path:"/admin/service-accounts/"+c("AdminGetServiceAccount","id",t.path.id),auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminRevokeServiceAccount(t){return e.send({op:"AdminRevokeServiceAccount",method:"DELETE",path:"/admin/service-accounts/"+c("AdminRevokeServiceAccount","id",t.path.id),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminRotateServiceAccount(t){return e.send({op:"AdminRotateServiceAccount",method:"POST",path:"/admin/service-accounts/"+c("AdminRotateServiceAccount","id",t.path.id)+"/rotate",auth:[["AdminAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async adminListSessions(t){return e.send({op:"AdminListSessions",method:"GET",path:"/admin/sessions",auth:[["AdminAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminRevokeSession(t){return e.send({op:"AdminRevokeSession",method:"DELETE",path:"/admin/sessions/"+c("AdminRevokeSession","id",t.path.id),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminListSigningKeys(t){return e.send({op:"AdminListSigningKeys",method:"GET",path:"/admin/signing-keys",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminRotateSigningKey(t){return e.send({op:"AdminRotateSigningKey",method:"POST",path:"/admin/signing-keys/rotate",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async socialAdminConfig(t){return e.send({op:"SocialAdminConfig",method:"GET",path:"/admin/social-auth",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async socialCredentialPut(t){return e.send({op:"SocialCredentialPut",method:"PUT",path:"/admin/social-auth/credentials/"+c("SocialCredentialPut","key",t.path.key),auth:[["AdminAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async socialCredentialDelete(t){return e.send({op:"SocialCredentialDelete",method:"DELETE",path:"/admin/social-auth/credentials/"+c("SocialCredentialDelete","key",t.path.key),auth:[["AdminAuth"]],answers:{204:"empty"},headers:t.headers,signal:t.signal})},async socialProviderPatch(t){return e.send({op:"SocialProviderPatch",method:"PATCH",path:"/admin/social-auth/providers/"+c("SocialProviderPatch","provider",t.path.provider),auth:[["AdminAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetStats(t){return e.send({op:"AdminGetStats",method:"GET",path:"/admin/stats",auth:[["AdminAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminSendTestTemplate(t){return e.send({op:"AdminSendTestTemplate",method:"POST",path:"/admin/templates/"+c("AdminSendTestTemplate","key",t.path.key)+"/send-test",auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListTestUsers(t){return e.send({op:"AdminListTestUsers",method:"GET",path:"/admin/test-users",auth:[["AdminAuth"]],answers:{200:"json"},signal:t?.signal})},async adminCreateTestUsers(t){return e.send({op:"AdminCreateTestUsers",method:"POST",path:"/admin/test-users",auth:[["AdminAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminSetTestUserPhone(t){return e.send({op:"AdminSetTestUserPhone",method:"PUT",path:"/admin/test-users/phone",auth:[["AdminAuth"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminCreateTestSignupAddress(t){return e.send({op:"AdminCreateTestSignupAddress",method:"POST",path:"/admin/test-users/addresses",auth:[["AdminAuth"]],answers:{201:"json"},signal:t?.signal})},async adminDeleteTestUser(t){return e.send({op:"AdminDeleteTestUser",method:"DELETE",path:"/admin/test-users/"+c("AdminDeleteTestUser","uid",t.path.uid),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminCreateCustomToken(t){return e.send({op:"AdminCreateCustomToken",method:"POST",path:"/admin/token/custom",auth:[["AdminAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListUsers(t){return e.send({op:"AdminListUsers",method:"GET",path:"/admin/users",auth:[["AdminAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminCreateUser(t){return e.send({op:"AdminCreateUser",method:"POST",path:"/admin/users",auth:[["AdminAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminImportUsers(t){return e.send({op:"AdminImportUsers",method:"POST",path:"/admin/users/import",auth:[["AdminAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetUser(t){return e.send({op:"AdminGetUser",method:"GET",path:"/admin/users/"+c("AdminGetUser","uid",t.path.uid),auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminDeleteUser(t){return e.send({op:"AdminDeleteUser",method:"DELETE",path:"/admin/users/"+c("AdminDeleteUser","uid",t.path.uid),auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminUpdateUser(t){return e.send({op:"AdminUpdateUser",method:"PATCH",path:"/admin/users/"+c("AdminUpdateUser","uid",t.path.uid),auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminBanUser(t){return e.send({op:"AdminBanUser",method:"POST",path:"/admin/users/"+c("AdminBanUser","uid",t.path.uid)+"/ban",auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetUserConsents(t){return e.send({op:"AdminGetUserConsents",method:"GET",path:"/admin/users/"+c("AdminGetUserConsents","uid",t.path.uid)+"/consents",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminRevokeUserCredentials(t){return e.send({op:"AdminRevokeUserCredentials",method:"POST",path:"/admin/users/"+c("AdminRevokeUserCredentials","uid",t.path.uid)+"/credentials/revoke-all",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminExportUser(t){return e.send({op:"AdminExportUser",method:"GET",path:"/admin/users/"+c("AdminExportUser","uid",t.path.uid)+"/export",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminListUserMfaFactors(t){return e.send({op:"AdminListUserMFAFactors",method:"GET",path:"/admin/users/"+c("AdminListUserMFAFactors","uid",t.path.uid)+"/mfa",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminResetUserMfa(t){return e.send({op:"AdminResetUserMFA",method:"DELETE",path:"/admin/users/"+c("AdminResetUserMFA","uid",t.path.uid)+"/mfa",auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminResetUserPassword(t){return e.send({op:"AdminResetUserPassword",method:"POST",path:"/admin/users/"+c("AdminResetUserPassword","uid",t.path.uid)+"/reset-password",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminListUserRoles(t){return e.send({op:"AdminListUserRoles",method:"GET",path:"/admin/users/"+c("AdminListUserRoles","uid",t.path.uid)+"/roles",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminAssignUserRole(t){return e.send({op:"AdminAssignUserRole",method:"PUT",path:"/admin/users/"+c("AdminAssignUserRole","uid",t.path.uid)+"/roles/"+c("AdminAssignUserRole","role",t.path.role),auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminRevokeUserRole(t){return e.send({op:"AdminRevokeUserRole",method:"DELETE",path:"/admin/users/"+c("AdminRevokeUserRole","uid",t.path.uid)+"/roles/"+c("AdminRevokeUserRole","role",t.path.role),auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminRevokeUserSessions(t){return e.send({op:"AdminRevokeUserSessions",method:"POST",path:"/admin/users/"+c("AdminRevokeUserSessions","uid",t.path.uid)+"/sessions/revoke-all",auth:[["AdminAuth"]],answers:{204:"empty"},signal:t.signal})},async adminUnbanUser(t){return e.send({op:"AdminUnbanUser",method:"POST",path:"/admin/users/"+c("AdminUnbanUser","uid",t.path.uid)+"/unban",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async signInAnonymously(t){return e.send({op:"SignInAnonymously",method:"POST",path:"/auth/anonymous",auth:[["ApiKeyAuth"]],answers:{201:"json"},headers:t?.headers,body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async convertAnonymousUser(t){return e.send({op:"ConvertAnonymousUser",method:"POST",path:"/auth/anonymous/convert",auth:[["ApiKeyAuth","userJWT"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async verifyAnonymousConversion(t){return e.send({op:"VerifyAnonymousConversion",method:"POST",path:"/auth/anonymous/convert/verify",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async devicePendingRequest(t){return e.send({op:"DevicePendingRequest",method:"GET",path:"/auth/device/requests/"+c("DevicePendingRequest","user_code",t.path.user_code),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async deviceVerifyPage(t){return e.send({op:"DeviceVerifyPage",method:"GET",path:"/auth/device/verify",auth:[["ApiKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async deviceVerifySubmit(t){return e.send({op:"DeviceVerifySubmit",method:"POST",path:"/auth/device/verify",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async listDevices(t){return e.send({op:"ListDevices",method:"GET",path:"/auth/devices",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async attestAndroidDevice(t){return e.send({op:"AttestAndroidDevice",method:"POST",path:"/auth/devices/attest/android",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async attestIosDevice(t){return e.send({op:"AttestIOSDevice",method:"POST",path:"/auth/devices/attest/ios",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async bindDeviceKey(t){return e.send({op:"BindDeviceKey",method:"POST",path:"/auth/devices/bind",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createDeviceChallenge(t){return e.send({op:"CreateDeviceChallenge",method:"POST",path:"/auth/devices/challenge",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t?.headers,signal:t?.signal})},async verifyAndroidIntegrity(t){return e.send({op:"VerifyAndroidIntegrity",method:"POST",path:"/auth/devices/verify/android",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteDevice(t){return e.send({op:"DeleteDevice",method:"DELETE",path:"/auth/devices/"+c("DeleteDevice","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async verifyDeviceSignature(t){return e.send({op:"VerifyDeviceSignature",method:"POST",path:"/auth/devices/"+c("VerifyDeviceSignature","id",t.path.id)+"/verify",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listIdentities(t){return e.send({op:"ListIdentities",method:"GET",path:"/auth/identities",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async unlinkIdentity(t){return e.send({op:"UnlinkIdentity",method:"DELETE",path:"/auth/identities/"+c("UnlinkIdentity","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async createInstallation(t){return e.send({op:"CreateInstallation",method:"POST",path:"/auth/installations",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async bindInstallation(t){return e.send({op:"BindInstallation",method:"POST",path:"/auth/installations/"+c("BindInstallation","id",t.path.id)+"/bind",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async refreshInstallation(t){return e.send({op:"RefreshInstallation",method:"POST",path:"/auth/installations/"+c("RefreshInstallation","id",t.path.id)+"/refresh",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async revokeInstallation(t){return e.send({op:"RevokeInstallation",method:"POST",path:"/auth/installations/"+c("RevokeInstallation","id",t.path.id)+"/revoke",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async unbindInstallation(t){return e.send({op:"UnbindInstallation",method:"POST",path:"/auth/installations/"+c("UnbindInstallation","id",t.path.id)+"/unbind",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async login(t){return e.send({op:"Login",method:"POST",path:"/auth/login",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async logout(t){return e.send({op:"Logout",method:"POST",path:"/auth/logout",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async magicLinkRequest(t){return e.send({op:"MagicLinkRequest",method:"POST",path:"/auth/magic-link",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async magicLinkVerify(t){return e.send({op:"MagicLinkVerify",method:"POST",path:"/auth/magic-link/verify",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getMe(t){return e.send({op:"GetMe",method:"GET",path:"/auth/me",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async updateMe(t){return e.send({op:"UpdateMe",method:"PATCH",path:"/auth/me",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaChallenge(t){return e.send({op:"MfaChallenge",method:"POST",path:"/auth/mfa/challenge",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaEmailChallenge(t){return e.send({op:"MfaEmailChallenge",method:"POST",path:"/auth/mfa/email/challenge",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaEmailEnroll(t){return e.send({op:"MfaEmailEnroll",method:"POST",path:"/auth/mfa/email/enroll",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async mfaEmailVerify(t){return e.send({op:"MfaEmailVerify",method:"POST",path:"/auth/mfa/email/verify",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaEnroll(t){return e.send({op:"MfaEnroll",method:"POST",path:"/auth/mfa/enroll",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaListFactors(t){return e.send({op:"MfaListFactors",method:"GET",path:"/auth/mfa/factors",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async mfaRemoveFactor(t){return e.send({op:"MfaRemoveFactor",method:"DELETE",path:"/auth/mfa/factors/"+c("MfaRemoveFactor","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaRecovery(t){return e.send({op:"MfaRecovery",method:"POST",path:"/auth/mfa/recovery",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaRegenerateRecoveryCodes(t){return e.send({op:"MfaRegenerateRecoveryCodes",method:"POST",path:"/auth/mfa/recovery-codes/regenerate",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async mfaSmsChallenge(t){return e.send({op:"MfaSMSChallenge",method:"POST",path:"/auth/mfa/sms/challenge",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaSmsEnroll(t){return e.send({op:"MfaSMSEnroll",method:"POST",path:"/auth/mfa/sms/enroll",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaSmsVerifyEnrollment(t){return e.send({op:"MfaSMSVerifyEnrollment",method:"POST",path:"/auth/mfa/sms/verify",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mfaVerifyEnrollment(t){return e.send({op:"MfaVerifyEnrollment",method:"POST",path:"/auth/mfa/verify",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async socialCallbackApple(t){return e.send({op:"SocialCallbackApple",method:"GET",path:"/auth/oauth/callback/apple",auth:[],answers:{},signal:t?.signal})},async socialCallbackApplePost(t){return e.send({op:"SocialCallbackApplePost",method:"POST",path:"/auth/oauth/callback/apple",auth:[],answers:{303:"redirect"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async socialCallbackGitHub(t){return e.send({op:"SocialCallbackGitHub",method:"GET",path:"/auth/oauth/callback/github",auth:[],answers:{303:"redirect"},query:t.query,signal:t.signal})},async socialCallbackGitHubPost(t){return e.send({op:"SocialCallbackGitHubPost",method:"POST",path:"/auth/oauth/callback/github",auth:[],answers:{},signal:t?.signal})},async socialCallbackGoogle(t){return e.send({op:"SocialCallbackGoogle",method:"GET",path:"/auth/oauth/callback/google",auth:[],answers:{303:"redirect"},query:t.query,signal:t.signal})},async socialCallbackGooglePost(t){return e.send({op:"SocialCallbackGooglePost",method:"POST",path:"/auth/oauth/callback/google",auth:[],answers:{},signal:t?.signal})},async socialCallbackMicrosoft(t){return e.send({op:"SocialCallbackMicrosoft",method:"GET",path:"/auth/oauth/callback/microsoft",auth:[],answers:{303:"redirect"},query:t.query,signal:t.signal})},async socialCallbackMicrosoftPost(t){return e.send({op:"SocialCallbackMicrosoftPost",method:"POST",path:"/auth/oauth/callback/microsoft",auth:[],answers:{},signal:t?.signal})},async socialConfig(t){return e.send({op:"SocialConfig",method:"GET",path:"/auth/oauth/config",auth:[["ApiKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async socialBegin(t){return e.send({op:"SocialBegin",method:"POST",path:"/auth/oauth/transactions",auth:[["ApiKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async socialCancel(t){return e.send({op:"SocialCancel",method:"POST",path:"/auth/oauth/transactions/"+c("SocialCancel","id",t.path.id)+"/cancel",auth:[["ApiKeyAuth"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async socialComplete(t){return e.send({op:"SocialComplete",method:"POST",path:"/auth/oauth/transactions/"+c("SocialComplete","id",t.path.id)+"/complete",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async requestPhoneOtp(t){return e.send({op:"RequestPhoneOTP",method:"POST",path:"/auth/otp",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async verifyPhoneOtp(t){return e.send({op:"VerifyPhoneOTP",method:"POST",path:"/auth/otp/verify",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async hostedRecoveryApprovalPage(t){return e.send({op:"HostedRecoveryApprovalPage",method:"GET",path:"/auth/pages/recovery-approval",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedRecoveryApprovalSubmit(t){return e.send({op:"HostedRecoveryApprovalSubmit",method:"POST",path:"/auth/pages/recovery-approval",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async hostedRecoveryContactPage(t){return e.send({op:"HostedRecoveryContactPage",method:"GET",path:"/auth/pages/recovery-contact",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedRecoveryContactSubmit(t){return e.send({op:"HostedRecoveryContactSubmit",method:"POST",path:"/auth/pages/recovery-contact",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async hostedResetPasswordPage(t){return e.send({op:"HostedResetPasswordPage",method:"GET",path:"/auth/pages/reset-password",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedResetPasswordSubmit(t){return e.send({op:"HostedResetPasswordSubmit",method:"POST",path:"/auth/pages/reset-password",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async hostedVerifyEmailPage(t){return e.send({op:"HostedVerifyEmailPage",method:"GET",path:"/auth/pages/verify-email",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedVerifyEmailSubmit(t){return e.send({op:"HostedVerifyEmailSubmit",method:"POST",path:"/auth/pages/verify-email",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async passwordChange(t){return e.send({op:"PasswordChange",method:"POST",path:"/auth/password/change",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async passwordResetRequest(t){return e.send({op:"PasswordResetRequest",method:"POST",path:"/auth/password/reset",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async passwordResetConfirm(t){return e.send({op:"PasswordResetConfirm",method:"POST",path:"/auth/password/reset/confirm",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async setPassword(t){return e.send({op:"SetPassword",method:"POST",path:"/auth/password/set",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async powChallenge(t){return e.send({op:"PowChallenge",method:"POST",path:"/auth/pow/challenge",auth:[["ApiKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async approveRecovery(t){return e.send({op:"ApproveRecovery",method:"POST",path:"/auth/recovery/approve",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listRecoveryContacts(t){return e.send({op:"ListRecoveryContacts",method:"GET",path:"/auth/recovery/contacts",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async addRecoveryContact(t){return e.send({op:"AddRecoveryContact",method:"POST",path:"/auth/recovery/contacts",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteRecoveryContact(t){return e.send({op:"DeleteRecoveryContact",method:"DELETE",path:"/auth/recovery/contacts/"+c("DeleteRecoveryContact","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async verifyRecoveryContact(t){return e.send({op:"VerifyRecoveryContact",method:"POST",path:"/auth/recovery/contacts/"+c("VerifyRecoveryContact","id",t.path.id)+"/verify",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async denyRecovery(t){return e.send({op:"DenyRecovery",method:"POST",path:"/auth/recovery/deny",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async initiateRecovery(t){return e.send({op:"InitiateRecovery",method:"POST",path:"/auth/recovery/initiate",auth:[["ApiKeyAuth"]],answers:{200:"json",202:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getRecoveryStatus(t){return e.send({op:"GetRecoveryStatus",method:"GET",path:"/auth/recovery/status",auth:[["ApiKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async resendVerification(t){return e.send({op:"ResendVerification",method:"POST",path:"/auth/resend-verification",auth:[["ApiKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSessions(t){return e.send({op:"ListSessions",method:"GET",path:"/auth/sessions",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async revokeAllSessions(t){return e.send({op:"RevokeAllSessions",method:"DELETE",path:"/auth/sessions",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async revokeSession(t){return e.send({op:"RevokeSession",method:"DELETE",path:"/auth/sessions/"+c("RevokeSession","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async signup(t){return e.send({op:"Signup",method:"POST",path:"/auth/signup",auth:[["ApiKeyAuth"]],answers:{201:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stepUp(t){return e.send({op:"StepUp",method:"POST",path:"/auth/step-up",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stepUpStatus(t){return e.send({op:"StepUpStatus",method:"GET",path:"/auth/step-up/status",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async stepUpWebAuthnBegin(t){return e.send({op:"StepUpWebAuthnBegin",method:"POST",path:"/auth/step-up/webauthn/begin",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async stepUpSmsSend(t){return e.send({op:"StepUpSMSSend",method:"POST",path:"/auth/step-up/sms/send",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async exchangeCustomToken(t){return e.send({op:"ExchangeCustomToken",method:"POST",path:"/auth/token/exchange",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async refreshToken(t){return e.send({op:"RefreshToken",method:"POST",path:"/auth/token/refresh",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revokeRefreshToken(t){return e.send({op:"RevokeRefreshToken",method:"POST",path:"/auth/token/revoke",auth:[["ApiKeyAuth"]],answers:{200:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTransactions(t){return e.send({op:"ListTransactions",method:"GET",path:"/auth/transactions",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createTransaction(t){return e.send({op:"CreateTransaction",method:"POST",path:"/auth/transactions",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getTransaction(t){return e.send({op:"GetTransaction",method:"GET",path:"/auth/transactions/"+c("GetTransaction","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async approveTransaction(t){return e.send({op:"ApproveTransaction",method:"POST",path:"/auth/transactions/"+c("ApproveTransaction","id",t.path.id)+"/approve",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async denyTransaction(t){return e.send({op:"DenyTransaction",method:"POST",path:"/auth/transactions/"+c("DenyTransaction","id",t.path.id)+"/deny",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTrustedDevices(t){return e.send({op:"ListTrustedDevices",method:"GET",path:"/auth/trusted-devices",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async registerTrustedDevice(t){return e.send({op:"RegisterTrustedDevice",method:"POST",path:"/auth/trusted-devices",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revokeTrustedDevice(t){return e.send({op:"RevokeTrustedDevice",method:"DELETE",path:"/auth/trusted-devices/"+c("RevokeTrustedDevice","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async verifyTokenUser(t){return e.send({op:"VerifyTokenUser",method:"GET",path:"/auth/user",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async deleteAccount(t){return e.send({op:"DeleteAccount",method:"DELETE",path:"/auth/user",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async verifyEmail(t){return e.send({op:"VerifyEmail",method:"POST",path:"/auth/verify-email",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnListCredentials(t){return e.send({op:"WebauthnListCredentials",method:"GET",path:"/auth/webauthn/credentials",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async webauthnRenameCredential(t){return e.send({op:"WebauthnRenameCredential",method:"PUT",path:"/auth/webauthn/credentials/"+c("WebauthnRenameCredential","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnDeleteCredential(t){return e.send({op:"WebauthnDeleteCredential",method:"DELETE",path:"/auth/webauthn/credentials/"+c("WebauthnDeleteCredential","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async webauthnLoginBegin(t){return e.send({op:"WebauthnLoginBegin",method:"POST",path:"/auth/webauthn/login/begin",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async webauthnLoginFinish(t){return e.send({op:"WebauthnLoginFinish",method:"POST",path:"/auth/webauthn/login/finish",auth:[["ApiKeyAuth"]],answers:{200:"json"},query:t.query,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnRecoveryBegin(t){return e.send({op:"WebauthnRecoveryBegin",method:"POST",path:"/auth/webauthn/recovery/begin",auth:[["ApiKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async webauthnRecoveryFinish(t){return e.send({op:"WebauthnRecoveryFinish",method:"POST",path:"/auth/webauthn/recovery/finish",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnRecoveryRegisterBegin(t){return e.send({op:"WebauthnRecoveryRegisterBegin",method:"POST",path:"/auth/webauthn/recovery/register/begin",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async webauthnRecoveryRegisterFinish(t){return e.send({op:"WebauthnRecoveryRegisterFinish",method:"POST",path:"/auth/webauthn/recovery/register/finish",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnRegisterBegin(t){return e.send({op:"WebauthnRegisterBegin",method:"POST",path:"/auth/webauthn/register/begin",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async webauthnRegisterFinish(t){return e.send({op:"WebauthnRegisterFinish",method:"POST",path:"/auth/webauthn/register/finish",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnSignupBegin(t){return e.send({op:"WebauthnSignupBegin",method:"POST",path:"/auth/webauthn/signup/begin",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async webauthnSignupFinish(t){return e.send({op:"WebauthnSignupFinish",method:"POST",path:"/auth/webauthn/signup/finish",auth:[["ApiKeyAuth"]],answers:{201:"json"},query:t.query,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async oauthAuthorize(t){return e.send({op:"OauthAuthorize",method:"GET",path:"/oauth/authorize",auth:[],answers:{302:"redirect",303:"redirect"},query:t?.query,signal:t?.signal})},async oauthAuthorizePost(t){return e.send({op:"OauthAuthorizePost",method:"POST",path:"/oauth/authorize",auth:[],answers:{302:"redirect",303:"redirect"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async oauthAuthorizeCallback(t){return e.send({op:"OauthAuthorizeCallback",method:"GET",path:"/oauth/authorize/callback",auth:[],answers:{303:"redirect"},query:t.query,signal:t.signal})},async oauthAuthorizeEmailLink(t){return e.send({op:"OauthAuthorizeEmailLink",method:"GET",path:"/oauth/authorize/email",auth:[],answers:{200:"raw",303:"redirect"},query:t.query,signal:t.signal})},async oauthDeviceAuthorize(t){return e.send({op:"OauthDeviceAuthorize",method:"POST",path:"/oauth/device",auth:[["OAuthClient"],[]],answers:{200:"json"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async oauthIntrospect(t){return e.send({op:"OauthIntrospect",method:"POST",path:"/oauth/introspect",auth:[["AdminAuth"],["OAuthClient"],[]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async oauthLogout(t){return e.send({op:"OauthLogout",method:"GET",path:"/oauth/logout",auth:[],answers:{302:"redirect"},query:t?.query,signal:t?.signal})},async oauthLogoutPost(t){return e.send({op:"OauthLogoutPost",method:"POST",path:"/oauth/logout",auth:[],answers:{302:"redirect"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t?.body},signal:t?.signal})},async oauthPar(t){return e.send({op:"OauthPAR",method:"POST",path:"/oauth/par",auth:[["OAuthClient"],[]],answers:{201:"json"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async oauthRevoke(t){return e.send({op:"OauthRevoke",method:"POST",path:"/oauth/revoke",auth:[["OAuthClient"],[]],answers:{200:"empty"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async oauthToken(t){return e.send({op:"OauthToken",method:"POST",path:"/oauth/token",auth:[["OAuthClient"],[]],answers:{200:"json"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async oauthUserinfo(t){return e.send({op:"OauthUserinfo",method:"GET",path:"/oauth/userinfo",auth:[["OAuthAccessToken"]],answers:{200:"json"},signal:t?.signal})},async oauthUserinfoPost(t){return e.send({op:"OauthUserinfoPost",method:"POST",path:"/oauth/userinfo",auth:[["OAuthAccessToken"]],answers:{200:"json"},signal:t?.signal})},async ownerCliCode(t){return e.send({op:"OwnerCLICode",method:"POST",path:"/auth/cli/owner-code",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listConsentKeys(t){return e.send({op:"ListConsentKeys",method:"GET",path:"/auth/consents/keys",auth:[["ApiKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getConsents(t){return e.send({op:"GetConsents",method:"GET",path:"/auth/consents",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,headers:t.headers,signal:t.signal})},async chooseConsents(t){return e.send({op:"ChooseConsents",method:"PUT",path:"/auth/consents",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async linkConsents(t){return e.send({op:"LinkConsents",method:"POST",path:"/auth/consents/link",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetInstallationConsents(t){return e.send({op:"AdminGetInstallationConsents",method:"GET",path:"/admin/installations/"+c("AdminGetInstallationConsents","installation_id",t.path.installation_id)+"/consents",auth:[["AdminAuth"]],answers:{200:"json"},signal:t.signal})},async adminRefuseConsents(t){return e.send({op:"AdminRefuseConsents",method:"POST",path:"/admin/consents/refuse",auth:[["AdminAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminInviteUser(t){return e.send({op:"AdminInviteUser",method:"POST",path:"/admin/users/invite",auth:[["AdminAuth"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async acceptInvitation(t){return e.send({op:"AcceptInvitation",method:"POST",path:"/auth/invitations/accept",auth:[["ApiKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async hostedAcceptInvitationPage(t){return e.send({op:"HostedAcceptInvitationPage",method:"GET",path:"/auth/pages/accept-invitation",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedAcceptInvitationSubmit(t){return e.send({op:"HostedAcceptInvitationSubmit",method:"POST",path:"/auth/pages/accept-invitation",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async hostedNotMePage(t){return e.send({op:"HostedNotMePage",method:"GET",path:"/auth/pages/not-me",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async hostedNotMeSubmit(t){return e.send({op:"HostedNotMeSubmit",method:"POST",path:"/auth/pages/not-me",auth:[],answers:{200:"raw"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})}}}var tr={};wt(tr,{client:()=>HS});function HS(e){return{async getCacheEntry(t){return e.send({op:"GetCacheEntry",method:"GET",path:"/cache/entry",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async putCacheEntry(t){return e.send({op:"PutCacheEntry",method:"PUT",path:"/cache/entry",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteCacheEntry(t){return e.send({op:"DeleteCacheEntry",method:"DELETE",path:"/cache/entry",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async incrementCacheEntry(t){return e.send({op:"IncrementCacheEntry",method:"POST",path:"/cache/entry/increment",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getCacheUsage(t){return e.send({op:"GetCacheUsage",method:"GET",path:"/cache/usage",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})}}}var nr={};wt(nr,{client:()=>VS});function VS(e){return{async listCalls(t){return e.send({op:"ListCalls",method:"GET",path:"/calls",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async startCall(t){return e.send({op:"StartCall",method:"POST",path:"/calls",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListCalls(t){return e.send({op:"AdminListCalls",method:"GET",path:"/calls/admin/calls",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminGetCall(t){return e.send({op:"AdminGetCall",method:"GET",path:"/calls/admin/calls/"+c("AdminGetCall","call_id",t.path.call_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminEndCall(t){return e.send({op:"AdminEndCall",method:"POST",path:"/calls/admin/calls/"+c("AdminEndCall","call_id",t.path.call_id)+"/end",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createCallTicket(t){return e.send({op:"CreateCallTicket",method:"POST",path:"/calls/admin/calls/"+c("CreateCallTicket","call_id",t.path.call_id)+"/tickets",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetCallTranscription(t){return e.send({op:"AdminGetCallTranscription",method:"GET",path:"/calls/admin/calls/"+c("AdminGetCallTranscription","call_id",t.path.call_id)+"/transcription",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async adminStartCallTranscription(t){return e.send({op:"AdminStartCallTranscription",method:"POST",path:"/calls/admin/calls/"+c("AdminStartCallTranscription","call_id",t.path.call_id)+"/transcription",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminStopCallTranscription(t){return e.send({op:"AdminStopCallTranscription",method:"DELETE",path:"/calls/admin/calls/"+c("AdminStopCallTranscription","call_id",t.path.call_id)+"/transcription",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminIngestCallTranscriptionAudio(t){return e.send({op:"AdminIngestCallTranscriptionAudio",method:"POST",path:"/calls/admin/calls/"+c("AdminIngestCallTranscriptionAudio","call_id",t.path.call_id)+"/transcription/audio",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},body:{kind:"raw",contentType:t.contentType??"multipart/form-data",value:t.body},signal:t.signal})},async getCallPlace(t){return e.send({op:"GetCallPlace",method:"GET",path:"/calls/places/"+c("GetCallPlace","place",t.path.place),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async watchCallPlace(t){return e.send({op:"WatchCallPlace",method:"POST",path:"/calls/places/"+c("WatchCallPlace","place",t.path.place)+"/watch",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async unwatchCallPlace(t){return e.send({op:"UnwatchCallPlace",method:"DELETE",path:"/calls/places/"+c("UnwatchCallPlace","place",t.path.place)+"/watch",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async getCallSettings(t){return e.send({op:"GetCallSettings",method:"GET",path:"/calls/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putCallSettings(t){return e.send({op:"PutCallSettings",method:"PUT",path:"/calls/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rotateCallHookSecret(t){return e.send({op:"RotateCallHookSecret",method:"POST",path:"/calls/settings/hook-secret",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getCall(t){return e.send({op:"GetCall",method:"GET",path:"/calls/"+c("GetCall","call_id",t.path.call_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async acceptCall(t){return e.send({op:"AcceptCall",method:"POST",path:"/calls/"+c("AcceptCall","call_id",t.path.call_id)+"/accept",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async declineCall(t){return e.send({op:"DeclineCall",method:"POST",path:"/calls/"+c("DeclineCall","call_id",t.path.call_id)+"/decline",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async callHeartbeat(t){return e.send({op:"CallHeartbeat",method:"POST",path:"/calls/"+c("CallHeartbeat","call_id",t.path.call_id)+"/heartbeat",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async joinCall(t){return e.send({op:"JoinCall",method:"POST",path:"/calls/"+c("JoinCall","call_id",t.path.call_id)+"/join",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async leaveCall(t){return e.send({op:"LeaveCall",method:"POST",path:"/calls/"+c("LeaveCall","call_id",t.path.call_id)+"/leave",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async getCallMedia(t){return e.send({op:"GetCallMedia",method:"POST",path:"/calls/"+c("GetCallMedia","call_id",t.path.call_id)+"/media",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async inviteToCall(t){return e.send({op:"InviteToCall",method:"POST",path:"/calls/"+c("InviteToCall","call_id",t.path.call_id)+"/participants",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCallTranscription(t){return e.send({op:"GetCallTranscription",method:"GET",path:"/calls/"+c("GetCallTranscription","call_id",t.path.call_id)+"/transcription",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async ingestCallTranscriptionAudio(t){return e.send({op:"IngestCallTranscriptionAudio",method:"POST",path:"/calls/"+c("IngestCallTranscriptionAudio","call_id",t.path.call_id)+"/transcription/audio",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json",201:"json"},body:{kind:"raw",contentType:t.contentType??"multipart/form-data",value:t.body},signal:t.signal})}}}var sr={};wt(sr,{client:()=>XS});function XS(e){return{async listBroadcasts(t){return e.send({op:"ListBroadcasts",method:"GET",path:"/campaigns/broadcasts",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createBroadcast(t){return e.send({op:"CreateBroadcast",method:"POST",path:"/campaigns/broadcasts",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async recordBroadcastConversion(t){return e.send({op:"RecordBroadcastConversion",method:"POST",path:"/campaigns/broadcasts/conversions",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getBroadcast(t){return e.send({op:"GetBroadcast",method:"GET",path:"/campaigns/broadcasts/"+c("GetBroadcast","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateBroadcast(t){return e.send({op:"UpdateBroadcast",method:"PUT",path:"/campaigns/broadcasts/"+c("UpdateBroadcast","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteBroadcast(t){return e.send({op:"DeleteBroadcast",method:"DELETE",path:"/campaigns/broadcasts/"+c("DeleteBroadcast","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async cancelBroadcast(t){return e.send({op:"CancelBroadcast",method:"POST",path:"/campaigns/broadcasts/"+c("CancelBroadcast","id",t.path.id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async pauseBroadcast(t){return e.send({op:"PauseBroadcast",method:"POST",path:"/campaigns/broadcasts/"+c("PauseBroadcast","id",t.path.id)+"/pause",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async startBroadcast(t){return e.send({op:"StartBroadcast",method:"POST",path:"/campaigns/broadcasts/"+c("StartBroadcast","id",t.path.id)+"/start",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getBroadcastStats(t){return e.send({op:"GetBroadcastStats",method:"GET",path:"/campaigns/broadcasts/"+c("GetBroadcastStats","id",t.path.id)+"/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listTrackingLinks(t){return e.send({op:"ListTrackingLinks",method:"GET",path:"/campaigns/links",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createTrackingLink(t){return e.send({op:"CreateTrackingLink",method:"POST",path:"/campaigns/links",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async attributeLinkConversion(t){return e.send({op:"AttributeLinkConversion",method:"POST",path:"/campaigns/links/attribute",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getTrackingLink(t){return e.send({op:"GetTrackingLink",method:"GET",path:"/campaigns/links/"+c("GetTrackingLink","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateTrackingLink(t){return e.send({op:"UpdateTrackingLink",method:"PUT",path:"/campaigns/links/"+c("UpdateTrackingLink","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteTrackingLink(t){return e.send({op:"DeleteTrackingLink",method:"DELETE",path:"/campaigns/links/"+c("DeleteTrackingLink","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async getTrackingLinkStats(t){return e.send({op:"GetTrackingLinkStats",method:"GET",path:"/campaigns/links/"+c("GetTrackingLinkStats","id",t.path.id)+"/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listOnSiteCampaigns(t){return e.send({op:"ListOnSiteCampaigns",method:"GET",path:"/campaigns/onsite",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createOnSiteCampaign(t){return e.send({op:"CreateOnSiteCampaign",method:"POST",path:"/campaigns/onsite",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createOnSiteImpression(t){return e.send({op:"CreateOnSiteImpression",method:"POST",path:"/campaigns/onsite/impressions",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async recordOnSiteEvent(t){return e.send({op:"RecordOnSiteEvent",method:"POST",path:"/campaigns/onsite/impressions/"+c("RecordOnSiteEvent","id",t.path.id)+"/events",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listOnSiteMessages(t){return e.send({op:"ListOnSiteMessages",method:"GET",path:"/campaigns/onsite/messages",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getOnSiteSettings(t){return e.send({op:"GetOnSiteSettings",method:"GET",path:"/campaigns/onsite/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putOnSiteSettings(t){return e.send({op:"PutOnSiteSettings",method:"PUT",path:"/campaigns/onsite/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listOnSiteTemplates(t){return e.send({op:"ListOnSiteTemplates",method:"GET",path:"/campaigns/onsite/templates",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getOnSiteCampaign(t){return e.send({op:"GetOnSiteCampaign",method:"GET",path:"/campaigns/onsite/"+c("GetOnSiteCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateOnSiteCampaign(t){return e.send({op:"UpdateOnSiteCampaign",method:"PUT",path:"/campaigns/onsite/"+c("UpdateOnSiteCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteOnSiteCampaign(t){return e.send({op:"DeleteOnSiteCampaign",method:"DELETE",path:"/campaigns/onsite/"+c("DeleteOnSiteCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async getOnSiteCampaignStats(t){return e.send({op:"GetOnSiteCampaignStats",method:"GET",path:"/campaigns/onsite/"+c("GetOnSiteCampaignStats","id",t.path.id)+"/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async redirectTrackingLink(t){return e.send({op:"RedirectTrackingLink",method:"GET",path:"/l/"+c("RedirectTrackingLink","slug",t.path.slug),auth:[[]],answers:{302:"redirect"},signal:t.signal})},async headTrackingLink(t){return e.send({op:"HeadTrackingLink",method:"HEAD",path:"/l/"+c("HeadTrackingLink","slug",t.path.slug),auth:[[]],answers:{302:"redirect"},signal:t.signal})}}}var ar={};wt(ar,{client:()=>YS});function YS(e){return{async listBrands(t){return e.send({op:"ListBrands",method:"GET",path:"/commerce/brands",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createBrand(t){return e.send({op:"CreateBrand",method:"POST",path:"/commerce/brands",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createCart(t){return e.send({op:"CreateCart",method:"POST",path:"/commerce/carts",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCart(t){return e.send({op:"GetCart",method:"GET",path:"/commerce/carts/"+c("GetCart","cart_id",t.path.cart_id),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateCart(t){return e.send({op:"UpdateCart",method:"PATCH",path:"/commerce/carts/"+c("UpdateCart","cart_id",t.path.cart_id),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async checkoutCart(t){return e.send({op:"CheckoutCart",method:"POST",path:"/commerce/carts/"+c("CheckoutCart","cart_id",t.path.cart_id)+"/checkout",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addCartItem(t){return e.send({op:"AddCartItem",method:"POST",path:"/commerce/carts/"+c("AddCartItem","cart_id",t.path.cart_id)+"/items",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteCartItem(t){return e.send({op:"DeleteCartItem",method:"DELETE",path:"/commerce/carts/"+c("DeleteCartItem","cart_id",t.path.cart_id)+"/items/"+c("DeleteCartItem","line_id",t.path.line_id),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateCartItem(t){return e.send({op:"UpdateCartItem",method:"PATCH",path:"/commerce/carts/"+c("UpdateCartItem","cart_id",t.path.cart_id)+"/items/"+c("UpdateCartItem","line_id",t.path.line_id),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async mergeGuestCart(t){return e.send({op:"MergeGuestCart",method:"POST",path:"/commerce/carts/"+c("MergeGuestCart","cart_id",t.path.cart_id)+"/merge",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async applyCartPromoCode(t){return e.send({op:"ApplyCartPromoCode",method:"POST",path:"/commerce/carts/"+c("ApplyCartPromoCode","cart_id",t.path.cart_id)+"/promo-codes",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeCartPromoCode(t){return e.send({op:"RemoveCartPromoCode",method:"DELETE",path:"/commerce/carts/"+c("RemoveCartPromoCode","cart_id",t.path.cart_id)+"/promo-codes/"+c("RemoveCartPromoCode","code",t.path.code),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async selectCartShipping(t){return e.send({op:"SelectCartShipping",method:"POST",path:"/commerce/carts/"+c("SelectCartShipping","cart_id",t.path.cart_id)+"/shipping",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async storefrontListBrands(t){return e.send({op:"StorefrontListBrands",method:"GET",path:"/commerce/catalog/brands",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async storefrontListCategories(t){return e.send({op:"StorefrontListCategories",method:"GET",path:"/commerce/catalog/categories",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async storefrontListChannels(t){return e.send({op:"StorefrontListChannels",method:"GET",path:"/commerce/catalog/channels",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async storefrontListCollections(t){return e.send({op:"StorefrontListCollections",method:"GET",path:"/commerce/catalog/collections",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async storefrontListProducts(t){return e.send({op:"StorefrontListProducts",method:"GET",path:"/commerce/catalog/products",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async storefrontSearchProducts(t){return e.send({op:"StorefrontSearchProducts",method:"POST",path:"/commerce/catalog/search",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async storefrontSuggest(t){return e.send({op:"StorefrontSuggest",method:"GET",path:"/commerce/catalog/suggest",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async storefrontRecommendProducts(t){return e.send({op:"StorefrontRecommendProducts",method:"POST",path:"/commerce/catalog/recommend",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async storefrontProductRecommendations(t){return e.send({op:"StorefrontProductRecommendations",method:"GET",path:"/commerce/catalog/products/"+c("StorefrontProductRecommendations","product_id_or_handle",t.path.product_id_or_handle)+"/recommendations",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async storefrontGetProduct(t){return e.send({op:"StorefrontGetProduct",method:"GET",path:"/commerce/catalog/products/"+c("StorefrontGetProduct","product_id_or_handle",t.path.product_id_or_handle),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async storefrontListProductReviews(t){return e.send({op:"StorefrontListProductReviews",method:"GET",path:"/commerce/catalog/products/"+c("StorefrontListProductReviews","product_id_or_handle",t.path.product_id_or_handle)+"/reviews",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async storefrontListRegions(t){return e.send({op:"StorefrontListRegions",method:"GET",path:"/commerce/catalog/regions",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async storefrontListStores(t){return e.send({op:"StorefrontListStores",method:"GET",path:"/commerce/catalog/stores",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async storefrontGetStore(t){return e.send({op:"StorefrontGetStore",method:"GET",path:"/commerce/catalog/stores/"+c("StorefrontGetStore","store_id_or_slug",t.path.store_id_or_slug),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async storefrontListStoreReviews(t){return e.send({op:"StorefrontListStoreReviews",method:"GET",path:"/commerce/catalog/stores/"+c("StorefrontListStoreReviews","store_id_or_slug",t.path.store_id_or_slug)+"/reviews",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listCategories(t){return e.send({op:"ListCategories",method:"GET",path:"/commerce/categories",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createCategory(t){return e.send({op:"CreateCategory",method:"POST",path:"/commerce/categories",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listChannels(t){return e.send({op:"ListChannels",method:"GET",path:"/commerce/channels",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createChannel(t){return e.send({op:"CreateChannel",method:"POST",path:"/commerce/channels",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async attachChannelRegion(t){return e.send({op:"AttachChannelRegion",method:"PUT",path:"/commerce/channels/"+c("AttachChannelRegion","channel_id",t.path.channel_id)+"/regions/"+c("AttachChannelRegion","region_id",t.path.region_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async attachChannelStore(t){return e.send({op:"AttachChannelStore",method:"PUT",path:"/commerce/channels/"+c("AttachChannelStore","channel_id",t.path.channel_id)+"/stores/"+c("AttachChannelStore","store_id",t.path.store_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async detachChannelStore(t){return e.send({op:"DetachChannelStore",method:"DELETE",path:"/commerce/channels/"+c("DetachChannelStore","channel_id",t.path.channel_id)+"/stores/"+c("DetachChannelStore","store_id",t.path.store_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listCollections(t){return e.send({op:"ListCollections",method:"GET",path:"/commerce/collections",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createCollection(t){return e.send({op:"CreateCollection",method:"POST",path:"/commerce/collections",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addCollectionProduct(t){return e.send({op:"AddCollectionProduct",method:"PUT",path:"/commerce/collections/"+c("AddCollectionProduct","collection_id",t.path.collection_id)+"/products/"+c("AddCollectionProduct","product_id",t.path.product_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async removeCollectionProduct(t){return e.send({op:"RemoveCollectionProduct",method:"DELETE",path:"/commerce/collections/"+c("RemoveCollectionProduct","collection_id",t.path.collection_id)+"/products/"+c("RemoveCollectionProduct","product_id",t.path.product_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createDigitalAsset(t){return e.send({op:"CreateDigitalAsset",method:"POST",path:"/commerce/digital-assets",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateFulfillment(t){return e.send({op:"UpdateFulfillment",method:"PATCH",path:"/commerce/fulfillments/"+c("UpdateFulfillment","fulfillment_id",t.path.fulfillment_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addShipmentEvent(t){return e.send({op:"AddShipmentEvent",method:"POST",path:"/commerce/fulfillments/"+c("AddShipmentEvent","fulfillment_id",t.path.fulfillment_id)+"/events",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listDiscoveryStrategies(t){return e.send({op:"ListDiscoveryStrategies",method:"GET",path:"/commerce/discovery/strategies",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createDiscoveryStrategy(t){return e.send({op:"CreateDiscoveryStrategy",method:"POST",path:"/commerce/discovery/strategies",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getDiscoveryStrategy(t){return e.send({op:"GetDiscoveryStrategy",method:"GET",path:"/commerce/discovery/strategies/"+c("GetDiscoveryStrategy","strategy_id",t.path.strategy_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteDiscoveryStrategy(t){return e.send({op:"DeleteDiscoveryStrategy",method:"DELETE",path:"/commerce/discovery/strategies/"+c("DeleteDiscoveryStrategy","strategy_id",t.path.strategy_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateDiscoveryStrategy(t){return e.send({op:"UpdateDiscoveryStrategy",method:"PATCH",path:"/commerce/discovery/strategies/"+c("UpdateDiscoveryStrategy","strategy_id",t.path.strategy_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMerchandisingRules(t){return e.send({op:"ListMerchandisingRules",method:"GET",path:"/commerce/discovery/rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createMerchandisingRule(t){return e.send({op:"CreateMerchandisingRule",method:"POST",path:"/commerce/discovery/rules",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getMerchandisingRule(t){return e.send({op:"GetMerchandisingRule",method:"GET",path:"/commerce/discovery/rules/"+c("GetMerchandisingRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteMerchandisingRule(t){return e.send({op:"DeleteMerchandisingRule",method:"DELETE",path:"/commerce/discovery/rules/"+c("DeleteMerchandisingRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateMerchandisingRule(t){return e.send({op:"UpdateMerchandisingRule",method:"PATCH",path:"/commerce/discovery/rules/"+c("UpdateMerchandisingRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSearchSynonyms(t){return e.send({op:"ListSearchSynonyms",method:"GET",path:"/commerce/discovery/synonyms",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createSearchSynonym(t){return e.send({op:"CreateSearchSynonym",method:"POST",path:"/commerce/discovery/synonyms",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteSearchSynonym(t){return e.send({op:"DeleteSearchSynonym",method:"DELETE",path:"/commerce/discovery/synonyms/"+c("DeleteSearchSynonym","synonym_id",t.path.synonym_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async refreshDiscoverySignals(t){return e.send({op:"RefreshDiscoverySignals",method:"POST",path:"/commerce/discovery/signals/refresh",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listHooks(t){return e.send({op:"ListHooks",method:"GET",path:"/commerce/hooks",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async upsertHook(t){return e.send({op:"UpsertHook",method:"POST",path:"/commerce/hooks",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteHook(t){return e.send({op:"DeleteHook",method:"DELETE",path:"/commerce/hooks/"+c("DeleteHook","hook_id",t.path.hook_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listInventory(t){return e.send({op:"ListInventory",method:"GET",path:"/commerce/inventory",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adjustInventory(t){return e.send({op:"AdjustInventory",method:"POST",path:"/commerce/inventory/adjust",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async bulkSyncInventory(t){return e.send({op:"BulkSyncInventory",method:"POST",path:"/commerce/inventory/bulk-sync",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listInventoryMovements(t){return e.send({op:"ListInventoryMovements",method:"GET",path:"/commerce/inventory/movements",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listInvoices(t){return e.send({op:"ListInvoices",method:"GET",path:"/commerce/invoices",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createInvoice(t){return e.send({op:"CreateInvoice",method:"POST",path:"/commerce/invoices",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateInvoice(t){return e.send({op:"UpdateInvoice",method:"PATCH",path:"/commerce/invoices/"+c("UpdateInvoice","invoice_id",t.path.invoice_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listListings(t){return e.send({op:"ListListings",method:"GET",path:"/commerce/listings",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createListing(t){return e.send({op:"CreateListing",method:"POST",path:"/commerce/listings",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateListing(t){return e.send({op:"UpdateListing",method:"PATCH",path:"/commerce/listings/"+c("UpdateListing","listing_id",t.path.listing_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async importLicenseKeys(t){return e.send({op:"ImportLicenseKeys",method:"POST",path:"/commerce/listings/"+c("ImportLicenseKeys","listing_id",t.path.listing_id)+"/license-keys",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async upsertPrice(t){return e.send({op:"UpsertPrice",method:"POST",path:"/commerce/listings/"+c("UpsertPrice","listing_id",t.path.listing_id)+"/prices",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMyOrders(t){return e.send({op:"ListMyOrders",method:"GET",path:"/commerce/me/orders",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getMyOrder(t){return e.send({op:"GetMyOrder",method:"GET",path:"/commerce/me/orders/"+c("GetMyOrder","order_id",t.path.order_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async getMyOrderDownloads(t){return e.send({op:"GetMyOrderDownloads",method:"GET",path:"/commerce/me/orders/"+c("GetMyOrderDownloads","order_id",t.path.order_id)+"/downloads",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async createProductReview(t){return e.send({op:"CreateProductReview",method:"POST",path:"/commerce/me/products/"+c("CreateProductReview","product_id_or_handle",t.path.product_id_or_handle)+"/reviews",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMyReturns(t){return e.send({op:"ListMyReturns",method:"GET",path:"/commerce/me/returns",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async listMyReviews(t){return e.send({op:"ListMyReviews",method:"GET",path:"/commerce/me/reviews",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async mintReviewUploadUrl(t){return e.send({op:"MintReviewUploadURL",method:"POST",path:"/commerce/me/reviews/upload-url",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMyReview(t){return e.send({op:"DeleteMyReview",method:"DELETE",path:"/commerce/me/reviews/"+c("DeleteMyReview","review_id",t.path.review_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async voteReview(t){return e.send({op:"VoteReview",method:"POST",path:"/commerce/me/reviews/"+c("VoteReview","review_id",t.path.review_id)+"/vote",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async requestMyReturn(t){return e.send({op:"RequestMyReturn",method:"POST",path:"/commerce/me/store-orders/"+c("RequestMyReturn","store_order_id",t.path.store_order_id)+"/returns",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createStoreReview(t){return e.send({op:"CreateStoreReview",method:"POST",path:"/commerce/me/stores/"+c("CreateStoreReview","store_id_or_slug",t.path.store_id_or_slug)+"/reviews",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createMediaAsset(t){return e.send({op:"CreateMediaAsset",method:"POST",path:"/commerce/media",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listOrders(t){return e.send({op:"ListOrders",method:"GET",path:"/commerce/orders",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getGuestOrder(t){return e.send({op:"GetGuestOrder",method:"GET",path:"/commerce/orders/guest/"+c("GetGuestOrder","order_number",t.path.order_number),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getOrder(t){return e.send({op:"GetOrder",method:"GET",path:"/commerce/orders/"+c("GetOrder","order_id",t.path.order_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async markOrderPaid(t){return e.send({op:"MarkOrderPaid",method:"POST",path:"/commerce/orders/"+c("MarkOrderPaid","order_id",t.path.order_id)+"/mark-paid",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPriceLists(t){return e.send({op:"ListPriceLists",method:"GET",path:"/commerce/price-lists",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createPriceList(t){return e.send({op:"CreatePriceList",method:"POST",path:"/commerce/price-lists",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listProducts(t){return e.send({op:"ListProducts",method:"GET",path:"/commerce/products",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createProduct(t){return e.send({op:"CreateProduct",method:"POST",path:"/commerce/products",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createQuickProduct(t){return e.send({op:"CreateQuickProduct",method:"POST",path:"/commerce/products/quick",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getProduct(t){return e.send({op:"GetProduct",method:"GET",path:"/commerce/products/"+c("GetProduct","product_id",t.path.product_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateProduct(t){return e.send({op:"UpdateProduct",method:"PATCH",path:"/commerce/products/"+c("UpdateProduct","product_id",t.path.product_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async approveProduct(t){return e.send({op:"ApproveProduct",method:"POST",path:"/commerce/products/"+c("ApproveProduct","product_id",t.path.product_id)+"/approval",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async upsertProductOption(t){return e.send({op:"UpsertProductOption",method:"POST",path:"/commerce/products/"+c("UpsertProductOption","product_id",t.path.product_id)+"/options",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createVariant(t){return e.send({op:"CreateVariant",method:"POST",path:"/commerce/products/"+c("CreateVariant","product_id",t.path.product_id)+"/variants",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listRegions(t){return e.send({op:"ListRegions",method:"GET",path:"/commerce/regions",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createRegion(t){return e.send({op:"CreateRegion",method:"POST",path:"/commerce/regions",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateRegion(t){return e.send({op:"UpdateRegion",method:"PATCH",path:"/commerce/regions/"+c("UpdateRegion","region_id",t.path.region_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listReturns(t){return e.send({op:"ListReturns",method:"GET",path:"/commerce/returns",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async approveReturn(t){return e.send({op:"ApproveReturn",method:"POST",path:"/commerce/returns/"+c("ApproveReturn","return_id",t.path.return_id)+"/approve",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rejectReturn(t){return e.send({op:"RejectReturn",method:"POST",path:"/commerce/returns/"+c("RejectReturn","return_id",t.path.return_id)+"/reject",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async completeReturn(t){return e.send({op:"CompleteReturn",method:"POST",path:"/commerce/returns/"+c("CompleteReturn","return_id",t.path.return_id)+"/complete",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async receiveReturn(t){return e.send({op:"ReceiveReturn",method:"POST",path:"/commerce/returns/"+c("ReceiveReturn","return_id",t.path.return_id)+"/receive",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListReviews(t){return e.send({op:"AdminListReviews",method:"GET",path:"/commerce/reviews",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminDeleteReview(t){return e.send({op:"AdminDeleteReview",method:"DELETE",path:"/commerce/reviews/"+c("AdminDeleteReview","review_id",t.path.review_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async adminModerateReview(t){return e.send({op:"AdminModerateReview",method:"PATCH",path:"/commerce/reviews/"+c("AdminModerateReview","review_id",t.path.review_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCommerceSettings(t){return e.send({op:"GetCommerceSettings",method:"GET",path:"/commerce/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async updateCommerceSettings(t){return e.send({op:"UpdateCommerceSettings",method:"PUT",path:"/commerce/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSettlements(t){return e.send({op:"ListSettlements",method:"GET",path:"/commerce/settlements",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async generateSettlement(t){return e.send({op:"GenerateSettlement",method:"POST",path:"/commerce/settlements/generate",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async markSettlementPaid(t){return e.send({op:"MarkSettlementPaid",method:"POST",path:"/commerce/settlements/"+c("MarkSettlementPaid","settlement_id",t.path.settlement_id)+"/mark-paid",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listShippingOptions(t){return e.send({op:"ListShippingOptions",method:"GET",path:"/commerce/shipping-options",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createShippingOption(t){return e.send({op:"CreateShippingOption",method:"POST",path:"/commerce/shipping-options",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listShippingProfiles(t){return e.send({op:"ListShippingProfiles",method:"GET",path:"/commerce/shipping-profiles",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createShippingProfile(t){return e.send({op:"CreateShippingProfile",method:"POST",path:"/commerce/shipping-profiles",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listStockLocations(t){return e.send({op:"ListStockLocations",method:"GET",path:"/commerce/stock-locations",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createStockLocation(t){return e.send({op:"CreateStockLocation",method:"POST",path:"/commerce/stock-locations",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listStoreOrders(t){return e.send({op:"ListStoreOrders",method:"GET",path:"/commerce/store-orders",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getStoreOrder(t){return e.send({op:"GetStoreOrder",method:"GET",path:"/commerce/store-orders/"+c("GetStoreOrder","store_order_id",t.path.store_order_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelStoreOrder(t){return e.send({op:"CancelStoreOrder",method:"POST",path:"/commerce/store-orders/"+c("CancelStoreOrder","store_order_id",t.path.store_order_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createFulfillment(t){return e.send({op:"CreateFulfillment",method:"POST",path:"/commerce/store-orders/"+c("CreateFulfillment","store_order_id",t.path.store_order_id)+"/fulfillments",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createReturn(t){return e.send({op:"CreateReturn",method:"POST",path:"/commerce/store-orders/"+c("CreateReturn","store_order_id",t.path.store_order_id)+"/returns",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listStores(t){return e.send({op:"ListStores",method:"GET",path:"/commerce/stores",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createStore(t){return e.send({op:"CreateStore",method:"POST",path:"/commerce/stores",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getStore(t){return e.send({op:"GetStore",method:"GET",path:"/commerce/stores/"+c("GetStore","store_id",t.path.store_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateStore(t){return e.send({op:"UpdateStore",method:"PATCH",path:"/commerce/stores/"+c("UpdateStore","store_id",t.path.store_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerUpdateFulfillment(t){return e.send({op:"SellerUpdateFulfillment",method:"PATCH",path:"/commerce/stores/"+c("SellerUpdateFulfillment","store_id",t.path.store_id)+"/fulfillments/"+c("SellerUpdateFulfillment","fulfillment_id",t.path.fulfillment_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerAddShipmentEvent(t){return e.send({op:"SellerAddShipmentEvent",method:"POST",path:"/commerce/stores/"+c("SellerAddShipmentEvent","store_id",t.path.store_id)+"/fulfillments/"+c("SellerAddShipmentEvent","fulfillment_id",t.path.fulfillment_id)+"/events",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListInventory(t){return e.send({op:"SellerListInventory",method:"GET",path:"/commerce/stores/"+c("SellerListInventory","store_id",t.path.store_id)+"/inventory",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerAdjustInventory(t){return e.send({op:"SellerAdjustInventory",method:"POST",path:"/commerce/stores/"+c("SellerAdjustInventory","store_id",t.path.store_id)+"/inventory/adjust",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerBulkSyncInventory(t){return e.send({op:"SellerBulkSyncInventory",method:"POST",path:"/commerce/stores/"+c("SellerBulkSyncInventory","store_id",t.path.store_id)+"/inventory/bulk-sync",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListListings(t){return e.send({op:"SellerListListings",method:"GET",path:"/commerce/stores/"+c("SellerListListings","store_id",t.path.store_id)+"/listings",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerCreateListing(t){return e.send({op:"SellerCreateListing",method:"POST",path:"/commerce/stores/"+c("SellerCreateListing","store_id",t.path.store_id)+"/listings",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerUpdateListing(t){return e.send({op:"SellerUpdateListing",method:"PATCH",path:"/commerce/stores/"+c("SellerUpdateListing","store_id",t.path.store_id)+"/listings/"+c("SellerUpdateListing","listing_id",t.path.listing_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerImportLicenseKeys(t){return e.send({op:"SellerImportLicenseKeys",method:"POST",path:"/commerce/stores/"+c("SellerImportLicenseKeys","store_id",t.path.store_id)+"/listings/"+c("SellerImportLicenseKeys","listing_id",t.path.listing_id)+"/license-keys",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerUpsertPrice(t){return e.send({op:"SellerUpsertPrice",method:"POST",path:"/commerce/stores/"+c("SellerUpsertPrice","store_id",t.path.store_id)+"/listings/"+c("SellerUpsertPrice","listing_id",t.path.listing_id)+"/prices",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListStockLocations(t){return e.send({op:"SellerListStockLocations",method:"GET",path:"/commerce/stores/"+c("SellerListStockLocations","store_id",t.path.store_id)+"/locations",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerCreateStockLocation(t){return e.send({op:"SellerCreateStockLocation",method:"POST",path:"/commerce/stores/"+c("SellerCreateStockLocation","store_id",t.path.store_id)+"/locations",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addStoreMember(t){return e.send({op:"AddStoreMember",method:"POST",path:"/commerce/stores/"+c("AddStoreMember","store_id",t.path.store_id)+"/members",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeStoreMember(t){return e.send({op:"RemoveStoreMember",method:"DELETE",path:"/commerce/stores/"+c("RemoveStoreMember","store_id",t.path.store_id)+"/members/"+c("RemoveStoreMember","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerGetMetrics(t){return e.send({op:"SellerGetMetrics",method:"GET",path:"/commerce/stores/"+c("SellerGetMetrics","store_id",t.path.store_id)+"/metrics",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerListStoreOrders(t){return e.send({op:"SellerListStoreOrders",method:"GET",path:"/commerce/stores/"+c("SellerListStoreOrders","store_id",t.path.store_id)+"/orders",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async sellerGetStoreOrder(t){return e.send({op:"SellerGetStoreOrder",method:"GET",path:"/commerce/stores/"+c("SellerGetStoreOrder","store_id",t.path.store_id)+"/orders/"+c("SellerGetStoreOrder","store_order_id",t.path.store_order_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerCancelStoreOrder(t){return e.send({op:"SellerCancelStoreOrder",method:"POST",path:"/commerce/stores/"+c("SellerCancelStoreOrder","store_id",t.path.store_id)+"/orders/"+c("SellerCancelStoreOrder","store_order_id",t.path.store_order_id)+"/cancel",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerCreateFulfillment(t){return e.send({op:"SellerCreateFulfillment",method:"POST",path:"/commerce/stores/"+c("SellerCreateFulfillment","store_id",t.path.store_id)+"/orders/"+c("SellerCreateFulfillment","store_order_id",t.path.store_order_id)+"/fulfillments",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async onboardStorePaymentAccount(t){return e.send({op:"OnboardStorePaymentAccount",method:"POST",path:"/commerce/stores/"+c("OnboardStorePaymentAccount","store_id",t.path.store_id)+"/payment-accounts",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerOnboardPayouts(t){return e.send({op:"SellerOnboardPayouts",method:"POST",path:"/commerce/stores/"+c("SellerOnboardPayouts","store_id",t.path.store_id)+"/payouts/onboard",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerOnboardingLink(t){return e.send({op:"SellerOnboardingLink",method:"POST",path:"/commerce/stores/"+c("SellerOnboardingLink","store_id",t.path.store_id)+"/payouts/onboarding-link",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListProducts(t){return e.send({op:"SellerListProducts",method:"GET",path:"/commerce/stores/"+c("SellerListProducts","store_id",t.path.store_id)+"/products",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async sellerCreateProduct(t){return e.send({op:"SellerCreateProduct",method:"POST",path:"/commerce/stores/"+c("SellerCreateProduct","store_id",t.path.store_id)+"/products",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerCreateQuickProduct(t){return e.send({op:"SellerCreateQuickProduct",method:"POST",path:"/commerce/stores/"+c("SellerCreateQuickProduct","store_id",t.path.store_id)+"/products/quick",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerCreatePromotionRule(t){return e.send({op:"SellerCreatePromotionRule",method:"POST",path:"/commerce/stores/"+c("SellerCreatePromotionRule","store_id",t.path.store_id)+"/promotions/rules",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListReturns(t){return e.send({op:"SellerListReturns",method:"GET",path:"/commerce/stores/"+c("SellerListReturns","store_id",t.path.store_id)+"/returns",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerApproveReturn(t){return e.send({op:"SellerApproveReturn",method:"POST",path:"/commerce/stores/"+c("SellerApproveReturn","store_id",t.path.store_id)+"/returns/"+c("SellerApproveReturn","return_id",t.path.return_id)+"/approve",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerRejectReturn(t){return e.send({op:"SellerRejectReturn",method:"POST",path:"/commerce/stores/"+c("SellerRejectReturn","store_id",t.path.store_id)+"/returns/"+c("SellerRejectReturn","return_id",t.path.return_id)+"/reject",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerCompleteReturn(t){return e.send({op:"SellerCompleteReturn",method:"POST",path:"/commerce/stores/"+c("SellerCompleteReturn","store_id",t.path.store_id)+"/returns/"+c("SellerCompleteReturn","return_id",t.path.return_id)+"/complete",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerReceiveReturn(t){return e.send({op:"SellerReceiveReturn",method:"POST",path:"/commerce/stores/"+c("SellerReceiveReturn","store_id",t.path.store_id)+"/returns/"+c("SellerReceiveReturn","return_id",t.path.return_id)+"/receive",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListReviews(t){return e.send({op:"SellerListReviews",method:"GET",path:"/commerce/stores/"+c("SellerListReviews","store_id",t.path.store_id)+"/reviews",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async sellerReplyReview(t){return e.send({op:"SellerReplyReview",method:"POST",path:"/commerce/stores/"+c("SellerReplyReview","store_id",t.path.store_id)+"/reviews/"+c("SellerReplyReview","review_id",t.path.review_id)+"/reply",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sellerListSettlements(t){return e.send({op:"SellerListSettlements",method:"GET",path:"/commerce/stores/"+c("SellerListSettlements","store_id",t.path.store_id)+"/settlements",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async sellerCreateShippingOption(t){return e.send({op:"SellerCreateShippingOption",method:"POST",path:"/commerce/stores/"+c("SellerCreateShippingOption","store_id",t.path.store_id)+"/shipping-options",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTaxRates(t){return e.send({op:"ListTaxRates",method:"GET",path:"/commerce/tax-rates",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async upsertTaxRate(t){return e.send({op:"UpsertTaxRate",method:"PUT",path:"/commerce/tax-rates",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateVariant(t){return e.send({op:"UpdateVariant",method:"PATCH",path:"/commerce/variants/"+c("UpdateVariant","variant_id",t.path.variant_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async setBundleItems(t){return e.send({op:"SetBundleItems",method:"POST",path:"/commerce/variants/"+c("SetBundleItems","variant_id",t.path.variant_id)+"/bundle-items",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async recomputeVariantBuyBox(t){return e.send({op:"RecomputeVariantBuyBox",method:"POST",path:"/commerce/variants/"+c("RecomputeVariantBuyBox","variant_id",t.path.variant_id)+"/buybox/recompute",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async revokePromotionCode(t){return e.send({op:"RevokePromotionCode",method:"DELETE",path:"/promotions/codes/"+c("RevokePromotionCode","code_id",t.path.code_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async evaluatePromotions(t){return e.send({op:"EvaluatePromotions",method:"POST",path:"/promotions/evaluate",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async holdPromotions(t){return e.send({op:"HoldPromotions",method:"POST",path:"/promotions/holds",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async commitPromotionHold(t){return e.send({op:"CommitPromotionHold",method:"POST",path:"/promotions/holds/"+c("CommitPromotionHold","hold_id",t.path.hold_id)+"/commit",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async releasePromotionHold(t){return e.send({op:"ReleasePromotionHold",method:"POST",path:"/promotions/holds/"+c("ReleasePromotionHold","hold_id",t.path.hold_id)+"/release",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listPromotionRedemptions(t){return e.send({op:"ListPromotionRedemptions",method:"GET",path:"/promotions/redemptions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async reversePromotionRedemption(t){return e.send({op:"ReversePromotionRedemption",method:"POST",path:"/promotions/redemptions/"+c("ReversePromotionRedemption","redemption_id",t.path.redemption_id)+"/reverse",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listPromotionRules(t){return e.send({op:"ListPromotionRules",method:"GET",path:"/promotions/rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createPromotionRule(t){return e.send({op:"CreatePromotionRule",method:"POST",path:"/promotions/rules",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPromotionRule(t){return e.send({op:"GetPromotionRule",method:"GET",path:"/promotions/rules/"+c("GetPromotionRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async archivePromotionRule(t){return e.send({op:"ArchivePromotionRule",method:"DELETE",path:"/promotions/rules/"+c("ArchivePromotionRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updatePromotionRule(t){return e.send({op:"UpdatePromotionRule",method:"PATCH",path:"/promotions/rules/"+c("UpdatePromotionRule","rule_id",t.path.rule_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async upsertPromotionBudget(t){return e.send({op:"UpsertPromotionBudget",method:"PUT",path:"/promotions/rules/"+c("UpsertPromotionBudget","rule_id",t.path.rule_id)+"/budgets/"+c("UpsertPromotionBudget","currency",t.path.currency),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPromotionCodes(t){return e.send({op:"ListPromotionCodes",method:"GET",path:"/promotions/rules/"+c("ListPromotionCodes","rule_id",t.path.rule_id)+"/codes",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createPromotionCode(t){return e.send({op:"CreatePromotionCode",method:"POST",path:"/promotions/rules/"+c("CreatePromotionCode","rule_id",t.path.rule_id)+"/codes",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async generatePromotionCodeBatch(t){return e.send({op:"GeneratePromotionCodeBatch",method:"POST",path:"/promotions/rules/"+c("GeneratePromotionCodeBatch","rule_id",t.path.rule_id)+"/codes/batch",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var xo={};wt(xo,{client:()=>ZS});function ZS(e){return{async getValues(t){return e.send({op:"GetValues",method:"GET",path:"/flags",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},headers:t?.headers,signal:t?.signal})},async batchUserValues(t){return e.send({op:"BatchUserValues",method:"POST",path:"/flags/batch",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getDelta(t){return e.send({op:"GetDelta",method:"GET",path:"/flags/delta",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json",304:"empty"},query:t?.query,headers:t?.headers,signal:t?.signal})},async getEvaluations(t){return e.send({op:"GetEvaluations",method:"GET",path:"/flags/evaluations",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listExperiments(t){return e.send({op:"ListExperiments",method:"GET",path:"/flags/experiments",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async startExperiment(t){return e.send({op:"StartExperiment",method:"POST",path:"/flags/experiments",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getExperiment(t){return e.send({op:"GetExperiment",method:"GET",path:"/flags/experiments/"+c("GetExperiment","experiment_id",t.path.experiment_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getExperimentResults(t){return e.send({op:"GetExperimentResults",method:"GET",path:"/flags/experiments/"+c("GetExperimentResults","experiment_id",t.path.experiment_id)+"/results",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async stopExperiment(t){return e.send({op:"StopExperiment",method:"POST",path:"/flags/experiments/"+c("StopExperiment","experiment_id",t.path.experiment_id)+"/stop",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async declareExperimentWinner(t){return e.send({op:"DeclareExperimentWinner",method:"POST",path:"/flags/experiments/"+c("DeclareExperimentWinner","experiment_id",t.path.experiment_id)+"/winner",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCurrentInstallations(t){return e.send({op:"GetCurrentInstallations",method:"GET",path:"/flags/installations/current",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getInstallationsDaily(t){return e.send({op:"GetInstallationsDaily",method:"GET",path:"/flags/installations/daily",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getSnapshot(t){return e.send({op:"GetSnapshot",method:"GET",path:"/flags/snapshot",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json",304:"empty"},headers:t?.headers,signal:t?.signal})},async listDefinitions(t){return e.send({op:"ListDefinitions",method:"GET",path:"/flags/system",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getDefinition(t){return e.send({op:"GetDefinition",method:"GET",path:"/flags/system/"+c("GetDefinition","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putDefinition(t){return e.send({op:"PutDefinition",method:"PUT",path:"/flags/system/"+c("PutDefinition","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteDefinition(t){return e.send({op:"DeleteDefinition",method:"DELETE",path:"/flags/system/"+c("DeleteDefinition","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async activateTemplates(t){return e.send({op:"ActivateTemplates",method:"POST",path:"/flags/templates/activation",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getActiveTemplate(t){return e.send({op:"GetActiveTemplate",method:"GET",path:"/flags/templates/active",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getTemplateCapabilities(t){return e.send({op:"GetTemplateCapabilities",method:"GET",path:"/flags/templates/capabilities",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getTemplateDraft(t){return e.send({op:"GetTemplateDraft",method:"GET",path:"/flags/templates/draft",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createTemplateDraft(t){return e.send({op:"CreateTemplateDraft",method:"POST",path:"/flags/templates/draft",auth:[["SecretKeyAuth"]],answers:{201:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async discardTemplateDraft(t){return e.send({op:"DiscardTemplateDraft",method:"DELETE",path:"/flags/templates/draft",auth:[["SecretKeyAuth"]],answers:{204:"empty"},headers:t.headers,signal:t.signal})},async putTemplateParameter(t){return e.send({op:"PutTemplateParameter",method:"PUT",path:"/flags/templates/draft/parameters/"+c("PutTemplateParameter","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeTemplateParameter(t){return e.send({op:"RemoveTemplateParameter",method:"DELETE",path:"/flags/templates/draft/parameters/"+c("RemoveTemplateParameter","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},headers:t.headers,signal:t.signal})},async reviewTemplateDraft(t){return e.send({op:"ReviewTemplateDraft",method:"GET",path:"/flags/templates/draft/review",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async publishTemplate(t){return e.send({op:"PublishTemplate",method:"POST",path:"/flags/templates/publish",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPublishReceipt(t){return e.send({op:"GetPublishReceipt",method:"POST",path:"/flags/templates/publish/receipt",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async restoreTemplateVersion(t){return e.send({op:"RestoreTemplateVersion",method:"POST",path:"/flags/templates/restore/"+c("RestoreTemplateVersion","version",t.path.version),auth:[["SecretKeyAuth"]],answers:{201:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTemplateVersions(t){return e.send({op:"ListTemplateVersions",method:"GET",path:"/flags/templates/versions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getTemplateVersion(t){return e.send({op:"GetTemplateVersion",method:"GET",path:"/flags/templates/versions/"+c("GetTemplateVersion","version",t.path.version),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getUserValues(t){return e.send({op:"GetUserValues",method:"GET",path:"/flags/users/"+c("GetUserValues","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},headers:t.headers,signal:t.signal})},async putUserValues(t){return e.send({op:"PutUserValues",method:"PUT",path:"/flags/users/"+c("PutUserValues","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteUserValues(t){return e.send({op:"DeleteUserValues",method:"DELETE",path:"/flags/users/"+c("DeleteUserValues","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putUserValue(t){return e.send({op:"PutUserValue",method:"PUT",path:"/flags/users/"+c("PutUserValue","user_id",t.path.user_id)+"/"+c("PutUserValue","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteUserValue(t){return e.send({op:"DeleteUserValue",method:"DELETE",path:"/flags/users/"+c("DeleteUserValue","user_id",t.path.user_id)+"/"+c("DeleteUserValue","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},headers:t.headers,signal:t.signal})}}}var Lo={};wt(Lo,{client:()=>QS});function QS(e){return{async getAppleAccount(t){return e.send({op:"GetAppleAccount",method:"GET",path:"/iap/apple",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async disconnectApple(t){return e.send({op:"DisconnectApple",method:"DELETE",path:"/iap/apple",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getAppleAccountToken(t){return e.send({op:"GetAppleAccountToken",method:"POST",path:"/iap/apple/account-token",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async getAppleConnectPage(t){return e.send({op:"GetAppleConnectPage",method:"GET",path:"/iap/apple/connect",auth:[],answers:{200:"raw"},signal:t?.signal})},async connectAppleKey(t){return e.send({op:"ConnectAppleKey",method:"POST",path:"/iap/apple/connect",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createAppleGrant(t){return e.send({op:"CreateAppleGrant",method:"POST",path:"/iap/apple/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getAppleReadiness(t){return e.send({op:"GetAppleReadiness",method:"GET",path:"/iap/apple/readiness",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async reportAppleTransactions(t){return e.send({op:"ReportAppleTransactions",method:"POST",path:"/iap/apple/transactions",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async setXcodeCertificate(t){return e.send({op:"SetXcodeCertificate",method:"PUT",path:"/iap/apple/xcode-certificate",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async clearXcodeCertificate(t){return e.send({op:"ClearXcodeCertificate",method:"DELETE",path:"/iap/apple/xcode-certificate",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async setXcodeOfferKey(t){return e.send({op:"SetXcodeOfferKey",method:"PUT",path:"/iap/apple/xcode-offer-key",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCatalog(t){return e.send({op:"GetCatalog",method:"GET",path:"/iap/catalog",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async saveCatalog(t){return e.send({op:"SaveCatalog",method:"PUT",path:"/iap/catalog",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async planCatalog(t){return e.send({op:"PlanCatalog",method:"POST",path:"/iap/catalog/plans",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getCatalogPlan(t){return e.send({op:"GetCatalogPlan",method:"GET",path:"/iap/catalog/plans/"+c("GetCatalogPlan","plan_id",t.path.plan_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async confirmCatalogPlan(t){return e.send({op:"ConfirmCatalogPlan",method:"POST",path:"/iap/catalog/plans/"+c("ConfirmCatalogPlan","plan_id",t.path.plan_id)+"/confirm",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async declineCatalogPlan(t){return e.send({op:"DeclineCatalogPlan",method:"POST",path:"/iap/catalog/plans/"+c("DeclineCatalogPlan","plan_id",t.path.plan_id)+"/decline",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async listCatalogRevisions(t){return e.send({op:"ListCatalogRevisions",method:"GET",path:"/iap/catalog/revisions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getCatalogRevision(t){return e.send({op:"GetCatalogRevision",method:"GET",path:"/iap/catalog/revisions/"+c("GetCatalogRevision","revision",t.path.revision),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async restoreCatalogRevision(t){return e.send({op:"RestoreCatalogRevision",method:"POST",path:"/iap/catalog/revisions/"+c("RestoreCatalogRevision","revision",t.path.revision)+"/restore",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async validateCatalog(t){return e.send({op:"ValidateCatalog",method:"POST",path:"/iap/catalog/validate",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listCharts(t){return e.send({op:"ListCharts",method:"GET",path:"/iap/charts",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getChartsOverview(t){return e.send({op:"GetChartsOverview",method:"GET",path:"/iap/charts/overview",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getChart(t){return e.send({op:"GetChart",method:"GET",path:"/iap/charts/"+c("GetChart","chart",t.path.chart),auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async createCheckout(t){return e.send({op:"CreateCheckout",method:"POST",path:"/iap/checkout",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createCheckoutRedemption(t){return e.send({op:"CreateCheckoutRedemption",method:"POST",path:"/iap/checkout/redemption",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listCoupons(t){return e.send({op:"ListCoupons",method:"GET",path:"/iap/coupons",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createCoupon(t){return e.send({op:"CreateCoupon",method:"POST",path:"/iap/coupons",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async redeemCoupon(t){return e.send({op:"RedeemCoupon",method:"POST",path:"/iap/coupons/redeem",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCoupon(t){return e.send({op:"GetCoupon",method:"GET",path:"/iap/coupons/"+c("GetCoupon","coupon_key",t.path.coupon_key),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async revokeCoupon(t){return e.send({op:"RevokeCoupon",method:"DELETE",path:"/iap/coupons/"+c("RevokeCoupon","coupon_key",t.path.coupon_key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listCouponCodes(t){return e.send({op:"ListCouponCodes",method:"GET",path:"/iap/coupons/"+c("ListCouponCodes","coupon_key",t.path.coupon_key)+"/codes",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async searchCustomers(t){return e.send({op:"SearchCustomers",method:"GET",path:"/iap/customers",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getCustomer(t){return e.send({op:"GetCustomer",method:"GET",path:"/iap/customers/"+c("GetCustomer","customer_id",t.path.customer_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async grantCredits(t){return e.send({op:"GrantCredits",method:"POST",path:"/iap/customers/"+c("GrantCredits","customer_id",t.path.customer_id)+"/credits",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listCreditEntries(t){return e.send({op:"ListCreditEntries",method:"GET",path:"/iap/customers/"+c("ListCreditEntries","customer_id",t.path.customer_id)+"/credits/entries",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async forgiveCredits(t){return e.send({op:"ForgiveCredits",method:"POST",path:"/iap/customers/"+c("ForgiveCredits","customer_id",t.path.customer_id)+"/credits/forgive",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listCustomerGrants(t){return e.send({op:"ListCustomerGrants",method:"GET",path:"/iap/customers/"+c("ListCustomerGrants","customer_id",t.path.customer_id)+"/grants",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async grantEntitlement(t){return e.send({op:"GrantEntitlement",method:"POST",path:"/iap/customers/"+c("GrantEntitlement","customer_id",t.path.customer_id)+"/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revokeGrant(t){return e.send({op:"RevokeGrant",method:"DELETE",path:"/iap/customers/"+c("RevokeGrant","customer_id",t.path.customer_id)+"/grants/"+c("RevokeGrant","grant_id",t.path.grant_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async getCustomerHistory(t){return e.send({op:"GetCustomerHistory",method:"GET",path:"/iap/customers/"+c("GetCustomerHistory","customer_id",t.path.customer_id)+"/history",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async holdSpend(t){return e.send({op:"HoldSpend",method:"POST",path:"/iap/customers/"+c("HoldSpend","customer_id",t.path.customer_id)+"/holds",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async setCustomerLimit(t){return e.send({op:"SetCustomerLimit",method:"PUT",path:"/iap/customers/"+c("SetCustomerLimit","customer_id",t.path.customer_id)+"/limits/"+c("SetCustomerLimit","limit_key",t.path.limit_key),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async clearCustomerLimit(t){return e.send({op:"ClearCustomerLimit",method:"DELETE",path:"/iap/customers/"+c("ClearCustomerLimit","customer_id",t.path.customer_id)+"/limits/"+c("ClearCustomerLimit","limit_key",t.path.limit_key),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async grantLimit(t){return e.send({op:"GrantLimit",method:"POST",path:"/iap/customers/"+c("GrantLimit","customer_id",t.path.customer_id)+"/limits/"+c("GrantLimit","limit_key",t.path.limit_key)+"/grants",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async spend(t){return e.send({op:"Spend",method:"POST",path:"/iap/customers/"+c("Spend","customer_id",t.path.customer_id)+"/spend",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async commitSpend(t){return e.send({op:"CommitSpend",method:"POST",path:"/iap/customers/"+c("CommitSpend","customer_id",t.path.customer_id)+"/spends/"+c("CommitSpend","spend_id",t.path.spend_id)+"/commit",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async extendHold(t){return e.send({op:"ExtendHold",method:"POST",path:"/iap/customers/"+c("ExtendHold","customer_id",t.path.customer_id)+"/spends/"+c("ExtendHold","spend_id",t.path.spend_id)+"/extend",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async releaseSpend(t){return e.send({op:"ReleaseSpend",method:"POST",path:"/iap/customers/"+c("ReleaseSpend","customer_id",t.path.customer_id)+"/spends/"+c("ReleaseSpend","spend_id",t.path.spend_id)+"/release",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async reverseSpend(t){return e.send({op:"ReverseSpend",method:"POST",path:"/iap/customers/"+c("ReverseSpend","customer_id",t.path.customer_id)+"/spends/"+c("ReverseSpend","spend_id",t.path.spend_id)+"/reverse",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async cancelSubscription(t){return e.send({op:"CancelSubscription",method:"POST",path:"/iap/customers/"+c("CancelSubscription","customer_id",t.path.customer_id)+"/subscriptions/"+c("CancelSubscription","subscription_id",t.path.subscription_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async extendSubscription(t){return e.send({op:"ExtendSubscription",method:"POST",path:"/iap/customers/"+c("ExtendSubscription","customer_id",t.path.customer_id)+"/subscriptions/"+c("ExtendSubscription","subscription_id",t.path.subscription_id)+"/extend",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async refundSubscription(t){return e.send({op:"RefundSubscription",method:"POST",path:"/iap/customers/"+c("RefundSubscription","customer_id",t.path.customer_id)+"/subscriptions/"+c("RefundSubscription","subscription_id",t.path.subscription_id)+"/refund",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listExperiments(t){return e.send({op:"ListExperiments",method:"GET",path:"/iap/experiments",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async startExperiment(t){return e.send({op:"StartExperiment",method:"POST",path:"/iap/experiments",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getExperiment(t){return e.send({op:"GetExperiment",method:"GET",path:"/iap/experiments/"+c("GetExperiment","experiment_id",t.path.experiment_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getExperimentResults(t){return e.send({op:"GetExperimentResults",method:"GET",path:"/iap/experiments/"+c("GetExperimentResults","experiment_id",t.path.experiment_id)+"/results",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async stopExperiment(t){return e.send({op:"StopExperiment",method:"POST",path:"/iap/experiments/"+c("StopExperiment","experiment_id",t.path.experiment_id)+"/stop",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async declareExperimentWinner(t){return e.send({op:"DeclareExperimentWinner",method:"POST",path:"/iap/experiments/"+c("DeclareExperimentWinner","experiment_id",t.path.experiment_id)+"/winner",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getGoogleAccount(t){return e.send({op:"GetGoogleAccount",method:"GET",path:"/iap/google",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async connectGoogle(t){return e.send({op:"ConnectGoogle",method:"POST",path:"/iap/google",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async disconnectGoogle(t){return e.send({op:"DisconnectGoogle",method:"DELETE",path:"/iap/google",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getGoogleAccountId(t){return e.send({op:"GetGoogleAccountID",method:"POST",path:"/iap/google/account-id",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async reportGooglePurchases(t){return e.send({op:"ReportGooglePurchases",method:"POST",path:"/iap/google/purchases",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getMyCustomerInfo(t){return e.send({op:"GetMyCustomerInfo",method:"GET",path:"/iap/me",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async mergeGuest(t){return e.send({op:"MergeGuest",method:"POST",path:"/iap/me/merge",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createMergeGrant(t){return e.send({op:"CreateMergeGrant",method:"POST",path:"/iap/me/merge-grant",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},signal:t?.signal})},async setRefundDataConsent(t){return e.send({op:"SetRefundDataConsent",method:"PUT",path:"/iap/me/refund-data-consent",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getOfferings(t){return e.send({op:"GetOfferings",method:"GET",path:"/iap/offerings",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listMyOffers(t){return e.send({op:"ListMyOffers",method:"GET",path:"/iap/offers",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async getOfferStats(t){return e.send({op:"GetOfferStats",method:"GET",path:"/iap/offers/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async signAppleOffer(t){return e.send({op:"SignAppleOffer",method:"POST",path:"/iap/offers/"+c("SignAppleOffer","offer_key",t.path.offer_key)+"/apple-signature",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async claimOffer(t){return e.send({op:"ClaimOffer",method:"POST",path:"/iap/offers/"+c("ClaimOffer","offer_key",t.path.offer_key)+"/claim",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},signal:t.signal})},async recordOfferView(t){return e.send({op:"RecordOfferView",method:"POST",path:"/iap/offers/"+c("RecordOfferView","offer_key",t.path.offer_key)+"/views",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async listPaywalls(t){return e.send({op:"ListPaywalls",method:"GET",path:"/iap/paywalls",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createPaywall(t){return e.send({op:"CreatePaywall",method:"POST",path:"/iap/paywalls",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPaywallAssets(t){return e.send({op:"ListPaywallAssets",method:"GET",path:"/iap/paywalls/assets",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async registerPaywallAsset(t){return e.send({op:"RegisterPaywallAsset",method:"POST",path:"/iap/paywalls/assets",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deletePaywallAsset(t){return e.send({op:"DeletePaywallAsset",method:"DELETE",path:"/iap/paywalls/assets/"+c("DeletePaywallAsset","asset_id",t.path.asset_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listPaywallTemplates(t){return e.send({op:"ListPaywallTemplates",method:"GET",path:"/iap/paywalls/templates",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getPaywallTemplateAsset(t){return e.send({op:"GetPaywallTemplateAsset",method:"GET",path:"/iap/paywalls/templates/"+c("GetPaywallTemplateAsset","key",t.path.key)+"/assets/"+c("GetPaywallTemplateAsset","asset_id",t.path.asset_id),auth:[["SecretKeyAuth"]],answers:{200:"raw",304:"empty"},headers:t.headers,signal:t.signal})},async validatePaywall(t){return e.send({op:"ValidatePaywall",method:"POST",path:"/iap/paywalls/validate",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPaywall(t){return e.send({op:"GetPaywall",method:"GET",path:"/iap/paywalls/"+c("GetPaywall","paywall_id",t.path.paywall_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deletePaywall(t){return e.send({op:"DeletePaywall",method:"DELETE",path:"/iap/paywalls/"+c("DeletePaywall","paywall_id",t.path.paywall_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async savePaywallDraft(t){return e.send({op:"SavePaywallDraft",method:"PUT",path:"/iap/paywalls/"+c("SavePaywallDraft","paywall_id",t.path.paywall_id)+"/draft",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async publishPaywall(t){return e.send({op:"PublishPaywall",method:"POST",path:"/iap/paywalls/"+c("PublishPaywall","paywall_id",t.path.paywall_id)+"/publish",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async listPaywallVersions(t){return e.send({op:"ListPaywallVersions",method:"GET",path:"/iap/paywalls/"+c("ListPaywallVersions","paywall_id",t.path.paywall_id)+"/versions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getPaywallVersion(t){return e.send({op:"GetPaywallVersion",method:"GET",path:"/iap/paywalls/"+c("GetPaywallVersion","paywall_id",t.path.paywall_id)+"/versions/"+c("GetPaywallVersion","version",t.path.version),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listPlacements(t){return e.send({op:"ListPlacements",method:"GET",path:"/iap/placements",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listAttributeKeys(t){return e.send({op:"ListAttributeKeys",method:"GET",path:"/iap/placements/attributes",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async setPlacement(t){return e.send({op:"SetPlacement",method:"PUT",path:"/iap/placements/"+c("SetPlacement","placement",t.path.placement),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deletePlacement(t){return e.send({op:"DeletePlacement",method:"DELETE",path:"/iap/placements/"+c("DeletePlacement","placement",t.path.placement),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async recordPaywallExposure(t){return e.send({op:"RecordPaywallExposure",method:"POST",path:"/iap/placements/"+c("RecordPaywallExposure","placement",t.path.placement)+"/exposures",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPlacementPaywall(t){return e.send({op:"GetPlacementPaywall",method:"GET",path:"/iap/placements/"+c("GetPlacementPaywall","placement",t.path.placement)+"/paywall",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json",204:"empty",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async previewPlacement(t){return e.send({op:"PreviewPlacement",method:"POST",path:"/iap/placements/"+c("PreviewPlacement","placement",t.path.placement)+"/resolve-preview",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPlacementResults(t){return e.send({op:"GetPlacementResults",method:"GET",path:"/iap/placements/"+c("GetPlacementResults","placement",t.path.placement)+"/results",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getPlacementRules(t){return e.send({op:"GetPlacementRules",method:"GET",path:"/iap/placements/"+c("GetPlacementRules","placement",t.path.placement)+"/rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setPlacementRules(t){return e.send({op:"SetPlacementRules",method:"PUT",path:"/iap/placements/"+c("SetPlacementRules","placement",t.path.placement)+"/rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createPortalSession(t){return e.send({op:"CreatePortalSession",method:"POST",path:"/iap/portal",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getRedemptionPage(t){return e.send({op:"GetRedemptionPage",method:"GET",path:"/iap/redeem",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async redeemPurchase(t){return e.send({op:"RedeemPurchase",method:"POST",path:"/iap/redemptions/redeem",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSettings(t){return e.send({op:"GetSettings",method:"GET",path:"/iap/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async updateSettings(t){return e.send({op:"UpdateSettings",method:"PUT",path:"/iap/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async receiveAppleNotification(t){return e.send({op:"ReceiveAppleNotification",method:"POST",path:"/iap/webhooks/apple",auth:[],answers:{200:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async receiveGoogleNotification(t){return e.send({op:"ReceiveGoogleNotification",method:"POST",path:"/iap/webhooks/google",auth:[],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var or={};wt(or,{client:()=>e$});function e$(e){return{async listJourneys(t){return e.send({op:"ListJourneys",method:"GET",path:"/journeys",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createJourney(t){return e.send({op:"CreateJourney",method:"POST",path:"/journeys",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listBlueprints(t){return e.send({op:"ListBlueprints",method:"GET",path:"/journeys/blueprints",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listPersonRuns(t){return e.send({op:"ListPersonRuns",method:"GET",path:"/journeys/people/"+c("ListPersonRuns","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async simulateJourney(t){return e.send({op:"SimulateJourney",method:"POST",path:"/journeys/simulate",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listStoreBlueprints(t){return e.send({op:"ListStoreBlueprints",method:"GET",path:"/journeys/stores/"+c("ListStoreBlueprints","store_id",t.path.store_id)+"/blueprints",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async activateStoreBlueprint(t){return e.send({op:"ActivateStoreBlueprint",method:"POST",path:"/journeys/stores/"+c("ActivateStoreBlueprint","store_id",t.path.store_id)+"/blueprints",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteStoreBlueprint(t){return e.send({op:"DeleteStoreBlueprint",method:"DELETE",path:"/journeys/stores/"+c("DeleteStoreBlueprint","store_id",t.path.store_id)+"/blueprints/"+c("DeleteStoreBlueprint","key",t.path.key),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async validateJourney(t){return e.send({op:"ValidateJourney",method:"POST",path:"/journeys/validate",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getJourney(t){return e.send({op:"GetJourney",method:"GET",path:"/journeys/"+c("GetJourney","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateJourney(t){return e.send({op:"UpdateJourney",method:"PUT",path:"/journeys/"+c("UpdateJourney","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteJourney(t){return e.send({op:"DeleteJourney",method:"DELETE",path:"/journeys/"+c("DeleteJourney","key",t.path.key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async copyJourney(t){return e.send({op:"CopyJourney",method:"POST",path:"/journeys/"+c("CopyJourney","key",t.path.key)+"/copy",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async publishJourney(t){return e.send({op:"PublishJourney",method:"POST",path:"/journeys/"+c("PublishJourney","key",t.path.key)+"/publish",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listJourneyRuns(t){return e.send({op:"ListJourneyRuns",method:"GET",path:"/journeys/"+c("ListJourneyRuns","key",t.path.key)+"/runs",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getJourneyStats(t){return e.send({op:"GetJourneyStats",method:"GET",path:"/journeys/"+c("GetJourneyStats","key",t.path.key)+"/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async stopJourney(t){return e.send({op:"StopJourney",method:"POST",path:"/journeys/"+c("StopJourney","key",t.path.key)+"/stop",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async testJourney(t){return e.send({op:"TestJourney",method:"POST",path:"/journeys/"+c("TestJourney","key",t.path.key)+"/test",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var Io={};wt(Io,{client:()=>t$});function t$(e){return{async listMachines(t){return e.send({op:"ListMachines",method:"GET",path:"/machines",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createMachine(t){return e.send({op:"CreateMachine",method:"POST",path:"/machines",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMachineSizes(t){return e.send({op:"ListMachineSizes",method:"GET",path:"/machines/sizes",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getMachineNetwork(t){return e.send({op:"GetMachineNetwork",method:"GET",path:"/machines/network",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async connectGitHub(t){return e.send({op:"ConnectGitHub",method:"POST",path:"/machines/github/connect",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listInstallations(t){return e.send({op:"ListInstallations",method:"GET",path:"/machines/github/installations",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async linkInstallation(t){return e.send({op:"LinkInstallation",method:"POST",path:"/machines/github/installations",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async shareInstallation(t){return e.send({op:"ShareInstallation",method:"POST",path:"/machines/github/installations/share",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async unlinkInstallation(t){return e.send({op:"UnlinkInstallation",method:"DELETE",path:"/machines/github/installations/"+c("UnlinkInstallation","installation",t.path.installation),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listRepositories(t){return e.send({op:"ListRepositories",method:"GET",path:"/machines/github/repositories",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getMachine(t){return e.send({op:"GetMachine",method:"GET",path:"/machines/"+c("GetMachine","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteMachine(t){return e.send({op:"DeleteMachine",method:"DELETE",path:"/machines/"+c("DeleteMachine","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateMachine(t){return e.send({op:"UpdateMachine",method:"PATCH",path:"/machines/"+c("UpdateMachine","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listBuilds(t){return e.send({op:"ListBuilds",method:"GET",path:"/machines/"+c("ListBuilds","name",t.path.name)+"/builds",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async deployMachine(t){return e.send({op:"DeployMachine",method:"POST",path:"/machines/"+c("DeployMachine","name",t.path.name)+"/builds",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMachinePreviews(t){return e.send({op:"ListMachinePreviews",method:"GET",path:"/machines/"+c("ListMachinePreviews","name",t.path.name)+"/previews",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putMachinePreview(t){return e.send({op:"PutMachinePreview",method:"PUT",path:"/machines/"+c("PutMachinePreview","name",t.path.name)+"/previews/"+c("PutMachinePreview","pull_request",t.path.pull_request),auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMachinePreview(t){return e.send({op:"DeleteMachinePreview",method:"DELETE",path:"/machines/"+c("DeleteMachinePreview","name",t.path.name)+"/previews/"+c("DeleteMachinePreview","pull_request",t.path.pull_request),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listMachineDomains(t){return e.send({op:"ListMachineDomains",method:"GET",path:"/machines/"+c("ListMachineDomains","name",t.path.name)+"/domains",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async addMachineDomain(t){return e.send({op:"AddMachineDomain",method:"POST",path:"/machines/"+c("AddMachineDomain","name",t.path.name)+"/domains",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMachineDomain(t){return e.send({op:"DeleteMachineDomain",method:"DELETE",path:"/machines/"+c("DeleteMachineDomain","name",t.path.name)+"/domains/"+c("DeleteMachineDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateMachineDomain(t){return e.send({op:"UpdateMachineDomain",method:"PATCH",path:"/machines/"+c("UpdateMachineDomain","name",t.path.name)+"/domains/"+c("UpdateMachineDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getBuild(t){return e.send({op:"GetBuild",method:"GET",path:"/machines/"+c("GetBuild","name",t.path.name)+"/builds/"+c("GetBuild","build",t.path.build),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getBuildLog(t){return e.send({op:"GetBuildLog",method:"GET",path:"/machines/"+c("GetBuildLog","name",t.path.name)+"/builds/"+c("GetBuildLog","build",t.path.build)+"/log",auth:[["SecretKeyAuth"]],answers:{200:"raw"},signal:t.signal})},async rollbackMachine(t){return e.send({op:"RollbackMachine",method:"POST",path:"/machines/"+c("RollbackMachine","name",t.path.name)+"/rollback",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listDatabases(t){return e.send({op:"ListDatabases",method:"GET",path:"/databases",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createDatabase(t){return e.send({op:"CreateDatabase",method:"POST",path:"/databases",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listDatabaseSizes(t){return e.send({op:"ListDatabaseSizes",method:"GET",path:"/databases/sizes",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getDatabase(t){return e.send({op:"GetDatabase",method:"GET",path:"/databases/"+c("GetDatabase","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteDatabase(t){return e.send({op:"DeleteDatabase",method:"DELETE",path:"/databases/"+c("DeleteDatabase","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateDatabase(t){return e.send({op:"UpdateDatabase",method:"PATCH",path:"/databases/"+c("UpdateDatabase","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async undeleteDatabase(t){return e.send({op:"UndeleteDatabase",method:"POST",path:"/databases/"+c("UndeleteDatabase","name",t.path.name)+"/undelete",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async purgeDatabase(t){return e.send({op:"PurgeDatabase",method:"POST",path:"/databases/"+c("PurgeDatabase","name",t.path.name)+"/purge",auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async getDatabaseCredentials(t){return e.send({op:"GetDatabaseCredentials",method:"GET",path:"/databases/"+c("GetDatabaseCredentials","name",t.path.name)+"/credentials",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async changeDatabasePassword(t){return e.send({op:"ChangeDatabasePassword",method:"POST",path:"/databases/"+c("ChangeDatabasePassword","name",t.path.name)+"/password",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async readMachineLogs(t){return e.send({op:"ReadMachineLogs",method:"GET",path:"/machines/"+c("ReadMachineLogs","name",t.path.name)+"/logs",auth:[["SecretKeyAuth"]],answers:{200:"raw"},query:t.query,signal:t.signal})},async execInMachine(t){return e.send({op:"ExecInMachine",method:"POST",path:"/machines/"+c("ExecInMachine","name",t.path.name)+"/exec",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMachineExecs(t){return e.send({op:"ListMachineExecs",method:"GET",path:"/machines/"+c("ListMachineExecs","name",t.path.name)+"/execs",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getMachineMetrics(t){return e.send({op:"GetMachineMetrics",method:"GET",path:"/machines/"+c("GetMachineMetrics","name",t.path.name)+"/metrics",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getMachineContract(t){return e.send({op:"GetMachineContract",method:"GET",path:"/machines/"+c("GetMachineContract","name",t.path.name)+"/openapi",auth:[["SecretKeyAuth"]],answers:{200:"json",304:"empty"},headers:t.headers,signal:t.signal})},async restoreDatabase(t){return e.send({op:"RestoreDatabase",method:"POST",path:"/databases/"+c("RestoreDatabase","name",t.path.name)+"/restore",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getDatabaseSchema(t){return e.send({op:"GetDatabaseSchema",method:"GET",path:"/databases/"+c("GetDatabaseSchema","name",t.path.name)+"/schema",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getDatabaseMetrics(t){return e.send({op:"GetDatabaseMetrics",method:"GET",path:"/databases/"+c("GetDatabaseMetrics","name",t.path.name)+"/metrics",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async queryDatabase(t){return e.send({op:"QueryDatabase",method:"POST",path:"/databases/"+c("QueryDatabase","name",t.path.name)+"/sql",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listCrons(t){return e.send({op:"ListCrons",method:"GET",path:"/machines/"+c("ListCrons","name",t.path.name)+"/crons",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listCronRuns(t){return e.send({op:"ListCronRuns",method:"GET",path:"/machines/"+c("ListCronRuns","name",t.path.name)+"/crons/"+c("ListCronRuns","cron",t.path.cron)+"/runs",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async runCron(t){return e.send({op:"RunCron",method:"POST",path:"/machines/"+c("RunCron","name",t.path.name)+"/crons/"+c("RunCron","cron",t.path.cron)+"/run",auth:[["SecretKeyAuth"]],answers:{201:"json"},signal:t.signal})},async pauseCron(t){return e.send({op:"PauseCron",method:"POST",path:"/machines/"+c("PauseCron","name",t.path.name)+"/crons/"+c("PauseCron","cron",t.path.cron)+"/pause",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async resumeCron(t){return e.send({op:"ResumeCron",method:"POST",path:"/machines/"+c("ResumeCron","name",t.path.name)+"/crons/"+c("ResumeCron","cron",t.path.cron)+"/resume",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listTasks(t){return e.send({op:"ListTasks",method:"GET",path:"/machines/"+c("ListTasks","name",t.path.name)+"/tasks",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async enqueueTask(t){return e.send({op:"EnqueueTask",method:"POST",path:"/machines/"+c("EnqueueTask","name",t.path.name)+"/tasks",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getTask(t){return e.send({op:"GetTask",method:"GET",path:"/machines/"+c("GetTask","name",t.path.name)+"/tasks/"+c("GetTask","task",t.path.task),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelTask(t){return e.send({op:"CancelTask",method:"POST",path:"/machines/"+c("CancelTask","name",t.path.name)+"/tasks/"+c("CancelTask","task",t.path.task)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async retryTask(t){return e.send({op:"RetryTask",method:"POST",path:"/machines/"+c("RetryTask","name",t.path.name)+"/tasks/"+c("RetryTask","task",t.path.task)+"/retry",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listTaskTypes(t){return e.send({op:"ListTaskTypes",method:"GET",path:"/machines/"+c("ListTaskTypes","name",t.path.name)+"/task-types",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async makeTemplatedTestUsers(t){return e.send({op:"MakeTemplatedTestUsers",method:"POST",path:"/machines/"+c("MakeTemplatedTestUsers","name",t.path.name)+"/test-users",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async templateTestUser(t){return e.send({op:"TemplateTestUser",method:"POST",path:"/machines/"+c("TemplateTestUser","name",t.path.name)+"/test-users/"+c("TemplateTestUser","user",t.path.user)+"/templates/"+c("TemplateTestUser","template",t.path.template),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteTemplatedTestUser(t){return e.send({op:"DeleteTemplatedTestUser",method:"DELETE",path:"/machines/"+c("DeleteTemplatedTestUser","name",t.path.name)+"/test-users/"+c("DeleteTemplatedTestUser","user",t.path.user),auth:[["SecretKeyAuth"]],answers:{200:"json",204:"empty"},headers:t.headers,signal:t.signal})},async listSites(t){return e.send({op:"ListSites",method:"GET",path:"/sites",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createSite(t){return e.send({op:"CreateSite",method:"POST",path:"/sites",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSite(t){return e.send({op:"GetSite",method:"GET",path:"/sites/"+c("GetSite","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteSite(t){return e.send({op:"DeleteSite",method:"DELETE",path:"/sites/"+c("DeleteSite","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateSite(t){return e.send({op:"UpdateSite",method:"PATCH",path:"/sites/"+c("UpdateSite","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSiteReleases(t){return e.send({op:"ListSiteReleases",method:"GET",path:"/sites/"+c("ListSiteReleases","name",t.path.name)+"/releases",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createSiteRelease(t){return e.send({op:"CreateSiteRelease",method:"POST",path:"/sites/"+c("CreateSiteRelease","name",t.path.name)+"/releases",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async uploadSiteFile(t){return e.send({op:"UploadSiteFile",method:"PUT",path:"/sites/"+c("UploadSiteFile","name",t.path.name)+"/releases/"+c("UploadSiteFile","release",t.path.release)+"/files/"+c("UploadSiteFile","digest",t.path.digest),auth:[["SecretKeyAuth"]],answers:{204:"empty"},body:{kind:"raw",contentType:t.contentType??"application/octet-stream",value:t.body},signal:t.signal})},async finishSiteRelease(t){return e.send({op:"FinishSiteRelease",method:"POST",path:"/sites/"+c("FinishSiteRelease","name",t.path.name)+"/releases/"+c("FinishSiteRelease","release",t.path.release)+"/finish",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async rollbackSite(t){return e.send({op:"RollbackSite",method:"POST",path:"/sites/"+c("RollbackSite","name",t.path.name)+"/rollback",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSiteBuilds(t){return e.send({op:"ListSiteBuilds",method:"GET",path:"/sites/"+c("ListSiteBuilds","name",t.path.name)+"/builds",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deploySite(t){return e.send({op:"DeploySite",method:"POST",path:"/sites/"+c("DeploySite","name",t.path.name)+"/builds",auth:[["SecretKeyAuth"]],answers:{202:"json"},signal:t.signal})},async listSitePreviews(t){return e.send({op:"ListSitePreviews",method:"GET",path:"/sites/"+c("ListSitePreviews","name",t.path.name)+"/previews",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listSiteDomains(t){return e.send({op:"ListSiteDomains",method:"GET",path:"/sites/"+c("ListSiteDomains","name",t.path.name)+"/domains",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async addSiteDomain(t){return e.send({op:"AddSiteDomain",method:"POST",path:"/sites/"+c("AddSiteDomain","name",t.path.name)+"/domains",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteSiteDomain(t){return e.send({op:"DeleteSiteDomain",method:"DELETE",path:"/sites/"+c("DeleteSiteDomain","name",t.path.name)+"/domains/"+c("DeleteSiteDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async updateSiteDomain(t){return e.send({op:"UpdateSiteDomain",method:"PATCH",path:"/sites/"+c("UpdateSiteDomain","name",t.path.name)+"/domains/"+c("UpdateSiteDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSiteBuild(t){return e.send({op:"GetSiteBuild",method:"GET",path:"/sites/"+c("GetSiteBuild","name",t.path.name)+"/builds/"+c("GetSiteBuild","build",t.path.build),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async authorizeSitePreview(t){return e.send({op:"AuthorizeSitePreview",method:"POST",path:"/sites/"+c("AuthorizeSitePreview","name",t.path.name)+"/previews/"+c("AuthorizeSitePreview","pull_request",t.path.pull_request)+"/authorize",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async authorizeMachinePreview(t){return e.send({op:"AuthorizeMachinePreview",method:"POST",path:"/machines/"+c("AuthorizeMachinePreview","name",t.path.name)+"/previews/"+c("AuthorizeMachinePreview","pull_request",t.path.pull_request)+"/authorize",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async openMachinePreview(t){return e.send({op:"OpenMachinePreview",method:"POST",path:"/machines/"+c("OpenMachinePreview","name",t.path.name)+"/previews/"+c("OpenMachinePreview","pull_request",t.path.pull_request)+"/open",auth:[["SecretKeyAuth"]],answers:{202:"json"},signal:t.signal})},async moveMachine(t){return e.send({op:"MoveMachine",method:"POST",path:"/machines/"+c("MoveMachine","name",t.path.name)+"/move",auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async moveSite(t){return e.send({op:"MoveSite",method:"POST",path:"/sites/"+c("MoveSite","name",t.path.name)+"/move",auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async moveDatabase(t){return e.send({op:"MoveDatabase",method:"POST",path:"/databases/"+c("MoveDatabase","name",t.path.name)+"/move",auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async cancelSiteBuild(t){return e.send({op:"CancelSiteBuild",method:"POST",path:"/sites/"+c("CancelSiteBuild","name",t.path.name)+"/builds/"+c("CancelSiteBuild","build",t.path.build)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelBuild(t){return e.send({op:"CancelBuild",method:"POST",path:"/machines/"+c("CancelBuild","name",t.path.name)+"/builds/"+c("CancelBuild","build",t.path.build)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listSiteHooks(t){return e.send({op:"ListSiteHooks",method:"GET",path:"/sites/"+c("ListSiteHooks","name",t.path.name)+"/hooks",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createSiteHook(t){return e.send({op:"CreateSiteHook",method:"POST",path:"/sites/"+c("CreateSiteHook","name",t.path.name)+"/hooks",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteSiteHook(t){return e.send({op:"DeleteSiteHook",method:"DELETE",path:"/sites/"+c("DeleteSiteHook","name",t.path.name)+"/hooks/"+c("DeleteSiteHook","hook",t.path.hook),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listMachineHooks(t){return e.send({op:"ListMachineHooks",method:"GET",path:"/machines/"+c("ListMachineHooks","name",t.path.name)+"/hooks",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createMachineHook(t){return e.send({op:"CreateMachineHook",method:"POST",path:"/machines/"+c("CreateMachineHook","name",t.path.name)+"/hooks",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMachineHook(t){return e.send({op:"DeleteMachineHook",method:"DELETE",path:"/machines/"+c("DeleteMachineHook","name",t.path.name)+"/hooks/"+c("DeleteMachineHook","hook",t.path.hook),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async detectProject(t){return e.send({op:"DetectProject",method:"GET",path:"/machines/github/detect",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async createPreviewPass(t){return e.send({op:"CreatePreviewPass",method:"POST",path:"/sites/"+c("CreatePreviewPass","name",t.path.name)+"/previews/pass",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPreviewLinks(t){return e.send({op:"ListPreviewLinks",method:"GET",path:"/sites/"+c("ListPreviewLinks","name",t.path.name)+"/previews/links",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createPreviewLink(t){return e.send({op:"CreatePreviewLink",method:"POST",path:"/sites/"+c("CreatePreviewLink","name",t.path.name)+"/previews/links",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deletePreviewLink(t){return e.send({op:"DeletePreviewLink",method:"DELETE",path:"/sites/"+c("DeletePreviewLink","name",t.path.name)+"/previews/links/"+c("DeletePreviewLink","link",t.path.link),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listEnvironmentDomains(t){return e.send({op:"ListEnvironmentDomains",method:"GET",path:"/domains",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async addEnvironmentDomain(t){return e.send({op:"AddEnvironmentDomain",method:"POST",path:"/domains",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteEnvironmentDomain(t){return e.send({op:"DeleteEnvironmentDomain",method:"DELETE",path:"/domains/"+c("DeleteEnvironmentDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async setEnvironmentSignInDomain(t){return e.send({op:"SetEnvironmentSignInDomain",method:"PATCH",path:"/domains/"+c("SetEnvironmentSignInDomain","host",t.path.host),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var ir={};wt(ir,{client:()=>n$});function n$(e){return{async adminAccessLog(t){return e.send({op:"AdminAccessLog",method:"GET",path:"/messaging/admin/access-log",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminListConversations(t){return e.send({op:"AdminListConversations",method:"GET",path:"/messaging/admin/conversations",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminCreateConversation(t){return e.send({op:"AdminCreateConversation",method:"POST",path:"/messaging/admin/conversations",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminGetConversation(t){return e.send({op:"AdminGetConversation",method:"GET",path:"/messaging/admin/conversations/"+c("AdminGetConversation","conversation_id",t.path.conversation_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminDeleteConversation(t){return e.send({op:"AdminDeleteConversation",method:"DELETE",path:"/messaging/admin/conversations/"+c("AdminDeleteConversation","conversation_id",t.path.conversation_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async adminUpdateConversation(t){return e.send({op:"AdminUpdateConversation",method:"PATCH",path:"/messaging/admin/conversations/"+c("AdminUpdateConversation","conversation_id",t.path.conversation_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminAddMembers(t){return e.send({op:"AdminAddMembers",method:"POST",path:"/messaging/admin/conversations/"+c("AdminAddMembers","conversation_id",t.path.conversation_id)+"/members",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminRemoveMember(t){return e.send({op:"AdminRemoveMember",method:"DELETE",path:"/messaging/admin/conversations/"+c("AdminRemoveMember","conversation_id",t.path.conversation_id)+"/members/"+c("AdminRemoveMember","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async adminListMessages(t){return e.send({op:"AdminListMessages",method:"GET",path:"/messaging/admin/conversations/"+c("AdminListMessages","conversation_id",t.path.conversation_id)+"/messages",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async adminSendMessage(t){return e.send({op:"AdminSendMessage",method:"POST",path:"/messaging/admin/conversations/"+c("AdminSendMessage","conversation_id",t.path.conversation_id)+"/messages",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminDeleteMessage(t){return e.send({op:"AdminDeleteMessage",method:"DELETE",path:"/messaging/admin/conversations/"+c("AdminDeleteMessage","conversation_id",t.path.conversation_id)+"/messages/"+c("AdminDeleteMessage","message_id",t.path.message_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async adminFileUrl(t){return e.send({op:"AdminFileURL",method:"GET",path:"/messaging/admin/conversations/"+c("AdminFileURL","conversation_id",t.path.conversation_id)+"/messages/"+c("AdminFileURL","message_id",t.path.message_id)+"/attachments/"+c("AdminFileURL","attachment_id",t.path.attachment_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminPutProfile(t){return e.send({op:"AdminPutProfile",method:"PUT",path:"/messaging/admin/profiles/"+c("AdminPutProfile","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async adminListReports(t){return e.send({op:"AdminListReports",method:"GET",path:"/messaging/admin/reports",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async adminGetReport(t){return e.send({op:"AdminGetReport",method:"GET",path:"/messaging/admin/reports/"+c("AdminGetReport","report_id",t.path.report_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminReportFileUrl(t){return e.send({op:"AdminReportFileURL",method:"GET",path:"/messaging/admin/reports/"+c("AdminReportFileURL","report_id",t.path.report_id)+"/attachments/"+c("AdminReportFileURL","attachment_id",t.path.attachment_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async adminResolveReport(t){return e.send({op:"AdminResolveReport",method:"POST",path:"/messaging/admin/reports/"+c("AdminResolveReport","report_id",t.path.report_id)+"/resolve",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listBlocks(t){return e.send({op:"ListBlocks",method:"GET",path:"/messaging/blocks",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async block(t){return e.send({op:"Block",method:"PUT",path:"/messaging/blocks/"+c("Block","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async unblock(t){return e.send({op:"Unblock",method:"DELETE",path:"/messaging/blocks/"+c("Unblock","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async listConversations(t){return e.send({op:"ListConversations",method:"GET",path:"/messaging/conversations",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async openDirectConversation(t){return e.send({op:"OpenDirectConversation",method:"POST",path:"/messaging/conversations/direct",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json",201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createGroup(t){return e.send({op:"CreateGroup",method:"POST",path:"/messaging/conversations/group",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getConversation(t){return e.send({op:"GetConversation",method:"GET",path:"/messaging/conversations/"+c("GetConversation","conversation_id",t.path.conversation_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async deleteConversation(t){return e.send({op:"DeleteConversation",method:"DELETE",path:"/messaging/conversations/"+c("DeleteConversation","conversation_id",t.path.conversation_id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async updateConversation(t){return e.send({op:"UpdateConversation",method:"PATCH",path:"/messaging/conversations/"+c("UpdateConversation","conversation_id",t.path.conversation_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async clearConversation(t){return e.send({op:"ClearConversation",method:"POST",path:"/messaging/conversations/"+c("ClearConversation","conversation_id",t.path.conversation_id)+"/clear",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async closeConversation(t){return e.send({op:"CloseConversation",method:"POST",path:"/messaging/conversations/"+c("CloseConversation","conversation_id",t.path.conversation_id)+"/close",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async joinGroup(t){return e.send({op:"JoinGroup",method:"POST",path:"/messaging/conversations/"+c("JoinGroup","conversation_id",t.path.conversation_id)+"/join",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async listMembers(t){return e.send({op:"ListMembers",method:"GET",path:"/messaging/conversations/"+c("ListMembers","conversation_id",t.path.conversation_id)+"/members",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async addMembers(t){return e.send({op:"AddMembers",method:"POST",path:"/messaging/conversations/"+c("AddMembers","conversation_id",t.path.conversation_id)+"/members",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeMember(t){return e.send({op:"RemoveMember",method:"DELETE",path:"/messaging/conversations/"+c("RemoveMember","conversation_id",t.path.conversation_id)+"/members/"+c("RemoveMember","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async updateMember(t){return e.send({op:"UpdateMember",method:"PATCH",path:"/messaging/conversations/"+c("UpdateMember","conversation_id",t.path.conversation_id)+"/members/"+c("UpdateMember","user_id",t.path.user_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMessages(t){return e.send({op:"ListMessages",method:"GET",path:"/messaging/conversations/"+c("ListMessages","conversation_id",t.path.conversation_id)+"/messages",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async sendMessage(t){return e.send({op:"SendMessage",method:"POST",path:"/messaging/conversations/"+c("SendMessage","conversation_id",t.path.conversation_id)+"/messages",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json",201:"json",202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getMessage(t){return e.send({op:"GetMessage",method:"GET",path:"/messaging/conversations/"+c("GetMessage","conversation_id",t.path.conversation_id)+"/messages/"+c("GetMessage","message_id",t.path.message_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async deleteMessage(t){return e.send({op:"DeleteMessage",method:"DELETE",path:"/messaging/conversations/"+c("DeleteMessage","conversation_id",t.path.conversation_id)+"/messages/"+c("DeleteMessage","message_id",t.path.message_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json",204:"empty"},query:t.query,signal:t.signal})},async editMessage(t){return e.send({op:"EditMessage",method:"PATCH",path:"/messaging/conversations/"+c("EditMessage","conversation_id",t.path.conversation_id)+"/messages/"+c("EditMessage","message_id",t.path.message_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async attachmentUrl(t){return e.send({op:"AttachmentURL",method:"GET",path:"/messaging/conversations/"+c("AttachmentURL","conversation_id",t.path.conversation_id)+"/messages/"+c("AttachmentURL","message_id",t.path.message_id)+"/attachments/"+c("AttachmentURL","attachment_id",t.path.attachment_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async react(t){return e.send({op:"React",method:"PUT",path:"/messaging/conversations/"+c("React","conversation_id",t.path.conversation_id)+"/messages/"+c("React","message_id",t.path.message_id)+"/reactions/"+c("React","emoji",t.path.emoji),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async unreact(t){return e.send({op:"Unreact",method:"DELETE",path:"/messaging/conversations/"+c("Unreact","conversation_id",t.path.conversation_id)+"/messages/"+c("Unreact","message_id",t.path.message_id)+"/reactions/"+c("Unreact","emoji",t.path.emoji),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async messageReaders(t){return e.send({op:"MessageReaders",method:"GET",path:"/messaging/conversations/"+c("MessageReaders","conversation_id",t.path.conversation_id)+"/messages/"+c("MessageReaders","message_id",t.path.message_id)+"/readers",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async listReplies(t){return e.send({op:"ListReplies",method:"GET",path:"/messaging/conversations/"+c("ListReplies","conversation_id",t.path.conversation_id)+"/messages/"+c("ListReplies","message_id",t.path.message_id)+"/replies",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async viewOnce(t){return e.send({op:"ViewOnce",method:"POST",path:"/messaging/conversations/"+c("ViewOnce","conversation_id",t.path.conversation_id)+"/messages/"+c("ViewOnce","message_id",t.path.message_id)+"/view",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async setConversationNotifications(t){return e.send({op:"SetConversationNotifications",method:"PUT",path:"/messaging/conversations/"+c("SetConversationNotifications","conversation_id",t.path.conversation_id)+"/notifications",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async reportScreenshot(t){return e.send({op:"ReportScreenshot",method:"POST",path:"/messaging/conversations/"+c("ReportScreenshot","conversation_id",t.path.conversation_id)+"/screenshot",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},signal:t.signal})},async typing(t){return e.send({op:"Typing",method:"POST",path:"/messaging/conversations/"+c("Typing","conversation_id",t.path.conversation_id)+"/typing",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createUpload(t){return e.send({op:"CreateUpload",method:"POST",path:"/messaging/conversations/"+c("CreateUpload","conversation_id",t.path.conversation_id)+"/uploads",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listOpenGroups(t){return e.send({op:"ListOpenGroups",method:"GET",path:"/messaging/groups/open",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getMyProfile(t){return e.send({op:"GetMyProfile",method:"GET",path:"/messaging/me",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async updateMyProfile(t){return e.send({op:"UpdateMyProfile",method:"PATCH",path:"/messaging/me",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async presence(t){return e.send({op:"Presence",method:"POST",path:"/messaging/me/presence",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t?.signal})},async getProfiles(t){return e.send({op:"GetProfiles",method:"GET",path:"/messaging/profiles",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async receipts(t){return e.send({op:"Receipts",method:"POST",path:"/messaging/receipts",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async report(t){return e.send({op:"Report",method:"POST",path:"/messaging/reports",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listScheduled(t){return e.send({op:"ListScheduled",method:"GET",path:"/messaging/scheduled",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async cancelScheduled(t){return e.send({op:"CancelScheduled",method:"DELETE",path:"/messaging/scheduled/"+c("CancelScheduled","scheduled_id",t.path.scheduled_id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async updateScheduled(t){return e.send({op:"UpdateScheduled",method:"PATCH",path:"/messaging/scheduled/"+c("UpdateScheduled","scheduled_id",t.path.scheduled_id),auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async searchMessages(t){return e.send({op:"SearchMessages",method:"GET",path:"/messaging/search",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getSettings(t){return e.send({op:"GetSettings",method:"GET",path:"/messaging/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putSettings(t){return e.send({op:"PutSettings",method:"PUT",path:"/messaging/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rotateHookSecret(t){return e.send({op:"RotateHookSecret",method:"POST",path:"/messaging/settings/hook-secret",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async sync(t){return e.send({op:"Sync",method:"GET",path:"/messaging/sync",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listThreads(t){return e.send({op:"ListThreads",method:"GET",path:"/messaging/threads",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})}}}var No={};wt(No,{client:()=>s$});function s$(e){return{async getDeliverability(t){return e.send({op:"GetDeliverability",method:"GET",path:"/notify/deliverability",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listDevices(t){return e.send({op:"ListDevices",method:"GET",path:"/notify/devices",auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async registerDevice(t){return e.send({op:"RegisterDevice",method:"POST",path:"/notify/devices",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getDeviceStats(t){return e.send({op:"GetDeviceStats",method:"GET",path:"/notify/devices/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async deleteMyDevice(t){return e.send({op:"DeleteMyDevice",method:"DELETE",path:"/notify/devices/"+c("DeleteMyDevice","device_id",t.path.device_id),auth:[["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async sendEmail(t){return e.send({op:"SendEmail",method:"POST",path:"/notify/email",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listInAppCampaigns(t){return e.send({op:"ListInAppCampaigns",method:"GET",path:"/notify/in-app/campaigns",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createInAppCampaign(t){return e.send({op:"CreateInAppCampaign",method:"POST",path:"/notify/in-app/campaigns",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getInAppCampaign(t){return e.send({op:"GetInAppCampaign",method:"GET",path:"/notify/in-app/campaigns/"+c("GetInAppCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putInAppCampaign(t){return e.send({op:"PutInAppCampaign",method:"PUT",path:"/notify/in-app/campaigns/"+c("PutInAppCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteInAppCampaign(t){return e.send({op:"DeleteInAppCampaign",method:"DELETE",path:"/notify/in-app/campaigns/"+c("DeleteInAppCampaign","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async getInAppCampaignStats(t){return e.send({op:"GetInAppCampaignStats",method:"GET",path:"/notify/in-app/campaigns/"+c("GetInAppCampaignStats","id",t.path.id)+"/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async showInAppMessage(t){return e.send({op:"ShowInAppMessage",method:"POST",path:"/notify/in-app/impressions",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async reportInAppEvent(t){return e.send({op:"ReportInAppEvent",method:"POST",path:"/notify/in-app/impressions/"+c("ReportInAppEvent","id",t.path.id)+"/events",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{204:"empty"},idempotent:!0,query:t.query,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMyInAppMessages(t){return e.send({op:"ListMyInAppMessages",method:"GET",path:"/notify/in-app/messages",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listInAppTemplates(t){return e.send({op:"ListInAppTemplates",method:"GET",path:"/notify/in-app/templates",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listMyInbox(t){return e.send({op:"ListMyInbox",method:"GET",path:"/notify/inbox",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async sendInbox(t){return e.send({op:"SendInbox",method:"POST",path:"/notify/inbox",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listInboxMessages(t){return e.send({op:"ListInboxMessages",method:"GET",path:"/notify/inbox/messages",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async readMyInbox(t){return e.send({op:"ReadMyInbox",method:"POST",path:"/notify/inbox/read",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteMyInboxMessage(t){return e.send({op:"DeleteMyInboxMessage",method:"DELETE",path:"/notify/inbox/"+c("DeleteMyInboxMessage","id",t.path.id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listNotifyMessages(t){return e.send({op:"ListNotifyMessages",method:"GET",path:"/notify/messages",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getNotifyMessage(t){return e.send({op:"GetNotifyMessage",method:"GET",path:"/notify/messages/"+c("GetNotifyMessage","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelMessage(t){return e.send({op:"CancelMessage",method:"POST",path:"/notify/messages/"+c("CancelMessage","id",t.path.id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getMetricsSummary(t){return e.send({op:"GetMetricsSummary",method:"GET",path:"/notify/metrics/summary",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getMyPreferences(t){return e.send({op:"GetMyPreferences",method:"GET",path:"/notify/preferences",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async setMyPreferences(t){return e.send({op:"SetMyPreferences",method:"PUT",path:"/notify/preferences",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listNotifyProviders(t){return e.send({op:"ListNotifyProviders",method:"GET",path:"/notify/providers",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putNotifyProvider(t){return e.send({op:"PutNotifyProvider",method:"PUT",path:"/notify/providers/"+c("PutNotifyProvider","channel",t.path.channel)+"/"+c("PutNotifyProvider","provider",t.path.provider),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteNotifyProvider(t){return e.send({op:"DeleteNotifyProvider",method:"DELETE",path:"/notify/providers/"+c("DeleteNotifyProvider","channel",t.path.channel)+"/"+c("DeleteNotifyProvider","provider",t.path.provider),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async sendPush(t){return e.send({op:"SendPush",method:"POST",path:"/notify/push",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async recordPushReceipts(t){return e.send({op:"RecordPushReceipts",method:"POST",path:"/notify/receipts",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getNotifySettings(t){return e.send({op:"GetNotifySettings",method:"GET",path:"/notify/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putNotifySettings(t){return e.send({op:"PutNotifySettings",method:"PUT",path:"/notify/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sendSms(t){return e.send({op:"SendSMS",method:"POST",path:"/notify/sms",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listEmailTemplates(t){return e.send({op:"ListEmailTemplates",method:"GET",path:"/notify/templates/email",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getEmailTemplate(t){return e.send({op:"GetEmailTemplate",method:"GET",path:"/notify/templates/email/"+c("GetEmailTemplate","slug",t.path.slug)+"/"+c("GetEmailTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putEmailTemplate(t){return e.send({op:"PutEmailTemplate",method:"PUT",path:"/notify/templates/email/"+c("PutEmailTemplate","slug",t.path.slug)+"/"+c("PutEmailTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteEmailTemplate(t){return e.send({op:"DeleteEmailTemplate",method:"DELETE",path:"/notify/templates/email/"+c("DeleteEmailTemplate","slug",t.path.slug)+"/"+c("DeleteEmailTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listPushTemplates(t){return e.send({op:"ListPushTemplates",method:"GET",path:"/notify/templates/push",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getPushTemplate(t){return e.send({op:"GetPushTemplate",method:"GET",path:"/notify/templates/push/"+c("GetPushTemplate","slug",t.path.slug)+"/"+c("GetPushTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putPushTemplate(t){return e.send({op:"PutPushTemplate",method:"PUT",path:"/notify/templates/push/"+c("PutPushTemplate","slug",t.path.slug)+"/"+c("PutPushTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deletePushTemplate(t){return e.send({op:"DeletePushTemplate",method:"DELETE",path:"/notify/templates/push/"+c("DeletePushTemplate","slug",t.path.slug)+"/"+c("DeletePushTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listSmsTemplates(t){return e.send({op:"ListSMSTemplates",method:"GET",path:"/notify/templates/sms",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getSmsTemplate(t){return e.send({op:"GetSMSTemplate",method:"GET",path:"/notify/templates/sms/"+c("GetSMSTemplate","slug",t.path.slug)+"/"+c("GetSMSTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putSmsTemplate(t){return e.send({op:"PutSMSTemplate",method:"PUT",path:"/notify/templates/sms/"+c("PutSMSTemplate","slug",t.path.slug)+"/"+c("PutSMSTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteSmsTemplate(t){return e.send({op:"DeleteSMSTemplate",method:"DELETE",path:"/notify/templates/sms/"+c("DeleteSMSTemplate","slug",t.path.slug)+"/"+c("DeleteSMSTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listWhatsAppTemplates(t){return e.send({op:"ListWhatsAppTemplates",method:"GET",path:"/notify/templates/whatsapp",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getWhatsAppTemplate(t){return e.send({op:"GetWhatsAppTemplate",method:"GET",path:"/notify/templates/whatsapp/"+c("GetWhatsAppTemplate","slug",t.path.slug)+"/"+c("GetWhatsAppTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putWhatsAppTemplate(t){return e.send({op:"PutWhatsAppTemplate",method:"PUT",path:"/notify/templates/whatsapp/"+c("PutWhatsAppTemplate","slug",t.path.slug)+"/"+c("PutWhatsAppTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteWhatsAppTemplate(t){return e.send({op:"DeleteWhatsAppTemplate",method:"DELETE",path:"/notify/templates/whatsapp/"+c("DeleteWhatsAppTemplate","slug",t.path.slug)+"/"+c("DeleteWhatsAppTemplate","locale",t.path.locale),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listTestUserMessages(t){return e.send({op:"ListTestUserMessages",method:"GET",path:"/notify/test-users/"+c("ListTestUserMessages","user_id",t.path.user_id)+"/messages",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listTopics(t){return e.send({op:"ListTopics",method:"GET",path:"/notify/topics",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createTopic(t){return e.send({op:"CreateTopic",method:"POST",path:"/notify/topics",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteTopic(t){return e.send({op:"DeleteTopic",method:"DELETE",path:"/notify/topics/"+c("DeleteTopic","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async changeTopic(t){return e.send({op:"ChangeTopic",method:"PATCH",path:"/notify/topics/"+c("ChangeTopic","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addTopicSubscribers(t){return e.send({op:"AddTopicSubscribers",method:"POST",path:"/notify/topics/"+c("AddTopicSubscribers","name",t.path.name)+"/subscribers",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeTopicSubscriber(t){return e.send({op:"RemoveTopicSubscriber",method:"DELETE",path:"/notify/topics/"+c("RemoveTopicSubscriber","name",t.path.name)+"/subscribers/"+c("RemoveTopicSubscriber","user_id",t.path.user_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async followTopic(t){return e.send({op:"FollowTopic",method:"POST",path:"/notify/topics/"+c("FollowTopic","name",t.path.name)+"/subscription",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async unfollowTopic(t){return e.send({op:"UnfollowTopic",method:"DELETE",path:"/notify/topics/"+c("UnfollowTopic","name",t.path.name)+"/subscription",auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listUserDevices(t){return e.send({op:"ListUserDevices",method:"GET",path:"/notify/users/"+c("ListUserDevices","user_id",t.path.user_id)+"/devices",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getUserPreferences(t){return e.send({op:"GetUserPreferences",method:"GET",path:"/notify/users/"+c("GetUserPreferences","user_id",t.path.user_id)+"/preferences",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setUserPreferences(t){return e.send({op:"SetUserPreferences",method:"PUT",path:"/notify/users/"+c("SetUserPreferences","user_id",t.path.user_id)+"/preferences",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async startVerification(t){return e.send({op:"StartVerification",method:"POST",path:"/notify/verifications",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async checkVerification(t){return e.send({op:"CheckVerification",method:"POST",path:"/notify/verifications/check",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async receiveSendGridEvents(t){return e.send({op:"ReceiveSendGridEvents",method:"POST",path:"/notify/webhooks/email/sendgrid",auth:[],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async receiveTwilioStatus(t){return e.send({op:"ReceiveTwilioStatus",method:"POST",path:"/notify/webhooks/sms/twilio",auth:[],answers:{204:"empty"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async receiveTwilioText(t){return e.send({op:"ReceiveTwilioText",method:"POST",path:"/notify/webhooks/sms/twilio/inbound",auth:[],answers:{204:"empty"},body:{kind:"form",contentType:"application/x-www-form-urlencoded",value:t.body},signal:t.signal})},async receiveVonageReceiptQuery(t){return e.send({op:"ReceiveVonageReceiptQuery",method:"GET",path:"/notify/webhooks/sms/vonage",auth:[],answers:{204:"empty"},query:t?.query,signal:t?.signal})},async receiveVonageReceipt(t){return e.send({op:"ReceiveVonageReceipt",method:"POST",path:"/notify/webhooks/sms/vonage",auth:[],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async subscribeMetaWebhook(t){return e.send({op:"SubscribeMetaWebhook",method:"GET",path:"/notify/webhooks/whatsapp/meta",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async receiveMetaNotification(t){return e.send({op:"ReceiveMetaNotification",method:"POST",path:"/notify/webhooks/whatsapp/meta",auth:[],answers:{204:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getWebPushStatus(t){return e.send({op:"GetWebPushStatus",method:"GET",path:"/notify/webpush",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getWebPushKey(t){return e.send({op:"GetWebPushKey",method:"GET",path:"/notify/webpush/key",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async sendWhatsApp(t){return e.send({op:"SendWhatsApp",method:"POST",path:"/notify/whatsapp",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listWhatsAppInbound(t){return e.send({op:"ListWhatsAppInbound",method:"GET",path:"/notify/whatsapp/inbound",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})}}}var Mo={};wt(Mo,{client:()=>a$});function a$(e){return{async auditCashFlow(t){return e.send({op:"AuditCashFlow",method:"GET",path:"/payments/audit/cashflow",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async auditDrift(t){return e.send({op:"AuditDrift",method:"GET",path:"/payments/audit/drift",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async auditLedger(t){return e.send({op:"AuditLedger",method:"GET",path:"/payments/audit/ledger",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async exportAuditLedgerCsv(t){return e.send({op:"ExportAuditLedgerCSV",method:"GET",path:"/payments/audit/ledger/export",auth:[["SecretKeyAuth"]],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async providerCallbackGet(t){return e.send({op:"ProviderCallbackGet",method:"GET",path:"/payments/callback/"+c("ProviderCallbackGet","provider",t.path.provider)+"/"+c("ProviderCallbackGet","attempt_id",t.path.attempt_id),auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async providerCallbackPost(t){return e.send({op:"ProviderCallbackPost",method:"POST",path:"/payments/callback/"+c("ProviderCallbackPost","provider",t.path.provider)+"/"+c("ProviderCallbackPost","attempt_id",t.path.attempt_id),auth:[],answers:{200:"raw"},signal:t.signal})},async getCapabilities(t){return e.send({op:"GetCapabilities",method:"GET",path:"/payments/capabilities",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listChannels(t){return e.send({op:"ListChannels",method:"GET",path:"/payments/channels",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async connectChannel(t){return e.send({op:"ConnectChannel",method:"POST",path:"/payments/channels",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createChannelGrant(t){return e.send({op:"CreateChannelGrant",method:"POST",path:"/payments/channels/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChannel(t){return e.send({op:"GetChannel",method:"GET",path:"/payments/channels/"+c("GetChannel","channel_key",t.path.channel_key),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteChannel(t){return e.send({op:"DeleteChannel",method:"DELETE",path:"/payments/channels/"+c("DeleteChannel","channel_key",t.path.channel_key),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async checkChannel(t){return e.send({op:"CheckChannel",method:"POST",path:"/payments/channels/"+c("CheckChannel","channel_key",t.path.channel_key)+"/check",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setDefaultChannel(t){return e.send({op:"SetDefaultChannel",method:"POST",path:"/payments/channels/"+c("SetDefaultChannel","channel_key",t.path.channel_key)+"/default",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async connectChannelPage(t){return e.send({op:"ConnectChannelPage",method:"GET",path:"/payments/connect",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async connectChannelSubmit(t){return e.send({op:"ConnectChannelSubmit",method:"POST",path:"/payments/connect",auth:[],answers:{200:"json"},signal:t?.signal})},async listDisputes(t){return e.send({op:"ListDisputes",method:"GET",path:"/payments/disputes",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async lookupInstallments(t){return e.send({op:"LookupInstallments",method:"POST",path:"/payments/installments",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listIntents(t){return e.send({op:"ListIntents",method:"GET",path:"/payments/intents",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createIntent(t){return e.send({op:"CreateIntent",method:"POST",path:"/payments/intents",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getIntent(t){return e.send({op:"GetIntent",method:"GET",path:"/payments/intents/"+c("GetIntent","intent_id",t.path.intent_id),auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async listIntentAttempts(t){return e.send({op:"ListIntentAttempts",method:"GET",path:"/payments/intents/"+c("ListIntentAttempts","intent_id",t.path.intent_id)+"/attempts",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async cancelIntent(t){return e.send({op:"CancelIntent",method:"POST",path:"/payments/intents/"+c("CancelIntent","intent_id",t.path.intent_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async settlePendingRefund(t){return e.send({op:"SettlePendingRefund",method:"POST",path:"/payments/intents/"+c("SettlePendingRefund","intent_id",t.path.intent_id)+"/pending-refund",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async captureIntent(t){return e.send({op:"CaptureIntent",method:"POST",path:"/payments/intents/"+c("CaptureIntent","intent_id",t.path.intent_id)+"/capture",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async confirmIntent(t){return e.send({op:"ConfirmIntent",method:"POST",path:"/payments/intents/"+c("ConfirmIntent","intent_id",t.path.intent_id)+"/confirm",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async submitIntentOtp(t){return e.send({op:"SubmitIntentOTP",method:"POST",path:"/payments/intents/"+c("SubmitIntentOTP","intent_id",t.path.intent_id)+"/otp",auth:[["ApiKeyAuth"],["ApiKeyAuth","userJWT"],["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMyMethods(t){return e.send({op:"ListMyMethods",method:"GET",path:"/payments/me/methods",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async addMyMethod(t){return e.send({op:"AddMyMethod",method:"POST",path:"/payments/me/methods",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async deleteMyMethod(t){return e.send({op:"DeleteMyMethod",method:"DELETE",path:"/payments/me/methods/"+c("DeleteMyMethod","method_id",t.path.method_id),auth:[["ApiKeyAuth","userJWT"]],answers:{204:"empty"},signal:t.signal})},async createMyPortal(t){return e.send({op:"CreateMyPortal",method:"POST",path:"/payments/me/portal",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getMyProfile(t){return e.send({op:"GetMyProfile",method:"GET",path:"/payments/me/profile",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async updateMyProfile(t){return e.send({op:"UpdateMyProfile",method:"PUT",path:"/payments/me/profile",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listMySubscriptions(t){return e.send({op:"ListMySubscriptions",method:"GET",path:"/payments/me/subscriptions",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async cancelMySubscription(t){return e.send({op:"CancelMySubscription",method:"POST",path:"/payments/me/subscriptions/"+c("CancelMySubscription","subscription_id",t.path.subscription_id)+"/cancel",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t.signal})},async listMyWallets(t){return e.send({op:"ListMyWallets",method:"GET",path:"/payments/me/wallets",auth:[["ApiKeyAuth","userJWT"]],answers:{200:"json"},signal:t?.signal})},async createMySpendToken(t){return e.send({op:"CreateMySpendToken",method:"POST",path:"/payments/me/wallets/spend-tokens",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async topUpMyWallet(t){return e.send({op:"TopUpMyWallet",method:"POST",path:"/payments/me/wallets/top-up",auth:[["ApiKeyAuth","userJWT"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listRefunds(t){return e.send({op:"ListRefunds",method:"GET",path:"/payments/refunds",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createRefund(t){return e.send({op:"CreateRefund",method:"POST",path:"/payments/refunds",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listRoutingRules(t){return e.send({op:"ListRoutingRules",method:"GET",path:"/payments/routing-rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async replaceRoutingRules(t){return e.send({op:"ReplaceRoutingRules",method:"PUT",path:"/payments/routing-rules",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSellerAccount(t){return e.send({op:"GetSellerAccount",method:"GET",path:"/payments/seller-accounts/"+c("GetSellerAccount","seller_ref",t.path.seller_ref),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listSellerLedger(t){return e.send({op:"ListSellerLedger",method:"GET",path:"/payments/seller-accounts/"+c("ListSellerLedger","seller_ref",t.path.seller_ref)+"/ledger",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getSettings(t){return e.send({op:"GetSettings",method:"GET",path:"/payments/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async updateSettings(t){return e.send({op:"UpdateSettings",method:"PUT",path:"/payments/settings",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPaymentSplits(t){return e.send({op:"ListPaymentSplits",method:"GET",path:"/payments/splits",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async updatePaymentSplit(t){return e.send({op:"UpdatePaymentSplit",method:"PUT",path:"/payments/splits/"+c("UpdatePaymentSplit","split_id",t.path.split_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async approvePaymentSplit(t){return e.send({op:"ApprovePaymentSplit",method:"POST",path:"/payments/splits/"+c("ApprovePaymentSplit","split_id",t.path.split_id)+"/approve",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async disapprovePaymentSplit(t){return e.send({op:"DisapprovePaymentSplit",method:"POST",path:"/payments/splits/"+c("DisapprovePaymentSplit","split_id",t.path.split_id)+"/disapprove",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async refundPaymentSplit(t){return e.send({op:"RefundPaymentSplit",method:"POST",path:"/payments/splits/"+c("RefundPaymentSplit","split_id",t.path.split_id)+"/refund",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async stripeAppCallback(t){return e.send({op:"StripeAppCallback",method:"GET",path:"/payments/stripe/app/callback",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async createStripeAppGrant(t){return e.send({op:"CreateStripeAppGrant",method:"POST",path:"/payments/stripe/app/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async stripeAppInstallPage(t){return e.send({op:"StripeAppInstallPage",method:"GET",path:"/payments/stripe/app/install",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async stripeAppInstallStart(t){return e.send({op:"StripeAppInstallStart",method:"POST",path:"/payments/stripe/app/install",auth:[],answers:{303:"redirect"},signal:t?.signal})},async listSubMerchants(t){return e.send({op:"ListSubMerchants",method:"GET",path:"/payments/sub-merchants",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async upsertSubMerchant(t){return e.send({op:"UpsertSubMerchant",method:"POST",path:"/payments/sub-merchants",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSubMerchant(t){return e.send({op:"GetSubMerchant",method:"GET",path:"/payments/sub-merchants/"+c("GetSubMerchant","sub_merchant_id",t.path.sub_merchant_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createSubMerchantOnboardingLink(t){return e.send({op:"CreateSubMerchantOnboardingLink",method:"POST",path:"/payments/sub-merchants/"+c("CreateSubMerchantOnboardingLink","sub_merchant_id",t.path.sub_merchant_id)+"/onboarding-link",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async syncSubMerchant(t){return e.send({op:"SyncSubMerchant",method:"POST",path:"/payments/sub-merchants/"+c("SyncSubMerchant","sub_merchant_id",t.path.sub_merchant_id)+"/sync",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listSubscriptions(t){return e.send({op:"ListSubscriptions",method:"GET",path:"/payments/subscriptions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async createSubscription(t){return e.send({op:"CreateSubscription",method:"POST",path:"/payments/subscriptions",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async cancelSubscription(t){return e.send({op:"CancelSubscription",method:"POST",path:"/payments/subscriptions/"+c("CancelSubscription","subscription_id",t.path.subscription_id)+"/cancel",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async extendSubscription(t){return e.send({op:"ExtendSubscription",method:"POST",path:"/payments/subscriptions/"+c("ExtendSubscription","subscription_id",t.path.subscription_id)+"/extend",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listWallets(t){return e.send({op:"ListWallets",method:"GET",path:"/payments/wallets",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async upsertWallet(t){return e.send({op:"UpsertWallet",method:"POST",path:"/payments/wallets",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async chargeWallet(t){return e.send({op:"ChargeWallet",method:"POST",path:"/payments/wallets/charge",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async creditWallet(t){return e.send({op:"CreditWallet",method:"POST",path:"/payments/wallets/credit",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getCustomerWallets(t){return e.send({op:"GetCustomerWallets",method:"GET",path:"/payments/wallets/customers/"+c("GetCustomerWallets","customer_id",t.path.customer_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async freezeWallet(t){return e.send({op:"FreezeWallet",method:"PUT",path:"/payments/wallets/customers/"+c("FreezeWallet","customer_id",t.path.customer_id)+"/"+c("FreezeWallet","wallet_key",t.path.wallet_key)+"/freeze",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createWalletHold(t){return e.send({op:"CreateWalletHold",method:"POST",path:"/payments/wallets/holds",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async commitWalletHold(t){return e.send({op:"CommitWalletHold",method:"POST",path:"/payments/wallets/holds/"+c("CommitWalletHold","hold_id",t.path.hold_id)+"/commit",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async releaseWalletHold(t){return e.send({op:"ReleaseWalletHold",method:"POST",path:"/payments/wallets/holds/"+c("ReleaseWalletHold","hold_id",t.path.hold_id)+"/release",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async voidPendingWalletCredits(t){return e.send({op:"VoidPendingWalletCredits",method:"POST",path:"/payments/wallets/pending/void",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async transferWallet(t){return e.send({op:"TransferWallet",method:"POST",path:"/payments/wallets/transfer",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async iyzicoWebhook(t){return e.send({op:"IyzicoWebhook",method:"POST",path:"/payments/webhooks/iyzico",auth:[],answers:{200:"empty"},signal:t?.signal})},async stripeWebhook(t){return e.send({op:"StripeWebhook",method:"POST",path:"/payments/webhooks/stripe",auth:[],answers:{200:"empty"},signal:t?.signal})},async stripeAppWebhook(t){return e.send({op:"StripeAppWebhook",method:"POST",path:"/payments/webhooks/stripe-app",auth:[],answers:{200:"empty"},signal:t?.signal})},async stripeConnectWebhook(t){return e.send({op:"StripeConnectWebhook",method:"POST",path:"/payments/webhooks/stripe/connect",auth:[],answers:{200:"empty"},signal:t?.signal})},async getCustomer(t){return e.send({op:"GetCustomer",method:"GET",path:"/payments/customers/"+c("GetCustomer","customer_id",t.path.customer_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async updateCustomer(t){return e.send({op:"UpdateCustomer",method:"PUT",path:"/payments/customers/"+c("UpdateCustomer","customer_id",t.path.customer_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteCustomer(t){return e.send({op:"DeleteCustomer",method:"DELETE",path:"/payments/customers/"+c("DeleteCustomer","customer_id",t.path.customer_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listCustomerMethods(t){return e.send({op:"ListCustomerMethods",method:"GET",path:"/payments/customers/"+c("ListCustomerMethods","customer_id",t.path.customer_id)+"/methods",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async addCustomerMethod(t){return e.send({op:"AddCustomerMethod",method:"POST",path:"/payments/customers/"+c("AddCustomerMethod","customer_id",t.path.customer_id)+"/methods",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteCustomerMethod(t){return e.send({op:"DeleteCustomerMethod",method:"DELETE",path:"/payments/customers/"+c("DeleteCustomerMethod","customer_id",t.path.customer_id)+"/methods/"+c("DeleteCustomerMethod","method_id",t.path.method_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async setCustomerDefaultMethod(t){return e.send({op:"SetCustomerDefaultMethod",method:"POST",path:"/payments/customers/"+c("SetCustomerDefaultMethod","customer_id",t.path.customer_id)+"/methods/"+c("SetCustomerDefaultMethod","method_id",t.path.method_id)+"/default",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createCustomerPortal(t){return e.send({op:"CreateCustomerPortal",method:"POST",path:"/payments/customers/"+c("CreateCustomerPortal","customer_id",t.path.customer_id)+"/portal",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})}}}var Do={};wt(Do,{client:()=>o$});function o$(e){return{async broadcast(t){return e.send({op:"Broadcast",method:"POST",path:"/realtime/broadcast",auth:[["SecretKeyAuth"]],answers:{202:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getChannels(t){return e.send({op:"GetChannels",method:"GET",path:"/realtime/channels",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putChannels(t){return e.send({op:"PutChannels",method:"PUT",path:"/realtime/channels",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getLimits(t){return e.send({op:"GetLimits",method:"GET",path:"/realtime/limits",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async putLimits(t){return e.send({op:"PutLimits",method:"PUT",path:"/realtime/limits",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revalidate(t){return e.send({op:"Revalidate",method:"POST",path:"/realtime/revalidate",auth:[["SecretKeyAuth"]],answers:{202:"empty"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async writeState(t){return e.send({op:"WriteState",method:"POST",path:"/realtime/state",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getStats(t){return e.send({op:"GetStats",method:"GET",path:"/realtime/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})}}}var zo={};wt(zo,{client:()=>i$});function i$(e){return{async listSecretAudit(t){return e.send({op:"ListSecretAudit",method:"GET",path:"/secrets/audit",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listFieldKeys(t){return e.send({op:"ListFieldKeys",method:"GET",path:"/secrets/fields",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getFieldKeys(t){return e.send({op:"GetFieldKeys",method:"GET",path:"/secrets/fields/keys",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async openFields(t){return e.send({op:"OpenFields",method:"POST",path:"/secrets/fields/open",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sealPlaceholder(t){return e.send({op:"SealPlaceholder",method:"POST",path:"/secrets/fields/placeholder",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async rotateFieldKeys(t){return e.send({op:"RotateFieldKeys",method:"POST",path:"/secrets/fields/rotate",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async listTransitKeys(t){return e.send({op:"ListTransitKeys",method:"GET",path:"/secrets/transit",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getTransitKeys(t){return e.send({op:"GetTransitKeys",method:"GET",path:"/secrets/transit/keys",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getTransitPublicKeys(t){return e.send({op:"GetTransitPublicKeys",method:"GET",path:"/secrets/transit/public",auth:[["ApiKeyAuth"],["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async rotateTransitKeys(t){return e.send({op:"RotateTransitKeys",method:"POST",path:"/secrets/transit/rotate",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t?.headers,body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async retireTransitKey(t){return e.send({op:"RetireTransitKey",method:"POST",path:"/secrets/transit/"+c("RetireTransitKey","kid",t.path.kid)+"/retire",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async listSecrets(t){return e.send({op:"ListSecrets",method:"GET",path:"/secrets/"+c("ListSecrets","environment",t.path.environment),auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getEnvironmentValues(t){return e.send({op:"GetEnvironmentValues",method:"GET",path:"/secrets/"+c("GetEnvironmentValues","environment",t.path.environment)+"/values",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getSecret(t){return e.send({op:"GetSecret",method:"GET",path:"/secrets/"+c("GetSecret","environment",t.path.environment)+"/"+c("GetSecret","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putSecret(t){return e.send({op:"PutSecret",method:"PUT",path:"/secrets/"+c("PutSecret","environment",t.path.environment)+"/"+c("PutSecret","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteSecret(t){return e.send({op:"DeleteSecret",method:"DELETE",path:"/secrets/"+c("DeleteSecret","environment",t.path.environment)+"/"+c("DeleteSecret","name",t.path.name),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async rollbackSecret(t){return e.send({op:"RollbackSecret",method:"POST",path:"/secrets/"+c("RollbackSecret","environment",t.path.environment)+"/"+c("RollbackSecret","name",t.path.name)+"/rollback",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listSecretVersions(t){return e.send({op:"ListSecretVersions",method:"GET",path:"/secrets/"+c("ListSecretVersions","environment",t.path.environment)+"/"+c("ListSecretVersions","name",t.path.name)+"/versions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})}}}var qo={};wt(qo,{client:()=>r$});function r$(e){return{async listBuckets(t){return e.send({op:"ListBuckets",method:"GET",path:"/storage/buckets",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async getBucket(t){return e.send({op:"GetBucket",method:"GET",path:"/storage/buckets/"+c("GetBucket","bucket",t.path.bucket),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async putBucket(t){return e.send({op:"PutBucket",method:"PUT",path:"/storage/buckets/"+c("PutBucket","bucket",t.path.bucket),auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteBucket(t){return e.send({op:"DeleteBucket",method:"DELETE",path:"/storage/buckets/"+c("DeleteBucket","bucket",t.path.bucket),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async copyObject(t){return e.send({op:"CopyObject",method:"POST",path:"/storage/buckets/"+c("CopyObject","bucket",t.path.bucket)+"/copy",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async moveObject(t){return e.send({op:"MoveObject",method:"POST",path:"/storage/buckets/"+c("MoveObject","bucket",t.path.bucket)+"/move",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listObjects(t){return e.send({op:"ListObjects",method:"GET",path:"/storage/buckets/"+c("ListObjects","bucket",t.path.bucket)+"/objects",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async getObject(t){return e.send({op:"GetObject",method:"GET",path:"/storage/buckets/"+c("GetObject","bucket",t.path.bucket)+"/objects/"+c("GetObject","path",t.path.path),auth:[["SecretKeyAuth"]],answers:{200:"raw",206:"raw",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async putObject(t){return e.send({op:"PutObject",method:"PUT",path:"/storage/buckets/"+c("PutObject","bucket",t.path.bucket)+"/objects/"+c("PutObject","path",t.path.path),auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},query:t.query,headers:t.headers,body:{kind:"raw",contentType:t.contentType??"application/octet-stream",value:t.body},signal:t.signal})},async deleteObject(t){return e.send({op:"DeleteObject",method:"DELETE",path:"/storage/buckets/"+c("DeleteObject","bucket",t.path.bucket)+"/objects/"+c("DeleteObject","path",t.path.path),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async headObject(t){return e.send({op:"HeadObject",method:"HEAD",path:"/storage/buckets/"+c("HeadObject","bucket",t.path.bucket)+"/objects/"+c("HeadObject","path",t.path.path),auth:[["SecretKeyAuth"]],answers:{200:"empty",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async createSignedUrl(t){return e.send({op:"CreateSignedUrl",method:"POST",path:"/storage/buckets/"+c("CreateSignedUrl","bucket",t.path.bucket)+"/signed-urls",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async createUploadUrl(t){return e.send({op:"CreateUploadUrl",method:"POST",path:"/storage/buckets/"+c("CreateUploadUrl","bucket",t.path.bucket)+"/upload-urls",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getPublicObject(t){return e.send({op:"GetPublicObject",method:"GET",path:"/storage/public/"+c("GetPublicObject","bucket",t.path.bucket)+"/"+c("GetPublicObject","path",t.path.path),auth:[],answers:{200:"raw",206:"raw",302:"redirect",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async headPublicObject(t){return e.send({op:"HeadPublicObject",method:"HEAD",path:"/storage/public/"+c("HeadPublicObject","bucket",t.path.bucket)+"/"+c("HeadPublicObject","path",t.path.path),auth:[],answers:{200:"empty",302:"redirect",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async getSignedObject(t){return e.send({op:"GetSignedObject",method:"GET",path:"/storage/signed/"+c("GetSignedObject","bucket",t.path.bucket)+"/"+c("GetSignedObject","path",t.path.path),auth:[],answers:{200:"raw",206:"raw",302:"redirect",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async putSignedObject(t){return e.send({op:"PutSignedObject",method:"PUT",path:"/storage/signed/"+c("PutSignedObject","bucket",t.path.bucket)+"/"+c("PutSignedObject","path",t.path.path),auth:[],answers:{200:"json",201:"json"},query:t.query,headers:t.headers,body:{kind:"raw",contentType:t.contentType??"application/octet-stream",value:t.body},signal:t.signal})},async headSignedObject(t){return e.send({op:"HeadSignedObject",method:"HEAD",path:"/storage/signed/"+c("HeadSignedObject","bucket",t.path.bucket)+"/"+c("HeadSignedObject","path",t.path.path),auth:[],answers:{200:"empty",302:"redirect",304:"empty"},query:t.query,headers:t.headers,signal:t.signal})},async getStorageStats(t){return e.send({op:"GetStorageStats",method:"GET",path:"/storage/stats",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async upload(t){return e.send({op:"Upload",method:"POST",path:"/storage/upload/"+c("Upload","machine",t.path.machine)+"/"+c("Upload","route",t.path.route),auth:[["ApiKeyAuth","userJWT"],["ApiKeyAuth"]],answers:{},body:{kind:"raw",contentType:t.contentType??"multipart/form-data",value:t.body},signal:t.signal})}}}var Go={};wt(Go,{client:()=>l$});function l$(e){return{async listActions(t){return e.send({op:"ListActions",method:"GET",path:"/stores/actions",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getAction(t){return e.send({op:"GetAction",method:"GET",path:"/stores/actions/"+c("GetAction","action_id",t.path.action_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async confirmAction(t){return e.send({op:"ConfirmAction",method:"POST",path:"/stores/actions/"+c("ConfirmAction","action_id",t.path.action_id)+"/confirm",auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async declineAction(t){return e.send({op:"DeclineAction",method:"POST",path:"/stores/actions/"+c("DeclineAction","action_id",t.path.action_id)+"/decline",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async getAppleAccount(t){return e.send({op:"GetAppleAccount",method:"GET",path:"/stores/apple",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async disconnectApple(t){return e.send({op:"DisconnectApple",method:"DELETE",path:"/stores/apple",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async checkAppleAccount(t){return e.send({op:"CheckAppleAccount",method:"POST",path:"/stores/apple/check",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async createAppleGrant(t){return e.send({op:"CreateAppleGrant",method:"POST",path:"/stores/apple/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getSandboxReadiness(t){return e.send({op:"GetSandboxReadiness",method:"GET",path:"/stores/apple/readiness",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async listSandboxTesters(t){return e.send({op:"ListSandboxTesters",method:"GET",path:"/stores/apple/sandbox-testers",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async clearSandboxPurchaseHistory(t){return e.send({op:"ClearSandboxPurchaseHistory",method:"POST",path:"/stores/apple/sandbox-testers/clear-purchase-history",auth:[["SecretKeyAuth"]],answers:{202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async updateSandboxTester(t){return e.send({op:"UpdateSandboxTester",method:"PATCH",path:"/stores/apple/sandbox-testers/"+c("UpdateSandboxTester","tester_id",t.path.tester_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listApps(t){return e.send({op:"ListApps",method:"GET",path:"/stores/apps",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async listFeedback(t){return e.send({op:"ListFeedback",method:"GET",path:"/stores/apps/"+c("ListFeedback","app_id",t.path.app_id)+"/feedback",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getFeedback(t){return e.send({op:"GetFeedback",method:"GET",path:"/stores/apps/"+c("GetFeedback","app_id",t.path.app_id)+"/feedback/"+c("GetFeedback","kind",t.path.kind)+"/"+c("GetFeedback","feedback_id",t.path.feedback_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async listGroups(t){return e.send({op:"ListGroups",method:"GET",path:"/stores/apps/"+c("ListGroups","app_id",t.path.app_id)+"/groups",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async createGroup(t){return e.send({op:"CreateGroup",method:"POST",path:"/stores/apps/"+c("CreateGroup","app_id",t.path.app_id)+"/groups",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async linkApp(t){return e.send({op:"LinkApp",method:"POST",path:"/stores/apps/"+c("LinkApp","app_id",t.path.app_id)+"/link",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getListing(t){return e.send({op:"GetListing",method:"GET",path:"/stores/apps/"+c("GetListing","app_id",t.path.app_id)+"/listing",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setListing(t){return e.send({op:"SetListing",method:"PUT",path:"/stores/apps/"+c("SetListing","app_id",t.path.app_id)+"/listing",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async planListing(t){return e.send({op:"PlanListing",method:"POST",path:"/stores/apps/"+c("PlanListing","app_id",t.path.app_id)+"/listing/plan",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async createPackage(t){return e.send({op:"CreatePackage",method:"POST",path:"/stores/apps/"+c("CreatePackage","app_id",t.path.app_id)+"/packages",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async uploadScreenshot(t){return e.send({op:"UploadScreenshot",method:"PUT",path:"/stores/apps/"+c("UploadScreenshot","app_id",t.path.app_id)+"/screenshots",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,query:t.query,headers:t.headers,body:{kind:"raw",contentType:t.contentType??"image/png",value:t.body},signal:t.signal})},async getReviewInfo(t){return e.send({op:"GetReviewInfo",method:"GET",path:"/stores/apps/"+c("GetReviewInfo","app_id",t.path.app_id)+"/testflight/review-info",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async setReviewInfo(t){return e.send({op:"SetReviewInfo",method:"PUT",path:"/stores/apps/"+c("SetReviewInfo","app_id",t.path.app_id)+"/testflight/review-info",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getUploadKey(t){return e.send({op:"GetUploadKey",method:"GET",path:"/stores/apps/"+c("GetUploadKey","app_id",t.path.app_id)+"/upload-key",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getAppStoreVersion(t){return e.send({op:"GetAppStoreVersion",method:"GET",path:"/stores/apps/"+c("GetAppStoreVersion","app_id",t.path.app_id)+"/version",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async prepareAppStoreVersion(t){return e.send({op:"PrepareAppStoreVersion",method:"PUT",path:"/stores/apps/"+c("PrepareAppStoreVersion","app_id",t.path.app_id)+"/version",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async planPhasedRelease(t){return e.send({op:"PlanPhasedRelease",method:"POST",path:"/stores/apps/"+c("PlanPhasedRelease","app_id",t.path.app_id)+"/version/phased-release",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async planReleaseVersion(t){return e.send({op:"PlanReleaseVersion",method:"POST",path:"/stores/apps/"+c("PlanReleaseVersion","app_id",t.path.app_id)+"/version/release",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async planSubmitReview(t){return e.send({op:"PlanSubmitReview",method:"POST",path:"/stores/apps/"+c("PlanSubmitReview","app_id",t.path.app_id)+"/version/submit",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async planWithdrawReview(t){return e.send({op:"PlanWithdrawReview",method:"POST",path:"/stores/apps/"+c("PlanWithdrawReview","app_id",t.path.app_id)+"/version/withdraw",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async getAppVitals(t){return e.send({op:"GetAppVitals",method:"GET",path:"/stores/apps/"+c("GetAppVitals","app_id",t.path.app_id)+"/vitals",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getAppWebhook(t){return e.send({op:"GetAppWebhook",method:"GET",path:"/stores/apps/"+c("GetAppWebhook","app_id",t.path.app_id)+"/webhook",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async makeAppWebhook(t){return e.send({op:"MakeAppWebhook",method:"POST",path:"/stores/apps/"+c("MakeAppWebhook","app_id",t.path.app_id)+"/webhook",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async pingAppWebhook(t){return e.send({op:"PingAppWebhook",method:"POST",path:"/stores/apps/"+c("PingAppWebhook","app_id",t.path.app_id)+"/webhook/ping",auth:[["SecretKeyAuth"]],answers:{202:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async downloadSignedBundle(t){return e.send({op:"DownloadSignedBundle",method:"GET",path:"/stores/bundles",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async getConnectPage(t){return e.send({op:"GetConnectPage",method:"GET",path:"/stores/connect",auth:[],answers:{200:"raw"},signal:t?.signal})},async connectAppleKey(t){return e.send({op:"ConnectAppleKey",method:"POST",path:"/stores/connect",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getGoogleAccount(t){return e.send({op:"GetGoogleAccount",method:"GET",path:"/stores/google",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async connectGoogle(t){return e.send({op:"ConnectGoogle",method:"POST",path:"/stores/google",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async disconnectGoogle(t){return e.send({op:"DisconnectGoogle",method:"DELETE",path:"/stores/google",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async checkGoogleAccount(t){return e.send({op:"CheckGoogleAccount",method:"POST",path:"/stores/google/check",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async deleteGroup(t){return e.send({op:"DeleteGroup",method:"DELETE",path:"/stores/groups/"+c("DeleteGroup","group_id",t.path.group_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async renameGroup(t){return e.send({op:"RenameGroup",method:"PATCH",path:"/stores/groups/"+c("RenameGroup","group_id",t.path.group_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async addGroupBuild(t){return e.send({op:"AddGroupBuild",method:"POST",path:"/stores/groups/"+c("AddGroupBuild","group_id",t.path.group_id)+"/builds",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listTesters(t){return e.send({op:"ListTesters",method:"GET",path:"/stores/groups/"+c("ListTesters","group_id",t.path.group_id)+"/testers",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setTesters(t){return e.send({op:"SetTesters",method:"PUT",path:"/stores/groups/"+c("SetTesters","group_id",t.path.group_id)+"/testers",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listPackages(t){return e.send({op:"ListPackages",method:"GET",path:"/stores/packages",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getPackage(t){return e.send({op:"GetPackage",method:"GET",path:"/stores/packages/"+c("GetPackage","package_id",t.path.package_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async uploadArtifact(t){return e.send({op:"UploadArtifact",method:"PUT",path:"/stores/packages/"+c("UploadArtifact","package_id",t.path.package_id)+"/artifact",auth:[],answers:{200:"json"},headers:t.headers,body:{kind:"raw",contentType:t.contentType??"application/octet-stream",value:t.body},signal:t.signal})},async planBetaReview(t){return e.send({op:"PlanBetaReview",method:"POST",path:"/stores/packages/"+c("PlanBetaReview","package_id",t.path.package_id)+"/beta-review",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async listDeliveries(t){return e.send({op:"ListDeliveries",method:"GET",path:"/stores/packages/"+c("ListDeliveries","package_id",t.path.package_id)+"/deliveries",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deliver(t){return e.send({op:"Deliver",method:"POST",path:"/stores/packages/"+c("Deliver","package_id",t.path.package_id)+"/deliveries",auth:[["SecretKeyAuth"]],answers:{200:"json",202:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getSignedBundleLink(t){return e.send({op:"GetSignedBundleLink",method:"POST",path:"/stores/packages/"+c("GetSignedBundleLink","package_id",t.path.package_id)+"/deliveries/"+c("GetSignedBundleLink","channel",t.path.channel)+"/bundle-link",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async planExpire(t){return e.send({op:"PlanExpire",method:"POST",path:"/stores/packages/"+c("PlanExpire","package_id",t.path.package_id)+"/expire",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async planExportCompliance(t){return e.send({op:"PlanExportCompliance",method:"POST",path:"/stores/packages/"+c("PlanExportCompliance","package_id",t.path.package_id)+"/export-compliance",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async setWhatToTest(t){return e.send({op:"SetWhatToTest",method:"PUT",path:"/stores/packages/"+c("SetWhatToTest","package_id",t.path.package_id)+"/what-to-test",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async takeAppleWebhook(t){return e.send({op:"TakeAppleWebhook",method:"POST",path:"/stores/webhooks/apple/"+c("TakeAppleWebhook","app_id",t.path.app_id),auth:[],answers:{200:"empty"},headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getAppleSession(t){return e.send({op:"GetAppleSession",method:"GET",path:"/stores/apple/session",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async disconnectAppleSession(t){return e.send({op:"DisconnectAppleSession",method:"DELETE",path:"/stores/apple/session",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async checkAppleSession(t){return e.send({op:"CheckAppleSession",method:"POST",path:"/stores/apple/session/check",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async createAppleIdGrant(t){return e.send({op:"CreateAppleIDGrant",method:"POST",path:"/stores/apple/session/grants",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t?.headers,signal:t?.signal})},async getAppleIdPage(t){return e.send({op:"GetAppleIDPage",method:"GET",path:"/stores/connect/apple-id",auth:[],answers:{200:"raw"},signal:t?.signal})},async signInAppleId(t){return e.send({op:"SignInAppleID",method:"POST",path:"/stores/connect/apple-id",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async submitAppleIdCode(t){return e.send({op:"SubmitAppleIDCode",method:"POST",path:"/stores/connect/apple-id/code",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async chooseAppleIdTeam(t){return e.send({op:"ChooseAppleIDTeam",method:"POST",path:"/stores/connect/apple-id/team",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getAppReview(t){return e.send({op:"GetAppReview",method:"GET",path:"/stores/apps/"+c("GetAppReview","app_id",t.path.app_id)+"/review",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async getReviewAttachment(t){return e.send({op:"GetReviewAttachment",method:"GET",path:"/stores/apps/"+c("GetReviewAttachment","app_id",t.path.app_id)+"/review/threads/"+c("GetReviewAttachment","thread_id",t.path.thread_id)+"/attachments/"+c("GetReviewAttachment","attachment_id",t.path.attachment_id),auth:[["SecretKeyAuth"]],answers:{200:"raw"},signal:t.signal})},async setReviewDraft(t){return e.send({op:"SetReviewDraft",method:"PUT",path:"/stores/apps/"+c("SetReviewDraft","app_id",t.path.app_id)+"/review/threads/"+c("SetReviewDraft","thread_id",t.path.thread_id)+"/draft",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async sendReviewDraft(t){return e.send({op:"SendReviewDraft",method:"POST",path:"/stores/apps/"+c("SendReviewDraft","app_id",t.path.app_id)+"/review/threads/"+c("SendReviewDraft","thread_id",t.path.thread_id)+"/draft/send",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async getAppPrivacy(t){return e.send({op:"GetAppPrivacy",method:"GET",path:"/stores/apps/"+c("GetAppPrivacy","app_id",t.path.app_id)+"/privacy",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async setAppPrivacy(t){return e.send({op:"SetAppPrivacy",method:"PUT",path:"/stores/apps/"+c("SetAppPrivacy","app_id",t.path.app_id)+"/privacy",auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async makeAppRecord(t){return e.send({op:"MakeAppRecord",method:"POST",path:"/stores/apps/"+c("MakeAppRecord","app_id",t.path.app_id)+"/record",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async removeAppRecord(t){return e.send({op:"RemoveAppRecord",method:"DELETE",path:"/stores/apps/"+c("RemoveAppRecord","app_id",t.path.app_id)+"/record",auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listMadeAppleKeys(t){return e.send({op:"ListMadeAppleKeys",method:"GET",path:"/stores/apple/keys",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async makeAppleKey(t){return e.send({op:"MakeAppleKey",method:"POST",path:"/stores/apple/keys",auth:[["SecretKeyAuth"]],answers:{201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revokeMadeAppleKey(t){return e.send({op:"RevokeMadeAppleKey",method:"DELETE",path:"/stores/apple/keys/"+c("RevokeMadeAppleKey","key_id",t.path.key_id),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async shareAppleSession(t){return e.send({op:"ShareAppleSession",method:"PUT",path:"/stores/apple/session/shares/"+c("ShareAppleSession","environment",t.path.environment),auth:[["SecretKeyAuth"]],answers:{200:"json"},idempotent:!0,headers:t.headers,signal:t.signal})},async unshareAppleSession(t){return e.send({op:"UnshareAppleSession",method:"DELETE",path:"/stores/apple/session/shares/"+c("UnshareAppleSession","environment",t.path.environment),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async getInstallPage(t){return e.send({op:"GetInstallPage",method:"GET",path:"/stores/install",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async getInstallStatus(t){return e.send({op:"GetInstallStatus",method:"GET",path:"/stores/install/status",auth:[],answers:{200:"json"},query:t.query,signal:t.signal})},async retryInstall(t){return e.send({op:"RetryInstall",method:"POST",path:"/stores/install/retry",auth:[],answers:{204:"empty"},query:t.query,signal:t.signal})},async getInstallEnrollment(t){return e.send({op:"GetInstallEnrollment",method:"GET",path:"/stores/install/enroll",auth:[],answers:{200:"raw",303:"redirect"},query:t.query,signal:t.signal})},async registerInstallDevice(t){return e.send({op:"RegisterInstallDevice",method:"POST",path:"/stores/install/device",auth:[],answers:{200:"raw",301:"redirect"},query:t.query,body:{kind:"raw",contentType:t.contentType??"application/pkcs7-signature",value:t.body},signal:t.signal})},async getInstallManifest(t){return e.send({op:"GetInstallManifest",method:"GET",path:"/stores/install/manifest",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async getInstallBuild(t){return e.send({op:"GetInstallBuild",method:"GET",path:"/stores/install/app",auth:[],answers:{200:"raw"},query:t.query,signal:t.signal})},async headInstallBuild(t){return e.send({op:"HeadInstallBuild",method:"HEAD",path:"/stores/install/app",auth:[],answers:{200:"empty"},query:t.query,signal:t.signal})},async getInstallIcon(t){return e.send({op:"GetInstallIcon",method:"GET",path:"/stores/install/icon",auth:[],answers:{200:"raw"},query:t?.query,signal:t?.signal})},async listInvitations(t){return e.send({op:"ListInvitations",method:"GET",path:"/stores/packages/"+c("ListInvitations","package_id",t.path.package_id)+"/invitations",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async invitePerson(t){return e.send({op:"InvitePerson",method:"POST",path:"/stores/packages/"+c("InvitePerson","package_id",t.path.package_id)+"/invitations",auth:[["SecretKeyAuth"]],answers:{200:"json",201:"json"},idempotent:!0,headers:t.headers,body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async revokeInvitation(t){return e.send({op:"RevokeInvitation",method:"DELETE",path:"/stores/invitations/"+c("RevokeInvitation","invitation_id",t.path.invitation_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},idempotent:!0,headers:t.headers,signal:t.signal})},async listDevices(t){return e.send({op:"ListDevices",method:"GET",path:"/stores/devices",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})}}}var rr={};wt(rr,{client:()=>p$});function p$(e){return{async listWorkspaces(t){return e.send({op:"ListWorkspaces",method:"GET",path:"/workspaces",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createWorkspace(t){return e.send({op:"CreateWorkspace",method:"POST",path:"/workspaces",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async testWorkspaceByos(t){return e.send({op:"TestWorkspaceBYOS",method:"POST",path:"/workspaces/byos/test",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async listProjectS3Keys(t){return e.send({op:"ListProjectS3Keys",method:"GET",path:"/workspaces/s3-keys",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t?.signal})},async createProjectS3Key(t){return e.send({op:"CreateProjectS3Key",method:"POST",path:"/workspaces/s3-keys",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t?.body},signal:t?.signal})},async deleteProjectS3Key(t){return e.send({op:"DeleteProjectS3Key",method:"DELETE",path:"/workspaces/s3-keys/"+c("DeleteProjectS3Key","token_id",t.path.token_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async getWorkspace(t){return e.send({op:"GetWorkspace",method:"GET",path:"/workspaces/"+c("GetWorkspace","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async deleteWorkspace(t){return e.send({op:"DeleteWorkspace",method:"DELETE",path:"/workspaces/"+c("DeleteWorkspace","id",t.path.id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},query:t.query,signal:t.signal})},async updateWorkspaceStorage(t){return e.send({op:"UpdateWorkspaceStorage",method:"PUT",path:"/workspaces/"+c("UpdateWorkspaceStorage","id",t.path.id)+"/storage",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async getWorkspaceFiles(t){return e.send({op:"GetWorkspaceFiles",method:"GET",path:"/workspaces/"+c("GetWorkspaceFiles","id",t.path.id)+"/files",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async putWorkspaceFile(t){return e.send({op:"PutWorkspaceFile",method:"PUT",path:"/workspaces/"+c("PutWorkspaceFile","id",t.path.id)+"/files",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,body:{kind:"raw",contentType:t.contentType??"application/octet-stream",value:t.body},signal:t.signal})},async deleteWorkspaceFile(t){return e.send({op:"DeleteWorkspaceFile",method:"DELETE",path:"/workspaces/"+c("DeleteWorkspaceFile","id",t.path.id)+"/files",auth:[["SecretKeyAuth"]],answers:{204:"empty"},query:t.query,signal:t.signal})},async listWorkspaceTokens(t){return e.send({op:"ListWorkspaceTokens",method:"GET",path:"/workspaces/"+c("ListWorkspaceTokens","id",t.path.id)+"/tokens",auth:[["SecretKeyAuth"]],answers:{200:"json"},query:t.query,signal:t.signal})},async createWorkspaceToken(t){return e.send({op:"CreateWorkspaceToken",method:"POST",path:"/workspaces/"+c("CreateWorkspaceToken","id",t.path.id)+"/tokens",auth:[["SecretKeyAuth"]],answers:{201:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async deleteWorkspaceToken(t){return e.send({op:"DeleteWorkspaceToken",method:"DELETE",path:"/workspaces/"+c("DeleteWorkspaceToken","id",t.path.id)+"/tokens/"+c("DeleteWorkspaceToken","token_id",t.path.token_id),auth:[["SecretKeyAuth"]],answers:{204:"empty"},signal:t.signal})},async listWorkspaceLocks(t){return e.send({op:"ListWorkspaceLocks",method:"GET",path:"/workspaces/"+c("ListWorkspaceLocks","id",t.path.id)+"/locks",auth:[["SecretKeyAuth"]],answers:{200:"json"},signal:t.signal})},async acquireWorkspaceLock(t){return e.send({op:"AcquireWorkspaceLock",method:"POST",path:"/workspaces/"+c("AcquireWorkspaceLock","id",t.path.id)+"/locks",auth:[["SecretKeyAuth"]],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async releaseWorkspaceLock(t){return e.send({op:"ReleaseWorkspaceLock",method:"DELETE",path:"/workspaces/"+c("ReleaseWorkspaceLock","id",t.path.id)+"/locks",auth:[["SecretKeyAuth"]],answers:{204:"empty"},query:t.query,signal:t.signal})},async getSyncHead(t){return e.send({op:"GetSyncHead",method:"GET",path:"/workspaces/sync/head",auth:[],answers:{200:"json"},query:t?.query,signal:t?.signal})},async getSyncChanges(t){return e.send({op:"GetSyncChanges",method:"GET",path:"/workspaces/sync/changes",auth:[],answers:{200:"json"},query:t?.query,signal:t?.signal})},async publishSyncChanges(t){return e.send({op:"PublishSyncChanges",method:"POST",path:"/workspaces/sync/publish",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async requestSyncUploadGrants(t){return e.send({op:"RequestSyncUploadGrants",method:"POST",path:"/workspaces/sync/blobs/upload-grants",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async requestSyncDownloadGrants(t){return e.send({op:"RequestSyncDownloadGrants",method:"POST",path:"/workspaces/sync/blobs/download-grants",auth:[],answers:{200:"json"},body:{kind:"json",contentType:"application/json",value:t.body},signal:t.signal})},async downloadSignedSyncBlob(t){return e.send({op:"DownloadSignedSyncBlob",method:"GET",path:"/workspaces/sync/blobs/"+c("DownloadSignedSyncBlob","digest",t.path.digest),auth:[],answers:{200:"empty"},signal:t.signal})},async uploadSignedSyncBlob(t){return e.send({op:"UploadSignedSyncBlob",method:"PUT",path:"/workspaces/sync/blobs/"+c("UploadSignedSyncBlob","digest",t.path.digest),auth:[],answers:{200:"empty"},signal:t.signal})},async streamSyncEvents(t){return e.send({op:"StreamSyncEvents",method:"GET",path:"/workspaces/sync/events",auth:[],answers:{200:"raw"},signal:t?.signal})}}}var lr={attempts:3,maxWaitSeconds:30},d$=new Set([429,502,503,504]);function bp(e,t=lr){let n=t.sleep??m$;return{async send(s){let a=c$(s),o=a.body,i=!o||o.kind!=="raw"||xa(o.value),r=(a.method==="GET"||a.method==="HEAD"||a.idempotent===!0)&&i;for(let l=1;;l++)try{return await e.send(a)}catch(p){if(!r||l>=t.attempts||!(p instanceof G)||a.signal?.aborted)throw p;let d=u$(p,l,t.maxWaitSeconds);if(d===void 0)throw p;await n(d*1e3,a.signal)}}}}function c$(e){return e.idempotent?Object.entries(e.headers??{}).some(([n,s])=>n.toLowerCase()==="idempotency-key"&&s!==void 0&&s!==null&&s!=="")?e:{...e,headers:{...e.headers,"Idempotency-Key":g$()}}:e}function u$(e,t,n){return d$.has(e.status)||e.code==="network_error"?e.retryAfter!==void 0?e.retryAfter<=n?e.retryAfter:void 0:Math.min(.5*2**(t-1),n)*(.8+Math.random()*.4):void 0}function m$(e,t){return new Promise((n,s)=>{if(t?.aborted)return s(t.reason);let a=()=>{clearTimeout(o),s(t?.reason)},o=setTimeout(()=>{t?.removeEventListener("abort",a),n()},e);t?.addEventListener("abort",a,{once:!0})})}function g$(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=[...e].map(n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}import{hostname as h$}from"node:os";var y$=new Set(["apikey","authorization",hp]);function f$(e){let t={accept:"application/json"};for(let[n,s]of Object.entries(e??{}))s!=null&&!y$.has(n.toLowerCase())&&(t[n.toLowerCase()]=String(s));return t}function b$(e,t,n){let s=null;try{s=n.startsWith("/")?new URL(n,e):null}catch{s=null}if(!s||s.origin!==new URL(e).origin)throw new G({op:t,status:0,code:"invalid_path",message:`${t}: a module's path stays at its environment's address`});return s.href}async function w$(e){let t=e.status===204||e.status===304?"":await e.text();if(t!=="")try{return JSON.parse(t)}catch{return t}}function v$(e,t,n){let s=n??{},a=Number(t.headers.get("retry-after")??"");return new G({op:e,status:t.status,code:typeof s.error=="string"?s.error:`http_${t.status}`,message:pr(n,t.status),requestId:typeof s.request_id=="string"?s.request_id:t.headers.get("x-request-id")??void 0,retryAfter:Number.isFinite(a)&&a>0?a:typeof s.retry_after=="number"?s.retry_after:void 0,body:n})}var Hs=class{bytes;contentType;constructor(t,n){this.bytes=t,this.contentType=n}};function k$(e){return e instanceof Hs?{headers:{"content-type":e.contentType,"content-length":String(e.bytes.size)},body:e.bytes}:e===void 0?{headers:{}}:{headers:{"content-type":"application/json"},body:JSON.stringify(e)}}async function et(e,t,n,s,a,o){if(e.callPlatform&&t===cp)return e.callPlatform(e,n,s,a,o);let i=`${n} ${s}`,r=k$(a),l=await e.module(b$(Qt(e.cloud,t),i,s),{method:n,headers:{...f$(o),...r.headers},body:r.body}),p=await w$(l);if(l.status>=200&&l.status<300)return{status:l.status,body:Fi(p),etag:l.headers.get("etag")??void 0};throw v$(i,l,p)}var _$=10080*60*1e3;async function wp(e,t,n=!1){let s=await e.state.personalKey(t);if(!n&&s&&Date.parse(s.expires_at)-e.io.now()>_$)return s;let a=await e.post(`/environments/${Q("the environment's ref",t)}/personal-key`,{host:h$().slice(0,100)||"computer"});return await e.state.keepPersonalKey(t,a),a}function pr(e,t){let n=e??{},s=typeof n.error_description=="string"?n.error_description:`the module answered ${t}`,a=Array.isArray(n.field_errors)?n.field_errors.flatMap(o=>{let{pointer:i,message:r}=o??{};return typeof r=="string"?[`${typeof i=="string"&&i!==""?`${i}: `:""}${r}`]:[]}):[];return a.length>0?`${s}: ${a.join("; ")}`:s}import{relative as S$}from"node:path";async function Ia(e,t){let n=await e.run("git",["rev-parse","--show-toplevel"],{cwd:t});if(n.code!==0)return null;let s=n.stdout.trim(),a=await e.run("git",["remote","get-url","origin"],{cwd:t}),o=await e.run("git",["rev-parse","--abbrev-ref","HEAD"],{cwd:t}),i=o.code===0?o.stdout.trim():"";return{root:s,repository:a.code===0?$$(a.stdout.trim()):void 0,branch:i!==""&&i!=="HEAD"?i:void 0,path:S$(s,t).split("\\").join("/")}}function $$(e){let t=/^(?:https?:\/\/(?:[^@/]+@)?github\.com\/|git@github\.com:|ssh:\/\/git@github\.com\/)([A-Za-z0-9-]+)\/([A-Za-z0-9._-]+?)(?:\.git)?\/?$/.exec(e);return t?`${t[1]}/${t[2]}`:void 0}async function Na(e,t){let n=await rt(e);return new Map(n.filter(s=>s.project_id===t.project_id).map(s=>[s.ref,s.slug]))}function as(e,t){return t?e.get(t.ref)??t.ref:""}var Mt="main";async function rt(e){let[t,n]=await Promise.all([e.get("/environments"),e.get("/orgs")]),s=new Map(n.organizations.map(a=>[a.id,a.name]));return t.environments.map(a=>({...a,org_name:s.get(a.organization_id)??a.organization_id}))}function Ge(e){return{org_id:e.organization_id,org_name:e.org_name,project_id:e.project_id,project_name:e.project_name,env_ref:e.ref,env_slug:e.slug,env_name:e.name}}function ee(e){return`${e.org_name} \u203A ${e.project_name} \u203A ${e.env_name}${e.env_name!==e.env_slug?` (${e.env_slug})`:""}`}function wn(e){return(e.env.PALBASE_TOKEN??"").startsWith("pbe_")}async function Ko(e){let[t]=await rt(e.studio);if(!t)throw new b("token_refused","Studio names no environment for PALBASE_TOKEN",{hint:"mint another: palbase env:tokens:create"});let n=Ge(t),s=i=>new b("token_environment",`PALBASE_TOKEN is ${ee(n)}'s environment token: it acts there alone, not in ${i}`,{hint:"mint one there: palbase env:tokens:create -P <project> -E <env>"}),{project:a,env:o}=e.global;if(a!==void 0&&t.project_id!==a&&!_p(t.project_name,a.slice(a.indexOf("/")+1)))throw s(a);if(o!==void 0&&o!==t.slug&&o!==t.ref)throw s(o);if(a===void 0&&o===void 0){let i=await e.state.targetFor(e.io.cwd);if(i&&i.target.env_ref!==t.ref)throw s(`${ee(i.target)}, chosen for ${i.dir}`)}return t}async function f(e){if(wn(e.io))return Ge(await Ko(e));let{project:t,env:n}=e.global;if(t!==void 0||n!==void 0){let i=await rt(e.studio),r;if(t!==void 0)r=As(i,t);else{let l=await e.state.targetFor(e.io.cwd);if(!l)throw kp("-E names an environment of the project chosen here, and none is chosen: add -P <project>");r=i.filter(p=>p.project_id===l.target.project_id)}if(n!==void 0){let l=r.find(p=>p.slug===n||p.ref===n);if(!l)throw new b("no_such_environment",`the project has no environment ${JSON.stringify(n)}`,{hint:`its environments: ${r.map(p=>p.slug).join(", ")}`});return Ge(l)}return r.length===1?Ge(r[0]):Ge(await vp(e,r,"Which environment?"))}let s=await e.state.targetFor(e.io.cwd);if(s)return s.target;if(!e.interactive)throw kp("no environment is chosen for this directory");let a=await rt(e.studio);if(a.length===0)throw new b("no_environments","your account reaches no environment yet",{hint:"make one: palbase projects:create <name>"});let o=Ge(await vp(e,a,"Which environment?"));return e.out.note(`Acting on ${ee(o)}. palbase use remembers it for this directory.`),o}async function Vs(e){return(await Ss(e)).t}async function Ss(e){if(wn(e.io))return{t:Ge(await Ko(e)),by:"token"};let t=await e.state.targetFor(e.io.cwd);if(e.global.project===void 0&&e.global.env===void 0&&t)return{t:t.target,by:"here"};let n=await rm(e,t?.target);if(e.global.env!==void 0)return{t:Ge(Sp(n,e.global.env)),by:"env"};let s=n.find(a=>a.ref===t?.target.env_ref);return s?{t:Ge(s),by:"here"}:{t:Ge(n.find(a=>a.slug===Mt)??n[0]),by:"fallback"}}function dr(e,t){return e.by==="fallback"?t:`${t}${t.includes("?")?"&":"?"}environment=${encodeURIComponent(e.t.env_ref)}`}var im=1e3;async function $s(e){let t=[],n=new Set,s;for(;;){let a=await e(s);if(t.push(...a.items),!a.next)return t;if(n.has(a.next)||n.size>=im)throw new b("list_unending",`the platform's list did not end: ${n.has(a.next)?`it gave the cursor ${JSON.stringify(a.next)} twice`:`it ran past ${im} pages`}`);n.add(a.next),s=a.next}}async function Xs(e,t,n,s,a){if(t.by==="env"||t.by==="token"||t.by==="here"&&(n.environment?.ref??t.t.env_ref)===t.t.env_ref)return;let o=(await s()).filter(r=>r.name===n.name);if(o.length<2)return;let i=await Na(e.studio,t.t);throw new b("ambiguous_name",`${a} is held by more than one of ${t.t.project_name}'s environments: ${o.map(r=>as(i,r.environment)).join(", ")}`,{hint:"name the environment: -E <env>"})}async function Ys(e){if(wn(e.io))return Ge(await Ko(e));let t=await e.state.targetFor(e.io.cwd);if(e.global.project===void 0&&e.global.env===void 0&&t)return t.target;let n=await rm(e,t?.target);if(e.global.env!==void 0)return Ge(Sp(n,e.global.env));let s=n.find(o=>o.ref===t?.target.env_ref);if(s)return Ge(s);let a=n[0].project_name;if(!e.interactive)throw h(`which environment of ${a} is it bound to? name it with -E <env>`,`its environments: ${n.map(o=>o.slug).join(", ")}`);return Ge(await vp(e,n,le(`Which environment of ${a} does it belong to?`)))}async function Zs(e,t,n,s){if(!n||n.ref===t.env_ref)return t;let a=(await rt(e.studio)).find(o=>o.ref===n.ref);if(e.global.env!==void 0){let o=a?.slug??n.name??n.ref;throw new b("bound_elsewhere",`${s} is bound to ${t.project_name}'s environment ${o}, not ${t.env_slug}`,{hint:`leave -E out: the command acts where it is bound${a?` (or name it, -E ${a.slug})`:""}`})}if(!a)throw new b("environment_out_of_reach",`${s} is bound to ${t.project_name}'s environment ${n.name||n.ref}, which your account does not reach`,{hint:"an admin of the project's organization adds you to that environment"});return Ge(a)}function cr(e,t,n){return e.global.env===void 0?n:`${n}${n.includes("?")?"&":"?"}environment=${encodeURIComponent(t.env_ref)}`}async function Uo(e,t,n){let s=(await rt(e.studio)).filter(a=>a.project_id===t.project_id);return Sp(s,n)}function Ce(e){return`The ${e} is the project's: the command acts in the environment it is bound to. -E picks it where two environments hold its name, and is refused when it names another.`}var Qs="It is bound to the environment -E names, or to the one chosen for this directory: a person at the terminal is asked which, anyone else names it with -E.";async function rm(e,t){let n=await rt(e.studio);if(e.global.project!==void 0)return As(n,e.global.project);if(t){let a=n.filter(o=>o.project_id===t.project_id);if(a.length===0)throw new b("no_such_project",`the project chosen here (${t.project_name}) is not among yours any more`,{hint:"palbase use another"});return a}if(!e.interactive)throw new b("no_target","which project? none is chosen for this directory",{hint:"pass -P <project>, or choose one here with palbase use"});if(n.length===0)throw new b("no_environments","your account reaches no environment yet",{hint:"make one: palbase projects:create <name>"});let s=[...new Map(n.map(a=>[a.project_id,a])).values()];for(s.forEach((a,o)=>e.out.note(` ${String(o+1).padStart(2)}) ${a.org_name} \u203A ${a.project_name}`));;){let a=Number((await e.io.prompt(`Which project? [1-${s.length}] `)).trim());if(Number.isInteger(a)&&a>=1&&a<=s.length){let o=s[a-1];return e.out.note(`Acting on ${o.org_name} \u203A ${o.project_name}. palbase use remembers one for this directory.`),n.filter(i=>i.project_id===o.project_id)}e.out.note(`answer with a number from 1 to ${s.length}`)}}function Sp(e,t){let n=e.find(s=>s.slug===t||s.ref===t);if(!n)throw new b("no_such_environment",`the project has no environment ${JSON.stringify(t)}`,{hint:`its environments: ${e.map(s=>s.slug).join(", ")}`});return n}function As(e,t){let n=e.filter(l=>l.project_id===t);if(n.length>0)return n;let s=t.indexOf("/"),[a,o]=s>=0?[t.slice(0,s),t.slice(s+1)]:[void 0,t],i=e.filter(l=>_p(l.project_name,o)&&(a===void 0||_p(l.org_name,a)||l.organization_id===a)),r=new Set(i.map(l=>l.project_id));if(r.size===0)throw new b("no_such_project",`no project ${JSON.stringify(t)} among yours`,{hint:"palbase projects:list shows them"});if(r.size>1){let l=[...new Set(i.map(p=>`${p.org_name}/${p.project_name}`))].join(", ");throw new b("ambiguous_project",`${JSON.stringify(t)} is a project in more than one organization: ${l}`,{hint:"name it as org/project"})}return i}async function k(e,t,n,s){e.out.note(`${ee(t)}: ${n}${e.global.yes?" (confirmed with -y)":""}`);let a=t.env_slug===Mt;if(!a&&s===void 0||e.global.yes)return;if(!e.interactive){let i=wn(e.io)?"confirm with -y: with PALBASE_TOKEN, -y is the go-ahead (the CLI asks no one else, and a person's yes elsewhere is not one)":"confirm with -y";throw new b("confirmation_needed",a?`${t.project_name} \u203A ${t.env_name} is the project's production environment`:s,{hint:i})}let o=(await e.io.prompt(le(`${a?`This is ${t.project_name}'s production environment`:s}. Go ahead? [y/N] `))).trim().toLowerCase();if(o!=="y"&&o!=="yes")throw new b("cancelled","nothing was changed")}async function vp(e,t,n){if(!e.interactive)throw kp(`${n.replace(/\?$/,"")}: ${t.map(s=>`${s.project_name}/${s.slug}`).join(", ")}`);for(t.forEach((s,a)=>e.out.note(` ${String(a+1).padStart(2)}) ${ee(Ge(s))}`));;){let s=(await e.io.prompt(`${n} [1-${t.length}] `)).trim(),a=Number(s);if(Number.isInteger(a)&&a>=1&&a<=t.length)return t[a-1];e.out.note(`answer with a number from 1 to ${t.length}`)}}function kp(e){return new b("no_target",e,{hint:"choose one here with palbase use, or pass -P <project> -E <env>"})}function _p(e,t){return e.localeCompare(t,void 0,{sensitivity:"accent"})===0}import{randomUUID as A$}from"node:crypto";import{readFile as R$}from"node:fs/promises";import{resolve as P$}from"node:path";var j$=6,$p=0,lm=[];async function T$(e){$p<j$?$p++:await new Promise(t=>lm.push(t));try{return await e()}finally{let t=lm.shift();t?t():$p--}}async function Rt(e,t,n,s,a,o){return T$(()=>et(e.studio,t.env_ref,n,s,a,o))}async function g(e,t,n,s,a,o){return(await Rt(e,t,n,s,a,o)).body}async function Pt(e,t,n){let s=await Rt(e,t,"GET",n);return{body:s.body,etag:s.etag}}function vt(e){return e?{"if-match":e}:void 0}function D(){return{"idempotency-key":A$()}}function R(e){return encodeURIComponent(e)}function Rs(e){return e.map(t=>{let n=t.indexOf("=");if(n<=0)throw h(`a setting is key=value, not ${JSON.stringify(t)}`);let s=t.slice(0,n).split(".");if(s.some(a=>a===""||a==="__proto__"||a==="constructor"||a==="prototype"))throw h(`${JSON.stringify(t.slice(0,n))} is not a key`);return{path:s,value:qn(t.slice(n+1))}})}function qn(e){try{return JSON.parse(e)}catch{return e}}function Ps(e,t){let n=structuredClone(e);for(let{path:s,value:a}of t){let o=n;for(let i of s.slice(0,-1)){let r=o[i];(typeof r!="object"||r===null)&&(o[i]={}),o=o[i]}o[s[s.length-1]]=a}return n}function os(e,t){return[...new Set([...Object.keys(e),...Object.keys(t)])].filter(n=>!Dt(e[n],t[n])).sort()}function pm(e){return JSON.stringify(e,(t,n)=>n!==null&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.entries(n).sort(([s],[a])=>s<a?-1:s>a?1:0)):n)}function Dt(e,t){return pm(e)===pm(t)}function kt(e){return e===void 0?"(not set)":typeof e=="string"&&e!==""?e:JSON.stringify(e)}function Ma(e,t){let n=Object.keys(t).sort(),s=Math.max(0,...n.map(a=>a.length));for(let a of n)e.out.line(`${a.padEnd(s)} ${kt(t[a])}`)}function zt(e,t,n){e.out.result({settings:n,changed:[]},()=>e.out.line(`Nothing to change: ${t} already ${t.endsWith("s")?"are":"is"} so.`))}async function ze(e,t,n){let s;if(t!==void 0&&t!=="-")try{s=await R$(P$(e.io.cwd,t),"utf8")}catch(a){throw new b("unreadable_file",`${t} could not be read: ${a instanceof Error?a.message:String(a)}`)}else e.io.interactive&&e.out.note(`Reading ${n} from stdin; end it with Ctrl-D.`),s=await e.io.readStdin();if(s.trim()==="")throw h(`no ${n} was given`,t===void 0?"pass --file <path>, or pipe it in":void 0);return s}function Ne(e,t){try{return JSON.parse(e)}catch(n){throw h(`${t} is not JSON: ${n instanceof Error?n.message:String(n)}`)}}async function lt(e,t){e.io.interactive&&e.out.note(`Paste ${t}, then Ctrl-D (it is read from stdin, never from the command line):`);let n=(await e.io.readStdin()).trim();if(n==="")throw h(`no ${t} was piped in`,"pipe it in: palbase \u2026 < file");return n}function Da(e){if(e.flags.enable===!0&&e.flags.disable===!0)throw h("--enable and --disable are one or the other");if(e.flags.enable===!0)return!0;if(e.flags.disable===!0)return!1}function Gn(e,t){if(e!==void 0){if(e==="yes"||e==="true")return!0;if(e==="no"||e==="false")return!1;throw h(`--${t} is yes or no`)}}function Me(e){return e===void 0?void 0:(Array.isArray(e)?e:[e]).flatMap(n=>String(n).split(",")).map(n=>n.trim()).filter(n=>n!=="")}function we(e,t){if(e===void 0)return;let n=Number(e);if(!Number.isInteger(n)||n<0)throw h(`--${t} is a whole number`);return n}var Wo={enable:{type:"boolean",description:"turn it on"},disable:{type:"boolean",description:"turn it off"}};async function Ee(e,t,n){try{await n(),e.done(t)}catch(s){if(!(s instanceof G))throw s;e.left(`${t}: refused \u2014 ${s.message}`)}}function Ze(e,t){return e.filter(n=>n.key.startsWith(t)).map(n=>({...n,name:n.key.slice(t.length)}))}function Ap(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>!(t==null||t===""||Array.isArray(t)&&t.length===0)))}import{writeFile as E$}from"node:fs/promises";var C$=/^[A-Z][A-Z0-9_]{0,127}$/,za={dev:{type:"boolean",description:"the development set (what a backend on a developer's computer reads, and a machine started with it), not production \u2014 whatever the environment is named"}};function qa(e){return e.flags.dev===!0?"development":"production"}function Fo(e){let t=e.args[0];if(!C$.test(t))throw h(`${JSON.stringify(t)} is not a secret's name: capital letters, digits and _, a letter first`);return t}async function Rp(e,t,n){try{let s=await $s(async a=>{let o=await g(e,t,"GET",`/machines?limit=100&environment=${encodeURIComponent(t.env_ref)}${a?`&cursor=${encodeURIComponent(a)}`:""}`);return{items:o.machines,next:o.next_cursor}});return{using:s.filter(a=>a.secrets===n).map(a=>a.name).sort(),others:s.filter(a=>a.secrets!==n)}}catch(s){return{unread:s instanceof Error?s.message:String(s)}}}function Pp(e,t,n,s){if("unread"in s){e.out.note(`which machines start with the ${n} set could not be read (${s.unread}): palbase machines:list -E ${t.env_slug} says each one's`);return}if(s.using.length>0){let r=s.using.join(", ");e.out.line(`${r} ${s.using.length===1?"starts":"start"} with the ${n} set: rolling out with the new value \u2014 palbase machines:list -E ${t.env_slug} shows it until every copy runs it.`);return}let a=n==="production"?"development":"production",o=n==="development"?" Only a backend run on a computer (palbase run, env:pull) reads it.":"";if(s.others.length===0){n==="production"&&e.out.note(`${ee(t)} has no machine yet: one started with the ${n} set reads it.`);return}let i=s.others.map(r=>`${r.name} starts with ${r.secrets?`the ${r.secrets} set`:"no set"}`).join(", ");e.out.warn(`no machine of ${ee(t)} starts with the ${n} set (${i}): this value reaches none of them.${o} palbase machines:update <name> --secrets ${n} starts a machine with it; ${n==="production"?"--dev writes":"leaving --dev out writes"} the ${a} set.`)}async function ea(e,t,n){let s=[],a;do{let o=await g(e,t,"GET",`/secrets/${n}?limit=1000${a?`&cursor=${encodeURIComponent(a)}`:""}`);s.push(...o.secrets),a=o.next_cursor}while(a);return s}var O$={name:"secrets:list",summary:"the environment's secrets by name, with their version \u2014 never their values",usage:"[--dev]",flags:za,scope:"environment",async run(e){let t=await f(e),n=qa(e),s=await ea(e,t,n);e.out.result({set:n,secrets:s},()=>{s.length===0&&e.out.line(`No ${n} secrets.`);for(let a of s)e.out.line(`${a.name} v${a.version} ${a.updated_at}`)})}},x$={name:"secrets:set",summary:"set a secret: its value is read from stdin, never from the command line",usage:"<NAME> [--dev] < value",details:["An environment has two sets, production and development, whatever the environment is named: Development's machines may start with its production set. A machine starts with the set it names (machines:update --secrets), and a change of that set rolls it out with the new value; a backend run with palbase run or env:pull reads development.","It says which of the environment's machines start with the set, and warns when none does."],args:{min:1,max:1},flags:za,scope:"environment",async run(e){let t=await f(e),n=Fo(e),s=qa(e),a=await lt(e,`the value of ${n}`);await k(e,t,`set the ${s} secret ${n}`);let o=await g(e,t,"PUT",`/secrets/${s}/${n}`,{value:a}),i=await Rp(e,t,s);e.out.result({set:s,name:n,version:o.version,environment:t.env_slug,machines:"using"in i?i.using:null},()=>{e.out.line(`Set ${n} v${o.version} in the ${s} set of ${ee(t)}.`),Pp(e,t,s,i)})}},L$={name:"secrets:unset",summary:"take a secret away",usage:"<NAME> [--dev]",args:{min:1,max:1},flags:za,scope:"environment",async run(e){let t=await f(e),n=Fo(e),s=qa(e);await k(e,t,`take away the ${s} secret ${n}`),await g(e,t,"DELETE",`/secrets/${s}/${n}`);let a=await Rp(e,t,s);e.out.result({set:s,name:n,deleted:!0,environment:t.env_slug,machines:"using"in a?a.using:null},()=>{e.out.line(`Took ${n} away from the ${s} set of ${ee(t)}.`),Pp(e,t,s,a)})}},I$={name:"secrets:get",summary:"print one development secret's value (an admin's): a production secret's is never read back",usage:"<NAME> --dev",details:["A production secret's value is never read back, by anyone: only the machines that start with it are given it, and it is changed by setting it again (secrets:set). The development set is what a backend on your computer reads (palbase run, env:pull): secrets:get NAME --dev prints one."],args:{min:1,max:1},flags:za,scope:"environment",async run(e){let t=await f(e),n=Fo(e),s=await g(e,t,"GET",`/secrets/${qa(e)}/${n}`);e.out.result({name:n,version:s.version,value:s.value},()=>e.out.line(s.value))}},N$={name:"secrets:versions",summary:"a secret's versions, newest first \u2014 never their values",usage:"<NAME> [--dev]",args:{min:1,max:1},flags:za,scope:"environment",async run(e){let t=await f(e),n=Fo(e),s=await g(e,t,"GET",`/secrets/${qa(e)}/${n}/versions`);e.out.result(s,()=>{for(let a of s.versions)e.out.line(`v${a.version} ${a.created_at}${a.current?" (current)":""}`)})}},M$={name:"secrets:rollback",summary:"put a secret back to one of its versions (a new version with that value)",usage:"<NAME> --version <n> [--dev]",args:{min:1,max:1},flags:{...za,version:{type:"string",value:"n",description:"the version to go back to"}},scope:"environment",async run(e){let t=await f(e),n=Fo(e),s=Number(e.flags.version);if(!Number.isInteger(s)||s<1)throw h("--version is a version number (secrets:versions lists them)");let a=qa(e);await k(e,t,`put the ${a} secret ${n} back to v${s}`);let o=await g(e,t,"POST",`/secrets/${a}/${n}/rollback`,{version:s}),i=await Rp(e,t,a);e.out.result({set:a,name:n,version:o.version,environment:t.env_slug,machines:"using"in i?i.using:null},()=>{e.out.line(`${n} in the ${a} set of ${ee(t)} is v${s}'s value again, as v${o.version}.`),Pp(e,t,a,i)})}},D$={name:"secrets:audit",summary:"every read and write of the environment's secrets, newest first: which secret, which key did it, when \u2014 never a value",usage:"[--name <NAME>] [--dev | --prod] [--limit <n>]",details:["A backend that reads the secrets at boot (palbase run, a machine) shows here as a read, with the key it read with: palbase keys:list names the key.","An encrypted column's values opened through Palbase (Studio's table, a secret key) are recorded under the column's address: --name patients.tc lists who opened them, and when."],flags:{name:{type:"string",value:"NAME",description:"only this secret's, or an encrypted field's opens (table.column)"},dev:{type:"boolean",description:"only the development secrets"},prod:{type:"boolean",description:"only the production secrets"},limit:{type:"string",value:"n",description:"how many (default 30)"}},scope:"environment",async run(e){let t=await f(e);if(e.flags.dev===!0&&e.flags.prod===!0)throw h("--dev or --prod, not both");let n=Number(e.flags.limit??30);if(!Number.isInteger(n)||n<1||n>500)throw h("--limit is a whole number from 1 to 500");let s=new URLSearchParams({limit:String(n),...e.flags.name?{name:e.flags.name}:{},...e.flags.dev===!0?{environment:"development"}:e.flags.prod===!0?{environment:"production"}:{}}),a=await g(e,t,"GET",`/secrets/audit?${s}`);e.out.result(a,()=>{a.entries.length===0?e.out.line("No read or write of a secret yet."):e.out.table(a.entries,[{header:"when",value:o=>o.at.slice(0,19).replace("T"," ")},{header:"what",value:o=>o.action},{header:"set",value:o=>o.environment??""},{header:"secret",value:o=>o.name?`${o.name}${o.version?` v${o.version}`:""}`:"every one"},{header:"key",value:o=>o.key_id}])})}};function dm(e,t){e.out.table(t.keys,[{header:"key",value:n=>`${n.id}${n.id===t.current?" (in force)":""}`},{header:"in force from",value:n=>n.activates_at.slice(0,19).replace("T"," ")},{header:"made by",value:n=>n.created_by}])}var z$={name:"fields:list",summary:"the keys the environment's encrypted database fields are sealed with \u2014 never the keys themselves",scope:"environment",async run(e){let t=await f(e),n=await g(e,t,"GET","/secrets/fields");e.out.result(n,()=>dm(e,n))}},q$={name:"fields:rotate",summary:"make a new key for the environment's encrypted fields (an owner's or an admin's)",details:["It comes into force in five minutes: by then every running backend has fetched it. New values are sealed with it from then on; a palbase/backend app seals its older values again with it, in the background.","The older keys go on opening what they sealed."],scope:"environment",async run(e){let t=await f(e);await k(e,t,"rotate the encrypted fields' key");let n=await g(e,t,"POST","/secrets/fields/rotate"),s=n.keys[n.keys.length-1];e.out.result(n,()=>{e.out.line(`Made ${s.id} in ${ee(t)}: in force from ${s.activates_at.slice(0,19).replace("T"," ")} UTC.`),dm(e,n)})}},G$={name:"fields:keys",summary:"download the environment's field keys into a file (its owner's): what opens a dump of its database elsewhere",usage:"--out <file>",details:["The file opens every encrypted field of the environment: keep it as you would the database's password. It is the shape palbase/server's Fields reads: new Fields({ fetch: async () => JSON.parse(readFileSync(file, 'utf8')) }).","The download is in the secrets audit trail (secrets:audit)."],flags:{out:{type:"string",value:"file",description:"where the keys go (made readable by you alone); never the screen"}},scope:"environment",async run(e){let t=e.flags.out;if(!t)throw h("fields:keys writes the keys into a file: --out <file> (never onto the screen, which keeps them)");let n=await f(e),s=await g(e,n,"GET","/secrets/fields/keys");await E$(t,`${JSON.stringify(s,null,2)}
22
22
  `,{mode:384,flag:"wx"}),e.out.result({file:t,keys:s.keys.map(a=>a.id)},()=>e.out.line(`Wrote the keys of ${ee(n)} (${s.keys.map(a=>a.id).join(", ")}) to ${t}.`))}};function jp(e,t){e.out.table(t.keys,[{header:"key",value:n=>`${n.id}${n.id===t.current?" (in use)":""}`},{header:"made",value:n=>n.created_at.slice(0,19).replace("T"," ")},{header:"made by",value:n=>n.created_by},{header:"retired",value:n=>n.retired_at?`${n.retired_at.slice(0,19).replace("T"," ")} by ${n.retired_by}`:""}])}var K$={name:"transit:list",summary:"the keys the encrypted fields of a request to the environment's backend are sealed to \u2014 their public halves alone",scope:"environment",async run(e){let t=await f(e),n=await g(e,t,"GET","/secrets/transit");e.out.result(n,()=>jp(e,n))}},U$={name:"transit:rotate",summary:"make a new key for the encrypted fields of requests to the backend (an owner's or an admin's)",usage:"[--retire-previous]",details:["Apps seal to it from their next fetch of the project's keys (within the hour), or at once with --retire-previous: every older key is retired with it \u2014 what to do when one may have been taken \u2014 and an app that seals to a retired one is told so, fetches the keys again and sends its call once more.","No app needs a new build: an app holds the project's signing key, not its keys."],flags:{"retire-previous":{type:"boolean",description:"retire every older key at once"}},scope:"environment",async run(e){let t=await f(e),n=e.flags["retire-previous"]===!0;await k(e,t,n?"rotate the transit keys, retiring every older one":"rotate the transit keys");let s=await g(e,t,"POST","/secrets/transit/rotate",{retire_previous:n});e.out.result(s,()=>{e.out.line(`Made ${s.current} in ${ee(t)}: apps seal to it from now${n?"; every older key is retired":""}.`),jp(e,s)})}},W$={name:"transit:retire",summary:"retire a transit key that is not the one in use: no request sealed to it opens from then on",usage:"<key>",args:{min:1,max:1},scope:"environment",async run(e){let t=await f(e),n=e.args[0];if(!/^t[1-9][0-9]{0,5}$/.test(n))throw h(`${n} is not a transit key's id`,"palbase transit:list names them (t1, t2, \u2026)");await k(e,t,`retire the transit key ${n}`);let s=await g(e,t,"POST",`/secrets/transit/${n}/retire`);e.out.result(s,()=>{e.out.line(`Retired ${n} in ${ee(t)}.`),jp(e,s)})}},cm=[O$,x$,I$,L$,N$,M$,D$,z$,q$,G$,K$,U$,W$];import{randomBytes as qm}from"node:crypto";import{chmod as $A,lstat as AA,mkdir as RA,readFile as Im,realpath as xm,rename as PA,rm as jA,writeFile as Nm}from"node:fs/promises";function um(){let e=globalThis;if(typeof e.document<"u"||e.navigator?.product==="ReactNative")return!0;let t=e.navigator?.userAgent;return typeof t=="string"&&t.startsWith("Mozilla/")}var is=class extends Error{code;constructor(t,n){super(n),this.name="FieldError",this.code=t}},ur="pbe1.",F$="pbl1.",B$=6e4,Tp="[A-Za-z_][A-Za-z0-9_$]{0,62}",J$=new RegExp(`^${Tp}\\.${Tp}(\\.${Tp})?$`);function H$(e){return J$.test(e)}var Bo=class{crypto;keys=new Map;lookupKey;timer;opts;now;constructor(t){this.opts=t,this.now=t.now??Date.now}get loaded(){return this.lookupKey!==void 0}async load(t){this.crypto??=await import("node:crypto"),this.take(await this.opts.fetch(t)),this.timer===void 0&&(this.timer=setInterval(()=>{this.opts.fetch().then(n=>this.take(n),()=>{})},B$),this.timer.unref?.())}close(){clearInterval(this.timer),this.timer=void 0}take(t){let n=new Map;for(let s of t.keys)n.set(s.id,{id:s.id,key:Buffer.from(s.key,"base64url"),activatesAt:Date.parse(s.activates_at)});this.keys=n,this.lookupKey=Buffer.from(t.lookup,"base64url")}ready(){if(this.crypto===void 0||this.lookupKey===void 0)throw new is("not_loaded","the project's field keys are not loaded: await palbase.fields.load() at startup");return this.crypto}currentKey(){this.ready();let t;for(let n of this.keys.values())n.activatesAt<=this.now()&&(t===void 0||n.activatesAt>=t.activatesAt)&&(t=n);if(t===void 0)throw new is("unknown_key","the project has no field key in force");return t.id}encrypt(t,n){let s=this.ready();Ep(t);let a=this.currentKey(),o=s.randomBytes(12);return V$(s,this.keys.get(a).key,o,a,t,n)}decrypt(t,n){let s=this.ready();if(Ep(t),!n.startsWith(ur))throw new is("not_encrypted",`${t} holds a value that is not encrypted`);let a=n.slice(ur.length),o=a.indexOf("."),i=o<0?a:a.slice(0,o),r=this.keys.get(i);if(r===void 0)throw new is("unknown_key",`${t} was sealed with field key ${i}, which this project does not hold`);let l=Buffer.from(a.slice(o+1),"base64url");if(o<0||l.length<28||l.toString("base64url")!==a.slice(o+1))throw new is("unopenable",`${t} holds a value that does not open here`);try{let p=s.createDecipheriv("aes-256-gcm",r.key,l.subarray(0,12));return p.setAAD(mm(t)),p.setAuthTag(l.subarray(l.length-16)),Buffer.concat([p.update(l.subarray(12,l.length-16)),p.final()]).toString("utf8")}catch{throw new is("unopenable",`${t} holds a value that does not open here: tampered, or another column's`)}}isEncrypted(t){return t.startsWith(ur)}lookup(t,n){let s=this.ready();return Ep(t),X$(s,this.lookupKey,t,n)}};function Ep(e){if(!H$(e))throw new TypeError(`a field's address is table.column, or schema.table.column, not ${JSON.stringify(e)}`)}function mm(e){return Buffer.from(`pbe1\0${e}`,"utf8")}function V$(e,t,n,s,a,o){let i=e.createCipheriv("aes-256-gcm",t,n);i.setAAD(mm(a));let r=Buffer.concat([n,i.update(o,"utf8"),i.final(),i.getAuthTag()]);return`${ur}${s}.${r.toString("base64url")}`}function X$(e,t,n,s){let a=e.createHmac("sha256",t);return a.update(`pbl1\0${n}\0`,"utf8"),a.update(s,"utf8"),`${F$}${a.digest("base64url")}`}var Op="pbt1.",vn="Palbase-Encryption";var hr="x-palbase-encrypted",pt=class extends Error{code;constructor(t,n){super(n),this.name="TransitError",this.code=t}},js=new TextEncoder,Y$=new TextDecoder("utf-8",{fatal:!0}),kn=()=>{let e=globalThis.crypto?.subtle;if(!e)throw new Error("encrypted fields need WebCrypto (crypto.subtle): a secure context \u2014 https, or localhost");return e};function Et(e){return new Uint8Array(new ArrayBuffer(e))}function _n(...e){let t=Et(e.reduce((s,a)=>s+a.length,0)),n=0;for(let s of e)t.set(s,n),n+=s.length;return t}function Kn(e){return _n(e)}function Ho(e,t){let n=Et(t);for(let s=t-1;s>=0;s--)n[s]=e&255,e>>>=8;return n}function Vo(e){let t="";for(let n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Un(e){let t=e.replace(/=+$/,"");if(!/^[A-Za-z0-9_-]*$/.test(t)||t.length%4===1)throw new pt("malformed","not base64url");let n=atob(t.replace(/-/g,"+").replace(/_/g,"/")+"=".repeat((4-t.length%4)%4)),s=Et(n.length);for(let a=0;a<n.length;a++)s[a]=n.charCodeAt(a);return s}var gm=_n(js.encode("KEM"),Ho(32,2)),Jo=_n(js.encode("HPKE"),Ho(32,2),Ho(1,2),Ho(1,2)),hm=js.encode("HPKE-v1"),Z$=16,Q$=12,eA=32,ym=Uint8Array.from([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function fm(e,t){let n=await kn().importKey("raw",e.length===0?Et(32):Kn(e),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return new Uint8Array(await kn().sign("HMAC",n,Kn(t)))}async function mr(e,t,n,s){return fm(t,_n(hm,e,js.encode(n),s))}async function Cp(e,t,n,s,a){let o=_n(Ho(a,2),hm,e,js.encode(n),s),i=Et(a),r=Et(0);for(let l=1,p=0;p<a;l++)r=await fm(t,_n(r,o,Uint8Array.of(l))),i.set(r.subarray(0,Math.min(r.length,a-p)),p),p+=r.length;return i}async function bm(e){if(e.length!==32)throw new pt("malformed","an X25519 private key is 32 bytes");return kn().importKey("pkcs8",_n(ym,e),{name:"X25519"},!1,["deriveBits"])}async function wm(e){if(e.length!==32)throw new pt("malformed","an X25519 public key is 32 bytes");return kn().importKey("raw",Kn(e),{name:"X25519"},!1,[])}async function vm(e,t){return new Uint8Array(await kn().deriveBits({name:"X25519",public:t},e,256))}async function km(e,t,n){let s=await mr(gm,Et(0),"eae_prk",e);return Cp(gm,s,"shared_secret",_n(t,n),eA)}async function _m(e,t){let n=await mr(Jo,Et(0),"psk_id_hash",Et(0)),s=await mr(Jo,Et(0),"info_hash",t),a=_n(Uint8Array.of(0),n,s),o=await mr(Jo,e,"secret",Et(0));return{key:await Cp(Jo,o,"key",a,Z$),nonce:await Cp(Jo,o,"base_nonce",a,Q$)}}async function yr(e,t,n,s,a){let o=await kn().importKey("raw",Kn(t),"AES-GCM",!1,[e]);return new Uint8Array(await kn()[e]({name:"AES-GCM",iv:Kn(n),additionalData:Kn(s)},o,Kn(a)))}async function xp(e,t,n,s=Et(0),a){let o,i;if(a)o=await bm(a.privateKey),i=Kn(a.publicKey);else{let d=await kn().generateKey({name:"X25519"},!0,["deriveBits"]);o=d.privateKey,i=new Uint8Array(await kn().exportKey("raw",d.publicKey))}let r=await km(await vm(o,await wm(e)),i,e),{key:l,nonce:p}=await _m(r,t);return{enc:i,ct:await yr("encrypt",l,p,s,n)}}async function tA(e,t,n,s,a,o=Et(0)){if(n.length!==32)throw new pt("malformed","an encapsulated X25519 key is 32 bytes");try{let i=await km(await vm(await bm(e),await wm(n)),n,t),{key:r,nonce:l}=await _m(i,s);return await yr("decrypt",r,l,o,a)}catch{throw new pt("unopenable","the request's key does not open with the project's key it names")}}async function Sm(e){let t=await kn().importKey("pkcs8",_n(ym,e),{name:"X25519"},!0,["deriveBits"]),n=await kn().exportKey("jwk",t);return Un(n.x)}function fr(e,t,n,s=[]){if(s.some(a=>a.includes("\0")))throw new pt("malformed","a path's value holds no NUL");return js.encode(["palbase-encryption","1",e,t.toUpperCase(),nA(n),...s].join("\0"))}function nA(e){return e.replace(/\{[^/{}]*\}/g,"{}")}async function $m(e,t,n,s={}){let a=s.key?Kn(s.key):crypto.getRandomValues(Et(32)),{enc:o,ct:i}=await xp(t,n,a,Et(0),s.ephemeral);return{kid:e,key:a,header:`1.${e}.${Vo(o)}.${Vo(i)}`}}function Lp(e){let t=e.trim().split(".");if(t.length!==4||t[0]!=="1"||!/^t[1-9][0-9]{0,5}$/.test(t[1]))throw new pt("malformed",`${vn} is 1.<key id>.<enc>.<ct>`);let n=Un(t[2]),s=Un(t[3]);if(n.length!==32||s.length!==48)throw new pt("malformed",`${vn} carries a 32-byte encapsulated key and a sealed 32-byte key`);return{kid:t[1],enc:n,ct:s}}async function Am(e,t,n,s){let{enc:a,ct:o}=Lp(e),i=await tA(t,n,a,s,o);if(i.length!==32)throw new pt("unopenable","the request's key is not 32 bytes");return i}function Rm(e){return js.encode(`pbt1\0${e}`)}async function Xo(e,t,n,s){let a=s?Kn(s):crypto.getRandomValues(Et(12)),o=JSON.stringify(n);if(o===void 0)throw new pt("malformed",`${t}: an encrypted field holds a JSON value`);let i=await yr("encrypt",e,a,Rm(t),js.encode(o));return Op+Vo(_n(a,i))}function Yo(e){return typeof e=="string"&&e.startsWith(Op)}async function br(e,t,n){if(!Yo(n))throw new pt("unopenable",`${t} is not an encrypted field`);let s;try{s=Un(n.slice(Op.length))}catch{throw new pt("unopenable",`${t} is not an encrypted field`)}if(s.length<28)throw new pt("unopenable",`${t} is too short to be an encrypted field`);let a;try{a=await yr("decrypt",e,s.subarray(0,12),Rm(t),s.subarray(12))}catch{throw new pt("unopenable",`${t} does not open: changed, moved from another field, or another request's`)}try{return JSON.parse(Y$.decode(a))}catch{throw new pt("unopenable",`${t} opens to no JSON value`)}}function wr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1").replace(/\*/g,"~2")}function sA(e){return e.replace(/~2/g,"*").replace(/~1/g,"/").replace(/~0/g,"~")}var Pm=Symbol("items");function aA(e,t){if(!(e!==t&&!e.startsWith(t+"/")))return e===t?[]:e.slice(t.length+1).split("/").map(n=>n==="*"?Pm:sA(n))}async function Ga(e,t,n,s){let a=e;for(let o of n){let i=aA(o,t);i!==void 0&&(a=await gr(a,i,t,s))}return a}async function gr(e,t,n,s){if(t.length===0)return e===void 0?void 0:s(n,e);let[a,...o]=t;if(a===Pm){if(!Array.isArray(e))return e;let r=[];for(let[l,p]of e.entries())r.push(await gr(p,o,`${n}/${l}`,s));return r}if(Array.isArray(e)){if(!/^(0|[1-9][0-9]*)$/.test(a)||Number(a)>=e.length)return e;let r=[...e];return r[Number(a)]=await gr(r[Number(a)],o,`${n}/${a}`,s),r}if(typeof e!="object"||e===null||Array.isArray(e)||!Object.hasOwn(e,a))return e;let i={...e};return i[a]=await gr(i[a],o,`${n}/${wr(a)}`,s),i}var Sn=class extends Error{status=400;code;data;constructor(t,n,s={}){super(n),this.name="TransitRefusal",this.code=t,this.data=s}},oA=6e4,iA=1e3;function Ip(e){return/^t[1-9][0-9]{0,5}$/.test(e)?Number(e.slice(1)):0}var Zo=class{keys=new Map;retired=new Set;order=[];project;timer;fetchedAt=0;heldFrom=0;fetching;opts;now;sleep;constructor(t){this.opts=t,this.now=t.now??Date.now,this.sleep=t.sleep??(n=>new Promise(s=>setTimeout(s,n)))}get loaded(){return this.project!==void 0}get projectId(){if(this.project===void 0)throw new Error("the project's transit keys are not loaded: await palbase.transit.load() at startup");return this.project}current(){return this.order[0]}async load(t){await this.refresh(t),this.timer===void 0&&(this.timer=setInterval(()=>{this.refresh().catch(()=>{})},oA),this.timer.unref?.())}close(){clearInterval(this.timer),this.timer=void 0}refresh(t){return this.fetching??=(async()=>{let n=this.now();try{let s=await this.opts.fetch(t),a=new Map;for(let o of s.keys){let i=Un(o.key);a.set(o.id,{privateKey:i,publicKey:this.keys.get(o.id)?.publicKey??await Sm(i)})}this.keys=a,this.order=s.keys.map(o=>o.id),this.retired=new Set(s.retired),this.project=s.project,this.fetchedAt=this.now(),this.heldFrom=n}finally{this.fetching=void 0}})(),this.fetching}newest(){return Math.max(0,...this.order.map(Ip),...[...this.retired].map(Ip))}async key(t){let n=this.now();for(;Ip(t)>this.newest()&&this.heldFrom<n;){let o=this.fetchedAt+iA-this.now();if(o>0){await this.sleep(o);continue}await this.refresh()}let s=this.keys.get(t),a=this.current();if(this.retired.has(t))throw new Sn("encryption_key_retired",`the request is sealed to ${t}, retired: fetch the project's keys again`,{current:a});if(s===void 0)throw new Sn("encryption_key_unknown",`the request is sealed to ${t}, which the project has not made`,{current:a});return s}async request(t){if(t.header===void 0||t.header===null||t.header==="")throw new Sn("encryption_required",`this route carries encrypted fields: the request names its key in ${vn}`,{field:vn,current:this.current()});let n;try{n=Lp(t.header).kid}catch{throw new Sn("encryption_unopenable",`${vn} is not one`,{field:vn})}let s=await this.key(n),a;try{a=fr(this.projectId,t.method,t.path,t.params??[])}catch{throw new Sn("encryption_unopenable","the request's path holds a value no key is sealed for",{field:vn})}try{return new vr(n,await Am(t.header,s.privateKey,s.publicKey,a))}catch(o){throw o instanceof pt?new Sn("encryption_unopenable","the request's key does not open: sealed for another project, route or path, or changed",{field:vn}):o}}},vr=class{kid;key;constructor(t,n){this.kid=t,this.key=n}async open(t,n,s){return Ga(t,n,s,async(a,o)=>{if(!Yo(o))throw new Sn("encryption_required",`${a} is an encrypted field: it came plain`,{field:a});try{return await br(this.key,a,o)}catch{throw new Sn("encryption_unopenable",`${a} does not open: changed, moved from another field, or another request's`,{field:a})}})}async seal(t,n){return Ga(t,"/response",n,(s,a)=>Xo(this.key,s,a))}sealField(t,n){return Xo(this.key,t,n)}};var rA=/^pb_[a-z0-9]+_s/;function kr(e){if(um())throw new TypeError("palbase/server runs on a server: its secret key never goes into a browser or a mobile app \u2014 apps use palbase/web (or the native SDKs) with the publishable key");if(typeof e.secretKey!="string"||!rA.test(e.secretKey))throw new TypeError("secretKey is the project secret key (pb_<ref>_s\u2026); a publishable key belongs in palbase/web");let t=bp(pp({baseUrl:e.url,credentials:{secretKey:e.secretKey},fetch:e.fetch,solveProofOfWork:e.solveProofOfWork??!1}),e.retry??lr),n=zo.client(t);return{ai:er.client(t),analytics:Co.client(t),auth:Oo.client(t),cache:tr.client(t),calls:nr.client(t),fields:new Bo({fetch:async s=>(await n.getFieldKeys({signal:s})).data}),flags:xo.client(t),iap:Lo.client(t),machines:Io.client(t),messaging:ir.client(t),notify:No.client(t),payments:Mo.client(t),campaigns:sr.client(t),commerce:ar.client(t),journeys:or.client(t),realtime:Do.client(t),secrets:n,storage:qo.client(t),stores:Go.client(t),workspaces:rr.client(t),transit:new Zo({fetch:async s=>(await n.getTransitKeys({signal:s})).data}),transport:t,url:new URL(e.url).origin}}var BU=1024*1024;var VU=8*1024;var tW=16*1024,nW=10*6e4;var cA=/^[A-Za-z_][A-Za-z0-9_]{0,127}$/,uA=/^(PALBASE_|NODE_|BUN_|NPM_|LD_|DYLD_|GIT_|SSH_)|^(PATH|HOME|SHELL|USER|TMPDIR|TMP|TEMP|PWD|IFS|ENV|BASH_ENV|SSL_CERT_FILE|SSL_CERT_DIR|CURL_CA_BUNDLE|REQUESTS_CA_BUNDLE|NO_PROXY|ALL_PROXY|HTTP_PROXY|HTTPS_PROXY|PG\w*)$/i;function Qo(e){return!cA.test(e)||uA.test(e)||/_PROXY$/i.test(e)}var mA=/^(PORT|PALBASE_(URL|PROJECT_ID|MACHINE|REPLICAS|SECRET_KEY|WEBHOOK_SECRET|PLATFORM_SECRET|CONTRACT_OUT|CONTRACT_ENTRY|WEB_ORIGINS|SECRETS|DB_[A-Z0-9_]+))$/;function Np(e){return mA.test(e)}import{dirname as TA,join as EA,relative as CA,resolve as Fp,sep as Lm}from"node:path";import{lstat as gA,mkdir as hA,readFile as yA,rename as fA,rm as bA,writeFile as wA}from"node:fs/promises";import{dirname as Tm,join as vA,relative as kA,resolve as zp,sep as jm}from"node:path";var Em="// palbase:stack:begin",Cm="// palbase:stack:end",_A=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Mp=e=>_A.test(e)?e:JSON.stringify(e),ei=e=>[...new Set(e)].sort();function Dp(e,t){return t.length===0?[` interface ${e} {}`]:[` interface ${e} {`,...t.map(n=>` ${n}`)," }"]}function qp(e){let t=[...e.buckets].sort((n,s)=>n.name<s.name?-1:n.name>s.name?1:0);return[Em,'declare module "palbase/backend/stack" {',...Dp("Secrets",ei(e.secrets).map(n=>`${Mp(n)}: true;`)),"",...Dp("Flags",ei(e.flags).map(n=>`${Mp(n)}: true;`)),"",...Dp("Buckets",t.map(n=>{let s=ei(n.variants);return`${Mp(n.name)}: { variants: ${s.length===0?"never":s.map(a=>JSON.stringify(a)).join(" | ")} };`})),"}",Cm].join(`
23
23
  `)}var SA=/(\n*)export\s*\{\s*\}\s*;?\s*$/;function Ka(e,t,n={begin:Em,end:Cm,said:"palbase types:pull writes the block between the markers: the names this environment holds, for palbase/backend/stack."}){if(e===void 0)return`// ${n.said}
24
24
  ${t}
@@ -8611,6 +8611,7 @@ myasustor.com
8611
8611
  cdn.prod.atlassian-dev.net
8612
8612
  space.fast
8613
8613
  view.fast
8614
+ deed.page
8614
8615
  myfritz.link
8615
8616
  myfritz.net
8616
8617
  *.awdev.ca
@@ -9486,6 +9487,7 @@ pvf.cc
9486
9487
  kz.ci
9487
9488
  xyz.ci
9488
9489
  freemyip.com
9490
+ freshasite.com
9489
9491
  *.frusky.de
9490
9492
  wien.funkfeuer.at
9491
9493
  xwx.me
@@ -10624,6 +10626,8 @@ rocky.page
10624
10626
  rub.de
10625
10627
  ruhr-uni-bochum.de
10626
10628
  io.noc.ruhr-uni-bochum.de
10629
+ runable.site
10630
+ runable.tech
10627
10631
  xn--90amc.xn--p1acf
10628
10632
  xn--j1aef.xn--p1acf
10629
10633
  xn--j1ael8b.xn--p1acf