@kittycad/lib 3.1.9 → 3.1.11
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/ml/create_custom_model.d.ts +24 -0
- package/dist/types/src/api/ml/create_custom_model.d.ts.map +1 -0
- package/dist/types/src/api/ml/get_custom_model.d.ts +22 -0
- package/dist/types/src/api/ml/get_custom_model.d.ts.map +1 -0
- package/dist/types/src/api/ml/list_org_datasets_for_model.d.ts +22 -0
- package/dist/types/src/api/ml/list_org_datasets_for_model.d.ts.map +1 -0
- package/dist/types/src/api/ml/update_custom_model.d.ts +24 -0
- package/dist/types/src/api/ml/update_custom_model.d.ts.map +1 -0
- package/dist/types/src/api/orgs/create_org_dataset.d.ts +24 -0
- package/dist/types/src/api/orgs/create_org_dataset.d.ts.map +1 -0
- package/dist/types/src/api/orgs/get_org_dataset.d.ts +22 -0
- package/dist/types/src/api/orgs/get_org_dataset.d.ts.map +1 -0
- package/dist/types/src/api/orgs/get_org_dataset_conversion.d.ts +24 -0
- package/dist/types/src/api/orgs/get_org_dataset_conversion.d.ts.map +1 -0
- package/dist/types/src/api/orgs/get_org_dataset_conversion_stats.d.ts +22 -0
- package/dist/types/src/api/orgs/get_org_dataset_conversion_stats.d.ts.map +1 -0
- package/dist/types/src/api/orgs/list_org_dataset_conversions.d.ts +30 -0
- package/dist/types/src/api/orgs/list_org_dataset_conversions.d.ts.map +1 -0
- package/dist/types/src/api/orgs/list_org_datasets.d.ts +28 -0
- package/dist/types/src/api/orgs/list_org_datasets.d.ts.map +1 -0
- package/dist/types/src/api/orgs/org_dataset_s3_policies.d.ts +24 -0
- package/dist/types/src/api/orgs/org_dataset_s3_policies.d.ts.map +1 -0
- package/dist/types/src/api/orgs/rescan_org_dataset.d.ts +22 -0
- package/dist/types/src/api/orgs/rescan_org_dataset.d.ts.map +1 -0
- package/dist/types/src/api/orgs/retry_org_dataset_conversion.d.ts +24 -0
- package/dist/types/src/api/orgs/retry_org_dataset_conversion.d.ts.map +1 -0
- package/dist/types/src/api/orgs/update_enterprise_pricing_for_org.d.ts +3 -3
- package/dist/types/src/api/orgs/update_enterprise_pricing_for_org.d.ts.map +1 -1
- package/dist/types/src/api/orgs/update_org_dataset.d.ts +26 -0
- package/dist/types/src/api/orgs/update_org_dataset.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +33 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/models.d.ts +346 -15
- package/dist/types/src/models.d.ts.map +1 -1
- package/package.json +1 -1
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({conversation_id:this.functionNameParams.conversation_id,replay:this.functionNameParams.replay}),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,no_parts:i}){const _="/user/text-to-cad"+s({limit:t,page_token:n,sort_by:o,conversation_id:a,no_models:c,no_parts:i}),p=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+_,O=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",T={};O&&(T.Authorization=`Bearer ${O}`);const v={method:"GET",headers:T},h=e?.fetch||fetch,A=await h(p,v);await r(A);return await A.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 w({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 y({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_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()},create_text_to_cad_part_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)},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_part_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_parts_for_user:f,list_text_to_cad_parts_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:w,list_orgs_pager:function(e){return c(w,e,"page_token")},org_admin_details_get:async function({client:e,id:t}){const n=`/orgs/${t}/admin/details`+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()},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,force:n}){const o=`/user/payment/methods/${t}`+s({force: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:"DELETE",headers:i},p=e?.fetch||fetch,O=await p(a,_);await r(O)},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:y,list_service_accounts_for_org_pager:function(e){return c(y,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)},user_admin_details_get:async function({client:e,id:t}){const n=`/users/${t}/admin/details`+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()}};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,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 o(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 n 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 n(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:o,sort_by:n}){const a="/api-calls"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function _({client:e,id:t,limit:o,page_token:n,sort_by:a}){const c=`/users/${t}/api-calls`+s({limit:o,page_token:n,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||"",O={};_&&(O.Authorization=`Bearer ${_}`);const p={method:"GET",headers:O},T=e?.fetch||fetch,v=await T(i,p);await r(v);return await v.json()}async function O({client:e,limit:t,page_token:o,sort_by:n,status:a}){const c="/async/operations"+s({limit:t,page_token:o,sort_by:n,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||"",O={};_&&(O.Authorization=`Bearer ${_}`);const p={method:"GET",headers:O},T=e?.fetch||fetch,v=await T(i,p);await r(v);return await v.json()}async function p({client:e,limit:t,page_token:o,sort_by:n}){const a="/org/api-calls"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function T({client:e,limit:t,page_token:o,sort_by:n}){const a="/user/api-calls"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function v({client:e,limit:t,page_token:o,sort_by:n}){const a="/user/api-tokens"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);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"),o=new WebSocket(t);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.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.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({conversation_id:this.functionNameParams.conversation_id,replay:this.functionNameParams.replay}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(t);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.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.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 d{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"),o=new WebSocket(t);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.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.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 E({client:e,limit:t,page_token:o,sort_by:n}){const a="/ml/conversations"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function K({client:e,limit:t,page_token:o,sort_by:n}){const a="/ml-prompts"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function f({client:e,limit:t,page_token:o,sort_by:n,conversation_id:a,no_models:c,no_parts:i}){const _="/user/text-to-cad"+s({limit:t,page_token:o,sort_by:n,conversation_id:a,no_models:c,no_parts:i}),O=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+_,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",T={};p&&(T.Authorization=`Bearer ${p}`);const v={method:"GET",headers:T},h=e?.fetch||fetch,A=await h(O,v);await r(A);return await A.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"),o=new WebSocket(t);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.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.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:o,sort_by:n}){const a="/org/shortlinks"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function N({client:e,id:t,limit:o,page_token:n,sort_by:a}){const c=`/org/datasets/${t}/conversions`+s({limit:o,page_token:n,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||"",O={};_&&(O.Authorization=`Bearer ${_}`);const p={method:"GET",headers:O},T=e?.fetch||fetch,v=await T(i,p);await r(v);return await v.json()}async function P({client:e,limit:t,page_token:o,sort_by:n}){const a="/org/datasets"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function w({client:e,limit:t,page_token:o,sort_by:n,role:a}){const c="/org/members"+s({limit:t,page_token:o,sort_by:n,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||"",O={};_&&(O.Authorization=`Bearer ${_}`);const p={method:"GET",headers:O},T=e?.fetch||fetch,v=await T(i,p);await r(v);return await v.json()}async function y({client:e,limit:t,page_token:o,sort_by:n}){const a="/orgs"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function m({client:e,limit:t,page_token:o,sort_by:n}){const a="/org/service-accounts"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function Z({client:e,limit:t,page_token:o,sort_by:n}){const a="/user/shortlinks"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function S({client:e,limit:t,page_token:o,sort_by:n}){const a="/users"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}async function b({client:e,limit:t,page_token:o,sort_by:n}){const a="/users-extended"+s({limit:t,page_token:o,sort_by: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await r(T);return await T.json()}const g={get_api_call:async function({client:e,id:t}){const o=`/api-calls/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_api_call_for_org:async function({client:e,id:t}){const o=`/org/api-calls/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_api_call_for_user:async function({client:e,id:t}){const o=`/user/api-calls/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_api_call_metrics:async function({client:e,group_by:t}){const o="/api-call-metrics"+s({group_by:t}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_async_operation:async function({client:e,id:t}){const o=`/async/operations/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.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:O,list_async_operations_pager:function(e){return c(O,e,"page_token")},org_list_api_calls:p,org_list_api_calls_pager:function(e){return c(p,e,"page_token")},user_list_api_calls:T,user_list_api_calls_pager:function(e){return c(T,e,"page_token")}},C={create_api_token_for_user:async function({client:e,label:t}){const o="/user/api-tokens"+s({label:t}),n=(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,O=await _(n,i);return await r(O),await O.json()},delete_api_token_for_user:async function({client:e,token:t}){const o=`/user/api-tokens/${t}`+s({}),n=(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,O=await _(n,i);await r(O)},get_api_token_for_user:async function({client:e,token:t}){const o=`/user/api-tokens/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},list_api_tokens_for_user:v,list_api_tokens_for_user_pager:function(e){return c(v,e,"page_token")}},U={apps_github_callback:async function({client:e}={}){const t="/apps/github/callback"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await r(_)},apps_github_consent:async function({client:e}={}){const t="/apps/github/consent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},apps_github_webhook:async function({client:e,body:t}){const o="/apps/github/webhook"+s({}),n=(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:t},_=e?.fetch||fetch,O=await _(n,i);await r(O)}},D={create_executor_term:e=>new A(e),create_file_execution:async function({client:e,lang:t,output:o,body:n}){const a=`/file/execute/${t}`+s({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 O={method:"POST",headers:_,body:n},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()}},B={create_file_center_of_mass:async function({client:e,output_unit:t,src_format:o,body:n}){const a="/file/center-of-mass"+s({output_unit:t,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 O={method:"POST",headers:_,body:n},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},create_file_conversion:async function({client:e,output_format:t,src_format:o,body:n}){const a=`/file/conversion/${o}/${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 O={method:"POST",headers:_,body:n},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},create_file_conversion_options:async function({client:e,files:t,body:o}){const n="/file/conversion"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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(o));const O={method:"POST",headers:i,body:_},p=e?.fetch||fetch,T=await p(a,O);return await r(T),await T.json()},create_file_density:async function({client:e,material_mass:t,material_mass_unit:o,output_unit:n,src_format:a,body:c}){const i="/file/density"+s({material_mass:t,material_mass_unit:o,output_unit:n,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,O=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};O&&(p.Authorization=`Bearer ${O}`),p["Content-Type"]="application/octet-stream";const T={method:"POST",headers:p,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:o,output_unit:n,src_format:a,body:c}){const i="/file/mass"+s({material_density:t,material_density_unit:o,output_unit:n,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,O=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};O&&(p.Authorization=`Bearer ${O}`),p["Content-Type"]="application/octet-stream";const T={method:"POST",headers:p,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:o,body:n}){const a="/file/surface-area"+s({output_unit:t,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 O={method:"POST",headers:_,body:n},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},create_file_volume:async function({client:e,output_unit:t,src_format:o,body:n}){const a="/file/volume"+s({output_unit:t,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 O={method:"POST",headers:_,body:n},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()}},z={community_sso:async function({client:e,sig:t,sso:o}){const n="/community/sso"+s({sig:t,sso:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},create_debug_uploads:async function({client:e,files:t}){const o="/debug/uploads"+s({}),n=(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;t.forEach((e=>{i.append(e.name,e.data,e.name)}));const _={method:"POST",headers:c,body:i},O=e?.fetch||fetch,p=await O(n,_);return await r(p),await p.json()},create_event:async function({client:e,files:t,body:o}){const n="/events"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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(o));const O={method:"POST",headers:i,body:_},p=e?.fetch||fetch,T=await p(a,O);await r(T)},get_ipinfo:async function({client:e}={}){const t="/_meta/ipinfo"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_pricing_subscriptions:async function({client:e}={}){const t="/pricing/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_schema:async function({client:e}={}){const t="/"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},internal_get_api_token_for_discord_user:async function({client:e,discord_id:t}){const o=`/internal/discord/api-token/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},ping:async function({client:e}={}){const t="/ping"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()}},Y={create_custom_model:async function({client:e,body:t}){const o="/ml/custom/models"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},create_kcl_code_completions:async function({client:e,body:t}){const o="/ml/kcl/completions"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},create_proprietary_to_kcl:async function({client:e,files:t,code_option:o}){const n="/ml/convert/proprietary-to-kcl"+s({code_option:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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 O={method:"POST",headers:i,body:_},p=e?.fetch||fetch,T=await p(a,O);return await r(T),await T.json()},create_text_to_cad:async function({client:e,output_format:t,kcl:o,body:n}){const a=`/ai/text-to-cad/${t}`+s({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 O={method:"POST",headers:_,body:JSON.stringify(n)},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},create_text_to_cad_iteration:async function({client:e,body:t}){const o="/ml/text-to-cad/iteration"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},create_text_to_cad_multi_file_iteration:async function({client:e,files:t,body:o}){const n="/ml/text-to-cad/multi-file/iteration"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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(o));const O={method:"POST",headers:i,body:_},p=e?.fetch||fetch,T=await p(a,O);return await r(T),await T.json()},create_text_to_cad_part_feedback:async function({client:e,id:t,feedback:o}){const n=`/user/text-to-cad/${t}`+s({feedback:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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},O=e?.fetch||fetch,p=await O(a,_);await r(p)},get_custom_model:async function({client:e,id:t}){const o=`/ml/custom/models/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_ml_prompt:async function({client:e,id:t}){const o=`/ml-prompts/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_text_to_cad_part_for_user:async function({client:e,id:t}){const o=`/user/text-to-cad/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},list_conversations_for_user:E,list_conversations_for_user_pager:function(e){return c(E,e,"page_token")},list_ml_prompts:K,list_ml_prompts_pager:function(e){return c(K,e,"page_token")},list_org_datasets_for_model:async function({client:e,id:t}){const o=`/ml/custom/models/${t}/datasets`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},list_text_to_cad_parts_for_user:f,list_text_to_cad_parts_for_user_pager:function(e){return c(f,e,"page_token")},ml_copilot_ws:e=>new u(e),ml_reasoning_ws:e=>new d(e),update_custom_model:async function({client:e,id:t,body:o}){const n=`/ml/custom/models/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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)},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()}},k={modeling_commands_ws:e=>new I(e)},$={device_access_token:async function({client:e,body:t}){const n="/oauth2/device/token"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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:o(t)},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},device_auth_confirm:async function({client:e,body:t}){const o="/oauth2/device/confirm"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);await r(O)},device_auth_request:async function({client:e,body:t}){const n="/oauth2/device/auth"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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:o(t)},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},device_auth_verify:async function({client:e,app_name:t,user_code:o}){const n="/oauth2/device/verify"+s({app_name:t,user_code:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},oauth2_provider_callback:async function({client:e,provider:t,code:o,id_token:n,state:a,user:c}){const i=`/oauth2/provider/${t}/callback`+s({code:o,id_token:n,state:a,user:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,O=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};O&&(p.Authorization=`Bearer ${O}`);const T={method:"GET",headers:p},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:n}){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 O={method:"POST",headers:_,body:o(n)},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},oauth2_provider_consent:async function({client:e,provider:t,callback_url:o}){const n=`/oauth2/provider/${t}/consent`+s({callback_url:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},oauth2_token_revoke:async function({client:e,body:t}){const n="/oauth2/token/revoke"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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:o(t)},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()}},L={create_org:async function({client:e,body:t}){const o="/org"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},create_org_dataset:async function({client:e,body:t}){const o="/org/datasets"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},create_org_member:async function({client:e,body:t}){const o="/org/members"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},create_org_saml_idp:async function({client:e,body:t}){const o="/org/saml/idp"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},delete_org:async function({client:e}={}){const t="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await r(_)},delete_org_member:async function({client:e,user_id:t}){const o=`/org/members/${t}`+s({}),n=(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,O=await _(n,i);await r(O)},delete_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await r(_)},get_any_org:async function({client:e,id:t}){const o=`/orgs/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_org:async function({client:e}={}){const t="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_org_dataset:async function({client:e,id:t}){const o=`/org/datasets/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_org_dataset_conversion:async function({client:e,conversion_id:t,id:o}){const n=`/org/datasets/${o}/conversions/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},get_org_dataset_conversion_stats:async function({client:e,id:t}){const o=`/org/datasets/${t}/stats`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_org_member:async function({client:e,user_id:t}){const o=`/org/members/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_org_privacy_settings:async function({client:e}={}){const t="/org/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,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({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},list_org_dataset_conversions:N,list_org_dataset_conversions_pager:function(e){return c(N,e,"page_token")},list_org_datasets:P,list_org_datasets_pager:function(e){return c(P,e,"page_token")},list_org_members:w,list_org_members_pager:function(e){return c(w,e,"page_token")},list_orgs:y,list_orgs_pager:function(e){return c(y,e,"page_token")},org_admin_details_get:async function({client:e,id:t}){const o=`/orgs/${t}/admin/details`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},org_dataset_s3_policies:async function({client:e,role_arn:t,uri:o}){const n="/org/dataset/s3/policies"+s({role_arn:t,uri:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},rescan_org_dataset:async function({client:e,id:t}){const o=`/org/datasets/${t}/rescan`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},retry_org_dataset_conversion:async function({client:e,conversion_id:t,id:o}){const n=`/org/datasets/${o}/conversions/${t}/retry`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},update_enterprise_pricing_for_org:async function({client:e,id:t,body:o}){const n=`/orgs/${t}/enterprise/pricing`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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)},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},update_org:async function({client:e,body:t}){const o="/org"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},update_org_dataset:async function({client:e,id:t,body:o}){const n=`/org/datasets/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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)},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},update_org_member:async function({client:e,user_id:t,body:o}){const n=`/org/members/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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)},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},update_org_privacy_settings:async function({client:e,body:t}){const o="/org/privacy"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},update_org_saml_idp:async function({client:e,body:t}){const o="/org/saml/idp"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()}},j={create_org_subscription:async function({client:e,body:t}){const o="/org/payment/subscriptions"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},create_payment_information_for_org:async function({client:e,body:t}){const o="/org/payment"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},create_payment_information_for_user:async function({client:e,body:t}){const o="/user/payment"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},create_payment_intent_for_org:async function({client:e}={}){const t="/org/payment/intent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},create_payment_intent_for_user:async function({client:e}={}){const t="/user/payment/intent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},create_user_subscription:async function({client:e,body:t}){const o="/user/payment/subscriptions"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},delete_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await r(_)},delete_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await r(_)},delete_payment_method_for_org:async function({client:e,id:t}){const o=`/org/payment/methods/${t}`+s({}),n=(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,O=await _(n,i);await r(O)},delete_payment_method_for_user:async function({client:e,id:t,force:o}){const n=`/user/payment/methods/${t}`+s({force:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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:"DELETE",headers:i},O=e?.fetch||fetch,p=await O(a,_);await r(p)},get_org_subscription:async function({client:e}={}){const t="/org/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_payment_balance_for_any_org:async function({client:e,include_total_due:t,id:o}){const n=`/orgs/${o}/payment/balance`+s({include_total_due:t}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},get_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:o}){const n=`/users/${t}/payment/balance`+s({include_total_due:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},get_payment_balance_for_org:async function({client:e,include_total_due:t}){const o="/org/payment/balance"+s({include_total_due:t}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_payment_balance_for_user:async function({client:e,include_total_due:t}){const o="/user/payment/balance"+s({include_total_due:t}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_user_subscription:async function({client:e}={}){const t="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},list_invoices_for_org:async function({client:e}={}){const t="/org/payment/invoices"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},list_invoices_for_user:async function({client:e}={}){const t="/user/payment/invoices"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},list_payment_methods_for_org:async function({client:e}={}){const t="/org/payment/methods"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},list_payment_methods_for_user:async function({client:e}={}){const t="/user/payment/methods"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},update_org_subscription:async function({client:e,body:t}){const o="/org/payment/subscriptions"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},update_payment_balance_for_any_org:async function({client:e,id:t,include_total_due:o,body:n}){const a=`/orgs/${t}/payment/balance`+s({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 O={method:"PUT",headers:_,body:JSON.stringify(n)},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},update_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:o,body:n}){const a=`/users/${t}/payment/balance`+s({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 O={method:"PUT",headers:_,body:JSON.stringify(n)},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},update_payment_information_for_org:async function({client:e,body:t}){const o="/org/payment"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},update_payment_information_for_user:async function({client:e,body:t}){const o="/user/payment"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},update_user_subscription:async function({client:e,body:t}){const o="/user/payment/subscriptions"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},validate_customer_tax_information_for_org:async function({client:e}={}){const t="/org/payment/tax"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await r(_)},validate_customer_tax_information_for_user:async function({client:e}={}){const t="/user/payment/tax"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await r(_)}},H={create_service_account_for_org:async function({client:e,label:t}){const o="/org/service-accounts"+s({label:t}),n=(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,O=await _(n,i);return await r(O),await O.json()},delete_service_account_for_org:async function({client:e,token:t}){const o=`/org/service-accounts/${t}`+s({}),n=(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,O=await _(n,i);await r(O)},get_service_account_for_org:async function({client:e,token:t}){const o=`/org/service-accounts/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},list_service_accounts_for_org:m,list_service_accounts_for_org_pager:function(e){return c(m,e,"page_token")}},R={create_store_coupon:async function({client:e,body:t}){const o="/store/coupon"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()}},G={get_angle_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/angle/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_area_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/area/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_current_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/current/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_energy_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/energy/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_force_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/force/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_frequency_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/frequency/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_length_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/length/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_mass_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/mass/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_power_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/power/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_pressure_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/pressure/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_temperature_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/temperature/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_torque_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/torque/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()},get_volume_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:n}){const a=`/unit/conversion/volume/${t}/${o}`+s({value: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}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await r(T),await T.json()}},J={create_user_shortlink:async function({client:e,body:t}){const o="/user/shortlinks"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},delete_user_self:async function({client:e}={}){const t="/user"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await r(_)},delete_user_shortlink:async function({client:e,key:t}){const o=`/user/shortlinks/${t}`+s({}),n=(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,O=await _(n,i);await r(O)},get_oauth2_providers_for_user:async function({client:e}={}){const t="/user/oauth2/providers"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_session_for_user:async function({client:e,token:t}){const o=`/user/session/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_user:async function({client:e,id:t}){const o=`/users/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_user_extended:async function({client:e,id:t}){const o=`/users-extended/${t}`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()},get_user_privacy_settings:async function({client:e}={}){const t="/user/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_user_self:async function({client:e}={}){const t="/user"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_user_self_extended:async function({client:e}={}){const t="/user/extended"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,n=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};n&&(a.Authorization=`Bearer ${n}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await r(_),await _.json()},get_user_shortlinks:Z,get_user_shortlinks_pager:function(e){return c(Z,e,"page_token")},list_users:S,list_users_extended:b,list_users_extended_pager:function(e){return c(b,e,"page_token")},list_users_pager:function(e){return c(S,e,"page_token")},patch_user_crm:async function({client:e,body:t}){const o="/user/crm"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);await r(O)},put_public_form:async function({client:e,body:t}){const o="/website/form"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);await r(O)},put_public_subscribe:async function({client:e,body:t}){const o="/website/subscribe"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);await r(O)},put_user_form_self:async function({client:e,body:t}){const o="/user/form"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);await r(O)},update_subscription_for_user:async function({client:e,id:t,body:o}){const n=`/users/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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)},O=e?.fetch||fetch,p=await O(a,_);return await r(p),await p.json()},update_user_privacy_settings:async function({client:e,body:t}){const o="/user/privacy"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},update_user_self:async function({client:e,body:t}){const o="/user"+s({}),n=(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(t)},_=e?.fetch||fetch,O=await _(n,i);return await r(O),await O.json()},update_user_shortlink:async function({client:e,key:t,body:o}){const n=`/user/shortlinks/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,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)},O=e?.fetch||fetch,p=await O(a,_);await r(p)},user_admin_details_get:async function({client:e,id:t}){const o=`/users/${t}/admin/details`+s({}),n=(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,O=await _(n,i);return await r(O),await O.json()}};export{n as ApiError,t as Client,a as Pager,g as api_calls,C as api_tokens,U as apps,c as createPager,D as executor,B as file,z as meta,Y as ml,k as modeling,$ as oauth2,L as orgs,j as payments,H as service_accounts,R as store,G as unit,J as users};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Client } from '../../client.js';
|
|
2
|
+
import { CustomModel, CreateCustomModel } from '../../models.js';
|
|
3
|
+
interface CreateCustomModelInput {
|
|
4
|
+
client?: Client;
|
|
5
|
+
body: CreateCustomModel;
|
|
6
|
+
}
|
|
7
|
+
declare type CreateCustomModelReturn = CustomModel;
|
|
8
|
+
/**
|
|
9
|
+
* Create a custom ML model that is backed by one or more org datasets.
|
|
10
|
+
*
|
|
11
|
+
* Dataset readiness is enforced via `OrgDatasetFileConversion::status_counts_for_datasets`: - At least one conversion must have status `success`. - No conversions may remain in `queued`. If even a single file is still queued the dataset is treated as “not ready for training.” - A dataset consisting only of `canceled` or `error_*` entries is rejected because there’s nothing usable.
|
|
12
|
+
*
|
|
13
|
+
* Tags: ml
|
|
14
|
+
*
|
|
15
|
+
* @param params Function parameters.
|
|
16
|
+
* @property {Client} [client] Optional client with auth token.
|
|
17
|
+
* @property {CreateCustomModel} body Request body payload
|
|
18
|
+
* @returns {Promise<CreateCustomModelReturn>} successful creation
|
|
19
|
+
*
|
|
20
|
+
* Possible return types: CustomModel
|
|
21
|
+
*/
|
|
22
|
+
export default function create_custom_model({ client, body, }: CreateCustomModelInput): Promise<CreateCustomModelReturn>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=create_custom_model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_custom_model.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/create_custom_model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEhE,UAAU,sBAAsB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,iBAAiB,CAAA;CACxB;AAED,aAAK,uBAAuB,GAAG,WAAW,CAAA;AAE1C;;;;;;;;;;;;;GAaG;AACH,wBAA8B,mBAAmB,CAAC,EAChD,MAAM,EACN,IAAI,GACL,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAoC3D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Client } from '../../client.js';
|
|
2
|
+
import { CustomModel, Uuid } from '../../models.js';
|
|
3
|
+
interface GetCustomModelInput {
|
|
4
|
+
client?: Client;
|
|
5
|
+
id: Uuid;
|
|
6
|
+
}
|
|
7
|
+
declare type GetCustomModelReturn = CustomModel;
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve the details of a single custom ML model so long as it belongs to the caller’s organization.
|
|
10
|
+
*
|
|
11
|
+
* Tags: ml
|
|
12
|
+
*
|
|
13
|
+
* @param params Function parameters.
|
|
14
|
+
* @property {Client} [client] Optional client with auth token.
|
|
15
|
+
* @property {Uuid} id The identifier. (path)
|
|
16
|
+
* @returns {Promise<GetCustomModelReturn>} successful operation
|
|
17
|
+
*
|
|
18
|
+
* Possible return types: CustomModel
|
|
19
|
+
*/
|
|
20
|
+
export default function get_custom_model({ client, id, }: GetCustomModelInput): Promise<GetCustomModelReturn>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=get_custom_model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_custom_model.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/get_custom_model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEnD,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,EAAE,EAAE,IAAI,CAAA;CACT;AAED,aAAK,oBAAoB,GAAG,WAAW,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,wBAA8B,gBAAgB,CAAC,EAC7C,MAAM,EACN,EAAE,GACH,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAkCrD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Client } from '../../client.js';
|
|
2
|
+
import { OrgDataset, Uuid } from '../../models.js';
|
|
3
|
+
interface ListOrgDatasetsForModelInput {
|
|
4
|
+
client?: Client;
|
|
5
|
+
id: Uuid;
|
|
6
|
+
}
|
|
7
|
+
declare type ListOrgDatasetsForModelReturn = OrgDataset[];
|
|
8
|
+
/**
|
|
9
|
+
* List the org datasets that are currently attached to a custom ML model owned by the caller’s organization.
|
|
10
|
+
*
|
|
11
|
+
* Tags: ml
|
|
12
|
+
*
|
|
13
|
+
* @param params Function parameters.
|
|
14
|
+
* @property {Client} [client] Optional client with auth token.
|
|
15
|
+
* @property {Uuid} id The identifier. (path)
|
|
16
|
+
* @returns {Promise<ListOrgDatasetsForModelReturn>} successful operation
|
|
17
|
+
*
|
|
18
|
+
* Possible return types: OrgDataset[]
|
|
19
|
+
*/
|
|
20
|
+
export default function list_org_datasets_for_model({ client, id, }: ListOrgDatasetsForModelInput): Promise<ListOrgDatasetsForModelReturn>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=list_org_datasets_for_model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list_org_datasets_for_model.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/list_org_datasets_for_model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAElD,UAAU,4BAA4B;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,EAAE,EAAE,IAAI,CAAA;CACT;AAED,aAAK,6BAA6B,GAAG,UAAU,EAAE,CAAA;AAEjD;;;;;;;;;;;GAWG;AACH,wBAA8B,2BAA2B,CAAC,EACxD,MAAM,EACN,EAAE,GACH,EAAE,4BAA4B,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAkCvE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Client } from '../../client.js';
|
|
2
|
+
import { CustomModel, Uuid, UpdateCustomModel } from '../../models.js';
|
|
3
|
+
interface UpdateCustomModelInput {
|
|
4
|
+
client?: Client;
|
|
5
|
+
id: Uuid;
|
|
6
|
+
body: UpdateCustomModel;
|
|
7
|
+
}
|
|
8
|
+
declare type UpdateCustomModelReturn = CustomModel;
|
|
9
|
+
/**
|
|
10
|
+
* Update mutable metadata (name, system prompt) for a custom ML model owned by the caller's organization.
|
|
11
|
+
*
|
|
12
|
+
* Tags: ml
|
|
13
|
+
*
|
|
14
|
+
* @param params Function parameters.
|
|
15
|
+
* @property {Client} [client] Optional client with auth token.
|
|
16
|
+
* @property {Uuid} id The identifier. (path)
|
|
17
|
+
* @property {UpdateCustomModel} body Request body payload
|
|
18
|
+
* @returns {Promise<UpdateCustomModelReturn>} successful operation
|
|
19
|
+
*
|
|
20
|
+
* Possible return types: CustomModel
|
|
21
|
+
*/
|
|
22
|
+
export default function update_custom_model({ client, id, body, }: UpdateCustomModelInput): Promise<UpdateCustomModelReturn>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=update_custom_model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update_custom_model.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/update_custom_model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEtE,UAAU,sBAAsB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,EAAE,EAAE,IAAI,CAAA;IACR,IAAI,EAAE,iBAAiB,CAAA;CACxB;AAED,aAAK,uBAAuB,GAAG,WAAW,CAAA;AAE1C;;;;;;;;;;;;GAYG;AACH,wBAA8B,mBAAmB,CAAC,EAChD,MAAM,EACN,EAAE,EACF,IAAI,GACL,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAoC3D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Client } from '../../client.js';
|
|
2
|
+
import { OrgDataset, CreateOrgDataset } from '../../models.js';
|
|
3
|
+
interface CreateOrgDatasetInput {
|
|
4
|
+
client?: Client;
|
|
5
|
+
body: CreateOrgDataset;
|
|
6
|
+
}
|
|
7
|
+
declare type CreateOrgDatasetReturn = OrgDataset;
|
|
8
|
+
/**
|
|
9
|
+
* Register a new S3 dataset that Zoo can assume into on behalf of the caller's org.
|
|
10
|
+
*
|
|
11
|
+
* If the dataset lives in S3, call `/org/dataset/s3/policies` first so you can generate the trust, permission, and bucket policies scoped to your dataset before invoking this endpoint.
|
|
12
|
+
*
|
|
13
|
+
* Tags: orgs
|
|
14
|
+
*
|
|
15
|
+
* @param params Function parameters.
|
|
16
|
+
* @property {Client} [client] Optional client with auth token.
|
|
17
|
+
* @property {CreateOrgDataset} body Request body payload
|
|
18
|
+
* @returns {Promise<CreateOrgDatasetReturn>} successful creation
|
|
19
|
+
*
|
|
20
|
+
* Possible return types: OrgDataset
|
|
21
|
+
*/
|
|
22
|
+
export default function create_org_dataset({ client, body, }: CreateOrgDatasetInput): Promise<CreateOrgDatasetReturn>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=create_org_dataset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_org_dataset.d.ts","sourceRoot":"","sources":["../../../../../src/api/orgs/create_org_dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAE9D,UAAU,qBAAqB;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,aAAK,sBAAsB,GAAG,UAAU,CAAA;AAExC;;;;;;;;;;;;;GAaG;AACH,wBAA8B,kBAAkB,CAAC,EAC/C,MAAM,EACN,IAAI,GACL,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAoCzD"}
|