@kittycad/lib 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -1
- package/dist/mjs/index.js +1 -1
- package/dist/types/src/api/file/create_file_conversion_options.d.ts.map +1 -1
- package/dist/types/src/api/meta/create_debug_uploads.d.ts.map +1 -1
- package/dist/types/src/api/meta/create_event.d.ts.map +1 -1
- package/dist/types/src/api/ml/create_proprietary_to_kcl.d.ts.map +1 -1
- package/dist/types/src/api/ml/create_text_to_cad_multi_file_iteration.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("bson");try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?.node){new Function("m","return import(m)")("cross-fetch/polyfill").catch((()=>{}))}}catch{}function t(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e))if(void 0!==o)if(Array.isArray(o))for(const e of o)t.append(s,String(e));else t.append(s,String(o));const s=t.toString();return s?`?${s}`:""}function s(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e||{}))if(void 0!==o)if(Array.isArray(o))for(const e of o)t.append(s,String(e));else t.append(s,String(o));return t}try{if("undefined"!=typeof process&&process.versions?.node&&"win32"===process.platform){new Function("m","return import(m)")("win-ca")}}catch{}class o extends Error{constructor(e,t,s){super(s||t?.message||`HTTP ${e}`),this.name="ApiError",this.status=e,this.error_code=t?.error_code,this.request_id=t?.request_id,this.body=t}}async function n(e){if(e.ok)return;let t;try{t=await e.json()}catch{try{const s=await e.text();t=s?{message:s}:void 0}catch{t=void 0}}throw new o(e.status,t)}class r{started=!1;constructor(e,t,s="page_token"){this.fetchPage=e,this.baseParams={...t},this.tokenField=s}hasNext(){return!this.started||!!this.nextToken}reset(){this.started=!1,this.nextToken=void 0}async next(){if(this.started&&!this.nextToken)return[];const e={...this.baseParams};this.started&&this.nextToken&&(e[this.tokenField]=this.nextToken);const t=await this.fetchPage(e);return this.started=!0,this.nextToken=t?.next_page??null,t?.items??[]}}function a(e,t,s="page_token"){return new r(e,t,s)}async function c({client:e,limit:s,page_token:o,sort_by:r}){const a="/api-calls"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function i({client:e,id:s,limit:o,page_token:r,sort_by:a}){const c=`/users/${s}/api-calls`+t({limit:o,page_token:r,sort_by:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function _({client:e,limit:s,page_token:o,sort_by:r,status:a}){const c="/async/operations"+t({limit:s,page_token:o,sort_by:r,status:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function p({client:e,limit:s,page_token:o,sort_by:r}){const a="/org/api-calls"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function O({client:e,limit:s,page_token:o,sort_by:r}){const a="/user/api-calls"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function T({client:e,limit:s,page_token:o,sort_by:r}){const a="/user/api-tokens"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}function v(e){return!!e&&"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}class h{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/executor/term"+t({}),s=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(s);await new Promise(((e,t)=>{const s=()=>{r(),e()},n=e=>{r(),t(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",s),o.removeEventListener("error",n)};o.addEventListener("open",s),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.BSON.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const o=setTimeout((()=>{a(),s(new Error("timeout"))}),e),n=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.BSON.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}if(v(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}return s}}class A{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/ml/copilot"+t({}),s=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(s);await new Promise(((e,t)=>{const s=()=>{r(),e()},n=e=>{r(),t(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",s),o.removeEventListener("error",n)};o.addEventListener("open",s),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.BSON.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const o=setTimeout((()=>{a(),s(new Error("timeout"))}),e),n=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.BSON.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}if(v(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}return s}}class u{constructor(e){this.functionNameParams=e}async connect(){const e=`/ws/ml/reasoning/${this.functionNameParams.id}`+t({}),s=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(s);await new Promise(((e,t)=>{const s=()=>{r(),e()},n=e=>{r(),t(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",s),o.removeEventListener("error",n)};o.addEventListener("open",s),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.BSON.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const o=setTimeout((()=>{a(),s(new Error("timeout"))}),e),n=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.BSON.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}if(v(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}return s}}async function E({client:e,limit:s,page_token:o,sort_by:r}){const a="/ml/conversations"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function d({client:e,limit:s,page_token:o,sort_by:r}){const a="/ml-prompts"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function K({client:e,limit:s,page_token:o,sort_by:r,conversation_id:a,no_models:c}){const i="/user/text-to-cad"+t({limit:s,page_token:o,sort_by:r,conversation_id:a,no_models:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);await n(h);return await h.json()}class f{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/modeling/commands"+t({api_call_id:this.functionNameParams.api_call_id,fps:this.functionNameParams.fps,pool:this.functionNameParams.pool,post_effect:this.functionNameParams.post_effect,replay:this.functionNameParams.replay,show_grid:this.functionNameParams.show_grid,unlocked_framerate:this.functionNameParams.unlocked_framerate,video_res_height:this.functionNameParams.video_res_height,video_res_width:this.functionNameParams.video_res_width,webrtc:this.functionNameParams.webrtc}),s=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(s);await new Promise(((e,t)=>{const s=()=>{r(),e()},n=e=>{r(),t(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",s),o.removeEventListener("error",n)};o.addEventListener("open",s),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.BSON.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const o=setTimeout((()=>{a(),s(new Error("timeout"))}),e),n=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.BSON.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}if(v(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}return s}}async function l({client:e,limit:s,page_token:o,sort_by:r}){const a="/org/shortlinks"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function I({client:e,limit:s,page_token:o,sort_by:r,role:a}){const c="/org/members"+t({limit:s,page_token:o,sort_by:r,role:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function N({client:e,limit:s,page_token:o,sort_by:r}){const a="/orgs"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function y({client:e,limit:s,page_token:o,sort_by:r}){const a="/org/service-accounts"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function w({client:e,limit:s,page_token:o,sort_by:r}){const a="/user/shortlinks"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function P({client:e,limit:s,page_token:o,sort_by:r}){const a="/users"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function m({client:e,limit:s,page_token:o,sort_by:r}){const a="/users-extended"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}const Z={get_api_call:async function({client:e,id:s}){const o=`/api-calls/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_for_org:async function({client:e,id:s}){const o=`/org/api-calls/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_for_user:async function({client:e,id:s}){const o=`/user/api-calls/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_metrics:async function({client:e,group_by:s}){const o="/api-call-metrics"+t({group_by:s}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_async_operation:async function({client:e,id:s}){const o=`/async/operations/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_api_calls:c,list_api_calls_for_user:i,list_api_calls_for_user_pager:function(e){return a(i,e,"page_token")},list_api_calls_pager:function(e){return a(c,e,"page_token")},list_async_operations:_,list_async_operations_pager:function(e){return a(_,e,"page_token")},org_list_api_calls:p,org_list_api_calls_pager:function(e){return a(p,e,"page_token")},user_list_api_calls:O,user_list_api_calls_pager:function(e){return a(O,e,"page_token")}},S={create_api_token_for_user:async function({client:e,label:s}){const o="/user/api-tokens"+t({label:s}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_api_token_for_user:async function({client:e,token:s}){const o=`/user/api-tokens/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_api_token_for_user:async function({client:e,token:s}){const o=`/user/api-tokens/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_api_tokens_for_user:T,list_api_tokens_for_user_pager:function(e){return a(T,e,"page_token")}},b={apps_github_callback:async function({client:e}={}){const s="/apps/github/callback"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},apps_github_consent:async function({client:e}={}){const s="/apps/github/consent"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},apps_github_webhook:async function({client:e,body:s}){const o="/apps/github/webhook"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/octet-stream";const i={method:"POST",headers:c,body:s},_=e?.fetch||fetch,p=await _(r,i);await n(p)}},C={create_executor_term:e=>new h(e),create_file_execution:async function({client:e,lang:s,output:o,body:r}){const a=`/file/execute/${s}`+t({output:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},g={create_file_center_of_mass:async function({client:e,output_unit:s,src_format:o,body:r}){const a="/file/center-of-mass"+t({output_unit:s,src_format:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_conversion:async function({client:e,output_format:s,src_format:o,body:r}){const a=`/file/conversion/${o}/${s}`+t({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_conversion_options:async function({client:e,files:s,body:o}){const r="/file/conversion"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={"Content-Type":"multipart/form-data"};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;s.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await n(T),await T.json()},create_file_density:async function({client:e,material_mass:s,material_mass_unit:o,output_unit:r,src_format:a,body:c}){const i="/file/density"+t({material_mass:s,material_mass_unit:o,output_unit:r,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},create_file_mass:async function({client:e,material_density:s,material_density_unit:o,output_unit:r,src_format:a,body:c}){const i="/file/mass"+t({material_density:s,material_density_unit:o,output_unit:r,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},create_file_surface_area:async function({client:e,output_unit:s,src_format:o,body:r}){const a="/file/surface-area"+t({output_unit:s,src_format:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_volume:async function({client:e,output_unit:s,src_format:o,body:r}){const a="/file/volume"+t({output_unit:s,src_format:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},B={community_sso:async function({client:e,sig:s,sso:o}){const r="/community/sso"+t({sig:s,sso:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},create_debug_uploads:async function({client:e,files:s}){const o="/debug/uploads"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={"Content-Type":"multipart/form-data"};a&&(c.Authorization=`Bearer ${a}`);const i=new FormData;s.forEach((e=>{i.append(e.name,e.data,e.name)}));const _={method:"POST",headers:c,body:i},p=e?.fetch||fetch,O=await p(r,_);return await n(O),await O.json()},create_event:async function({client:e,files:s,body:o}){const r="/events"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={"Content-Type":"multipart/form-data"};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;s.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);await n(T)},get_ipinfo:async function({client:e}={}){const s="/_meta/ipinfo"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_pricing_subscriptions:async function({client:e}={}){const s="/pricing/subscriptions"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_schema:async function({client:e}={}){const s="/"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},internal_get_api_token_for_discord_user:async function({client:e,discord_id:s}){const o=`/internal/discord/api-token/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},ping:async function({client:e}={}){const s="/ping"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()}},U={create_kcl_code_completions:async function({client:e,body:s}){const o="/ml/kcl/completions"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_proprietary_to_kcl:async function({client:e,files:s,code_option:o}){const r="/ml/convert/proprietary-to-kcl"+t({code_option:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={"Content-Type":"multipart/form-data"};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;s.forEach((e=>{_.append(e.name,e.data,e.name)}));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await n(T),await T.json()},create_text_to_cad:async function({client:e,output_format:s,kcl:o,body:r}){const a=`/ai/text-to-cad/${s}`+t({kcl:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"POST",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_text_to_cad_iteration:async function({client:e,body:s}){const o="/ml/text-to-cad/iteration"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_text_to_cad_model_feedback:async function({client:e,id:s,feedback:o}){const r=`/user/text-to-cad/${s}`+t({feedback:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);await n(O)},create_text_to_cad_multi_file_iteration:async function({client:e,files:s,body:o}){const r="/ml/text-to-cad/multi-file/iteration"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={"Content-Type":"multipart/form-data"};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;s.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await n(T),await T.json()},get_ml_prompt:async function({client:e,id:s}){const o=`/ml-prompts/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_text_to_cad_model_for_user:async function({client:e,id:s}){const o=`/user/text-to-cad/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_conversations_for_user:E,list_conversations_for_user_pager:function(e){return a(E,e,"page_token")},list_ml_prompts:d,list_ml_prompts_pager:function(e){return a(d,e,"page_token")},list_text_to_cad_models_for_user:K,list_text_to_cad_models_for_user_pager:function(e){return a(K,e,"page_token")},ml_copilot_ws:e=>new A(e),ml_reasoning_ws:e=>new u(e)},D={modeling_commands_ws:e=>new f(e)},z={device_access_token:async function({client:e,body:o}){const r="/oauth2/device/token"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:s(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},device_auth_confirm:async function({client:e,body:s}){const o="/oauth2/device/confirm"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},device_auth_request:async function({client:e,body:o}){const r="/oauth2/device/auth"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:s(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},device_auth_verify:async function({client:e,app_name:s,user_code:o}){const r="/oauth2/device/verify"+t({app_name:s,user_code:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},oauth2_provider_callback:async function({client:e,provider:s,code:o,id_token:r,state:a,user:c}){const i=`/oauth2/provider/${s}/callback`+t({code:o,id_token:r,state:a,user:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},oauth2_provider_callback_post:async function({client:e,provider:o,body:r}){const a=`/oauth2/provider/${o}/callback`+t({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/x-www-form-urlencoded";const p={method:"POST",headers:_,body:s(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},oauth2_provider_consent:async function({client:e,provider:s,callback_url:o}){const r=`/oauth2/provider/${s}/consent`+t({callback_url:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},oauth2_token_revoke:async function({client:e,body:o}){const r="/oauth2/token/revoke"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:s(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()}},Y={create_org:async function({client:e,body:s}){const o="/org"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_org_member:async function({client:e,body:s}){const o="/org/members"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_org_saml_idp:async function({client:e,body:s}){const o="/org/saml/idp"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_org:async function({client:e}={}){const s="/org"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_org_member:async function({client:e,user_id:s}){const o=`/org/members/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},delete_org_saml_idp:async function({client:e}={}){const s="/org/saml/idp"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},get_any_org:async function({client:e,id:s}){const o=`/orgs/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_org:async function({client:e}={}){const s="/org"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_member:async function({client:e,user_id:s}){const o=`/org/members/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_org_privacy_settings:async function({client:e}={}){const s="/org/privacy"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_saml_idp:async function({client:e}={}){const s="/org/saml/idp"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_shortlinks:l,get_org_shortlinks_pager:function(e){return a(l,e,"page_token")},get_user_org:async function({client:e}={}){const s="/user/org"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_org_members:I,list_org_members_pager:function(e){return a(I,e,"page_token")},list_orgs:N,list_orgs_pager:function(e){return a(N,e,"page_token")},update_enterprise_pricing_for_org:async function({client:e,id:s,body:o}){const r=`/orgs/${s}/enterprise/pricing`+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_org:async function({client:e,body:s}){const o="/org"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_org_member:async function({client:e,user_id:s,body:o}){const r=`/org/members/${s}`+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_org_privacy_settings:async function({client:e,body:s}){const o="/org/privacy"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_org_saml_idp:async function({client:e,body:s}){const o="/org/saml/idp"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()}},k={create_org_subscription:async function({client:e,body:s}){const o="/org/payment/subscriptions"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_payment_information_for_org:async function({client:e,body:s}){const o="/org/payment"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_payment_information_for_user:async function({client:e,body:s}){const o="/user/payment"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_payment_intent_for_org:async function({client:e}={}){const s="/org/payment/intent"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},create_payment_intent_for_user:async function({client:e}={}){const s="/user/payment/intent"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},create_user_subscription:async function({client:e,body:s}){const o="/user/payment/subscriptions"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_payment_information_for_org:async function({client:e}={}){const s="/org/payment"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_payment_information_for_user:async function({client:e}={}){const s="/user/payment"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_payment_method_for_org:async function({client:e,id:s}){const o=`/org/payment/methods/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},delete_payment_method_for_user:async function({client:e,id:s}){const o=`/user/payment/methods/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_org_subscription:async function({client:e}={}){const s="/org/payment/subscriptions"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_payment_balance_for_any_org:async function({client:e,include_total_due:s,id:o}){const r=`/orgs/${o}/payment/balance`+t({include_total_due:s}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},get_payment_balance_for_any_user:async function({client:e,id:s,include_total_due:o}){const r=`/users/${s}/payment/balance`+t({include_total_due:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},get_payment_balance_for_org:async function({client:e,include_total_due:s}){const o="/org/payment/balance"+t({include_total_due:s}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_payment_balance_for_user:async function({client:e,include_total_due:s}){const o="/user/payment/balance"+t({include_total_due:s}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_payment_information_for_org:async function({client:e}={}){const s="/org/payment"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_payment_information_for_user:async function({client:e}={}){const s="/user/payment"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_subscription:async function({client:e}={}){const s="/user/payment/subscriptions"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_invoices_for_org:async function({client:e}={}){const s="/org/payment/invoices"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_invoices_for_user:async function({client:e}={}){const s="/user/payment/invoices"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_payment_methods_for_org:async function({client:e}={}){const s="/org/payment/methods"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_payment_methods_for_user:async function({client:e}={}){const s="/user/payment/methods"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},update_org_subscription:async function({client:e,body:s}){const o="/org/payment/subscriptions"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_payment_balance_for_any_org:async function({client:e,id:s,include_total_due:o,body:r}){const a=`/orgs/${s}/payment/balance`+t({include_total_due:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},update_payment_balance_for_any_user:async function({client:e,id:s,include_total_due:o,body:r}){const a=`/users/${s}/payment/balance`+t({include_total_due:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},update_payment_information_for_org:async function({client:e,body:s}){const o="/org/payment"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_payment_information_for_user:async function({client:e,body:s}){const o="/user/payment"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_subscription:async function({client:e,body:s}){const o="/user/payment/subscriptions"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},validate_customer_tax_information_for_org:async function({client:e}={}){const s="/org/payment/tax"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},validate_customer_tax_information_for_user:async function({client:e}={}){const s="/user/payment/tax"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)}},$={create_service_account_for_org:async function({client:e,label:s}){const o="/org/service-accounts"+t({label:s}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_service_account_for_org:async function({client:e,token:s}){const o=`/org/service-accounts/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_service_account_for_org:async function({client:e,token:s}){const o=`/org/service-accounts/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_service_accounts_for_org:y,list_service_accounts_for_org_pager:function(e){return a(y,e,"page_token")}},L={create_store_coupon:async function({client:e,body:s}){const o="/store/coupon"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()}},j={get_angle_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/angle/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_area_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/area/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_current_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/current/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_energy_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/energy/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_force_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/force/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_frequency_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/frequency/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_length_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/length/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_mass_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/mass/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_power_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/power/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_pressure_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/pressure/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_temperature_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/temperature/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_torque_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/torque/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_volume_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/volume/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},H={create_user_shortlink:async function({client:e,body:s}){const o="/user/shortlinks"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_user_self:async function({client:e}={}){const s="/user"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_user_shortlink:async function({client:e,key:s}){const o=`/user/shortlinks/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_oauth2_providers_for_user:async function({client:e}={}){const s="/user/oauth2/providers"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_session_for_user:async function({client:e,token:s}){const o=`/user/session/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_user:async function({client:e,id:s}){const o=`/users/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_user_extended:async function({client:e,id:s}){const o=`/users-extended/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_user_privacy_settings:async function({client:e}={}){const s="/user/privacy"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_self:async function({client:e}={}){const s="/user"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_self_extended:async function({client:e}={}){const s="/user/extended"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_shortlinks:w,get_user_shortlinks_pager:function(e){return a(w,e,"page_token")},list_users:P,list_users_extended:m,list_users_extended_pager:function(e){return a(m,e,"page_token")},list_users_pager:function(e){return a(P,e,"page_token")},patch_user_crm:async function({client:e,body:s}){const o="/user/crm"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PATCH",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_public_form:async function({client:e,body:s}){const o="/website/form"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_public_subscribe:async function({client:e,body:s}){const o="/website/subscribe"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_user_form_self:async function({client:e,body:s}){const o="/user/form"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},update_subscription_for_user:async function({client:e,id:s,body:o}){const r=`/users/${s}/payment/subscriptions`+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_user_privacy_settings:async function({client:e,body:s}){const o="/user/privacy"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_self:async function({client:e,body:s}){const o="/user"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_shortlink:async function({client:e,key:s,body:o}){const r=`/user/shortlinks/${s}`+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);await n(O)}};exports.ApiError=o,exports.Client=class{constructor(e){"string"==typeof e?this.token=e:e&&"object"==typeof e&&(this.token=e.token,this.baseUrl=e.baseUrl,this.fetch=e.fetch)}},exports.Pager=r,exports.api_calls=Z,exports.api_tokens=S,exports.apps=b,exports.createPager=a,exports.executor=C,exports.file=g,exports.meta=B,exports.ml=U,exports.modeling=D,exports.oauth2=z,exports.orgs=Y,exports.payments=k,exports.service_accounts=$,exports.store=L,exports.unit=j,exports.users=H;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("bson");try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?.node){new Function("m","return import(m)")("cross-fetch/polyfill").catch((()=>{}))}}catch{}function t(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e))if(void 0!==o)if(Array.isArray(o))for(const e of o)t.append(s,String(e));else t.append(s,String(o));const s=t.toString();return s?`?${s}`:""}function s(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e||{}))if(void 0!==o)if(Array.isArray(o))for(const e of o)t.append(s,String(e));else t.append(s,String(o));return t}try{if("undefined"!=typeof process&&process.versions?.node&&"win32"===process.platform){new Function("m","return import(m)")("win-ca")}}catch{}class o extends Error{constructor(e,t,s){super(s||t?.message||`HTTP ${e}`),this.name="ApiError",this.status=e,this.error_code=t?.error_code,this.request_id=t?.request_id,this.body=t}}async function n(e){if(e.ok)return;let t;try{t=await e.json()}catch{try{const s=await e.text();t=s?{message:s}:void 0}catch{t=void 0}}throw new o(e.status,t)}class r{started=!1;constructor(e,t,s="page_token"){this.fetchPage=e,this.baseParams={...t},this.tokenField=s}hasNext(){return!this.started||!!this.nextToken}reset(){this.started=!1,this.nextToken=void 0}async next(){if(this.started&&!this.nextToken)return[];const e={...this.baseParams};this.started&&this.nextToken&&(e[this.tokenField]=this.nextToken);const t=await this.fetchPage(e);return this.started=!0,this.nextToken=t?.next_page??null,t?.items??[]}}function a(e,t,s="page_token"){return new r(e,t,s)}async function c({client:e,limit:s,page_token:o,sort_by:r}){const a="/api-calls"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function i({client:e,id:s,limit:o,page_token:r,sort_by:a}){const c=`/users/${s}/api-calls`+t({limit:o,page_token:r,sort_by:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function _({client:e,limit:s,page_token:o,sort_by:r,status:a}){const c="/async/operations"+t({limit:s,page_token:o,sort_by:r,status:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function p({client:e,limit:s,page_token:o,sort_by:r}){const a="/org/api-calls"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function O({client:e,limit:s,page_token:o,sort_by:r}){const a="/user/api-calls"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function T({client:e,limit:s,page_token:o,sort_by:r}){const a="/user/api-tokens"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}function v(e){return!!e&&"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}class h{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/executor/term"+t({}),s=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(s);await new Promise(((e,t)=>{const s=()=>{r(),e()},n=e=>{r(),t(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",s),o.removeEventListener("error",n)};o.addEventListener("open",s),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.BSON.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const o=setTimeout((()=>{a(),s(new Error("timeout"))}),e),n=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.BSON.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}if(v(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}return s}}class A{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/ml/copilot"+t({}),s=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(s);await new Promise(((e,t)=>{const s=()=>{r(),e()},n=e=>{r(),t(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",s),o.removeEventListener("error",n)};o.addEventListener("open",s),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.BSON.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const o=setTimeout((()=>{a(),s(new Error("timeout"))}),e),n=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.BSON.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}if(v(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}return s}}class u{constructor(e){this.functionNameParams=e}async connect(){const e=`/ws/ml/reasoning/${this.functionNameParams.id}`+t({}),s=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(s);await new Promise(((e,t)=>{const s=()=>{r(),e()},n=e=>{r(),t(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",s),o.removeEventListener("error",n)};o.addEventListener("open",s),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.BSON.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const o=setTimeout((()=>{a(),s(new Error("timeout"))}),e),n=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.BSON.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}if(v(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}return s}}async function E({client:e,limit:s,page_token:o,sort_by:r}){const a="/ml/conversations"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function d({client:e,limit:s,page_token:o,sort_by:r}){const a="/ml-prompts"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function K({client:e,limit:s,page_token:o,sort_by:r,conversation_id:a,no_models:c}){const i="/user/text-to-cad"+t({limit:s,page_token:o,sort_by:r,conversation_id:a,no_models:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);await n(h);return await h.json()}class f{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/modeling/commands"+t({api_call_id:this.functionNameParams.api_call_id,fps:this.functionNameParams.fps,pool:this.functionNameParams.pool,post_effect:this.functionNameParams.post_effect,replay:this.functionNameParams.replay,show_grid:this.functionNameParams.show_grid,unlocked_framerate:this.functionNameParams.unlocked_framerate,video_res_height:this.functionNameParams.video_res_height,video_res_width:this.functionNameParams.video_res_width,webrtc:this.functionNameParams.webrtc}),s=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(s);await new Promise(((e,t)=>{const s=()=>{r(),e()},n=e=>{r(),t(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",s),o.removeEventListener("error",n)};o.addEventListener("open",s),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.BSON.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const o=setTimeout((()=>{a(),s(new Error("timeout"))}),e),n=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.BSON.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}if(v(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.BSON.deserialize(t)}return s}}async function l({client:e,limit:s,page_token:o,sort_by:r}){const a="/org/shortlinks"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function I({client:e,limit:s,page_token:o,sort_by:r,role:a}){const c="/org/members"+t({limit:s,page_token:o,sort_by:r,role:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function N({client:e,limit:s,page_token:o,sort_by:r}){const a="/orgs"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function y({client:e,limit:s,page_token:o,sort_by:r}){const a="/org/service-accounts"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function w({client:e,limit:s,page_token:o,sort_by:r}){const a="/user/shortlinks"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function P({client:e,limit:s,page_token:o,sort_by:r}){const a="/users"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function m({client:e,limit:s,page_token:o,sort_by:r}){const a="/users-extended"+t({limit:s,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}const Z={get_api_call:async function({client:e,id:s}){const o=`/api-calls/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_for_org:async function({client:e,id:s}){const o=`/org/api-calls/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_for_user:async function({client:e,id:s}){const o=`/user/api-calls/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_metrics:async function({client:e,group_by:s}){const o="/api-call-metrics"+t({group_by:s}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_async_operation:async function({client:e,id:s}){const o=`/async/operations/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_api_calls:c,list_api_calls_for_user:i,list_api_calls_for_user_pager:function(e){return a(i,e,"page_token")},list_api_calls_pager:function(e){return a(c,e,"page_token")},list_async_operations:_,list_async_operations_pager:function(e){return a(_,e,"page_token")},org_list_api_calls:p,org_list_api_calls_pager:function(e){return a(p,e,"page_token")},user_list_api_calls:O,user_list_api_calls_pager:function(e){return a(O,e,"page_token")}},S={create_api_token_for_user:async function({client:e,label:s}){const o="/user/api-tokens"+t({label:s}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_api_token_for_user:async function({client:e,token:s}){const o=`/user/api-tokens/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_api_token_for_user:async function({client:e,token:s}){const o=`/user/api-tokens/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_api_tokens_for_user:T,list_api_tokens_for_user_pager:function(e){return a(T,e,"page_token")}},b={apps_github_callback:async function({client:e}={}){const s="/apps/github/callback"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},apps_github_consent:async function({client:e}={}){const s="/apps/github/consent"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},apps_github_webhook:async function({client:e,body:s}){const o="/apps/github/webhook"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/octet-stream";const i={method:"POST",headers:c,body:s},_=e?.fetch||fetch,p=await _(r,i);await n(p)}},C={create_executor_term:e=>new h(e),create_file_execution:async function({client:e,lang:s,output:o,body:r}){const a=`/file/execute/${s}`+t({output:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},g={create_file_center_of_mass:async function({client:e,output_unit:s,src_format:o,body:r}){const a="/file/center-of-mass"+t({output_unit:s,src_format:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_conversion:async function({client:e,output_format:s,src_format:o,body:r}){const a=`/file/conversion/${o}/${s}`+t({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_conversion_options:async function({client:e,files:s,body:o}){const r="/file/conversion"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;s.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await n(T),await T.json()},create_file_density:async function({client:e,material_mass:s,material_mass_unit:o,output_unit:r,src_format:a,body:c}){const i="/file/density"+t({material_mass:s,material_mass_unit:o,output_unit:r,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},create_file_mass:async function({client:e,material_density:s,material_density_unit:o,output_unit:r,src_format:a,body:c}){const i="/file/mass"+t({material_density:s,material_density_unit:o,output_unit:r,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},create_file_surface_area:async function({client:e,output_unit:s,src_format:o,body:r}){const a="/file/surface-area"+t({output_unit:s,src_format:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_volume:async function({client:e,output_unit:s,src_format:o,body:r}){const a="/file/volume"+t({output_unit:s,src_format:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},B={community_sso:async function({client:e,sig:s,sso:o}){const r="/community/sso"+t({sig:s,sso:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},create_debug_uploads:async function({client:e,files:s}){const o="/debug/uploads"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i=new FormData;s.forEach((e=>{i.append(e.name,e.data,e.name)}));const _={method:"POST",headers:c,body:i},p=e?.fetch||fetch,O=await p(r,_);return await n(O),await O.json()},create_event:async function({client:e,files:s,body:o}){const r="/events"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;s.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);await n(T)},get_ipinfo:async function({client:e}={}){const s="/_meta/ipinfo"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_pricing_subscriptions:async function({client:e}={}){const s="/pricing/subscriptions"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_schema:async function({client:e}={}){const s="/"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},internal_get_api_token_for_discord_user:async function({client:e,discord_id:s}){const o=`/internal/discord/api-token/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},ping:async function({client:e}={}){const s="/ping"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()}},U={create_kcl_code_completions:async function({client:e,body:s}){const o="/ml/kcl/completions"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_proprietary_to_kcl:async function({client:e,files:s,code_option:o}){const r="/ml/convert/proprietary-to-kcl"+t({code_option:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;s.forEach((e=>{_.append(e.name,e.data,e.name)}));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await n(T),await T.json()},create_text_to_cad:async function({client:e,output_format:s,kcl:o,body:r}){const a=`/ai/text-to-cad/${s}`+t({kcl:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"POST",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_text_to_cad_iteration:async function({client:e,body:s}){const o="/ml/text-to-cad/iteration"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_text_to_cad_model_feedback:async function({client:e,id:s,feedback:o}){const r=`/user/text-to-cad/${s}`+t({feedback:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);await n(O)},create_text_to_cad_multi_file_iteration:async function({client:e,files:s,body:o}){const r="/ml/text-to-cad/multi-file/iteration"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;s.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await n(T),await T.json()},get_ml_prompt:async function({client:e,id:s}){const o=`/ml-prompts/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_text_to_cad_model_for_user:async function({client:e,id:s}){const o=`/user/text-to-cad/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_conversations_for_user:E,list_conversations_for_user_pager:function(e){return a(E,e,"page_token")},list_ml_prompts:d,list_ml_prompts_pager:function(e){return a(d,e,"page_token")},list_text_to_cad_models_for_user:K,list_text_to_cad_models_for_user_pager:function(e){return a(K,e,"page_token")},ml_copilot_ws:e=>new A(e),ml_reasoning_ws:e=>new u(e)},D={modeling_commands_ws:e=>new f(e)},z={device_access_token:async function({client:e,body:o}){const r="/oauth2/device/token"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:s(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},device_auth_confirm:async function({client:e,body:s}){const o="/oauth2/device/confirm"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},device_auth_request:async function({client:e,body:o}){const r="/oauth2/device/auth"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:s(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},device_auth_verify:async function({client:e,app_name:s,user_code:o}){const r="/oauth2/device/verify"+t({app_name:s,user_code:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},oauth2_provider_callback:async function({client:e,provider:s,code:o,id_token:r,state:a,user:c}){const i=`/oauth2/provider/${s}/callback`+t({code:o,id_token:r,state:a,user:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},oauth2_provider_callback_post:async function({client:e,provider:o,body:r}){const a=`/oauth2/provider/${o}/callback`+t({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/x-www-form-urlencoded";const p={method:"POST",headers:_,body:s(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},oauth2_provider_consent:async function({client:e,provider:s,callback_url:o}){const r=`/oauth2/provider/${s}/consent`+t({callback_url:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},oauth2_token_revoke:async function({client:e,body:o}){const r="/oauth2/token/revoke"+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:s(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()}},Y={create_org:async function({client:e,body:s}){const o="/org"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_org_member:async function({client:e,body:s}){const o="/org/members"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_org_saml_idp:async function({client:e,body:s}){const o="/org/saml/idp"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_org:async function({client:e}={}){const s="/org"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_org_member:async function({client:e,user_id:s}){const o=`/org/members/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},delete_org_saml_idp:async function({client:e}={}){const s="/org/saml/idp"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},get_any_org:async function({client:e,id:s}){const o=`/orgs/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_org:async function({client:e}={}){const s="/org"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_member:async function({client:e,user_id:s}){const o=`/org/members/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_org_privacy_settings:async function({client:e}={}){const s="/org/privacy"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_saml_idp:async function({client:e}={}){const s="/org/saml/idp"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_shortlinks:l,get_org_shortlinks_pager:function(e){return a(l,e,"page_token")},get_user_org:async function({client:e}={}){const s="/user/org"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_org_members:I,list_org_members_pager:function(e){return a(I,e,"page_token")},list_orgs:N,list_orgs_pager:function(e){return a(N,e,"page_token")},update_enterprise_pricing_for_org:async function({client:e,id:s,body:o}){const r=`/orgs/${s}/enterprise/pricing`+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_org:async function({client:e,body:s}){const o="/org"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_org_member:async function({client:e,user_id:s,body:o}){const r=`/org/members/${s}`+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_org_privacy_settings:async function({client:e,body:s}){const o="/org/privacy"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_org_saml_idp:async function({client:e,body:s}){const o="/org/saml/idp"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()}},k={create_org_subscription:async function({client:e,body:s}){const o="/org/payment/subscriptions"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_payment_information_for_org:async function({client:e,body:s}){const o="/org/payment"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_payment_information_for_user:async function({client:e,body:s}){const o="/user/payment"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_payment_intent_for_org:async function({client:e}={}){const s="/org/payment/intent"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},create_payment_intent_for_user:async function({client:e}={}){const s="/user/payment/intent"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},create_user_subscription:async function({client:e,body:s}){const o="/user/payment/subscriptions"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_payment_information_for_org:async function({client:e}={}){const s="/org/payment"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_payment_information_for_user:async function({client:e}={}){const s="/user/payment"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_payment_method_for_org:async function({client:e,id:s}){const o=`/org/payment/methods/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},delete_payment_method_for_user:async function({client:e,id:s}){const o=`/user/payment/methods/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_org_subscription:async function({client:e}={}){const s="/org/payment/subscriptions"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_payment_balance_for_any_org:async function({client:e,include_total_due:s,id:o}){const r=`/orgs/${o}/payment/balance`+t({include_total_due:s}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},get_payment_balance_for_any_user:async function({client:e,id:s,include_total_due:o}){const r=`/users/${s}/payment/balance`+t({include_total_due:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},get_payment_balance_for_org:async function({client:e,include_total_due:s}){const o="/org/payment/balance"+t({include_total_due:s}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_payment_balance_for_user:async function({client:e,include_total_due:s}){const o="/user/payment/balance"+t({include_total_due:s}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_payment_information_for_org:async function({client:e}={}){const s="/org/payment"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_payment_information_for_user:async function({client:e}={}){const s="/user/payment"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_subscription:async function({client:e}={}){const s="/user/payment/subscriptions"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_invoices_for_org:async function({client:e}={}){const s="/org/payment/invoices"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_invoices_for_user:async function({client:e}={}){const s="/user/payment/invoices"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_payment_methods_for_org:async function({client:e}={}){const s="/org/payment/methods"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_payment_methods_for_user:async function({client:e}={}){const s="/user/payment/methods"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},update_org_subscription:async function({client:e,body:s}){const o="/org/payment/subscriptions"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_payment_balance_for_any_org:async function({client:e,id:s,include_total_due:o,body:r}){const a=`/orgs/${s}/payment/balance`+t({include_total_due:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},update_payment_balance_for_any_user:async function({client:e,id:s,include_total_due:o,body:r}){const a=`/users/${s}/payment/balance`+t({include_total_due:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},update_payment_information_for_org:async function({client:e,body:s}){const o="/org/payment"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_payment_information_for_user:async function({client:e,body:s}){const o="/user/payment"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_subscription:async function({client:e,body:s}){const o="/user/payment/subscriptions"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},validate_customer_tax_information_for_org:async function({client:e}={}){const s="/org/payment/tax"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},validate_customer_tax_information_for_user:async function({client:e}={}){const s="/user/payment/tax"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)}},$={create_service_account_for_org:async function({client:e,label:s}){const o="/org/service-accounts"+t({label:s}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_service_account_for_org:async function({client:e,token:s}){const o=`/org/service-accounts/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_service_account_for_org:async function({client:e,token:s}){const o=`/org/service-accounts/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_service_accounts_for_org:y,list_service_accounts_for_org_pager:function(e){return a(y,e,"page_token")}},L={create_store_coupon:async function({client:e,body:s}){const o="/store/coupon"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()}},j={get_angle_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/angle/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_area_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/area/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_current_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/current/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_energy_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/energy/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_force_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/force/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_frequency_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/frequency/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_length_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/length/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_mass_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/mass/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_power_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/power/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_pressure_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/pressure/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_temperature_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/temperature/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_torque_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/torque/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_volume_unit_conversion:async function({client:e,input_unit:s,output_unit:o,value:r}){const a=`/unit/conversion/volume/${s}/${o}`+t({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},H={create_user_shortlink:async function({client:e,body:s}){const o="/user/shortlinks"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_user_self:async function({client:e}={}){const s="/user"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_user_shortlink:async function({client:e,key:s}){const o=`/user/shortlinks/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_oauth2_providers_for_user:async function({client:e}={}){const s="/user/oauth2/providers"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_session_for_user:async function({client:e,token:s}){const o=`/user/session/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_user:async function({client:e,id:s}){const o=`/users/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_user_extended:async function({client:e,id:s}){const o=`/users-extended/${s}`+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_user_privacy_settings:async function({client:e}={}){const s="/user/privacy"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_self:async function({client:e}={}){const s="/user"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_self_extended:async function({client:e}={}){const s="/user/extended"+t({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+s,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_shortlinks:w,get_user_shortlinks_pager:function(e){return a(w,e,"page_token")},list_users:P,list_users_extended:m,list_users_extended_pager:function(e){return a(m,e,"page_token")},list_users_pager:function(e){return a(P,e,"page_token")},patch_user_crm:async function({client:e,body:s}){const o="/user/crm"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PATCH",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_public_form:async function({client:e,body:s}){const o="/website/form"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_public_subscribe:async function({client:e,body:s}){const o="/website/subscribe"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_user_form_self:async function({client:e,body:s}){const o="/user/form"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},update_subscription_for_user:async function({client:e,id:s,body:o}){const r=`/users/${s}/payment/subscriptions`+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_user_privacy_settings:async function({client:e,body:s}){const o="/user/privacy"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_self:async function({client:e,body:s}){const o="/user"+t({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(s)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_shortlink:async function({client:e,key:s,body:o}){const r=`/user/shortlinks/${s}`+t({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);await n(O)}};exports.ApiError=o,exports.Client=class{constructor(e){"string"==typeof e?this.token=e:e&&"object"==typeof e&&(this.token=e.token,this.baseUrl=e.baseUrl,this.fetch=e.fetch)}},exports.Pager=r,exports.api_calls=Z,exports.api_tokens=S,exports.apps=b,exports.createPager=a,exports.executor=C,exports.file=g,exports.meta=B,exports.ml=U,exports.modeling=D,exports.oauth2=z,exports.orgs=Y,exports.payments=k,exports.service_accounts=$,exports.store=L,exports.unit=j,exports.users=H;
|
package/dist/mjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BSON as e}from"bson";try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?.node){new Function("m","return import(m)")("cross-fetch/polyfill").catch((()=>{}))}}catch{}class t{constructor(e){"string"==typeof e?this.token=e:e&&"object"==typeof e&&(this.token=e.token,this.baseUrl=e.baseUrl,this.fetch=e.fetch)}}function s(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e))if(void 0!==n)if(Array.isArray(n))for(const e of n)t.append(s,String(e));else t.append(s,String(n));const s=t.toString();return s?`?${s}`:""}function n(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e||{}))if(void 0!==n)if(Array.isArray(n))for(const e of n)t.append(s,String(e));else t.append(s,String(n));return t}try{if("undefined"!=typeof process&&process.versions?.node&&"win32"===process.platform){new Function("m","return import(m)")("win-ca")}}catch{}class o extends Error{constructor(e,t,s){super(s||t?.message||`HTTP ${e}`),this.name="ApiError",this.status=e,this.error_code=t?.error_code,this.request_id=t?.request_id,this.body=t}}async function r(e){if(e.ok)return;let t;try{t=await e.json()}catch{try{const s=await e.text();t=s?{message:s}:void 0}catch{t=void 0}}throw new o(e.status,t)}class a{started=!1;constructor(e,t,s="page_token"){this.fetchPage=e,this.baseParams={...t},this.tokenField=s}hasNext(){return!this.started||!!this.nextToken}reset(){this.started=!1,this.nextToken=void 0}async next(){if(this.started&&!this.nextToken)return[];const e={...this.baseParams};this.started&&this.nextToken&&(e[this.tokenField]=this.nextToken);const t=await this.fetchPage(e);return this.started=!0,this.nextToken=t?.next_page??null,t?.items??[]}}function c(e,t,s="page_token"){return new a(e,t,s)}async function i({client:e,limit:t,page_token:n,sort_by:o}){const a="/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function _({client:e,id:t,limit:n,page_token:o,sort_by:a}){const c=`/users/${t}/api-calls`+s({limit:n,page_token:o,sort_by:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function p({client:e,limit:t,page_token:n,sort_by:o,status:a}){const c="/async/operations"+s({limit:t,page_token:n,sort_by:o,status:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function O({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function T({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function v({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/api-tokens"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}function h(e){return!!e&&"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}class A{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/executor/term"+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}class u{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/ml/copilot"+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}class E{constructor(e){this.functionNameParams=e}async connect(){const e=`/ws/ml/reasoning/${this.functionNameParams.id}`+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}async function d({client:e,limit:t,page_token:n,sort_by:o}){const a="/ml/conversations"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function K({client:e,limit:t,page_token:n,sort_by:o}){const a="/ml-prompts"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function f({client:e,limit:t,page_token:n,sort_by:o,conversation_id:a,no_models:c}){const i="/user/text-to-cad"+s({limit:t,page_token:n,sort_by:o,conversation_id:a,no_models:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);await r(h);return await h.json()}class l{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/modeling/commands"+s({api_call_id:this.functionNameParams.api_call_id,fps:this.functionNameParams.fps,pool:this.functionNameParams.pool,post_effect:this.functionNameParams.post_effect,replay:this.functionNameParams.replay,show_grid:this.functionNameParams.show_grid,unlocked_framerate:this.functionNameParams.unlocked_framerate,video_res_height:this.functionNameParams.video_res_height,video_res_width:this.functionNameParams.video_res_width,webrtc:this.functionNameParams.webrtc}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}async function I({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/shortlinks"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function N({client:e,limit:t,page_token:n,sort_by:o,role:a}){const c="/org/members"+s({limit:t,page_token:n,sort_by:o,role:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function y({client:e,limit:t,page_token:n,sort_by:o}){const a="/orgs"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function w({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/service-accounts"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function P({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/shortlinks"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function m({client:e,limit:t,page_token:n,sort_by:o}){const a="/users"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function Z({client:e,limit:t,page_token:n,sort_by:o}){const a="/users-extended"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}const S={get_api_call:async function({client:e,id:t}){const n=`/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_for_org:async function({client:e,id:t}){const n=`/org/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_for_user:async function({client:e,id:t}){const n=`/user/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_metrics:async function({client:e,group_by:t}){const n="/api-call-metrics"+s({group_by:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_async_operation:async function({client:e,id:t}){const n=`/async/operations/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_api_calls:i,list_api_calls_for_user:_,list_api_calls_for_user_pager:function(e){return c(_,e,"page_token")},list_api_calls_pager:function(e){return c(i,e,"page_token")},list_async_operations:p,list_async_operations_pager:function(e){return c(p,e,"page_token")},org_list_api_calls:O,org_list_api_calls_pager:function(e){return c(O,e,"page_token")},user_list_api_calls:T,user_list_api_calls_pager:function(e){return c(T,e,"page_token")}},b={create_api_token_for_user:async function({client:e,label:t}){const n="/user/api-tokens"+s({label:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_api_token_for_user:async function({client:e,token:t}){const n=`/user/api-tokens/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_api_token_for_user:async function({client:e,token:t}){const n=`/user/api-tokens/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_api_tokens_for_user:v,list_api_tokens_for_user_pager:function(e){return c(v,e,"page_token")}},C={apps_github_callback:async function({client:e}={}){const t="/apps/github/callback"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},apps_github_consent:async function({client:e}={}){const t="/apps/github/consent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},apps_github_webhook:async function({client:e,body:t}){const n="/apps/github/webhook"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/octet-stream";const i={method:"POST",headers:c,body:t},_=e?.fetch||fetch,p=await _(o,i);await r(p)}},g={create_executor_term:e=>new A(e),create_file_execution:async function({client:e,lang:t,output:n,body:o}){const a=`/file/execute/${t}`+s({output:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},U={create_file_center_of_mass:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/center-of-mass"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_conversion:async function({client:e,output_format:t,src_format:n,body:o}){const a=`/file/conversion/${n}/${t}`+s({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_conversion_options:async function({client:e,files:t,body:n}){const o="/file/conversion"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={"Content-Type":"multipart/form-data"};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},create_file_density:async function({client:e,material_mass:t,material_mass_unit:n,output_unit:o,src_format:a,body:c}){const i="/file/density"+s({material_mass:t,material_mass_unit:n,output_unit:o,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},create_file_mass:async function({client:e,material_density:t,material_density_unit:n,output_unit:o,src_format:a,body:c}){const i="/file/mass"+s({material_density:t,material_density_unit:n,output_unit:o,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},create_file_surface_area:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/surface-area"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_volume:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/volume"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},D={community_sso:async function({client:e,sig:t,sso:n}){const o="/community/sso"+s({sig:t,sso:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},create_debug_uploads:async function({client:e,files:t}){const n="/debug/uploads"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={"Content-Type":"multipart/form-data"};a&&(c.Authorization=`Bearer ${a}`);const i=new FormData;t.forEach((e=>{i.append(e.name,e.data,e.name)}));const _={method:"POST",headers:c,body:i},p=e?.fetch||fetch,O=await p(o,_);return await r(O),await O.json()},create_event:async function({client:e,files:t,body:n}){const o="/events"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={"Content-Type":"multipart/form-data"};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);await r(T)},get_ipinfo:async function({client:e}={}){const t="/_meta/ipinfo"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_pricing_subscriptions:async function({client:e}={}){const t="/pricing/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_schema:async function({client:e}={}){const t="/"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},internal_get_api_token_for_discord_user:async function({client:e,discord_id:t}){const n=`/internal/discord/api-token/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},ping:async function({client:e}={}){const t="/ping"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()}},B={create_kcl_code_completions:async function({client:e,body:t}){const n="/ml/kcl/completions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_proprietary_to_kcl:async function({client:e,files:t,code_option:n}){const o="/ml/convert/proprietary-to-kcl"+s({code_option:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={"Content-Type":"multipart/form-data"};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)}));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},create_text_to_cad:async function({client:e,output_format:t,kcl:n,body:o}){const a=`/ai/text-to-cad/${t}`+s({kcl:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"POST",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_text_to_cad_iteration:async function({client:e,body:t}){const n="/ml/text-to-cad/iteration"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_text_to_cad_model_feedback:async function({client:e,id:t,feedback:n}){const o=`/user/text-to-cad/${t}`+s({feedback:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);await r(O)},create_text_to_cad_multi_file_iteration:async function({client:e,files:t,body:n}){const o="/ml/text-to-cad/multi-file/iteration"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={"Content-Type":"multipart/form-data"};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},get_ml_prompt:async function({client:e,id:t}){const n=`/ml-prompts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_text_to_cad_model_for_user:async function({client:e,id:t}){const n=`/user/text-to-cad/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_conversations_for_user:d,list_conversations_for_user_pager:function(e){return c(d,e,"page_token")},list_ml_prompts:K,list_ml_prompts_pager:function(e){return c(K,e,"page_token")},list_text_to_cad_models_for_user:f,list_text_to_cad_models_for_user_pager:function(e){return c(f,e,"page_token")},ml_copilot_ws:e=>new u(e),ml_reasoning_ws:e=>new E(e)},z={modeling_commands_ws:e=>new l(e)},Y={device_access_token:async function({client:e,body:t}){const o="/oauth2/device/token"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},device_auth_confirm:async function({client:e,body:t}){const n="/oauth2/device/confirm"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},device_auth_request:async function({client:e,body:t}){const o="/oauth2/device/auth"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},device_auth_verify:async function({client:e,app_name:t,user_code:n}){const o="/oauth2/device/verify"+s({app_name:t,user_code:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},oauth2_provider_callback:async function({client:e,provider:t,code:n,id_token:o,state:a,user:c}){const i=`/oauth2/provider/${t}/callback`+s({code:n,id_token:o,state:a,user:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},oauth2_provider_callback_post:async function({client:e,provider:t,body:o}){const a=`/oauth2/provider/${t}/callback`+s({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/x-www-form-urlencoded";const p={method:"POST",headers:_,body:n(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},oauth2_provider_consent:async function({client:e,provider:t,callback_url:n}){const o=`/oauth2/provider/${t}/consent`+s({callback_url:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},oauth2_token_revoke:async function({client:e,body:t}){const o="/oauth2/token/revoke"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()}},k={create_org:async function({client:e,body:t}){const n="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_org_member:async function({client:e,body:t}){const n="/org/members"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_org_saml_idp:async function({client:e,body:t}){const n="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_org:async function({client:e}={}){const t="/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_org_member:async function({client:e,user_id:t}){const n=`/org/members/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},delete_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},get_any_org:async function({client:e,id:t}){const n=`/orgs/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_org:async function({client:e}={}){const t="/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_member:async function({client:e,user_id:t}){const n=`/org/members/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_org_privacy_settings:async function({client:e}={}){const t="/org/privacy"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_shortlinks:I,get_org_shortlinks_pager:function(e){return c(I,e,"page_token")},get_user_org:async function({client:e}={}){const t="/user/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_org_members:N,list_org_members_pager:function(e){return c(N,e,"page_token")},list_orgs:y,list_orgs_pager:function(e){return c(y,e,"page_token")},update_enterprise_pricing_for_org:async function({client:e,id:t,body:n}){const o=`/orgs/${t}/enterprise/pricing`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_org:async function({client:e,body:t}){const n="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_org_member:async function({client:e,user_id:t,body:n}){const o=`/org/members/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_org_privacy_settings:async function({client:e,body:t}){const n="/org/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_org_saml_idp:async function({client:e,body:t}){const n="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()}},$={create_org_subscription:async function({client:e,body:t}){const n="/org/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_information_for_org:async function({client:e,body:t}){const n="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_information_for_user:async function({client:e,body:t}){const n="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_intent_for_org:async function({client:e}={}){const t="/org/payment/intent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},create_payment_intent_for_user:async function({client:e}={}){const t="/user/payment/intent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},create_user_subscription:async function({client:e,body:t}){const n="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_payment_method_for_org:async function({client:e,id:t}){const n=`/org/payment/methods/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},delete_payment_method_for_user:async function({client:e,id:t}){const n=`/user/payment/methods/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_org_subscription:async function({client:e}={}){const t="/org/payment/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_payment_balance_for_any_org:async function({client:e,include_total_due:t,id:n}){const o=`/orgs/${n}/payment/balance`+s({include_total_due:t}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},get_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:n}){const o=`/users/${t}/payment/balance`+s({include_total_due:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},get_payment_balance_for_org:async function({client:e,include_total_due:t}){const n="/org/payment/balance"+s({include_total_due:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_payment_balance_for_user:async function({client:e,include_total_due:t}){const n="/user/payment/balance"+s({include_total_due:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_subscription:async function({client:e}={}){const t="/user/payment/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_invoices_for_org:async function({client:e}={}){const t="/org/payment/invoices"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_invoices_for_user:async function({client:e}={}){const t="/user/payment/invoices"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_payment_methods_for_org:async function({client:e}={}){const t="/org/payment/methods"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_payment_methods_for_user:async function({client:e}={}){const t="/user/payment/methods"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},update_org_subscription:async function({client:e,body:t}){const n="/org/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_payment_balance_for_any_org:async function({client:e,id:t,include_total_due:n,body:o}){const a=`/orgs/${t}/payment/balance`+s({include_total_due:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},update_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:n,body:o}){const a=`/users/${t}/payment/balance`+s({include_total_due:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},update_payment_information_for_org:async function({client:e,body:t}){const n="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_payment_information_for_user:async function({client:e,body:t}){const n="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_subscription:async function({client:e,body:t}){const n="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},validate_customer_tax_information_for_org:async function({client:e}={}){const t="/org/payment/tax"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},validate_customer_tax_information_for_user:async function({client:e}={}){const t="/user/payment/tax"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)}},L={create_service_account_for_org:async function({client:e,label:t}){const n="/org/service-accounts"+s({label:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_service_account_for_org:async function({client:e,token:t}){const n=`/org/service-accounts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_service_account_for_org:async function({client:e,token:t}){const n=`/org/service-accounts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_service_accounts_for_org:w,list_service_accounts_for_org_pager:function(e){return c(w,e,"page_token")}},j={create_store_coupon:async function({client:e,body:t}){const n="/store/coupon"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()}},H={get_angle_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/angle/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_area_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/area/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_current_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/current/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_energy_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/energy/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_force_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/force/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_frequency_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/frequency/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_length_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/length/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_mass_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/mass/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_power_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/power/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_pressure_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/pressure/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_temperature_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/temperature/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_torque_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/torque/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_volume_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/volume/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},R={create_user_shortlink:async function({client:e,body:t}){const n="/user/shortlinks"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_user_self:async function({client:e}={}){const t="/user"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_user_shortlink:async function({client:e,key:t}){const n=`/user/shortlinks/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_oauth2_providers_for_user:async function({client:e}={}){const t="/user/oauth2/providers"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_session_for_user:async function({client:e,token:t}){const n=`/user/session/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user:async function({client:e,id:t}){const n=`/users/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user_extended:async function({client:e,id:t}){const n=`/users-extended/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user_privacy_settings:async function({client:e}={}){const t="/user/privacy"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_self:async function({client:e}={}){const t="/user"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_self_extended:async function({client:e}={}){const t="/user/extended"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_shortlinks:P,get_user_shortlinks_pager:function(e){return c(P,e,"page_token")},list_users:m,list_users_extended:Z,list_users_extended_pager:function(e){return c(Z,e,"page_token")},list_users_pager:function(e){return c(m,e,"page_token")},patch_user_crm:async function({client:e,body:t}){const n="/user/crm"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PATCH",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_public_form:async function({client:e,body:t}){const n="/website/form"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_public_subscribe:async function({client:e,body:t}){const n="/website/subscribe"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_user_form_self:async function({client:e,body:t}){const n="/user/form"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},update_subscription_for_user:async function({client:e,id:t,body:n}){const o=`/users/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_user_privacy_settings:async function({client:e,body:t}){const n="/user/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_self:async function({client:e,body:t}){const n="/user"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_shortlink:async function({client:e,key:t,body:n}){const o=`/user/shortlinks/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);await r(O)}};export{o as ApiError,t as Client,a as Pager,S as api_calls,b as api_tokens,C as apps,c as createPager,g as executor,U as file,D as meta,B as ml,z as modeling,Y as oauth2,k as orgs,$ as payments,L as service_accounts,j as store,H as unit,R as users};
|
|
1
|
+
import{BSON as e}from"bson";try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?.node){new Function("m","return import(m)")("cross-fetch/polyfill").catch((()=>{}))}}catch{}class t{constructor(e){"string"==typeof e?this.token=e:e&&"object"==typeof e&&(this.token=e.token,this.baseUrl=e.baseUrl,this.fetch=e.fetch)}}function s(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e))if(void 0!==n)if(Array.isArray(n))for(const e of n)t.append(s,String(e));else t.append(s,String(n));const s=t.toString();return s?`?${s}`:""}function n(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e||{}))if(void 0!==n)if(Array.isArray(n))for(const e of n)t.append(s,String(e));else t.append(s,String(n));return t}try{if("undefined"!=typeof process&&process.versions?.node&&"win32"===process.platform){new Function("m","return import(m)")("win-ca")}}catch{}class o extends Error{constructor(e,t,s){super(s||t?.message||`HTTP ${e}`),this.name="ApiError",this.status=e,this.error_code=t?.error_code,this.request_id=t?.request_id,this.body=t}}async function r(e){if(e.ok)return;let t;try{t=await e.json()}catch{try{const s=await e.text();t=s?{message:s}:void 0}catch{t=void 0}}throw new o(e.status,t)}class a{started=!1;constructor(e,t,s="page_token"){this.fetchPage=e,this.baseParams={...t},this.tokenField=s}hasNext(){return!this.started||!!this.nextToken}reset(){this.started=!1,this.nextToken=void 0}async next(){if(this.started&&!this.nextToken)return[];const e={...this.baseParams};this.started&&this.nextToken&&(e[this.tokenField]=this.nextToken);const t=await this.fetchPage(e);return this.started=!0,this.nextToken=t?.next_page??null,t?.items??[]}}function c(e,t,s="page_token"){return new a(e,t,s)}async function i({client:e,limit:t,page_token:n,sort_by:o}){const a="/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function _({client:e,id:t,limit:n,page_token:o,sort_by:a}){const c=`/users/${t}/api-calls`+s({limit:n,page_token:o,sort_by:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function p({client:e,limit:t,page_token:n,sort_by:o,status:a}){const c="/async/operations"+s({limit:t,page_token:n,sort_by:o,status:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function O({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function T({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function v({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/api-tokens"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}function h(e){return!!e&&"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}class A{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/executor/term"+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}class u{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/ml/copilot"+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}class E{constructor(e){this.functionNameParams=e}async connect(){const e=`/ws/ml/reasoning/${this.functionNameParams.id}`+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}async function d({client:e,limit:t,page_token:n,sort_by:o}){const a="/ml/conversations"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function K({client:e,limit:t,page_token:n,sort_by:o}){const a="/ml-prompts"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function f({client:e,limit:t,page_token:n,sort_by:o,conversation_id:a,no_models:c}){const i="/user/text-to-cad"+s({limit:t,page_token:n,sort_by:o,conversation_id:a,no_models:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);await r(h);return await h.json()}class I{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/modeling/commands"+s({api_call_id:this.functionNameParams.api_call_id,fps:this.functionNameParams.fps,pool:this.functionNameParams.pool,post_effect:this.functionNameParams.post_effect,replay:this.functionNameParams.replay,show_grid:this.functionNameParams.show_grid,unlocked_framerate:this.functionNameParams.unlocked_framerate,video_res_height:this.functionNameParams.video_res_height,video_res_width:this.functionNameParams.video_res_width,webrtc:this.functionNameParams.webrtc}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}async function l({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/shortlinks"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function N({client:e,limit:t,page_token:n,sort_by:o,role:a}){const c="/org/members"+s({limit:t,page_token:n,sort_by:o,role:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function y({client:e,limit:t,page_token:n,sort_by:o}){const a="/orgs"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function w({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/service-accounts"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function P({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/shortlinks"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function m({client:e,limit:t,page_token:n,sort_by:o}){const a="/users"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function Z({client:e,limit:t,page_token:n,sort_by:o}){const a="/users-extended"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}const S={get_api_call:async function({client:e,id:t}){const n=`/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_for_org:async function({client:e,id:t}){const n=`/org/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_for_user:async function({client:e,id:t}){const n=`/user/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_metrics:async function({client:e,group_by:t}){const n="/api-call-metrics"+s({group_by:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_async_operation:async function({client:e,id:t}){const n=`/async/operations/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_api_calls:i,list_api_calls_for_user:_,list_api_calls_for_user_pager:function(e){return c(_,e,"page_token")},list_api_calls_pager:function(e){return c(i,e,"page_token")},list_async_operations:p,list_async_operations_pager:function(e){return c(p,e,"page_token")},org_list_api_calls:O,org_list_api_calls_pager:function(e){return c(O,e,"page_token")},user_list_api_calls:T,user_list_api_calls_pager:function(e){return c(T,e,"page_token")}},b={create_api_token_for_user:async function({client:e,label:t}){const n="/user/api-tokens"+s({label:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_api_token_for_user:async function({client:e,token:t}){const n=`/user/api-tokens/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_api_token_for_user:async function({client:e,token:t}){const n=`/user/api-tokens/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_api_tokens_for_user:v,list_api_tokens_for_user_pager:function(e){return c(v,e,"page_token")}},C={apps_github_callback:async function({client:e}={}){const t="/apps/github/callback"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},apps_github_consent:async function({client:e}={}){const t="/apps/github/consent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},apps_github_webhook:async function({client:e,body:t}){const n="/apps/github/webhook"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/octet-stream";const i={method:"POST",headers:c,body:t},_=e?.fetch||fetch,p=await _(o,i);await r(p)}},g={create_executor_term:e=>new A(e),create_file_execution:async function({client:e,lang:t,output:n,body:o}){const a=`/file/execute/${t}`+s({output:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},U={create_file_center_of_mass:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/center-of-mass"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_conversion:async function({client:e,output_format:t,src_format:n,body:o}){const a=`/file/conversion/${n}/${t}`+s({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_conversion_options:async function({client:e,files:t,body:n}){const o="/file/conversion"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},create_file_density:async function({client:e,material_mass:t,material_mass_unit:n,output_unit:o,src_format:a,body:c}){const i="/file/density"+s({material_mass:t,material_mass_unit:n,output_unit:o,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},create_file_mass:async function({client:e,material_density:t,material_density_unit:n,output_unit:o,src_format:a,body:c}){const i="/file/mass"+s({material_density:t,material_density_unit:n,output_unit:o,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},create_file_surface_area:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/surface-area"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_volume:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/volume"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},D={community_sso:async function({client:e,sig:t,sso:n}){const o="/community/sso"+s({sig:t,sso:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},create_debug_uploads:async function({client:e,files:t}){const n="/debug/uploads"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i=new FormData;t.forEach((e=>{i.append(e.name,e.data,e.name)}));const _={method:"POST",headers:c,body:i},p=e?.fetch||fetch,O=await p(o,_);return await r(O),await O.json()},create_event:async function({client:e,files:t,body:n}){const o="/events"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);await r(T)},get_ipinfo:async function({client:e}={}){const t="/_meta/ipinfo"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_pricing_subscriptions:async function({client:e}={}){const t="/pricing/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_schema:async function({client:e}={}){const t="/"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},internal_get_api_token_for_discord_user:async function({client:e,discord_id:t}){const n=`/internal/discord/api-token/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},ping:async function({client:e}={}){const t="/ping"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()}},B={create_kcl_code_completions:async function({client:e,body:t}){const n="/ml/kcl/completions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_proprietary_to_kcl:async function({client:e,files:t,code_option:n}){const o="/ml/convert/proprietary-to-kcl"+s({code_option:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)}));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},create_text_to_cad:async function({client:e,output_format:t,kcl:n,body:o}){const a=`/ai/text-to-cad/${t}`+s({kcl:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"POST",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_text_to_cad_iteration:async function({client:e,body:t}){const n="/ml/text-to-cad/iteration"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_text_to_cad_model_feedback:async function({client:e,id:t,feedback:n}){const o=`/user/text-to-cad/${t}`+s({feedback:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);await r(O)},create_text_to_cad_multi_file_iteration:async function({client:e,files:t,body:n}){const o="/ml/text-to-cad/multi-file/iteration"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},get_ml_prompt:async function({client:e,id:t}){const n=`/ml-prompts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_text_to_cad_model_for_user:async function({client:e,id:t}){const n=`/user/text-to-cad/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_conversations_for_user:d,list_conversations_for_user_pager:function(e){return c(d,e,"page_token")},list_ml_prompts:K,list_ml_prompts_pager:function(e){return c(K,e,"page_token")},list_text_to_cad_models_for_user:f,list_text_to_cad_models_for_user_pager:function(e){return c(f,e,"page_token")},ml_copilot_ws:e=>new u(e),ml_reasoning_ws:e=>new E(e)},z={modeling_commands_ws:e=>new I(e)},Y={device_access_token:async function({client:e,body:t}){const o="/oauth2/device/token"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},device_auth_confirm:async function({client:e,body:t}){const n="/oauth2/device/confirm"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},device_auth_request:async function({client:e,body:t}){const o="/oauth2/device/auth"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},device_auth_verify:async function({client:e,app_name:t,user_code:n}){const o="/oauth2/device/verify"+s({app_name:t,user_code:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},oauth2_provider_callback:async function({client:e,provider:t,code:n,id_token:o,state:a,user:c}){const i=`/oauth2/provider/${t}/callback`+s({code:n,id_token:o,state:a,user:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},oauth2_provider_callback_post:async function({client:e,provider:t,body:o}){const a=`/oauth2/provider/${t}/callback`+s({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/x-www-form-urlencoded";const p={method:"POST",headers:_,body:n(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},oauth2_provider_consent:async function({client:e,provider:t,callback_url:n}){const o=`/oauth2/provider/${t}/consent`+s({callback_url:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},oauth2_token_revoke:async function({client:e,body:t}){const o="/oauth2/token/revoke"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()}},k={create_org:async function({client:e,body:t}){const n="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_org_member:async function({client:e,body:t}){const n="/org/members"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_org_saml_idp:async function({client:e,body:t}){const n="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_org:async function({client:e}={}){const t="/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_org_member:async function({client:e,user_id:t}){const n=`/org/members/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},delete_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},get_any_org:async function({client:e,id:t}){const n=`/orgs/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_org:async function({client:e}={}){const t="/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_member:async function({client:e,user_id:t}){const n=`/org/members/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_org_privacy_settings:async function({client:e}={}){const t="/org/privacy"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_shortlinks:l,get_org_shortlinks_pager:function(e){return c(l,e,"page_token")},get_user_org:async function({client:e}={}){const t="/user/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_org_members:N,list_org_members_pager:function(e){return c(N,e,"page_token")},list_orgs:y,list_orgs_pager:function(e){return c(y,e,"page_token")},update_enterprise_pricing_for_org:async function({client:e,id:t,body:n}){const o=`/orgs/${t}/enterprise/pricing`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_org:async function({client:e,body:t}){const n="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_org_member:async function({client:e,user_id:t,body:n}){const o=`/org/members/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_org_privacy_settings:async function({client:e,body:t}){const n="/org/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_org_saml_idp:async function({client:e,body:t}){const n="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()}},$={create_org_subscription:async function({client:e,body:t}){const n="/org/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_information_for_org:async function({client:e,body:t}){const n="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_information_for_user:async function({client:e,body:t}){const n="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_intent_for_org:async function({client:e}={}){const t="/org/payment/intent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},create_payment_intent_for_user:async function({client:e}={}){const t="/user/payment/intent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},create_user_subscription:async function({client:e,body:t}){const n="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_payment_method_for_org:async function({client:e,id:t}){const n=`/org/payment/methods/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},delete_payment_method_for_user:async function({client:e,id:t}){const n=`/user/payment/methods/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_org_subscription:async function({client:e}={}){const t="/org/payment/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_payment_balance_for_any_org:async function({client:e,include_total_due:t,id:n}){const o=`/orgs/${n}/payment/balance`+s({include_total_due:t}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},get_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:n}){const o=`/users/${t}/payment/balance`+s({include_total_due:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},get_payment_balance_for_org:async function({client:e,include_total_due:t}){const n="/org/payment/balance"+s({include_total_due:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_payment_balance_for_user:async function({client:e,include_total_due:t}){const n="/user/payment/balance"+s({include_total_due:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_subscription:async function({client:e}={}){const t="/user/payment/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_invoices_for_org:async function({client:e}={}){const t="/org/payment/invoices"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_invoices_for_user:async function({client:e}={}){const t="/user/payment/invoices"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_payment_methods_for_org:async function({client:e}={}){const t="/org/payment/methods"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_payment_methods_for_user:async function({client:e}={}){const t="/user/payment/methods"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},update_org_subscription:async function({client:e,body:t}){const n="/org/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_payment_balance_for_any_org:async function({client:e,id:t,include_total_due:n,body:o}){const a=`/orgs/${t}/payment/balance`+s({include_total_due:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},update_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:n,body:o}){const a=`/users/${t}/payment/balance`+s({include_total_due:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},update_payment_information_for_org:async function({client:e,body:t}){const n="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_payment_information_for_user:async function({client:e,body:t}){const n="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_subscription:async function({client:e,body:t}){const n="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},validate_customer_tax_information_for_org:async function({client:e}={}){const t="/org/payment/tax"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},validate_customer_tax_information_for_user:async function({client:e}={}){const t="/user/payment/tax"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)}},L={create_service_account_for_org:async function({client:e,label:t}){const n="/org/service-accounts"+s({label:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_service_account_for_org:async function({client:e,token:t}){const n=`/org/service-accounts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_service_account_for_org:async function({client:e,token:t}){const n=`/org/service-accounts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_service_accounts_for_org:w,list_service_accounts_for_org_pager:function(e){return c(w,e,"page_token")}},j={create_store_coupon:async function({client:e,body:t}){const n="/store/coupon"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()}},H={get_angle_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/angle/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_area_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/area/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_current_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/current/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_energy_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/energy/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_force_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/force/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_frequency_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/frequency/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_length_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/length/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_mass_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/mass/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_power_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/power/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_pressure_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/pressure/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_temperature_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/temperature/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_torque_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/torque/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_volume_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/volume/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},R={create_user_shortlink:async function({client:e,body:t}){const n="/user/shortlinks"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_user_self:async function({client:e}={}){const t="/user"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_user_shortlink:async function({client:e,key:t}){const n=`/user/shortlinks/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_oauth2_providers_for_user:async function({client:e}={}){const t="/user/oauth2/providers"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_session_for_user:async function({client:e,token:t}){const n=`/user/session/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user:async function({client:e,id:t}){const n=`/users/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user_extended:async function({client:e,id:t}){const n=`/users-extended/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user_privacy_settings:async function({client:e}={}){const t="/user/privacy"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_self:async function({client:e}={}){const t="/user"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_self_extended:async function({client:e}={}){const t="/user/extended"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_shortlinks:P,get_user_shortlinks_pager:function(e){return c(P,e,"page_token")},list_users:m,list_users_extended:Z,list_users_extended_pager:function(e){return c(Z,e,"page_token")},list_users_pager:function(e){return c(m,e,"page_token")},patch_user_crm:async function({client:e,body:t}){const n="/user/crm"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PATCH",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_public_form:async function({client:e,body:t}){const n="/website/form"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_public_subscribe:async function({client:e,body:t}){const n="/website/subscribe"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_user_form_self:async function({client:e,body:t}){const n="/user/form"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},update_subscription_for_user:async function({client:e,id:t,body:n}){const o=`/users/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_user_privacy_settings:async function({client:e,body:t}){const n="/user/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_self:async function({client:e,body:t}){const n="/user"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_shortlink:async function({client:e,key:t,body:n}){const o=`/user/shortlinks/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);await r(O)}};export{o as ApiError,t as Client,a as Pager,S as api_calls,b as api_tokens,C as apps,c as createPager,g as executor,U as file,D as meta,B as ml,z as modeling,Y as oauth2,k as orgs,$ as payments,L as service_accounts,j as store,H as unit,R as users};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_file_conversion_options.d.ts","sourceRoot":"","sources":["../../../../../src/api/file/create_file_conversion_options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElE,UAAU,gCAAgC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,aAAK,iCAAiC,GAAG,cAAc,CAAA;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAA8B,8BAA8B,CAAC,EAC3D,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE,gCAAgC,GAAG,OAAO,CAAC,iCAAiC,CAAC,
|
|
1
|
+
{"version":3,"file":"create_file_conversion_options.d.ts","sourceRoot":"","sources":["../../../../../src/api/file/create_file_conversion_options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElE,UAAU,gCAAgC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,aAAK,iCAAiC,GAAG,cAAc,CAAA;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAA8B,8BAA8B,CAAC,EAC3D,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE,gCAAgC,GAAG,OAAO,CAAC,iCAAiC,CAAC,CA0C/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_debug_uploads.d.ts","sourceRoot":"","sources":["../../../../../src/api/meta/create_debug_uploads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAKpD,UAAU,uBAAuB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;CACd;AAED,aAAK,wBAAwB,GAAG,OAAO,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,wBAA8B,oBAAoB,CAAC,EACjD,MAAM,EACN,KAAK,GACN,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC,
|
|
1
|
+
{"version":3,"file":"create_debug_uploads.d.ts","sourceRoot":"","sources":["../../../../../src/api/meta/create_debug_uploads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAKpD,UAAU,uBAAuB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;CACd;AAED,aAAK,wBAAwB,GAAG,OAAO,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,wBAA8B,oBAAoB,CAAC,EACjD,MAAM,EACN,KAAK,GACN,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAyC7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_event.d.ts","sourceRoot":"","sources":["../../../../../src/api/meta/create_event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,IAAI,EAAE,KAAK,CAAA;CACZ;AAED,aAAK,iBAAiB,GAAG,IAAI,CAAA;AAE7B;;;;;;;;;;;;GAYG;AACH,wBAA8B,YAAY,CAAC,EACzC,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"create_event.d.ts","sourceRoot":"","sources":["../../../../../src/api/meta/create_event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,IAAI,EAAE,KAAK,CAAA;CACZ;AAED,aAAK,iBAAiB,GAAG,IAAI,CAAA;AAE7B;;;;;;;;;;;;GAYG;AACH,wBAA8B,YAAY,CAAC,EACzC,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAyC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_proprietary_to_kcl.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/create_proprietary_to_kcl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEtD,UAAU,2BAA2B;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,UAAU,CAAA;CACzB;AAED,aAAK,4BAA4B,GAAG,QAAQ,CAAA;AAE5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAA8B,yBAAyB,CAAC,EACtD,MAAM,EACN,KAAK,EACL,WAAW,GACZ,EAAE,2BAA2B,GAAG,OAAO,CAAC,4BAA4B,CAAC,
|
|
1
|
+
{"version":3,"file":"create_proprietary_to_kcl.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/create_proprietary_to_kcl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEtD,UAAU,2BAA2B;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,UAAU,CAAA;CACzB;AAED,aAAK,4BAA4B,GAAG,QAAQ,CAAA;AAE5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAA8B,yBAAyB,CAAC,EACtD,MAAM,EACN,KAAK,EACL,WAAW,GACZ,EAAE,2BAA2B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAyCrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_text_to_cad_multi_file_iteration.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/create_text_to_cad_multi_file_iteration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAChC,MAAM,iBAAiB,CAAA;AAExB,UAAU,sCAAsC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,IAAI,EAAE,+BAA+B,CAAA;CACtC;AAED,aAAK,uCAAuC,GAAG,2BAA2B,CAAA;AAE1E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAA8B,uCAAuC,CAAC,EACpE,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE,sCAAsC,GAAG,OAAO,CAAC,uCAAuC,CAAC,
|
|
1
|
+
{"version":3,"file":"create_text_to_cad_multi_file_iteration.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/create_text_to_cad_multi_file_iteration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAChC,MAAM,iBAAiB,CAAA;AAExB,UAAU,sCAAsC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,IAAI,EAAE,+BAA+B,CAAA;CACtC;AAED,aAAK,uCAAuC,GAAG,2BAA2B,CAAA;AAE1E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAA8B,uCAAuC,CAAC,EACpE,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE,sCAAsC,GAAG,OAAO,CAAC,uCAAuC,CAAC,CA2C3F"}
|