@kittycad/lib 3.0.7 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/cjs/index.cjs +1 -1
  2. package/dist/mjs/index.js +1 -1
  3. package/dist/types/__tests__/gen/ml-create_text_to_cad_part_feedback.test.d.ts +2 -0
  4. package/dist/types/__tests__/gen/ml-create_text_to_cad_part_feedback.test.d.ts.map +1 -0
  5. package/dist/types/__tests__/gen/ml-get_text_to_cad_parts_for_user.test.d.ts +2 -0
  6. package/dist/types/__tests__/gen/ml-get_text_to_cad_parts_for_user.test.d.ts.map +1 -0
  7. package/dist/types/__tests__/gen/ml-list_text_to_cad_parts_for_user.test.d.ts +2 -0
  8. package/dist/types/__tests__/gen/ml-list_text_to_cad_parts_for_user.test.d.ts.map +1 -0
  9. package/dist/types/src/api/ml/create_text_to_cad.d.ts +1 -1
  10. package/dist/types/src/api/ml/create_text_to_cad_multi_file_iteration.d.ts +1 -1
  11. package/dist/types/src/api/ml/{create_text_to_cad_model_feedback.d.ts → create_text_to_cad_part_feedback.d.ts} +5 -5
  12. package/dist/types/src/api/ml/create_text_to_cad_part_feedback.d.ts.map +1 -0
  13. package/dist/types/src/api/ml/{get_text_to_cad_model_for_user.d.ts → get_text_to_cad_parts_for_user.d.ts} +5 -5
  14. package/dist/types/src/api/ml/{get_text_to_cad_model_for_user.d.ts.map → get_text_to_cad_parts_for_user.d.ts.map} +1 -1
  15. package/dist/types/src/api/ml/{list_text_to_cad_models_for_user.d.ts → list_text_to_cad_parts_for_user.d.ts} +10 -10
  16. package/dist/types/src/api/ml/list_text_to_cad_parts_for_user.d.ts.map +1 -0
  17. package/dist/types/src/index.d.ts +8 -8
  18. package/dist/types/src/index.d.ts.map +1 -1
  19. package/dist/types/src/models.d.ts +16 -0
  20. package/dist/types/src/models.d.ts.map +1 -1
  21. package/package.json +1 -1
  22. package/dist/types/__tests__/gen/ml-create_text_to_cad_model_feedback.test.d.ts +0 -2
  23. package/dist/types/__tests__/gen/ml-create_text_to_cad_model_feedback.test.d.ts.map +0 -1
  24. package/dist/types/__tests__/gen/ml-get_text_to_cad_model_for_user.test.d.ts +0 -2
  25. package/dist/types/__tests__/gen/ml-get_text_to_cad_model_for_user.test.d.ts.map +0 -1
  26. package/dist/types/__tests__/gen/ml-list_text_to_cad_models_for_user.test.d.ts +0 -2
  27. package/dist/types/__tests__/gen/ml-list_text_to_cad_models_for_user.test.d.ts.map +0 -1
  28. package/dist/types/src/api/ml/create_text_to_cad_model_feedback.d.ts.map +0 -1
  29. package/dist/types/src/api/ml/list_text_to_cad_models_for_user.d.ts.map +0 -1
package/dist/mjs/index.js CHANGED
@@ -1 +1 @@
1
- import{BSON as e}from"bson";try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?.node){new Function("m","return import(m)")("cross-fetch/polyfill").catch((()=>{}))}}catch{}class t{constructor(e){"string"==typeof e?this.token=e:e&&"object"==typeof e&&(this.token=e.token,this.baseUrl=e.baseUrl,this.fetch=e.fetch)}}function s(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e))if(void 0!==n)if(Array.isArray(n))for(const e of n)t.append(s,String(e));else t.append(s,String(n));const s=t.toString();return s?`?${s}`:""}function n(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e||{}))if(void 0!==n)if(Array.isArray(n))for(const e of n)t.append(s,String(e));else t.append(s,String(n));return t}try{if("undefined"!=typeof process&&process.versions?.node&&"win32"===process.platform){new Function("m","return import(m)")("win-ca")}}catch{}class o extends Error{constructor(e,t,s){super(s||t?.message||`HTTP ${e}`),this.name="ApiError",this.status=e,this.error_code=t?.error_code,this.request_id=t?.request_id,this.body=t}}async function r(e){if(e.ok)return;let t;try{t=await e.json()}catch{try{const s=await e.text();t=s?{message:s}:void 0}catch{t=void 0}}throw new o(e.status,t)}class a{started=!1;constructor(e,t,s="page_token"){this.fetchPage=e,this.baseParams={...t},this.tokenField=s}hasNext(){return!this.started||!!this.nextToken}reset(){this.started=!1,this.nextToken=void 0}async next(){if(this.started&&!this.nextToken)return[];const e={...this.baseParams};this.started&&this.nextToken&&(e[this.tokenField]=this.nextToken);const t=await this.fetchPage(e);return this.started=!0,this.nextToken=t?.next_page??null,t?.items??[]}}function c(e,t,s="page_token"){return new a(e,t,s)}async function i({client:e,limit:t,page_token:n,sort_by:o}){const a="/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function _({client:e,id:t,limit:n,page_token:o,sort_by:a}){const c=`/users/${t}/api-calls`+s({limit:n,page_token:o,sort_by:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function p({client:e,limit:t,page_token:n,sort_by:o,status:a}){const c="/async/operations"+s({limit:t,page_token:n,sort_by:o,status:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function O({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function T({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function v({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/api-tokens"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}function h(e){return!!e&&"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}class A{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/executor/term"+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}class u{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/ml/copilot"+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}class E{constructor(e){this.functionNameParams=e}async connect(){const e=`/ws/ml/reasoning/${this.functionNameParams.id}`+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}async function d({client:e,limit:t,page_token:n,sort_by:o}){const a="/ml/conversations"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function K({client:e,limit:t,page_token:n,sort_by:o}){const a="/ml-prompts"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function f({client:e,limit:t,page_token:n,sort_by:o,conversation_id:a,no_models:c}){const i="/user/text-to-cad"+s({limit:t,page_token:n,sort_by:o,conversation_id:a,no_models:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);await r(h);return await h.json()}class I{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/modeling/commands"+s({api_call_id:this.functionNameParams.api_call_id,fps:this.functionNameParams.fps,pool:this.functionNameParams.pool,post_effect:this.functionNameParams.post_effect,replay:this.functionNameParams.replay,show_grid:this.functionNameParams.show_grid,unlocked_framerate:this.functionNameParams.unlocked_framerate,video_res_height:this.functionNameParams.video_res_height,video_res_width:this.functionNameParams.video_res_width,webrtc:this.functionNameParams.webrtc}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}async function l({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/shortlinks"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function N({client:e,limit:t,page_token:n,sort_by:o,role:a}){const c="/org/members"+s({limit:t,page_token:n,sort_by:o,role:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function y({client:e,limit:t,page_token:n,sort_by:o}){const a="/orgs"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function w({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/service-accounts"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function P({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/shortlinks"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function m({client:e,limit:t,page_token:n,sort_by:o}){const a="/users"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function Z({client:e,limit:t,page_token:n,sort_by:o}){const a="/users-extended"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}const S={get_api_call:async function({client:e,id:t}){const n=`/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_for_org:async function({client:e,id:t}){const n=`/org/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_for_user:async function({client:e,id:t}){const n=`/user/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_metrics:async function({client:e,group_by:t}){const n="/api-call-metrics"+s({group_by:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_async_operation:async function({client:e,id:t}){const n=`/async/operations/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_api_calls:i,list_api_calls_for_user:_,list_api_calls_for_user_pager:function(e){return c(_,e,"page_token")},list_api_calls_pager:function(e){return c(i,e,"page_token")},list_async_operations:p,list_async_operations_pager:function(e){return c(p,e,"page_token")},org_list_api_calls:O,org_list_api_calls_pager:function(e){return c(O,e,"page_token")},user_list_api_calls:T,user_list_api_calls_pager:function(e){return c(T,e,"page_token")}},b={create_api_token_for_user:async function({client:e,label:t}){const n="/user/api-tokens"+s({label:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_api_token_for_user:async function({client:e,token:t}){const n=`/user/api-tokens/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_api_token_for_user:async function({client:e,token:t}){const n=`/user/api-tokens/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_api_tokens_for_user:v,list_api_tokens_for_user_pager:function(e){return c(v,e,"page_token")}},C={apps_github_callback:async function({client:e}={}){const t="/apps/github/callback"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},apps_github_consent:async function({client:e}={}){const t="/apps/github/consent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},apps_github_webhook:async function({client:e,body:t}){const n="/apps/github/webhook"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/octet-stream";const i={method:"POST",headers:c,body:t},_=e?.fetch||fetch,p=await _(o,i);await r(p)}},g={create_executor_term:e=>new A(e),create_file_execution:async function({client:e,lang:t,output:n,body:o}){const a=`/file/execute/${t}`+s({output:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},U={create_file_center_of_mass:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/center-of-mass"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_conversion:async function({client:e,output_format:t,src_format:n,body:o}){const a=`/file/conversion/${n}/${t}`+s({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_conversion_options:async function({client:e,files:t,body:n}){const o="/file/conversion"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},create_file_density:async function({client:e,material_mass:t,material_mass_unit:n,output_unit:o,src_format:a,body:c}){const i="/file/density"+s({material_mass:t,material_mass_unit:n,output_unit:o,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},create_file_mass:async function({client:e,material_density:t,material_density_unit:n,output_unit:o,src_format:a,body:c}){const i="/file/mass"+s({material_density:t,material_density_unit:n,output_unit:o,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},create_file_surface_area:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/surface-area"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_volume:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/volume"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},D={community_sso:async function({client:e,sig:t,sso:n}){const o="/community/sso"+s({sig:t,sso:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},create_debug_uploads:async function({client:e,files:t}){const n="/debug/uploads"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i=new FormData;t.forEach((e=>{i.append(e.name,e.data,e.name)}));const _={method:"POST",headers:c,body:i},p=e?.fetch||fetch,O=await p(o,_);return await r(O),await O.json()},create_event:async function({client:e,files:t,body:n}){const o="/events"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);await r(T)},get_ipinfo:async function({client:e}={}){const t="/_meta/ipinfo"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_pricing_subscriptions:async function({client:e}={}){const t="/pricing/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_schema:async function({client:e}={}){const t="/"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},internal_get_api_token_for_discord_user:async function({client:e,discord_id:t}){const n=`/internal/discord/api-token/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},ping:async function({client:e}={}){const t="/ping"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()}},B={create_kcl_code_completions:async function({client:e,body:t}){const n="/ml/kcl/completions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_proprietary_to_kcl:async function({client:e,files:t,code_option:n}){const o="/ml/convert/proprietary-to-kcl"+s({code_option:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)}));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},create_text_to_cad:async function({client:e,output_format:t,kcl:n,body:o}){const a=`/ai/text-to-cad/${t}`+s({kcl:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"POST",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_text_to_cad_iteration:async function({client:e,body:t}){const n="/ml/text-to-cad/iteration"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_text_to_cad_model_feedback:async function({client:e,id:t,feedback:n}){const o=`/user/text-to-cad/${t}`+s({feedback:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);await r(O)},create_text_to_cad_multi_file_iteration:async function({client:e,files:t,body:n}){const o="/ml/text-to-cad/multi-file/iteration"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},get_ml_prompt:async function({client:e,id:t}){const n=`/ml-prompts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_text_to_cad_model_for_user:async function({client:e,id:t}){const n=`/user/text-to-cad/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_conversations_for_user:d,list_conversations_for_user_pager:function(e){return c(d,e,"page_token")},list_ml_prompts:K,list_ml_prompts_pager:function(e){return c(K,e,"page_token")},list_text_to_cad_models_for_user:f,list_text_to_cad_models_for_user_pager:function(e){return c(f,e,"page_token")},ml_copilot_ws:e=>new u(e),ml_reasoning_ws:e=>new E(e)},z={modeling_commands_ws:e=>new I(e)},Y={device_access_token:async function({client:e,body:t}){const o="/oauth2/device/token"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},device_auth_confirm:async function({client:e,body:t}){const n="/oauth2/device/confirm"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},device_auth_request:async function({client:e,body:t}){const o="/oauth2/device/auth"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},device_auth_verify:async function({client:e,app_name:t,user_code:n}){const o="/oauth2/device/verify"+s({app_name:t,user_code:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},oauth2_provider_callback:async function({client:e,provider:t,code:n,id_token:o,state:a,user:c}){const i=`/oauth2/provider/${t}/callback`+s({code:n,id_token:o,state:a,user:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},oauth2_provider_callback_post:async function({client:e,provider:t,body:o}){const a=`/oauth2/provider/${t}/callback`+s({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/x-www-form-urlencoded";const p={method:"POST",headers:_,body:n(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},oauth2_provider_consent:async function({client:e,provider:t,callback_url:n}){const o=`/oauth2/provider/${t}/consent`+s({callback_url:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},oauth2_token_revoke:async function({client:e,body:t}){const o="/oauth2/token/revoke"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()}},k={create_org:async function({client:e,body:t}){const n="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_org_member:async function({client:e,body:t}){const n="/org/members"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_org_saml_idp:async function({client:e,body:t}){const n="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_org:async function({client:e}={}){const t="/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_org_member:async function({client:e,user_id:t}){const n=`/org/members/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},delete_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},get_any_org:async function({client:e,id:t}){const n=`/orgs/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_org:async function({client:e}={}){const t="/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_member:async function({client:e,user_id:t}){const n=`/org/members/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_org_privacy_settings:async function({client:e}={}){const t="/org/privacy"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_shortlinks:l,get_org_shortlinks_pager:function(e){return c(l,e,"page_token")},get_user_org:async function({client:e}={}){const t="/user/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_org_members:N,list_org_members_pager:function(e){return c(N,e,"page_token")},list_orgs:y,list_orgs_pager:function(e){return c(y,e,"page_token")},update_enterprise_pricing_for_org:async function({client:e,id:t,body:n}){const o=`/orgs/${t}/enterprise/pricing`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_org:async function({client:e,body:t}){const n="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_org_member:async function({client:e,user_id:t,body:n}){const o=`/org/members/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_org_privacy_settings:async function({client:e,body:t}){const n="/org/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_org_saml_idp:async function({client:e,body:t}){const n="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()}},$={create_org_subscription:async function({client:e,body:t}){const n="/org/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_information_for_org:async function({client:e,body:t}){const n="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_information_for_user:async function({client:e,body:t}){const n="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_intent_for_org:async function({client:e}={}){const t="/org/payment/intent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},create_payment_intent_for_user:async function({client:e}={}){const t="/user/payment/intent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},create_user_subscription:async function({client:e,body:t}){const n="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_payment_method_for_org:async function({client:e,id:t}){const n=`/org/payment/methods/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},delete_payment_method_for_user:async function({client:e,id:t}){const n=`/user/payment/methods/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_org_subscription:async function({client:e}={}){const t="/org/payment/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_payment_balance_for_any_org:async function({client:e,include_total_due:t,id:n}){const o=`/orgs/${n}/payment/balance`+s({include_total_due:t}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},get_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:n}){const o=`/users/${t}/payment/balance`+s({include_total_due:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},get_payment_balance_for_org:async function({client:e,include_total_due:t}){const n="/org/payment/balance"+s({include_total_due:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_payment_balance_for_user:async function({client:e,include_total_due:t}){const n="/user/payment/balance"+s({include_total_due:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_subscription:async function({client:e}={}){const t="/user/payment/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_invoices_for_org:async function({client:e}={}){const t="/org/payment/invoices"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_invoices_for_user:async function({client:e}={}){const t="/user/payment/invoices"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_payment_methods_for_org:async function({client:e}={}){const t="/org/payment/methods"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_payment_methods_for_user:async function({client:e}={}){const t="/user/payment/methods"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},update_org_subscription:async function({client:e,body:t}){const n="/org/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_payment_balance_for_any_org:async function({client:e,id:t,include_total_due:n,body:o}){const a=`/orgs/${t}/payment/balance`+s({include_total_due:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},update_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:n,body:o}){const a=`/users/${t}/payment/balance`+s({include_total_due:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},update_payment_information_for_org:async function({client:e,body:t}){const n="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_payment_information_for_user:async function({client:e,body:t}){const n="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_subscription:async function({client:e,body:t}){const n="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},validate_customer_tax_information_for_org:async function({client:e}={}){const t="/org/payment/tax"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},validate_customer_tax_information_for_user:async function({client:e}={}){const t="/user/payment/tax"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)}},L={create_service_account_for_org:async function({client:e,label:t}){const n="/org/service-accounts"+s({label:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_service_account_for_org:async function({client:e,token:t}){const n=`/org/service-accounts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_service_account_for_org:async function({client:e,token:t}){const n=`/org/service-accounts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_service_accounts_for_org:w,list_service_accounts_for_org_pager:function(e){return c(w,e,"page_token")}},j={create_store_coupon:async function({client:e,body:t}){const n="/store/coupon"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()}},H={get_angle_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/angle/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_area_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/area/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_current_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/current/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_energy_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/energy/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_force_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/force/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_frequency_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/frequency/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_length_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/length/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_mass_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/mass/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_power_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/power/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_pressure_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/pressure/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_temperature_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/temperature/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_torque_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/torque/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_volume_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/volume/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},R={create_user_shortlink:async function({client:e,body:t}){const n="/user/shortlinks"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_user_self:async function({client:e}={}){const t="/user"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_user_shortlink:async function({client:e,key:t}){const n=`/user/shortlinks/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_oauth2_providers_for_user:async function({client:e}={}){const t="/user/oauth2/providers"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_session_for_user:async function({client:e,token:t}){const n=`/user/session/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user:async function({client:e,id:t}){const n=`/users/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user_extended:async function({client:e,id:t}){const n=`/users-extended/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user_privacy_settings:async function({client:e}={}){const t="/user/privacy"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_self:async function({client:e}={}){const t="/user"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_self_extended:async function({client:e}={}){const t="/user/extended"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_shortlinks:P,get_user_shortlinks_pager:function(e){return c(P,e,"page_token")},list_users:m,list_users_extended:Z,list_users_extended_pager:function(e){return c(Z,e,"page_token")},list_users_pager:function(e){return c(m,e,"page_token")},patch_user_crm:async function({client:e,body:t}){const n="/user/crm"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PATCH",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_public_form:async function({client:e,body:t}){const n="/website/form"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_public_subscribe:async function({client:e,body:t}){const n="/website/subscribe"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_user_form_self:async function({client:e,body:t}){const n="/user/form"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},update_subscription_for_user:async function({client:e,id:t,body:n}){const o=`/users/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_user_privacy_settings:async function({client:e,body:t}){const n="/user/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_self:async function({client:e,body:t}){const n="/user"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_shortlink:async function({client:e,key:t,body:n}){const o=`/user/shortlinks/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);await r(O)}};export{o as ApiError,t as Client,a as Pager,S as api_calls,b as api_tokens,C as apps,c as createPager,g as executor,U as file,D as meta,B as ml,z as modeling,Y as oauth2,k as orgs,$ as payments,L as service_accounts,j as store,H as unit,R as users};
1
+ import{BSON as e}from"bson";try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?.node){new Function("m","return import(m)")("cross-fetch/polyfill").catch((()=>{}))}}catch{}class t{constructor(e){"string"==typeof e?this.token=e:e&&"object"==typeof e&&(this.token=e.token,this.baseUrl=e.baseUrl,this.fetch=e.fetch)}}function s(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e))if(void 0!==n)if(Array.isArray(n))for(const e of n)t.append(s,String(e));else t.append(s,String(n));const s=t.toString();return s?`?${s}`:""}function n(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e||{}))if(void 0!==n)if(Array.isArray(n))for(const e of n)t.append(s,String(e));else t.append(s,String(n));return t}try{if("undefined"!=typeof process&&process.versions?.node&&"win32"===process.platform){new Function("m","return import(m)")("win-ca")}}catch{}class o extends Error{constructor(e,t,s){super(s||t?.message||`HTTP ${e}`),this.name="ApiError",this.status=e,this.error_code=t?.error_code,this.request_id=t?.request_id,this.body=t}}async function r(e){if(e.ok)return;let t;try{t=await e.json()}catch{try{const s=await e.text();t=s?{message:s}:void 0}catch{t=void 0}}throw new o(e.status,t)}class a{started=!1;constructor(e,t,s="page_token"){this.fetchPage=e,this.baseParams={...t},this.tokenField=s}hasNext(){return!this.started||!!this.nextToken}reset(){this.started=!1,this.nextToken=void 0}async next(){if(this.started&&!this.nextToken)return[];const e={...this.baseParams};this.started&&this.nextToken&&(e[this.tokenField]=this.nextToken);const t=await this.fetchPage(e);return this.started=!0,this.nextToken=t?.next_page??null,t?.items??[]}}function c(e,t,s="page_token"){return new a(e,t,s)}async function i({client:e,limit:t,page_token:n,sort_by:o}){const a="/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function _({client:e,id:t,limit:n,page_token:o,sort_by:a}){const c=`/users/${t}/api-calls`+s({limit:n,page_token:o,sort_by:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function p({client:e,limit:t,page_token:n,sort_by:o,status:a}){const c="/async/operations"+s({limit:t,page_token:n,sort_by:o,status:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function O({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function T({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/api-calls"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function v({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/api-tokens"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}function h(e){return!!e&&"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}class A{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/executor/term"+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}class u{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/ml/copilot"+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}class E{constructor(e){this.functionNameParams=e}async connect(){const e=`/ws/ml/reasoning/${this.functionNameParams.id}`+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}async function d({client:e,limit:t,page_token:n,sort_by:o}){const a="/ml/conversations"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function K({client:e,limit:t,page_token:n,sort_by:o}){const a="/ml-prompts"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function f({client:e,limit:t,page_token:n,sort_by:o,conversation_id:a,no_models:c}){const i="/user/text-to-cad"+s({limit:t,page_token:n,sort_by:o,conversation_id:a,no_models:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);await r(h);return await h.json()}class I{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/modeling/commands"+s({api_call_id:this.functionNameParams.api_call_id,fps:this.functionNameParams.fps,pool:this.functionNameParams.pool,post_effect:this.functionNameParams.post_effect,replay:this.functionNameParams.replay,show_grid:this.functionNameParams.show_grid,unlocked_framerate:this.functionNameParams.unlocked_framerate,video_res_height:this.functionNameParams.video_res_height,video_res_width:this.functionNameParams.video_res_width,webrtc:this.functionNameParams.webrtc}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),n=new WebSocket(t);await new Promise(((e,t)=>{const s=()=>{r(),e()},o=e=>{r(),t(new Error("WebSocket error"))},r=()=>{n.removeEventListener("open",s),n.removeEventListener("error",o)};n.addEventListener("open",s),n.addEventListener("error",o)}));const o=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(o)try{const e={type:"headers",headers:{Authorization:`Bearer ${o}`}};n.send(JSON.stringify(e))}catch{}return this.ws=n,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(t){try{const s=e.serialize(t);this.ws.send(s)}catch{this.ws.send(JSON.stringify(t))}}recv(e=6e4){return new Promise(((t,s)=>{const n=setTimeout((()=>{a(),s(new Error("timeout"))}),e),o=e=>{a(),s(new Error("WebSocket error"))},r=e=>{a();try{const s=this.parseMessage(e);t(s)}catch(e){s(e)}},a=()=>{clearTimeout(n),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",o)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",o)}))}close(){this.ws.close()}parseMessage(t){const s=t?.data;if("string"==typeof s)return JSON.parse(s);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(s)){const t=s;try{return JSON.parse(t.toString("utf8"))}catch{}return e.deserialize(t)}if(s instanceof ArrayBuffer){const t=new Uint8Array(s);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}if(h(s)){const t=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch{}return e.deserialize(t)}return s}}async function l({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/shortlinks"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function N({client:e,limit:t,page_token:n,sort_by:o,role:a}){const c="/org/members"+s({limit:t,page_token:n,sort_by:o,role:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};_&&(p.Authorization=`Bearer ${_}`);const O={method:"GET",headers:p},T=e?.fetch||fetch,v=await T(i,O);await r(v);return await v.json()}async function y({client:e,limit:t,page_token:n,sort_by:o}){const a="/orgs"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function w({client:e,limit:t,page_token:n,sort_by:o}){const a="/org/service-accounts"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function P({client:e,limit:t,page_token:n,sort_by:o}){const a="/user/shortlinks"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function m({client:e,limit:t,page_token:n,sort_by:o}){const a="/users"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}async function Z({client:e,limit:t,page_token:n,sort_by:o}){const a="/users-extended"+s({limit:t,page_token:n,sort_by:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);await r(T);return await T.json()}const S={get_api_call:async function({client:e,id:t}){const n=`/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_for_org:async function({client:e,id:t}){const n=`/org/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_for_user:async function({client:e,id:t}){const n=`/user/api-calls/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_api_call_metrics:async function({client:e,group_by:t}){const n="/api-call-metrics"+s({group_by:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_async_operation:async function({client:e,id:t}){const n=`/async/operations/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_api_calls:i,list_api_calls_for_user:_,list_api_calls_for_user_pager:function(e){return c(_,e,"page_token")},list_api_calls_pager:function(e){return c(i,e,"page_token")},list_async_operations:p,list_async_operations_pager:function(e){return c(p,e,"page_token")},org_list_api_calls:O,org_list_api_calls_pager:function(e){return c(O,e,"page_token")},user_list_api_calls:T,user_list_api_calls_pager:function(e){return c(T,e,"page_token")}},b={create_api_token_for_user:async function({client:e,label:t}){const n="/user/api-tokens"+s({label:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_api_token_for_user:async function({client:e,token:t}){const n=`/user/api-tokens/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_api_token_for_user:async function({client:e,token:t}){const n=`/user/api-tokens/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_api_tokens_for_user:v,list_api_tokens_for_user_pager:function(e){return c(v,e,"page_token")}},C={apps_github_callback:async function({client:e}={}){const t="/apps/github/callback"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},apps_github_consent:async function({client:e}={}){const t="/apps/github/consent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},apps_github_webhook:async function({client:e,body:t}){const n="/apps/github/webhook"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/octet-stream";const i={method:"POST",headers:c,body:t},_=e?.fetch||fetch,p=await _(o,i);await r(p)}},g={create_executor_term:e=>new A(e),create_file_execution:async function({client:e,lang:t,output:n,body:o}){const a=`/file/execute/${t}`+s({output:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},U={create_file_center_of_mass:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/center-of-mass"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_conversion:async function({client:e,output_format:t,src_format:n,body:o}){const a=`/file/conversion/${n}/${t}`+s({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_conversion_options:async function({client:e,files:t,body:n}){const o="/file/conversion"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},create_file_density:async function({client:e,material_mass:t,material_mass_unit:n,output_unit:o,src_format:a,body:c}){const i="/file/density"+s({material_mass:t,material_mass_unit:n,output_unit:o,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},create_file_mass:async function({client:e,material_density:t,material_density_unit:n,output_unit:o,src_format:a,body:c}){const i="/file/mass"+s({material_density:t,material_density_unit:n,output_unit:o,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`),O["Content-Type"]="application/octet-stream";const T={method:"POST",headers:O,body:c},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},create_file_surface_area:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/surface-area"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_file_volume:async function({client:e,output_unit:t,src_format:n,body:o}){const a="/file/volume"+s({output_unit:t,src_format:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const p={method:"POST",headers:_,body:o},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},D={community_sso:async function({client:e,sig:t,sso:n}){const o="/community/sso"+s({sig:t,sso:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},create_debug_uploads:async function({client:e,files:t}){const n="/debug/uploads"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i=new FormData;t.forEach((e=>{i.append(e.name,e.data,e.name)}));const _={method:"POST",headers:c,body:i},p=e?.fetch||fetch,O=await p(o,_);return await r(O),await O.json()},create_event:async function({client:e,files:t,body:n}){const o="/events"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);await r(T)},get_ipinfo:async function({client:e}={}){const t="/_meta/ipinfo"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_pricing_subscriptions:async function({client:e}={}){const t="/pricing/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_schema:async function({client:e}={}){const t="/"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},internal_get_api_token_for_discord_user:async function({client:e,discord_id:t}){const n=`/internal/discord/api-token/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},ping:async function({client:e}={}){const t="/ping"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()}},B={create_kcl_code_completions:async function({client:e,body:t}){const n="/ml/kcl/completions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_proprietary_to_kcl:async function({client:e,files:t,code_option:n}){const o="/ml/convert/proprietary-to-kcl"+s({code_option:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)}));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},create_text_to_cad:async function({client:e,output_format:t,kcl:n,body:o}){const a=`/ai/text-to-cad/${t}`+s({kcl:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"POST",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},create_text_to_cad_iteration:async function({client:e,body:t}){const n="/ml/text-to-cad/iteration"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_text_to_cad_multi_file_iteration:async function({client:e,files:t,body:n}){const o="/ml/text-to-cad/multi-file/iteration"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(n));const p={method:"POST",headers:i,body:_},O=e?.fetch||fetch,T=await O(a,p);return await r(T),await T.json()},create_text_to_cad_part_feedback:async function({client:e,id:t,feedback:n}){const o=`/user/text-to-cad/${t}`+s({feedback:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},p=e?.fetch||fetch,O=await p(a,_);await r(O)},get_ml_prompt:async function({client:e,id:t}){const n=`/ml-prompts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_text_to_cad_parts_for_user:async function({client:e,id:t}){const n=`/user/text-to-cad/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_conversations_for_user:d,list_conversations_for_user_pager:function(e){return c(d,e,"page_token")},list_ml_prompts:K,list_ml_prompts_pager:function(e){return c(K,e,"page_token")},list_text_to_cad_parts_for_user:f,list_text_to_cad_parts_for_user_pager:function(e){return c(f,e,"page_token")},ml_copilot_ws:e=>new u(e),ml_reasoning_ws:e=>new E(e)},z={modeling_commands_ws:e=>new I(e)},Y={device_access_token:async function({client:e,body:t}){const o="/oauth2/device/token"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},device_auth_confirm:async function({client:e,body:t}){const n="/oauth2/device/confirm"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},device_auth_request:async function({client:e,body:t}){const o="/oauth2/device/auth"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},device_auth_verify:async function({client:e,app_name:t,user_code:n}){const o="/oauth2/device/verify"+s({app_name:t,user_code:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},oauth2_provider_callback:async function({client:e,provider:t,code:n,id_token:o,state:a,user:c}){const i=`/oauth2/provider/${t}/callback`+s({code:n,id_token:o,state:a,user:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};p&&(O.Authorization=`Bearer ${p}`);const T={method:"GET",headers:O},v=e?.fetch||fetch,h=await v(_,T);return await r(h),await h.json()},oauth2_provider_callback_post:async function({client:e,provider:t,body:o}){const a=`/oauth2/provider/${t}/callback`+s({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/x-www-form-urlencoded";const p={method:"POST",headers:_,body:n(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},oauth2_provider_consent:async function({client:e,provider:t,callback_url:n}){const o=`/oauth2/provider/${t}/consent`+s({callback_url:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},oauth2_token_revoke:async function({client:e,body:t}){const o="/oauth2/token/revoke"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:n(t)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()}},k={create_org:async function({client:e,body:t}){const n="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_org_member:async function({client:e,body:t}){const n="/org/members"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_org_saml_idp:async function({client:e,body:t}){const n="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_org:async function({client:e}={}){const t="/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_org_member:async function({client:e,user_id:t}){const n=`/org/members/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},delete_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},get_any_org:async function({client:e,id:t}){const n=`/orgs/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_org:async function({client:e}={}){const t="/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_member:async function({client:e,user_id:t}){const n=`/org/members/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_org_privacy_settings:async function({client:e}={}){const t="/org/privacy"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_org_shortlinks:l,get_org_shortlinks_pager:function(e){return c(l,e,"page_token")},get_user_org:async function({client:e}={}){const t="/user/org"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_org_members:N,list_org_members_pager:function(e){return c(N,e,"page_token")},list_orgs:y,list_orgs_pager:function(e){return c(y,e,"page_token")},update_enterprise_pricing_for_org:async function({client:e,id:t,body:n}){const o=`/orgs/${t}/enterprise/pricing`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_org:async function({client:e,body:t}){const n="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_org_member:async function({client:e,user_id:t,body:n}){const o=`/org/members/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_org_privacy_settings:async function({client:e,body:t}){const n="/org/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_org_saml_idp:async function({client:e,body:t}){const n="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()}},$={create_org_subscription:async function({client:e,body:t}){const n="/org/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_information_for_org:async function({client:e,body:t}){const n="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_information_for_user:async function({client:e,body:t}){const n="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},create_payment_intent_for_org:async function({client:e}={}){const t="/org/payment/intent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},create_payment_intent_for_user:async function({client:e}={}){const t="/user/payment/intent"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},create_user_subscription:async function({client:e,body:t}){const n="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_payment_method_for_org:async function({client:e,id:t}){const n=`/org/payment/methods/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},delete_payment_method_for_user:async function({client:e,id:t}){const n=`/user/payment/methods/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_org_subscription:async function({client:e}={}){const t="/org/payment/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_payment_balance_for_any_org:async function({client:e,include_total_due:t,id:n}){const o=`/orgs/${n}/payment/balance`+s({include_total_due:t}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},get_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:n}){const o=`/users/${t}/payment/balance`+s({include_total_due:n}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},get_payment_balance_for_org:async function({client:e,include_total_due:t}){const n="/org/payment/balance"+s({include_total_due:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_payment_balance_for_user:async function({client:e,include_total_due:t}){const n="/user/payment/balance"+s({include_total_due:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_subscription:async function({client:e}={}){const t="/user/payment/subscriptions"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_invoices_for_org:async function({client:e}={}){const t="/org/payment/invoices"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_invoices_for_user:async function({client:e}={}){const t="/user/payment/invoices"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_payment_methods_for_org:async function({client:e}={}){const t="/org/payment/methods"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},list_payment_methods_for_user:async function({client:e}={}){const t="/user/payment/methods"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},update_org_subscription:async function({client:e,body:t}){const n="/org/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_payment_balance_for_any_org:async function({client:e,id:t,include_total_due:n,body:o}){const a=`/orgs/${t}/payment/balance`+s({include_total_due:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},update_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:n,body:o}){const a=`/users/${t}/payment/balance`+s({include_total_due:n}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const p={method:"PUT",headers:_,body:JSON.stringify(o)},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},update_payment_information_for_org:async function({client:e,body:t}){const n="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_payment_information_for_user:async function({client:e,body:t}){const n="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_subscription:async function({client:e,body:t}){const n="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},validate_customer_tax_information_for_org:async function({client:e}={}){const t="/org/payment/tax"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},validate_customer_tax_information_for_user:async function({client:e}={}){const t="/user/payment/tax"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)}},L={create_service_account_for_org:async function({client:e,label:t}){const n="/org/service-accounts"+s({label:t}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_service_account_for_org:async function({client:e,token:t}){const n=`/org/service-accounts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_service_account_for_org:async function({client:e,token:t}){const n=`/org/service-accounts/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},list_service_accounts_for_org:w,list_service_accounts_for_org_pager:function(e){return c(w,e,"page_token")}},j={create_store_coupon:async function({client:e,body:t}){const n="/store/coupon"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()}},H={get_angle_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/angle/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_area_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/area/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_current_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/current/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_energy_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/energy/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_force_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/force/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_frequency_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/frequency/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_length_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/length/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_mass_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/mass/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_power_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/power/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_pressure_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/pressure/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_temperature_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/temperature/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_torque_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/torque/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()},get_volume_unit_conversion:async function({client:e,input_unit:t,output_unit:n,value:o}){const a=`/unit/conversion/volume/${t}/${n}`+s({value:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const p={method:"GET",headers:_},O=e?.fetch||fetch,T=await O(c,p);return await r(T),await T.json()}},R={create_user_shortlink:async function({client:e,body:t}){const n="/user/shortlinks"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},delete_user_self:async function({client:e}={}){const t="/user"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(n,c);await r(_)},delete_user_shortlink:async function({client:e,key:t}){const n=`/user/shortlinks/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,p=await _(o,i);await r(p)},get_oauth2_providers_for_user:async function({client:e}={}){const t="/user/oauth2/providers"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_session_for_user:async function({client:e,token:t}){const n=`/user/session/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user:async function({client:e,id:t}){const n=`/users/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user_extended:async function({client:e,id:t}){const n=`/users-extended/${t}`+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},get_user_privacy_settings:async function({client:e}={}){const t="/user/privacy"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_self:async function({client:e}={}){const t="/user"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_self_extended:async function({client:e}={}){const t="/user/extended"+s({}),n=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,o=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};o&&(a.Authorization=`Bearer ${o}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(n,c);return await r(_),await _.json()},get_user_shortlinks:P,get_user_shortlinks_pager:function(e){return c(P,e,"page_token")},list_users:m,list_users_extended:Z,list_users_extended_pager:function(e){return c(Z,e,"page_token")},list_users_pager:function(e){return c(m,e,"page_token")},patch_user_crm:async function({client:e,body:t}){const n="/user/crm"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PATCH",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_public_form:async function({client:e,body:t}){const n="/website/form"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_public_subscribe:async function({client:e,body:t}){const n="/website/subscribe"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},put_user_form_self:async function({client:e,body:t}){const n="/user/form"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);await r(p)},update_subscription_for_user:async function({client:e,id:t,body:n}){const o=`/users/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);return await r(O),await O.json()},update_user_privacy_settings:async function({client:e,body:t}){const n="/user/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_self:async function({client:e,body:t}){const n="/user"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+n,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,p=await _(o,i);return await r(p),await p.json()},update_user_shortlink:async function({client:e,key:t,body:n}){const o=`/user/shortlinks/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(n)},p=e?.fetch||fetch,O=await p(a,_);await r(O)}};export{o as ApiError,t as Client,a as Pager,S as api_calls,b as api_tokens,C as apps,c as createPager,g as executor,U as file,D as meta,B as ml,z as modeling,Y as oauth2,k as orgs,$ as payments,L as service_accounts,j as store,H as unit,R as users};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ml-create_text_to_cad_part_feedback.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ml-create_text_to_cad_part_feedback.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/gen/ml-create_text_to_cad_part_feedback.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ml-get_text_to_cad_parts_for_user.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ml-get_text_to_cad_parts_for_user.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/gen/ml-get_text_to_cad_parts_for_user.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare function example_pager(): Promise<number>;
2
+ //# sourceMappingURL=ml-list_text_to_cad_parts_for_user.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ml-list_text_to_cad_parts_for_user.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/gen/ml-list_text_to_cad_parts_for_user.test.ts"],"names":[],"mappings":"AAcA,wBAAsB,aAAa,oBAelC"}
@@ -10,7 +10,7 @@ declare type CreateTextToCadReturn = TextToCad;
10
10
  /**
11
11
  * Generate a CAD model from text.
12
12
  *
13
- * Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models.
13
+ * Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated parts. Any other formats you request here will also be returned when you list your generated parts.
14
14
  *
15
15
  * This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
16
16
  *
@@ -10,7 +10,7 @@ declare type CreateTextToCadMultiFileIterationReturn = TextToCadMultiFileIterati
10
10
  /**
11
11
  * Iterate on a multi-file CAD model with a prompt.
12
12
  *
13
- * This endpoint can iterate on multi-file models.
13
+ * This endpoint can iterate on multi-file projects.
14
14
  *
15
15
  * Even if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.
16
16
  *
@@ -1,11 +1,11 @@
1
1
  import { Client } from '../../client.js';
2
2
  import { MlFeedback } from '../../models.js';
3
- interface CreateTextToCadModelFeedbackInput {
3
+ interface CreateTextToCadPartFeedbackInput {
4
4
  client?: Client;
5
5
  id: string;
6
6
  feedback: MlFeedback;
7
7
  }
8
- declare type CreateTextToCadModelFeedbackReturn = void;
8
+ declare type CreateTextToCadPartFeedbackReturn = void;
9
9
  /**
10
10
  * Give feedback to a specific ML response.
11
11
  *
@@ -19,8 +19,8 @@ declare type CreateTextToCadModelFeedbackReturn = void;
19
19
  * @property {Client} [client] Optional client with auth token.
20
20
  * @property {string} id The id of the model to give feedback to. (path)
21
21
  * @property {MlFeedback} feedback The feedback. (query)
22
- * @returns {Promise<CreateTextToCadModelFeedbackReturn>} resource updated
22
+ * @returns {Promise<CreateTextToCadPartFeedbackReturn>} resource updated
23
23
  */
24
- export default function create_text_to_cad_model_feedback({ client, id, feedback, }: CreateTextToCadModelFeedbackInput): Promise<CreateTextToCadModelFeedbackReturn>;
24
+ export default function create_text_to_cad_part_feedback({ client, id, feedback, }: CreateTextToCadPartFeedbackInput): Promise<CreateTextToCadPartFeedbackReturn>;
25
25
  export {};
26
- //# sourceMappingURL=create_text_to_cad_model_feedback.d.ts.map
26
+ //# sourceMappingURL=create_text_to_cad_part_feedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create_text_to_cad_part_feedback.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/create_text_to_cad_part_feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,UAAU,gCAAgC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,UAAU,CAAA;CACrB;AAED,aAAK,iCAAiC,GAAG,IAAI,CAAA;AAE7C;;;;;;;;;;;;;;GAcG;AACH,wBAA8B,gCAAgC,CAAC,EAC7D,MAAM,EACN,EAAE,EACF,QAAQ,GACT,EAAE,gCAAgC,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAiC/E"}
@@ -1,10 +1,10 @@
1
1
  import { Client } from '../../client.js';
2
2
  import { TextToCadResponse } from '../../models.js';
3
- interface GetTextToCadModelForUserInput {
3
+ interface GetTextToCadPartsForUserInput {
4
4
  client?: Client;
5
5
  id: string;
6
6
  }
7
- declare type GetTextToCadModelForUserReturn = TextToCadResponse;
7
+ declare type GetTextToCadPartsForUserReturn = TextToCadResponse;
8
8
  /**
9
9
  * Get a text-to-CAD response.
10
10
  *
@@ -15,10 +15,10 @@ declare type GetTextToCadModelForUserReturn = TextToCadResponse;
15
15
  * @param params Function parameters.
16
16
  * @property {Client} [client] Optional client with auth token.
17
17
  * @property {string} id The id of the model to give feedback to. (path)
18
- * @returns {Promise<GetTextToCadModelForUserReturn>} successful operation
18
+ * @returns {Promise<GetTextToCadPartsForUserReturn>} successful operation
19
19
  *
20
20
  * Possible return types: TextToCadResponse
21
21
  */
22
- export default function get_text_to_cad_model_for_user({ client, id, }: GetTextToCadModelForUserInput): Promise<GetTextToCadModelForUserReturn>;
22
+ export default function get_text_to_cad_parts_for_user({ client, id, }: GetTextToCadPartsForUserInput): Promise<GetTextToCadPartsForUserReturn>;
23
23
  export {};
24
- //# sourceMappingURL=get_text_to_cad_model_for_user.d.ts.map
24
+ //# sourceMappingURL=get_text_to_cad_parts_for_user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get_text_to_cad_model_for_user.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/get_text_to_cad_model_for_user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,UAAU,6BAA6B;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,EAAE,EAAE,MAAM,CAAA;CACX;AAED,aAAK,8BAA8B,GAAG,iBAAiB,CAAA;AAEvD;;;;;;;;;;;;;GAaG;AACH,wBAA8B,8BAA8B,CAAC,EAC3D,MAAM,EACN,EAAE,GACH,EAAE,6BAA6B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAkCzE"}
1
+ {"version":3,"file":"get_text_to_cad_parts_for_user.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/get_text_to_cad_parts_for_user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,UAAU,6BAA6B;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,EAAE,EAAE,MAAM,CAAA;CACX;AAED,aAAK,8BAA8B,GAAG,iBAAiB,CAAA;AAEvD;;;;;;;;;;;;;GAaG;AACH,wBAA8B,8BAA8B,CAAC,EAC3D,MAAM,EACN,EAAE,GACH,EAAE,6BAA6B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAkCzE"}
@@ -1,7 +1,7 @@
1
1
  import { Client } from '../../client.js';
2
2
  import { Pager } from '../../pagination.js';
3
3
  import { TextToCadResponseResultsPage, CreatedAtSortMode, Uuid, TextToCadResponse } from '../../models.js';
4
- interface ListTextToCadModelsForUserInput {
4
+ interface ListTextToCadPartsForUserInput {
5
5
  client?: Client;
6
6
  limit?: number;
7
7
  page_token?: string;
@@ -9,15 +9,15 @@ interface ListTextToCadModelsForUserInput {
9
9
  conversation_id?: Uuid;
10
10
  no_models?: boolean;
11
11
  }
12
- declare type ListTextToCadModelsForUserReturn = TextToCadResponseResultsPage;
12
+ declare type ListTextToCadPartsForUserReturn = TextToCadResponseResultsPage;
13
13
  /**
14
- * List text-to-CAD models you've generated.
14
+ * List text-to-CAD parts you've generated.
15
15
  *
16
16
  * This will always return the STEP file contents as well as the format the user originally requested.
17
17
  *
18
- * This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.
18
+ * This endpoint requires authentication by any Zoo user. It returns the text-to-CAD parts for the authenticated user.
19
19
  *
20
- * The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.
20
+ * The text-to-CAD parts are returned in order of creation, with the most recently created text-to-CAD parts first.
21
21
  *
22
22
  * Tags: ml
23
23
  *
@@ -27,12 +27,12 @@ declare type ListTextToCadModelsForUserReturn = TextToCadResponseResultsPage;
27
27
  * @property {string} page_token Token returned by previous call to retrieve the subsequent page (query)
28
28
  * @property {CreatedAtSortMode} sort_by (query)
29
29
  * @property {Uuid} conversation_id If specified, only return the prompts for the conversation id given. (query)
30
- * @property {boolean} no_models If we should return the model file contents or just the metadata. (query)
31
- * @returns {Promise<ListTextToCadModelsForUserReturn>} successful operation
30
+ * @property {boolean} no_models If we should return the part contents or just the metadata. (query)
31
+ * @returns {Promise<ListTextToCadPartsForUserReturn>} successful operation
32
32
  *
33
33
  * Possible return types: TextToCadResponseResultsPage
34
34
  */
35
- export default function list_text_to_cad_models_for_user({ client, limit, page_token, sort_by, conversation_id, no_models, }: ListTextToCadModelsForUserInput): Promise<ListTextToCadModelsForUserReturn>;
36
- export declare function list_text_to_cad_models_for_user_pager(params: ListTextToCadModelsForUserInput): Pager<ListTextToCadModelsForUserInput, ListTextToCadModelsForUserReturn, TextToCadResponse>;
35
+ export default function list_text_to_cad_parts_for_user({ client, limit, page_token, sort_by, conversation_id, no_models, }: ListTextToCadPartsForUserInput): Promise<ListTextToCadPartsForUserReturn>;
36
+ export declare function list_text_to_cad_parts_for_user_pager(params: ListTextToCadPartsForUserInput): Pager<ListTextToCadPartsForUserInput, ListTextToCadPartsForUserReturn, TextToCadResponse>;
37
37
  export {};
38
- //# sourceMappingURL=list_text_to_cad_models_for_user.d.ts.map
38
+ //# sourceMappingURL=list_text_to_cad_parts_for_user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list_text_to_cad_parts_for_user.d.ts","sourceRoot":"","sources":["../../../../../src/api/ml/list_text_to_cad_parts_for_user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAEpD,OAAO,EAAE,KAAK,EAAe,MAAM,qBAAqB,CAAA;AAExD,OAAO,EACL,4BAA4B,EAC5B,iBAAiB,EACjB,IAAI,EACJ,iBAAiB,EAClB,MAAM,iBAAiB,CAAA;AAExB,UAAU,8BAA8B;IACtC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAC3B,eAAe,CAAC,EAAE,IAAI,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,aAAK,+BAA+B,GAAG,4BAA4B,CAAA;AAEnE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAA8B,+BAA+B,CAAC,EAC5D,MAAM,EACN,KAAK,EACL,UAAU,EACV,OAAO,EACP,eAAe,EACf,SAAS,GACV,EAAE,8BAA8B,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAwC3E;AAED,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,8BAA8B,GACrC,KAAK,CACN,8BAA8B,EAC9B,+BAA+B,EAC/B,iBAAiB,CAClB,CAMA"}