@kittycad/lib 3.1.23 → 3.1.25
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/__tests__/gen/orgs-retrigger_org_dataset.test.d.ts +2 -0
- package/dist/types/__tests__/gen/orgs-retrigger_org_dataset.test.d.ts.map +1 -0
- package/dist/types/__tests__/gen/orgs-retrigger_org_dataset_conversion.test.d.ts +2 -0
- package/dist/types/__tests__/gen/orgs-retrigger_org_dataset_conversion.test.d.ts.map +1 -0
- package/dist/types/__tests__/gen/orgs-search_org_dataset_conversions.test.d.ts +2 -0
- package/dist/types/__tests__/gen/orgs-search_org_dataset_conversions.test.d.ts.map +1 -0
- package/dist/types/__tests__/gen/orgs-upload_org_dataset_files.test.d.ts +2 -0
- package/dist/types/__tests__/gen/orgs-upload_org_dataset_files.test.d.ts.map +1 -0
- package/dist/types/src/api/orgs/create_org_dataset.d.ts +1 -1
- package/dist/types/src/api/orgs/get_org_dataset_conversion.d.ts +2 -0
- package/dist/types/src/api/orgs/get_org_dataset_conversion.d.ts.map +1 -1
- package/dist/types/src/api/orgs/list_org_dataset_conversions.d.ts +5 -1
- package/dist/types/src/api/orgs/list_org_dataset_conversions.d.ts.map +1 -1
- package/dist/types/src/api/orgs/retrigger_org_dataset.d.ts +24 -0
- package/dist/types/src/api/orgs/retrigger_org_dataset.d.ts.map +1 -0
- package/dist/types/src/api/orgs/retrigger_org_dataset_conversion.d.ts +22 -0
- package/dist/types/src/api/orgs/retrigger_org_dataset_conversion.d.ts.map +1 -0
- package/dist/types/src/api/orgs/search_org_dataset_conversions.d.ts +34 -0
- package/dist/types/src/api/orgs/search_org_dataset_conversions.d.ts.map +1 -0
- package/dist/types/src/api/orgs/upload_org_dataset_files.d.ts +27 -0
- package/dist/types/src/api/orgs/upload_org_dataset_files.d.ts.map +1 -0
- package/dist/types/src/api/service-accounts/create_service_account_for_org.d.ts +1 -1
- package/dist/types/src/api/service-accounts/delete_service_account_for_org.d.ts +1 -1
- package/dist/types/src/api/service-accounts/get_service_account_for_org.d.ts +1 -1
- package/dist/types/src/api/service-accounts/list_service_accounts_for_org.d.ts +1 -1
- package/dist/types/src/index.d.ts +11 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/models.d.ts +372 -21
- package/dist/types/src/models.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/types/src/api/orgs/rescan_org_dataset.d.ts +0 -22
- package/dist/types/src/api/orgs/rescan_org_dataset.d.ts.map +0 -1
- package/dist/types/src/api/orgs/retry_org_dataset_conversion.d.ts +0 -24
- package/dist/types/src/api/orgs/retry_org_dataset_conversion.d.ts.map +0 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("bson");try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?.node){new Function("m","return import(m)")("cross-fetch/polyfill").catch((()=>{}))}}catch{}function s(e){const s=new URLSearchParams;for(const[t,o]of Object.entries(e))if(void 0!==o)if(Array.isArray(o))for(const e of o)s.append(t,String(e));else s.append(t,String(o));const t=s.toString();return t?`?${t}`:""}function t(e){const s=new URLSearchParams;for(const[t,o]of Object.entries(e||{}))if(void 0!==o)if(Array.isArray(o))for(const e of o)s.append(t,String(e));else s.append(t,String(o));return s}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,s,t){super(t||s?.message||`HTTP ${e}`),this.name="ApiError",this.status=e,this.error_code=s?.error_code,this.request_id=s?.request_id,this.body=s}}async function n(e){if(e.ok)return;let s;try{s=await e.json()}catch{try{const t=await e.text();s=t?{message:t}:void 0}catch{s=void 0}}throw new o(e.status,s)}class r{started=!1;constructor(e,s,t="page_token"){this.fetchPage=e,this.baseParams={...s},this.tokenField=t}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 s=await this.fetchPage(e);return this.started=!0,this.nextToken=s?.next_page??null,s?.items??[]}}function a(e,s,t="page_token"){return new r(e,s,t)}async function c({client:e,limit:t,page_token:o,sort_by:r}){const a="/api-calls"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function i({client:e,id:t,limit:o,page_token:r,sort_by:a}){const c=`/users/${t}/api-calls`+s({limit:o,page_token:r,sort_by:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function _({client:e,limit:t,page_token:o,sort_by:r,status:a}){const c="/async/operations"+s({limit:t,page_token:o,sort_by:r,status:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function p({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/api-calls"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function O({client:e,limit:t,page_token:o,sort_by:r}){const a="/user/api-calls"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function T({client:e,limit:t,page_token:o,sort_by:r}){const a="/user/api-tokens"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}function v(e){return!!e&&"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}class h{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/executor/term"+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,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),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(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(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(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}class A{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/ml/copilot"+s({conversation_id:this.functionNameParams.conversation_id,replay:this.functionNameParams.replay,pr:this.functionNameParams.pr}),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,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),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(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(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(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}class u{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,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),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(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(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(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}async function d({client:e,limit:t,page_token:o,sort_by:r}){const a="/ml/conversations"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function E({client:e,limit:t,page_token:o,sort_by:r}){const a="/ml-prompts"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function K({client:e,limit:t,page_token:o,sort_by:r,conversation_id:a,no_models:c,no_parts:i}){const _="/user/text-to-cad"+s({limit:t,page_token:o,sort_by:r,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 n(A);return await A.json()}class f{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,order_independent_transparency:this.functionNameParams.order_independent_transparency,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,pr:this.functionNameParams.pr}),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,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),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(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(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(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}async function I({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/shortlinks"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function l({client:e,id:t,limit:o,page_token:r,sort_by:a}){const c=`/org/datasets/${t}/conversions`+s({limit:o,page_token:r,sort_by:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function N({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/datasets"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function P({client:e,limit:t,page_token:o,sort_by:r,role:a}){const c="/org/members"+s({limit:t,page_token:o,sort_by:r,role:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function w({client:e,limit:t,page_token:o,sort_by:r}){const a="/orgs"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function y({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/service-accounts"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function m({client:e,limit:t,page_token:o,sort_by:r}){const a="/user/shortlinks"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function Z({client:e,limit:t,page_token:o,sort_by:r}){const a="/users"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function S({client:e,limit:t,page_token:o,sort_by:r}){const a="/users-extended"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}const b={get_api_call:async function({client:e,id:t}){const o=`/api-calls/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_for_org:async function({client:e,id:t}){const o=`/org/api-calls/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_for_user:async function({client:e,id:t}){const o=`/user/api-calls/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_metrics:async function({client:e,group_by:t}){const o="/api-call-metrics"+s({group_by:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_async_operation:async function({client:e,id:t}){const o=`/async/operations/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_api_calls:c,list_api_calls_for_user:i,list_api_calls_for_user_pager:function(e){return a(i,e,"page_token")},list_api_calls_pager:function(e){return a(c,e,"page_token")},list_async_operations:_,list_async_operations_pager:function(e){return a(_,e,"page_token")},org_list_api_calls:p,org_list_api_calls_pager:function(e){return a(p,e,"page_token")},user_list_api_calls:O,user_list_api_calls_pager:function(e){return a(O,e,"page_token")}},C={create_api_token_for_user:async function({client:e,label:t}){const o="/user/api-tokens"+s({label:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_api_token_for_user:async function({client:e,token:t}){const o=`/user/api-tokens/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_api_token_for_user:async function({client:e,token:t}){const o=`/user/api-tokens/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_api_tokens_for_user:T,list_api_tokens_for_user_pager:function(e){return a(T,e,"page_token")}},g={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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},apps_github_consent:async function({client:e}={}){const t="/apps/github/consent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},apps_github_webhook:async function({client:e,body:t}){const o="/apps/github/webhook"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/octet-stream";const i={method:"POST",headers:c,body:t},_=e?.fetch||fetch,p=await _(r,i);await n(p)}},B={create_executor_term:e=>new h(e),create_file_execution:async function({client:e,lang:t,output:o,body:r}){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 p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},U={create_file_center_of_mass:async function({client:e,output_unit:t,src_format:o,body:r}){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 p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_conversion:async function({client:e,output_format:t,src_format:o,body:r}){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 p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_conversion_options:async function({client:e,files:t,body:o}){const r="/file/conversion"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await n(T),await T.json()},create_file_density:async function({client:e,material_mass:t,material_mass_unit:o,output_unit:r,src_format:a,body:c}){const i="/file/density"+s({material_mass:t,material_mass_unit:o,output_unit:r,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},create_file_mass:async function({client:e,material_density:t,material_density_unit:o,output_unit:r,src_format:a,body:c}){const i="/file/mass"+s({material_density:t,material_density_unit:o,output_unit:r,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},create_file_surface_area:async function({client:e,output_unit:t,src_format:o,body:r}){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 p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_volume:async function({client:e,output_unit:t,src_format:o,body:r}){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 p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},D={community_sso:async function({client:e,sig:t,sso:o}){const r="/community/sso"+s({sig:t,sso:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},create_debug_uploads:async function({client:e,files:t}){const o="/debug/uploads"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i=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(r,_);return await n(O),await O.json()},create_event:async function({client:e,files:t,body:o}){const r="/events"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);await n(T)},get_ipinfo:async function({client:e}={}){const t="/_meta/ipinfo"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_pricing_subscriptions:async function({client:e}={}){const t="/pricing/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_schema:async function({client:e}={}){const t="/"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},internal_get_api_token_for_discord_user:async function({client:e,discord_id:t}){const o=`/internal/discord/api-token/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()}},z={create_custom_model:async function({client:e,body:t}){const o="/ml/custom/models"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_kcl_code_completions:async function({client:e,body:t}){const o="/ml/kcl/completions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_proprietary_to_kcl:async function({client:e,files:t,code_option:o}){const r="/ml/convert/proprietary-to-kcl"+s({code_option:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;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 n(T),await T.json()},create_text_to_cad:async function({client:e,output_format:t,kcl:o,body:r}){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 p={method:"POST",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_text_to_cad_iteration:async function({client:e,body:t}){const o="/ml/text-to-cad/iteration"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_text_to_cad_multi_file_iteration:async function({client:e,files:t,body:o}){const r="/ml/text-to-cad/multi-file/iteration"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await n(T),await T.json()},create_text_to_cad_part_feedback:async function({client:e,id:t,feedback:o}){const r=`/user/text-to-cad/${t}`+s({feedback:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);await n(O)},get_custom_model:async function({client:e,id:t}){const o=`/ml/custom/models/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_ml_prompt:async function({client:e,id:t}){const o=`/ml-prompts/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_text_to_cad_part_for_user:async function({client:e,id:t}){const o=`/user/text-to-cad/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_conversations_for_user:d,list_conversations_for_user_pager:function(e){return a(d,e,"page_token")},list_ml_prompts:E,list_ml_prompts_pager:function(e){return a(E,e,"page_token")},list_org_datasets_for_model:async function({client:e,id:t}){const o=`/ml/custom/models/${t}/datasets`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_text_to_cad_parts_for_user:K,list_text_to_cad_parts_for_user_pager:function(e){return a(K,e,"page_token")},ml_copilot_ws:e=>new A(e),ml_reasoning_ws:e=>new u(e),update_custom_model:async function({client:e,id:t,body:o}){const r=`/ml/custom/models/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()}},Y={modeling_commands_ws:e=>new f(e)},k={device_access_token:async function({client:e,body:o}){const r="/oauth2/device/token"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:t(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},device_auth_confirm:async function({client:e,body:t}){const o="/oauth2/device/confirm"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},device_auth_request:async function({client:e,body:o}){const r="/oauth2/device/auth"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:t(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},device_auth_verify:async function({client:e,app_name:t,user_code:o}){const r="/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")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},oauth2_provider_callback:async function({client:e,provider:t,code:o,id_token:r,state:a,user:c}){const i=`/oauth2/provider/${t}/callback`+s({code:o,id_token:r,state:a,user:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},oauth2_provider_callback_post:async function({client:e,provider:o,body:r}){const a=`/oauth2/provider/${o}/callback`+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:t(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},oauth2_provider_consent:async function({client:e,provider:t,callback_url:o}){const r=`/oauth2/provider/${t}/consent`+s({callback_url:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},oauth2_token_revoke:async function({client:e,body:o}){const r="/oauth2/token/revoke"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:t(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()}},$={create_org:async function({client:e,body:t}){const o="/org"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_org_dataset:async function({client:e,body:t}){const o="/org/datasets"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_org_member:async function({client:e,body:t}){const o="/org/members"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_org_saml_idp:async function({client:e,body:t}){const o="/org/saml/idp"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_org_dataset:async function({client:e,id:t}){const o=`/org/datasets/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},delete_org_member:async function({client:e,user_id:t}){const o=`/org/members/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},get_any_org:async function({client:e,id:t}){const o=`/orgs/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_dataset:async function({client:e,id:t}){const o=`/org/datasets/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_org_dataset_conversion:async function({client:e,conversion_id:t,id:o}){const r=`/org/datasets/${o}/conversions/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},get_org_dataset_conversion_stats:async function({client:e,id:t}){const o=`/org/datasets/${t}/stats`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_org_member:async function({client:e,user_id:t}){const o=`/org/members/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_shortlinks:I,get_org_shortlinks_pager:function(e){return a(I,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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_org_dataset_conversions:l,list_org_dataset_conversions_pager:function(e){return a(l,e,"page_token")},list_org_datasets:N,list_org_datasets_pager:function(e){return a(N,e,"page_token")},list_org_members:P,list_org_members_pager:function(e){return a(P,e,"page_token")},list_orgs:w,list_orgs_pager:function(e){return a(w,e,"page_token")},org_admin_details_get:async function({client:e,id:t}){const o=`/orgs/${t}/admin/details`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},org_dataset_s3_policies:async function({client:e,role_arn:t,uri:o}){const r="/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")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},rescan_org_dataset:async function({client:e,id:t}){const o=`/org/datasets/${t}/rescan`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},retry_org_dataset_conversion:async function({client:e,conversion_id:t,id:o}){const r=`/org/datasets/${o}/conversions/${t}/retry`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_org:async function({client:e,body:t}){const o="/org"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_org_dataset:async function({client:e,id:t,body:o}){const r=`/org/datasets/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_org_member:async function({client:e,user_id:t,body:o}){const r=`/org/members/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_org_privacy_settings:async function({client:e,body:t}){const o="/org/privacy"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_org_saml_idp:async function({client:e,body:t}){const o="/org/saml/idp"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()}},L={create_org_subscription:async function({client:e,body:t}){const o="/org/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_payment_information_for_org:async function({client:e,body:t}){const o="/org/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_payment_information_for_user:async function({client:e,body:t}){const o="/user/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},create_payment_intent_for_user:async function({client:e}={}){const t="/user/payment/intent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},create_user_subscription:async function({client:e,body:t}){const o="/user/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_payment_method_for_org:async function({client:e,id:t}){const o=`/org/payment/methods/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},delete_payment_method_for_user:async function({client:e,id:t,force:o}){const r=`/user/payment/methods/${t}`+s({force:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"DELETE",headers:i},p=e?.fetch||fetch,O=await p(a,_);await n(O)},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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_payment_balance_for_any_org:async function({client:e,include_total_due:t,id:o}){const r=`/orgs/${o}/payment/balance`+s({include_total_due:t}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},get_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:o}){const r=`/users/${t}/payment/balance`+s({include_total_due:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},get_payment_balance_for_org:async function({client:e,include_total_due:t}){const o="/org/payment/balance"+s({include_total_due:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_payment_balance_for_user:async function({client:e,include_total_due:t}){const o="/user/payment/balance"+s({include_total_due:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_subscription:async function({client:e}={}){const t="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_invoices_for_org:async function({client:e}={}){const t="/org/payment/invoices"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_invoices_for_user:async function({client:e}={}){const t="/user/payment/invoices"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_payment_methods_for_org:async function({client:e}={}){const t="/org/payment/methods"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_payment_methods_for_user:async function({client:e}={}){const t="/user/payment/methods"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},set_default_payment_method_for_user:async function({client:e,id:t}){const o=`/user/payment/methods/${t}/default`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},update_org_subscription:async function({client:e,body:t}){const o="/org/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_org_subscription_for_any_org:async function({client:e,id:t,body:o}){const r=`/orgs/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_payment_balance_for_any_org:async function({client:e,id:t,include_total_due:o,body:r}){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 p={method:"PUT",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},update_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:o,body:r}){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 p={method:"PUT",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},update_payment_information_for_org:async function({client:e,body:t}){const o="/org/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_payment_information_for_user:async function({client:e,body:t}){const o="/user/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_subscription:async function({client:e,body:t}){const o="/user/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},upsert_subscription_plan_price:async function({client:e,slug:t,body:o}){const r=`/subscription-plans/${t}/prices`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"POST",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},validate_customer_tax_information_for_user:async function({client:e}={}){const t="/user/payment/tax"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)}},j={create_service_account_for_org:async function({client:e,label:t}){const o="/org/service-accounts"+s({label:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_service_account_for_org:async function({client:e,token:t}){const o=`/org/service-accounts/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_service_account_for_org:async function({client:e,token:t}){const o=`/org/service-accounts/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_service_accounts_for_org:y,list_service_accounts_for_org_pager:function(e){return a(y,e,"page_token")}},H={create_store_coupon:async function({client:e,body:t}){const o="/store/coupon"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()}},R={get_angle_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/angle/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_area_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/area/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_current_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/current/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_energy_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/energy/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_force_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/force/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_frequency_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/frequency/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_length_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/length/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_mass_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/mass/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_power_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/power/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_pressure_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/pressure/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_temperature_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/temperature/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_torque_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/torque/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_volume_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/volume/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},G={create_user_shortlink:async function({client:e,body:t}){const o="/user/shortlinks"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_user_shortlink:async function({client:e,key:t}){const o=`/user/shortlinks/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_session_for_user:async function({client:e,token:t}){const o=`/user/session/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_user:async function({client:e,id:t}){const o=`/users/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_user_extended:async function({client:e,id:t}){const o=`/users-extended/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_self:async function({client:e}={}){const t="/user"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_self_extended:async function({client:e}={}){const t="/user/extended"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_shortlinks:m,get_user_shortlinks_pager:function(e){return a(m,e,"page_token")},list_users:Z,list_users_extended:S,list_users_extended_pager:function(e){return a(S,e,"page_token")},list_users_pager:function(e){return a(Z,e,"page_token")},patch_user_crm:async function({client:e,body:t}){const o="/user/crm"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PATCH",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_public_form:async function({client:e,body:t}){const o="/website/form"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_public_subscribe:async function({client:e,body:t}){const o="/website/subscribe"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_user_form_self:async function({client:e,body:t}){const o="/user/form"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},update_subscription_for_user:async function({client:e,id:t,body:o}){const r=`/users/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_user_privacy_settings:async function({client:e,body:t}){const o="/user/privacy"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_self:async function({client:e,body:t}){const o="/user"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_shortlink:async function({client:e,key:t,body:o}){const r=`/user/shortlinks/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);await n(O)},user_admin_details_get:async function({client:e,id:t}){const o=`/users/${t}/admin/details`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},user_features_get:async function({client:e}={}){const t="/user/features"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()}};exports.ApiError=o,exports.Client=class{constructor(e){"string"==typeof e?this.token=e:e&&"object"==typeof e&&(this.token=e.token,this.baseUrl=e.baseUrl,this.fetch=e.fetch)}},exports.Pager=r,exports.api_calls=b,exports.api_tokens=C,exports.apps=g,exports.createPager=a,exports.executor=B,exports.file=U,exports.meta=D,exports.ml=z,exports.modeling=Y,exports.oauth2=k,exports.orgs=$,exports.payments=L,exports.service_accounts=j,exports.store=H,exports.unit=R,exports.users=G;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("bson");try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?.node){new Function("m","return import(m)")("cross-fetch/polyfill").catch((()=>{}))}}catch{}function s(e){const s=new URLSearchParams;for(const[t,o]of Object.entries(e))if(void 0!==o)if(Array.isArray(o))for(const e of o)s.append(t,String(e));else s.append(t,String(o));const t=s.toString();return t?`?${t}`:""}function t(e){const s=new URLSearchParams;for(const[t,o]of Object.entries(e||{}))if(void 0!==o)if(Array.isArray(o))for(const e of o)s.append(t,String(e));else s.append(t,String(o));return s}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,s,t){super(t||s?.message||`HTTP ${e}`),this.name="ApiError",this.status=e,this.error_code=s?.error_code,this.request_id=s?.request_id,this.body=s}}async function n(e){if(e.ok)return;let s;try{s=await e.json()}catch{try{const t=await e.text();s=t?{message:t}:void 0}catch{s=void 0}}throw new o(e.status,s)}class r{started=!1;constructor(e,s,t="page_token"){this.fetchPage=e,this.baseParams={...s},this.tokenField=t}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 s=await this.fetchPage(e);return this.started=!0,this.nextToken=s?.next_page??null,s?.items??[]}}function a(e,s,t="page_token"){return new r(e,s,t)}async function c({client:e,limit:t,page_token:o,sort_by:r}){const a="/api-calls"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function i({client:e,id:t,limit:o,page_token:r,sort_by:a}){const c=`/users/${t}/api-calls`+s({limit:o,page_token:r,sort_by:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function _({client:e,limit:t,page_token:o,sort_by:r,status:a}){const c="/async/operations"+s({limit:t,page_token:o,sort_by:r,status:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function p({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/api-calls"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function O({client:e,limit:t,page_token:o,sort_by:r}){const a="/user/api-calls"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function T({client:e,limit:t,page_token:o,sort_by:r}){const a="/user/api-tokens"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}function v(e){return!!e&&"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}class h{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/executor/term"+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,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),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(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(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(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}class A{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/ml/copilot"+s({conversation_id:this.functionNameParams.conversation_id,replay:this.functionNameParams.replay,pr:this.functionNameParams.pr}),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,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),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(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(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(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}class u{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,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),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(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(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(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}async function d({client:e,limit:t,page_token:o,sort_by:r}){const a="/ml/conversations"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function E({client:e,limit:t,page_token:o,sort_by:r}){const a="/ml-prompts"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function K({client:e,limit:t,page_token:o,sort_by:r,conversation_id:a,no_models:c,no_parts:i}){const _="/user/text-to-cad"+s({limit:t,page_token:o,sort_by:r,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 n(A);return await A.json()}class f{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,order_independent_transparency:this.functionNameParams.order_independent_transparency,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,pr:this.functionNameParams.pr}),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,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),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(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(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(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}async function I({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/shortlinks"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function l({client:e,id:t,filter:o,limit:r,page_token:a,sort_by:c}){const i=`/org/datasets/${t}/conversions`+s({filter:o,limit:r,page_token:a,sort_by:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);await n(h);return await h.json()}async function N({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/datasets"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function P({client:e,limit:t,page_token:o,sort_by:r,role:a}){const c="/org/members"+s({limit:t,page_token:o,sort_by:r,role:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await n(v);return await v.json()}async function w({client:e,limit:t,page_token:o,sort_by:r}){const a="/orgs"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function y({client:e,id:t,limit:o,page_token:r,q:a,sort_by:c}){const i=`/org/datasets/${t}/search/conversions`+s({limit:o,page_token:r,q:a,sort_by:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);await n(h);return await h.json()}async function m({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/service-accounts"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function Z({client:e,limit:t,page_token:o,sort_by:r}){const a="/user/shortlinks"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function S({client:e,limit:t,page_token:o,sort_by:r}){const a="/users"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}async function b({client:e,limit:t,page_token:o,sort_by:r}){const a="/users-extended"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await n(T);return await T.json()}const g={get_api_call:async function({client:e,id:t}){const o=`/api-calls/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_for_org:async function({client:e,id:t}){const o=`/org/api-calls/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_for_user:async function({client:e,id:t}){const o=`/user/api-calls/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_api_call_metrics:async function({client:e,group_by:t}){const o="/api-call-metrics"+s({group_by:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_async_operation:async function({client:e,id:t}){const o=`/async/operations/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_api_calls:c,list_api_calls_for_user:i,list_api_calls_for_user_pager:function(e){return a(i,e,"page_token")},list_api_calls_pager:function(e){return a(c,e,"page_token")},list_async_operations:_,list_async_operations_pager:function(e){return a(_,e,"page_token")},org_list_api_calls:p,org_list_api_calls_pager:function(e){return a(p,e,"page_token")},user_list_api_calls:O,user_list_api_calls_pager:function(e){return a(O,e,"page_token")}},C={create_api_token_for_user:async function({client:e,label:t}){const o="/user/api-tokens"+s({label:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_api_token_for_user:async function({client:e,token:t}){const o=`/user/api-tokens/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_api_token_for_user:async function({client:e,token:t}){const o=`/user/api-tokens/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_api_tokens_for_user:T,list_api_tokens_for_user_pager:function(e){return a(T,e,"page_token")}},B={apps_github_callback:async function({client:e}={}){const t="/apps/github/callback"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},apps_github_consent:async function({client:e}={}){const t="/apps/github/consent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},apps_github_webhook:async function({client:e,body:t}){const o="/apps/github/webhook"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/octet-stream";const i={method:"POST",headers:c,body:t},_=e?.fetch||fetch,p=await _(r,i);await n(p)}},U={create_executor_term:e=>new h(e),create_file_execution:async function({client:e,lang:t,output:o,body:r}){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 p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},D={create_file_center_of_mass:async function({client:e,output_unit:t,src_format:o,body:r}){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 p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_conversion:async function({client:e,output_format:t,src_format:o,body:r}){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 p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_conversion_options:async function({client:e,files:t,body:o}){const r="/file/conversion"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await n(T),await T.json()},create_file_density:async function({client:e,material_mass:t,material_mass_unit:o,output_unit:r,src_format:a,body:c}){const i="/file/density"+s({material_mass:t,material_mass_unit:o,output_unit:r,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},create_file_mass:async function({client:e,material_density:t,material_density_unit:o,output_unit:r,src_format:a,body:c}){const i="/file/mass"+s({material_density:t,material_density_unit:o,output_unit:r,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},create_file_surface_area:async function({client:e,output_unit:t,src_format:o,body:r}){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 p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_file_volume:async function({client:e,output_unit:t,src_format:o,body:r}){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 p={method:"POST",headers:_,body:r},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},z={community_sso:async function({client:e,sig:t,sso:o}){const r="/community/sso"+s({sig:t,sso:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},create_debug_uploads:async function({client:e,files:t}){const o="/debug/uploads"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i=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(r,_);return await n(O),await O.json()},create_event:async function({client:e,files:t,body:o}){const r="/events"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);await n(T)},get_ipinfo:async function({client:e}={}){const t="/_meta/ipinfo"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_pricing_subscriptions:async function({client:e}={}){const t="/pricing/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_schema:async function({client:e}={}){const t="/"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},internal_get_api_token_for_discord_user:async function({client:e,discord_id:t}){const o=`/internal/discord/api-token/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()}},Y={create_custom_model:async function({client:e,body:t}){const o="/ml/custom/models"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_kcl_code_completions:async function({client:e,body:t}){const o="/ml/kcl/completions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_proprietary_to_kcl:async function({client:e,files:t,code_option:o}){const r="/ml/convert/proprietary-to-kcl"+s({code_option:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;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 n(T),await T.json()},create_text_to_cad:async function({client:e,output_format:t,kcl:o,body:r}){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 p={method:"POST",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},create_text_to_cad_iteration:async function({client:e,body:t}){const o="/ml/text-to-cad/iteration"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_text_to_cad_multi_file_iteration:async function({client:e,files:t,body:o}){const r="/ml/text-to-cad/multi-file/iteration"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await n(T),await T.json()},create_text_to_cad_part_feedback:async function({client:e,id:t,feedback:o}){const r=`/user/text-to-cad/${t}`+s({feedback:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);await n(O)},get_custom_model:async function({client:e,id:t}){const o=`/ml/custom/models/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_ml_prompt:async function({client:e,id:t}){const o=`/ml-prompts/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_text_to_cad_part_for_user:async function({client:e,id:t}){const o=`/user/text-to-cad/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_conversations_for_user:d,list_conversations_for_user_pager:function(e){return a(d,e,"page_token")},list_ml_prompts:E,list_ml_prompts_pager:function(e){return a(E,e,"page_token")},list_org_datasets_for_model:async function({client:e,id:t}){const o=`/ml/custom/models/${t}/datasets`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_text_to_cad_parts_for_user:K,list_text_to_cad_parts_for_user_pager:function(e){return a(K,e,"page_token")},ml_copilot_ws:e=>new A(e),ml_reasoning_ws:e=>new u(e),update_custom_model:async function({client:e,id:t,body:o}){const r=`/ml/custom/models/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()}},k={modeling_commands_ws:e=>new f(e)},$={device_access_token:async function({client:e,body:o}){const r="/oauth2/device/token"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:t(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},device_auth_confirm:async function({client:e,body:t}){const o="/oauth2/device/confirm"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},device_auth_request:async function({client:e,body:o}){const r="/oauth2/device/auth"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:t(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},device_auth_verify:async function({client:e,app_name:t,user_code:o}){const r="/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")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},oauth2_provider_callback:async function({client:e,provider:t,code:o,id_token:r,state:a,user:c}){const i=`/oauth2/provider/${t}/callback`+s({code:o,id_token:r,state:a,user:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},oauth2_provider_callback_post:async function({client:e,provider:o,body:r}){const a=`/oauth2/provider/${o}/callback`+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:t(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},oauth2_provider_consent:async function({client:e,provider:t,callback_url:o}){const r=`/oauth2/provider/${t}/consent`+s({callback_url:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},oauth2_token_revoke:async function({client:e,body:o}){const r="/oauth2/token/revoke"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:t(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()}},L={create_org:async function({client:e,body:t}){const o="/org"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_org_dataset:async function({client:e,body:t}){const o="/org/datasets"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_org_member:async function({client:e,body:t}){const o="/org/members"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_org_saml_idp:async function({client:e,body:t}){const o="/org/saml/idp"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_org_dataset:async function({client:e,id:t}){const o=`/org/datasets/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},delete_org_member:async function({client:e,user_id:t}){const o=`/org/members/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},get_any_org:async function({client:e,id:t}){const o=`/orgs/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_dataset:async function({client:e,id:t}){const o=`/org/datasets/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_org_dataset_conversion:async function({client:e,conversion_id:t,id:o}){const r=`/org/datasets/${o}/conversions/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},get_org_dataset_conversion_stats:async function({client:e,id:t}){const o=`/org/datasets/${t}/stats`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_org_member:async function({client:e,user_id:t}){const o=`/org/members/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_shortlinks:I,get_org_shortlinks_pager:function(e){return a(I,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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_org_dataset_conversions:l,list_org_dataset_conversions_pager:function(e){return a(l,e,"page_token")},list_org_datasets:N,list_org_datasets_pager:function(e){return a(N,e,"page_token")},list_org_members:P,list_org_members_pager:function(e){return a(P,e,"page_token")},list_orgs:w,list_orgs_pager:function(e){return a(w,e,"page_token")},org_admin_details_get:async function({client:e,id:t}){const o=`/orgs/${t}/admin/details`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},org_dataset_s3_policies:async function({client:e,role_arn:t,uri:o}){const r="/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")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},retrigger_org_dataset:async function({client:e,id:t,statuses:o}){const r=`/org/datasets/${t}/retrigger`+s({statuses:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);await n(O)},retrigger_org_dataset_conversion:async function({client:e,conversion_id:t,id:o}){const r=`/org/datasets/${o}/conversions/${t}/retrigger`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);await n(O)},search_org_dataset_conversions:y,search_org_dataset_conversions_pager:function(e){return a(y,e,"page_token")},update_org:async function({client:e,body:t}){const o="/org"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_org_dataset:async function({client:e,id:t,body:o}){const r=`/org/datasets/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_org_member:async function({client:e,user_id:t,body:o}){const r=`/org/members/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_org_privacy_settings:async function({client:e,body:t}){const o="/org/privacy"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_org_saml_idp:async function({client:e,body:t}){const o="/org/saml/idp"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},upload_org_dataset_files:async function({client:e,files:t,id:o}){const r=`/org/datasets/${o}/uploads`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=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 n(T),await T.json()}},j={create_org_subscription:async function({client:e,body:t}){const o="/org/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_payment_information_for_org:async function({client:e,body:t}){const o="/org/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},create_payment_information_for_user:async function({client:e,body:t}){const o="/user/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},create_payment_intent_for_user:async function({client:e}={}){const t="/user/payment/intent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},create_user_subscription:async function({client:e,body:t}){const o="/user/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_payment_method_for_org:async function({client:e,id:t}){const o=`/org/payment/methods/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},delete_payment_method_for_user:async function({client:e,id:t,force:o}){const r=`/user/payment/methods/${t}`+s({force:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"DELETE",headers:i},p=e?.fetch||fetch,O=await p(a,_);await n(O)},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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_payment_balance_for_any_org:async function({client:e,include_total_due:t,id:o}){const r=`/orgs/${o}/payment/balance`+s({include_total_due:t}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},get_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:o}){const r=`/users/${t}/payment/balance`+s({include_total_due:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},get_payment_balance_for_org:async function({client:e,include_total_due:t}){const o="/org/payment/balance"+s({include_total_due:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_payment_balance_for_user:async function({client:e,include_total_due:t}){const o="/user/payment/balance"+s({include_total_due:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_subscription:async function({client:e}={}){const t="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_invoices_for_org:async function({client:e}={}){const t="/org/payment/invoices"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_invoices_for_user:async function({client:e}={}){const t="/user/payment/invoices"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_payment_methods_for_org:async function({client:e}={}){const t="/org/payment/methods"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_payment_methods_for_user:async function({client:e}={}){const t="/user/payment/methods"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},set_default_payment_method_for_user:async function({client:e,id:t}){const o=`/user/payment/methods/${t}/default`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},update_org_subscription:async function({client:e,body:t}){const o="/org/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_org_subscription_for_any_org:async function({client:e,id:t,body:o}){const r=`/orgs/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_payment_balance_for_any_org:async function({client:e,id:t,include_total_due:o,body:r}){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 p={method:"PUT",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},update_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:o,body:r}){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 p={method:"PUT",headers:_,body:JSON.stringify(r)},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},update_payment_information_for_org:async function({client:e,body:t}){const o="/org/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_payment_information_for_user:async function({client:e,body:t}){const o="/user/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_subscription:async function({client:e,body:t}){const o="/user/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},upsert_subscription_plan_price:async function({client:e,slug:t,body:o}){const r=`/subscription-plans/${t}/prices`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"POST",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},validate_customer_tax_information_for_user:async function({client:e}={}){const t="/user/payment/tax"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)}},H={create_service_account_for_org:async function({client:e,label:t}){const o="/org/service-accounts"+s({label:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},delete_service_account_for_org:async function({client:e,token:t}){const o=`/org/service-accounts/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},get_service_account_for_org:async function({client:e,token:t}){const o=`/org/service-accounts/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},list_service_accounts_for_org:m,list_service_accounts_for_org_pager:function(e){return a(m,e,"page_token")}},R={create_store_coupon:async function({client:e,body:t}){const o="/store/coupon"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()}},G={get_angle_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/angle/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_area_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/area/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_current_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/current/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_energy_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/energy/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_force_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/force/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_frequency_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/frequency/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_length_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/length/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_mass_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/mass/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_power_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/power/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_pressure_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/pressure/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_temperature_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/temperature/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_torque_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/torque/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()},get_volume_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/volume/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await n(T),await T.json()}},x={create_user_shortlink:async function({client:e,body:t}){const o="/user/shortlinks"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_user_shortlink:async function({client:e,key:t}){const o=`/user/shortlinks/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(r,i);await n(p)},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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_session_for_user:async function({client:e,token:t}){const o=`/user/session/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_user:async function({client:e,id:t}){const o=`/users/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_user_extended:async function({client:e,id:t}){const o=`/users-extended/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},get_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,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_self:async function({client:e}={}){const t="/user"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_self_extended:async function({client:e}={}){const t="/user/extended"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_shortlinks:Z,get_user_shortlinks_pager:function(e){return a(Z,e,"page_token")},list_users:S,list_users_extended:b,list_users_extended_pager:function(e){return a(b,e,"page_token")},list_users_pager:function(e){return a(S,e,"page_token")},patch_user_crm:async function({client:e,body:t}){const o="/user/crm"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PATCH",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_public_form:async function({client:e,body:t}){const o="/website/form"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_public_subscribe:async function({client:e,body:t}){const o="/website/subscribe"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},put_user_form_self:async function({client:e,body:t}){const o="/user/form"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);await n(p)},update_subscription_for_user:async function({client:e,id:t,body:o}){const r=`/users/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);return await n(O),await O.json()},update_user_privacy_settings:async function({client:e,body:t}){const o="/user/privacy"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_self:async function({client:e,body:t}){const o="/user"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},update_user_shortlink:async function({client:e,key:t,body:o}){const r=`/user/shortlinks/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},p=e?.fetch||fetch,O=await p(a,_);await n(O)},user_admin_details_get:async function({client:e,id:t}){const o=`/users/${t}/admin/details`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(r,i);return await n(p),await p.json()},user_features_get:async function({client:e}={}){const t="/user/features"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()}};exports.ApiError=o,exports.Client=class{constructor(e){"string"==typeof e?this.token=e:e&&"object"==typeof e&&(this.token=e.token,this.baseUrl=e.baseUrl,this.fetch=e.fetch)}},exports.Pager=r,exports.api_calls=g,exports.api_tokens=C,exports.apps=B,exports.createPager=a,exports.executor=U,exports.file=D,exports.meta=z,exports.ml=Y,exports.modeling=k,exports.oauth2=$,exports.orgs=L,exports.payments=j,exports.service_accounts=H,exports.store=R,exports.unit=G,exports.users=x;
|