@kittycad/lib 3.1.45 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -1
- package/dist/mjs/index.js +1 -1
- package/dist/types/__tests__/gen/api-calls-list_api_calls.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/api-calls-list_api_calls_for_user.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/api-calls-list_async_operations.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/api-calls-org_list_api_calls.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/api-calls-user_list_api_calls.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/api-tokens-list_api_tokens_for_user.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/ml-list_conversations_for_user.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/ml-list_ml_prompts.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/ml-list_text_to_cad_parts_for_user.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/orgs-get_org_shortlinks.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/orgs-list_org_members.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/orgs-list_orgs.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/orgs-search_org_dataset_conversions.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/service-accounts-list_service_accounts_for_org.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/users-get_user_shortlinks.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/users-list_users.test.d.ts.map +1 -1
- package/dist/types/__tests__/gen/users-list_users_extended.test.d.ts.map +1 -1
- package/dist/types/src/api/api-calls/get_api_call.d.ts.map +1 -1
- package/dist/types/src/api/api-calls/get_api_call_for_org.d.ts.map +1 -1
- package/dist/types/src/api/api-calls/get_api_call_for_user.d.ts.map +1 -1
- package/dist/types/src/api/api-calls/get_api_call_metrics.d.ts.map +1 -1
- package/dist/types/src/api/api-calls/get_async_operation.d.ts.map +1 -1
- package/dist/types/src/api/api-calls/list_api_calls.d.ts.map +1 -1
- package/dist/types/src/api/api-calls/list_api_calls_for_user.d.ts.map +1 -1
- package/dist/types/src/api/api-calls/list_async_operations.d.ts.map +1 -1
- package/dist/types/src/api/api-calls/org_list_api_calls.d.ts.map +1 -1
- package/dist/types/src/api/api-calls/user_list_api_calls.d.ts.map +1 -1
- package/dist/types/src/api/api-tokens/create_api_token_for_user.d.ts.map +1 -1
- package/dist/types/src/api/api-tokens/delete_api_token_for_user.d.ts.map +1 -1
- package/dist/types/src/api/api-tokens/get_api_token_for_user.d.ts.map +1 -1
- package/dist/types/src/api/api-tokens/list_api_tokens_for_user.d.ts.map +1 -1
- package/dist/types/src/api/apps/apps_github_callback.d.ts.map +1 -1
- package/dist/types/src/api/apps/apps_github_consent.d.ts.map +1 -1
- package/dist/types/src/api/apps/apps_github_webhook.d.ts.map +1 -1
- package/dist/types/src/api/executor/create_executor_term.d.ts.map +1 -1
- package/dist/types/src/api/executor/create_file_execution.d.ts.map +1 -1
- package/dist/types/src/api/file/create_file_center_of_mass.d.ts.map +1 -1
- package/dist/types/src/api/file/create_file_conversion.d.ts.map +1 -1
- package/dist/types/src/api/file/create_file_conversion_options.d.ts.map +1 -1
- package/dist/types/src/api/file/create_file_density.d.ts.map +1 -1
- package/dist/types/src/api/file/create_file_mass.d.ts.map +1 -1
- package/dist/types/src/api/file/create_file_surface_area.d.ts.map +1 -1
- package/dist/types/src/api/file/create_file_volume.d.ts.map +1 -1
- package/dist/types/src/api/meta/community_sso.d.ts.map +1 -1
- package/dist/types/src/api/meta/create_debug_uploads.d.ts.map +1 -1
- package/dist/types/src/api/meta/create_event.d.ts.map +1 -1
- package/dist/types/src/api/meta/get_ipinfo.d.ts.map +1 -1
- package/dist/types/src/api/meta/get_pricing_subscriptions.d.ts.map +1 -1
- package/dist/types/src/api/meta/get_schema.d.ts.map +1 -1
- package/dist/types/src/api/meta/internal_get_api_token_for_discord_user.d.ts.map +1 -1
- package/dist/types/src/api/meta/ping.d.ts.map +1 -1
- package/dist/types/src/api/ml/create_custom_model.d.ts.map +1 -1
- package/dist/types/src/api/ml/create_kcl_code_completions.d.ts.map +1 -1
- package/dist/types/src/api/ml/create_proprietary_to_kcl.d.ts.map +1 -1
- package/dist/types/src/api/ml/create_text_to_cad.d.ts.map +1 -1
- package/dist/types/src/api/ml/create_text_to_cad_iteration.d.ts.map +1 -1
- package/dist/types/src/api/ml/create_text_to_cad_multi_file_iteration.d.ts.map +1 -1
- package/dist/types/src/api/ml/create_text_to_cad_part_feedback.d.ts.map +1 -1
- package/dist/types/src/api/ml/get_custom_model.d.ts.map +1 -1
- package/dist/types/src/api/ml/get_ml_prompt.d.ts.map +1 -1
- package/dist/types/src/api/ml/get_text_to_cad_part_for_user.d.ts.map +1 -1
- package/dist/types/src/api/ml/list_conversations_for_user.d.ts.map +1 -1
- package/dist/types/src/api/ml/list_ml_prompts.d.ts.map +1 -1
- package/dist/types/src/api/ml/list_org_datasets_for_model.d.ts.map +1 -1
- package/dist/types/src/api/ml/list_text_to_cad_parts_for_user.d.ts.map +1 -1
- package/dist/types/src/api/ml/ml_copilot_ws.d.ts.map +1 -1
- package/dist/types/src/api/ml/ml_reasoning_ws.d.ts.map +1 -1
- package/dist/types/src/api/ml/update_custom_model.d.ts.map +1 -1
- package/dist/types/src/api/modeling/modeling_commands_ws.d.ts.map +1 -1
- package/dist/types/src/api/oauth2/device_access_token.d.ts.map +1 -1
- package/dist/types/src/api/oauth2/device_auth_confirm.d.ts.map +1 -1
- package/dist/types/src/api/oauth2/device_auth_request.d.ts.map +1 -1
- package/dist/types/src/api/oauth2/device_auth_verify.d.ts.map +1 -1
- package/dist/types/src/api/oauth2/oauth2_provider_callback.d.ts.map +1 -1
- package/dist/types/src/api/oauth2/oauth2_provider_callback_post.d.ts.map +1 -1
- package/dist/types/src/api/oauth2/oauth2_provider_consent.d.ts.map +1 -1
- package/dist/types/src/api/oauth2/oauth2_token_revoke.d.ts.map +1 -1
- package/dist/types/src/api/oauth2/verify_oauth_account_linking.d.ts.map +1 -1
- package/dist/types/src/api/orgs/create_org.d.ts.map +1 -1
- package/dist/types/src/api/orgs/create_org_dataset.d.ts.map +1 -1
- package/dist/types/src/api/orgs/create_org_member.d.ts.map +1 -1
- package/dist/types/src/api/orgs/create_org_saml_idp.d.ts.map +1 -1
- package/dist/types/src/api/orgs/delete_org.d.ts.map +1 -1
- package/dist/types/src/api/orgs/delete_org_dataset.d.ts.map +1 -1
- package/dist/types/src/api/orgs/delete_org_member.d.ts.map +1 -1
- package/dist/types/src/api/orgs/delete_org_saml_idp.d.ts.map +1 -1
- package/dist/types/src/api/orgs/download_org_dataset_conversion_original.d.ts.map +1 -1
- package/dist/types/src/api/orgs/download_org_dataset_successful_kcl_bulk.d.ts.map +1 -1
- package/dist/types/src/api/orgs/get_any_org.d.ts.map +1 -1
- package/dist/types/src/api/orgs/get_org.d.ts.map +1 -1
- package/dist/types/src/api/orgs/get_org_dataset.d.ts.map +1 -1
- package/dist/types/src/api/orgs/get_org_dataset_conversion.d.ts.map +1 -1
- package/dist/types/src/api/orgs/get_org_dataset_conversion_stats.d.ts.map +1 -1
- package/dist/types/src/api/orgs/get_org_member.d.ts.map +1 -1
- package/dist/types/src/api/orgs/get_org_privacy_settings.d.ts.map +1 -1
- package/dist/types/src/api/orgs/get_org_saml_idp.d.ts.map +1 -1
- package/dist/types/src/api/orgs/get_org_shortlinks.d.ts.map +1 -1
- package/dist/types/src/api/orgs/get_user_org.d.ts.map +1 -1
- package/dist/types/src/api/orgs/list_org_dataset_conversions.d.ts.map +1 -1
- package/dist/types/src/api/orgs/list_org_datasets.d.ts.map +1 -1
- package/dist/types/src/api/orgs/list_org_members.d.ts.map +1 -1
- package/dist/types/src/api/orgs/list_orgs.d.ts.map +1 -1
- package/dist/types/src/api/orgs/org_admin_details_get.d.ts.map +1 -1
- package/dist/types/src/api/orgs/org_dataset_s3_policies.d.ts.map +1 -1
- package/dist/types/src/api/orgs/retrigger_org_dataset.d.ts.map +1 -1
- package/dist/types/src/api/orgs/retrigger_org_dataset_conversion.d.ts.map +1 -1
- package/dist/types/src/api/orgs/search_org_dataset_conversions.d.ts.map +1 -1
- package/dist/types/src/api/orgs/update_org.d.ts.map +1 -1
- package/dist/types/src/api/orgs/update_org_dataset.d.ts.map +1 -1
- package/dist/types/src/api/orgs/update_org_member.d.ts.map +1 -1
- package/dist/types/src/api/orgs/update_org_privacy_settings.d.ts.map +1 -1
- package/dist/types/src/api/orgs/update_org_saml_idp.d.ts.map +1 -1
- package/dist/types/src/api/orgs/upload_org_dataset_files.d.ts.map +1 -1
- package/dist/types/src/api/payments/create_org_subscription.d.ts.map +1 -1
- package/dist/types/src/api/payments/create_payment_information_for_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/create_payment_information_for_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/create_payment_intent_for_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/create_payment_intent_for_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/create_user_subscription.d.ts.map +1 -1
- package/dist/types/src/api/payments/delete_payment_information_for_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/delete_payment_information_for_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/delete_payment_method_for_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/delete_payment_method_for_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/get_org_subscription.d.ts.map +1 -1
- package/dist/types/src/api/payments/get_payment_balance_for_any_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/get_payment_balance_for_any_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/get_payment_balance_for_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/get_payment_balance_for_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/get_payment_information_for_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/get_payment_information_for_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/get_user_subscription.d.ts.map +1 -1
- package/dist/types/src/api/payments/list_invoices_for_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/list_invoices_for_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/list_payment_methods_for_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/list_payment_methods_for_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/set_default_payment_method_for_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/update_org_subscription.d.ts.map +1 -1
- package/dist/types/src/api/payments/update_org_subscription_for_any_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/update_payment_balance_for_any_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/update_payment_balance_for_any_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/update_payment_information_for_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/update_payment_information_for_user.d.ts.map +1 -1
- package/dist/types/src/api/payments/update_user_subscription.d.ts.map +1 -1
- package/dist/types/src/api/payments/upsert_subscription_plan_price.d.ts.map +1 -1
- package/dist/types/src/api/payments/validate_customer_tax_information_for_org.d.ts.map +1 -1
- package/dist/types/src/api/payments/validate_customer_tax_information_for_user.d.ts.map +1 -1
- package/dist/types/src/api/service-accounts/create_service_account_for_org.d.ts.map +1 -1
- package/dist/types/src/api/service-accounts/delete_service_account_for_org.d.ts.map +1 -1
- package/dist/types/src/api/service-accounts/get_service_account_for_org.d.ts.map +1 -1
- package/dist/types/src/api/service-accounts/list_service_accounts_for_org.d.ts.map +1 -1
- package/dist/types/src/api/store/create_store_coupon.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_angle_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_area_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_current_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_energy_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_force_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_frequency_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_length_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_mass_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_power_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_pressure_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_temperature_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_torque_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/unit/get_volume_unit_conversion.d.ts.map +1 -1
- package/dist/types/src/api/users/create_user_shortlink.d.ts.map +1 -1
- package/dist/types/src/api/users/delete_user_self.d.ts.map +1 -1
- package/dist/types/src/api/users/delete_user_shortlink.d.ts.map +1 -1
- package/dist/types/src/api/users/get_oauth2_providers_for_user.d.ts.map +1 -1
- package/dist/types/src/api/users/get_session_for_user.d.ts.map +1 -1
- package/dist/types/src/api/users/get_user.d.ts +3 -3
- package/dist/types/src/api/users/get_user.d.ts.map +1 -1
- package/dist/types/src/api/users/get_user_extended.d.ts.map +1 -1
- package/dist/types/src/api/users/get_user_privacy_settings.d.ts.map +1 -1
- package/dist/types/src/api/users/get_user_self.d.ts +3 -3
- package/dist/types/src/api/users/get_user_self.d.ts.map +1 -1
- package/dist/types/src/api/users/get_user_self_extended.d.ts.map +1 -1
- package/dist/types/src/api/users/get_user_shortlinks.d.ts.map +1 -1
- package/dist/types/src/api/users/list_users.d.ts +4 -4
- package/dist/types/src/api/users/list_users.d.ts.map +1 -1
- package/dist/types/src/api/users/list_users_extended.d.ts.map +1 -1
- package/dist/types/src/api/users/put_public_email_marketing_consent_request.d.ts.map +1 -1
- package/dist/types/src/api/users/put_public_sales_form.d.ts.map +1 -1
- package/dist/types/src/api/users/put_public_support_form.d.ts.map +1 -1
- package/dist/types/src/api/users/put_user_cad_user_info_form.d.ts.map +1 -1
- package/dist/types/src/api/users/update_subscription_for_user.d.ts.map +1 -1
- package/dist/types/src/api/users/update_user_privacy_settings.d.ts.map +1 -1
- package/dist/types/src/api/users/update_user_self.d.ts +3 -3
- package/dist/types/src/api/users/update_user_self.d.ts.map +1 -1
- package/dist/types/src/api/users/update_user_shortlink.d.ts.map +1 -1
- package/dist/types/src/api/users/user_admin_details_get.d.ts.map +1 -1
- package/dist/types/src/api/users/user_email_marketing_consent_decline_post.d.ts.map +1 -1
- package/dist/types/src/api/users/user_email_marketing_consent_get.d.ts.map +1 -1
- package/dist/types/src/api/users/user_email_marketing_consent_request_post.d.ts.map +1 -1
- package/dist/types/src/api/users/user_email_marketing_consent_seen_post.d.ts.map +1 -1
- package/dist/types/src/api/users/user_features_get.d.ts.map +1 -1
- package/dist/types/src/client.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/models.d.ts +63 -61
- package/dist/types/src/models.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/__tests__/gen/users-put_public_sales_form.test.d.ts +0 -2
- package/dist/types/__tests__/gen/users-put_public_sales_form.test.d.ts.map +0 -1
- package/dist/types/__tests__/gen/users-put_public_support_form.test.d.ts +0 -2
- package/dist/types/__tests__/gen/users-put_public_support_form.test.d.ts.map +0 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("bson");try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?.node){new Function("m","return import(m)")("cross-fetch/polyfill").catch((()=>{}))}}catch{}function s(e){const s=new URLSearchParams;for(const[t,o]of Object.entries(e))if(void 0!==o)if(Array.isArray(o))for(const e of o)s.append(t,String(e));else s.append(t,String(o));const t=s.toString();return t?`?${t}`:""}function t(e){const s=new URLSearchParams;for(const[t,o]of Object.entries(e||{}))if(void 0!==o)if(Array.isArray(o))for(const e of o)s.append(t,String(e));else s.append(t,String(o));return s}try{if("undefined"!=typeof process&&process.versions?.node&&"win32"===process.platform){new Function("m","return import(m)")("win-ca")}}catch{}class o extends Error{constructor(e,s,t){super(t||s?.message||`HTTP ${e}`),this.name="ApiError",this.status=e,this.error_code=s?.error_code,this.request_id=s?.request_id,this.body=s}}async function n(e){if(e.ok)return;let s;try{s=await e.json()}catch{try{const t=await e.text();s=t?{message:t}:void 0}catch{s=void 0}}throw new o(e.status,s)}class r{started=!1;constructor(e,s,t="page_token"){this.fetchPage=e,this.baseParams={...s},this.tokenField=t}hasNext(){return!this.started||!!this.nextToken}reset(){this.started=!1,this.nextToken=void 0}async next(){if(this.started&&!this.nextToken)return[];const e={...this.baseParams};this.started&&this.nextToken&&(e[this.tokenField]=this.nextToken);const s=await this.fetchPage(e);return this.started=!0,this.nextToken=s?.next_page??null,s?.items??[]}}function a(e,s,t="page_token"){return new r(e,s,t)}async function c({client:e,limit:t,page_token:o,sort_by:r}){const a="/api-calls"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function i({client:e,id:t,limit:o,page_token:r,sort_by:a}){const c=`/users/${t}/api-calls`+s({limit:o,page_token:r,sort_by:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};_&&(O.Authorization=`Bearer ${_}`);const p={method:"GET",headers:O},T=e?.fetch||fetch,v=await T(i,p);await n(v);return await v.json()}async function _({client:e,limit:t,page_token:o,sort_by:r,status:a}){const c="/async/operations"+s({limit:t,page_token:o,sort_by:r,status:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};_&&(O.Authorization=`Bearer ${_}`);const p={method:"GET",headers:O},T=e?.fetch||fetch,v=await T(i,p);await n(v);return await v.json()}async function O({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/api-calls"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function p({client:e,limit:t,page_token:o,sort_by:r}){const a="/user/api-calls"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function T({client:e,limit:t,page_token:o,sort_by:r}){const a="/user/api-tokens"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}function v(e){return!!e&&"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer&&"number"==typeof e.byteOffset&&"number"==typeof e.byteLength}class h{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/executor/term"+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(t);await new Promise(((e,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}class A{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/ml/copilot"+s({conversation_id:this.functionNameParams.conversation_id,replay:this.functionNameParams.replay,pr:this.functionNameParams.pr}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(t);await new Promise(((e,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}class u{constructor(e){this.functionNameParams=e}async connect(){const e=`/ws/ml/reasoning/${this.functionNameParams.id}`+s({}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(t);await new Promise(((e,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}async function d({client:e,limit:t,page_token:o,sort_by:r}){const a="/ml/conversations"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function E({client:e,limit:t,page_token:o,sort_by:r}){const a="/ml-prompts"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function K({client:e,limit:t,page_token:o,sort_by:r,conversation_id:a,no_models:c,no_parts:i}){const _="/user/text-to-cad"+s({limit:t,page_token:o,sort_by:r,conversation_id:a,no_models:c,no_parts:i}),O=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+_,p=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",T={};p&&(T.Authorization=`Bearer ${p}`);const v={method:"GET",headers:T},h=e?.fetch||fetch,A=await h(O,v);await n(A);return await A.json()}class f{constructor(e){this.functionNameParams=e}async connect(){const e="/ws/modeling/commands"+s({api_call_id:this.functionNameParams.api_call_id,fps:this.functionNameParams.fps,order_independent_transparency:this.functionNameParams.order_independent_transparency,pool:this.functionNameParams.pool,post_effect:this.functionNameParams.post_effect,replay:this.functionNameParams.replay,show_grid:this.functionNameParams.show_grid,unlocked_framerate:this.functionNameParams.unlocked_framerate,video_res_height:this.functionNameParams.video_res_height,video_res_width:this.functionNameParams.video_res_width,webrtc:this.functionNameParams.webrtc,pr:this.functionNameParams.pr}),t=((this.functionNameParams?.client?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+e).replace(/^http/,"ws"),o=new WebSocket(t);await new Promise(((e,s)=>{const t=()=>{r(),e()},n=e=>{r(),s(new Error("WebSocket error"))},r=()=>{o.removeEventListener("open",t),o.removeEventListener("error",n)};o.addEventListener("open",t),o.addEventListener("error",n)}));const n=this.functionNameParams?.client?this.functionNameParams.client?.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"";if(n)try{const e={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(e))}catch{}return this.ws=o,this}send(e){this.ws.send(JSON.stringify(e))}sendBinary(s){try{const t=e.BSON.serialize(s);this.ws.send(t)}catch{this.ws.send(JSON.stringify(s))}}recv(e=6e4){return new Promise(((s,t)=>{const o=setTimeout((()=>{a(),t(new Error("timeout"))}),e),n=e=>{a(),t(new Error("WebSocket error"))},r=e=>{a();try{const t=this.parseMessage(e);s(t)}catch(e){t(e)}},a=()=>{clearTimeout(o),this.ws.removeEventListener("message",r),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",r),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(s){const t=s?.data;if("string"==typeof t)return JSON.parse(t);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)){const s=t;try{return JSON.parse(s.toString("utf8"))}catch{}return e.BSON.deserialize(s)}if(t instanceof ArrayBuffer){const s=new Uint8Array(t);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}if(v(t)){const s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{const e=(new TextDecoder).decode(s);return JSON.parse(e)}catch{}return e.BSON.deserialize(s)}return t}}async function I({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/shortlinks"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function l({client:e,id:t,filter:o,limit:r,page_token:a,sort_by:c}){const i=`/org/datasets/${t}/conversions`+s({filter:o,limit:r,page_token:a,sort_by:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,O=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};O&&(p.Authorization=`Bearer ${O}`);const T={method:"GET",headers:p},v=e?.fetch||fetch,h=await v(_,T);await n(h);return await h.json()}async function N({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/datasets"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function P({client:e,limit:t,page_token:o,sort_by:r,role:a}){const c="/org/members"+s({limit:t,page_token:o,sort_by:r,role:a}),i=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+c,_=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",O={};_&&(O.Authorization=`Bearer ${_}`);const p={method:"GET",headers:O},T=e?.fetch||fetch,v=await T(i,p);await n(v);return await v.json()}async function w({client:e,limit:t,page_token:o,sort_by:r}){const a="/orgs"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function m({client:e,id:t,limit:o,page_token:r,q:a,sort_by:c}){const i=`/org/datasets/${t}/search/conversions`+s({limit:o,page_token:r,q:a,sort_by:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,O=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};O&&(p.Authorization=`Bearer ${O}`);const T={method:"GET",headers:p},v=e?.fetch||fetch,h=await v(_,T);await n(h);return await h.json()}async function y({client:e,limit:t,page_token:o,sort_by:r}){const a="/org/service-accounts"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function Z({client:e,limit:t,page_token:o,sort_by:r}){const a="/user/shortlinks"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function S({client:e,limit:t,page_token:o,sort_by:r}){const a="/users"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}async function b({client:e,limit:t,page_token:o,sort_by:r}){const a="/users-extended"+s({limit:t,page_token:o,sort_by:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);await n(T);return await T.json()}const g={get_api_call:async function({client:e,id:t}){const o=`/api-calls/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_api_call_for_org:async function({client:e,id:t}){const o=`/org/api-calls/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_api_call_for_user:async function({client:e,id:t}){const o=`/user/api-calls/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_api_call_metrics:async function({client:e,group_by:t}){const o="/api-call-metrics"+s({group_by:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_async_operation:async function({client:e,id:t}){const o=`/async/operations/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},list_api_calls:c,list_api_calls_for_user:i,list_api_calls_for_user_pager:function(e){return a(i,e,"page_token")},list_api_calls_pager:function(e){return a(c,e,"page_token")},list_async_operations:_,list_async_operations_pager:function(e){return a(_,e,"page_token")},org_list_api_calls:O,org_list_api_calls_pager:function(e){return a(O,e,"page_token")},user_list_api_calls:p,user_list_api_calls_pager:function(e){return a(p,e,"page_token")}},C={create_api_token_for_user:async function({client:e,label:t}){const o="/user/api-tokens"+s({label:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},delete_api_token_for_user:async function({client:e,token:t}){const o=`/user/api-tokens/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,O=await _(r,i);await n(O)},get_api_token_for_user:async function({client:e,token:t}){const o=`/user/api-tokens/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},list_api_tokens_for_user:T,list_api_tokens_for_user_pager:function(e){return a(T,e,"page_token")}},B={apps_github_callback:async function({client:e}={}){const t="/apps/github/callback"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},apps_github_consent:async function({client:e}={}){const t="/apps/github/consent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},apps_github_webhook:async function({client:e,body:t}){const o="/apps/github/webhook"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/octet-stream";const i={method:"POST",headers:c,body:t},_=e?.fetch||fetch,O=await _(r,i);await n(O)}},U={create_executor_term:e=>new h(e),create_file_execution:async function({client:e,lang:t,output:o,body:r}){const a=`/file/execute/${t}`+s({output:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const O={method:"POST",headers:_,body:r},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()}},D={create_file_center_of_mass:async function({client:e,output_unit:t,src_format:o,body:r}){const a="/file/center-of-mass"+s({output_unit:t,src_format:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const O={method:"POST",headers:_,body:r},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},create_file_conversion:async function({client:e,output_format:t,src_format:o,body:r}){const a=`/file/conversion/${o}/${t}`+s({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const O={method:"POST",headers:_,body:r},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},create_file_conversion_options:async function({client:e,files:t,body:o}){const r="/file/conversion"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const O={method:"POST",headers:i,body:_},p=e?.fetch||fetch,T=await p(a,O);return await n(T),await T.json()},create_file_density:async function({client:e,material_mass:t,material_mass_unit:o,output_unit:r,src_format:a,body:c}){const i="/file/density"+s({material_mass:t,material_mass_unit:o,output_unit:r,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,O=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};O&&(p.Authorization=`Bearer ${O}`),p["Content-Type"]="application/octet-stream";const T={method:"POST",headers:p,body:c},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},create_file_mass:async function({client:e,material_density:t,material_density_unit:o,output_unit:r,src_format:a,body:c}){const i="/file/mass"+s({material_density:t,material_density_unit:o,output_unit:r,src_format:a}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,O=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};O&&(p.Authorization=`Bearer ${O}`),p["Content-Type"]="application/octet-stream";const T={method:"POST",headers:p,body:c},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},create_file_surface_area:async function({client:e,output_unit:t,src_format:o,body:r}){const a="/file/surface-area"+s({output_unit:t,src_format:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const O={method:"POST",headers:_,body:r},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},create_file_volume:async function({client:e,output_unit:t,src_format:o,body:r}){const a="/file/volume"+s({output_unit:t,src_format:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/octet-stream";const O={method:"POST",headers:_,body:r},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()}},z={community_sso:async function({client:e,sig:t,sso:o}){const r="/community/sso"+s({sig:t,sso:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},create_debug_uploads:async function({client:e,files:t}){const o="/debug/uploads"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i=new FormData;t.forEach((e=>{i.append(e.name,e.data,e.name)}));const _={method:"POST",headers:c,body:i},O=e?.fetch||fetch,p=await O(r,_);return await n(p),await p.json()},create_event:async function({client:e,files:t,body:o}){const r="/events"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const O={method:"POST",headers:i,body:_},p=e?.fetch||fetch,T=await p(a,O);await n(T)},get_ipinfo:async function({client:e}={}){const t="/_meta/ipinfo"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_pricing_subscriptions:async function({client:e}={}){const t="/pricing/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_schema:async function({client:e}={}){const t="/"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},internal_get_api_token_for_discord_user:async function({client:e,discord_id:t}){const o=`/internal/discord/api-token/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},ping:async function({client:e}={}){const t="/ping"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()}},Y={create_custom_model:async function({client:e,body:t}){const o="/ml/custom/models"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},create_kcl_code_completions:async function({client:e,body:t}){const o="/ml/kcl/completions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},create_proprietary_to_kcl:async function({client:e,files:t,code_option:o}){const r="/ml/convert/proprietary-to-kcl"+s({code_option:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)}));const O={method:"POST",headers:i,body:_},p=e?.fetch||fetch,T=await p(a,O);return await n(T),await T.json()},create_text_to_cad:async function({client:e,output_format:t,kcl:o,body:r}){const a=`/ai/text-to-cad/${t}`+s({kcl:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const O={method:"POST",headers:_,body:JSON.stringify(r)},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},create_text_to_cad_iteration:async function({client:e,body:t}){const o="/ml/text-to-cad/iteration"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},create_text_to_cad_multi_file_iteration:async function({client:e,files:t,body:o}){const r="/ml/text-to-cad/multi-file/iteration"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)})),_.append("event",JSON.stringify(o));const O={method:"POST",headers:i,body:_},p=e?.fetch||fetch,T=await p(a,O);return await n(T),await T.json()},create_text_to_cad_part_feedback:async function({client:e,id:t,feedback:o}){const r=`/user/text-to-cad/${t}`+s({feedback:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},O=e?.fetch||fetch,p=await O(a,_);await n(p)},get_custom_model:async function({client:e,id:t}){const o=`/ml/custom/models/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_ml_prompt:async function({client:e,id:t}){const o=`/ml-prompts/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_text_to_cad_part_for_user:async function({client:e,id:t}){const o=`/user/text-to-cad/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},list_conversations_for_user:d,list_conversations_for_user_pager:function(e){return a(d,e,"page_token")},list_ml_prompts:E,list_ml_prompts_pager:function(e){return a(E,e,"page_token")},list_org_datasets_for_model:async function({client:e,id:t}){const o=`/ml/custom/models/${t}/datasets`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},list_text_to_cad_parts_for_user:K,list_text_to_cad_parts_for_user_pager:function(e){return a(K,e,"page_token")},ml_copilot_ws:e=>new A(e),ml_reasoning_ws:e=>new u(e),update_custom_model:async function({client:e,id:t,body:o}){const r=`/ml/custom/models/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()}},k={modeling_commands_ws:e=>new f(e)},$={device_access_token:async function({client:e,body:o}){const r="/oauth2/device/token"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:t(o)},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},device_auth_confirm:async function({client:e,body:t}){const o="/oauth2/device/confirm"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);await n(O)},device_auth_request:async function({client:e,body:o}){const r="/oauth2/device/auth"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:t(o)},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},device_auth_verify:async function({client:e,app_name:t,user_code:o}){const r="/oauth2/device/verify"+s({app_name:t,user_code:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},oauth2_provider_callback:async function({client:e,provider:t,code:o,id_token:r,state:a,user:c}){const i=`/oauth2/provider/${t}/callback`+s({code:o,id_token:r,state:a,user:c}),_=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+i,O=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",p={};O&&(p.Authorization=`Bearer ${O}`);const T={method:"GET",headers:p},v=e?.fetch||fetch,h=await v(_,T);return await n(h),await h.json()},oauth2_provider_callback_post:async function({client:e,provider:o,body:r}){const a=`/oauth2/provider/${o}/callback`+s({}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/x-www-form-urlencoded";const O={method:"POST",headers:_,body:t(r)},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},oauth2_provider_consent:async function({client:e,provider:t,callback_url:o}){const r=`/oauth2/provider/${t}/consent`+s({callback_url:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},oauth2_token_revoke:async function({client:e,body:o}){const r="/oauth2/token/revoke"+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/x-www-form-urlencoded";const _={method:"POST",headers:i,body:t(o)},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},verify_oauth_account_linking:async function({client:e,callback_url:t,token:o}){const r="/oauth2/verify-account-linking"+s({callback_url:t,token:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()}},L={create_org:async function({client:e,body:t}){const o="/org"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},create_org_dataset:async function({client:e,body:t}){const o="/org/datasets"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},create_org_member:async function({client:e,body:t}){const o="/org/members"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},create_org_saml_idp:async function({client:e,body:t}){const o="/org/saml/idp"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},delete_org:async function({client:e}={}){const t="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_org_dataset:async function({client:e,id:t}){const o=`/org/datasets/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,O=await _(r,i);await n(O)},delete_org_member:async function({client:e,user_id:t}){const o=`/org/members/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,O=await _(r,i);await n(O)},delete_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},download_org_dataset_conversion_original:async function({client:e,conversion_id:t,id:o}){const r=`/org/datasets/${o}/conversions/${t}/original`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},download_org_dataset_successful_kcl_bulk:async function({client:e,id:t}){const o=`/org/datasets/${t}/bulk-download/kcl`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_any_org:async function({client:e,id:t}){const o=`/orgs/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_org:async function({client:e}={}){const t="/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_dataset:async function({client:e,id:t}){const o=`/org/datasets/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_org_dataset_conversion:async function({client:e,conversion_id:t,id:o}){const r=`/org/datasets/${o}/conversions/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},get_org_dataset_conversion_stats:async function({client:e,id:t}){const o=`/org/datasets/${t}/stats`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_org_member:async function({client:e,user_id:t}){const o=`/org/members/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_org_privacy_settings:async function({client:e}={}){const t="/org/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_saml_idp:async function({client:e}={}){const t="/org/saml/idp"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_org_shortlinks:I,get_org_shortlinks_pager:function(e){return a(I,e,"page_token")},get_user_org:async function({client:e}={}){const t="/user/org"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_org_dataset_conversions:l,list_org_dataset_conversions_pager:function(e){return a(l,e,"page_token")},list_org_datasets:N,list_org_datasets_pager:function(e){return a(N,e,"page_token")},list_org_members:P,list_org_members_pager:function(e){return a(P,e,"page_token")},list_orgs:w,list_orgs_pager:function(e){return a(w,e,"page_token")},org_admin_details_get:async function({client:e,id:t}){const o=`/orgs/${t}/admin/details`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},org_dataset_s3_policies:async function({client:e,role_arn:t,uri:o}){const r="/org/dataset/s3/policies"+s({role_arn:t,uri:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},retrigger_org_dataset:async function({client:e,id:t,statuses:o}){const r=`/org/datasets/${t}/retrigger`+s({statuses:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},O=e?.fetch||fetch,p=await O(a,_);await n(p)},retrigger_org_dataset_conversion:async function({client:e,conversion_id:t,id:o}){const r=`/org/datasets/${o}/conversions/${t}/retrigger`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"POST",headers:i},O=e?.fetch||fetch,p=await O(a,_);await n(p)},search_org_dataset_conversions:m,search_org_dataset_conversions_pager:function(e){return a(m,e,"page_token")},update_org:async function({client:e,body:t}){const o="/org"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},update_org_dataset:async function({client:e,id:t,body:o}){const r=`/org/datasets/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},update_org_member:async function({client:e,user_id:t,body:o}){const r=`/org/members/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},update_org_privacy_settings:async function({client:e,body:t}){const o="/org/privacy"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},update_org_saml_idp:async function({client:e,body:t}){const o="/org/saml/idp"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},upload_org_dataset_files:async function({client:e,files:t,id:o}){const r=`/org/datasets/${o}/uploads`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _=new FormData;t.forEach((e=>{_.append(e.name,e.data,e.name)}));const O={method:"POST",headers:i,body:_},p=e?.fetch||fetch,T=await p(a,O);return await n(T),await T.json()}},j={create_org_subscription:async function({client:e,body:t}){const o="/org/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},create_payment_information_for_org:async function({client:e,body:t}){const o="/org/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},create_payment_information_for_user:async function({client:e,body:t}){const o="/user/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},create_payment_intent_for_org:async function({client:e}={}){const t="/org/payment/intent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},create_payment_intent_for_user:async function({client:e}={}){const t="/user/payment/intent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},create_user_subscription:async function({client:e,body:t}){const o="/user/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},delete_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_payment_method_for_org:async function({client:e,id:t}){const o=`/org/payment/methods/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,O=await _(r,i);await n(O)},delete_payment_method_for_user:async function({client:e,id:t,force:o}){const r=`/user/payment/methods/${t}`+s({force:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"DELETE",headers:i},O=e?.fetch||fetch,p=await O(a,_);await n(p)},get_org_subscription:async function({client:e}={}){const t="/org/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_payment_balance_for_any_org:async function({client:e,include_total_due:t,id:o}){const r=`/orgs/${o}/payment/balance`+s({include_total_due:t}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},get_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:o}){const r=`/users/${t}/payment/balance`+s({include_total_due:o}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`);const _={method:"GET",headers:i},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},get_payment_balance_for_org:async function({client:e,include_total_due:t}){const o="/org/payment/balance"+s({include_total_due:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_payment_balance_for_user:async function({client:e,include_total_due:t}){const o="/user/payment/balance"+s({include_total_due:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_payment_information_for_org:async function({client:e}={}){const t="/org/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_payment_information_for_user:async function({client:e}={}){const t="/user/payment"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_subscription:async function({client:e}={}){const t="/user/payment/subscriptions"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_invoices_for_org:async function({client:e}={}){const t="/org/payment/invoices"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_invoices_for_user:async function({client:e}={}){const t="/user/payment/invoices"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_payment_methods_for_org:async function({client:e}={}){const t="/org/payment/methods"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},list_payment_methods_for_user:async function({client:e}={}){const t="/user/payment/methods"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},set_default_payment_method_for_user:async function({client:e,id:t}){const o=`/user/payment/methods/${t}/default`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,O=await _(r,i);await n(O)},update_org_subscription:async function({client:e,body:t}){const o="/org/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},update_org_subscription_for_any_org:async function({client:e,id:t,body:o}){const r=`/orgs/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},update_payment_balance_for_any_org:async function({client:e,id:t,include_total_due:o,body:r}){const a=`/orgs/${t}/payment/balance`+s({include_total_due:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const O={method:"PUT",headers:_,body:JSON.stringify(r)},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},update_payment_balance_for_any_user:async function({client:e,id:t,include_total_due:o,body:r}){const a=`/users/${t}/payment/balance`+s({include_total_due:o}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`),_["Content-Type"]="application/json";const O={method:"PUT",headers:_,body:JSON.stringify(r)},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},update_payment_information_for_org:async function({client:e,body:t}){const o="/org/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},update_payment_information_for_user:async function({client:e,body:t}){const o="/user/payment"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},update_user_subscription:async function({client:e,body:t}){const o="/user/payment/subscriptions"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},upsert_subscription_plan_price:async function({client:e,slug:t,body:o}){const r=`/subscription-plans/${t}/prices`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"POST",headers:i,body:JSON.stringify(o)},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},validate_customer_tax_information_for_org:async function({client:e}={}){const t="/org/payment/tax"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},validate_customer_tax_information_for_user:async function({client:e}={}){const t="/user/payment/tax"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)}},R={create_service_account_for_org:async function({client:e,label:t}){const o="/org/service-accounts"+s({label:t}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"POST",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},delete_service_account_for_org:async function({client:e,token:t}){const o=`/org/service-accounts/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,O=await _(r,i);await n(O)},get_service_account_for_org:async function({client:e,token:t}){const o=`/org/service-accounts/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},list_service_accounts_for_org:y,list_service_accounts_for_org_pager:function(e){return a(y,e,"page_token")}},H={create_store_coupon:async function({client:e,body:t}){const o="/store/coupon"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()}},G={get_angle_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/angle/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_area_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/area/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_current_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/current/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_energy_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/energy/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_force_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/force/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_frequency_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/frequency/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_length_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/length/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_mass_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/mass/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_power_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/power/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_pressure_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/pressure/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_temperature_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/temperature/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_torque_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/torque/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()},get_volume_unit_conversion:async function({client:e,input_unit:t,output_unit:o,value:r}){const a=`/unit/conversion/volume/${t}/${o}`+s({value:r}),c=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+a,i=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",_={};i&&(_.Authorization=`Bearer ${i}`);const O={method:"GET",headers:_},p=e?.fetch||fetch,T=await p(c,O);return await n(T),await T.json()}},x={create_user_shortlink:async function({client:e,body:t}){const o="/user/shortlinks"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"POST",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},delete_user_self:async function({client:e}={}){const t="/user"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},delete_user_shortlink:async function({client:e,key:t}){const o=`/user/shortlinks/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"DELETE",headers:c},_=e?.fetch||fetch,O=await _(r,i);await n(O)},get_oauth2_providers_for_user:async function({client:e}={}){const t="/user/oauth2/providers"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_session_for_user:async function({client:e,token:t}){const o=`/user/session/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_user:async function({client:e,id:t}){const o=`/users/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_user_extended:async function({client:e,id:t}){const o=`/users-extended/${t}`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},get_user_privacy_settings:async function({client:e}={}){const t="/user/privacy"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_self:async function({client:e}={}){const t="/user"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_self_extended:async function({client:e}={}){const t="/user/extended"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},get_user_shortlinks:Z,get_user_shortlinks_pager:function(e){return a(Z,e,"page_token")},list_users:S,list_users_extended:b,list_users_extended_pager:function(e){return a(b,e,"page_token")},list_users_pager:function(e){return a(S,e,"page_token")},put_public_email_marketing_consent_request:async function({client:e,body:t}){const o="/website/email-marketing-consent/request"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);await n(O)},put_public_sales_form:async function({client:e,body:t}){const o="/website/forms/sales"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);await n(O)},put_public_support_form:async function({client:e,body:t}){const o="/website/forms/support"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);await n(O)},put_user_cad_user_info_form:async function({client:e,body:t}){const o="/website/forms/cad-user-info"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);await n(O)},update_subscription_for_user:async function({client:e,id:t,body:o}){const r=`/users/${t}/payment/subscriptions`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},O=e?.fetch||fetch,p=await O(a,_);return await n(p),await p.json()},update_user_privacy_settings:async function({client:e,body:t}){const o="/user/privacy"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},update_user_self:async function({client:e,body:t}){const o="/user"+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`),c["Content-Type"]="application/json";const i={method:"PUT",headers:c,body:JSON.stringify(t)},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},update_user_shortlink:async function({client:e,key:t,body:o}){const r=`/user/shortlinks/${t}`+s({}),a=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+r,c=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",i={};c&&(i.Authorization=`Bearer ${c}`),i["Content-Type"]="application/json";const _={method:"PUT",headers:i,body:JSON.stringify(o)},O=e?.fetch||fetch,p=await O(a,_);await n(p)},user_admin_details_get:async function({client:e,id:t}){const o=`/users/${t}/admin/details`+s({}),r=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+o,a=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",c={};a&&(c.Authorization=`Bearer ${a}`);const i={method:"GET",headers:c},_=e?.fetch||fetch,O=await _(r,i);return await n(O),await O.json()},user_email_marketing_consent_decline_post:async function({client:e}={}){const t="/user/email-marketing-consent/decline"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},user_email_marketing_consent_get:async function({client:e}={}){const t="/user/email-marketing-consent"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()},user_email_marketing_consent_request_post:async function({client:e}={}){const t="/user/email-marketing-consent/request"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},user_email_marketing_consent_seen_post:async function({client:e}={}){const t="/user/email-marketing-consent/seen"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"POST",headers:a},i=e?.fetch||fetch,_=await i(o,c);await n(_)},user_features_get:async function({client:e}={}){const t="/user/features"+s({}),o=(e?.baseUrl||process?.env?.ZOO_HOST||process?.env?.BASE_URL||"https://api.zoo.dev")+t,r=e?e.token||process.env.ZOO_API_TOKEN||"":process.env.KITTYCAD_TOKEN||process.env.KITTYCAD_API_TOKEN||process.env.ZOO_API_TOKEN||"",a={};r&&(a.Authorization=`Bearer ${r}`);const c={method:"GET",headers:a},i=e?.fetch||fetch,_=await i(o,c);return await n(_),await _.json()}};exports.ApiError=o,exports.Client=class{constructor(e){"string"==typeof e?this.token=e:e&&"object"==typeof e&&(this.token=e.token,this.baseUrl=e.baseUrl,this.fetch=e.fetch)}},exports.Pager=r,exports.api_calls=g,exports.api_tokens=C,exports.apps=B,exports.createPager=a,exports.executor=U,exports.file=D,exports.meta=z,exports.ml=Y,exports.modeling=k,exports.oauth2=$,exports.orgs=L,exports.payments=j,exports.service_accounts=R,exports.store=H,exports.unit=G,exports.users=x;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("bson");try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?.node){new Function("m","return import(m)")("cross-fetch/polyfill").catch((()=>{}))}}catch{}function e(t){const e=new URLSearchParams;for(const[a,o]of Object.entries(t))if(void 0!==o)if(Array.isArray(o))for(const t of o)e.append(a,String(t));else e.append(a,String(o));const a=e.toString();return a?`?${a}`:""}function a(t){const e=new URLSearchParams;for(const[a,o]of Object.entries(t||{}))if(void 0!==o)if(Array.isArray(o))for(const t of o)e.append(a,String(t));else e.append(a,String(o));return e}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(t,e,a){super(a||e?.message||`HTTP ${t}`),this.name="ApiError",this.status=t,this.error_code=e?.error_code,this.request_id=e?.request_id,this.body=e}}async function n(t){if(t.ok)return;let e;try{e=await t.json()}catch{try{const a=await t.text();e=a?{message:a}:void 0}catch{e=void 0}}throw new o(t.status,e)}class i{started=!1;constructor(t,e,a="page_token"){this.fetchPage=t,this.baseParams={...e},this.tokenField=a}hasNext(){return!this.started||!!this.nextToken}reset(){this.started=!1,this.nextToken=void 0}async next(){if(this.started&&!this.nextToken)return[];const t={...this.baseParams};this.started&&this.nextToken&&(t[this.tokenField]=this.nextToken);const e=await this.fetchPage(t);return this.started=!0,this.nextToken=e?.next_page??null,e?.items??[]}}function r(t,e,a="page_token"){return new i(t,e,a)}async function s({client:t,limit:a,page_token:o,sort_by:i}){const r="/api-calls"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function c({client:t,id:a,limit:o,page_token:i,sort_by:r}){const s=`/users/${a}/api-calls`+e({limit:o,page_token:i,sort_by:r}),c=(t?.baseUrl||"https://api.zoo.dev")+s,h=t&&t.token||"",u={};h&&(u.Authorization=`Bearer ${h}`);const d={method:"GET",headers:u},p=t?.fetch||fetch,f=await p(c,d);await n(f);return await f.json()}async function h({client:t,limit:a,page_token:o,sort_by:i,status:r}){const s="/async/operations"+e({limit:a,page_token:o,sort_by:i,status:r}),c=(t?.baseUrl||"https://api.zoo.dev")+s,h=t&&t.token||"",u={};h&&(u.Authorization=`Bearer ${h}`);const d={method:"GET",headers:u},p=t?.fetch||fetch,f=await p(c,d);await n(f);return await f.json()}async function u({client:t,limit:a,page_token:o,sort_by:i}){const r="/org/api-calls"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function d({client:t,limit:a,page_token:o,sort_by:i}){const r="/user/api-calls"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function p({client:t,limit:a,page_token:o,sort_by:i}){const r="/user/api-tokens"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}function f(t){return!!t&&"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength}class l{constructor(t){this.functionNameParams=t}async connect(){const t="/ws/executor/term"+e({}),a=((this.functionNameParams?.client?.baseUrl||"https://api.zoo.dev")+t).replace(/^http/,"ws"),o=new WebSocket(a);await new Promise(((t,e)=>{const a=()=>{i(),t()},n=t=>{i(),e(new Error("WebSocket error"))},i=()=>{o.removeEventListener("open",a),o.removeEventListener("error",n)};o.addEventListener("open",a),o.addEventListener("error",n)}));const n=this.functionNameParams?.client&&this.functionNameParams.client?.token||"";if(n)try{const t={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(t))}catch{}return this.ws=o,this}send(t){this.ws.send(JSON.stringify(t))}sendBinary(e){try{const a=t.BSON.serialize(e);this.ws.send(a)}catch{this.ws.send(JSON.stringify(e))}}recv(t=6e4){return new Promise(((e,a)=>{const o=setTimeout((()=>{r(),a(new Error("timeout"))}),t),n=t=>{r(),a(new Error("WebSocket error"))},i=t=>{r();try{const a=this.parseMessage(t);e(a)}catch(t){a(t)}},r=()=>{clearTimeout(o),this.ws.removeEventListener("message",i),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",i),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(e){const a=e?.data;if("string"==typeof a)return JSON.parse(a);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(a)){const e=a;try{return JSON.parse(e.toString("utf8"))}catch{}return t.BSON.deserialize(e)}if(a instanceof ArrayBuffer){const e=new Uint8Array(a);try{const t=(new TextDecoder).decode(e);return JSON.parse(t)}catch{}return t.BSON.deserialize(e)}if(f(a)){const e=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);try{const t=(new TextDecoder).decode(e);return JSON.parse(t)}catch{}return t.BSON.deserialize(e)}return a}}class _{constructor(t){this.functionNameParams=t}async connect(){const t="/ws/ml/copilot"+e({conversation_id:this.functionNameParams.conversation_id,replay:this.functionNameParams.replay,pr:this.functionNameParams.pr}),a=((this.functionNameParams?.client?.baseUrl||"https://api.zoo.dev")+t).replace(/^http/,"ws"),o=new WebSocket(a);await new Promise(((t,e)=>{const a=()=>{i(),t()},n=t=>{i(),e(new Error("WebSocket error"))},i=()=>{o.removeEventListener("open",a),o.removeEventListener("error",n)};o.addEventListener("open",a),o.addEventListener("error",n)}));const n=this.functionNameParams?.client&&this.functionNameParams.client?.token||"";if(n)try{const t={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(t))}catch{}return this.ws=o,this}send(t){this.ws.send(JSON.stringify(t))}sendBinary(e){try{const a=t.BSON.serialize(e);this.ws.send(a)}catch{this.ws.send(JSON.stringify(e))}}recv(t=6e4){return new Promise(((e,a)=>{const o=setTimeout((()=>{r(),a(new Error("timeout"))}),t),n=t=>{r(),a(new Error("WebSocket error"))},i=t=>{r();try{const a=this.parseMessage(t);e(a)}catch(t){a(t)}},r=()=>{clearTimeout(o),this.ws.removeEventListener("message",i),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",i),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(e){const a=e?.data;if("string"==typeof a)return JSON.parse(a);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(a)){const e=a;try{return JSON.parse(e.toString("utf8"))}catch{}return t.BSON.deserialize(e)}if(a instanceof ArrayBuffer){const e=new Uint8Array(a);try{const t=(new TextDecoder).decode(e);return JSON.parse(t)}catch{}return t.BSON.deserialize(e)}if(f(a)){const e=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);try{const t=(new TextDecoder).decode(e);return JSON.parse(t)}catch{}return t.BSON.deserialize(e)}return a}}class w{constructor(t){this.functionNameParams=t}async connect(){const t=`/ws/ml/reasoning/${this.functionNameParams.id}`+e({}),a=((this.functionNameParams?.client?.baseUrl||"https://api.zoo.dev")+t).replace(/^http/,"ws"),o=new WebSocket(a);await new Promise(((t,e)=>{const a=()=>{i(),t()},n=t=>{i(),e(new Error("WebSocket error"))},i=()=>{o.removeEventListener("open",a),o.removeEventListener("error",n)};o.addEventListener("open",a),o.addEventListener("error",n)}));const n=this.functionNameParams?.client&&this.functionNameParams.client?.token||"";if(n)try{const t={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(t))}catch{}return this.ws=o,this}send(t){this.ws.send(JSON.stringify(t))}sendBinary(e){try{const a=t.BSON.serialize(e);this.ws.send(a)}catch{this.ws.send(JSON.stringify(e))}}recv(t=6e4){return new Promise(((e,a)=>{const o=setTimeout((()=>{r(),a(new Error("timeout"))}),t),n=t=>{r(),a(new Error("WebSocket error"))},i=t=>{r();try{const a=this.parseMessage(t);e(a)}catch(t){a(t)}},r=()=>{clearTimeout(o),this.ws.removeEventListener("message",i),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",i),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(e){const a=e?.data;if("string"==typeof a)return JSON.parse(a);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(a)){const e=a;try{return JSON.parse(e.toString("utf8"))}catch{}return t.BSON.deserialize(e)}if(a instanceof ArrayBuffer){const e=new Uint8Array(a);try{const t=(new TextDecoder).decode(e);return JSON.parse(t)}catch{}return t.BSON.deserialize(e)}if(f(a)){const e=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);try{const t=(new TextDecoder).decode(e);return JSON.parse(t)}catch{}return t.BSON.deserialize(e)}return a}}async function y({client:t,limit:a,page_token:o,sort_by:i}){const r="/ml/conversations"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function m({client:t,limit:a,page_token:o,sort_by:i}){const r="/ml-prompts"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function b({client:t,limit:a,page_token:o,sort_by:i,conversation_id:r,no_models:s,no_parts:c}){const h="/user/text-to-cad"+e({limit:a,page_token:o,sort_by:i,conversation_id:r,no_models:s,no_parts:c}),u=(t?.baseUrl||"https://api.zoo.dev")+h,d=t&&t.token||"",p={};d&&(p.Authorization=`Bearer ${d}`);const f={method:"GET",headers:p},l=t?.fetch||fetch,_=await l(u,f);await n(_);return await _.json()}class g{constructor(t){this.functionNameParams=t}async connect(){const t="/ws/modeling/commands"+e({api_call_id:this.functionNameParams.api_call_id,fps:this.functionNameParams.fps,order_independent_transparency:this.functionNameParams.order_independent_transparency,pool:this.functionNameParams.pool,post_effect:this.functionNameParams.post_effect,replay:this.functionNameParams.replay,show_grid:this.functionNameParams.show_grid,unlocked_framerate:this.functionNameParams.unlocked_framerate,video_res_height:this.functionNameParams.video_res_height,video_res_width:this.functionNameParams.video_res_width,webrtc:this.functionNameParams.webrtc,pr:this.functionNameParams.pr}),a=((this.functionNameParams?.client?.baseUrl||"https://api.zoo.dev")+t).replace(/^http/,"ws"),o=new WebSocket(a);await new Promise(((t,e)=>{const a=()=>{i(),t()},n=t=>{i(),e(new Error("WebSocket error"))},i=()=>{o.removeEventListener("open",a),o.removeEventListener("error",n)};o.addEventListener("open",a),o.addEventListener("error",n)}));const n=this.functionNameParams?.client&&this.functionNameParams.client?.token||"";if(n)try{const t={type:"headers",headers:{Authorization:`Bearer ${n}`}};o.send(JSON.stringify(t))}catch{}return this.ws=o,this}send(t){this.ws.send(JSON.stringify(t))}sendBinary(e){try{const a=t.BSON.serialize(e);this.ws.send(a)}catch{this.ws.send(JSON.stringify(e))}}recv(t=6e4){return new Promise(((e,a)=>{const o=setTimeout((()=>{r(),a(new Error("timeout"))}),t),n=t=>{r(),a(new Error("WebSocket error"))},i=t=>{r();try{const a=this.parseMessage(t);e(a)}catch(t){a(t)}},r=()=>{clearTimeout(o),this.ws.removeEventListener("message",i),this.ws.removeEventListener("error",n)};this.ws.addEventListener("message",i),this.ws.addEventListener("error",n)}))}close(){this.ws.close()}parseMessage(e){const a=e?.data;if("string"==typeof a)return JSON.parse(a);if("undefined"!=typeof Buffer&&Buffer.isBuffer?.(a)){const e=a;try{return JSON.parse(e.toString("utf8"))}catch{}return t.BSON.deserialize(e)}if(a instanceof ArrayBuffer){const e=new Uint8Array(a);try{const t=(new TextDecoder).decode(e);return JSON.parse(t)}catch{}return t.BSON.deserialize(e)}if(f(a)){const e=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);try{const t=(new TextDecoder).decode(e);return JSON.parse(t)}catch{}return t.BSON.deserialize(e)}return a}}async function v({client:t,limit:a,page_token:o,sort_by:i}){const r="/org/shortlinks"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function z({client:t,id:a,filter:o,limit:i,page_token:r,sort_by:s}){const c=`/org/datasets/${a}/conversions`+e({filter:o,limit:i,page_token:r,sort_by:s}),h=(t?.baseUrl||"https://api.zoo.dev")+c,u=t&&t.token||"",d={};u&&(d.Authorization=`Bearer ${u}`);const p={method:"GET",headers:d},f=t?.fetch||fetch,l=await f(h,p);await n(l);return await l.json()}async function k({client:t,limit:a,page_token:o,sort_by:i}){const r="/org/datasets"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function $({client:t,limit:a,page_token:o,sort_by:i,role:r}){const s="/org/members"+e({limit:a,page_token:o,sort_by:i,role:r}),c=(t?.baseUrl||"https://api.zoo.dev")+s,h=t&&t.token||"",u={};h&&(u.Authorization=`Bearer ${h}`);const d={method:"GET",headers:u},p=t?.fetch||fetch,f=await p(c,d);await n(f);return await f.json()}async function T({client:t,limit:a,page_token:o,sort_by:i}){const r="/orgs"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function B({client:t,id:a,limit:o,page_token:i,q:r,sort_by:s}){const c=`/org/datasets/${a}/search/conversions`+e({limit:o,page_token:i,q:r,sort_by:s}),h=(t?.baseUrl||"https://api.zoo.dev")+c,u=t&&t.token||"",d={};u&&(d.Authorization=`Bearer ${u}`);const p={method:"GET",headers:d},f=t?.fetch||fetch,l=await f(h,p);await n(l);return await l.json()}async function U({client:t,limit:a,page_token:o,sort_by:i}){const r="/org/service-accounts"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function A({client:t,limit:a,page_token:o,sort_by:i}){const r="/user/shortlinks"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function E({client:t,limit:a,page_token:o,sort_by:i}){const r="/users"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}async function j({client:t,limit:a,page_token:o,sort_by:i}){const r="/users-extended"+e({limit:a,page_token:o,sort_by:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);await n(p);return await p.json()}const S={get_api_call:async function({client:t,id:a}){const o=`/api-calls/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_api_call_for_org:async function({client:t,id:a}){const o=`/org/api-calls/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_api_call_for_user:async function({client:t,id:a}){const o=`/user/api-calls/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_api_call_metrics:async function({client:t,group_by:a}){const o="/api-call-metrics"+e({group_by:a}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_async_operation:async function({client:t,id:a}){const o=`/async/operations/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},list_api_calls:s,list_api_calls_for_user:c,list_api_calls_for_user_pager:function(t){return r(c,t,"page_token")},list_api_calls_pager:function(t){return r(s,t,"page_token")},list_async_operations:h,list_async_operations_pager:function(t){return r(h,t,"page_token")},org_list_api_calls:u,org_list_api_calls_pager:function(t){return r(u,t,"page_token")},user_list_api_calls:d,user_list_api_calls_pager:function(t){return r(d,t,"page_token")}},O={create_api_token_for_user:async function({client:t,label:a}){const o="/user/api-tokens"+e({label:a}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"POST",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},delete_api_token_for_user:async function({client:t,token:a}){const o=`/user/api-tokens/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:s},h=t?.fetch||fetch,u=await h(i,c);await n(u)},get_api_token_for_user:async function({client:t,token:a}){const o=`/user/api-tokens/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},list_api_tokens_for_user:p,list_api_tokens_for_user_pager:function(t){return r(p,t,"page_token")}},N={apps_github_callback:async function({client:t}={}){const a="/apps/github/callback"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)},apps_github_consent:async function({client:t}={}){const a="/apps/github/consent"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},apps_github_webhook:async function({client:t,body:a}){const o="/apps/github/webhook"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/octet-stream";const c={method:"POST",headers:s,body:a},h=t?.fetch||fetch,u=await h(i,c);await n(u)}},P={create_executor_term:t=>new l(t),create_file_execution:async function({client:t,lang:a,output:o,body:i}){const r=`/file/execute/${a}`+e({output:o}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`),h["Content-Type"]="application/octet-stream";const u={method:"POST",headers:h,body:i},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()}},G={create_file_center_of_mass:async function({client:t,output_unit:a,src_format:o,body:i}){const r="/file/center-of-mass"+e({output_unit:a,src_format:o}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`),h["Content-Type"]="application/octet-stream";const u={method:"POST",headers:h,body:i},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},create_file_conversion:async function({client:t,output_format:a,src_format:o,body:i}){const r=`/file/conversion/${o}/${a}`+e({}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`),h["Content-Type"]="application/octet-stream";const u={method:"POST",headers:h,body:i},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},create_file_conversion_options:async function({client:t,files:a,body:o}){const i="/file/conversion"+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h=new FormData;a.forEach((t=>{h.append(t.name,t.data,t.name)})),h.append("event",JSON.stringify(o));const u={method:"POST",headers:c,body:h},d=t?.fetch||fetch,p=await d(r,u);return await n(p),await p.json()},create_file_density:async function({client:t,material_mass:a,material_mass_unit:o,output_unit:i,src_format:r,body:s}){const c="/file/density"+e({material_mass:a,material_mass_unit:o,output_unit:i,src_format:r}),h=(t?.baseUrl||"https://api.zoo.dev")+c,u=t&&t.token||"",d={};u&&(d.Authorization=`Bearer ${u}`),d["Content-Type"]="application/octet-stream";const p={method:"POST",headers:d,body:s},f=t?.fetch||fetch,l=await f(h,p);return await n(l),await l.json()},create_file_mass:async function({client:t,material_density:a,material_density_unit:o,output_unit:i,src_format:r,body:s}){const c="/file/mass"+e({material_density:a,material_density_unit:o,output_unit:i,src_format:r}),h=(t?.baseUrl||"https://api.zoo.dev")+c,u=t&&t.token||"",d={};u&&(d.Authorization=`Bearer ${u}`),d["Content-Type"]="application/octet-stream";const p={method:"POST",headers:d,body:s},f=t?.fetch||fetch,l=await f(h,p);return await n(l),await l.json()},create_file_surface_area:async function({client:t,output_unit:a,src_format:o,body:i}){const r="/file/surface-area"+e({output_unit:a,src_format:o}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`),h["Content-Type"]="application/octet-stream";const u={method:"POST",headers:h,body:i},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},create_file_volume:async function({client:t,output_unit:a,src_format:o,body:i}){const r="/file/volume"+e({output_unit:a,src_format:o}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`),h["Content-Type"]="application/octet-stream";const u={method:"POST",headers:h,body:i},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()}},x={community_sso:async function({client:t,sig:a,sso:o}){const i="/community/sso"+e({sig:a,sso:o}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"GET",headers:c},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},create_debug_uploads:async function({client:t,files:a}){const o="/debug/uploads"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c=new FormData;a.forEach((t=>{c.append(t.name,t.data,t.name)}));const h={method:"POST",headers:s,body:c},u=t?.fetch||fetch,d=await u(i,h);return await n(d),await d.json()},create_event:async function({client:t,files:a,body:o}){const i="/events"+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h=new FormData;a.forEach((t=>{h.append(t.name,t.data,t.name)})),h.append("event",JSON.stringify(o));const u={method:"POST",headers:c,body:h},d=t?.fetch||fetch,p=await d(r,u);await n(p)},get_ipinfo:async function({client:t}={}){const a="/_meta/ipinfo"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_pricing_subscriptions:async function({client:t}={}){const a="/pricing/subscriptions"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_schema:async function({client:t}={}){const a="/"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},internal_get_api_token_for_discord_user:async function({client:t,discord_id:a}){const o=`/internal/discord/api-token/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},ping:async function({client:t}={}){const a="/ping"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()}},J={create_custom_model:async function({client:t,body:a}){const o="/ml/custom/models"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},create_kcl_code_completions:async function({client:t,body:a}){const o="/ml/kcl/completions"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},create_proprietary_to_kcl:async function({client:t,files:a,code_option:o}){const i="/ml/convert/proprietary-to-kcl"+e({code_option:o}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h=new FormData;a.forEach((t=>{h.append(t.name,t.data,t.name)}));const u={method:"POST",headers:c,body:h},d=t?.fetch||fetch,p=await d(r,u);return await n(p),await p.json()},create_text_to_cad:async function({client:t,output_format:a,kcl:o,body:i}){const r=`/ai/text-to-cad/${a}`+e({kcl:o}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`),h["Content-Type"]="application/json";const u={method:"POST",headers:h,body:JSON.stringify(i)},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},create_text_to_cad_iteration:async function({client:t,body:a}){const o="/ml/text-to-cad/iteration"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},create_text_to_cad_multi_file_iteration:async function({client:t,files:a,body:o}){const i="/ml/text-to-cad/multi-file/iteration"+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h=new FormData;a.forEach((t=>{h.append(t.name,t.data,t.name)})),h.append("event",JSON.stringify(o));const u={method:"POST",headers:c,body:h},d=t?.fetch||fetch,p=await d(r,u);return await n(p),await p.json()},create_text_to_cad_part_feedback:async function({client:t,id:a,feedback:o}){const i=`/user/text-to-cad/${a}`+e({feedback:o}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"POST",headers:c},u=t?.fetch||fetch,d=await u(r,h);await n(d)},get_custom_model:async function({client:t,id:a}){const o=`/ml/custom/models/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_ml_prompt:async function({client:t,id:a}){const o=`/ml-prompts/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_text_to_cad_part_for_user:async function({client:t,id:a}){const o=`/user/text-to-cad/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},list_conversations_for_user:y,list_conversations_for_user_pager:function(t){return r(y,t,"page_token")},list_ml_prompts:m,list_ml_prompts_pager:function(t){return r(m,t,"page_token")},list_org_datasets_for_model:async function({client:t,id:a}){const o=`/ml/custom/models/${a}/datasets`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},list_text_to_cad_parts_for_user:b,list_text_to_cad_parts_for_user_pager:function(t){return r(b,t,"page_token")},ml_copilot_ws:t=>new _(t),ml_reasoning_ws:t=>new w(t),update_custom_model:async function({client:t,id:a,body:o}){const i=`/ml/custom/models/${a}`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`),c["Content-Type"]="application/json";const h={method:"PUT",headers:c,body:JSON.stringify(o)},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()}},C={modeling_commands_ws:t=>new g(t)},L={device_access_token:async function({client:t,body:o}){const i="/oauth2/device/token"+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`),c["Content-Type"]="application/x-www-form-urlencoded";const h={method:"POST",headers:c,body:a(o)},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},device_auth_confirm:async function({client:t,body:a}){const o="/oauth2/device/confirm"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);await n(u)},device_auth_request:async function({client:t,body:o}){const i="/oauth2/device/auth"+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`),c["Content-Type"]="application/x-www-form-urlencoded";const h={method:"POST",headers:c,body:a(o)},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},device_auth_verify:async function({client:t,app_name:a,user_code:o}){const i="/oauth2/device/verify"+e({app_name:a,user_code:o}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"GET",headers:c},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},oauth2_provider_callback:async function({client:t,provider:a,code:o,id_token:i,state:r,user:s}){const c=`/oauth2/provider/${a}/callback`+e({code:o,id_token:i,state:r,user:s}),h=(t?.baseUrl||"https://api.zoo.dev")+c,u=t&&t.token||"",d={};u&&(d.Authorization=`Bearer ${u}`);const p={method:"GET",headers:d},f=t?.fetch||fetch,l=await f(h,p);return await n(l),await l.json()},oauth2_provider_callback_post:async function({client:t,provider:o,body:i}){const r=`/oauth2/provider/${o}/callback`+e({}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`),h["Content-Type"]="application/x-www-form-urlencoded";const u={method:"POST",headers:h,body:a(i)},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},oauth2_provider_consent:async function({client:t,provider:a,callback_url:o}){const i=`/oauth2/provider/${a}/consent`+e({callback_url:o}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"GET",headers:c},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},oauth2_token_revoke:async function({client:t,body:o}){const i="/oauth2/token/revoke"+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`),c["Content-Type"]="application/x-www-form-urlencoded";const h={method:"POST",headers:c,body:a(o)},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},verify_oauth_account_linking:async function({client:t,callback_url:a,token:o}){const i="/oauth2/verify-account-linking"+e({callback_url:a,token:o}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"GET",headers:c},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()}},D={create_org:async function({client:t,body:a}){const o="/org"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},create_org_dataset:async function({client:t,body:a}){const o="/org/datasets"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},create_org_member:async function({client:t,body:a}){const o="/org/members"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},create_org_saml_idp:async function({client:t,body:a}){const o="/org/saml/idp"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},delete_org:async function({client:t}={}){const a="/org"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"DELETE",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)},delete_org_dataset:async function({client:t,id:a}){const o=`/org/datasets/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:s},h=t?.fetch||fetch,u=await h(i,c);await n(u)},delete_org_member:async function({client:t,user_id:a}){const o=`/org/members/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:s},h=t?.fetch||fetch,u=await h(i,c);await n(u)},delete_org_saml_idp:async function({client:t}={}){const a="/org/saml/idp"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"DELETE",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)},download_org_dataset_conversion_original:async function({client:t,conversion_id:a,id:o}){const i=`/org/datasets/${o}/conversions/${a}/original`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"GET",headers:c},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},download_org_dataset_successful_kcl_bulk:async function({client:t,id:a}){const o=`/org/datasets/${a}/bulk-download/kcl`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_any_org:async function({client:t,id:a}){const o=`/orgs/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_org:async function({client:t}={}){const a="/org"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_org_dataset:async function({client:t,id:a}){const o=`/org/datasets/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_org_dataset_conversion:async function({client:t,conversion_id:a,id:o}){const i=`/org/datasets/${o}/conversions/${a}`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"GET",headers:c},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},get_org_dataset_conversion_stats:async function({client:t,id:a}){const o=`/org/datasets/${a}/stats`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_org_member:async function({client:t,user_id:a}){const o=`/org/members/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_org_privacy_settings:async function({client:t}={}){const a="/org/privacy"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_org_saml_idp:async function({client:t}={}){const a="/org/saml/idp"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_org_shortlinks:v,get_org_shortlinks_pager:function(t){return r(v,t,"page_token")},get_user_org:async function({client:t}={}){const a="/user/org"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},list_org_dataset_conversions:z,list_org_dataset_conversions_pager:function(t){return r(z,t,"page_token")},list_org_datasets:k,list_org_datasets_pager:function(t){return r(k,t,"page_token")},list_org_members:$,list_org_members_pager:function(t){return r($,t,"page_token")},list_orgs:T,list_orgs_pager:function(t){return r(T,t,"page_token")},org_admin_details_get:async function({client:t,id:a}){const o=`/orgs/${a}/admin/details`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},org_dataset_s3_policies:async function({client:t,role_arn:a,uri:o}){const i="/org/dataset/s3/policies"+e({role_arn:a,uri:o}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"GET",headers:c},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},retrigger_org_dataset:async function({client:t,id:a,statuses:o}){const i=`/org/datasets/${a}/retrigger`+e({statuses:o}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"POST",headers:c},u=t?.fetch||fetch,d=await u(r,h);await n(d)},retrigger_org_dataset_conversion:async function({client:t,conversion_id:a,id:o}){const i=`/org/datasets/${o}/conversions/${a}/retrigger`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"POST",headers:c},u=t?.fetch||fetch,d=await u(r,h);await n(d)},search_org_dataset_conversions:B,search_org_dataset_conversions_pager:function(t){return r(B,t,"page_token")},update_org:async function({client:t,body:a}){const o="/org"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},update_org_dataset:async function({client:t,id:a,body:o}){const i=`/org/datasets/${a}`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`),c["Content-Type"]="application/json";const h={method:"PUT",headers:c,body:JSON.stringify(o)},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},update_org_member:async function({client:t,user_id:a,body:o}){const i=`/org/members/${a}`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`),c["Content-Type"]="application/json";const h={method:"PUT",headers:c,body:JSON.stringify(o)},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},update_org_privacy_settings:async function({client:t,body:a}){const o="/org/privacy"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},update_org_saml_idp:async function({client:t,body:a}){const o="/org/saml/idp"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},upload_org_dataset_files:async function({client:t,files:a,id:o}){const i=`/org/datasets/${o}/uploads`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h=new FormData;a.forEach((t=>{h.append(t.name,t.data,t.name)}));const u={method:"POST",headers:c,body:h},d=t?.fetch||fetch,p=await d(r,u);return await n(p),await p.json()}},q={create_org_subscription:async function({client:t,body:a}){const o="/org/payment/subscriptions"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},create_payment_information_for_org:async function({client:t,body:a}){const o="/org/payment"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},create_payment_information_for_user:async function({client:t,body:a}){const o="/user/payment"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},create_payment_intent_for_org:async function({client:t}={}){const a="/org/payment/intent"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"POST",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},create_payment_intent_for_user:async function({client:t}={}){const a="/user/payment/intent"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"POST",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},create_user_subscription:async function({client:t,body:a}){const o="/user/payment/subscriptions"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},delete_payment_information_for_org:async function({client:t}={}){const a="/org/payment"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"DELETE",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)},delete_payment_information_for_user:async function({client:t}={}){const a="/user/payment"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"DELETE",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)},delete_payment_method_for_org:async function({client:t,id:a}){const o=`/org/payment/methods/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:s},h=t?.fetch||fetch,u=await h(i,c);await n(u)},delete_payment_method_for_user:async function({client:t,id:a,force:o}){const i=`/user/payment/methods/${a}`+e({force:o}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"DELETE",headers:c},u=t?.fetch||fetch,d=await u(r,h);await n(d)},get_org_subscription:async function({client:t}={}){const a="/org/payment/subscriptions"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_payment_balance_for_any_org:async function({client:t,include_total_due:a,id:o}){const i=`/orgs/${o}/payment/balance`+e({include_total_due:a}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"GET",headers:c},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},get_payment_balance_for_any_user:async function({client:t,id:a,include_total_due:o}){const i=`/users/${a}/payment/balance`+e({include_total_due:o}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`);const h={method:"GET",headers:c},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},get_payment_balance_for_org:async function({client:t,include_total_due:a}){const o="/org/payment/balance"+e({include_total_due:a}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_payment_balance_for_user:async function({client:t,include_total_due:a}){const o="/user/payment/balance"+e({include_total_due:a}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_payment_information_for_org:async function({client:t}={}){const a="/org/payment"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_payment_information_for_user:async function({client:t}={}){const a="/user/payment"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_user_subscription:async function({client:t}={}){const a="/user/payment/subscriptions"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},list_invoices_for_org:async function({client:t}={}){const a="/org/payment/invoices"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},list_invoices_for_user:async function({client:t}={}){const a="/user/payment/invoices"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},list_payment_methods_for_org:async function({client:t}={}){const a="/org/payment/methods"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},list_payment_methods_for_user:async function({client:t}={}){const a="/user/payment/methods"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},set_default_payment_method_for_user:async function({client:t,id:a}){const o=`/user/payment/methods/${a}/default`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"POST",headers:s},h=t?.fetch||fetch,u=await h(i,c);await n(u)},update_org_subscription:async function({client:t,body:a}){const o="/org/payment/subscriptions"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},update_org_subscription_for_any_org:async function({client:t,id:a,body:o}){const i=`/orgs/${a}/payment/subscriptions`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`),c["Content-Type"]="application/json";const h={method:"PUT",headers:c,body:JSON.stringify(o)},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},update_payment_balance_for_any_org:async function({client:t,id:a,include_total_due:o,body:i}){const r=`/orgs/${a}/payment/balance`+e({include_total_due:o}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`),h["Content-Type"]="application/json";const u={method:"PUT",headers:h,body:JSON.stringify(i)},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},update_payment_balance_for_any_user:async function({client:t,id:a,include_total_due:o,body:i}){const r=`/users/${a}/payment/balance`+e({include_total_due:o}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`),h["Content-Type"]="application/json";const u={method:"PUT",headers:h,body:JSON.stringify(i)},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},update_payment_information_for_org:async function({client:t,body:a}){const o="/org/payment"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},update_payment_information_for_user:async function({client:t,body:a}){const o="/user/payment"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},update_user_subscription:async function({client:t,body:a}){const o="/user/payment/subscriptions"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},upsert_subscription_plan_price:async function({client:t,slug:a,body:o}){const i=`/subscription-plans/${a}/prices`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`),c["Content-Type"]="application/json";const h={method:"POST",headers:c,body:JSON.stringify(o)},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},validate_customer_tax_information_for_org:async function({client:t}={}){const a="/org/payment/tax"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)},validate_customer_tax_information_for_user:async function({client:t}={}){const a="/user/payment/tax"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)}},W={create_service_account_for_org:async function({client:t,label:a}){const o="/org/service-accounts"+e({label:a}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"POST",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},delete_service_account_for_org:async function({client:t,token:a}){const o=`/org/service-accounts/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:s},h=t?.fetch||fetch,u=await h(i,c);await n(u)},get_service_account_for_org:async function({client:t,token:a}){const o=`/org/service-accounts/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},list_service_accounts_for_org:U,list_service_accounts_for_org_pager:function(t){return r(U,t,"page_token")}},F={create_store_coupon:async function({client:t,body:a}){const o="/store/coupon"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()}},M={get_angle_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/angle/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_area_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/area/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_current_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/current/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_energy_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/energy/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_force_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/force/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_frequency_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/frequency/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_length_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/length/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_mass_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/mass/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_power_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/power/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_pressure_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/pressure/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_temperature_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/temperature/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_torque_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/torque/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()},get_volume_unit_conversion:async function({client:t,input_unit:a,output_unit:o,value:i}){const r=`/unit/conversion/volume/${a}/${o}`+e({value:i}),s=(t?.baseUrl||"https://api.zoo.dev")+r,c=t&&t.token||"",h={};c&&(h.Authorization=`Bearer ${c}`);const u={method:"GET",headers:h},d=t?.fetch||fetch,p=await d(s,u);return await n(p),await p.json()}},K={create_user_shortlink:async function({client:t,body:a}){const o="/user/shortlinks"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"POST",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},delete_user_self:async function({client:t}={}){const a="/user"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"DELETE",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)},delete_user_shortlink:async function({client:t,key:a}){const o=`/user/shortlinks/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"DELETE",headers:s},h=t?.fetch||fetch,u=await h(i,c);await n(u)},get_oauth2_providers_for_user:async function({client:t}={}){const a="/user/oauth2/providers"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_session_for_user:async function({client:t,token:a}){const o=`/user/session/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_user:async function({client:t,id:a}){const o=`/users/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_user_extended:async function({client:t,id:a}){const o=`/users-extended/${a}`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},get_user_privacy_settings:async function({client:t}={}){const a="/user/privacy"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_user_self:async function({client:t}={}){const a="/user"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_user_self_extended:async function({client:t}={}){const a="/user/extended"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},get_user_shortlinks:A,get_user_shortlinks_pager:function(t){return r(A,t,"page_token")},list_users:E,list_users_extended:j,list_users_extended_pager:function(t){return r(j,t,"page_token")},list_users_pager:function(t){return r(E,t,"page_token")},put_public_email_marketing_consent_request:async function({client:t,body:a}){const o="/website/email-marketing-consent/request"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);await n(u)},put_public_sales_form:async function({client:t,body:a}){const o="/website/forms/sales"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);await n(u)},put_public_support_form:async function({client:t,body:a}){const o="/website/forms/support"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);await n(u)},put_user_cad_user_info_form:async function({client:t,body:a}){const o="/website/forms/cad-user-info"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);await n(u)},update_subscription_for_user:async function({client:t,id:a,body:o}){const i=`/users/${a}/payment/subscriptions`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`),c["Content-Type"]="application/json";const h={method:"PUT",headers:c,body:JSON.stringify(o)},u=t?.fetch||fetch,d=await u(r,h);return await n(d),await d.json()},update_user_privacy_settings:async function({client:t,body:a}){const o="/user/privacy"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},update_user_self:async function({client:t,body:a}){const o="/user"+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`),s["Content-Type"]="application/json";const c={method:"PUT",headers:s,body:JSON.stringify(a)},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},update_user_shortlink:async function({client:t,key:a,body:o}){const i=`/user/shortlinks/${a}`+e({}),r=(t?.baseUrl||"https://api.zoo.dev")+i,s=t&&t.token||"",c={};s&&(c.Authorization=`Bearer ${s}`),c["Content-Type"]="application/json";const h={method:"PUT",headers:c,body:JSON.stringify(o)},u=t?.fetch||fetch,d=await u(r,h);await n(d)},user_admin_details_get:async function({client:t,id:a}){const o=`/users/${a}/admin/details`+e({}),i=(t?.baseUrl||"https://api.zoo.dev")+o,r=t&&t.token||"",s={};r&&(s.Authorization=`Bearer ${r}`);const c={method:"GET",headers:s},h=t?.fetch||fetch,u=await h(i,c);return await n(u),await u.json()},user_email_marketing_consent_decline_post:async function({client:t}={}){const a="/user/email-marketing-consent/decline"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"POST",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)},user_email_marketing_consent_get:async function({client:t}={}){const a="/user/email-marketing-consent"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()},user_email_marketing_consent_request_post:async function({client:t}={}){const a="/user/email-marketing-consent/request"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"POST",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)},user_email_marketing_consent_seen_post:async function({client:t}={}){const a="/user/email-marketing-consent/seen"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"POST",headers:r},c=t?.fetch||fetch,h=await c(o,s);await n(h)},user_features_get:async function({client:t}={}){const a="/user/features"+e({}),o=(t?.baseUrl||"https://api.zoo.dev")+a,i=t&&t.token||"",r={};i&&(r.Authorization=`Bearer ${i}`);const s={method:"GET",headers:r},c=t?.fetch||fetch,h=await c(o,s);return await n(h),await h.json()}};exports.ApiError=o,exports.Client=class{constructor(t){const e="undefined"!=typeof process?process.env:void 0,a=e?.KITTYCAD_TOKEN||e?.KITTYCAD_API_TOKEN||e?.ZOO_AI_TOKEN,o=e?.ZOO_HOST;"string"==typeof t?this.token=t:t&&"object"==typeof t&&(this.token=t.token,this.baseUrl=t.baseUrl,this.fetch=t.fetch),this.token??=a,this.baseUrl??=o}},exports.Pager=i,exports.api_calls=S,exports.api_tokens=O,exports.apps=N,exports.createPager=r,exports.executor=P,exports.file=G,exports.meta=x,exports.ml=J,exports.modeling=C,exports.oauth2=L,exports.orgs=D,exports.payments=q,exports.service_accounts=W,exports.store=F,exports.unit=M,exports.users=K;
|