diff --git a/.github/workflows/update-spec-for-docs.yml b/.github/workflows/update-spec-for-docs.yml new file mode 100644 index 0000000..b12e03a --- /dev/null +++ b/.github/workflows/update-spec-for-docs.yml @@ -0,0 +1,65 @@ +on: + push: + tags: + - v* + pull_request: + paths: + - .github/workflows/update-spec-for-docs.yml + workflow_dispatch: +name: update spec for docs +concurrency: + group: docs-${{ github.ref }} + cancel-in-progress: true +jobs: + update-spec: + name: update-spec + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3.4.0 + with: + node-version: '16' + cache: 'yarn' + - run: yarn install + - run: yarn gen + # Ensure no files changed. + - name: Ensure no files changed + shell: bash + run: | + if [[ `git status --porcelain` ]]; then + echo "Files changed, exiting"; + exit 1; + else + # No changes + echo "No files changed, proceeding"; + fi + # Checkout the docs repo since we will want to update the files there. + - uses: actions/checkout@v3 + with: + repository: 'kittycad/website' + path: 'docs' + token: ${{secrets.KITTYCAD_TS_PAT}} + - name: move spec to docs + shell: bash + run: | + rm docs/kittycad.ts.patch.json || true + cp kittycad.ts.patch.json docs/kittycad.ts.patch.json + - name: commit the changes in the docs repo + shell: bash + run: | + cd docs + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add . + git commit -am "YOYO NEW SPEC TYPESCRIPT DOCS!" || exit 0 + git fetch origin + git rebase origin/main || exit 0 + export NEW_BRANCH="update-spec-typescript" + git checkout -b "$NEW_BRANCH" + git push -f origin "$NEW_BRANCH" + gh pr create --title "Update lang spec docs for typescript" \ + --body "Updating the generated docs for typescript" \ + --head "$NEW_BRANCH" \ + --base main || true + env: + GITHUB_TOKEN: ${{secrets.KITTYCAD_TS_PAT}} diff --git a/__tests__/gen/api-calls-get_api_call_for_user.test.ts b/__tests__/gen/api-calls-get_api_call_for_user.test.ts new file mode 100644 index 0000000..c791c24 --- /dev/null +++ b/__tests__/gen/api-calls-get_api_call_for_user.test.ts @@ -0,0 +1,18 @@ +import { api_calls } from '../../src/index.js'; + +async function example() { + const response = await api_calls.get_api_call_for_user({ id: 'string' }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing api_calls.get_api_call_for_user', () => { + it('should be truthy or throw', async () => { + try { + await example(); + } catch (err) { + expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect + } + }); +}); diff --git a/__tests__/gen/api-calls-get_async_operation.test.ts b/__tests__/gen/api-calls-get_async_operation.test.ts new file mode 100644 index 0000000..c65845a --- /dev/null +++ b/__tests__/gen/api-calls-get_async_operation.test.ts @@ -0,0 +1,18 @@ +import { api_calls } from '../../src/index.js'; + +async function example() { + const response = await api_calls.get_async_operation({ id: 'string' }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing api_calls.get_async_operation', () => { + it('should be truthy or throw', async () => { + try { + await example(); + } catch (err) { + expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect + } + }); +}); diff --git a/__tests__/gen/api-calls-user_list_api_calls.test.ts b/__tests__/gen/api-calls-user_list_api_calls.test.ts new file mode 100644 index 0000000..764cbe7 --- /dev/null +++ b/__tests__/gen/api-calls-user_list_api_calls.test.ts @@ -0,0 +1,18 @@ +import { api_calls } from '../../src/index.js'; + +async function example() { + const response = await api_calls.user_list_api_calls({ + limit: 7, + page_token: 'string', + sort_by: 'created-at-descending', + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing api_calls.user_list_api_calls', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/api-tokens-create_api_token_for_user.test.ts b/__tests__/gen/api-tokens-create_api_token_for_user.test.ts new file mode 100644 index 0000000..c76fa65 --- /dev/null +++ b/__tests__/gen/api-tokens-create_api_token_for_user.test.ts @@ -0,0 +1,14 @@ +import { api_tokens } from '../../src/index.js'; + +async function example() { + const response = await api_tokens.create_api_token_for_user(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing api_tokens.create_api_token_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/api-tokens-delete_api_token_for_user.test.ts b/__tests__/gen/api-tokens-delete_api_token_for_user.test.ts new file mode 100644 index 0000000..8a38aa0 --- /dev/null +++ b/__tests__/gen/api-tokens-delete_api_token_for_user.test.ts @@ -0,0 +1,16 @@ +import { api_tokens } from '../../src/index.js'; + +async function example() { + const response = await api_tokens.delete_api_token_for_user({ + token: 'string', + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing api_tokens.delete_api_token_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/api-tokens-get_api_token_for_user.test.ts b/__tests__/gen/api-tokens-get_api_token_for_user.test.ts new file mode 100644 index 0000000..dffdef3 --- /dev/null +++ b/__tests__/gen/api-tokens-get_api_token_for_user.test.ts @@ -0,0 +1,14 @@ +import { api_tokens } from '../../src/index.js'; + +async function example() { + const response = await api_tokens.get_api_token_for_user({ token: 'string' }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing api_tokens.get_api_token_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/api-tokens-list_api_tokens_for_user.test.ts b/__tests__/gen/api-tokens-list_api_tokens_for_user.test.ts new file mode 100644 index 0000000..8402141 --- /dev/null +++ b/__tests__/gen/api-tokens-list_api_tokens_for_user.test.ts @@ -0,0 +1,18 @@ +import { api_tokens } from '../../src/index.js'; + +async function example() { + const response = await api_tokens.list_api_tokens_for_user({ + limit: 7, + page_token: 'string', + sort_by: 'created-at-descending', + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing api_tokens.list_api_tokens_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/constant-get_physics_constant.test.ts b/__tests__/gen/constant-get_physics_constant.test.ts new file mode 100644 index 0000000..2623545 --- /dev/null +++ b/__tests__/gen/constant-get_physics_constant.test.ts @@ -0,0 +1,14 @@ +import { constant } from '../../src/index.js'; + +async function example() { + const response = await constant.get_physics_constant({ constant: 'c' }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing constant.get_physics_constant', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/file-create_file_conversion.test.ts b/__tests__/gen/file-create_file_conversion.test.ts new file mode 100644 index 0000000..083eb45 --- /dev/null +++ b/__tests__/gen/file-create_file_conversion.test.ts @@ -0,0 +1,19 @@ +import fsp from 'fs/promises'; +import { file } from '../../src/index.js'; + +async function example() { + const response = await file.create_file_conversion({ + output_format: 'stl', + src_format: 'obj', + body: await fsp.readFile('./example.obj', 'base64'), + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing file.create_file_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/file-create_file_density.test.ts b/__tests__/gen/file-create_file_density.test.ts new file mode 100644 index 0000000..5be46af --- /dev/null +++ b/__tests__/gen/file-create_file_density.test.ts @@ -0,0 +1,19 @@ +import fsp from 'fs/promises'; +import { file } from '../../src/index.js'; + +async function example() { + const response = await file.create_file_density({ + material_mass: 7, + src_format: 'obj', + body: await fsp.readFile('./example.obj', 'base64'), + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing file.create_file_density', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/file-create_file_mass.test.ts b/__tests__/gen/file-create_file_mass.test.ts new file mode 100644 index 0000000..543dba8 --- /dev/null +++ b/__tests__/gen/file-create_file_mass.test.ts @@ -0,0 +1,19 @@ +import fsp from 'fs/promises'; +import { file } from '../../src/index.js'; + +async function example() { + const response = await file.create_file_mass({ + material_density: 7, + src_format: 'obj', + body: await fsp.readFile('./example.obj', 'base64'), + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing file.create_file_mass', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/file-create_file_surface_area.test.ts b/__tests__/gen/file-create_file_surface_area.test.ts new file mode 100644 index 0000000..30681db --- /dev/null +++ b/__tests__/gen/file-create_file_surface_area.test.ts @@ -0,0 +1,18 @@ +import fsp from 'fs/promises'; +import { file } from '../../src/index.js'; + +async function example() { + const response = await file.create_file_surface_area({ + src_format: 'obj', + body: await fsp.readFile('./example.obj', 'base64'), + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing file.create_file_surface_area', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/file-create_file_volume.test.ts b/__tests__/gen/file-create_file_volume.test.ts new file mode 100644 index 0000000..5cb31e5 --- /dev/null +++ b/__tests__/gen/file-create_file_volume.test.ts @@ -0,0 +1,18 @@ +import fsp from 'fs/promises'; +import { file } from '../../src/index.js'; + +async function example() { + const response = await file.create_file_volume({ + src_format: 'obj', + body: await fsp.readFile('./example.obj', 'base64'), + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing file.create_file_volume', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/file-get_file_conversion.test.ts b/__tests__/gen/file-get_file_conversion.test.ts new file mode 100644 index 0000000..e7f073a --- /dev/null +++ b/__tests__/gen/file-get_file_conversion.test.ts @@ -0,0 +1,18 @@ +import { file } from '../../src/index.js'; + +async function example() { + const response = await file.get_file_conversion({ id: 'string' }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing file.get_file_conversion', () => { + it('should be truthy or throw', async () => { + try { + await example(); + } catch (err) { + expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect + } + }); +}); diff --git a/__tests__/gen/file-get_file_conversion_for_user.test.ts b/__tests__/gen/file-get_file_conversion_for_user.test.ts new file mode 100644 index 0000000..3a77e62 --- /dev/null +++ b/__tests__/gen/file-get_file_conversion_for_user.test.ts @@ -0,0 +1,18 @@ +import { file } from '../../src/index.js'; + +async function example() { + const response = await file.get_file_conversion_for_user({ id: 'string' }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing file.get_file_conversion_for_user', () => { + it('should be truthy or throw', async () => { + try { + await example(); + } catch (err) { + expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect + } + }); +}); diff --git a/__tests__/gen/meta-get_schema.test.ts b/__tests__/gen/meta-get_schema.test.ts new file mode 100644 index 0000000..80acf53 --- /dev/null +++ b/__tests__/gen/meta-get_schema.test.ts @@ -0,0 +1,14 @@ +import { meta } from '../../src/index.js'; + +async function example() { + const response = await meta.get_schema(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing meta.get_schema', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/meta-ping.test.ts b/__tests__/gen/meta-ping.test.ts new file mode 100644 index 0000000..decb08d --- /dev/null +++ b/__tests__/gen/meta-ping.test.ts @@ -0,0 +1,14 @@ +import { meta } from '../../src/index.js'; + +async function example() { + const response = await meta.ping(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing meta.ping', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/payments-create_payment_information_for_user.test.ts b/__tests__/gen/payments-create_payment_information_for_user.test.ts new file mode 100644 index 0000000..891afc4 --- /dev/null +++ b/__tests__/gen/payments-create_payment_information_for_user.test.ts @@ -0,0 +1,14 @@ +import { payments } from '../../src/index.js'; + +async function example() { + const response = await payments.create_payment_information_for_user(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing payments.create_payment_information_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/payments-delete_payment_information_for_user.test.ts b/__tests__/gen/payments-delete_payment_information_for_user.test.ts new file mode 100644 index 0000000..4923564 --- /dev/null +++ b/__tests__/gen/payments-delete_payment_information_for_user.test.ts @@ -0,0 +1,18 @@ +import { payments } from '../../src/index.js'; + +async function example() { + const response = await payments.delete_payment_information_for_user(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing payments.delete_payment_information_for_user', () => { + it('should be truthy or throw', async () => { + try { + await example(); + } catch (err) { + expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect + } + }); +}); diff --git a/__tests__/gen/payments-get_payment_balance_for_user.test.ts b/__tests__/gen/payments-get_payment_balance_for_user.test.ts new file mode 100644 index 0000000..3a46625 --- /dev/null +++ b/__tests__/gen/payments-get_payment_balance_for_user.test.ts @@ -0,0 +1,14 @@ +import { payments } from '../../src/index.js'; + +async function example() { + const response = await payments.get_payment_balance_for_user(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing payments.get_payment_balance_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/payments-get_payment_information_for_user.test.ts b/__tests__/gen/payments-get_payment_information_for_user.test.ts new file mode 100644 index 0000000..aeb0f20 --- /dev/null +++ b/__tests__/gen/payments-get_payment_information_for_user.test.ts @@ -0,0 +1,14 @@ +import { payments } from '../../src/index.js'; + +async function example() { + const response = await payments.get_payment_information_for_user(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing payments.get_payment_information_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/payments-list_invoices_for_user.test.ts b/__tests__/gen/payments-list_invoices_for_user.test.ts new file mode 100644 index 0000000..7852540 --- /dev/null +++ b/__tests__/gen/payments-list_invoices_for_user.test.ts @@ -0,0 +1,14 @@ +import { payments } from '../../src/index.js'; + +async function example() { + const response = await payments.list_invoices_for_user(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing payments.list_invoices_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/payments-list_payment_methods_for_user.test.ts b/__tests__/gen/payments-list_payment_methods_for_user.test.ts new file mode 100644 index 0000000..c08bafa --- /dev/null +++ b/__tests__/gen/payments-list_payment_methods_for_user.test.ts @@ -0,0 +1,14 @@ +import { payments } from '../../src/index.js'; + +async function example() { + const response = await payments.list_payment_methods_for_user(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing payments.list_payment_methods_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/payments-update_payment_information_for_user.test.ts b/__tests__/gen/payments-update_payment_information_for_user.test.ts new file mode 100644 index 0000000..d238fe0 --- /dev/null +++ b/__tests__/gen/payments-update_payment_information_for_user.test.ts @@ -0,0 +1,14 @@ +import { payments } from '../../src/index.js'; + +async function example() { + const response = await payments.update_payment_information_for_user(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing payments.update_payment_information_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/sessions-get_session_for_user.test.ts b/__tests__/gen/sessions-get_session_for_user.test.ts new file mode 100644 index 0000000..f106192 --- /dev/null +++ b/__tests__/gen/sessions-get_session_for_user.test.ts @@ -0,0 +1,14 @@ +import { sessions } from '../../src/index.js'; + +async function example() { + const response = await sessions.get_session_for_user({ token: 'string' }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing sessions.get_session_for_user', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_acceleration_unit_conversion.test.ts b/__tests__/gen/unit-get_acceleration_unit_conversion.test.ts new file mode 100644 index 0000000..4bf6cb7 --- /dev/null +++ b/__tests__/gen/unit-get_acceleration_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_acceleration_unit_conversion({ + output_format: 'meters_per_second_squared', + src_format: 'feet_per_second_squared', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_acceleration_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_angle_unit_conversion.test.ts b/__tests__/gen/unit-get_angle_unit_conversion.test.ts new file mode 100644 index 0000000..a910e89 --- /dev/null +++ b/__tests__/gen/unit-get_angle_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_angle_unit_conversion({ + output_format: 'radian', + src_format: 'degree', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_angle_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_angular_velocity_unit_conversion.test.ts b/__tests__/gen/unit-get_angular_velocity_unit_conversion.test.ts new file mode 100644 index 0000000..46ef325 --- /dev/null +++ b/__tests__/gen/unit-get_angular_velocity_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_angular_velocity_unit_conversion({ + output_format: 'radians_per_second', + src_format: 'degrees_per_second', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_angular_velocity_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_area_unit_conversion.test.ts b/__tests__/gen/unit-get_area_unit_conversion.test.ts new file mode 100644 index 0000000..c6f33a4 --- /dev/null +++ b/__tests__/gen/unit-get_area_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_area_unit_conversion({ + output_format: 'square_meter', + src_format: 'square_foot', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_area_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_charge_unit_conversion.test.ts b/__tests__/gen/unit-get_charge_unit_conversion.test.ts new file mode 100644 index 0000000..3755d22 --- /dev/null +++ b/__tests__/gen/unit-get_charge_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_charge_unit_conversion({ + output_format: 'coulomb', + src_format: 'ampere_hour', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_charge_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_concentration_unit_conversion.test.ts b/__tests__/gen/unit-get_concentration_unit_conversion.test.ts new file mode 100644 index 0000000..2a76daf --- /dev/null +++ b/__tests__/gen/unit-get_concentration_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_concentration_unit_conversion({ + output_format: 'parts_per_million', + src_format: 'parts_per_billion', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_concentration_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_data_transfer_rate_unit_conversion.test.ts b/__tests__/gen/unit-get_data_transfer_rate_unit_conversion.test.ts new file mode 100644 index 0000000..5efa9a4 --- /dev/null +++ b/__tests__/gen/unit-get_data_transfer_rate_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_data_transfer_rate_unit_conversion({ + output_format: 'bytes_per_second', + src_format: 'exabytes_per_second', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_data_transfer_rate_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_data_unit_conversion.test.ts b/__tests__/gen/unit-get_data_unit_conversion.test.ts new file mode 100644 index 0000000..0be31bd --- /dev/null +++ b/__tests__/gen/unit-get_data_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_data_unit_conversion({ + output_format: 'byte', + src_format: 'exabyte', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_data_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_density_unit_conversion.test.ts b/__tests__/gen/unit-get_density_unit_conversion.test.ts new file mode 100644 index 0000000..4480985 --- /dev/null +++ b/__tests__/gen/unit-get_density_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_density_unit_conversion({ + output_format: 'kilograms_per_cubic_meter', + src_format: 'grams_per_milliliter', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_density_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_energy_unit_conversion.test.ts b/__tests__/gen/unit-get_energy_unit_conversion.test.ts new file mode 100644 index 0000000..7d96b3c --- /dev/null +++ b/__tests__/gen/unit-get_energy_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_energy_unit_conversion({ + output_format: 'joule', + src_format: 'calorie', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_energy_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_force_unit_conversion.test.ts b/__tests__/gen/unit-get_force_unit_conversion.test.ts new file mode 100644 index 0000000..d2ed75d --- /dev/null +++ b/__tests__/gen/unit-get_force_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_force_unit_conversion({ + output_format: 'newton', + src_format: 'pound', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_force_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_illuminance_unit_conversion.test.ts b/__tests__/gen/unit-get_illuminance_unit_conversion.test.ts new file mode 100644 index 0000000..7eef32f --- /dev/null +++ b/__tests__/gen/unit-get_illuminance_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_illuminance_unit_conversion({ + output_format: 'lux', + src_format: 'footcandle', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_illuminance_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_length_unit_conversion.test.ts b/__tests__/gen/unit-get_length_unit_conversion.test.ts new file mode 100644 index 0000000..0e44043 --- /dev/null +++ b/__tests__/gen/unit-get_length_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_length_unit_conversion({ + output_format: 'millimeter', + src_format: 'centimeter', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_length_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_magnetic_field_strength_unit_conversion.test.ts b/__tests__/gen/unit-get_magnetic_field_strength_unit_conversion.test.ts new file mode 100644 index 0000000..38a4047 --- /dev/null +++ b/__tests__/gen/unit-get_magnetic_field_strength_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_magnetic_field_strength_unit_conversion({ + output_format: 'tesla', + src_format: 'gauss', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_magnetic_field_strength_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_magnetic_flux_unit_conversion.test.ts b/__tests__/gen/unit-get_magnetic_flux_unit_conversion.test.ts new file mode 100644 index 0000000..8bef2ad --- /dev/null +++ b/__tests__/gen/unit-get_magnetic_flux_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_magnetic_flux_unit_conversion({ + output_format: 'weber', + src_format: 'maxwell', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_magnetic_flux_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_mass_unit_conversion.test.ts b/__tests__/gen/unit-get_mass_unit_conversion.test.ts new file mode 100644 index 0000000..3a35477 --- /dev/null +++ b/__tests__/gen/unit-get_mass_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_mass_unit_conversion({ + output_format: 'gram', + src_format: 'kilogram', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_mass_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_metric_power_cubed_unit_conversion.test.ts b/__tests__/gen/unit-get_metric_power_cubed_unit_conversion.test.ts new file mode 100644 index 0000000..774062a --- /dev/null +++ b/__tests__/gen/unit-get_metric_power_cubed_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_metric_power_cubed_unit_conversion({ + output_format: 'atto', + src_format: 'femto', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_metric_power_cubed_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_metric_power_squared_unit_conversion.test.ts b/__tests__/gen/unit-get_metric_power_squared_unit_conversion.test.ts new file mode 100644 index 0000000..ff9a2a1 --- /dev/null +++ b/__tests__/gen/unit-get_metric_power_squared_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_metric_power_squared_unit_conversion({ + output_format: 'atto', + src_format: 'femto', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_metric_power_squared_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_metric_power_unit_conversion.test.ts b/__tests__/gen/unit-get_metric_power_unit_conversion.test.ts new file mode 100644 index 0000000..58cc442 --- /dev/null +++ b/__tests__/gen/unit-get_metric_power_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_metric_power_unit_conversion({ + output_format: 'atto', + src_format: 'femto', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_metric_power_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_power_unit_conversion.test.ts b/__tests__/gen/unit-get_power_unit_conversion.test.ts new file mode 100644 index 0000000..be786ea --- /dev/null +++ b/__tests__/gen/unit-get_power_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_power_unit_conversion({ + output_format: 'watt', + src_format: 'horsepower', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_power_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_pressure_unit_conversion.test.ts b/__tests__/gen/unit-get_pressure_unit_conversion.test.ts new file mode 100644 index 0000000..fd268ea --- /dev/null +++ b/__tests__/gen/unit-get_pressure_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_pressure_unit_conversion({ + output_format: 'pascal', + src_format: 'bar', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_pressure_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_radiation_unit_conversion.test.ts b/__tests__/gen/unit-get_radiation_unit_conversion.test.ts new file mode 100644 index 0000000..62fef03 --- /dev/null +++ b/__tests__/gen/unit-get_radiation_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_radiation_unit_conversion({ + output_format: 'gray', + src_format: 'sievert', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_radiation_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_solid_angle_unit_conversion.test.ts b/__tests__/gen/unit-get_solid_angle_unit_conversion.test.ts new file mode 100644 index 0000000..71c7918 --- /dev/null +++ b/__tests__/gen/unit-get_solid_angle_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_solid_angle_unit_conversion({ + output_format: 'steradian', + src_format: 'degree_squared', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_solid_angle_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_temperature_unit_conversion.test.ts b/__tests__/gen/unit-get_temperature_unit_conversion.test.ts new file mode 100644 index 0000000..314acf4 --- /dev/null +++ b/__tests__/gen/unit-get_temperature_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_temperature_unit_conversion({ + output_format: 'kelvin', + src_format: 'celsius', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_temperature_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_time_unit_conversion.test.ts b/__tests__/gen/unit-get_time_unit_conversion.test.ts new file mode 100644 index 0000000..fdefbfb --- /dev/null +++ b/__tests__/gen/unit-get_time_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_time_unit_conversion({ + output_format: 'second', + src_format: 'minute', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_time_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_velocity_unit_conversion.test.ts b/__tests__/gen/unit-get_velocity_unit_conversion.test.ts new file mode 100644 index 0000000..57ebeb9 --- /dev/null +++ b/__tests__/gen/unit-get_velocity_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_velocity_unit_conversion({ + output_format: 'meters_per_second', + src_format: 'feet_per_second', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_velocity_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_voltage_unit_conversion.test.ts b/__tests__/gen/unit-get_voltage_unit_conversion.test.ts new file mode 100644 index 0000000..9e0705f --- /dev/null +++ b/__tests__/gen/unit-get_voltage_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_voltage_unit_conversion({ + output_format: 'volt', + src_format: 'statvolt', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_voltage_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/unit-get_volume_unit_conversion.test.ts b/__tests__/gen/unit-get_volume_unit_conversion.test.ts new file mode 100644 index 0000000..90da9c9 --- /dev/null +++ b/__tests__/gen/unit-get_volume_unit_conversion.test.ts @@ -0,0 +1,18 @@ +import { unit } from '../../src/index.js'; + +async function example() { + const response = await unit.get_volume_unit_conversion({ + output_format: 'cubic_millimeter', + src_format: 'cubic_centimeter', + value: 7, + }); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing unit.get_volume_unit_conversion', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/users-delete_user_self.test.ts b/__tests__/gen/users-delete_user_self.test.ts new file mode 100644 index 0000000..06b54d4 --- /dev/null +++ b/__tests__/gen/users-delete_user_self.test.ts @@ -0,0 +1,18 @@ +import { users } from '../../src/index.js'; + +async function example() { + const response = await users.delete_user_self(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing users.delete_user_self', () => { + it('should be truthy or throw', async () => { + try { + await example(); + } catch (err) { + expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect + } + }); +}); diff --git a/__tests__/gen/users-get_user_self.test.ts b/__tests__/gen/users-get_user_self.test.ts new file mode 100644 index 0000000..0ab6b3c --- /dev/null +++ b/__tests__/gen/users-get_user_self.test.ts @@ -0,0 +1,14 @@ +import { users } from '../../src/index.js'; + +async function example() { + const response = await users.get_user_self(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing users.get_user_self', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/users-get_user_self_extended.test.ts b/__tests__/gen/users-get_user_self_extended.test.ts new file mode 100644 index 0000000..3dc83e6 --- /dev/null +++ b/__tests__/gen/users-get_user_self_extended.test.ts @@ -0,0 +1,14 @@ +import { users } from '../../src/index.js'; + +async function example() { + const response = await users.get_user_self_extended(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing users.get_user_self_extended', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/gen/users-update_user_self.test.ts b/__tests__/gen/users-update_user_self.test.ts new file mode 100644 index 0000000..cb39549 --- /dev/null +++ b/__tests__/gen/users-update_user_self.test.ts @@ -0,0 +1,14 @@ +import { users } from '../../src/index.js'; + +async function example() { + const response = await users.update_user_self(); + if ('error_code' in response) throw response; + + return response; +} + +describe('Testing users.update_user_self', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + }); +}); diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index dbd0ae6..bc6864e 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -1,37 +1,32 @@ -import { file } from '../src/index.js'; -import type { Models } from '../src/index.js'; +import { file, Client } from '../src/index.js'; import fsp from 'fs/promises'; -describe('Testing create_file_execution', () => { - it("shouldn't throw", async () => { - const { stderr, stdout, output_files } = (await file.create_file_execution({ - lang: 'go', - output: 'output.stl', - body: await fsp.readFile('./exampleGoScript.go', 'base64'), - })) as Models['CodeOutput_type']; - expect(stderr).toBe(''); - expect(stdout).toBe( - [ - 'File conversion id: bdbf2969-8015-448b-a237-841d421fd1fe', - 'File conversion status: Completed', - 'Saving output to ./output.stl\n', - ].join('\n'), - ); - expect(output_files[0].contents).toHaveLength(191308); +const client = new Client(process.env.KITTYCAD_TOKEN || ''); - expect(true).toBe(true); - }); -}); describe('Testing create_file_mass', () => { it("shouldn't throw", async () => { - const { status, mass } = (await file.create_file_mass({ + const response = await file.create_file_mass({ src_format: 'obj', - material_density: '0.007', + material_density: 0.007, body: await fsp.readFile('./example.obj', 'base64'), - })) as Models['FileMass_type']; + }); + if ('error_code' in response) throw 'error'; + + const { status, mass } = response; expect(mass).toBe(0.7063786); expect(status).toBe('Completed'); + }); + it("shouldn't throw when using a client", async () => { + const response = await file.create_file_mass({ + client, + src_format: 'obj', + material_density: 0.007, + body: await fsp.readFile('./example.obj', 'base64'), + }); + if ('error_code' in response) throw 'error'; - expect(true).toBe(true); + const { status, mass } = response; + expect(mass).toBe(0.7063786); + expect(status).toBe('Completed'); }); }); diff --git a/__tests__/meta-ping.test.ts b/__tests__/meta-ping.test.ts new file mode 100644 index 0000000..f13de42 --- /dev/null +++ b/__tests__/meta-ping.test.ts @@ -0,0 +1,32 @@ +import { meta, Client } from '../src/index.js'; + +// Create a client with your token. +async function ExampleWithClient() { + const client = new Client(process.env.KITTYCAD_TOKEN || ''); + const response = await meta.ping({ client }); + if ('error_code' in response) throw 'error'; + // console.log(response.message); // 'pong' + return response; +} + +// - OR - + +// Your token will be parsed from the environment +// variable: 'KITTYCAD_TOKEN'. +async function ExampleWithOutClient() { + const response = await meta.ping(); + if ('error_code' in response) throw 'error'; + // console.log(response.message); // 'pong' + return response; +} + +describe('Testing meta.ping', () => { + it('should work with Client', async () => { + const response = await ExampleWithClient(); + expect(response.message).toBe('pong'); + }); + it('should work without Client', async () => { + const response = await ExampleWithOutClient(); + expect(response.message).toBe('pong'); + }); +}); diff --git a/kittycad.ts.patch.json b/kittycad.ts.patch.json new file mode 100644 index 0000000..b52fc0b --- /dev/null +++ b/kittycad.ts.patch.json @@ -0,0 +1,466 @@ +[ + { + "op": "add", + "path": "/paths/~1user~1session~1{token}/get/x-typescript", + "value": { + "example": "import { sessions } from '@kittycad/lib'\n\nasync function example() {\n const response = await sessions.get_session_for_user({ token: 'string' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1methods/get/x-typescript", + "value": { + "example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.list_payment_methods_for_user()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1invoices/get/x-typescript", + "value": { + "example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.list_invoices_for_user()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1balance/get/x-typescript", + "value": { + "example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.get_payment_balance_for_user()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment/put/x-typescript", + "value": { + "example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.update_payment_information_for_user()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment/post/x-typescript", + "value": { + "example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.create_payment_information_for_user()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment/get/x-typescript", + "value": { + "example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.get_payment_information_for_user()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment/delete/x-typescript", + "value": { + "example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.delete_payment_information_for_user()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1file~1conversions~1{id}/get/x-typescript", + "value": { + "example": "import { file } from '@kittycad/lib'\n\nasync function example() {\n const response = await file.get_file_conversion_for_user({ id: 'string' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1extended/get/x-typescript", + "value": { + "example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.get_user_self_extended()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-tokens~1{token}/get/x-typescript", + "value": { + "example": "import { api_tokens } from '@kittycad/lib'\n\nasync function example() {\n const response = await api_tokens.get_api_token_for_user({\n token: 'string',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-tokens~1{token}/delete/x-typescript", + "value": { + "example": "import { api_tokens } from '@kittycad/lib'\n\nasync function example() {\n const response = await api_tokens.delete_api_token_for_user({\n token: 'string',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-tokens/post/x-typescript", + "value": { + "example": "import { api_tokens } from '@kittycad/lib'\n\nasync function example() {\n const response = await api_tokens.create_api_token_for_user()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-tokens/get/x-typescript", + "value": { + "example": "import { api_tokens } from '@kittycad/lib'\n\nasync function example() {\n const response = await api_tokens.list_api_tokens_for_user({\n limit: 7,\n page_token: 'string',\n sort_by: 'created-at-descending',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-calls~1{id}/get/x-typescript", + "value": { + "example": "import { api_calls } from '@kittycad/lib'\n\nasync function example() {\n const response = await api_calls.get_api_call_for_user({ id: 'string' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-calls/get/x-typescript", + "value": { + "example": "import { api_calls } from '@kittycad/lib'\n\nasync function example() {\n const response = await api_calls.user_list_api_calls({\n limit: 7,\n page_token: 'string',\n sort_by: 'created-at-descending',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user/put/x-typescript", + "value": { + "example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.update_user_self()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user/get/x-typescript", + "value": { + "example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.get_user_self()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1user/delete/x-typescript", + "value": { + "example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.delete_user_self()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1volume~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_volume_unit_conversion({\n output_format: 'cubic_millimeter',\n src_format: 'cubic_centimeter',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1voltage~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_voltage_unit_conversion({\n output_format: 'volt',\n src_format: 'statvolt',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1velocity~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_velocity_unit_conversion({\n output_format: 'meters_per_second',\n src_format: 'feet_per_second',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1time~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_time_unit_conversion({\n output_format: 'second',\n src_format: 'minute',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1temperature~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_temperature_unit_conversion({\n output_format: 'kelvin',\n src_format: 'celsius',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1solid-angle~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_solid_angle_unit_conversion({\n output_format: 'steradian',\n src_format: 'degree_squared',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1radiation~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_radiation_unit_conversion({\n output_format: 'gray',\n src_format: 'sievert',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1pressure~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_pressure_unit_conversion({\n output_format: 'pascal',\n src_format: 'bar',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1power~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_power_unit_conversion({\n output_format: 'watt',\n src_format: 'horsepower',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1metric~1squared~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_metric_power_squared_unit_conversion({\n output_format: 'atto',\n src_format: 'femto',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1metric~1power~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_metric_power_unit_conversion({\n output_format: 'atto',\n src_format: 'femto',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1metric~1cubed~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_metric_power_cubed_unit_conversion({\n output_format: 'atto',\n src_format: 'femto',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1mass~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_mass_unit_conversion({\n output_format: 'gram',\n src_format: 'kilogram',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1magnetic-flux~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_magnetic_flux_unit_conversion({\n output_format: 'weber',\n src_format: 'maxwell',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1magnetic-field-strength~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_magnetic_field_strength_unit_conversion({\n output_format: 'tesla',\n src_format: 'gauss',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1length~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_length_unit_conversion({\n output_format: 'millimeter',\n src_format: 'centimeter',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1illuminance~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_illuminance_unit_conversion({\n output_format: 'lux',\n src_format: 'footcandle',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1force~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_force_unit_conversion({\n output_format: 'newton',\n src_format: 'pound',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1energy~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_energy_unit_conversion({\n output_format: 'joule',\n src_format: 'calorie',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1density~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_density_unit_conversion({\n output_format: 'kilograms_per_cubic_meter',\n src_format: 'grams_per_milliliter',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1data~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_data_unit_conversion({\n output_format: 'byte',\n src_format: 'exabyte',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1data-transfer-rate~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_data_transfer_rate_unit_conversion({\n output_format: 'bytes_per_second',\n src_format: 'exabytes_per_second',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1concentration~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_concentration_unit_conversion({\n output_format: 'parts_per_million',\n src_format: 'parts_per_billion',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1charge~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_charge_unit_conversion({\n output_format: 'coulomb',\n src_format: 'ampere_hour',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1area~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_area_unit_conversion({\n output_format: 'square_meter',\n src_format: 'square_foot',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1angular-velocity~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_angular_velocity_unit_conversion({\n output_format: 'radians_per_second',\n src_format: 'degrees_per_second',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1angle~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_angle_unit_conversion({\n output_format: 'radian',\n src_format: 'degree',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1acceleration~1{src_format}~1{output_format}/get/x-typescript", + "value": { + "example": "import { unit } from '@kittycad/lib'\n\nasync function example() {\n const response = await unit.get_acceleration_unit_conversion({\n output_format: 'meters_per_second_squared',\n src_format: 'feet_per_second_squared',\n value: 7,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1ping/get/x-typescript", + "value": { + "example": "import { meta } from '@kittycad/lib'\n\nasync function example() {\n const response = await meta.ping()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1file~1volume/post/x-typescript", + "value": { + "example": "import fsp from 'fs/promises'\nimport { file } from '@kittycad/lib'\n\nasync function example() {\n const response = await file.create_file_volume({\n src_format: 'obj',\n body: await fsp.readFile('./example.obj', 'base64'),\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1file~1surface-area/post/x-typescript", + "value": { + "example": "import fsp from 'fs/promises'\nimport { file } from '@kittycad/lib'\n\nasync function example() {\n const response = await file.create_file_surface_area({\n src_format: 'obj',\n body: await fsp.readFile('./example.obj', 'base64'),\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1file~1mass/post/x-typescript", + "value": { + "example": "import fsp from 'fs/promises'\nimport { file } from '@kittycad/lib'\n\nasync function example() {\n const response = await file.create_file_mass({\n material_density: 7,\n src_format: 'obj',\n body: await fsp.readFile('./example.obj', 'base64'),\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1file~1density/post/x-typescript", + "value": { + "example": "import fsp from 'fs/promises'\nimport { file } from '@kittycad/lib'\n\nasync function example() {\n const response = await file.create_file_density({\n material_mass: 7,\n src_format: 'obj',\n body: await fsp.readFile('./example.obj', 'base64'),\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1file~1conversions~1{id}/get/x-typescript", + "value": { + "example": "import { file } from '@kittycad/lib'\n\nasync function example() {\n const response = await file.get_file_conversion({ id: 'string' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-typescript", + "value": { + "example": "import fsp from 'fs/promises'\nimport { file } from '@kittycad/lib'\n\nasync function example() {\n const response = await file.create_file_conversion({\n output_format: 'stl',\n src_format: 'obj',\n body: await fsp.readFile('./example.obj', 'base64'),\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1constant~1physics~1{constant}/get/x-typescript", + "value": { + "example": "import { constant } from '@kittycad/lib'\n\nasync function example() {\n const response = await constant.get_physics_constant({ constant: 'c' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1async~1operations~1{id}/get/x-typescript", + "value": { + "example": "import { api_calls } from '@kittycad/lib'\n\nasync function example() {\n const response = await api_calls.get_async_operation({ id: 'string' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/paths/~1/get/x-typescript", + "value": { + "example": "import { meta } from '@kittycad/lib'\n\nasync function example() {\n const response = await meta.get_schema()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n", + "libDocsLink": "" + } + }, + { + "op": "add", + "path": "/info/x-typescript", + "value": { + "client": "// Create a client with your token.\nasync function ExampleWithClient() {\n const client = new Client(process.env.KITTYCAD_TOKEN || '');\n const response = await meta.ping({ client });\n if ('error_code' in response) throw 'error';\n console.log(response.message); // 'pong'\n}\n\n// - OR -\n\n// Your token will be parsed from the environment\n// variable: 'KITTYCAD_TOKEN'.\nasync function ExampleWithOutClient() {\n const response = await meta.ping();\n if ('error_code' in response) throw 'error';\n console.log(response.message); // 'pong'\n}", + "install": "npm install @kittycad/lib\n# or \n$ yarn add @kittycad/lib" + } + } +] diff --git a/package.json b/package.json index cef5d51..c04d62a 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "eslint": "~8.16", "eslint-config-prettier": "~8.5", "eslint-plugin-jest": "~26.2", + "fast-json-patch": "^3.1.1", "jest": "~28.1", "prettier": "~2.6", "rimraf": "~3.0", @@ -64,7 +65,7 @@ "build:js": "rollup -c", "build:types": "tsc --emitDeclarationOnly", "build": "rimraf dist && npm run build:types && npm run build:js", - "gen": "ts-node --project ./tsconfig.gen.json ./src/modelsGen.ts && prettier --config .prettierrc --write ./src", + "gen": "ts-node --project ./tsconfig.gen.json ./src/modelsGen.ts && prettier --config .prettierrc --write ./src && prettier --config .prettierrc --write ./__tests__ && prettier --config .prettierrc --write ./kittycad.ts.patch.json", "test": "jest", "tsc": "tsc" }, diff --git a/spec.json b/spec.json index edad704..769fb87 100644 --- a/spec.json +++ b/spec.json @@ -1,1189 +1,3076 @@ { - "components": { - "responses": { - "Error": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" + "components": { + "responses": { + "Error": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } - } + }, + "description": "Error" + } + }, + "schemas": { + "AccountProvider": { + "description": "An account provider.", + "enum": [ + "google", + "github" + ], + "type": "string" }, - "description": "Error" - } - }, - "schemas": { - "AccountProvider": { - "description": "An account provider.", - "enum": [ - "google", - "github" - ], - "type": "string" - }, - "ApiCallQueryGroup": { - "description": "A response for a query on the API call table that is grouped by something.", - "properties": { - "count": { - "format": "int64", - "type": "integer" - }, - "query": { - "type": "string" - } - }, - "required": [ - "count", - "query" - ], - "type": "object" - }, - "ApiCallQueryGroupBy": { - "description": "The field of an API call to group by.", - "enum": [ - "email", - "method", - "endpoint", - "user_id", - "origin", - "ip_address" - ], - "type": "string" - }, - "ApiCallStatus": { - "description": "The status of an async API call.", - "enum": [ - "Queued", - "Uploaded", - "In Progress", - "Completed", - "Failed" - ], - "type": "string" - }, - "ApiCallWithPrice": { - "description": "An API call with the price.\n\nThis is a join of the `ApiCall` and `ApiCallPrice` tables.", - "properties": { - "completed_at": { - "description": "The date and time the API call completed billing.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The date and time the API call was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "duration": { - "description": "The duration of the API call.", - "format": "duration", - "nullable": true, - "title": "int64", - "type": "integer" - }, - "email": { - "description": "The user's email address.", - "format": "email", - "type": "string" - }, - "endpoint": { - "description": "The endpoint requested by the API call.", - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier for the API call." - }, - "ip_address": { - "default": "", - "description": "The ip address of the origin.", - "format": "ip", - "title": "String", - "type": "string" - }, - "litterbox": { - "description": "If the API call was spawned from the litterbox or not.", - "nullable": true, - "type": "boolean" - }, - "method": { - "allOf": [ - { - "$ref": "#/components/schemas/Method" - } - ], - "description": "The HTTP method requsted by the API call." - }, - "minutes": { - "description": "The number of minutes the API call was billed for.", - "format": "int32", - "nullable": true, - "type": "integer" - }, - "origin": { - "description": "The origin of the API call.", - "type": "string" - }, - "price": { - "description": "The price of the API call.", - "format": "money-usd", - "nullable": true, - "title": "Number", - "type": "number" - }, - "request_body": { - "description": "The request body sent by the API call.", - "nullable": true, - "type": "string" - }, - "request_query_params": { - "description": "The request query params sent by the API call.", - "type": "string" - }, - "response_body": { - "description": "The response body returned by the API call. We do not store this information if it is above a certain size.", - "nullable": true, - "type": "string" - }, - "started_at": { - "description": "The date and time the API call started billing.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status_code": { - "description": "The status code returned by the API call.", - "format": "int32", - "nullable": true, - "title": "int32", - "type": "integer" - }, - "stripe_invoice_item_id": { - "description": "The Stripe invoice item ID of the API call if it is billable.", - "type": "string" - }, - "token": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The API token that made the API call." - }, - "updated_at": { - "description": "The date and time the API call was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_agent": { - "description": "The user agent of the request.", - "type": "string" - }, - "user_id": { - "description": "The ID of the user that made the API call.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "method", - "token", - "updated_at", - "user_agent" - ], - "type": "object" - }, - "ApiCallWithPriceResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/ApiCallWithPrice" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "ApiToken": { - "description": "An API token.\n\nThese are used to authenticate users with Bearer authentication.", - "properties": { - "created_at": { - "description": "The date and time the API token was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "id": { - "description": "The unique identifier for the API token.", - "type": "string" - }, - "is_valid": { - "description": "If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token.", - "type": "boolean" - }, - "token": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The API token itself." - }, - "updated_at": { - "description": "The date and time the API token was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The ID of the user that owns the API token.", - "type": "string" - } - }, - "required": [ - "created_at", - "is_valid", - "token", - "updated_at" - ], - "type": "object" - }, - "ApiTokenResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/ApiToken" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "AppClientInfo": { - "description": "Information about a third party app client.", - "properties": { - "url": { - "description": "The URL for consent.", - "type": "string" - } - }, - "type": "object" - }, - "AsyncApiCall": { - "description": "An async API call.", - "properties": { - "completed_at": { - "description": "The time and date the async API call was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the async API call was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the async API call.\n\nThis is the same as the API call ID." - }, - "input": { - "default": null, - "description": "The JSON input for the API call. These are determined by the endpoint that is run." - }, - "output": { - "description": "The JSON output for the API call. These are determined by the endpoint that is run.", - "nullable": true - }, - "started_at": { - "description": "The time and date the async API call was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the async API call." - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/AsyncApiCallType" - } - ], - "description": "The type of async API call." - }, - "updated_at": { - "description": "The time and date the async API call was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the async API call.", - "type": "string" - }, - "worker": { - "description": "The worker node that is performing or performed the async API call.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "status", - "type", - "updated_at" - ], - "type": "object" - }, - "AsyncApiCallOutput": { - "description": "The output from the async API call.", - "oneOf": [ - { - "description": "A file conversion.", - "properties": { - "completed_at": { - "description": "The time and date the file conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the file conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." - }, - "output": { - "description": "The converted file, if completed, base64 encoded.", - "format": "byte", - "nullable": true, - "title": "String", - "type": "string" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileOutputFormat" - } - ], - "description": "The output format of the file conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file conversion." - }, - "started_at": { - "description": "The time and date the file conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the file conversion." - }, - "type": { - "enum": [ - "FileConversion" - ], - "type": "string" - }, - "updated_at": { - "description": "The time and date the file conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the file conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "type", - "updated_at" - ], - "type": "object" - }, - { - "description": "A file mass.", - "properties": { - "completed_at": { - "description": "The time and date the mass was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the mass was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID." - }, - "mass": { - "description": "The resulting mass.", - "format": "double", - "nullable": true, - "type": "number" - }, - "material_density": { - "default": 0.0, - "description": "The material density as denoted by the user.", - "format": "float", - "type": "number" - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the mass was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the mass." - }, - "type": { - "enum": [ - "FileMass" - ], - "type": "string" - }, - "updated_at": { - "description": "The time and date the mass was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the mass.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "type", - "updated_at" - ], - "type": "object" - }, - { - "description": "A file volume.", - "properties": { - "completed_at": { - "description": "The time and date the volume was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the volume was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the volume was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the volume." - }, - "type": { - "enum": [ - "FileVolume" - ], - "type": "string" - }, - "updated_at": { - "description": "The time and date the volume was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the volume.", - "type": "string" - }, - "volume": { - "description": "The resulting volume.", - "format": "double", - "nullable": true, - "type": "number" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "type", - "updated_at" - ], - "type": "object" - }, - { - "description": "A file density.", - "properties": { - "completed_at": { - "description": "The time and date the density was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the density was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "density": { - "description": "The resulting density.", - "format": "double", - "nullable": true, - "type": "number" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." - }, - "material_mass": { - "default": 0.0, - "description": "The material mass as denoted by the user.", - "format": "float", - "type": "number" - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the density was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the density." - }, - "type": { - "enum": [ - "FileDensity" - ], - "type": "string" - }, - "updated_at": { - "description": "The time and date the density was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the density.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "type", - "updated_at" - ], - "type": "object" - }, - { - "description": "A file surface area.", - "properties": { - "completed_at": { - "description": "The time and date the density was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the density was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the density was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the density." - }, - "surface_area": { - "description": "The resulting surface area.", - "format": "double", - "nullable": true, - "type": "number" - }, - "type": { - "enum": [ - "FileSurfaceArea" - ], - "type": "string" - }, - "updated_at": { - "description": "The time and date the density was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the density.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "type", - "updated_at" - ], - "type": "object" - } - ] - }, - "AsyncApiCallResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/AsyncApiCall" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "AsyncApiCallType": { - "description": "The type of async API call.", - "enum": [ - "FileConversion", - "FileVolume", - "FileMass", - "FileDensity", - "FileSurfaceArea" - ], - "type": "string" - }, - "BillingInfo": { - "description": "The billing information for payments.", - "properties": { - "address": { - "allOf": [ - { - "$ref": "#/components/schemas/NewAddress" - } - ], - "description": "The address of the customer.", - "nullable": true - }, - "name": { - "description": "The name of the customer.", - "type": "string" - }, - "phone": { - "default": "", - "description": "The phone for the customer.", - "format": "phone", - "title": "String", - "type": "string" - } - }, - "type": "object" - }, - "CacheMetadata": { - "description": "Metadata about our cache.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "ok": { - "description": "If the cache returned an ok response from ping.", - "type": "boolean" - } - }, - "required": [ - "ok" - ], - "type": "object" - }, - "CardDetails": { - "description": "The card details of a payment method.", - "properties": { - "brand": { - "description": "Card brand.\n\nCan be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", - "type": "string" - }, - "checks": { - "allOf": [ - { - "$ref": "#/components/schemas/PaymentMethodCardChecks" - } - ], - "default": {}, - "description": "Checks on Card address and CVC if provided." - }, - "country": { - "description": "Two-letter ISO code representing the country of the card.", - "type": "string" - }, - "exp_month": { - "default": 0, - "description": "Two-digit number representing the card's expiration month.", - "format": "int64", - "type": "integer" - }, - "exp_year": { - "default": 0, - "description": "Four-digit number representing the card's expiration year.", - "format": "int64", - "type": "integer" - }, - "fingerprint": { - "description": "Uniquely identifies this particular card number.", - "type": "string" - }, - "funding": { - "description": "Card funding type.\n\nCan be `credit`, `debit`, `prepaid`, or `unknown`.", - "type": "string" - }, - "last4": { - "description": "The last four digits of the card.", - "type": "string" - } - }, - "type": "object" - }, - "Cluster": { - "description": "Cluster information.", - "properties": { - "addr": { - "description": "The IP address of the cluster.", - "format": "ip", - "nullable": true, - "type": "string" - }, - "auth_timeout": { - "default": 0, - "description": "The auth timeout of the cluster.", - "format": "int64", - "type": "integer" - }, - "cluster_port": { - "default": 0, - "description": "The port of the cluster.", - "format": "int64", - "type": "integer" - }, - "name": { - "default": "", - "description": "The name of the cluster.", - "type": "string" - }, - "tls_timeout": { - "default": 0, - "description": "The TLS timeout for the cluster.", - "format": "int64", - "type": "integer" - }, - "urls": { - "description": "The urls of the cluster.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "CodeLanguage": { - "description": "The language code is written in.", - "enum": [ - "go", - "python", - "node" - ], - "type": "string" - }, - "CodeOutput": { - "description": "Output of the code being executed.", - "properties": { - "output_files": { - "description": "The contents of the files requested if they were passed.", - "items": { - "$ref": "#/components/schemas/OutputFile" - }, - "type": "array" - }, - "stderr": { - "default": "", - "description": "The stderr of the code.", - "type": "string" - }, - "stdout": { - "default": "", - "description": "The stdout of the code.", - "type": "string" - } - }, - "type": "object" - }, - "Commit": { - "description": "Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as `containerd`, or `runC`.", - "properties": { - "expected": { - "description": "Commit ID of external tool expected by dockerd as set at build time.", - "nullable": true, - "type": "string" - }, - "id": { - "description": "Actual commit ID of external tool.", - "nullable": true, - "type": "string" - } - }, - "type": "object" - }, - "Connection": { - "description": "Metadata about a pub-sub connection.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "auth_timeout": { - "default": 0, - "description": "The auth timeout of the server.", - "format": "int64", - "type": "integer" - }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/Cluster" - } - ], - "default": { - "auth_timeout": 0, - "cluster_port": 0, - "name": "", - "tls_timeout": 0 - }, - "description": "Information about the cluster." - }, - "config_load_time": { - "description": "The time the configuration was loaded.", - "format": "date-time", - "type": "string" - }, - "connections": { - "default": 0, - "description": "The number of connections to the server.", - "format": "int64", - "type": "integer" - }, - "cores": { - "default": 0, - "description": "The CPU core usage of the server.", - "format": "int64", - "type": "integer" - }, - "cpu": { - "format": "double", - "nullable": true, - "type": "number" - }, - "gateway": { - "allOf": [ - { - "$ref": "#/components/schemas/Gateway" - } - ], - "default": { - "auth_timeout": 0, - "host": "", - "name": "", - "port": 0, - "tls_timeout": 0 - }, - "description": "Information about the gateway." - }, - "git_commit": { - "default": "", - "description": "The git commit.", - "type": "string" - }, - "go": { - "default": "", - "description": "The go version.", - "type": "string" - }, - "gomaxprocs": { - "default": 0, - "description": "`GOMAXPROCS` of the server.", - "format": "int64", - "type": "integer" - }, - "host": { - "description": "The host of the server.", - "format": "ip", - "type": "string" - }, - "http_base_path": { - "default": "", - "description": "The http base path of the server.", - "type": "string" - }, - "http_host": { - "default": "", - "description": "The http host of the server.", - "type": "string" - }, - "http_port": { - "default": 0, - "description": "The http port of the server.", - "format": "int64", - "type": "integer" - }, - "http_req_stats": { - "additionalProperties": { + "ApiCallQueryGroup": { + "description": "A response for a query on the API call table that is grouped by something.", + "properties": { + "count": { "format": "int64", "type": "integer" }, - "type": "object" + "query": { + "type": "string" + } }, - "https_port": { - "default": 0, - "description": "The https port of the server.", - "format": "int64", - "type": "integer" + "required": [ + "count", + "query" + ], + "type": "object" + }, + "ApiCallQueryGroupBy": { + "description": "The field of an API call to group by.", + "enum": [ + "email", + "method", + "endpoint", + "user_id", + "origin", + "ip_address" + ], + "type": "string" + }, + "ApiCallStatus": { + "description": "The status of an async API call.", + "enum": [ + "Queued", + "Uploaded", + "In Progress", + "Completed", + "Failed" + ], + "type": "string" + }, + "ApiCallWithPrice": { + "description": "An API call with the price.\n\nThis is a join of the `ApiCall` and `ApiCallPrice` tables.", + "properties": { + "completed_at": { + "description": "The date and time the API call completed billing.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The date and time the API call was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "duration": { + "description": "The duration of the API call.", + "format": "duration", + "nullable": true, + "title": "int64", + "type": "integer" + }, + "email": { + "description": "The user's email address.", + "format": "email", + "type": "string" + }, + "endpoint": { + "description": "The endpoint requested by the API call.", + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier for the API call." + }, + "ip_address": { + "default": "", + "description": "The ip address of the origin.", + "format": "ip", + "title": "String", + "type": "string" + }, + "litterbox": { + "description": "If the API call was spawned from the litterbox or not.", + "nullable": true, + "type": "boolean" + }, + "method": { + "allOf": [ + { + "$ref": "#/components/schemas/Method" + } + ], + "description": "The HTTP method requsted by the API call." + }, + "minutes": { + "description": "The number of minutes the API call was billed for.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "origin": { + "description": "The origin of the API call.", + "type": "string" + }, + "price": { + "description": "The price of the API call.", + "format": "money-usd", + "nullable": true, + "title": "Number", + "type": "number" + }, + "request_body": { + "description": "The request body sent by the API call.", + "nullable": true, + "type": "string" + }, + "request_query_params": { + "description": "The request query params sent by the API call.", + "type": "string" + }, + "response_body": { + "description": "The response body returned by the API call. We do not store this information if it is above a certain size.", + "nullable": true, + "type": "string" + }, + "started_at": { + "description": "The date and time the API call started billing.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status_code": { + "description": "The status code returned by the API call.", + "format": "int32", + "nullable": true, + "title": "int32", + "type": "integer" + }, + "stripe_invoice_item_id": { + "description": "The Stripe invoice item ID of the API call if it is billable.", + "type": "string" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The API token that made the API call." + }, + "updated_at": { + "description": "The date and time the API call was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_agent": { + "description": "The user agent of the request.", + "type": "string" + }, + "user_id": { + "description": "The ID of the user that made the API call.", + "type": "string" + } }, - "in_bytes": { - "default": 0, - "description": "The count of inbound bytes for the server.", - "format": "int64", - "type": "integer" + "required": [ + "created_at", + "id", + "method", + "token", + "updated_at", + "user_agent" + ], + "type": "object" + }, + "ApiCallWithPriceResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/ApiCallWithPrice" + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } }, - "in_msgs": { - "default": 0, - "description": "The number of inbound messages for the server.", - "format": "int64", - "type": "integer" + "required": [ + "items" + ], + "type": "object" + }, + "ApiToken": { + "description": "An API token.\n\nThese are used to authenticate users with Bearer authentication.", + "properties": { + "created_at": { + "description": "The date and time the API token was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "id": { + "description": "The unique identifier for the API token.", + "type": "string" + }, + "is_valid": { + "description": "If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token.", + "type": "boolean" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The API token itself." + }, + "updated_at": { + "description": "The date and time the API token was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The ID of the user that owns the API token.", + "type": "string" + } }, - "jetstream": { - "allOf": [ - { - "$ref": "#/components/schemas/Jetstream" - } - ], - "default": { - "config": { + "required": [ + "created_at", + "is_valid", + "token", + "updated_at" + ], + "type": "object" + }, + "ApiTokenResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/ApiToken" + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" + ], + "type": "object" + }, + "AppClientInfo": { + "description": "Information about a third party app client.", + "properties": { + "url": { + "description": "The URL for consent.", + "type": "string" + } + }, + "type": "object" + }, + "AsyncApiCall": { + "description": "An async API call.", + "properties": { + "completed_at": { + "description": "The time and date the async API call was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the async API call was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the async API call.\n\nThis is the same as the API call ID." + }, + "input": { + "default": null, + "description": "The JSON input for the API call. These are determined by the endpoint that is run." + }, + "output": { + "description": "The JSON output for the API call. These are determined by the endpoint that is run.", + "nullable": true + }, + "started_at": { + "description": "The time and date the async API call was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the async API call." + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/AsyncApiCallType" + } + ], + "description": "The type of async API call." + }, + "updated_at": { + "description": "The time and date the async API call was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the async API call.", + "type": "string" + }, + "worker": { + "description": "The worker node that is performing or performed the async API call.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "status", + "type", + "updated_at" + ], + "type": "object" + }, + "AsyncApiCallOutput": { + "description": "The output from the async API call.", + "oneOf": [ + { + "description": "A file conversion.", + "properties": { + "completed_at": { + "description": "The time and date the file conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the file conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." + }, + "output": { + "description": "The converted file, if completed, base64 encoded.", + "format": "byte", + "nullable": true, + "title": "String", + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileOutputFormat" + } + ], + "description": "The output format of the file conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat" + } + ], + "description": "The source format of the file conversion." + }, + "started_at": { + "description": "The time and date the file conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the file conversion." + }, + "type": { + "enum": [ + "FileConversion" + ], + "type": "string" + }, + "updated_at": { + "description": "The time and date the file conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the file conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "type", + "updated_at" + ], + "type": "object" + }, + { + "description": "A file mass.", + "properties": { + "completed_at": { + "description": "The time and date the mass was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the mass was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID." + }, + "mass": { + "description": "The resulting mass.", + "format": "double", + "nullable": true, + "type": "number" + }, + "material_density": { + "default": 0.0, + "description": "The material density as denoted by the user.", + "format": "float", + "type": "number" + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat" + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the mass was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the mass." + }, + "type": { + "enum": [ + "FileMass" + ], + "type": "string" + }, + "updated_at": { + "description": "The time and date the mass was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the mass.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "type", + "updated_at" + ], + "type": "object" + }, + { + "description": "A file volume.", + "properties": { + "completed_at": { + "description": "The time and date the volume was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the volume was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat" + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the volume was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the volume." + }, + "type": { + "enum": [ + "FileVolume" + ], + "type": "string" + }, + "updated_at": { + "description": "The time and date the volume was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the volume.", + "type": "string" + }, + "volume": { + "description": "The resulting volume.", + "format": "double", + "nullable": true, + "type": "number" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "type", + "updated_at" + ], + "type": "object" + }, + { + "description": "A file density.", + "properties": { + "completed_at": { + "description": "The time and date the density was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the density was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "density": { + "description": "The resulting density.", + "format": "double", + "nullable": true, + "type": "number" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." + }, + "material_mass": { + "default": 0.0, + "description": "The material mass as denoted by the user.", + "format": "float", + "type": "number" + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat" + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the density was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the density." + }, + "type": { + "enum": [ + "FileDensity" + ], + "type": "string" + }, + "updated_at": { + "description": "The time and date the density was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the density.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "type", + "updated_at" + ], + "type": "object" + }, + { + "description": "A file surface area.", + "properties": { + "completed_at": { + "description": "The time and date the density was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the density was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat" + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the density was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the density." + }, + "surface_area": { + "description": "The resulting surface area.", + "format": "double", + "nullable": true, + "type": "number" + }, + "type": { + "enum": [ + "FileSurfaceArea" + ], + "type": "string" + }, + "updated_at": { + "description": "The time and date the density was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the density.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "type", + "updated_at" + ], + "type": "object" + } + ] + }, + "AsyncApiCallResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/AsyncApiCall" + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" + ], + "type": "object" + }, + "AsyncApiCallType": { + "description": "The type of async API call.", + "enum": [ + "FileConversion", + "FileVolume", + "FileMass", + "FileDensity", + "FileSurfaceArea" + ], + "type": "string" + }, + "BillingInfo": { + "description": "The billing information for payments.", + "properties": { + "address": { + "allOf": [ + { + "$ref": "#/components/schemas/NewAddress" + } + ], + "description": "The address of the customer.", + "nullable": true + }, + "name": { + "description": "The name of the customer.", + "type": "string" + }, + "phone": { + "default": "", + "description": "The phone for the customer.", + "format": "phone", + "title": "String", + "type": "string" + } + }, + "type": "object" + }, + "CacheMetadata": { + "description": "Metadata about our cache.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "ok": { + "description": "If the cache returned an ok response from ping.", + "type": "boolean" + } + }, + "required": [ + "ok" + ], + "type": "object" + }, + "CardDetails": { + "description": "The card details of a payment method.", + "properties": { + "brand": { + "description": "Card brand.\n\nCan be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "type": "string" + }, + "checks": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentMethodCardChecks" + } + ], + "default": {}, + "description": "Checks on Card address and CVC if provided." + }, + "country": { + "description": "Two-letter ISO code representing the country of the card.", + "type": "string" + }, + "exp_month": { + "default": 0, + "description": "Two-digit number representing the card's expiration month.", + "format": "int64", + "type": "integer" + }, + "exp_year": { + "default": 0, + "description": "Four-digit number representing the card's expiration year.", + "format": "int64", + "type": "integer" + }, + "fingerprint": { + "description": "Uniquely identifies this particular card number.", + "type": "string" + }, + "funding": { + "description": "Card funding type.\n\nCan be `credit`, `debit`, `prepaid`, or `unknown`.", + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "type": "string" + } + }, + "type": "object" + }, + "Cluster": { + "description": "Cluster information.", + "properties": { + "addr": { + "description": "The IP address of the cluster.", + "format": "ip", + "nullable": true, + "type": "string" + }, + "auth_timeout": { + "default": 0, + "description": "The auth timeout of the cluster.", + "format": "int64", + "type": "integer" + }, + "cluster_port": { + "default": 0, + "description": "The port of the cluster.", + "format": "int64", + "type": "integer" + }, + "name": { + "default": "", + "description": "The name of the cluster.", + "type": "string" + }, + "tls_timeout": { + "default": 0, + "description": "The TLS timeout for the cluster.", + "format": "int64", + "type": "integer" + }, + "urls": { + "description": "The urls of the cluster.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CodeLanguage": { + "description": "The language code is written in.", + "enum": [ + "go", + "python", + "node" + ], + "type": "string" + }, + "CodeOutput": { + "description": "Output of the code being executed.", + "properties": { + "output_files": { + "description": "The contents of the files requested if they were passed.", + "items": { + "$ref": "#/components/schemas/OutputFile" + }, + "type": "array" + }, + "stderr": { + "default": "", + "description": "The stderr of the code.", + "type": "string" + }, + "stdout": { + "default": "", + "description": "The stdout of the code.", + "type": "string" + } + }, + "type": "object" + }, + "Commit": { + "description": "Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as `containerd`, or `runC`.", + "properties": { + "expected": { + "description": "Commit ID of external tool expected by dockerd as set at build time.", + "nullable": true, + "type": "string" + }, + "id": { + "description": "Actual commit ID of external tool.", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Connection": { + "description": "Metadata about a pub-sub connection.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "auth_timeout": { + "default": 0, + "description": "The auth timeout of the server.", + "format": "int64", + "type": "integer" + }, + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/Cluster" + } + ], + "default": { + "auth_timeout": 0, + "cluster_port": 0, + "name": "", + "tls_timeout": 0 + }, + "description": "Information about the cluster." + }, + "config_load_time": { + "description": "The time the configuration was loaded.", + "format": "date-time", + "type": "string" + }, + "connections": { + "default": 0, + "description": "The number of connections to the server.", + "format": "int64", + "type": "integer" + }, + "cores": { + "default": 0, + "description": "The CPU core usage of the server.", + "format": "int64", + "type": "integer" + }, + "cpu": { + "format": "double", + "nullable": true, + "type": "number" + }, + "gateway": { + "allOf": [ + { + "$ref": "#/components/schemas/Gateway" + } + ], + "default": { + "auth_timeout": 0, + "host": "", + "name": "", + "port": 0, + "tls_timeout": 0 + }, + "description": "Information about the gateway." + }, + "git_commit": { + "default": "", + "description": "The git commit.", + "type": "string" + }, + "go": { + "default": "", + "description": "The go version.", + "type": "string" + }, + "gomaxprocs": { + "default": 0, + "description": "`GOMAXPROCS` of the server.", + "format": "int64", + "type": "integer" + }, + "host": { + "description": "The host of the server.", + "format": "ip", + "type": "string" + }, + "http_base_path": { + "default": "", + "description": "The http base path of the server.", + "type": "string" + }, + "http_host": { + "default": "", + "description": "The http host of the server.", + "type": "string" + }, + "http_port": { + "default": 0, + "description": "The http port of the server.", + "format": "int64", + "type": "integer" + }, + "http_req_stats": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "type": "object" + }, + "https_port": { + "default": 0, + "description": "The https port of the server.", + "format": "int64", + "type": "integer" + }, + "in_bytes": { + "default": 0, + "description": "The count of inbound bytes for the server.", + "format": "int64", + "type": "integer" + }, + "in_msgs": { + "default": 0, + "description": "The number of inbound messages for the server.", + "format": "int64", + "type": "integer" + }, + "jetstream": { + "allOf": [ + { + "$ref": "#/components/schemas/Jetstream" + } + ], + "default": { + "config": { + "domain": "", + "max_memory": 0, + "max_storage": 0, + "store_dir": "" + }, + "meta": { + "cluster_size": 0, + "leader": "", + "name": "" + }, + "stats": { + "accounts": 0, + "api": { + "errors": 0, + "inflight": 0, + "total": 0 + }, + "ha_assets": 0, + "memory": 0, + "reserved_memory": 0, + "reserved_store": 0, + "store": 0 + } + }, + "description": "Jetstream information." + }, + "leaf": { + "allOf": [ + { + "$ref": "#/components/schemas/LeafNode" + } + ], + "default": { + "auth_timeout": 0, + "host": "", + "port": 0, + "tls_timeout": 0 + }, + "description": "Information about leaf nodes." + }, + "leafnodes": { + "default": 0, + "description": "The number of leaf nodes for the server.", + "format": "int64", + "type": "integer" + }, + "max_connections": { + "default": 0, + "description": "The max connections of the server.", + "format": "int64", + "type": "integer" + }, + "max_control_line": { + "default": 0, + "description": "The max control line of the server.", + "format": "int64", + "type": "integer" + }, + "max_payload": { + "default": 0, + "description": "The max payload of the server.", + "format": "int64", + "type": "integer" + }, + "max_pending": { + "default": 0, + "description": "The max pending of the server.", + "format": "int64", + "type": "integer" + }, + "mem": { + "default": 0, + "description": "The memory usage of the server.", + "format": "int64", + "type": "integer" + }, + "now": { + "description": "The time now.", + "format": "date-time", + "type": "string" + }, + "out_bytes": { + "default": 0, + "description": "The count of outbound bytes for the server.", + "format": "int64", + "type": "integer" + }, + "out_msgs": { + "default": 0, + "description": "The number of outbound messages for the server.", + "format": "int64", + "type": "integer" + }, + "ping_interval": { + "default": 0, + "description": "The ping interval of the server.", + "format": "int64", + "type": "integer" + }, + "ping_max": { + "default": 0, + "description": "The ping max of the server.", + "format": "int64", + "type": "integer" + }, + "port": { + "default": 0, + "description": "The port of the server.", + "format": "int64", + "type": "integer" + }, + "proto": { + "default": 0, + "description": "The protocol version.", + "format": "int64", + "type": "integer" + }, + "remotes": { + "default": 0, + "description": "The number of remotes for the server.", + "format": "int64", + "type": "integer" + }, + "routes": { + "default": 0, + "description": "The number of routes for the server.", + "format": "int64", + "type": "integer" + }, + "server_id": { + "default": "", + "description": "The server ID.", + "type": "string" + }, + "server_name": { + "default": "", + "description": "The server name.", + "type": "string" + }, + "slow_consumers": { + "default": 0, + "description": "The number of slow consumers for the server.", + "format": "int64", + "type": "integer" + }, + "start": { + "description": "When the server was started.", + "format": "date-time", + "type": "string" + }, + "subscriptions": { + "default": 0, + "description": "The number of subscriptions for the server.", + "format": "int64", + "type": "integer" + }, + "system_account": { + "default": "", + "description": "The system account.", + "type": "string" + }, + "tls_timeout": { + "default": 0, + "description": "The TLS timeout of the server.", + "format": "int64", + "type": "integer" + }, + "total_connections": { + "default": 0, + "description": "The total number of connections to the server.", + "format": "int64", + "type": "integer" + }, + "uptime": { + "default": "", + "description": "The uptime of the server.", + "type": "string" + }, + "version": { + "default": "", + "description": "The version of the service.", + "type": "string" + }, + "write_deadline": { + "default": 0, + "description": "The write deadline of the server.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "config_load_time", + "host", + "http_req_stats", + "now", + "start" + ], + "type": "object" + }, + "CreatedAtSortMode": { + "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", + "enum": [ + "created-at-ascending", + "created-at-descending" + ], + "type": "string" + }, + "Currency": { + "description": "Currency is the list of supported currencies.\n\nFor more details see .", + "enum": [ + "aed", + "afn", + "all", + "amd", + "ang", + "aoa", + "ars", + "aud", + "awg", + "azn", + "bam", + "bbd", + "bdt", + "bgn", + "bif", + "bmd", + "bnd", + "bob", + "brl", + "bsd", + "bwp", + "bzd", + "cad", + "cdf", + "chf", + "clp", + "cny", + "cop", + "crc", + "cve", + "czk", + "djf", + "dkk", + "dop", + "dzd", + "eek", + "egp", + "etb", + "eur", + "fjd", + "fkp", + "gbp", + "gel", + "gip", + "gmd", + "gnf", + "gtq", + "gyd", + "hkd", + "hnl", + "hrk", + "htg", + "huf", + "idr", + "ils", + "inr", + "isk", + "jmd", + "jpy", + "kes", + "kgs", + "khr", + "kmf", + "krw", + "kyd", + "kzt", + "lak", + "lbp", + "lkr", + "lrd", + "lsl", + "ltl", + "lvl", + "mad", + "mdl", + "mga", + "mkd", + "mnt", + "mop", + "mro", + "mur", + "mvr", + "mwk", + "mxn", + "myr", + "mzn", + "nad", + "ngn", + "nio", + "nok", + "npr", + "nzd", + "pab", + "pen", + "pgk", + "php", + "pkr", + "pln", + "pyg", + "qar", + "ron", + "rsd", + "rub", + "rwf", + "sar", + "sbd", + "scr", + "sek", + "sgd", + "shp", + "sll", + "sos", + "srd", + "std", + "svc", + "szl", + "thb", + "tjs", + "top", + "try", + "ttd", + "twd", + "tzs", + "uah", + "ugx", + "usd", + "uyu", + "uzs", + "vef", + "vnd", + "vuv", + "wst", + "xaf", + "xcd", + "xof", + "xpf", + "yer", + "zar", + "zmw" + ], + "type": "string" + }, + "Customer": { + "description": "The resource representing a payment \"Customer\".", + "properties": { + "address": { + "allOf": [ + { + "$ref": "#/components/schemas/NewAddress" + } + ], + "description": "The customer's address.", + "nullable": true + }, + "balance": { + "default": 0.0, + "description": "Current balance, if any, being stored on the customer in the payments service.\n\nIf negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "created_at": { + "description": "Time at which the object was created.", + "format": "date-time", + "type": "string" + }, + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ], + "description": "Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes." + }, + "delinquent": { + "default": false, + "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed.\n\nWhen the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. If an invoice is marked uncollectible by dunning, `delinquent` doesn't get reset to `false`.", + "type": "boolean" + }, + "email": { + "description": "The customer's email address.", + "format": "email", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of key-value pairs.", + "type": "object" + }, + "name": { + "description": "The customer's full name or business name.", + "type": "string" + }, + "phone": { + "default": "", + "description": "The customer's phone number.", + "format": "phone", + "title": "String", + "type": "string" + } + }, + "required": [ + "created_at", + "currency" + ], + "type": "object" + }, + "CustomerBalance": { + "description": "A balance for a user.\n\nThis holds information about the financial balance for the user.", + "properties": { + "created_at": { + "description": "The date and time the balance was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier for the balance." + }, + "monthly_credits_remaining": { + "description": "The monthy credits remaining in the balance. This gets re-upped every month, but if the credits are not used for a month they do not carry over to the next month. It is a stable amount granted to the user per month.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "pre_pay_cash_remaining": { + "description": "The amount of pre-pay cash remaining in the balance. This number goes down as the user uses their pre-paid credits. The reason we track this amount is if a user ever wants to withdraw their pre-pay cash, we can use this amount to determine how much to give them. Say a user has $100 in pre-paid cash, their bill is worth, $50 after subtracting any other credits (like monthly etc.) Their bill is $50, their pre-pay cash remaining will be subtracted by 50 to pay the bill and their `pre_pay_credits_remaining` will be subtracted by 50 to pay the bill. This way if they want to withdraw money after, they can only withdraw $50 since that is the amount of cash they have remaining.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "pre_pay_credits_remaining": { + "description": "The amount of credits remaining in the balance. This is typically the amount of cash * some multiplier they get for pre-paying their account. This number lowers every time a bill is paid with the balance. This number increases every time a user adds funds to their balance. This may be through a subscription or a one off payment.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "total_due": { + "description": "This includes any outstanding, draft, or open invoices and any pending invoice items. This does not include any credits the user has on their account.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "updated_at": { + "description": "The date and time the balance was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID the balance belongs to.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "monthly_credits_remaining", + "pre_pay_cash_remaining", + "pre_pay_credits_remaining", + "total_due", + "updated_at" + ], + "type": "object" + }, + "DeviceAccessTokenRequestForm": { + "description": "The form for a device access token request.", + "properties": { + "client_id": { + "description": "The client ID.", + "format": "uuid", + "type": "string" + }, + "device_code": { + "description": "The device code.", + "format": "uuid", + "type": "string" + }, + "grant_type": { + "allOf": [ + { + "$ref": "#/components/schemas/OAuth2GrantType" + } + ], + "description": "The grant type." + } + }, + "required": [ + "client_id", + "device_code", + "grant_type" + ], + "type": "object" + }, + "DeviceAuthRequestForm": { + "description": "The request parameters for the OAuth 2.0 Device Authorization Grant flow.", + "properties": { + "client_id": { + "description": "The client ID.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "client_id" + ], + "type": "object" + }, + "DeviceAuthVerifyParams": { + "description": "The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant.", + "properties": { + "user_code": { + "description": "The user code.", + "type": "string" + } + }, + "required": [ + "user_code" + ], + "type": "object" + }, + "DockerSystemInfo": { + "description": "Docker system info.", + "properties": { + "architecture": { + "description": "Hardware architecture of the host, as returned by the Go runtime (`GOARCH`). A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).", + "nullable": true, + "type": "string" + }, + "bridge_nf_ip6tables": { + "description": "Indicates if `bridge-nf-call-ip6tables` is available on the host.", + "nullable": true, + "type": "boolean" + }, + "bridge_nf_iptables": { + "description": "Indicates if `bridge-nf-call-iptables` is available on the host.", + "nullable": true, + "type": "boolean" + }, + "cgroup_driver": { + "allOf": [ + { + "$ref": "#/components/schemas/SystemInfoCgroupDriverEnum" + } + ], + "description": "The driver to use for managing cgroups.", + "nullable": true + }, + "cgroup_version": { + "allOf": [ + { + "$ref": "#/components/schemas/SystemInfoCgroupVersionEnum" + } + ], + "description": "The version of the cgroup.", + "nullable": true + }, + "cluster_advertise": { + "description": "The network endpoint that the Engine advertises for the purpose of node discovery. ClusterAdvertise is a `host:port` combination on which the daemon is reachable by other hosts.\n\n**Deprecated**: This field is only propagated when using standalone Swarm mode, and overlay networking using an external k/v store. Overlay networks with Swarm mode enabled use the built-in raft store, and this field will be empty.", + "nullable": true, + "type": "string" + }, + "cluster_store": { + "description": "URL of the distributed storage backend. The storage backend is used for multihost networking (to store network and endpoint information) and by the node discovery mechanism.\n\n**Deprecated**: This field is only propagated when using standalone Swarm mode, and overlay networking using an external k/v store. Overlay networks with Swarm mode enabled use the built-in raft store, and this field will be empty.", + "nullable": true, + "type": "string" + }, + "containerd_commit": { + "allOf": [ + { + "$ref": "#/components/schemas/Commit" + } + ], + "nullable": true + }, + "containers": { + "description": "Total number of containers on the host.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "containers_paused": { + "description": "Number of containers with status `\\\"paused\\\"`.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "containers_running": { + "description": "Number of containers with status `\\\"running\\\"`.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "containers_stopped": { + "description": "Number of containers with status `\\\"stopped\\\"`.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "cpu_cfs_period": { + "description": "Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host.", + "nullable": true, + "type": "boolean" + }, + "cpu_cfs_quota": { + "description": "Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host.", + "nullable": true, + "type": "boolean" + }, + "cpu_set": { + "description": "Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)", + "nullable": true, + "type": "boolean" + }, + "cpu_shares": { + "description": "Indicates if CPU Shares limiting is supported by the host.", + "nullable": true, + "type": "boolean" + }, + "debug": { + "description": "Indicates if the daemon is running in debug-mode / with debug-level logging enabled.", + "nullable": true, + "type": "boolean" + }, + "default_address_pools": { + "description": "List of custom default address pools for local networks, which can be specified in the daemon.json file or dockerd option. Example: a Base \\\"10.10.0.0/16\\\" with Size 24 will define the set of 256 10.10.[0-255].0/24 address pools.", + "items": { + "$ref": "#/components/schemas/SystemInfoDefaultAddressPools" + }, + "type": "array" + }, + "default_runtime": { + "description": "Name of the default OCI runtime that is used when starting containers. The default can be overridden per-container at create time.", + "nullable": true, + "type": "string" + }, + "docker_root_dir": { + "description": "Root directory of persistent Docker state. Defaults to `/var/lib/docker` on Linux, and `C:\\\\ProgramData\\\\docker` on Windows.", + "nullable": true, + "type": "string" + }, + "driver": { + "description": "Name of the storage driver in use.", + "nullable": true, + "type": "string" + }, + "driver_status": { + "description": "Information specific to the storage driver, provided as \\\"label\\\" / \\\"value\\\" pairs. This information is provided by the storage driver, and formatted in a way consistent with the output of `docker info` on the command line.\n\n**Note**: The information returned in this field, including the formatting of values and labels, should not be considered stable, and may change without notice.", + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": "array" + }, + "experimental_build": { + "description": "Indicates if experimental features are enabled on the daemon.", + "nullable": true, + "type": "boolean" + }, + "http_proxy": { + "description": "HTTP-proxy configured for the daemon. This value is obtained from the [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration.", + "nullable": true, + "type": "string" + }, + "https_proxy": { + "description": "HTTPS-proxy configured for the daemon. This value is obtained from the [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration.", + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier of the daemon.\n\n**Note**: The format of the ID itself is not part of the API, and should not be considered stable.", + "nullable": true, + "type": "string" + }, + "images": { + "description": "Total number of images on the host. Both _tagged_ and _untagged_ (dangling) images are counted.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "index_server_address": { + "description": "Address / URL of the index server that is used for image search, and as a default for user authentication for Docker Hub and Docker Cloud.", + "nullable": true, + "type": "string" + }, + "init_binary": { + "description": "Name and, optional, path of the `docker-init` binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", + "nullable": true, + "type": "string" + }, + "init_commit": { + "allOf": [ + { + "$ref": "#/components/schemas/Commit" + } + ], + "nullable": true + }, + "ipv4_forwarding": { + "description": "Indicates IPv4 forwarding is enabled.", + "nullable": true, + "type": "boolean" + }, + "isolation": { + "allOf": [ + { + "$ref": "#/components/schemas/SystemInfoIsolationEnum" + } + ], + "description": "Represents the isolation technology to use as a default for containers. The supported values are platform-specific. If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, and on Windows server, the default is `process`. This option is currently not used on other platforms.", + "nullable": true + }, + "kernel_memory": { + "description": "Indicates if the host has kernel memory limit support enabled.\n\n**Deprecated**: This field is deprecated as the kernel 5.4 deprecated `kmem.limit_in_bytes`.", + "nullable": true, + "type": "boolean" + }, + "kernel_memory_tcp": { + "description": "Indicates if the host has kernel memory TCP limit support enabled. Kernel memory TCP limits are not supported when using cgroups v2, which does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.", + "nullable": true, + "type": "boolean" + }, + "kernel_version": { + "description": "Kernel version of the host. On Linux, this information obtained from `uname`. On Windows this information is queried from the HKEY_LOCAL_MACHINE\\\\\\\\SOFTWARE\\\\\\\\Microsoft\\\\\\\\Windows NT\\\\\\\\CurrentVersion\\\\\\\\ registry value, for example _\\\"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)\\\"_.", + "nullable": true, + "type": "string" + }, + "labels": { + "description": "User-defined labels (key/value metadata) as set on the daemon.\n\n**Note**: When part of a Swarm, nodes can both have _daemon_ labels, set through the daemon configuration, and _node_ labels, set from a manager node in the Swarm. Node labels are not included in this field. Node labels can be retrieved using the `/nodes/(id)` endpoint on a manager node in the Swarm.", + "items": { + "type": "string" + }, + "type": "array" + }, + "live_restore_enabled": { + "description": "Indicates if live restore is enabled. If enabled, containers are kept running when the daemon is shutdown or upon daemon start if running containers are detected.", + "nullable": true, + "type": "boolean" + }, + "logging_driver": { + "description": "The logging driver to use as a default for new containers.", + "nullable": true, + "type": "string" + }, + "mem_total": { + "description": "Total amount of physical memory available on the host, in bytes.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "memory_limit": { + "description": "Indicates if the host has memory limit support enabled.", + "nullable": true, + "type": "boolean" + }, + "n_events_listener": { + "description": "Number of event listeners subscribed.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "n_fd": { + "description": "The total number of file Descriptors in use by the daemon process. This information is only returned if debug-mode is enabled.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "name": { + "description": "Hostname of the host.", + "nullable": true, + "type": "string" + }, + "ncpu": { + "description": "The number of logical CPUs usable by the daemon. The number of available CPUs is checked by querying the operating system when the daemon starts. Changes to operating system CPU allocation after the daemon is started are not reflected.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "no_proxy": { + "description": "Comma-separated list of domain extensions for which no proxy should be used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Containers do not automatically inherit this configuration.", + "nullable": true, + "type": "string" + }, + "oom_kill_disable": { + "description": "Indicates if OOM killer disable is supported on the host.", + "nullable": true, + "type": "boolean" + }, + "operating_system": { + "description": "Name of the host's operating system, for example: \\\"Ubuntu 16.04.2 LTS\\\" or \\\"Windows Server 2016 Datacenter\\\"", + "nullable": true, + "type": "string" + }, + "os_type": { + "description": "Generic type of the operating system of the host, as returned by the Go runtime (`GOOS`). Currently returned values are \\\"linux\\\" and \\\"windows\\\". A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).", + "nullable": true, + "type": "string" + }, + "os_version": { + "description": "Version of the host's operating system\n\n**Note**: The information returned in this field, including its very existence, and the formatting of values, should not be considered stable, and may change without notice.", + "nullable": true, + "type": "string" + }, + "pids_limit": { + "description": "Indicates if the host kernel has PID limit support enabled.", + "nullable": true, + "type": "boolean" + }, + "plugins": { + "allOf": [ + { + "$ref": "#/components/schemas/PluginsInfo" + } + ], + "nullable": true + }, + "product_license": { + "description": "Reports a summary of the product license on the daemon. If a commercial license has been applied to the daemon, information such as number of nodes, and expiration are included.", + "nullable": true, + "type": "string" + }, + "registry_config": { + "allOf": [ + { + "$ref": "#/components/schemas/RegistryServiceConfig" + } + ], + "nullable": true + }, + "runc_commit": { + "allOf": [ + { + "$ref": "#/components/schemas/Commit" + } + ], + "nullable": true + }, + "runtimes": { + "additionalProperties": { + "$ref": "#/components/schemas/Runtime" + }, + "type": "object" + }, + "security_options": { + "description": "List of security features that are enabled on the daemon, such as apparmor, seccomp, SELinux, user-namespaces (userns), and rootless. Additional configuration options for each security feature may be present, and are included as a comma-separated list of key/value pairs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "server_version": { + "description": "Version string of the daemon. **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/) returns the Swarm version instead of the daemon version, for example `swarm/1.2.8`.", + "nullable": true, + "type": "string" + }, + "swap_limit": { + "description": "Indicates if the host has memory swap limit support enabled.", + "nullable": true, + "type": "boolean" + }, + "system_time": { + "description": "The number of goroutines that currently exist. This information is only returned if debug-mode is enabled.", + "nullable": true, + "type": "string" + }, + "warnings": { + "description": "List of warnings / informational messages about missing features, or issues related to the daemon configuration. These messages can be printed by the client as information to the user.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "EmailAuthenticationForm": { + "description": "The body of the form for email authentication.", + "properties": { + "callback_url": { + "description": "The URL to redirect back to after we have authenticated.", + "format": "uri", + "nullable": true, + "type": "string" + }, + "email": { + "description": "The user's email.", + "format": "email", + "type": "string" + } + }, + "required": [ + "email" + ], + "type": "object" + }, + "EngineMetadata": { + "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "async_jobs_running": { + "description": "If any async job is currently running.", + "type": "boolean" + }, + "cache": { + "allOf": [ + { + "$ref": "#/components/schemas/CacheMetadata" + } + ], + "description": "Metadata about our cache." + }, + "environment": { + "allOf": [ + { + "$ref": "#/components/schemas/Environment" + } + ], + "description": "The environment we are running in." + }, + "fs": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSystemMetadata" + } + ], + "description": "Metadata about our file system." + }, + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + }, + "pubsub": { + "allOf": [ + { + "$ref": "#/components/schemas/Connection" + } + ], + "description": "Metadata about our pub-sub connection." + } + }, + "required": [ + "async_jobs_running", + "cache", + "environment", + "fs", + "git_hash", + "pubsub" + ], + "type": "object" + }, + "Environment": { + "description": "The environment the server is running in.", + "enum": [ + "DEVELOPMENT", + "PREVIEW", + "PRODUCTION" + ], + "type": "string" + }, + "Error": { + "description": "Error information from a response.", + "properties": { + "error_code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "request_id": { + "type": "string" + } + }, + "required": [ + "message", + "request_id" + ], + "type": "object" + }, + "ExecutorMetadata": { + "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "docker_info": { + "allOf": [ + { + "$ref": "#/components/schemas/DockerSystemInfo" + } + ], + "description": "Information about the docker daemon." + }, + "environment": { + "allOf": [ + { + "$ref": "#/components/schemas/Environment" + } + ], + "description": "The environment we are running in." + }, + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + } + }, + "required": [ + "docker_info", + "environment", + "git_hash" + ], + "type": "object" + }, + "ExtendedUser": { + "description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Zendesk.", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { + "description": "The date and time the user was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "format": "email", + "type": "string" + }, + "email_verified": { + "description": "The date and time the email address was verified.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the user.", + "type": "string" + }, + "image": { + "description": "The image avatar for the user. This is a URL.", + "format": "uri", + "title": "String", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "mailchimp_id": { + "description": "The user's MailChimp ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + }, + "name": { + "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", + "type": "string" + }, + "phone": { + "default": "", + "description": "The user's phone number.", + "format": "phone", + "title": "String", + "type": "string" + }, + "stripe_id": { + "description": "The user's Stripe ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "zendesk_id": { + "description": "The user's Zendesk ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + } + }, + "required": [ + "created_at", + "image", + "updated_at" + ], + "type": "object" + }, + "ExtendedUserResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/ExtendedUser" + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" + ], + "type": "object" + }, + "FileConversion": { + "description": "A file conversion.", + "properties": { + "completed_at": { + "description": "The time and date the file conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the file conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." + }, + "output": { + "description": "The converted file, if completed, base64 encoded.", + "format": "byte", + "nullable": true, + "title": "String", + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileOutputFormat" + } + ], + "description": "The output format of the file conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat" + } + ], + "description": "The source format of the file conversion." + }, + "started_at": { + "description": "The time and date the file conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the file conversion." + }, + "updated_at": { + "description": "The time and date the file conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the file conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "FileDensity": { + "description": "A file density result.", + "properties": { + "completed_at": { + "description": "The time and date the density was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the density was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "density": { + "description": "The resulting density.", + "format": "double", + "nullable": true, + "type": "number" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." + }, + "material_mass": { + "default": 0.0, + "description": "The material mass as denoted by the user.", + "format": "float", + "type": "number" + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat" + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the density was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the density." + }, + "updated_at": { + "description": "The time and date the density was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the density.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "FileMass": { + "description": "A file mass result.", + "properties": { + "completed_at": { + "description": "The time and date the mass was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the mass was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID." + }, + "mass": { + "description": "The resulting mass.", + "format": "double", + "nullable": true, + "type": "number" + }, + "material_density": { + "default": 0.0, + "description": "The material density as denoted by the user.", + "format": "float", + "type": "number" + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat" + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the mass was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the mass." + }, + "updated_at": { + "description": "The time and date the mass was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the mass.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "FileOutputFormat": { + "description": "The valid types of output file formats.", + "enum": [ + "stl", + "obj", + "dae", + "step", + "fbx", + "fbxb" + ], + "type": "string" + }, + "FileSourceFormat": { + "description": "The valid types of source file formats.", + "enum": [ + "stl", + "obj", + "dae", + "step", + "fbx" + ], + "type": "string" + }, + "FileSurfaceArea": { + "description": "A file surface area result.", + "properties": { + "completed_at": { + "description": "The time and date the density was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the density was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat" + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the density was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the density." + }, + "surface_area": { + "description": "The resulting surface area.", + "format": "double", + "nullable": true, + "type": "number" + }, + "updated_at": { + "description": "The time and date the density was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the density.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "FileSystemMetadata": { + "description": "Metadata about our file system.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "ok": { + "description": "If the file system passed a sanity check.", + "type": "boolean" + } + }, + "required": [ + "ok" + ], + "type": "object" + }, + "FileVolume": { + "description": "A file volume result.", + "properties": { + "completed_at": { + "description": "The time and date the volume was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the volume was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat" + } + ], + "description": "The source format of the file." + }, + "started_at": { + "description": "The time and date the volume was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the volume." + }, + "updated_at": { + "description": "The time and date the volume was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the volume.", + "type": "string" + }, + "volume": { + "description": "The resulting volume.", + "format": "double", + "nullable": true, + "type": "number" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "Gateway": { + "description": "Gateway information.", + "properties": { + "auth_timeout": { + "default": 0, + "description": "The auth timeout of the gateway.", + "format": "int64", + "type": "integer" + }, + "host": { + "default": "", + "description": "The host of the gateway.", + "type": "string" + }, + "name": { + "default": "", + "description": "The name of the gateway.", + "type": "string" + }, + "port": { + "default": 0, + "description": "The port of the gateway.", + "format": "int64", + "type": "integer" + }, + "tls_timeout": { + "default": 0, + "description": "The TLS timeout for the gateway.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "IndexInfo": { + "description": "IndexInfo contains information about a registry.", + "properties": { + "mirrors": { + "description": "List of mirrors, expressed as URIs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Name of the registry, such as \\\"docker.io\\\".", + "nullable": true, + "type": "string" + }, + "official": { + "description": "Indicates whether this is an official registry (i.e., Docker Hub / docker.io)", + "nullable": true, + "type": "boolean" + }, + "secure": { + "description": "Indicates if the registry is part of the list of insecure registries. If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication.\n\n**Warning**: Insecure registries can be useful when running a local registry. However, because its use creates security vulnerabilities it should ONLY be enabled for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", + "nullable": true, + "type": "boolean" + } + }, + "type": "object" + }, + "Invoice": { + "description": "An invoice.", + "properties": { + "amount_due": { + "default": 0.0, + "description": "Final amount due at this time for this invoice.\n\nIf the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "amount_paid": { + "default": 0.0, + "description": "The amount, in USD, that was paid.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "amount_remaining": { + "default": 0.0, + "description": "The amount remaining, in USD, that is due.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "attempt_count": { + "default": 0, + "description": "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.\n\nAny payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "attempted": { + "default": false, + "description": "Whether an attempt has been made to pay the invoice.\n\nAn invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.", + "type": "boolean" + }, + "created_at": { + "description": "Time at which the object was created.", + "format": "date-time", + "type": "string" + }, + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ], + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." + }, + "customer_email": { + "description": "The email address for the customer. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.", + "format": "email", + "type": "string" + }, + "customer_id": { + "description": "Customer ID. The unique identifier for the customer this invoice belongs to. This is the customer ID in the payments service, not our database customer ID.", + "type": "string" + }, + "default_payment_method": { + "description": "Default payment method.", + "type": "string" + }, + "description": { + "description": "Description of the invoice.", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "lines": { + "description": "The individual line items that make up the invoice.\n\n`lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.", + "items": { + "$ref": "#/components/schemas/InvoiceLineItem" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of key-value pairs.", + "type": "object" + }, + "number": { + "description": "A unique, identifying string that appears on emails sent to the customer for this invoice.", + "type": "string" + }, + "paid": { + "default": false, + "description": "Whether payment was successfully collected for this invoice.\n\nAn invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", + "type": "boolean" + }, + "pdf": { + "description": "The link to download the PDF for the invoice.", + "format": "uri", + "nullable": true, + "type": "string" + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this invoice.", + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about an invoice for the customer's credit card statement.", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/InvoiceStatus" + } + ], + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`.\n\n[Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview).", + "nullable": true + }, + "subtotal": { + "default": 0.0, + "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.\n\nItem discounts are already incorporated.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "tax": { + "default": 0.0, + "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "total": { + "default": 0.0, + "description": "Total after discounts and taxes.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "url": { + "description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice.", + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "required": [ + "created_at", + "currency" + ], + "type": "object" + }, + "InvoiceLineItem": { + "description": "An invoice line item.", + "properties": { + "amount": { + "default": 0.0, + "description": "The amount, in USD.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ], + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." + }, + "description": { + "description": "The description.", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "invoice_item": { + "description": "The ID of the invoice item associated with this line item if any.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.\n\nSet of key-value pairs.", + "type": "object" + } + }, + "required": [ + "currency" + ], + "type": "object" + }, + "InvoiceStatus": { + "description": "An enum representing the possible values of an `Invoice`'s `status` field.", + "enum": [ + "deleted", + "draft", + "open", + "paid", + "uncollectible", + "void" + ], + "type": "string" + }, + "Jetstream": { + "description": "Jetstream information.", + "properties": { + "config": { + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamConfig" + } + ], + "default": { "domain": "", "max_memory": 0, "max_storage": 0, "store_dir": "" }, - "meta": { + "description": "The Jetstream config." + }, + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/MetaClusterInfo" + } + ], + "default": { "cluster_size": 0, "leader": "", "name": "" }, - "stats": { + "description": "Meta information about the cluster." + }, + "stats": { + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamStats" + } + ], + "default": { "accounts": 0, "api": { "errors": 0, @@ -1195,12837 +3082,10950 @@ "reserved_memory": 0, "reserved_store": 0, "store": 0 - } - }, - "description": "Jetstream information." + }, + "description": "Jetstream statistics." + } }, - "leaf": { - "allOf": [ - { - "$ref": "#/components/schemas/LeafNode" - } - ], - "default": { - "auth_timeout": 0, - "host": "", - "port": 0, - "tls_timeout": 0 - }, - "description": "Information about leaf nodes." - }, - "leafnodes": { - "default": 0, - "description": "The number of leaf nodes for the server.", - "format": "int64", - "type": "integer" - }, - "max_connections": { - "default": 0, - "description": "The max connections of the server.", - "format": "int64", - "type": "integer" - }, - "max_control_line": { - "default": 0, - "description": "The max control line of the server.", - "format": "int64", - "type": "integer" - }, - "max_payload": { - "default": 0, - "description": "The max payload of the server.", - "format": "int64", - "type": "integer" - }, - "max_pending": { - "default": 0, - "description": "The max pending of the server.", - "format": "int64", - "type": "integer" - }, - "mem": { - "default": 0, - "description": "The memory usage of the server.", - "format": "int64", - "type": "integer" - }, - "now": { - "description": "The time now.", - "format": "date-time", - "type": "string" - }, - "out_bytes": { - "default": 0, - "description": "The count of outbound bytes for the server.", - "format": "int64", - "type": "integer" - }, - "out_msgs": { - "default": 0, - "description": "The number of outbound messages for the server.", - "format": "int64", - "type": "integer" - }, - "ping_interval": { - "default": 0, - "description": "The ping interval of the server.", - "format": "int64", - "type": "integer" - }, - "ping_max": { - "default": 0, - "description": "The ping max of the server.", - "format": "int64", - "type": "integer" - }, - "port": { - "default": 0, - "description": "The port of the server.", - "format": "int64", - "type": "integer" - }, - "proto": { - "default": 0, - "description": "The protocol version.", - "format": "int64", - "type": "integer" - }, - "remotes": { - "default": 0, - "description": "The number of remotes for the server.", - "format": "int64", - "type": "integer" - }, - "routes": { - "default": 0, - "description": "The number of routes for the server.", - "format": "int64", - "type": "integer" - }, - "server_id": { - "default": "", - "description": "The server ID.", - "type": "string" - }, - "server_name": { - "default": "", - "description": "The server name.", - "type": "string" - }, - "slow_consumers": { - "default": 0, - "description": "The number of slow consumers for the server.", - "format": "int64", - "type": "integer" - }, - "start": { - "description": "When the server was started.", - "format": "date-time", - "type": "string" - }, - "subscriptions": { - "default": 0, - "description": "The number of subscriptions for the server.", - "format": "int64", - "type": "integer" - }, - "system_account": { - "default": "", - "description": "The system account.", - "type": "string" - }, - "tls_timeout": { - "default": 0, - "description": "The TLS timeout of the server.", - "format": "int64", - "type": "integer" - }, - "total_connections": { - "default": 0, - "description": "The total number of connections to the server.", - "format": "int64", - "type": "integer" - }, - "uptime": { - "default": "", - "description": "The uptime of the server.", - "type": "string" - }, - "version": { - "default": "", - "description": "The version of the service.", - "type": "string" - }, - "write_deadline": { - "default": 0, - "description": "The write deadline of the server.", - "format": "int64", - "type": "integer" - } + "type": "object" }, - "required": [ - "config_load_time", - "host", - "http_req_stats", - "now", - "start" - ], - "type": "object" - }, - "CreatedAtSortMode": { - "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", - "enum": [ - "created-at-ascending", - "created-at-descending" - ], - "type": "string" - }, - "Currency": { - "description": "Currency is the list of supported currencies.\n\nFor more details see .", - "enum": [ - "aed", - "afn", - "all", - "amd", - "ang", - "aoa", - "ars", - "aud", - "awg", - "azn", - "bam", - "bbd", - "bdt", - "bgn", - "bif", - "bmd", - "bnd", - "bob", - "brl", - "bsd", - "bwp", - "bzd", - "cad", - "cdf", - "chf", - "clp", - "cny", - "cop", - "crc", - "cve", - "czk", - "djf", - "dkk", - "dop", - "dzd", - "eek", - "egp", - "etb", - "eur", - "fjd", - "fkp", - "gbp", - "gel", - "gip", - "gmd", - "gnf", - "gtq", - "gyd", - "hkd", - "hnl", - "hrk", - "htg", - "huf", - "idr", - "ils", - "inr", - "isk", - "jmd", - "jpy", - "kes", - "kgs", - "khr", - "kmf", - "krw", - "kyd", - "kzt", - "lak", - "lbp", - "lkr", - "lrd", - "lsl", - "ltl", - "lvl", - "mad", - "mdl", - "mga", - "mkd", - "mnt", - "mop", - "mro", - "mur", - "mvr", - "mwk", - "mxn", - "myr", - "mzn", - "nad", - "ngn", - "nio", - "nok", - "npr", - "nzd", - "pab", - "pen", - "pgk", - "php", - "pkr", - "pln", - "pyg", - "qar", - "ron", - "rsd", - "rub", - "rwf", - "sar", - "sbd", - "scr", - "sek", - "sgd", - "shp", - "sll", - "sos", - "srd", - "std", - "svc", - "szl", - "thb", - "tjs", - "top", - "try", - "ttd", - "twd", - "tzs", - "uah", - "ugx", - "usd", - "uyu", - "uzs", - "vef", - "vnd", - "vuv", - "wst", - "xaf", - "xcd", - "xof", - "xpf", - "yer", - "zar", - "zmw" - ], - "type": "string" - }, - "Customer": { - "description": "The resource representing a payment \"Customer\".", - "properties": { - "address": { - "allOf": [ - { - "$ref": "#/components/schemas/NewAddress" - } - ], - "description": "The customer's address.", - "nullable": true + "JetstreamApiStats": { + "description": "Jetstream API statistics.", + "properties": { + "errors": { + "default": 0, + "description": "The number of errors.", + "format": "int64", + "type": "integer" + }, + "inflight": { + "default": 0, + "description": "The number of inflight requests.", + "format": "int64", + "type": "integer" + }, + "total": { + "default": 0, + "description": "The number of requests.", + "format": "int64", + "type": "integer" + } }, - "balance": { - "default": 0.0, - "description": "Current balance, if any, being stored on the customer in the payments service.\n\nIf negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "created_at": { - "description": "Time at which the object was created.", - "format": "date-time", - "type": "string" - }, - "currency": { - "allOf": [ - { - "$ref": "#/components/schemas/Currency" - } - ], - "description": "Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes." - }, - "delinquent": { - "default": false, - "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed.\n\nWhen the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. If an invoice is marked uncollectible by dunning, `delinquent` doesn't get reset to `false`.", - "type": "boolean" - }, - "email": { - "description": "The customer's email address.", - "format": "email", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "metadata": { - "additionalProperties": { + "type": "object" + }, + "JetstreamConfig": { + "description": "Jetstream configuration.", + "properties": { + "domain": { + "default": "", + "description": "The domain.", "type": "string" }, - "default": {}, - "description": "Set of key-value pairs.", - "type": "object" - }, - "name": { - "description": "The customer's full name or business name.", - "type": "string" - }, - "phone": { - "default": "", - "description": "The customer's phone number.", - "format": "phone", - "title": "String", - "type": "string" - } - }, - "required": [ - "created_at", - "currency" - ], - "type": "object" - }, - "CustomerBalance": { - "description": "A balance for a user.\n\nThis holds information about the financial balance for the user.", - "properties": { - "created_at": { - "description": "The date and time the balance was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier for the balance." - }, - "monthly_credits_remaining": { - "description": "The monthy credits remaining in the balance. This gets re-upped every month, but if the credits are not used for a month they do not carry over to the next month. It is a stable amount granted to the user per month.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "pre_pay_cash_remaining": { - "description": "The amount of pre-pay cash remaining in the balance. This number goes down as the user uses their pre-paid credits. The reason we track this amount is if a user ever wants to withdraw their pre-pay cash, we can use this amount to determine how much to give them. Say a user has $100 in pre-paid cash, their bill is worth, $50 after subtracting any other credits (like monthly etc.) Their bill is $50, their pre-pay cash remaining will be subtracted by 50 to pay the bill and their `pre_pay_credits_remaining` will be subtracted by 50 to pay the bill. This way if they want to withdraw money after, they can only withdraw $50 since that is the amount of cash they have remaining.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "pre_pay_credits_remaining": { - "description": "The amount of credits remaining in the balance. This is typically the amount of cash * some multiplier they get for pre-paying their account. This number lowers every time a bill is paid with the balance. This number increases every time a user adds funds to their balance. This may be through a subscription or a one off payment.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "total_due": { - "description": "This includes any outstanding, draft, or open invoices and any pending invoice items. This does not include any credits the user has on their account.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "updated_at": { - "description": "The date and time the balance was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID the balance belongs to.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "monthly_credits_remaining", - "pre_pay_cash_remaining", - "pre_pay_credits_remaining", - "total_due", - "updated_at" - ], - "type": "object" - }, - "DeviceAccessTokenRequestForm": { - "description": "The form for a device access token request.", - "properties": { - "client_id": { - "description": "The client ID.", - "format": "uuid", - "type": "string" - }, - "device_code": { - "description": "The device code.", - "format": "uuid", - "type": "string" - }, - "grant_type": { - "allOf": [ - { - "$ref": "#/components/schemas/OAuth2GrantType" - } - ], - "description": "The grant type." - } - }, - "required": [ - "client_id", - "device_code", - "grant_type" - ], - "type": "object" - }, - "DeviceAuthRequestForm": { - "description": "The request parameters for the OAuth 2.0 Device Authorization Grant flow.", - "properties": { - "client_id": { - "description": "The client ID.", - "format": "uuid", - "type": "string" - } - }, - "required": [ - "client_id" - ], - "type": "object" - }, - "DeviceAuthVerifyParams": { - "description": "The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant.", - "properties": { - "user_code": { - "description": "The user code.", - "type": "string" - } - }, - "required": [ - "user_code" - ], - "type": "object" - }, - "DockerSystemInfo": { - "description": "Docker system info.", - "properties": { - "architecture": { - "description": "Hardware architecture of the host, as returned by the Go runtime (`GOARCH`). A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).", - "nullable": true, - "type": "string" - }, - "bridge_nf_ip6tables": { - "description": "Indicates if `bridge-nf-call-ip6tables` is available on the host.", - "nullable": true, - "type": "boolean" - }, - "bridge_nf_iptables": { - "description": "Indicates if `bridge-nf-call-iptables` is available on the host.", - "nullable": true, - "type": "boolean" - }, - "cgroup_driver": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemInfoCgroupDriverEnum" - } - ], - "description": "The driver to use for managing cgroups.", - "nullable": true - }, - "cgroup_version": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemInfoCgroupVersionEnum" - } - ], - "description": "The version of the cgroup.", - "nullable": true - }, - "cluster_advertise": { - "description": "The network endpoint that the Engine advertises for the purpose of node discovery. ClusterAdvertise is a `host:port` combination on which the daemon is reachable by other hosts.\n\n**Deprecated**: This field is only propagated when using standalone Swarm mode, and overlay networking using an external k/v store. Overlay networks with Swarm mode enabled use the built-in raft store, and this field will be empty.", - "nullable": true, - "type": "string" - }, - "cluster_store": { - "description": "URL of the distributed storage backend. The storage backend is used for multihost networking (to store network and endpoint information) and by the node discovery mechanism.\n\n**Deprecated**: This field is only propagated when using standalone Swarm mode, and overlay networking using an external k/v store. Overlay networks with Swarm mode enabled use the built-in raft store, and this field will be empty.", - "nullable": true, - "type": "string" - }, - "containerd_commit": { - "allOf": [ - { - "$ref": "#/components/schemas/Commit" - } - ], - "nullable": true - }, - "containers": { - "description": "Total number of containers on the host.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "containers_paused": { - "description": "Number of containers with status `\\\"paused\\\"`.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "containers_running": { - "description": "Number of containers with status `\\\"running\\\"`.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "containers_stopped": { - "description": "Number of containers with status `\\\"stopped\\\"`.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "cpu_cfs_period": { - "description": "Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host.", - "nullable": true, - "type": "boolean" - }, - "cpu_cfs_quota": { - "description": "Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host.", - "nullable": true, - "type": "boolean" - }, - "cpu_set": { - "description": "Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)", - "nullable": true, - "type": "boolean" - }, - "cpu_shares": { - "description": "Indicates if CPU Shares limiting is supported by the host.", - "nullable": true, - "type": "boolean" - }, - "debug": { - "description": "Indicates if the daemon is running in debug-mode / with debug-level logging enabled.", - "nullable": true, - "type": "boolean" - }, - "default_address_pools": { - "description": "List of custom default address pools for local networks, which can be specified in the daemon.json file or dockerd option. Example: a Base \\\"10.10.0.0/16\\\" with Size 24 will define the set of 256 10.10.[0-255].0/24 address pools.", - "items": { - "$ref": "#/components/schemas/SystemInfoDefaultAddressPools" + "max_memory": { + "default": 0, + "description": "The max memory.", + "format": "int64", + "type": "integer" }, - "type": "array" + "max_storage": { + "default": 0, + "description": "The max storage.", + "format": "int64", + "type": "integer" + }, + "store_dir": { + "default": "", + "description": "The store directory.", + "type": "string" + } }, - "default_runtime": { - "description": "Name of the default OCI runtime that is used when starting containers. The default can be overridden per-container at create time.", - "nullable": true, - "type": "string" + "type": "object" + }, + "JetstreamStats": { + "description": "Jetstream statistics.", + "properties": { + "accounts": { + "default": 0, + "description": "The number of accounts.", + "format": "int64", + "type": "integer" + }, + "api": { + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamApiStats" + } + ], + "default": { + "errors": 0, + "inflight": 0, + "total": 0 + }, + "description": "API stats." + }, + "ha_assets": { + "default": 0, + "description": "The number of HA assets.", + "format": "int64", + "type": "integer" + }, + "memory": { + "default": 0, + "description": "The memory used by the Jetstream server.", + "format": "int64", + "type": "integer" + }, + "reserved_memory": { + "default": 0, + "description": "The reserved memory for the Jetstream server.", + "format": "int64", + "type": "integer" + }, + "reserved_store": { + "default": 0, + "description": "The reserved storage for the Jetstream server.", + "format": "int64", + "type": "integer" + }, + "store": { + "default": 0, + "description": "The storage used by the Jetstream server.", + "format": "int64", + "type": "integer" + } }, - "docker_root_dir": { - "description": "Root directory of persistent Docker state. Defaults to `/var/lib/docker` on Linux, and `C:\\\\ProgramData\\\\docker` on Windows.", - "nullable": true, - "type": "string" + "type": "object" + }, + "LeafNode": { + "description": "Leaf node information.", + "properties": { + "auth_timeout": { + "default": 0, + "description": "The auth timeout of the leaf node.", + "format": "int64", + "type": "integer" + }, + "host": { + "default": "", + "description": "The host of the leaf node.", + "type": "string" + }, + "port": { + "default": 0, + "description": "The port of the leaf node.", + "format": "int64", + "type": "integer" + }, + "tls_timeout": { + "default": 0, + "description": "The TLS timeout for the leaf node.", + "format": "int64", + "type": "integer" + } }, - "driver": { - "description": "Name of the storage driver in use.", - "nullable": true, - "type": "string" + "type": "object" + }, + "MetaClusterInfo": { + "description": "Jetstream statistics.", + "properties": { + "cluster_size": { + "default": 0, + "description": "The size of the cluster.", + "format": "int64", + "type": "integer" + }, + "leader": { + "default": "", + "description": "The leader of the cluster.", + "type": "string" + }, + "name": { + "default": "", + "description": "The name of the cluster.", + "type": "string" + } }, - "driver_status": { - "description": "Information specific to the storage driver, provided as \\\"label\\\" / \\\"value\\\" pairs. This information is provided by the storage driver, and formatted in a way consistent with the output of `docker info` on the command line.\n\n**Note**: The information returned in this field, including the formatting of values and labels, should not be considered stable, and may change without notice.", - "items": { + "type": "object" + }, + "Metadata": { + "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "cache": { + "allOf": [ + { + "$ref": "#/components/schemas/CacheMetadata" + } + ], + "description": "Metadata about our cache." + }, + "engine": { + "allOf": [ + { + "$ref": "#/components/schemas/EngineMetadata" + } + ], + "description": "Metadata about our engine API connection." + }, + "environment": { + "allOf": [ + { + "$ref": "#/components/schemas/Environment" + } + ], + "description": "The environment we are running in." + }, + "executor": { + "allOf": [ + { + "$ref": "#/components/schemas/ExecutorMetadata" + } + ], + "description": "Metadata about our executor API connection." + }, + "fs": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSystemMetadata" + } + ], + "description": "Metadata about our file system." + }, + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + }, + "pubsub": { + "allOf": [ + { + "$ref": "#/components/schemas/Connection" + } + ], + "description": "Metadata about our pub-sub connection." + } + }, + "required": [ + "cache", + "engine", + "environment", + "executor", + "fs", + "git_hash", + "pubsub" + ], + "type": "object" + }, + "Method": { + "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", + "enum": [ + "OPTIONS", + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "TRACE", + "CONNECT", + "PATCH", + "EXTENSION" + ], + "type": "string" + }, + "NewAddress": { + "description": "The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`.", + "properties": { + "city": { + "description": "The city component.", + "type": "string" + }, + "country": { + "description": "The country component.", + "type": "string" + }, + "state": { + "description": "The state component.", + "type": "string" + }, + "street1": { + "description": "The first street component.", + "type": "string" + }, + "street2": { + "description": "The second street component.", + "type": "string" + }, + "user_id": { + "description": "The user ID that this address belongs to.", + "type": "string" + }, + "zip": { + "description": "The zip component.", + "type": "string" + } + }, + "type": "object" + }, + "OAuth2ClientInfo": { + "description": "Information about an OAuth 2.0 client.", + "properties": { + "csrf_token": { + "description": "Value used for [CSRF](https://tools.ietf.org/html/rfc6749#section-10.12) protection via the `state` parameter.", + "type": "string" + }, + "pkce_code_verifier": { + "description": "Code Verifier used for [PKCE]((https://tools.ietf.org/html/rfc7636)) protection via the `code_verifier` parameter. The value must have a minimum length of 43 characters and a maximum length of 128 characters. Each character must be ASCII alphanumeric or one of the characters \"-\" / \".\" / \"_\" / \"~\".", + "nullable": true, + "type": "string" + }, + "url": { + "description": "The URL for consent.", + "type": "string" + } + }, + "type": "object" + }, + "OAuth2GrantType": { + "description": "An OAuth 2.0 Grant Type. These are documented here: .", + "enum": [ + "urn:ietf:params:oauth:grant-type:device_code" + ], + "type": "string" + }, + "OutputFile": { + "description": "Output file contents.", + "properties": { + "contents": { + "description": "The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.", + "nullable": true, + "type": "string" + }, + "name": { + "default": "", + "description": "The name of the file.", + "type": "string" + } + }, + "type": "object" + }, + "PaymentIntent": { + "description": "A payment intent response.", + "properties": { + "client_secret": { + "description": "The client secret is used for client-side retrieval using a publishable key. The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.", + "type": "string" + } + }, + "required": [ + "client_secret" + ], + "type": "object" + }, + "PaymentMethod": { + "description": "A payment method.", + "properties": { + "billing_info": { + "allOf": [ + { + "$ref": "#/components/schemas/BillingInfo" + } + ], + "description": "The billing info for the payment method." + }, + "card": { + "allOf": [ + { + "$ref": "#/components/schemas/CardDetails" + } + ], + "description": "The card, if it is one. For our purposes, this is the only type of payment method that we support.", + "nullable": true + }, + "created_at": { + "description": "Time at which the object was created.", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of key-value pairs.", + "type": "object" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentMethodType" + } + ], + "description": "The type of payment method." + } + }, + "required": [ + "billing_info", + "created_at", + "type" + ], + "type": "object" + }, + "PaymentMethodCardChecks": { + "description": "Card checks.", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "type": "string" + }, + "address_postal_code_check": { + "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "type": "string" + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "type": "string" + } + }, + "type": "object" + }, + "PaymentMethodType": { + "description": "An enum representing the possible values of an `PaymentMethod`'s `type` field.", + "enum": [ + "card" + ], + "type": "string" + }, + "PhysicsConstant": { + "description": "A physics constant.", + "properties": { + "completed_at": { + "description": "The time and date the constant was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "constant": { + "allOf": [ + { + "$ref": "#/components/schemas/PhysicsConstantName" + } + ], + "description": "The constant we are returning." + }, + "created_at": { + "description": "The time and date the constant was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the constant request.\n\nThis is the same as the API call ID." + }, + "started_at": { + "description": "The time and date the constant was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the constant." + }, + "updated_at": { + "description": "The time and date the constant was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the constant.", + "type": "string" + }, + "value": { + "description": "The resulting value of the constant.", + "format": "double", + "nullable": true, + "type": "number" + } + }, + "required": [ + "constant", + "created_at", + "id", + "status", + "updated_at" + ], + "type": "object" + }, + "PhysicsConstantName": { + "description": "The valid types of phys constant names.", + "enum": [ + "pi", + "c", + "speed_of_light", + "G", + "newtonian_graviation", + "h", + "plank_const", + "mu_0", + "vacuum_permeability", + "E_0", + "vacuum_permitivity", + "Z_0", + "vacuum_impedance", + "k_e", + "coulomb_const", + "e", + "elementary_charge", + "m_e", + "electron_mass", + "m_p", + "proton_mass", + "mu_B", + "bohr_magneton", + "NA", + "avogadro_num", + "R", + "molar_gas_const", + "K_B", + "boltzmann_const", + "F", + "faraday_const", + "sigma", + "stefan_boltzmann_const" + ], + "type": "string" + }, + "PluginsInfo": { + "description": "Available plugins per type.\n\n**Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are \\\"lazily\\\" loaded, and are not returned in this list if there is no resource using the plugin.", + "properties": { + "authorization": { + "description": "Names of available authorization plugins.", "items": { "type": "string" }, "type": "array" }, - "type": "array" - }, - "experimental_build": { - "description": "Indicates if experimental features are enabled on the daemon.", - "nullable": true, - "type": "boolean" - }, - "http_proxy": { - "description": "HTTP-proxy configured for the daemon. This value is obtained from the [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration.", - "nullable": true, - "type": "string" - }, - "https_proxy": { - "description": "HTTPS-proxy configured for the daemon. This value is obtained from the [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration.", - "nullable": true, - "type": "string" - }, - "id": { - "description": "Unique identifier of the daemon.\n\n**Note**: The format of the ID itself is not part of the API, and should not be considered stable.", - "nullable": true, - "type": "string" - }, - "images": { - "description": "Total number of images on the host. Both _tagged_ and _untagged_ (dangling) images are counted.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "index_server_address": { - "description": "Address / URL of the index server that is used for image search, and as a default for user authentication for Docker Hub and Docker Cloud.", - "nullable": true, - "type": "string" - }, - "init_binary": { - "description": "Name and, optional, path of the `docker-init` binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", - "nullable": true, - "type": "string" - }, - "init_commit": { - "allOf": [ - { - "$ref": "#/components/schemas/Commit" - } - ], - "nullable": true - }, - "ipv4_forwarding": { - "description": "Indicates IPv4 forwarding is enabled.", - "nullable": true, - "type": "boolean" - }, - "isolation": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemInfoIsolationEnum" - } - ], - "description": "Represents the isolation technology to use as a default for containers. The supported values are platform-specific. If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, and on Windows server, the default is `process`. This option is currently not used on other platforms.", - "nullable": true - }, - "kernel_memory": { - "description": "Indicates if the host has kernel memory limit support enabled.\n\n**Deprecated**: This field is deprecated as the kernel 5.4 deprecated `kmem.limit_in_bytes`.", - "nullable": true, - "type": "boolean" - }, - "kernel_memory_tcp": { - "description": "Indicates if the host has kernel memory TCP limit support enabled. Kernel memory TCP limits are not supported when using cgroups v2, which does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.", - "nullable": true, - "type": "boolean" - }, - "kernel_version": { - "description": "Kernel version of the host. On Linux, this information obtained from `uname`. On Windows this information is queried from the HKEY_LOCAL_MACHINE\\\\\\\\SOFTWARE\\\\\\\\Microsoft\\\\\\\\Windows NT\\\\\\\\CurrentVersion\\\\\\\\ registry value, for example _\\\"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)\\\"_.", - "nullable": true, - "type": "string" - }, - "labels": { - "description": "User-defined labels (key/value metadata) as set on the daemon.\n\n**Note**: When part of a Swarm, nodes can both have _daemon_ labels, set through the daemon configuration, and _node_ labels, set from a manager node in the Swarm. Node labels are not included in this field. Node labels can be retrieved using the `/nodes/(id)` endpoint on a manager node in the Swarm.", - "items": { - "type": "string" - }, - "type": "array" - }, - "live_restore_enabled": { - "description": "Indicates if live restore is enabled. If enabled, containers are kept running when the daemon is shutdown or upon daemon start if running containers are detected.", - "nullable": true, - "type": "boolean" - }, - "logging_driver": { - "description": "The logging driver to use as a default for new containers.", - "nullable": true, - "type": "string" - }, - "mem_total": { - "description": "Total amount of physical memory available on the host, in bytes.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "memory_limit": { - "description": "Indicates if the host has memory limit support enabled.", - "nullable": true, - "type": "boolean" - }, - "n_events_listener": { - "description": "Number of event listeners subscribed.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "n_fd": { - "description": "The total number of file Descriptors in use by the daemon process. This information is only returned if debug-mode is enabled.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "name": { - "description": "Hostname of the host.", - "nullable": true, - "type": "string" - }, - "ncpu": { - "description": "The number of logical CPUs usable by the daemon. The number of available CPUs is checked by querying the operating system when the daemon starts. Changes to operating system CPU allocation after the daemon is started are not reflected.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "no_proxy": { - "description": "Comma-separated list of domain extensions for which no proxy should be used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Containers do not automatically inherit this configuration.", - "nullable": true, - "type": "string" - }, - "oom_kill_disable": { - "description": "Indicates if OOM killer disable is supported on the host.", - "nullable": true, - "type": "boolean" - }, - "operating_system": { - "description": "Name of the host's operating system, for example: \\\"Ubuntu 16.04.2 LTS\\\" or \\\"Windows Server 2016 Datacenter\\\"", - "nullable": true, - "type": "string" - }, - "os_type": { - "description": "Generic type of the operating system of the host, as returned by the Go runtime (`GOOS`). Currently returned values are \\\"linux\\\" and \\\"windows\\\". A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).", - "nullable": true, - "type": "string" - }, - "os_version": { - "description": "Version of the host's operating system\n\n**Note**: The information returned in this field, including its very existence, and the formatting of values, should not be considered stable, and may change without notice.", - "nullable": true, - "type": "string" - }, - "pids_limit": { - "description": "Indicates if the host kernel has PID limit support enabled.", - "nullable": true, - "type": "boolean" - }, - "plugins": { - "allOf": [ - { - "$ref": "#/components/schemas/PluginsInfo" - } - ], - "nullable": true - }, - "product_license": { - "description": "Reports a summary of the product license on the daemon. If a commercial license has been applied to the daemon, information such as number of nodes, and expiration are included.", - "nullable": true, - "type": "string" - }, - "registry_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RegistryServiceConfig" - } - ], - "nullable": true - }, - "runc_commit": { - "allOf": [ - { - "$ref": "#/components/schemas/Commit" - } - ], - "nullable": true - }, - "runtimes": { - "additionalProperties": { - "$ref": "#/components/schemas/Runtime" - }, - "type": "object" - }, - "security_options": { - "description": "List of security features that are enabled on the daemon, such as apparmor, seccomp, SELinux, user-namespaces (userns), and rootless. Additional configuration options for each security feature may be present, and are included as a comma-separated list of key/value pairs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "server_version": { - "description": "Version string of the daemon. **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/) returns the Swarm version instead of the daemon version, for example `swarm/1.2.8`.", - "nullable": true, - "type": "string" - }, - "swap_limit": { - "description": "Indicates if the host has memory swap limit support enabled.", - "nullable": true, - "type": "boolean" - }, - "system_time": { - "description": "The number of goroutines that currently exist. This information is only returned if debug-mode is enabled.", - "nullable": true, - "type": "string" - }, - "warnings": { - "description": "List of warnings / informational messages about missing features, or issues related to the daemon configuration. These messages can be printed by the client as information to the user.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EmailAuthenticationForm": { - "description": "The body of the form for email authentication.", - "properties": { - "callback_url": { - "description": "The URL to redirect back to after we have authenticated.", - "format": "uri", - "nullable": true, - "type": "string" - }, - "email": { - "description": "The user's email.", - "format": "email", - "type": "string" - } - }, - "required": [ - "email" - ], - "type": "object" - }, - "EngineMetadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "async_jobs_running": { - "description": "If any async job is currently running.", - "type": "boolean" - }, - "cache": { - "allOf": [ - { - "$ref": "#/components/schemas/CacheMetadata" - } - ], - "description": "Metadata about our cache." - }, - "environment": { - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ], - "description": "The environment we are running in." - }, - "fs": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSystemMetadata" - } - ], - "description": "Metadata about our file system." - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - }, - "pubsub": { - "allOf": [ - { - "$ref": "#/components/schemas/Connection" - } - ], - "description": "Metadata about our pub-sub connection." - } - }, - "required": [ - "async_jobs_running", - "cache", - "environment", - "fs", - "git_hash", - "pubsub" - ], - "type": "object" - }, - "Environment": { - "description": "The environment the server is running in.", - "enum": [ - "DEVELOPMENT", - "PREVIEW", - "PRODUCTION" - ], - "type": "string" - }, - "Error": { - "description": "Error information from a response.", - "properties": { - "error_code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "request_id": { - "type": "string" - } - }, - "required": [ - "message", - "request_id" - ], - "type": "object" - }, - "ExecutorMetadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "docker_info": { - "allOf": [ - { - "$ref": "#/components/schemas/DockerSystemInfo" - } - ], - "description": "Information about the docker daemon." - }, - "environment": { - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ], - "description": "The environment we are running in." - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - } - }, - "required": [ - "docker_info", - "environment", - "git_hash" - ], - "type": "object" - }, - "ExtendedUser": { - "description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Zendesk.", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "created_at": { - "description": "The date and time the user was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "email": { - "description": "The email address of the user.", - "format": "email", - "type": "string" - }, - "email_verified": { - "description": "The date and time the email address was verified.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "first_name": { - "description": "The user's first name.", - "type": "string" - }, - "github": { - "description": "The user's GitHub handle.", - "type": "string" - }, - "id": { - "description": "The unique identifier for the user.", - "type": "string" - }, - "image": { - "description": "The image avatar for the user. This is a URL.", - "format": "uri", - "title": "String", - "type": "string" - }, - "last_name": { - "description": "The user's last name.", - "type": "string" - }, - "mailchimp_id": { - "description": "The user's MailChimp ID. This is mostly used for internal mapping.", - "nullable": true, - "type": "string" - }, - "name": { - "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", - "type": "string" - }, - "phone": { - "default": "", - "description": "The user's phone number.", - "format": "phone", - "title": "String", - "type": "string" - }, - "stripe_id": { - "description": "The user's Stripe ID. This is mostly used for internal mapping.", - "nullable": true, - "type": "string" - }, - "updated_at": { - "description": "The date and time the user was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "zendesk_id": { - "description": "The user's Zendesk ID. This is mostly used for internal mapping.", - "nullable": true, - "type": "string" - } - }, - "required": [ - "created_at", - "image", - "updated_at" - ], - "type": "object" - }, - "ExtendedUserResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/ExtendedUser" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "FileConversion": { - "description": "A file conversion.", - "properties": { - "completed_at": { - "description": "The time and date the file conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the file conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." - }, - "output": { - "description": "The converted file, if completed, base64 encoded.", - "format": "byte", - "nullable": true, - "title": "String", - "type": "string" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileOutputFormat" - } - ], - "description": "The output format of the file conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file conversion." - }, - "started_at": { - "description": "The time and date the file conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the file conversion." - }, - "updated_at": { - "description": "The time and date the file conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the file conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "FileDensity": { - "description": "A file density result.", - "properties": { - "completed_at": { - "description": "The time and date the density was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the density was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "density": { - "description": "The resulting density.", - "format": "double", - "nullable": true, - "type": "number" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." - }, - "material_mass": { - "default": 0.0, - "description": "The material mass as denoted by the user.", - "format": "float", - "type": "number" - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the density was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the density." - }, - "updated_at": { - "description": "The time and date the density was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the density.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "FileMass": { - "description": "A file mass result.", - "properties": { - "completed_at": { - "description": "The time and date the mass was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the mass was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID." - }, - "mass": { - "description": "The resulting mass.", - "format": "double", - "nullable": true, - "type": "number" - }, - "material_density": { - "default": 0.0, - "description": "The material density as denoted by the user.", - "format": "float", - "type": "number" - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the mass was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the mass." - }, - "updated_at": { - "description": "The time and date the mass was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the mass.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "FileOutputFormat": { - "description": "The valid types of output file formats.", - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx", - "fbxb" - ], - "type": "string" - }, - "FileSourceFormat": { - "description": "The valid types of source file formats.", - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx" - ], - "type": "string" - }, - "FileSurfaceArea": { - "description": "A file surface area result.", - "properties": { - "completed_at": { - "description": "The time and date the density was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the density was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the density was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the density." - }, - "surface_area": { - "description": "The resulting surface area.", - "format": "double", - "nullable": true, - "type": "number" - }, - "updated_at": { - "description": "The time and date the density was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the density.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "FileSystemMetadata": { - "description": "Metadata about our file system.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "ok": { - "description": "If the file system passed a sanity check.", - "type": "boolean" - } - }, - "required": [ - "ok" - ], - "type": "object" - }, - "FileVolume": { - "description": "A file volume result.", - "properties": { - "completed_at": { - "description": "The time and date the volume was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the volume was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ], - "description": "The source format of the file." - }, - "started_at": { - "description": "The time and date the volume was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the volume." - }, - "updated_at": { - "description": "The time and date the volume was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the volume.", - "type": "string" - }, - "volume": { - "description": "The resulting volume.", - "format": "double", - "nullable": true, - "type": "number" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "Gateway": { - "description": "Gateway information.", - "properties": { - "auth_timeout": { - "default": 0, - "description": "The auth timeout of the gateway.", - "format": "int64", - "type": "integer" - }, - "host": { - "default": "", - "description": "The host of the gateway.", - "type": "string" - }, - "name": { - "default": "", - "description": "The name of the gateway.", - "type": "string" - }, - "port": { - "default": 0, - "description": "The port of the gateway.", - "format": "int64", - "type": "integer" - }, - "tls_timeout": { - "default": 0, - "description": "The TLS timeout for the gateway.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "IndexInfo": { - "description": "IndexInfo contains information about a registry.", - "properties": { - "mirrors": { - "description": "List of mirrors, expressed as URIs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Name of the registry, such as \\\"docker.io\\\".", - "nullable": true, - "type": "string" - }, - "official": { - "description": "Indicates whether this is an official registry (i.e., Docker Hub / docker.io)", - "nullable": true, - "type": "boolean" - }, - "secure": { - "description": "Indicates if the registry is part of the list of insecure registries. If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication.\n\n**Warning**: Insecure registries can be useful when running a local registry. However, because its use creates security vulnerabilities it should ONLY be enabled for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", - "nullable": true, - "type": "boolean" - } - }, - "type": "object" - }, - "Invoice": { - "description": "An invoice.", - "properties": { - "amount_due": { - "default": 0.0, - "description": "Final amount due at this time for this invoice.\n\nIf the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "amount_paid": { - "default": 0.0, - "description": "The amount, in USD, that was paid.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "amount_remaining": { - "default": 0.0, - "description": "The amount remaining, in USD, that is due.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "attempt_count": { - "default": 0, - "description": "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.\n\nAny payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.", - "format": "uint64", - "minimum": 0, - "type": "integer" - }, - "attempted": { - "default": false, - "description": "Whether an attempt has been made to pay the invoice.\n\nAn invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.", - "type": "boolean" - }, - "created_at": { - "description": "Time at which the object was created.", - "format": "date-time", - "type": "string" - }, - "currency": { - "allOf": [ - { - "$ref": "#/components/schemas/Currency" - } - ], - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." - }, - "customer_email": { - "description": "The email address for the customer. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.", - "format": "email", - "type": "string" - }, - "customer_id": { - "description": "Customer ID. The unique identifier for the customer this invoice belongs to. This is the customer ID in the payments service, not our database customer ID.", - "type": "string" - }, - "default_payment_method": { - "description": "Default payment method.", - "type": "string" - }, - "description": { - "description": "Description of the invoice.", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "lines": { - "description": "The individual line items that make up the invoice.\n\n`lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.", - "items": { - "$ref": "#/components/schemas/InvoiceLineItem" - }, - "type": "array" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "Set of key-value pairs.", - "type": "object" - }, - "number": { - "description": "A unique, identifying string that appears on emails sent to the customer for this invoice.", - "type": "string" - }, - "paid": { - "default": false, - "description": "Whether payment was successfully collected for this invoice.\n\nAn invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", - "type": "boolean" - }, - "pdf": { - "description": "The link to download the PDF for the invoice.", - "format": "uri", - "nullable": true, - "type": "string" - }, - "receipt_number": { - "description": "This is the transaction number that appears on email receipts sent for this invoice.", - "type": "string" - }, - "statement_descriptor": { - "description": "Extra information about an invoice for the customer's credit card statement.", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/InvoiceStatus" - } - ], - "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`.\n\n[Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview).", - "nullable": true - }, - "subtotal": { - "default": 0.0, - "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.\n\nItem discounts are already incorporated.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "tax": { - "default": 0.0, - "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "total": { - "default": 0.0, - "description": "Total after discounts and taxes.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "url": { - "description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice.", - "format": "uri", - "nullable": true, - "type": "string" - } - }, - "required": [ - "created_at", - "currency" - ], - "type": "object" - }, - "InvoiceLineItem": { - "description": "An invoice line item.", - "properties": { - "amount": { - "default": 0.0, - "description": "The amount, in USD.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "currency": { - "allOf": [ - { - "$ref": "#/components/schemas/Currency" - } - ], - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." - }, - "description": { - "description": "The description.", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "invoice_item": { - "description": "The ID of the invoice item associated with this line item if any.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.\n\nSet of key-value pairs.", - "type": "object" - } - }, - "required": [ - "currency" - ], - "type": "object" - }, - "InvoiceStatus": { - "description": "An enum representing the possible values of an `Invoice`'s `status` field.", - "enum": [ - "deleted", - "draft", - "open", - "paid", - "uncollectible", - "void" - ], - "type": "string" - }, - "Jetstream": { - "description": "Jetstream information.", - "properties": { - "config": { - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamConfig" - } - ], - "default": { - "domain": "", - "max_memory": 0, - "max_storage": 0, - "store_dir": "" - }, - "description": "The Jetstream config." - }, - "meta": { - "allOf": [ - { - "$ref": "#/components/schemas/MetaClusterInfo" - } - ], - "default": { - "cluster_size": 0, - "leader": "", - "name": "" - }, - "description": "Meta information about the cluster." - }, - "stats": { - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamStats" - } - ], - "default": { - "accounts": 0, - "api": { - "errors": 0, - "inflight": 0, - "total": 0 - }, - "ha_assets": 0, - "memory": 0, - "reserved_memory": 0, - "reserved_store": 0, - "store": 0 - }, - "description": "Jetstream statistics." - } - }, - "type": "object" - }, - "JetstreamApiStats": { - "description": "Jetstream API statistics.", - "properties": { - "errors": { - "default": 0, - "description": "The number of errors.", - "format": "int64", - "type": "integer" - }, - "inflight": { - "default": 0, - "description": "The number of inflight requests.", - "format": "int64", - "type": "integer" - }, - "total": { - "default": 0, - "description": "The number of requests.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "JetstreamConfig": { - "description": "Jetstream configuration.", - "properties": { - "domain": { - "default": "", - "description": "The domain.", - "type": "string" - }, - "max_memory": { - "default": 0, - "description": "The max memory.", - "format": "int64", - "type": "integer" - }, - "max_storage": { - "default": 0, - "description": "The max storage.", - "format": "int64", - "type": "integer" - }, - "store_dir": { - "default": "", - "description": "The store directory.", - "type": "string" - } - }, - "type": "object" - }, - "JetstreamStats": { - "description": "Jetstream statistics.", - "properties": { - "accounts": { - "default": 0, - "description": "The number of accounts.", - "format": "int64", - "type": "integer" - }, - "api": { - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamApiStats" - } - ], - "default": { - "errors": 0, - "inflight": 0, - "total": 0 - }, - "description": "API stats." - }, - "ha_assets": { - "default": 0, - "description": "The number of HA assets.", - "format": "int64", - "type": "integer" - }, - "memory": { - "default": 0, - "description": "The memory used by the Jetstream server.", - "format": "int64", - "type": "integer" - }, - "reserved_memory": { - "default": 0, - "description": "The reserved memory for the Jetstream server.", - "format": "int64", - "type": "integer" - }, - "reserved_store": { - "default": 0, - "description": "The reserved storage for the Jetstream server.", - "format": "int64", - "type": "integer" - }, - "store": { - "default": 0, - "description": "The storage used by the Jetstream server.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "LeafNode": { - "description": "Leaf node information.", - "properties": { - "auth_timeout": { - "default": 0, - "description": "The auth timeout of the leaf node.", - "format": "int64", - "type": "integer" - }, - "host": { - "default": "", - "description": "The host of the leaf node.", - "type": "string" - }, - "port": { - "default": 0, - "description": "The port of the leaf node.", - "format": "int64", - "type": "integer" - }, - "tls_timeout": { - "default": 0, - "description": "The TLS timeout for the leaf node.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "MetaClusterInfo": { - "description": "Jetstream statistics.", - "properties": { - "cluster_size": { - "default": 0, - "description": "The size of the cluster.", - "format": "int64", - "type": "integer" - }, - "leader": { - "default": "", - "description": "The leader of the cluster.", - "type": "string" - }, - "name": { - "default": "", - "description": "The name of the cluster.", - "type": "string" - } - }, - "type": "object" - }, - "Metadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "cache": { - "allOf": [ - { - "$ref": "#/components/schemas/CacheMetadata" - } - ], - "description": "Metadata about our cache." - }, - "engine": { - "allOf": [ - { - "$ref": "#/components/schemas/EngineMetadata" - } - ], - "description": "Metadata about our engine API connection." - }, - "environment": { - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ], - "description": "The environment we are running in." - }, - "executor": { - "allOf": [ - { - "$ref": "#/components/schemas/ExecutorMetadata" - } - ], - "description": "Metadata about our executor API connection." - }, - "fs": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSystemMetadata" - } - ], - "description": "Metadata about our file system." - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - }, - "pubsub": { - "allOf": [ - { - "$ref": "#/components/schemas/Connection" - } - ], - "description": "Metadata about our pub-sub connection." - } - }, - "required": [ - "cache", - "engine", - "environment", - "executor", - "fs", - "git_hash", - "pubsub" - ], - "type": "object" - }, - "Method": { - "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", - "enum": [ - "OPTIONS", - "GET", - "POST", - "PUT", - "DELETE", - "HEAD", - "TRACE", - "CONNECT", - "PATCH", - "EXTENSION" - ], - "type": "string" - }, - "NewAddress": { - "description": "The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`.", - "properties": { - "city": { - "description": "The city component.", - "type": "string" - }, - "country": { - "description": "The country component.", - "type": "string" - }, - "state": { - "description": "The state component.", - "type": "string" - }, - "street1": { - "description": "The first street component.", - "type": "string" - }, - "street2": { - "description": "The second street component.", - "type": "string" - }, - "user_id": { - "description": "The user ID that this address belongs to.", - "type": "string" - }, - "zip": { - "description": "The zip component.", - "type": "string" - } - }, - "type": "object" - }, - "OAuth2ClientInfo": { - "description": "Information about an OAuth 2.0 client.", - "properties": { - "csrf_token": { - "description": "Value used for [CSRF](https://tools.ietf.org/html/rfc6749#section-10.12) protection via the `state` parameter.", - "type": "string" - }, - "pkce_code_verifier": { - "description": "Code Verifier used for [PKCE]((https://tools.ietf.org/html/rfc7636)) protection via the `code_verifier` parameter. The value must have a minimum length of 43 characters and a maximum length of 128 characters. Each character must be ASCII alphanumeric or one of the characters \"-\" / \".\" / \"_\" / \"~\".", - "nullable": true, - "type": "string" - }, - "url": { - "description": "The URL for consent.", - "type": "string" - } - }, - "type": "object" - }, - "OAuth2GrantType": { - "description": "An OAuth 2.0 Grant Type. These are documented here: .", - "enum": [ - "urn:ietf:params:oauth:grant-type:device_code" - ], - "type": "string" - }, - "OutputFile": { - "description": "Output file contents.", - "properties": { - "contents": { - "description": "The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.", - "nullable": true, - "type": "string" - }, - "name": { - "default": "", - "description": "The name of the file.", - "type": "string" - } - }, - "type": "object" - }, - "PaymentIntent": { - "description": "A payment intent response.", - "properties": { - "client_secret": { - "description": "The client secret is used for client-side retrieval using a publishable key. The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.", - "type": "string" - } - }, - "required": [ - "client_secret" - ], - "type": "object" - }, - "PaymentMethod": { - "description": "A payment method.", - "properties": { - "billing_info": { - "allOf": [ - { - "$ref": "#/components/schemas/BillingInfo" - } - ], - "description": "The billing info for the payment method." - }, - "card": { - "allOf": [ - { - "$ref": "#/components/schemas/CardDetails" - } - ], - "description": "The card, if it is one. For our purposes, this is the only type of payment method that we support.", - "nullable": true - }, - "created_at": { - "description": "Time at which the object was created.", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "Set of key-value pairs.", - "type": "object" - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/PaymentMethodType" - } - ], - "description": "The type of payment method." - } - }, - "required": [ - "billing_info", - "created_at", - "type" - ], - "type": "object" - }, - "PaymentMethodCardChecks": { - "description": "Card checks.", - "properties": { - "address_line1_check": { - "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" - }, - "address_postal_code_check": { - "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" - }, - "cvc_check": { - "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" - } - }, - "type": "object" - }, - "PaymentMethodType": { - "description": "An enum representing the possible values of an `PaymentMethod`'s `type` field.", - "enum": [ - "card" - ], - "type": "string" - }, - "PhysicsConstant": { - "description": "A physics constant.", - "properties": { - "completed_at": { - "description": "The time and date the constant was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "constant": { - "allOf": [ - { - "$ref": "#/components/schemas/PhysicsConstantName" - } - ], - "description": "The constant we are returning." - }, - "created_at": { - "description": "The time and date the constant was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the constant request.\n\nThis is the same as the API call ID." - }, - "started_at": { - "description": "The time and date the constant was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the constant." - }, - "updated_at": { - "description": "The time and date the constant was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the constant.", - "type": "string" - }, - "value": { - "description": "The resulting value of the constant.", - "format": "double", - "nullable": true, - "type": "number" - } - }, - "required": [ - "constant", - "created_at", - "id", - "status", - "updated_at" - ], - "type": "object" - }, - "PhysicsConstantName": { - "description": "The valid types of phys constant names.", - "enum": [ - "pi", - "c", - "speed_of_light", - "G", - "newtonian_graviation", - "h", - "plank_const", - "mu_0", - "vacuum_permeability", - "E_0", - "vacuum_permitivity", - "Z_0", - "vacuum_impedance", - "k_e", - "coulomb_const", - "e", - "elementary_charge", - "m_e", - "electron_mass", - "m_p", - "proton_mass", - "mu_B", - "bohr_magneton", - "NA", - "avogadro_num", - "R", - "molar_gas_const", - "K_B", - "boltzmann_const", - "F", - "faraday_const", - "sigma", - "stefan_boltzmann_const" - ], - "type": "string" - }, - "PluginsInfo": { - "description": "Available plugins per type.\n\n**Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are \\\"lazily\\\" loaded, and are not returned in this list if there is no resource using the plugin.", - "properties": { - "authorization": { - "description": "Names of available authorization plugins.", - "items": { - "type": "string" - }, - "type": "array" - }, - "log": { - "description": "Names of available logging-drivers, and logging-driver plugins.", - "items": { - "type": "string" - }, - "type": "array" - }, - "network": { - "description": "Names of available network-drivers, and network-driver plugins.", - "items": { - "type": "string" - }, - "type": "array" - }, - "volume": { - "description": "Names of available volume-drivers, and network-driver plugins.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Pong": { - "description": "The response from the `/ping` endpoint.", - "properties": { - "message": { - "description": "The pong response.", - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - }, - "RegistryServiceConfig": { - "description": "RegistryServiceConfig stores daemon registry services configuration.", - "properties": { - "allow_nondistributable_artifacts_cid_rs": { - "description": "List of IP ranges to which nondistributable artifacts can be pushed, using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior, and enables the daemon to push nondistributable artifacts to all registries whose resolved IP address is within the subnet described by the CIDR syntax. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allow_nondistributable_artifacts_hostnames": { - "description": "List of registry hostnames to which nondistributable artifacts can be pushed, using the format `[:]` or `[:]`. Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior for the specified registries. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", - "items": { - "type": "string" - }, - "type": "array" - }, - "index_configs": { - "additionalProperties": { - "$ref": "#/components/schemas/IndexInfo" - }, - "type": "object" - }, - "insecure_registry_cid_rs": { - "description": "List of IP ranges of insecure registries, using the CIDR syntax ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. By default, local registries (`127.0.0.0/8`) are configured as insecure. All other registries are secure. Communicating with an insecure registry is not possible if the daemon assumes that registry is secure. This configuration override this behavior, insecure communication with registries whose resolved IP address is within the subnet described by the CIDR syntax. Registries can also be marked insecure by hostname. Those registries are listed under `IndexConfigs` and have their `Secure` field set to `false`.\n\n**Warning**: Using this option can be useful when running a local registry, but introduces security vulnerabilities. This option should therefore ONLY be used for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mirrors": { - "description": "List of registry URLs that act as a mirror for the official (`docker.io`) registry.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Runtime": { - "description": "Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.", - "properties": { - "path": { - "description": "Name and, optional, path, of the OCI executable binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", - "nullable": true, - "type": "string" - }, - "runtime_args": { - "description": "List of command-line arguments to pass to the runtime when invoked.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Session": { - "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", - "properties": { - "created_at": { - "description": "The date and time the session was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "expires": { - "description": "The date and time the session expires.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "id": { - "description": "The unique identifier for the session.", - "type": "string" - }, - "session_token": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The session token." - }, - "updated_at": { - "description": "The date and time the session was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user that the session belongs to.", - "type": "string" - } - }, - "required": [ - "created_at", - "expires", - "session_token", - "updated_at" - ], - "type": "object" - }, - "SystemInfoCgroupDriverEnum": { - "enum": [ - "", - "cgroupfs", - "systemd", - "none" - ], - "type": "string" - }, - "SystemInfoCgroupVersionEnum": { - "enum": [ - "", - "1", - "2" - ], - "type": "string" - }, - "SystemInfoDefaultAddressPools": { - "properties": { - "base": { - "description": "The network address in CIDR format", - "nullable": true, - "type": "string" - }, - "size": { - "description": "The network pool size", - "format": "int64", - "nullable": true, - "type": "integer" - } - }, - "type": "object" - }, - "SystemInfoIsolationEnum": { - "enum": [ - "", - "default", - "hyperv", - "process" - ], - "type": "string" - }, - "UnitAccelerationConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitAccelerationFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitAccelerationFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitAccelerationFormat": { - "description": "The valid types of metric unit formats.", - "enum": [ - "meters_per_second_squared", - "feet_per_second_squared", - "standard_gravity" - ], - "type": "string" - }, - "UnitAngleConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitAngleFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitAngleFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitAngleFormat": { - "description": "The valid types of angle formats.", - "enum": [ - "radian", - "degree", - "arcminute", - "arcsecond", - "milliarcsecond", - "turn", - "gradian" - ], - "type": "string" - }, - "UnitAngularVelocityConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitAngularVelocityFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitAngularVelocityFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitAngularVelocityFormat": { - "description": "The valid types of angular velocity unit formats.", - "enum": [ - "radians_per_second", - "degrees_per_second", - "revolutions_per_minute", - "milliarcseconds_per_year" - ], - "type": "string" - }, - "UnitAreaConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitAreaFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitAreaFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitAreaFormat": { - "description": "The valid types of area unit formats.", - "enum": [ - "square_meter", - "square_foot", - "square_inch", - "square_mile", - "square_kilometer", - "hectare", - "acre" - ], - "type": "string" - }, - "UnitChargeConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitChargeFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitChargeFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitChargeFormat": { - "description": "The valid types of charge unit formats.", - "enum": [ - "coulomb", - "ampere_hour" - ], - "type": "string" - }, - "UnitConcentrationConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitConcentrationFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitConcentrationFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitConcentrationFormat": { - "description": "The valid types of concentration unit formats.", - "enum": [ - "parts_per_million", - "parts_per_billion", - "parts_per_trillion", - "percent" - ], - "type": "string" - }, - "UnitDataConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitDataFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitDataFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitDataFormat": { - "description": "The valid types of data unit formats.", - "enum": [ - "byte", - "exabyte", - "bit", - "exabit" - ], - "type": "string" - }, - "UnitDataTransferRateConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitDataTransferRateFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitDataTransferRateFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitDataTransferRateFormat": { - "description": "The valid types of data transfer unit formats.", - "enum": [ - "bytes_per_second", - "exabytes_per_second", - "bits_per_second", - "exabits_per_second" - ], - "type": "string" - }, - "UnitDensityConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitDensityFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitDensityFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitDensityFormat": { - "description": "The valid types of density unit formats.", - "enum": [ - "kilograms_per_cubic_meter", - "grams_per_milliliter", - "kilograms_per_liter", - "ounces_per_cubic_foot", - "ounces_per_cubic_inch", - "ounces_per_gallon", - "pounds_per_cubic_foot", - "pounds_per_cubic_inch", - "pounds_per_gallon", - "slugs_per_cubic_foot" - ], - "type": "string" - }, - "UnitEnergyConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitEnergyFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitEnergyFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitEnergyFormat": { - "description": "The valid types of energy unit formats.", - "enum": [ - "joule", - "calorie", - "british_thermal_unit", - "british_thermal_unit_iso", - "british_thermal_unit59", - "foot_pound" - ], - "type": "string" - }, - "UnitForceConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitForceFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitForceFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitForceFormat": { - "description": "The valid types of force unit formats.", - "enum": [ - "newton", - "pound", - "dyne", - "kilopound", - "poundal" - ], - "type": "string" - }, - "UnitIlluminanceConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitIlluminanceFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitIlluminanceFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitIlluminanceFormat": { - "description": "The valid types of illuminance unit formats.", - "enum": [ - "lux", - "footcandle", - "lumens_per_square_inch", - "phot" - ], - "type": "string" - }, - "UnitLengthConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitLengthFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitLengthFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitLengthFormat": { - "description": "The valid types of length unit formats.", - "enum": [ - "millimeter", - "centimeter", - "meter", - "kilomter", - "foot", - "inch", - "mile", - "nautical_mile", - "astronomical_unit", - "cubit", - "fathom", - "chain", - "furlong", - "hand", - "league", - "nautical_league", - "yard" - ], - "type": "string" - }, - "UnitMagneticFieldStrengthConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMagneticFieldStrengthFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMagneticFieldStrengthFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitMagneticFieldStrengthFormat": { - "description": "The valid types of magnetic field strength unit formats.", - "enum": [ - "tesla", - "gauss" - ], - "type": "string" - }, - "UnitMagneticFluxConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMagneticFluxFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMagneticFluxFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitMagneticFluxFormat": { - "description": "The valid types of magnetic flux unit formats.", - "enum": [ - "weber", - "maxwell" - ], - "type": "string" - }, - "UnitMassConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMassFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMassFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitMassFormat": { - "description": "The valid types of mass unit formats.", - "enum": [ - "gram", - "kilogram", - "metric_ton", - "pound", - "long_ton", - "short_ton", - "stone", - "ounce", - "carat", - "slug" - ], - "type": "string" - }, - "UnitMetricPower": { - "description": "The valid types of metric unit formats.", - "enum": [ - "atto", - "femto", - "pico", - "nano", - "micro", - "milli", - "centi", - "deci", - "metric_unit", - "deca", - "hecto", - "kilo", - "mega", - "giga", - "tera", - "peta", - "exa" - ], - "type": "string" - }, - "UnitMetricPowerConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMetricPower" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMetricPower" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitMetricPowerCubedConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMetricPower" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMetricPower" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitMetricPowerSquaredConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMetricPower" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitMetricPower" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitPowerConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitPowerFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitPowerFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitPowerFormat": { - "description": "The valid types of power unit formats.", - "enum": [ - "watt", - "horsepower", - "milliwatt" - ], - "type": "string" - }, - "UnitPressureConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitPressureFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitPressureFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitPressureFormat": { - "description": "The valid types of pressure unit formats.", - "enum": [ - "pascal", - "bar", - "mbar", - "atmosphere", - "pounds_per_square_inch" - ], - "type": "string" - }, - "UnitRadiationConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitRadiationFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitRadiationFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitRadiationFormat": { - "description": "The valid types of radiation unit formats.", - "enum": [ - "gray", - "sievert", - "rad" - ], - "type": "string" - }, - "UnitSolidAngleConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitSolidAngleFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitSolidAngleFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitSolidAngleFormat": { - "description": "The valid types of solid angle unit formats.", - "enum": [ - "steradian", - "degree_squared", - "spat" - ], - "type": "string" - }, - "UnitTemperatureConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitTemperatureFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitTemperatureFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitTemperatureFormat": { - "description": "The valid types of temperature unit formats.", - "enum": [ - "kelvin", - "celsius", - "fahrenheit", - "reaumur", - "rankine" - ], - "type": "string" - }, - "UnitTimeConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitTimeFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitTimeFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitTimeFormat": { - "description": "The valid types of time unit formats.", - "enum": [ - "second", - "minute", - "hour", - "day", - "week", - "year", - "julian_year", - "gregorian_year" - ], - "type": "string" - }, - "UnitVelocityConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitVelocityFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitVelocityFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitVelocityFormat": { - "description": "The valid types of velocity unit formats.", - "enum": [ - "meters_per_second", - "feet_per_second", - "miles_per_hour", - "kilometers_per_hour", - "knot" - ], - "type": "string" - }, - "UnitVoltageConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitVoltageFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitVoltageFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitVoltageFormat": { - "description": "The valid types of voltage unit formats.", - "enum": [ - "volt", - "statvolt", - "abvolt" - ], - "type": "string" - }, - "UnitVolumeConversion": { - "description": "A unit conversion.", - "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitVolumeFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitVolumeFormat" - } - ], - "description": "The source format of the unit conversion." - }, - "started_at": { - "description": "The time and date the unit conversion was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the unit conversion." - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "UnitVolumeFormat": { - "description": "The valid types of volume unit formats.", - "enum": [ - "cubic_millimeter", - "cubic_centimeter", - "cubic_meter", - "cubic_kilometer", - "liter", - "cubic_foot", - "cubic_yard", - "cubic_mile" - ], - "type": "string" - }, - "UpdateUser": { - "description": "The user-modifiable parts of a User.", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "first_name": { - "description": "The user's first name.", - "type": "string" - }, - "github": { - "description": "The user's GitHub handle.", - "type": "string" - }, - "last_name": { - "description": "The user's last name.", - "type": "string" - }, - "phone": { - "default": "", - "description": "The user's phone number.", - "format": "phone", - "title": "String", - "type": "string" - } - }, - "type": "object" - }, - "User": { - "description": "A user.", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "created_at": { - "description": "The date and time the user was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "email": { - "description": "The email address of the user.", - "format": "email", - "type": "string" - }, - "email_verified": { - "description": "The date and time the email address was verified.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "first_name": { - "description": "The user's first name.", - "type": "string" - }, - "github": { - "description": "The user's GitHub handle.", - "type": "string" - }, - "id": { - "description": "The unique identifier for the user.", - "type": "string" - }, - "image": { - "description": "The image avatar for the user. This is a URL.", - "format": "uri", - "title": "String", - "type": "string" - }, - "last_name": { - "description": "The user's last name.", - "type": "string" - }, - "name": { - "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", - "type": "string" - }, - "phone": { - "default": "", - "description": "The user's phone number.", - "format": "phone", - "title": "String", - "type": "string" - }, - "updated_at": { - "description": "The date and time the user was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - } - }, - "required": [ - "created_at", - "image", - "updated_at" - ], - "type": "object" - }, - "UserResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "Uuid": { - "description": "A uuid.\n\nA Version 4 UUID is a universally unique identifier that is generated using random numbers.", - "format": "uuid", - "type": "string" - }, - "VerificationToken": { - "description": "A verification token for a user.\n\nThis is typically used to verify a user's email address.", - "properties": { - "created_at": { - "description": "The date and time the verification token was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "expires": { - "description": "The date and time the verification token expires.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "id": { - "description": "The token used for verification. This is used as the id for the table since it is unique per record.", - "type": "string" - }, - "identifier": { - "description": "The identifier for the user. This is typically the user's email address since that is what we are verifying.", - "type": "string" - }, - "updated_at": { - "description": "The date and time the verification token was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - } - }, - "required": [ - "created_at", - "expires", - "updated_at" - ], - "type": "object" - } - } - }, - "info": { - "contact": { - "email": "api@kittycad.io", - "url": "https://kittycad.io" - }, - "description": "API server for KittyCAD", - "title": "KittyCAD API", - "version": "0.1.0" - }, - "openapi": "3.0.3", - "paths": { - "/": { - "get": { - "operationId": "get_schema", - "responses": { - "200": { - "content": { - "application/json": { - "schema": {} - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get OpenAPI schema.", - "tags": [ - "meta" - ] - } - }, - "/_meta/info": { - "get": { - "description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a KittyCAD employee to perform this request.", - "operationId": "get_metadata", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Metadata" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get the metadata about our currently running server.", - "tags": [ - "meta", - "hidden" - ] - } - }, - "/api-call-metrics": { - "get": { - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", - "operationId": "get_api_call_metrics", - "parameters": [ - { - "description": "What field to group the metrics by.", - "in": "query", - "name": "group_by", - "required": true, - "schema": { - "$ref": "#/components/schemas/ApiCallQueryGroupBy" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ApiCallQueryGroup" - }, - "title": "Array_of_ApiCallQueryGroup", - "type": "array" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get API call metrics.", - "tags": [ - "api-calls", - "hidden" - ] - } - }, - "/api-calls": { - "get": { - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "list_api_calls", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List API calls.", - "tags": [ - "api-calls", - "hidden" - ], - "x-dropshot-pagination": true - } - }, - "/api-calls/{id}": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.", - "operationId": "get_api_call", - "parameters": [ - { - "description": "The ID of the API call.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get details of an API call.", - "tags": [ - "api-calls", - "hidden" - ] - } - }, - "/apps/github/callback": { - "get": { - "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", - "operationId": "apps_github_callback", - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - }, - "required": true - }, - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Listen for callbacks to GitHub app authentication.", - "tags": [ - "apps", - "hidden" - ] - } - }, - "/apps/github/consent": { - "get": { - "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", - "operationId": "apps_github_consent", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppClientInfo" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get the consent URL for GitHub app authentication.", - "tags": [ - "apps", - "hidden" - ] - } - }, - "/apps/github/webhook": { - "post": { - "description": "These come from the GitHub app.", - "operationId": "apps_github_webhook", - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", + "log": { + "description": "Names of available logging-drivers, and logging-driver plugins.", + "items": { "type": "string" - } + }, + "type": "array" + }, + "network": { + "description": "Names of available network-drivers, and network-driver plugins.", + "items": { + "type": "string" + }, + "type": "array" + }, + "volume": { + "description": "Names of available volume-drivers, and network-driver plugins.", + "items": { + "type": "string" + }, + "type": "array" } }, - "required": true + "type": "object" }, - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } + "Pong": { + "description": "The response from the `/ping` endpoint.", + "properties": { + "message": { + "description": "The pong response.", + "type": "string" } }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } + "required": [ + "message" + ], + "type": "object" }, - "summary": "Listen for GitHub webhooks.", - "tags": [ - "apps", - "hidden" - ] - } - }, - "/async/operations": { - "get": { - "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", - "operationId": "list_async_operations", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, + "RegistryServiceConfig": { + "description": "RegistryServiceConfig stores daemon registry services configuration.", + "properties": { + "allow_nondistributable_artifacts_cid_rs": { + "description": "List of IP ranges to which nondistributable artifacts can be pushed, using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior, and enables the daemon to push nondistributable artifacts to all registries whose resolved IP address is within the subnet described by the CIDR syntax. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allow_nondistributable_artifacts_hostnames": { + "description": "List of registry hostnames to which nondistributable artifacts can be pushed, using the format `[:]` or `[:]`. Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior for the specified registries. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", + "items": { + "type": "string" + }, + "type": "array" + }, + "index_configs": { + "additionalProperties": { + "$ref": "#/components/schemas/IndexInfo" + }, + "type": "object" + }, + "insecure_registry_cid_rs": { + "description": "List of IP ranges of insecure registries, using the CIDR syntax ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. By default, local registries (`127.0.0.0/8`) are configured as insecure. All other registries are secure. Communicating with an insecure registry is not possible if the daemon assumes that registry is secure. This configuration override this behavior, insecure communication with registries whose resolved IP address is within the subnet described by the CIDR syntax. Registries can also be marked insecure by hostname. Those registries are listed under `IndexConfigs` and have their `Secure` field set to `false`.\n\n**Warning**: Using this option can be useful when running a local registry, but introduces security vulnerabilities. This option should therefore ONLY be used for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mirrors": { + "description": "List of registry URLs that act as a mirror for the official (`docker.io`) registry.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Runtime": { + "description": "Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.", + "properties": { + "path": { + "description": "Name and, optional, path, of the OCI executable binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", + "nullable": true, + "type": "string" + }, + "runtime_args": { + "description": "List of command-line arguments to pass to the runtime when invoked.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Session": { + "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", + "properties": { + "created_at": { + "description": "The date and time the session was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "expires": { + "description": "The date and time the session expires.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "id": { + "description": "The unique identifier for the session.", + "type": "string" + }, + "session_token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The session token." + }, + "updated_at": { + "description": "The date and time the session was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user that the session belongs to.", + "type": "string" + } + }, + "required": [ + "created_at", + "expires", + "session_token", + "updated_at" + ], + "type": "object" + }, + "SystemInfoCgroupDriverEnum": { + "enum": [ + "", + "cgroupfs", + "systemd", + "none" + ], + "type": "string" + }, + "SystemInfoCgroupVersionEnum": { + "enum": [ + "", + "1", + "2" + ], + "type": "string" + }, + "SystemInfoDefaultAddressPools": { + "properties": { + "base": { + "description": "The network address in CIDR format", + "nullable": true, + "type": "string" + }, + "size": { + "description": "The network pool size", + "format": "int64", "nullable": true, "type": "integer" - }, - "style": "form" + } }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { + "type": "object" + }, + "SystemInfoIsolationEnum": { + "enum": [ + "", + "default", + "hyperv", + "process" + ], + "type": "string" + }, + "UnitAccelerationConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", "nullable": true, "type": "string" }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - }, - { - "description": "The status to filter by.", - "in": "query", - "name": "status", - "schema": { - "$ref": "#/components/schemas/ApiCallStatus" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallResultsPage" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" } - } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List async operations.", - "tags": [ - "api-calls", - "hidden" - ], - "x-dropshot-pagination": true - } - }, - "/async/operations/{id}": { - "get": { - "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly KittyCAD employees with the proper access can view async operations for other users.", - "operationId": "get_async_operation", - "parameters": [ - { - "description": "The ID of the async operation.", - "in": "path", - "name": "id", - "required": true, - "schema": { + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAccelerationFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAccelerationFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", "type": "string" }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" } - } + ], + "description": "The status of the unit conversion." }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get an async operation.", - "tags": [ - "api-calls" - ] - } - }, - "/auth/email": { - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_auth_email", - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endoint.", - "tags": [ - "hidden" - ] - }, - "post": { - "operationId": "auth_email", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmailAuthenticationForm" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerificationToken" - } - } + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" } }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" }, - "summary": "Create an email verification request for a user.", - "tags": [ - "hidden" - ] - } - }, - "/auth/email/callback": { - "get": { - "operationId": "auth_email_callback", - "parameters": [ - { - "description": "The URL to redirect back to after we have authenticated.", - "in": "query", - "name": "callback_url", - "schema": { - "format": "uri", + "UnitAccelerationFormat": { + "description": "The valid types of metric unit formats.", + "enum": [ + "meters_per_second_squared", + "feet_per_second_squared", + "standard_gravity" + ], + "type": "string" + }, + "UnitAngleConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", "nullable": true, "type": "string" }, - "style": "form" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAngleFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAngleFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } }, - { - "description": "The user's email.", - "in": "query", - "name": "email", - "required": true, - "schema": { + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitAngleFormat": { + "description": "The valid types of angle formats.", + "enum": [ + "radian", + "degree", + "arcminute", + "arcsecond", + "milliarcsecond", + "turn", + "gradian" + ], + "type": "string" + }, + "UnitAngularVelocityConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAngularVelocityFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAngularVelocityFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitAngularVelocityFormat": { + "description": "The valid types of angular velocity unit formats.", + "enum": [ + "radians_per_second", + "degrees_per_second", + "revolutions_per_minute", + "milliarcseconds_per_year" + ], + "type": "string" + }, + "UnitAreaConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAreaFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAreaFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitAreaFormat": { + "description": "The valid types of area unit formats.", + "enum": [ + "square_meter", + "square_foot", + "square_inch", + "square_mile", + "square_kilometer", + "hectare", + "acre" + ], + "type": "string" + }, + "UnitChargeConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitChargeFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitChargeFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitChargeFormat": { + "description": "The valid types of charge unit formats.", + "enum": [ + "coulomb", + "ampere_hour" + ], + "type": "string" + }, + "UnitConcentrationConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitConcentrationFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitConcentrationFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitConcentrationFormat": { + "description": "The valid types of concentration unit formats.", + "enum": [ + "parts_per_million", + "parts_per_billion", + "parts_per_trillion", + "percent" + ], + "type": "string" + }, + "UnitDataConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitDataFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitDataFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitDataFormat": { + "description": "The valid types of data unit formats.", + "enum": [ + "byte", + "exabyte", + "bit", + "exabit" + ], + "type": "string" + }, + "UnitDataTransferRateConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitDataTransferRateFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitDataTransferRateFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitDataTransferRateFormat": { + "description": "The valid types of data transfer unit formats.", + "enum": [ + "bytes_per_second", + "exabytes_per_second", + "bits_per_second", + "exabits_per_second" + ], + "type": "string" + }, + "UnitDensityConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitDensityFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitDensityFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitDensityFormat": { + "description": "The valid types of density unit formats.", + "enum": [ + "kilograms_per_cubic_meter", + "grams_per_milliliter", + "kilograms_per_liter", + "ounces_per_cubic_foot", + "ounces_per_cubic_inch", + "ounces_per_gallon", + "pounds_per_cubic_foot", + "pounds_per_cubic_inch", + "pounds_per_gallon", + "slugs_per_cubic_foot" + ], + "type": "string" + }, + "UnitEnergyConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitEnergyFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitEnergyFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitEnergyFormat": { + "description": "The valid types of energy unit formats.", + "enum": [ + "joule", + "calorie", + "british_thermal_unit", + "british_thermal_unit_iso", + "british_thermal_unit59", + "foot_pound" + ], + "type": "string" + }, + "UnitForceConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitForceFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitForceFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitForceFormat": { + "description": "The valid types of force unit formats.", + "enum": [ + "newton", + "pound", + "dyne", + "kilopound", + "poundal" + ], + "type": "string" + }, + "UnitIlluminanceConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitIlluminanceFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitIlluminanceFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitIlluminanceFormat": { + "description": "The valid types of illuminance unit formats.", + "enum": [ + "lux", + "footcandle", + "lumens_per_square_inch", + "phot" + ], + "type": "string" + }, + "UnitLengthConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLengthFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLengthFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitLengthFormat": { + "description": "The valid types of length unit formats.", + "enum": [ + "millimeter", + "centimeter", + "meter", + "kilomter", + "foot", + "inch", + "mile", + "nautical_mile", + "astronomical_unit", + "cubit", + "fathom", + "chain", + "furlong", + "hand", + "league", + "nautical_league", + "yard" + ], + "type": "string" + }, + "UnitMagneticFieldStrengthConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMagneticFieldStrengthFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMagneticFieldStrengthFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitMagneticFieldStrengthFormat": { + "description": "The valid types of magnetic field strength unit formats.", + "enum": [ + "tesla", + "gauss" + ], + "type": "string" + }, + "UnitMagneticFluxConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMagneticFluxFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMagneticFluxFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitMagneticFluxFormat": { + "description": "The valid types of magnetic flux unit formats.", + "enum": [ + "weber", + "maxwell" + ], + "type": "string" + }, + "UnitMassConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMassFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMassFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitMassFormat": { + "description": "The valid types of mass unit formats.", + "enum": [ + "gram", + "kilogram", + "metric_ton", + "pound", + "long_ton", + "short_ton", + "stone", + "ounce", + "carat", + "slug" + ], + "type": "string" + }, + "UnitMetricPower": { + "description": "The valid types of metric unit formats.", + "enum": [ + "atto", + "femto", + "pico", + "nano", + "micro", + "milli", + "centi", + "deci", + "metric_unit", + "deca", + "hecto", + "kilo", + "mega", + "giga", + "tera", + "peta", + "exa" + ], + "type": "string" + }, + "UnitMetricPowerConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMetricPower" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMetricPower" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitMetricPowerCubedConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMetricPower" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMetricPower" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitMetricPowerSquaredConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMetricPower" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMetricPower" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitPowerConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitPowerFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitPowerFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitPowerFormat": { + "description": "The valid types of power unit formats.", + "enum": [ + "watt", + "horsepower", + "milliwatt" + ], + "type": "string" + }, + "UnitPressureConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitPressureFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitPressureFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitPressureFormat": { + "description": "The valid types of pressure unit formats.", + "enum": [ + "pascal", + "bar", + "mbar", + "atmosphere", + "pounds_per_square_inch" + ], + "type": "string" + }, + "UnitRadiationConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitRadiationFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitRadiationFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitRadiationFormat": { + "description": "The valid types of radiation unit formats.", + "enum": [ + "gray", + "sievert", + "rad" + ], + "type": "string" + }, + "UnitSolidAngleConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitSolidAngleFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitSolidAngleFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitSolidAngleFormat": { + "description": "The valid types of solid angle unit formats.", + "enum": [ + "steradian", + "degree_squared", + "spat" + ], + "type": "string" + }, + "UnitTemperatureConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitTemperatureFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitTemperatureFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitTemperatureFormat": { + "description": "The valid types of temperature unit formats.", + "enum": [ + "kelvin", + "celsius", + "fahrenheit", + "reaumur", + "rankine" + ], + "type": "string" + }, + "UnitTimeConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitTimeFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitTimeFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitTimeFormat": { + "description": "The valid types of time unit formats.", + "enum": [ + "second", + "minute", + "hour", + "day", + "week", + "year", + "julian_year", + "gregorian_year" + ], + "type": "string" + }, + "UnitVelocityConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitVelocityFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitVelocityFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitVelocityFormat": { + "description": "The valid types of velocity unit formats.", + "enum": [ + "meters_per_second", + "feet_per_second", + "miles_per_hour", + "kilometers_per_hour", + "knot" + ], + "type": "string" + }, + "UnitVoltageConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitVoltageFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitVoltageFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitVoltageFormat": { + "description": "The valid types of voltage unit formats.", + "enum": [ + "volt", + "statvolt", + "abvolt" + ], + "type": "string" + }, + "UnitVolumeConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the unit conversion was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "error": { + "description": "The error the function returned, if any.", + "nullable": true, + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitVolumeFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitVolumeFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "started_at": { + "description": "The time and date the unit conversion was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ], + "description": "The status of the unit conversion." + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitVolumeFormat": { + "description": "The valid types of volume unit formats.", + "enum": [ + "cubic_millimeter", + "cubic_centimeter", + "cubic_meter", + "cubic_kilometer", + "liter", + "cubic_foot", + "cubic_yard", + "cubic_mile" + ], + "type": "string" + }, + "UpdateUser": { + "description": "The user-modifiable parts of a User.", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "phone": { + "default": "", + "description": "The user's phone number.", + "format": "phone", + "title": "String", + "type": "string" + } + }, + "type": "object" + }, + "User": { + "description": "A user.", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { + "description": "The date and time the user was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", "format": "email", "type": "string" }, - "style": "form" - }, - { - "description": "The verification token.", - "in": "query", - "name": "token", - "required": true, - "schema": { + "email_verified": { + "description": "The date and time the email address was verified.", + "format": "date-time", + "nullable": true, + "title": "DateTime", "type": "string" }, - "style": "form" - } - ], - "responses": { - "302": { - "description": "Temporary Redirect", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Listen for callbacks for email verification for users.", - "tags": [ - "hidden" - ] - } - }, - "/constant/physics/{constant}": { - "get": { - "operationId": "get_physics_constant", - "parameters": [ - { - "description": "The constant to get.", - "in": "path", - "name": "constant", - "required": true, - "schema": { - "$ref": "#/components/schemas/PhysicsConstantName" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PhysicsConstant" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get a physics constant.", - "tags": [ - "constant" - ] - } - }, - "/file/conversion/{src_format}/{output_format}": { - "post": { - "description": "Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_conversion", - "parameters": [ - { - "description": "The format the file should be converted to.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileOutputFormat" - }, - "style": "simple" - }, - { - "description": "The format of the file to convert.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" - }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversion" - } - } - }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert CAD file.", - "tags": [ - "file" - ] - } - }, - "/file/conversions/{id}": { - "get": { - "description": "Get the status and output of an async file conversion.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\nIf the user is not authenticated to view the specified file conversion, then it is not returned.\nOnly KittyCAD employees with the proper access can view file conversions for other users.", - "operationId": "get_file_conversion", - "parameters": [ - { - "description": "The ID of the async operation.", - "in": "path", - "name": "id", - "required": true, - "schema": { + "first_name": { + "description": "The user's first name.", "type": "string" }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" - } - } + "github": { + "description": "The user's GitHub handle.", + "type": "string" }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } + "id": { + "description": "The unique identifier for the user.", + "type": "string" + }, + "image": { + "description": "The image avatar for the user. This is a URL.", + "format": "uri", + "title": "String", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "name": { + "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", + "type": "string" + }, + "phone": { + "default": "", + "description": "The user's phone number.", + "format": "phone", + "title": "String", + "type": "string" + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" } }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } + "required": [ + "created_at", + "image", + "updated_at" + ], + "type": "object" }, - "summary": "Get a file conversion.", - "tags": [ - "file" - ] - } - }, - "/file/density": { - "post": { - "description": "Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_density", - "parameters": [ - { - "description": "The material mass.", - "in": "query", - "name": "material_mass", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - }, - { - "description": "The format of the file.", - "in": "query", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileDensity" - } - } - }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" + "UserResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/User" }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get CAD file density.", - "tags": [ - "file", - "beta" - ] - } - }, - "/file/execute/{lang}": { - "post": { - "operationId": "create_file_execution", - "parameters": [ - { - "description": "The language of the code.", - "in": "path", - "name": "lang", - "required": true, - "schema": { - "$ref": "#/components/schemas/CodeLanguage" + "type": "array" }, - "style": "simple" - }, - { - "description": "The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.", - "in": "query", - "name": "output", - "schema": { + "next_page": { + "description": "token used to fetch the next page of results (if any)", "nullable": true, "type": "string" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } } }, - "required": true + "required": [ + "items" + ], + "type": "object" }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CodeOutput" + "Uuid": { + "description": "A uuid.\n\nA Version 4 UUID is a universally unique identifier that is generated using random numbers.", + "format": "uuid", + "type": "string" + }, + "VerificationToken": { + "description": "A verification token for a user.\n\nThis is typically used to verify a user's email address.", + "properties": { + "created_at": { + "description": "The date and time the verification token was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "expires": { + "description": "The date and time the verification token expires.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "id": { + "description": "The token used for verification. This is used as the id for the table since it is unique per record.", + "type": "string" + }, + "identifier": { + "description": "The identifier for the user. This is typically the user's email address since that is what we are verifying.", + "type": "string" + }, + "updated_at": { + "description": "The date and time the verification token was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + } + }, + "required": [ + "created_at", + "expires", + "updated_at" + ], + "type": "object" + } + } + }, + "info": { + "contact": { + "email": "api@kittycad.io", + "url": "https://kittycad.io" + }, + "description": "API server for KittyCAD", + "title": "KittyCAD API", + "version": "0.1.0" + }, + "openapi": "3.0.3", + "paths": { + "/": { + "get": { + "operationId": "get_schema", + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" } } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Execute a KittyCAD program in a specific language.", - "tags": [ - "file", - "hidden" - ] - } - }, - "/file/mass": { - "post": { - "description": "Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_mass", - "parameters": [ - { - "description": "The material density.", - "in": "query", - "name": "material_density", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - }, - { - "description": "The format of the file.", - "in": "query", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileMass" + "summary": "Get OpenAPI schema.", + "tags": [ + "meta" + ] + } + }, + "/_meta/info": { + "get": { + "description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a KittyCAD employee to perform this request.", + "operationId": "get_metadata", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Metadata" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" } } }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get CAD file mass.", - "tags": [ - "file", - "beta" - ] - } - }, - "/file/surface-area": { - "post": { - "description": "Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_surface_area", - "parameters": [ - { - "description": "The format of the file.", - "in": "query", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "4XX": { + "$ref": "#/components/responses/Error" }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } + "5XX": { + "$ref": "#/components/responses/Error" } }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileSurfaceArea" + "summary": "Get the metadata about our currently running server.", + "tags": [ + "meta", + "hidden" + ] + } + }, + "/api-call-metrics": { + "get": { + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", + "operationId": "get_api_call_metrics", + "parameters": [ + { + "description": "What field to group the metrics by.", + "in": "query", + "name": "group_by", + "required": true, + "schema": { + "$ref": "#/components/schemas/ApiCallQueryGroupBy" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ApiCallQueryGroup" + }, + "title": "Array_of_ApiCallQueryGroup", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" } } }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get CAD file surface area.", - "tags": [ - "file", - "beta" - ] - } - }, - "/file/volume": { - "post": { - "description": "Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_volume", - "parameters": [ - { - "description": "The format of the file.", - "in": "query", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "4XX": { + "$ref": "#/components/responses/Error" }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } + "5XX": { + "$ref": "#/components/responses/Error" } }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileVolume" + "summary": "Get API call metrics.", + "tags": [ + "api-calls", + "hidden" + ] + } + }, + "/api-calls": { + "get": { + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" } } }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get CAD file volume.", - "tags": [ - "file", - "beta" - ] - } - }, - "/logout": { - "post": { - "description": "This is used in logout scenarios.", - "operationId": "logout", - "responses": { - "204": { - "description": "resource updated", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "This endpoint removes the session cookie for a user.", - "tags": [ - "hidden" - ] - } - }, - "/oauth2/device/auth": { - "post": { - "description": "This endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted.", - "operationId": "device_auth_request", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { + "summary": "List API calls.", + "tags": [ + "api-calls", + "hidden" + ], + "x-dropshot-pagination": true + } + }, + "/api-calls/{id}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.", + "operationId": "get_api_call", + "parameters": [ + { + "description": "The ID of the API call.", + "in": "path", + "name": "id", + "required": true, "schema": { - "$ref": "#/components/schemas/DeviceAuthRequestForm" + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, - "required": true - }, - "responses": { - "default": { + "summary": "Get details of an API call.", + "tags": [ + "api-calls", + "hidden" + ] + } + }, + "/apps/github/callback": { + "get": { + "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", + "operationId": "apps_github_callback", + "requestBody": { "content": { - "*/*": { + "application/json": { "schema": {} } }, - "description": "" - } - }, - "summary": "Start an OAuth 2.0 Device Authorization Grant.", - "tags": [ - "oauth2", - "hidden" - ] - } - }, - "/oauth2/device/confirm": { - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_device_auth_confirm", - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endoint.", - "tags": [ - "hidden" - ] - }, - "post": { - "description": "This endpoint is designed to be accessed by the user agent (browser), not the client requesting the token. So we do not actually return the token here; it will be returned in response to the poll on `/oauth2/device/token`.", - "operationId": "device_auth_confirm", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceAuthVerifyParams" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Confirm an OAuth 2.0 Device Authorization Grant.", - "tags": [ - "oauth2", - "hidden" - ] - } - }, - "/oauth2/device/token": { - "post": { - "description": "This endpoint should be polled by the client until the user code is verified and the grant is confirmed.", - "operationId": "device_access_token", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/DeviceAccessTokenRequestForm" - } - } - }, - "required": true - }, - "responses": { - "default": { - "content": { - "*/*": { - "schema": {} - } - }, - "description": "" - } - }, - "summary": "Request a device access token.", - "tags": [ - "oauth2", - "hidden" - ] - } - }, - "/oauth2/device/verify": { - "get": { - "description": "This endpoint should be accessed in a full user agent (e.g., a browser). If the user is not logged in, we redirect them to the login page and use the `callback_url` parameter to get them to the UI verification form upon logging in. If they are logged in, we redirect them to the UI verification form on the website.", - "operationId": "device_auth_verify", - "parameters": [ - { - "description": "The user code.", - "in": "query", - "name": "user_code", - "required": true, - "schema": { - "type": "string" - }, - "style": "form" - } - ], - "responses": { - "302": { - "description": "Temporary Redirect", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Verify an OAuth 2.0 Device Authorization Grant.", - "tags": [ - "oauth2", - "hidden" - ] - } - }, - "/oauth2/provider/{provider}/callback": { - "get": { - "operationId": "oauth2_provider_callback", - "parameters": [ - { - "description": "The provider.", - "in": "path", - "name": "provider", - "required": true, - "schema": { - "$ref": "#/components/schemas/AccountProvider" - }, - "style": "simple" - }, - { - "description": "The authorization code.", - "in": "query", - "name": "code", - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "description": "The state that we had passed in through the user consent URL.", - "in": "query", - "name": "state", - "schema": { - "type": "string" - }, - "style": "form" - } - ], - "responses": { - "302": { - "description": "Temporary Redirect", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Listen for callbacks for the OAuth 2.0 provider.", - "tags": [ - "oauth2", - "hidden" - ] - } - }, - "/oauth2/provider/{provider}/consent": { - "get": { - "operationId": "oauth2_provider_consent", - "parameters": [ - { - "description": "The provider.", - "in": "path", - "name": "provider", - "required": true, - "schema": { - "$ref": "#/components/schemas/AccountProvider" - }, - "style": "simple" - }, - { - "description": "The URL to redirect back to after we have authenticated.", - "in": "query", - "name": "callback_url", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuth2ClientInfo" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get the consent URL and other information for the OAuth 2.0 provider.", - "tags": [ - "oauth2", - "hidden" - ] - } - }, - "/ping": { - "get": { - "operationId": "ping", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pong" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Return pong.", - "tags": [ - "meta" - ] - } - }, - "/unit/conversion/acceleration/{src_format}/{output_format}": { - "get": { - "description": "Convert an acceleration unit value to another acceleration unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_acceleration_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitAccelerationFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitAccelerationFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitAccelerationConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert acceleration units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/angle/{src_format}/{output_format}": { - "get": { - "description": "Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_angle_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitAngleFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitAngleFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitAngleConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert angle units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/angular-velocity/{src_format}/{output_format}": { - "get": { - "description": "Convert an angular velocity unit value to another angular velocity unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_angular_velocity_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitAngularVelocityFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitAngularVelocityFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitAngularVelocityConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert angular velocity units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/area/{src_format}/{output_format}": { - "get": { - "description": "Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_area_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitAreaFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitAreaFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitAreaConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert area units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/charge/{src_format}/{output_format}": { - "get": { - "description": "Convert a charge unit value to another charge unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_charge_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitChargeFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitChargeFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitChargeConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert charge units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/concentration/{src_format}/{output_format}": { - "get": { - "description": "Convert a concentration unit value to another concentration unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_concentration_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitConcentrationFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitConcentrationFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitConcentrationConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert concentration units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/data-transfer-rate/{src_format}/{output_format}": { - "get": { - "description": "Convert a data transfer rate unit value to another data transfer rate unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_data_transfer_rate_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitDataTransferRateFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitDataTransferRateFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitDataTransferRateConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert data transfer rate units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/data/{src_format}/{output_format}": { - "get": { - "description": "Convert a data unit value to another data unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_data_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitDataFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitDataFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitDataConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert data units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/density/{src_format}/{output_format}": { - "get": { - "description": "Convert a density unit value to another density unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_density_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitDensityFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitDensityFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitDensityConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert density units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/energy/{src_format}/{output_format}": { - "get": { - "description": "Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_energy_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitEnergyFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitEnergyFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitEnergyConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert energy units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/force/{src_format}/{output_format}": { - "get": { - "description": "Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_force_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitForceFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitForceFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitForceConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert force units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/illuminance/{src_format}/{output_format}": { - "get": { - "description": "Convert a illuminance unit value to another illuminance unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_illuminance_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitIlluminanceFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitIlluminanceFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitIlluminanceConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert illuminance units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/length/{src_format}/{output_format}": { - "get": { - "description": "Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_length_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitLengthFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitLengthFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitLengthConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert length units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/magnetic-field-strength/{src_format}/{output_format}": { - "get": { - "description": "Convert a magnetic field strength unit value to another magnetic field strength unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_magnetic_field_strength_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMagneticFieldStrengthFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMagneticFieldStrengthFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitMagneticFieldStrengthConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert magnetic field strength units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/magnetic-flux/{src_format}/{output_format}": { - "get": { - "description": "Convert a magnetic flux unit value to another magnetic flux unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_magnetic_flux_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMagneticFluxFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMagneticFluxFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitMagneticFluxConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert magnetic flux units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/mass/{src_format}/{output_format}": { - "get": { - "description": "Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_mass_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMassFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMassFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitMassConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert mass units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/metric/cubed/{src_format}/{output_format}": { - "get": { - "description": "Convert a metric cubed unit value to another metric cubed unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_metric_power_cubed_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMetricPower" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMetricPower" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitMetricPowerCubedConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert metric cubed units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/metric/power/{src_format}/{output_format}": { - "get": { - "description": "Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_metric_power_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMetricPower" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMetricPower" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitMetricPowerConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert metric units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/metric/squared/{src_format}/{output_format}": { - "get": { - "description": "Convert a metric squared unit value to another metric squared unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_metric_power_squared_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMetricPower" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMetricPower" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitMetricPowerSquaredConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert metric squared units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/power/{src_format}/{output_format}": { - "get": { - "description": "Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_power_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitPowerFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitPowerFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitPowerConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert power units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/pressure/{src_format}/{output_format}": { - "get": { - "description": "Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_pressure_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitPressureFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitPressureFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitPressureConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert pressure units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/radiation/{src_format}/{output_format}": { - "get": { - "description": "Convert a radiation unit value to another radiation unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_radiation_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitRadiationFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitRadiationFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitRadiationConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert radiation units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/solid-angle/{src_format}/{output_format}": { - "get": { - "description": "Convert a solid angle unit value to another solid angle unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_solid_angle_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitSolidAngleFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitSolidAngleFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitSolidAngleConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert solid angle units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/temperature/{src_format}/{output_format}": { - "get": { - "description": "Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_temperature_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitTemperatureFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitTemperatureFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitTemperatureConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert temperature units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/time/{src_format}/{output_format}": { - "get": { - "description": "Convert a time unit value to another time unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_time_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitTimeFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitTimeFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitTimeConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert time units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/velocity/{src_format}/{output_format}": { - "get": { - "description": "Convert a velocity unit value to another velocity unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_velocity_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitVelocityFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitVelocityFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitVelocityConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert velocity units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/voltage/{src_format}/{output_format}": { - "get": { - "description": "Convert a voltage unit value to another voltage unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_voltage_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitVoltageFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitVoltageFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitVoltageConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert voltage units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/unit/conversion/volume/{src_format}/{output_format}": { - "get": { - "description": "Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_volume_unit_conversion", - "parameters": [ - { - "description": "The output format of the unit.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitVolumeFormat" - }, - "style": "simple" - }, - { - "description": "The source format of the unit.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitVolumeFormat" - }, - "style": "simple" - }, - { - "description": "The initial value.", - "in": "query", - "name": "value", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitVolumeConversion" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Convert volume units.", - "tags": [ - "unit", - "beta" - ] - } - }, - "/user": { - "delete": { - "description": "This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.\nThis call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.", - "operationId": "delete_user_self", - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Delete your user.", - "tags": [ - "users" - ] - }, - "get": { - "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", - "operationId": "get_user_self", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get your user.", - "tags": [ - "users" - ] - }, - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_user_self", - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endoint.", - "tags": [ - "hidden" - ] - }, - "put": { - "description": "This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.", - "operationId": "update_user_self", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateUser" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Update your user.", - "tags": [ - "users" - ] - } - }, - "/user/api-calls": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "user_list_api_calls", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List API calls for your user.", - "tags": [ - "api-calls" - ], - "x-dropshot-pagination": true - } - }, - "/user/api-calls/{id}": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.", - "operationId": "get_api_call_for_user", - "parameters": [ - { - "description": "The ID of the API call.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get an API call for a user.", - "tags": [ - "api-calls" - ] - } - }, - "/user/api-tokens": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.", - "operationId": "list_api_tokens_for_user", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiTokenResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List API tokens for your user.", - "tags": [ - "api-tokens" - ], - "x-dropshot-pagination": true - }, - "post": { - "description": "This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.", - "operationId": "create_api_token_for_user", - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiToken" - } - } - }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Create a new API token for your user.", - "tags": [ - "api-tokens" - ] - } - }, - "/user/api-tokens/{token}": { - "delete": { - "description": "This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.", - "operationId": "delete_api_token_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Delete an API token for your user.", - "tags": [ - "api-tokens" - ] - }, - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", - "operationId": "get_api_token_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiToken" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get an API token for your user.", - "tags": [ - "api-tokens" - ] - }, - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_api_token_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endoint.", - "tags": [ - "hidden" - ] - } - }, - "/user/extended": { - "get": { - "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users-extended/me` endpoint.", - "operationId": "get_user_self_extended", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUser" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get extended information about your user.", - "tags": [ - "users" - ] - } - }, - "/user/file/conversions/{id}": { - "get": { - "description": "Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.", - "operationId": "get_file_conversion_for_user", - "parameters": [ - { - "description": "The ID of the async operation.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get a file conversion for your user.", - "tags": [ - "file" - ] - } - }, - "/user/payment": { - "delete": { - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.", - "operationId": "delete_payment_information_for_user", - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Delete payment info for your user.", - "tags": [ - "payments" - ] - }, - "get": { - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.", - "operationId": "get_payment_information_for_user", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get payment info about your user.", - "tags": [ - "payments" - ] - }, - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_payment_information_for_user", - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endoint.", - "tags": [ - "hidden" - ] - }, - "post": { - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.", - "operationId": "create_payment_information_for_user", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingInfo" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Create payment info for your user.", - "tags": [ - "payments" - ] - }, - "put": { - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.", - "operationId": "update_payment_information_for_user", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingInfo" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Update payment info for your user.", - "tags": [ - "payments" - ] - } - }, - "/user/payment/balance": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.", - "operationId": "get_payment_balance_for_user", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerBalance" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get balance for your user.", - "tags": [ - "payments" - ] - } - }, - "/user/payment/intent": { - "post": { - "description": "This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.", - "operationId": "create_payment_intent_for_user", - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentIntent" - } - } - }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Create a payment intent for your user.", - "tags": [ - "payments", - "hidden" - ] - } - }, - "/user/payment/invoices": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.", - "operationId": "list_invoices_for_user", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Invoice" + "required": true + }, + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" }, - "title": "Array_of_Invoice", - "type": "array" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List invoices for your user.", - "tags": [ - "payments" - ] - } - }, - "/user/payment/methods": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.", - "operationId": "list_payment_methods_for_user", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/PaymentMethod" + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" }, - "title": "Array_of_PaymentMethod", - "type": "array" + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" } } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List payment methods for your user.", - "tags": [ - "payments" - ] - } - }, - "/user/payment/methods/{id}": { - "delete": { - "description": "This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.", - "operationId": "delete_payment_method_for_user", - "parameters": [ - { - "description": "The ID of the payment method.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" + "4XX": { + "$ref": "#/components/responses/Error" }, - "style": "simple" - } - ], - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } + "5XX": { + "$ref": "#/components/responses/Error" } }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Delete a payment method for your user.", - "tags": [ - "payments", - "hidden" - ] + "summary": "Listen for callbacks to GitHub app authentication.", + "tags": [ + "apps", + "hidden" + ] + } }, - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_payment_methods_for_user", - "parameters": [ - { - "description": "The ID of the payment method.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" + "/apps/github/consent": { + "get": { + "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", + "operationId": "apps_github_consent", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppClientInfo" + } + } }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endoint.", - "tags": [ - "hidden" - ] - } - }, - "/user/session/{token}": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", - "operationId": "get_session_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" + "summary": "Get the consent URL for GitHub app authentication.", + "tags": [ + "apps", + "hidden" + ] + } + }, + "/apps/github/webhook": { + "post": { + "description": "These come from the GitHub app.", + "operationId": "apps_github_webhook", + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } }, - "style": "simple" - } - ], - "responses": { - "200": { + "required": true + }, + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Listen for GitHub webhooks.", + "tags": [ + "apps", + "hidden" + ] + } + }, + "/async/operations": { + "get": { + "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", + "operationId": "list_async_operations", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + }, + { + "description": "The status to filter by.", + "in": "query", + "name": "status", + "schema": { + "$ref": "#/components/schemas/ApiCallStatus" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallResultsPage" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List async operations.", + "tags": [ + "api-calls", + "hidden" + ], + "x-dropshot-pagination": true + } + }, + "/async/operations/{id}": { + "get": { + "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly KittyCAD employees with the proper access can view async operations for other users.", + "operationId": "get_async_operation", + "parameters": [ + { + "description": "The ID of the async operation.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallOutput" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get an async operation.", + "tags": [ + "api-calls" + ] + } + }, + "/auth/email": { + "options": { + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_auth_email", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "OPTIONS endoint.", + "tags": [ + "hidden" + ] + }, + "post": { + "operationId": "auth_email", + "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Session" + "$ref": "#/components/schemas/EmailAuthenticationForm" } } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerificationToken" + } + } }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, - "4XX": { - "$ref": "#/components/responses/Error" + "summary": "Create an email verification request for a user.", + "tags": [ + "hidden" + ] + } + }, + "/auth/email/callback": { + "get": { + "operationId": "auth_email_callback", + "parameters": [ + { + "description": "The URL to redirect back to after we have authenticated.", + "in": "query", + "name": "callback_url", + "schema": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "The user's email.", + "in": "query", + "name": "email", + "required": true, + "schema": { + "format": "email", + "type": "string" + }, + "style": "form" + }, + { + "description": "The verification token.", + "in": "query", + "name": "token", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "302": { + "description": "Temporary Redirect", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } }, - "5XX": { - "$ref": "#/components/responses/Error" - } + "summary": "Listen for callbacks for email verification for users.", + "tags": [ + "hidden" + ] + } + }, + "/constant/physics/{constant}": { + "get": { + "operationId": "get_physics_constant", + "parameters": [ + { + "description": "The constant to get.", + "in": "path", + "name": "constant", + "required": true, + "schema": { + "$ref": "#/components/schemas/PhysicsConstantName" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhysicsConstant" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get a physics constant.", + "tags": [ + "constant" + ] + } + }, + "/file/conversion/{src_format}/{output_format}": { + "post": { + "description": "Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_conversion", + "parameters": [ + { + "description": "The format the file should be converted to.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileOutputFormat" + }, + "style": "simple" + }, + { + "description": "The format of the file to convert.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversion" + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert CAD file.", + "tags": [ + "file" + ] + } + }, + "/file/conversions/{id}": { + "get": { + "description": "Get the status and output of an async file conversion.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\nIf the user is not authenticated to view the specified file conversion, then it is not returned.\nOnly KittyCAD employees with the proper access can view file conversions for other users.", + "operationId": "get_file_conversion", + "parameters": [ + { + "description": "The ID of the async operation.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallOutput" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get a file conversion.", + "tags": [ + "file" + ] + } + }, + "/file/density": { + "post": { + "description": "Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_density", + "parameters": [ + { + "description": "The material mass.", + "in": "query", + "name": "material_mass", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + }, + { + "description": "The format of the file.", + "in": "query", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileDensity" + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get CAD file density.", + "tags": [ + "file", + "beta" + ] + } + }, + "/file/execute/{lang}": { + "post": { + "operationId": "create_file_execution", + "parameters": [ + { + "description": "The language of the code.", + "in": "path", + "name": "lang", + "required": true, + "schema": { + "$ref": "#/components/schemas/CodeLanguage" + }, + "style": "simple" + }, + { + "description": "The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.", + "in": "query", + "name": "output", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CodeOutput" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Execute a KittyCAD program in a specific language.", + "tags": [ + "file", + "hidden" + ] + } + }, + "/file/mass": { + "post": { + "description": "Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_mass", + "parameters": [ + { + "description": "The material density.", + "in": "query", + "name": "material_density", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + }, + { + "description": "The format of the file.", + "in": "query", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileMass" + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get CAD file mass.", + "tags": [ + "file", + "beta" + ] + } + }, + "/file/surface-area": { + "post": { + "description": "Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_surface_area", + "parameters": [ + { + "description": "The format of the file.", + "in": "query", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileSurfaceArea" + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get CAD file surface area.", + "tags": [ + "file", + "beta" + ] + } + }, + "/file/volume": { + "post": { + "description": "Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_volume", + "parameters": [ + { + "description": "The format of the file.", + "in": "query", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileVolume" + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get CAD file volume.", + "tags": [ + "file", + "beta" + ] + } + }, + "/logout": { + "post": { + "description": "This is used in logout scenarios.", + "operationId": "logout", + "responses": { + "204": { + "description": "resource updated", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "This endpoint removes the session cookie for a user.", + "tags": [ + "hidden" + ] + } + }, + "/oauth2/device/auth": { + "post": { + "description": "This endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted.", + "operationId": "device_auth_request", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/DeviceAuthRequestForm" + } + } + }, + "required": true + }, + "responses": { + "default": { + "content": { + "*/*": { + "schema": {} + } + }, + "description": "" + } + }, + "summary": "Start an OAuth 2.0 Device Authorization Grant.", + "tags": [ + "oauth2", + "hidden" + ] + } + }, + "/oauth2/device/confirm": { + "options": { + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_device_auth_confirm", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "OPTIONS endoint.", + "tags": [ + "hidden" + ] }, - "summary": "Get a session for your user.", - "tags": [ - "sessions" - ] - } - }, - "/users": { - "get": { - "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", - "operationId": "list_users", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { + "post": { + "description": "This endpoint is designed to be accessed by the user agent (browser), not the client requesting the token. So we do not actually return the token here; it will be returned in response to the poll on `/oauth2/device/token`.", + "operationId": "device_auth_confirm", + "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserResultsPage" + "$ref": "#/components/schemas/DeviceAuthVerifyParams" } } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "required": true + }, + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, - "4XX": { - "$ref": "#/components/responses/Error" + "summary": "Confirm an OAuth 2.0 Device Authorization Grant.", + "tags": [ + "oauth2", + "hidden" + ] + } + }, + "/oauth2/device/token": { + "post": { + "description": "This endpoint should be polled by the client until the user code is verified and the grant is confirmed.", + "operationId": "device_access_token", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/DeviceAccessTokenRequestForm" + } + } + }, + "required": true }, - "5XX": { - "$ref": "#/components/responses/Error" - } + "responses": { + "default": { + "content": { + "*/*": { + "schema": {} + } + }, + "description": "" + } + }, + "summary": "Request a device access token.", + "tags": [ + "oauth2", + "hidden" + ] + } + }, + "/oauth2/device/verify": { + "get": { + "description": "This endpoint should be accessed in a full user agent (e.g., a browser). If the user is not logged in, we redirect them to the login page and use the `callback_url` parameter to get them to the UI verification form upon logging in. If they are logged in, we redirect them to the UI verification form on the website.", + "operationId": "device_auth_verify", + "parameters": [ + { + "description": "The user code.", + "in": "query", + "name": "user_code", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "302": { + "description": "Temporary Redirect", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Verify an OAuth 2.0 Device Authorization Grant.", + "tags": [ + "oauth2", + "hidden" + ] + } + }, + "/oauth2/provider/{provider}/callback": { + "get": { + "operationId": "oauth2_provider_callback", + "parameters": [ + { + "description": "The provider.", + "in": "path", + "name": "provider", + "required": true, + "schema": { + "$ref": "#/components/schemas/AccountProvider" + }, + "style": "simple" + }, + { + "description": "The authorization code.", + "in": "query", + "name": "code", + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The state that we had passed in through the user consent URL.", + "in": "query", + "name": "state", + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "302": { + "description": "Temporary Redirect", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Listen for callbacks for the OAuth 2.0 provider.", + "tags": [ + "oauth2", + "hidden" + ] + } + }, + "/oauth2/provider/{provider}/consent": { + "get": { + "operationId": "oauth2_provider_consent", + "parameters": [ + { + "description": "The provider.", + "in": "path", + "name": "provider", + "required": true, + "schema": { + "$ref": "#/components/schemas/AccountProvider" + }, + "style": "simple" + }, + { + "description": "The URL to redirect back to after we have authenticated.", + "in": "query", + "name": "callback_url", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2ClientInfo" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get the consent URL and other information for the OAuth 2.0 provider.", + "tags": [ + "oauth2", + "hidden" + ] + } + }, + "/ping": { + "get": { + "operationId": "ping", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pong" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Return pong.", + "tags": [ + "meta" + ] + } + }, + "/unit/conversion/acceleration/{src_format}/{output_format}": { + "get": { + "description": "Convert an acceleration unit value to another acceleration unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_acceleration_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitAccelerationFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitAccelerationFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitAccelerationConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert acceleration units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/angle/{src_format}/{output_format}": { + "get": { + "description": "Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_angle_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitAngleFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitAngleFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitAngleConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert angle units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/angular-velocity/{src_format}/{output_format}": { + "get": { + "description": "Convert an angular velocity unit value to another angular velocity unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_angular_velocity_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitAngularVelocityFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitAngularVelocityFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitAngularVelocityConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert angular velocity units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/area/{src_format}/{output_format}": { + "get": { + "description": "Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_area_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitAreaFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitAreaFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitAreaConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert area units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/charge/{src_format}/{output_format}": { + "get": { + "description": "Convert a charge unit value to another charge unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_charge_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitChargeFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitChargeFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitChargeConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert charge units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/concentration/{src_format}/{output_format}": { + "get": { + "description": "Convert a concentration unit value to another concentration unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_concentration_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitConcentrationFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitConcentrationFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitConcentrationConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert concentration units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/data-transfer-rate/{src_format}/{output_format}": { + "get": { + "description": "Convert a data transfer rate unit value to another data transfer rate unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_data_transfer_rate_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitDataTransferRateFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitDataTransferRateFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitDataTransferRateConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert data transfer rate units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/data/{src_format}/{output_format}": { + "get": { + "description": "Convert a data unit value to another data unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_data_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitDataFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitDataFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitDataConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert data units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/density/{src_format}/{output_format}": { + "get": { + "description": "Convert a density unit value to another density unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_density_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitDensityFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitDensityFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitDensityConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert density units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/energy/{src_format}/{output_format}": { + "get": { + "description": "Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_energy_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitEnergyFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitEnergyFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitEnergyConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert energy units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/force/{src_format}/{output_format}": { + "get": { + "description": "Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_force_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitForceFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitForceFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitForceConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert force units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/illuminance/{src_format}/{output_format}": { + "get": { + "description": "Convert a illuminance unit value to another illuminance unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_illuminance_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitIlluminanceFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitIlluminanceFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitIlluminanceConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert illuminance units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/length/{src_format}/{output_format}": { + "get": { + "description": "Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_length_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitLengthFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitLengthFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitLengthConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert length units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/magnetic-field-strength/{src_format}/{output_format}": { + "get": { + "description": "Convert a magnetic field strength unit value to another magnetic field strength unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_magnetic_field_strength_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMagneticFieldStrengthFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMagneticFieldStrengthFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitMagneticFieldStrengthConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert magnetic field strength units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/magnetic-flux/{src_format}/{output_format}": { + "get": { + "description": "Convert a magnetic flux unit value to another magnetic flux unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_magnetic_flux_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMagneticFluxFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMagneticFluxFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitMagneticFluxConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert magnetic flux units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/mass/{src_format}/{output_format}": { + "get": { + "description": "Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_mass_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMassFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMassFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitMassConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert mass units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/metric/cubed/{src_format}/{output_format}": { + "get": { + "description": "Convert a metric cubed unit value to another metric cubed unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_metric_power_cubed_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMetricPower" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMetricPower" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitMetricPowerCubedConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert metric cubed units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/metric/power/{src_format}/{output_format}": { + "get": { + "description": "Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_metric_power_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMetricPower" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMetricPower" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitMetricPowerConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert metric units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/metric/squared/{src_format}/{output_format}": { + "get": { + "description": "Convert a metric squared unit value to another metric squared unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_metric_power_squared_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMetricPower" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMetricPower" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitMetricPowerSquaredConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert metric squared units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/power/{src_format}/{output_format}": { + "get": { + "description": "Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_power_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitPowerFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitPowerFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitPowerConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert power units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/pressure/{src_format}/{output_format}": { + "get": { + "description": "Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_pressure_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitPressureFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitPressureFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitPressureConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert pressure units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/radiation/{src_format}/{output_format}": { + "get": { + "description": "Convert a radiation unit value to another radiation unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_radiation_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitRadiationFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitRadiationFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitRadiationConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert radiation units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/solid-angle/{src_format}/{output_format}": { + "get": { + "description": "Convert a solid angle unit value to another solid angle unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_solid_angle_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitSolidAngleFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitSolidAngleFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitSolidAngleConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert solid angle units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/temperature/{src_format}/{output_format}": { + "get": { + "description": "Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_temperature_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitTemperatureFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitTemperatureFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitTemperatureConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert temperature units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/time/{src_format}/{output_format}": { + "get": { + "description": "Convert a time unit value to another time unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_time_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitTimeFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitTimeFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitTimeConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert time units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/velocity/{src_format}/{output_format}": { + "get": { + "description": "Convert a velocity unit value to another velocity unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_velocity_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitVelocityFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitVelocityFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitVelocityConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert velocity units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/voltage/{src_format}/{output_format}": { + "get": { + "description": "Convert a voltage unit value to another voltage unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_voltage_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitVoltageFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitVoltageFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitVoltageConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert voltage units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/unit/conversion/volume/{src_format}/{output_format}": { + "get": { + "description": "Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_volume_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitVolumeFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitVolumeFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitVolumeConversion" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert volume units.", + "tags": [ + "unit", + "beta" + ] + } + }, + "/user": { + "delete": { + "description": "This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.\nThis call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.", + "operationId": "delete_user_self", + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Delete your user.", + "tags": [ + "users" + ] }, - "summary": "List users.", - "tags": [ - "users", - "hidden" - ], - "x-dropshot-pagination": true - } - }, - "/users-extended": { - "get": { - "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", - "operationId": "list_users_extended", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" + "get": { + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", + "operationId": "get_user_self", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } }, - "style": "form" + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" + "summary": "Get your user.", + "tags": [ + "users" + ] + }, + "options": { + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_user_self", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } }, - "style": "form" + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { + "summary": "OPTIONS endoint.", + "tags": [ + "hidden" + ] + }, + "put": { + "description": "This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.", + "operationId": "update_user_self", + "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExtendedUserResultsPage" + "$ref": "#/components/schemas/UpdateUser" } } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List users with extended information.", - "tags": [ - "users", - "hidden" - ], - "x-dropshot-pagination": true - } - }, - "/users-extended/{id}": { - "get": { - "description": "To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", - "operationId": "get_user_extended", - "parameters": [ - { - "description": "The user ID.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" + "summary": "Update your user.", + "tags": [ + "users" + ] + } + }, + "/user/api-calls": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "user_list_api_calls", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" }, - "style": "simple" - } - ], - "responses": { - "200": { + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List API calls for your user.", + "tags": [ + "api-calls" + ], + "x-dropshot-pagination": true + } + }, + "/user/api-calls/{id}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.", + "operationId": "get_api_call_for_user", + "parameters": [ + { + "description": "The ID of the API call.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get an API call for a user.", + "tags": [ + "api-calls" + ] + } + }, + "/user/api-tokens": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.", + "operationId": "list_api_tokens_for_user", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTokenResultsPage" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List API tokens for your user.", + "tags": [ + "api-tokens" + ], + "x-dropshot-pagination": true + }, + "post": { + "description": "This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.", + "operationId": "create_api_token_for_user", + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Create a new API token for your user.", + "tags": [ + "api-tokens" + ] + } + }, + "/user/api-tokens/{token}": { + "delete": { + "description": "This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.", + "operationId": "delete_api_token_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Delete an API token for your user.", + "tags": [ + "api-tokens" + ] + }, + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", + "operationId": "get_api_token_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get an API token for your user.", + "tags": [ + "api-tokens" + ] + }, + "options": { + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_api_token_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "OPTIONS endoint.", + "tags": [ + "hidden" + ] + } + }, + "/user/extended": { + "get": { + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users-extended/me` endpoint.", + "operationId": "get_user_self_extended", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get extended information about your user.", + "tags": [ + "users" + ] + } + }, + "/user/file/conversions/{id}": { + "get": { + "description": "Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.", + "operationId": "get_file_conversion_for_user", + "parameters": [ + { + "description": "The ID of the async operation.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallOutput" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get a file conversion for your user.", + "tags": [ + "file" + ] + } + }, + "/user/payment": { + "delete": { + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.", + "operationId": "delete_payment_information_for_user", + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Delete payment info for your user.", + "tags": [ + "payments" + ] + }, + "get": { + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.", + "operationId": "get_payment_information_for_user", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get payment info about your user.", + "tags": [ + "payments" + ] + }, + "options": { + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_payment_information_for_user", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "OPTIONS endoint.", + "tags": [ + "hidden" + ] + }, + "post": { + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.", + "operationId": "create_payment_information_for_user", + "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExtendedUser" + "$ref": "#/components/schemas/BillingInfo" } } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } + "summary": "Create payment info for your user.", + "tags": [ + "payments" + ] }, - "summary": "Get extended information about a user.", - "tags": [ - "users", - "hidden" - ] - } - }, - "/users/{id}": { - "get": { - "description": "To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", - "operationId": "get_user", - "parameters": [ - { - "description": "The user ID.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { + "put": { + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.", + "operationId": "update_payment_information_for_user", + "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/BillingInfo" } } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get a user.", - "tags": [ - "users", - "hidden" - ] - } - }, - "/users/{id}/api-calls": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\nIf the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\nThe API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "list_api_calls_for_user", - "parameters": [ - { - "description": "The user ID.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" } } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, - "4XX": { - "$ref": "#/components/responses/Error" + "summary": "Update payment info for your user.", + "tags": [ + "payments" + ] + } + }, + "/user/payment/balance": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.", + "operationId": "get_payment_balance_for_user", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerBalance" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } }, - "5XX": { - "$ref": "#/components/responses/Error" - } + "summary": "Get balance for your user.", + "tags": [ + "payments" + ] + } + }, + "/user/payment/intent": { + "post": { + "description": "This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.", + "operationId": "create_payment_intent_for_user", + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentIntent" + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Create a payment intent for your user.", + "tags": [ + "payments", + "hidden" + ] + } + }, + "/user/payment/invoices": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.", + "operationId": "list_invoices_for_user", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Invoice" + }, + "title": "Array_of_Invoice", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List invoices for your user.", + "tags": [ + "payments" + ] + } + }, + "/user/payment/methods": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.", + "operationId": "list_payment_methods_for_user", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaymentMethod" + }, + "title": "Array_of_PaymentMethod", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List payment methods for your user.", + "tags": [ + "payments" + ] + } + }, + "/user/payment/methods/{id}": { + "delete": { + "description": "This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.", + "operationId": "delete_payment_method_for_user", + "parameters": [ + { + "description": "The ID of the payment method.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Delete a payment method for your user.", + "tags": [ + "payments", + "hidden" + ] }, - "summary": "List API calls for a user.", - "tags": [ - "api-calls", - "hidden" - ], - "x-dropshot-pagination": true + "options": { + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_payment_methods_for_user", + "parameters": [ + { + "description": "The ID of the payment method.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "OPTIONS endoint.", + "tags": [ + "hidden" + ] + } + }, + "/user/session/{token}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", + "operationId": "get_session_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get a session for your user.", + "tags": [ + "sessions" + ] + } + }, + "/users": { + "get": { + "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResultsPage" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List users.", + "tags": [ + "users", + "hidden" + ], + "x-dropshot-pagination": true + } + }, + "/users-extended": { + "get": { + "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users_extended", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUserResultsPage" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List users with extended information.", + "tags": [ + "users", + "hidden" + ], + "x-dropshot-pagination": true + } + }, + "/users-extended/{id}": { + "get": { + "description": "To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", + "operationId": "get_user_extended", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get extended information about a user.", + "tags": [ + "users", + "hidden" + ] + } + }, + "/users/{id}": { + "get": { + "description": "To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", + "operationId": "get_user", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get a user.", + "tags": [ + "users", + "hidden" + ] + } + }, + "/users/{id}/api-calls": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\nIf the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls_for_user", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List API calls for a user.", + "tags": [ + "api-calls", + "hidden" + ], + "x-dropshot-pagination": true + } } - } - }, - "tags": [ - { - "description": "API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/api-calls" - }, - "name": "api-calls" }, - { - "description": "API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/api-tokens" + "tags": [ + { + "description": "API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/api-calls" + }, + "name": "api-calls" }, - "name": "api-tokens" - }, - { - "description": "Endpoints for third party app grant flows.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/apps" + { + "description": "API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/api-tokens" + }, + "name": "api-tokens" }, - "name": "apps" - }, - { - "description": "Beta API endpoints. We will not charge for these endpoints while they are in beta.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/beta" + { + "description": "Endpoints for third party app grant flows.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/apps" + }, + "name": "apps" }, - "name": "beta" - }, - { - "description": "Constants. These are helpful as helpers.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/constant" + { + "description": "Beta API endpoints. We will not charge for these endpoints while they are in beta.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/beta" + }, + "name": "beta" }, - "name": "constant" - }, - { - "description": "CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/file" + { + "description": "Constants. These are helpful as helpers.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/constant" + }, + "name": "constant" }, - "name": "file" - }, - { - "description": "Hidden API endpoints that should not show up in the docs.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/hidden" + { + "description": "CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/file" + }, + "name": "file" }, - "name": "hidden" - }, - { - "description": "Meta information about the API.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/meta" + { + "description": "Hidden API endpoints that should not show up in the docs.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/hidden" + }, + "name": "hidden" }, - "name": "meta" - }, - { - "description": "Endpoints that implement OAuth 2.0 grant flows.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/oauth2" + { + "description": "Meta information about the API.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/meta" + }, + "name": "meta" }, - "name": "oauth2" - }, - { - "description": "Operations around payments and billing.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/payments" + { + "description": "Endpoints that implement OAuth 2.0 grant flows.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/oauth2" + }, + "name": "oauth2" }, - "name": "payments" - }, - { - "description": "Sessions allow users to call the API from their session cookie in the browser.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/sessions" + { + "description": "Operations around payments and billing.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/payments" + }, + "name": "payments" }, - "name": "sessions" - }, - { - "description": "Unit conversion operations.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/file" + { + "description": "Sessions allow users to call the API from their session cookie in the browser.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/sessions" + }, + "name": "sessions" }, - "name": "unit" - }, - { - "description": "A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/users" + { + "description": "Unit conversion operations.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/file" + }, + "name": "unit" }, - "name": "users" - } - ] -} \ No newline at end of file + { + "description": "A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/users" + }, + "name": "users" + } + ] + } \ No newline at end of file diff --git a/src/api/api-calls/get_api_call.ts b/src/api/api-calls/get_api_call.ts deleted file mode 100644 index 7631e37..0000000 --- a/src/api/api-calls/get_api_call.ts +++ /dev/null @@ -1,26 +0,0 @@ -import fetch from 'node-fetch'; -import { ApiCallWithPrice_type, Error_type } from '../../models.js'; - -interface Get_api_call_params { - id: string; -} - -type Get_api_call_return = ApiCallWithPrice_type | Error_type; - -export default async function get_api_call({ - id, -}: Get_api_call_params): Promise { - const url = `/api-calls/${id}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Get_api_call_return; - return result; -} diff --git a/src/api/api-calls/get_api_call_for_user.ts b/src/api/api-calls/get_api_call_for_user.ts index 860836d..65930cc 100644 --- a/src/api/api-calls/get_api_call_for_user.ts +++ b/src/api/api-calls/get_api_call_for_user.ts @@ -1,23 +1,28 @@ import fetch from 'node-fetch'; import { ApiCallWithPrice_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; interface Get_api_call_for_user_params { + client?: Client; id: string; } type Get_api_call_for_user_return = ApiCallWithPrice_type | Error_type; export default async function get_api_call_for_user({ + client, id, }: Get_api_call_for_user_params): Promise { const url = `/user/api-calls/${id}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/api-calls/get_api_call_metrics.ts b/src/api/api-calls/get_api_call_metrics.ts deleted file mode 100644 index 8e1dd4c..0000000 --- a/src/api/api-calls/get_api_call_metrics.ts +++ /dev/null @@ -1,26 +0,0 @@ -import fetch from 'node-fetch'; -import { ApiCallQueryGroup_type, Error_type } from '../../models.js'; - -interface Get_api_call_metrics_params { - group_by: string; -} - -type Get_api_call_metrics_return = ApiCallQueryGroup_type[] | Error_type; - -export default async function get_api_call_metrics({ - group_by, -}: Get_api_call_metrics_params): Promise { - const url = `/api-call-metrics?group_by=${group_by}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Get_api_call_metrics_return; - return result; -} diff --git a/src/api/api-calls/get_async_operation.ts b/src/api/api-calls/get_async_operation.ts index 52e8916..26c9df5 100644 --- a/src/api/api-calls/get_async_operation.ts +++ b/src/api/api-calls/get_async_operation.ts @@ -1,23 +1,28 @@ import fetch from 'node-fetch'; import { AsyncApiCallOutput_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; interface Get_async_operation_params { + client?: Client; id: string; } type Get_async_operation_return = AsyncApiCallOutput_type | Error_type; export default async function get_async_operation({ + client, id, }: Get_async_operation_params): Promise { const url = `/async/operations/${id}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/api-calls/list_api_calls.ts b/src/api/api-calls/list_api_calls.ts deleted file mode 100644 index 4eb1828..0000000 --- a/src/api/api-calls/list_api_calls.ts +++ /dev/null @@ -1,30 +0,0 @@ -import fetch from 'node-fetch'; -import { ApiCallWithPriceResultsPage_type, Error_type } from '../../models.js'; - -interface List_api_calls_params { - limit: string; - page_token: string; - sort_by: string; -} - -type List_api_calls_return = ApiCallWithPriceResultsPage_type | Error_type; - -export default async function list_api_calls({ - limit, - page_token, - sort_by, -}: List_api_calls_params): Promise { - const url = `/api-calls?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as List_api_calls_return; - return result; -} diff --git a/src/api/api-calls/list_api_calls_for_user.ts b/src/api/api-calls/list_api_calls_for_user.ts deleted file mode 100644 index e9db264..0000000 --- a/src/api/api-calls/list_api_calls_for_user.ts +++ /dev/null @@ -1,34 +0,0 @@ -import fetch from 'node-fetch'; -import { ApiCallWithPriceResultsPage_type, Error_type } from '../../models.js'; - -interface List_api_calls_for_user_params { - id: string; - limit: string; - page_token: string; - sort_by: string; -} - -type List_api_calls_for_user_return = - | ApiCallWithPriceResultsPage_type - | Error_type; - -export default async function list_api_calls_for_user({ - id, - limit, - page_token, - sort_by, -}: List_api_calls_for_user_params): Promise { - const url = `/users/${id}/api-calls?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as List_api_calls_for_user_return; - return result; -} diff --git a/src/api/api-calls/list_async_operations.ts b/src/api/api-calls/list_async_operations.ts deleted file mode 100644 index e8bc6c6..0000000 --- a/src/api/api-calls/list_async_operations.ts +++ /dev/null @@ -1,32 +0,0 @@ -import fetch from 'node-fetch'; -import { AsyncApiCallResultsPage_type, Error_type } from '../../models.js'; - -interface List_async_operations_params { - limit: string; - page_token: string; - sort_by: string; - status: string; -} - -type List_async_operations_return = AsyncApiCallResultsPage_type | Error_type; - -export default async function list_async_operations({ - limit, - page_token, - sort_by, - status, -}: List_async_operations_params): Promise { - const url = `/async/operations?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}&status=${status}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as List_async_operations_return; - return result; -} diff --git a/src/api/api-calls/user_list_api_calls.ts b/src/api/api-calls/user_list_api_calls.ts index da1799a..79760af 100644 --- a/src/api/api-calls/user_list_api_calls.ts +++ b/src/api/api-calls/user_list_api_calls.ts @@ -1,27 +1,36 @@ import fetch from 'node-fetch'; -import { ApiCallWithPriceResultsPage_type, Error_type } from '../../models.js'; +import { + ApiCallWithPriceResultsPage_type, + Error_type, + CreatedAtSortMode_type, +} from '../../models.js'; +import { Client } from '../../client.js'; interface User_list_api_calls_params { - limit: string; + client?: Client; + limit: number; page_token: string; - sort_by: string; + sort_by: CreatedAtSortMode_type; } type User_list_api_calls_return = ApiCallWithPriceResultsPage_type | Error_type; export default async function user_list_api_calls({ + client, limit, page_token, sort_by, }: User_list_api_calls_params): Promise { const url = `/user/api-calls?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/api-tokens/create_api_token_for_user.ts b/src/api/api-tokens/create_api_token_for_user.ts index 5aa68c2..26ea0ca 100644 --- a/src/api/api-tokens/create_api_token_for_user.ts +++ b/src/api/api-tokens/create_api_token_for_user.ts @@ -1,12 +1,21 @@ import fetch from 'node-fetch'; import { ApiToken_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Create_api_token_for_user_params { + client?: Client; +} type Create_api_token_for_user_return = ApiToken_type | Error_type; -export default async function create_api_token_for_user(): Promise { +export default async function create_api_token_for_user({ + client, +}: Create_api_token_for_user_params = {}): Promise { const url = `/user/api-tokens`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; diff --git a/src/api/api-tokens/delete_api_token_for_user.ts b/src/api/api-tokens/delete_api_token_for_user.ts index cf8f435..5e5b66b 100644 --- a/src/api/api-tokens/delete_api_token_for_user.ts +++ b/src/api/api-tokens/delete_api_token_for_user.ts @@ -1,23 +1,28 @@ import fetch from 'node-fetch'; import { Error_type } from '../../models.js'; +import { Client } from '../../client.js'; interface Delete_api_token_for_user_params { + client?: Client; token: string; } type Delete_api_token_for_user_return = Error_type; export default async function delete_api_token_for_user({ + client, token, }: Delete_api_token_for_user_params): Promise { const url = `/user/api-tokens/${token}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'DELETE', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/api-tokens/get_api_token_for_user.ts b/src/api/api-tokens/get_api_token_for_user.ts index 481783f..33344c8 100644 --- a/src/api/api-tokens/get_api_token_for_user.ts +++ b/src/api/api-tokens/get_api_token_for_user.ts @@ -1,23 +1,28 @@ import fetch from 'node-fetch'; import { ApiToken_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; interface Get_api_token_for_user_params { + client?: Client; token: string; } type Get_api_token_for_user_return = ApiToken_type | Error_type; export default async function get_api_token_for_user({ + client, token, }: Get_api_token_for_user_params): Promise { const url = `/user/api-tokens/${token}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/api-tokens/list_api_tokens_for_user.ts b/src/api/api-tokens/list_api_tokens_for_user.ts index e09bc81..25d8a93 100644 --- a/src/api/api-tokens/list_api_tokens_for_user.ts +++ b/src/api/api-tokens/list_api_tokens_for_user.ts @@ -1,27 +1,36 @@ import fetch from 'node-fetch'; -import { ApiTokenResultsPage_type, Error_type } from '../../models.js'; +import { + ApiTokenResultsPage_type, + Error_type, + CreatedAtSortMode_type, +} from '../../models.js'; +import { Client } from '../../client.js'; interface List_api_tokens_for_user_params { - limit: string; + client?: Client; + limit: number; page_token: string; - sort_by: string; + sort_by: CreatedAtSortMode_type; } type List_api_tokens_for_user_return = ApiTokenResultsPage_type | Error_type; export default async function list_api_tokens_for_user({ + client, limit, page_token, sort_by, }: List_api_tokens_for_user_params): Promise { const url = `/user/api-tokens?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/constant/get_physics_constant.ts b/src/api/constant/get_physics_constant.ts new file mode 100644 index 0000000..28e00cd --- /dev/null +++ b/src/api/constant/get_physics_constant.ts @@ -0,0 +1,35 @@ +import fetch from 'node-fetch'; +import { + PhysicsConstant_type, + Error_type, + PhysicsConstantName_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_physics_constant_params { + client?: Client; + constant: PhysicsConstantName_type; +} + +type Get_physics_constant_return = PhysicsConstant_type | Error_type; + +export default async function get_physics_constant({ + client, + constant, +}: Get_physics_constant_params): Promise { + const url = `/constant/physics/${constant}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_physics_constant_return; + return result; +} diff --git a/src/api/file/create_file_conversion.ts b/src/api/file/create_file_conversion.ts index 9efe242..03e8b34 100644 --- a/src/api/file/create_file_conversion.ts +++ b/src/api/file/create_file_conversion.ts @@ -1,22 +1,32 @@ import fetch from 'node-fetch'; -import { FileConversion_type, Error_type } from '../../models.js'; +import { + FileConversion_type, + Error_type, + FileOutputFormat_type, + FileSourceFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; interface Create_file_conversion_params { - output_format: string; - src_format: string; + client?: Client; + output_format: FileOutputFormat_type; + src_format: FileSourceFormat_type; body: string; } type Create_file_conversion_return = FileConversion_type | Error_type; export default async function create_file_conversion({ + client, output_format, src_format, body, }: Create_file_conversion_params): Promise { const url = `/file/conversion/${src_format}/${output_format}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; diff --git a/src/api/file/create_file_density.ts b/src/api/file/create_file_density.ts index ee96936..b52ed45 100644 --- a/src/api/file/create_file_density.ts +++ b/src/api/file/create_file_density.ts @@ -1,22 +1,31 @@ import fetch from 'node-fetch'; -import { FileDensity_type, Error_type } from '../../models.js'; +import { + FileDensity_type, + Error_type, + FileSourceFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; interface Create_file_density_params { - material_mass: string; - src_format: string; + client?: Client; + material_mass: number; + src_format: FileSourceFormat_type; body: string; } type Create_file_density_return = FileDensity_type | Error_type; export default async function create_file_density({ + client, material_mass, src_format, body, }: Create_file_density_params): Promise { const url = `/file/density?material_mass=${material_mass}&src_format=${src_format}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; diff --git a/src/api/file/create_file_execution.ts b/src/api/file/create_file_execution.ts deleted file mode 100644 index 6ff408a..0000000 --- a/src/api/file/create_file_execution.ts +++ /dev/null @@ -1,31 +0,0 @@ -import fetch from 'node-fetch'; -import { CodeOutput_type, Error_type } from '../../models.js'; - -interface Create_file_execution_params { - lang: string; - output: string; - body: string; -} - -type Create_file_execution_return = CodeOutput_type | Error_type; - -export default async function create_file_execution({ - lang, - output, - body, -}: Create_file_execution_params): Promise { - const url = `/file/execute/${lang}?output=${output}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - body, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Create_file_execution_return; - return result; -} diff --git a/src/api/file/create_file_mass.ts b/src/api/file/create_file_mass.ts index 5c10827..1c73ac7 100644 --- a/src/api/file/create_file_mass.ts +++ b/src/api/file/create_file_mass.ts @@ -1,22 +1,31 @@ import fetch from 'node-fetch'; -import { FileMass_type, Error_type } from '../../models.js'; +import { + FileMass_type, + Error_type, + FileSourceFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; interface Create_file_mass_params { - material_density: string; - src_format: string; + client?: Client; + material_density: number; + src_format: FileSourceFormat_type; body: string; } type Create_file_mass_return = FileMass_type | Error_type; export default async function create_file_mass({ + client, material_density, src_format, body, }: Create_file_mass_params): Promise { const url = `/file/mass?material_density=${material_density}&src_format=${src_format}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; diff --git a/src/api/file/create_file_surface_area.ts b/src/api/file/create_file_surface_area.ts new file mode 100644 index 0000000..03abd46 --- /dev/null +++ b/src/api/file/create_file_surface_area.ts @@ -0,0 +1,38 @@ +import fetch from 'node-fetch'; +import { + FileSurfaceArea_type, + Error_type, + FileSourceFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Create_file_surface_area_params { + client?: Client; + src_format: FileSourceFormat_type; + body: string; +} + +type Create_file_surface_area_return = FileSurfaceArea_type | Error_type; + +export default async function create_file_surface_area({ + client, + src_format, + body, +}: Create_file_surface_area_params): Promise { + const url = `/file/surface-area?src_format=${src_format}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'POST', + headers, + body, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Create_file_surface_area_return; + return result; +} diff --git a/src/api/file/create_file_volume.ts b/src/api/file/create_file_volume.ts index c7e8560..1f07fa1 100644 --- a/src/api/file/create_file_volume.ts +++ b/src/api/file/create_file_volume.ts @@ -1,20 +1,29 @@ import fetch from 'node-fetch'; -import { FileVolume_type, Error_type } from '../../models.js'; +import { + FileVolume_type, + Error_type, + FileSourceFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; interface Create_file_volume_params { - src_format: string; + client?: Client; + src_format: FileSourceFormat_type; body: string; } type Create_file_volume_return = FileVolume_type | Error_type; export default async function create_file_volume({ + client, src_format, body, }: Create_file_volume_params): Promise { const url = `/file/volume?src_format=${src_format}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; diff --git a/src/api/file/get_file_conversion.ts b/src/api/file/get_file_conversion.ts index 086ce9f..ad25a51 100644 --- a/src/api/file/get_file_conversion.ts +++ b/src/api/file/get_file_conversion.ts @@ -1,23 +1,28 @@ import fetch from 'node-fetch'; import { AsyncApiCallOutput_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; interface Get_file_conversion_params { + client?: Client; id: string; } type Get_file_conversion_return = AsyncApiCallOutput_type | Error_type; export default async function get_file_conversion({ + client, id, }: Get_file_conversion_params): Promise { const url = `/file/conversions/${id}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/file/get_file_conversion_for_user.ts b/src/api/file/get_file_conversion_for_user.ts index 15c584f..9137070 100644 --- a/src/api/file/get_file_conversion_for_user.ts +++ b/src/api/file/get_file_conversion_for_user.ts @@ -1,23 +1,28 @@ import fetch from 'node-fetch'; import { AsyncApiCallOutput_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; interface Get_file_conversion_for_user_params { + client?: Client; id: string; } type Get_file_conversion_for_user_return = AsyncApiCallOutput_type | Error_type; export default async function get_file_conversion_for_user({ + client, id, }: Get_file_conversion_for_user_params): Promise { const url = `/user/file/conversions/${id}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/meta/get_metadata.ts b/src/api/meta/get_metadata.ts deleted file mode 100644 index df5c073..0000000 --- a/src/api/meta/get_metadata.ts +++ /dev/null @@ -1,20 +0,0 @@ -import fetch from 'node-fetch'; -import { Metadata_type, Error_type } from '../../models.js'; - -type Get_metadata_return = Metadata_type | Error_type; - -export default async function get_metadata(): Promise { - const url = `/_meta/info`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Get_metadata_return; - return result; -} diff --git a/src/api/meta/get_schema.ts b/src/api/meta/get_schema.ts index 1e382b1..ff2ddc7 100644 --- a/src/api/meta/get_schema.ts +++ b/src/api/meta/get_schema.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_schema_params { + client?: Client; +} type Get_schema_return = Error_type; -export default async function get_schema(): Promise { +export default async function get_schema({ + client, +}: Get_schema_params = {}): Promise { const url = `/`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/meta/ping.ts b/src/api/meta/ping.ts index b7ed1c7..617c26b 100644 --- a/src/api/meta/ping.ts +++ b/src/api/meta/ping.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { Pong_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Ping_params { + client?: Client; +} type Ping_return = Pong_type | Error_type; -export default async function ping(): Promise { +export default async function ping({ + client, +}: Ping_params = {}): Promise { const url = `/ping`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/oauth2/device_access_token.ts b/src/api/oauth2/device_access_token.ts deleted file mode 100644 index 1182c56..0000000 --- a/src/api/oauth2/device_access_token.ts +++ /dev/null @@ -1,20 +0,0 @@ -import fetch from 'node-fetch'; -import {} from '../../models.js'; - -type Device_access_token_return = any; - -export default async function device_access_token(): Promise { - const url = `/oauth2/device/token`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Device_access_token_return; - return result; -} diff --git a/src/api/oauth2/device_auth_confirm.ts b/src/api/oauth2/device_auth_confirm.ts deleted file mode 100644 index 02463ea..0000000 --- a/src/api/oauth2/device_auth_confirm.ts +++ /dev/null @@ -1,20 +0,0 @@ -import fetch from 'node-fetch'; -import { Error_type } from '../../models.js'; - -type Device_auth_confirm_return = Error_type; - -export default async function device_auth_confirm(): Promise { - const url = `/oauth2/device/confirm`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Device_auth_confirm_return; - return result; -} diff --git a/src/api/oauth2/device_auth_request.ts b/src/api/oauth2/device_auth_request.ts deleted file mode 100644 index fff0c1f..0000000 --- a/src/api/oauth2/device_auth_request.ts +++ /dev/null @@ -1,20 +0,0 @@ -import fetch from 'node-fetch'; -import {} from '../../models.js'; - -type Device_auth_request_return = any; - -export default async function device_auth_request(): Promise { - const url = `/oauth2/device/auth`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Device_auth_request_return; - return result; -} diff --git a/src/api/oauth2/device_auth_verify.ts b/src/api/oauth2/device_auth_verify.ts deleted file mode 100644 index def9484..0000000 --- a/src/api/oauth2/device_auth_verify.ts +++ /dev/null @@ -1,26 +0,0 @@ -import fetch from 'node-fetch'; -import { Error_type } from '../../models.js'; - -interface Device_auth_verify_params { - user_code: string; -} - -type Device_auth_verify_return = Error_type; - -export default async function device_auth_verify({ - user_code, -}: Device_auth_verify_params): Promise { - const url = `/oauth2/device/verify?user_code=${user_code}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Device_auth_verify_return; - return result; -} diff --git a/src/api/oauth2/listen_oauth2_provider_callback.ts b/src/api/oauth2/listen_oauth2_provider_callback.ts deleted file mode 100644 index b02fc18..0000000 --- a/src/api/oauth2/listen_oauth2_provider_callback.ts +++ /dev/null @@ -1,31 +0,0 @@ -import fetch from 'node-fetch'; -import { Error_type } from '../../models.js'; - -interface Listen_oauth2_provider_callback_params { - provider: string; - code: string; - state: string; -} - -type Listen_oauth2_provider_callback_return = Error_type; - -export default async function listen_oauth2_provider_callback({ - provider, - code, - state, -}: Listen_oauth2_provider_callback_params): Promise { - const url = `/oauth2/provider/${provider}/callback?code=${code}&state=${state}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = - (await response.json()) as Listen_oauth2_provider_callback_return; - return result; -} diff --git a/src/api/oauth2/listen_oauth2_provider_consent.ts b/src/api/oauth2/listen_oauth2_provider_consent.ts deleted file mode 100644 index 80df89d..0000000 --- a/src/api/oauth2/listen_oauth2_provider_consent.ts +++ /dev/null @@ -1,29 +0,0 @@ -import fetch from 'node-fetch'; -import { OAuth2ClientInfo_type, Error_type } from '../../models.js'; - -interface Listen_oauth2_provider_consent_params { - provider: string; - callback_url: string; -} - -type Listen_oauth2_provider_consent_return = OAuth2ClientInfo_type | Error_type; - -export default async function listen_oauth2_provider_consent({ - provider, - callback_url, -}: Listen_oauth2_provider_consent_params): Promise { - const url = `/oauth2/provider/${provider}/consent?callback_url=${callback_url}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = - (await response.json()) as Listen_oauth2_provider_consent_return; - return result; -} diff --git a/src/api/payments/create_payment_information_for_user.ts b/src/api/payments/create_payment_information_for_user.ts index fad039b..6ab9fe3 100644 --- a/src/api/payments/create_payment_information_for_user.ts +++ b/src/api/payments/create_payment_information_for_user.ts @@ -1,12 +1,21 @@ import fetch from 'node-fetch'; import { Customer_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Create_payment_information_for_user_params { + client?: Client; +} type Create_payment_information_for_user_return = Customer_type | Error_type; -export default async function create_payment_information_for_user(): Promise { +export default async function create_payment_information_for_user({ + client, +}: Create_payment_information_for_user_params = {}): Promise { const url = `/user/payment`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; diff --git a/src/api/payments/create_payment_intent_for_user.ts b/src/api/payments/create_payment_intent_for_user.ts deleted file mode 100644 index 4bb1718..0000000 --- a/src/api/payments/create_payment_intent_for_user.ts +++ /dev/null @@ -1,21 +0,0 @@ -import fetch from 'node-fetch'; -import { PaymentIntent_type, Error_type } from '../../models.js'; - -type Create_payment_intent_for_user_return = PaymentIntent_type | Error_type; - -export default async function create_payment_intent_for_user(): Promise { - const url = `/user/payment/intent`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = - (await response.json()) as Create_payment_intent_for_user_return; - return result; -} diff --git a/src/api/payments/delete_payment_information_for_user.ts b/src/api/payments/delete_payment_information_for_user.ts index c2db336..0d4004e 100644 --- a/src/api/payments/delete_payment_information_for_user.ts +++ b/src/api/payments/delete_payment_information_for_user.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Delete_payment_information_for_user_params { + client?: Client; +} type Delete_payment_information_for_user_return = Error_type; -export default async function delete_payment_information_for_user(): Promise { +export default async function delete_payment_information_for_user({ + client, +}: Delete_payment_information_for_user_params = {}): Promise { const url = `/user/payment`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'DELETE', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/payments/delete_payment_method_for_user.ts b/src/api/payments/delete_payment_method_for_user.ts deleted file mode 100644 index 35a4a30..0000000 --- a/src/api/payments/delete_payment_method_for_user.ts +++ /dev/null @@ -1,27 +0,0 @@ -import fetch from 'node-fetch'; -import { Error_type } from '../../models.js'; - -interface Delete_payment_method_for_user_params { - id: string; -} - -type Delete_payment_method_for_user_return = Error_type; - -export default async function delete_payment_method_for_user({ - id, -}: Delete_payment_method_for_user_params): Promise { - const url = `/user/payment/methods/${id}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = - (await response.json()) as Delete_payment_method_for_user_return; - return result; -} diff --git a/src/api/payments/get_payment_balance_for_user.ts b/src/api/payments/get_payment_balance_for_user.ts index cf23b06..72318ae 100644 --- a/src/api/payments/get_payment_balance_for_user.ts +++ b/src/api/payments/get_payment_balance_for_user.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { CustomerBalance_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_payment_balance_for_user_params { + client?: Client; +} type Get_payment_balance_for_user_return = CustomerBalance_type | Error_type; -export default async function get_payment_balance_for_user(): Promise { +export default async function get_payment_balance_for_user({ + client, +}: Get_payment_balance_for_user_params = {}): Promise { const url = `/user/payment/balance`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/payments/get_payment_information_for_user.ts b/src/api/payments/get_payment_information_for_user.ts index d0dfc96..369bc91 100644 --- a/src/api/payments/get_payment_information_for_user.ts +++ b/src/api/payments/get_payment_information_for_user.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { Customer_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_payment_information_for_user_params { + client?: Client; +} type Get_payment_information_for_user_return = Customer_type | Error_type; -export default async function get_payment_information_for_user(): Promise { +export default async function get_payment_information_for_user({ + client, +}: Get_payment_information_for_user_params = {}): Promise { const url = `/user/payment`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/payments/list_invoices_for_user.ts b/src/api/payments/list_invoices_for_user.ts index a048bc7..508763e 100644 --- a/src/api/payments/list_invoices_for_user.ts +++ b/src/api/payments/list_invoices_for_user.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { Invoice_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface List_invoices_for_user_params { + client?: Client; +} type List_invoices_for_user_return = Invoice_type[] | Error_type; -export default async function list_invoices_for_user(): Promise { +export default async function list_invoices_for_user({ + client, +}: List_invoices_for_user_params = {}): Promise { const url = `/user/payment/invoices`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/payments/list_payment_methods_for_user.ts b/src/api/payments/list_payment_methods_for_user.ts index e16df39..a96ce6a 100644 --- a/src/api/payments/list_payment_methods_for_user.ts +++ b/src/api/payments/list_payment_methods_for_user.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { PaymentMethod_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface List_payment_methods_for_user_params { + client?: Client; +} type List_payment_methods_for_user_return = PaymentMethod_type[] | Error_type; -export default async function list_payment_methods_for_user(): Promise { +export default async function list_payment_methods_for_user({ + client, +}: List_payment_methods_for_user_params = {}): Promise { const url = `/user/payment/methods`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/payments/update_payment_information_for_user.ts b/src/api/payments/update_payment_information_for_user.ts index 35fe6cf..ba879be 100644 --- a/src/api/payments/update_payment_information_for_user.ts +++ b/src/api/payments/update_payment_information_for_user.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { Customer_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Update_payment_information_for_user_params { + client?: Client; +} type Update_payment_information_for_user_return = Customer_type | Error_type; -export default async function update_payment_information_for_user(): Promise { +export default async function update_payment_information_for_user({ + client, +}: Update_payment_information_for_user_params = {}): Promise { const url = `/user/payment`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'PUT', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/sessions/get_session_for_user.ts b/src/api/sessions/get_session_for_user.ts index b356f0a..6108ae4 100644 --- a/src/api/sessions/get_session_for_user.ts +++ b/src/api/sessions/get_session_for_user.ts @@ -1,23 +1,28 @@ import fetch from 'node-fetch'; import { Session_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; interface Get_session_for_user_params { + client?: Client; token: string; } type Get_session_for_user_return = Session_type | Error_type; export default async function get_session_for_user({ + client, token, }: Get_session_for_user_params): Promise { const url = `/user/session/${token}`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/unit/create_unit_conversion.ts b/src/api/unit/create_unit_conversion.ts deleted file mode 100644 index de53e94..0000000 --- a/src/api/unit/create_unit_conversion.ts +++ /dev/null @@ -1,30 +0,0 @@ -import fetch from 'node-fetch'; -import { UnitConversion_type, Error_type } from '../../models.js'; - -interface Create_unit_conversion_params { - output_format: string; - src_format: string; - value: string; -} - -type Create_unit_conversion_return = UnitConversion_type | Error_type; - -export default async function create_unit_conversion({ - output_format, - src_format, - value, -}: Create_unit_conversion_params): Promise { - const url = `/unit/conversion/${src_format}/${output_format}?value=${value}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Create_unit_conversion_return; - return result; -} diff --git a/src/api/unit/get_acceleration_unit_conversion.ts b/src/api/unit/get_acceleration_unit_conversion.ts new file mode 100644 index 0000000..bd73427 --- /dev/null +++ b/src/api/unit/get_acceleration_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitAccelerationConversion_type, + Error_type, + UnitAccelerationFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_acceleration_unit_conversion_params { + client?: Client; + output_format: UnitAccelerationFormat_type; + src_format: UnitAccelerationFormat_type; + value: number; +} + +type Get_acceleration_unit_conversion_return = + | UnitAccelerationConversion_type + | Error_type; + +export default async function get_acceleration_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_acceleration_unit_conversion_params): Promise { + const url = `/unit/conversion/acceleration/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_acceleration_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_angle_unit_conversion.ts b/src/api/unit/get_angle_unit_conversion.ts new file mode 100644 index 0000000..a2b80b3 --- /dev/null +++ b/src/api/unit/get_angle_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitAngleConversion_type, + Error_type, + UnitAngleFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_angle_unit_conversion_params { + client?: Client; + output_format: UnitAngleFormat_type; + src_format: UnitAngleFormat_type; + value: number; +} + +type Get_angle_unit_conversion_return = UnitAngleConversion_type | Error_type; + +export default async function get_angle_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_angle_unit_conversion_params): Promise { + const url = `/unit/conversion/angle/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_angle_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_angular_velocity_unit_conversion.ts b/src/api/unit/get_angular_velocity_unit_conversion.ts new file mode 100644 index 0000000..efe37c8 --- /dev/null +++ b/src/api/unit/get_angular_velocity_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitAngularVelocityConversion_type, + Error_type, + UnitAngularVelocityFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_angular_velocity_unit_conversion_params { + client?: Client; + output_format: UnitAngularVelocityFormat_type; + src_format: UnitAngularVelocityFormat_type; + value: number; +} + +type Get_angular_velocity_unit_conversion_return = + | UnitAngularVelocityConversion_type + | Error_type; + +export default async function get_angular_velocity_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_angular_velocity_unit_conversion_params): Promise { + const url = `/unit/conversion/angular-velocity/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_angular_velocity_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_area_unit_conversion.ts b/src/api/unit/get_area_unit_conversion.ts new file mode 100644 index 0000000..62728a6 --- /dev/null +++ b/src/api/unit/get_area_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitAreaConversion_type, + Error_type, + UnitAreaFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_area_unit_conversion_params { + client?: Client; + output_format: UnitAreaFormat_type; + src_format: UnitAreaFormat_type; + value: number; +} + +type Get_area_unit_conversion_return = UnitAreaConversion_type | Error_type; + +export default async function get_area_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_area_unit_conversion_params): Promise { + const url = `/unit/conversion/area/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_area_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_charge_unit_conversion.ts b/src/api/unit/get_charge_unit_conversion.ts new file mode 100644 index 0000000..471c411 --- /dev/null +++ b/src/api/unit/get_charge_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitChargeConversion_type, + Error_type, + UnitChargeFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_charge_unit_conversion_params { + client?: Client; + output_format: UnitChargeFormat_type; + src_format: UnitChargeFormat_type; + value: number; +} + +type Get_charge_unit_conversion_return = UnitChargeConversion_type | Error_type; + +export default async function get_charge_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_charge_unit_conversion_params): Promise { + const url = `/unit/conversion/charge/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_charge_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_concentration_unit_conversion.ts b/src/api/unit/get_concentration_unit_conversion.ts new file mode 100644 index 0000000..86e2acc --- /dev/null +++ b/src/api/unit/get_concentration_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitConcentrationConversion_type, + Error_type, + UnitConcentrationFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_concentration_unit_conversion_params { + client?: Client; + output_format: UnitConcentrationFormat_type; + src_format: UnitConcentrationFormat_type; + value: number; +} + +type Get_concentration_unit_conversion_return = + | UnitConcentrationConversion_type + | Error_type; + +export default async function get_concentration_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_concentration_unit_conversion_params): Promise { + const url = `/unit/conversion/concentration/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_concentration_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_data_transfer_rate_unit_conversion.ts b/src/api/unit/get_data_transfer_rate_unit_conversion.ts new file mode 100644 index 0000000..13db4ea --- /dev/null +++ b/src/api/unit/get_data_transfer_rate_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitDataTransferRateConversion_type, + Error_type, + UnitDataTransferRateFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_data_transfer_rate_unit_conversion_params { + client?: Client; + output_format: UnitDataTransferRateFormat_type; + src_format: UnitDataTransferRateFormat_type; + value: number; +} + +type Get_data_transfer_rate_unit_conversion_return = + | UnitDataTransferRateConversion_type + | Error_type; + +export default async function get_data_transfer_rate_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_data_transfer_rate_unit_conversion_params): Promise { + const url = `/unit/conversion/data-transfer-rate/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_data_transfer_rate_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_data_unit_conversion.ts b/src/api/unit/get_data_unit_conversion.ts new file mode 100644 index 0000000..414e584 --- /dev/null +++ b/src/api/unit/get_data_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitDataConversion_type, + Error_type, + UnitDataFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_data_unit_conversion_params { + client?: Client; + output_format: UnitDataFormat_type; + src_format: UnitDataFormat_type; + value: number; +} + +type Get_data_unit_conversion_return = UnitDataConversion_type | Error_type; + +export default async function get_data_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_data_unit_conversion_params): Promise { + const url = `/unit/conversion/data/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_data_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_density_unit_conversion.ts b/src/api/unit/get_density_unit_conversion.ts new file mode 100644 index 0000000..988dcc0 --- /dev/null +++ b/src/api/unit/get_density_unit_conversion.ts @@ -0,0 +1,41 @@ +import fetch from 'node-fetch'; +import { + UnitDensityConversion_type, + Error_type, + UnitDensityFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_density_unit_conversion_params { + client?: Client; + output_format: UnitDensityFormat_type; + src_format: UnitDensityFormat_type; + value: number; +} + +type Get_density_unit_conversion_return = + | UnitDensityConversion_type + | Error_type; + +export default async function get_density_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_density_unit_conversion_params): Promise { + const url = `/unit/conversion/density/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_density_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_energy_unit_conversion.ts b/src/api/unit/get_energy_unit_conversion.ts new file mode 100644 index 0000000..b5deafe --- /dev/null +++ b/src/api/unit/get_energy_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitEnergyConversion_type, + Error_type, + UnitEnergyFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_energy_unit_conversion_params { + client?: Client; + output_format: UnitEnergyFormat_type; + src_format: UnitEnergyFormat_type; + value: number; +} + +type Get_energy_unit_conversion_return = UnitEnergyConversion_type | Error_type; + +export default async function get_energy_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_energy_unit_conversion_params): Promise { + const url = `/unit/conversion/energy/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_energy_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_force_unit_conversion.ts b/src/api/unit/get_force_unit_conversion.ts new file mode 100644 index 0000000..9c004be --- /dev/null +++ b/src/api/unit/get_force_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitForceConversion_type, + Error_type, + UnitForceFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_force_unit_conversion_params { + client?: Client; + output_format: UnitForceFormat_type; + src_format: UnitForceFormat_type; + value: number; +} + +type Get_force_unit_conversion_return = UnitForceConversion_type | Error_type; + +export default async function get_force_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_force_unit_conversion_params): Promise { + const url = `/unit/conversion/force/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_force_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_illuminance_unit_conversion.ts b/src/api/unit/get_illuminance_unit_conversion.ts new file mode 100644 index 0000000..50ac65d --- /dev/null +++ b/src/api/unit/get_illuminance_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitIlluminanceConversion_type, + Error_type, + UnitIlluminanceFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_illuminance_unit_conversion_params { + client?: Client; + output_format: UnitIlluminanceFormat_type; + src_format: UnitIlluminanceFormat_type; + value: number; +} + +type Get_illuminance_unit_conversion_return = + | UnitIlluminanceConversion_type + | Error_type; + +export default async function get_illuminance_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_illuminance_unit_conversion_params): Promise { + const url = `/unit/conversion/illuminance/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_illuminance_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_length_unit_conversion.ts b/src/api/unit/get_length_unit_conversion.ts new file mode 100644 index 0000000..dead127 --- /dev/null +++ b/src/api/unit/get_length_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitLengthConversion_type, + Error_type, + UnitLengthFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_length_unit_conversion_params { + client?: Client; + output_format: UnitLengthFormat_type; + src_format: UnitLengthFormat_type; + value: number; +} + +type Get_length_unit_conversion_return = UnitLengthConversion_type | Error_type; + +export default async function get_length_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_length_unit_conversion_params): Promise { + const url = `/unit/conversion/length/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_length_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_magnetic_field_strength_unit_conversion.ts b/src/api/unit/get_magnetic_field_strength_unit_conversion.ts new file mode 100644 index 0000000..e9ca9ac --- /dev/null +++ b/src/api/unit/get_magnetic_field_strength_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitMagneticFieldStrengthConversion_type, + Error_type, + UnitMagneticFieldStrengthFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_magnetic_field_strength_unit_conversion_params { + client?: Client; + output_format: UnitMagneticFieldStrengthFormat_type; + src_format: UnitMagneticFieldStrengthFormat_type; + value: number; +} + +type Get_magnetic_field_strength_unit_conversion_return = + | UnitMagneticFieldStrengthConversion_type + | Error_type; + +export default async function get_magnetic_field_strength_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_magnetic_field_strength_unit_conversion_params): Promise { + const url = `/unit/conversion/magnetic-field-strength/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_magnetic_field_strength_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_magnetic_flux_unit_conversion.ts b/src/api/unit/get_magnetic_flux_unit_conversion.ts new file mode 100644 index 0000000..d93cedd --- /dev/null +++ b/src/api/unit/get_magnetic_flux_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitMagneticFluxConversion_type, + Error_type, + UnitMagneticFluxFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_magnetic_flux_unit_conversion_params { + client?: Client; + output_format: UnitMagneticFluxFormat_type; + src_format: UnitMagneticFluxFormat_type; + value: number; +} + +type Get_magnetic_flux_unit_conversion_return = + | UnitMagneticFluxConversion_type + | Error_type; + +export default async function get_magnetic_flux_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_magnetic_flux_unit_conversion_params): Promise { + const url = `/unit/conversion/magnetic-flux/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_magnetic_flux_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_mass_unit_conversion.ts b/src/api/unit/get_mass_unit_conversion.ts new file mode 100644 index 0000000..1f36c3b --- /dev/null +++ b/src/api/unit/get_mass_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitMassConversion_type, + Error_type, + UnitMassFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_mass_unit_conversion_params { + client?: Client; + output_format: UnitMassFormat_type; + src_format: UnitMassFormat_type; + value: number; +} + +type Get_mass_unit_conversion_return = UnitMassConversion_type | Error_type; + +export default async function get_mass_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_mass_unit_conversion_params): Promise { + const url = `/unit/conversion/mass/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_mass_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_metric_power_cubed_unit_conversion.ts b/src/api/unit/get_metric_power_cubed_unit_conversion.ts new file mode 100644 index 0000000..8a74a69 --- /dev/null +++ b/src/api/unit/get_metric_power_cubed_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitMetricPowerCubedConversion_type, + Error_type, + UnitMetricPower_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_metric_power_cubed_unit_conversion_params { + client?: Client; + output_format: UnitMetricPower_type; + src_format: UnitMetricPower_type; + value: number; +} + +type Get_metric_power_cubed_unit_conversion_return = + | UnitMetricPowerCubedConversion_type + | Error_type; + +export default async function get_metric_power_cubed_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_metric_power_cubed_unit_conversion_params): Promise { + const url = `/unit/conversion/metric/cubed/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_metric_power_cubed_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_metric_power_squared_unit_conversion.ts b/src/api/unit/get_metric_power_squared_unit_conversion.ts new file mode 100644 index 0000000..c0008fb --- /dev/null +++ b/src/api/unit/get_metric_power_squared_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitMetricPowerSquaredConversion_type, + Error_type, + UnitMetricPower_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_metric_power_squared_unit_conversion_params { + client?: Client; + output_format: UnitMetricPower_type; + src_format: UnitMetricPower_type; + value: number; +} + +type Get_metric_power_squared_unit_conversion_return = + | UnitMetricPowerSquaredConversion_type + | Error_type; + +export default async function get_metric_power_squared_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_metric_power_squared_unit_conversion_params): Promise { + const url = `/unit/conversion/metric/squared/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_metric_power_squared_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_metric_power_unit_conversion.ts b/src/api/unit/get_metric_power_unit_conversion.ts new file mode 100644 index 0000000..0105a19 --- /dev/null +++ b/src/api/unit/get_metric_power_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitMetricPowerConversion_type, + Error_type, + UnitMetricPower_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_metric_power_unit_conversion_params { + client?: Client; + output_format: UnitMetricPower_type; + src_format: UnitMetricPower_type; + value: number; +} + +type Get_metric_power_unit_conversion_return = + | UnitMetricPowerConversion_type + | Error_type; + +export default async function get_metric_power_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_metric_power_unit_conversion_params): Promise { + const url = `/unit/conversion/metric/power/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_metric_power_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_power_unit_conversion.ts b/src/api/unit/get_power_unit_conversion.ts new file mode 100644 index 0000000..2978b35 --- /dev/null +++ b/src/api/unit/get_power_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitPowerConversion_type, + Error_type, + UnitPowerFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_power_unit_conversion_params { + client?: Client; + output_format: UnitPowerFormat_type; + src_format: UnitPowerFormat_type; + value: number; +} + +type Get_power_unit_conversion_return = UnitPowerConversion_type | Error_type; + +export default async function get_power_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_power_unit_conversion_params): Promise { + const url = `/unit/conversion/power/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_power_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_pressure_unit_conversion.ts b/src/api/unit/get_pressure_unit_conversion.ts new file mode 100644 index 0000000..724858e --- /dev/null +++ b/src/api/unit/get_pressure_unit_conversion.ts @@ -0,0 +1,41 @@ +import fetch from 'node-fetch'; +import { + UnitPressureConversion_type, + Error_type, + UnitPressureFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_pressure_unit_conversion_params { + client?: Client; + output_format: UnitPressureFormat_type; + src_format: UnitPressureFormat_type; + value: number; +} + +type Get_pressure_unit_conversion_return = + | UnitPressureConversion_type + | Error_type; + +export default async function get_pressure_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_pressure_unit_conversion_params): Promise { + const url = `/unit/conversion/pressure/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_pressure_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_radiation_unit_conversion.ts b/src/api/unit/get_radiation_unit_conversion.ts new file mode 100644 index 0000000..9b8038c --- /dev/null +++ b/src/api/unit/get_radiation_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitRadiationConversion_type, + Error_type, + UnitRadiationFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_radiation_unit_conversion_params { + client?: Client; + output_format: UnitRadiationFormat_type; + src_format: UnitRadiationFormat_type; + value: number; +} + +type Get_radiation_unit_conversion_return = + | UnitRadiationConversion_type + | Error_type; + +export default async function get_radiation_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_radiation_unit_conversion_params): Promise { + const url = `/unit/conversion/radiation/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_radiation_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_solid_angle_unit_conversion.ts b/src/api/unit/get_solid_angle_unit_conversion.ts new file mode 100644 index 0000000..ced03aa --- /dev/null +++ b/src/api/unit/get_solid_angle_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitSolidAngleConversion_type, + Error_type, + UnitSolidAngleFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_solid_angle_unit_conversion_params { + client?: Client; + output_format: UnitSolidAngleFormat_type; + src_format: UnitSolidAngleFormat_type; + value: number; +} + +type Get_solid_angle_unit_conversion_return = + | UnitSolidAngleConversion_type + | Error_type; + +export default async function get_solid_angle_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_solid_angle_unit_conversion_params): Promise { + const url = `/unit/conversion/solid-angle/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_solid_angle_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_temperature_unit_conversion.ts b/src/api/unit/get_temperature_unit_conversion.ts new file mode 100644 index 0000000..0c4f6e4 --- /dev/null +++ b/src/api/unit/get_temperature_unit_conversion.ts @@ -0,0 +1,42 @@ +import fetch from 'node-fetch'; +import { + UnitTemperatureConversion_type, + Error_type, + UnitTemperatureFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_temperature_unit_conversion_params { + client?: Client; + output_format: UnitTemperatureFormat_type; + src_format: UnitTemperatureFormat_type; + value: number; +} + +type Get_temperature_unit_conversion_return = + | UnitTemperatureConversion_type + | Error_type; + +export default async function get_temperature_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_temperature_unit_conversion_params): Promise { + const url = `/unit/conversion/temperature/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = + (await response.json()) as Get_temperature_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_time_unit_conversion.ts b/src/api/unit/get_time_unit_conversion.ts new file mode 100644 index 0000000..0b88e40 --- /dev/null +++ b/src/api/unit/get_time_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitTimeConversion_type, + Error_type, + UnitTimeFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_time_unit_conversion_params { + client?: Client; + output_format: UnitTimeFormat_type; + src_format: UnitTimeFormat_type; + value: number; +} + +type Get_time_unit_conversion_return = UnitTimeConversion_type | Error_type; + +export default async function get_time_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_time_unit_conversion_params): Promise { + const url = `/unit/conversion/time/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_time_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_velocity_unit_conversion.ts b/src/api/unit/get_velocity_unit_conversion.ts new file mode 100644 index 0000000..9b2f238 --- /dev/null +++ b/src/api/unit/get_velocity_unit_conversion.ts @@ -0,0 +1,41 @@ +import fetch from 'node-fetch'; +import { + UnitVelocityConversion_type, + Error_type, + UnitVelocityFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_velocity_unit_conversion_params { + client?: Client; + output_format: UnitVelocityFormat_type; + src_format: UnitVelocityFormat_type; + value: number; +} + +type Get_velocity_unit_conversion_return = + | UnitVelocityConversion_type + | Error_type; + +export default async function get_velocity_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_velocity_unit_conversion_params): Promise { + const url = `/unit/conversion/velocity/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_velocity_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_voltage_unit_conversion.ts b/src/api/unit/get_voltage_unit_conversion.ts new file mode 100644 index 0000000..9c9851e --- /dev/null +++ b/src/api/unit/get_voltage_unit_conversion.ts @@ -0,0 +1,41 @@ +import fetch from 'node-fetch'; +import { + UnitVoltageConversion_type, + Error_type, + UnitVoltageFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_voltage_unit_conversion_params { + client?: Client; + output_format: UnitVoltageFormat_type; + src_format: UnitVoltageFormat_type; + value: number; +} + +type Get_voltage_unit_conversion_return = + | UnitVoltageConversion_type + | Error_type; + +export default async function get_voltage_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_voltage_unit_conversion_params): Promise { + const url = `/unit/conversion/voltage/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_voltage_unit_conversion_return; + return result; +} diff --git a/src/api/unit/get_volume_unit_conversion.ts b/src/api/unit/get_volume_unit_conversion.ts new file mode 100644 index 0000000..b80ced1 --- /dev/null +++ b/src/api/unit/get_volume_unit_conversion.ts @@ -0,0 +1,39 @@ +import fetch from 'node-fetch'; +import { + UnitVolumeConversion_type, + Error_type, + UnitVolumeFormat_type, +} from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_volume_unit_conversion_params { + client?: Client; + output_format: UnitVolumeFormat_type; + src_format: UnitVolumeFormat_type; + value: number; +} + +type Get_volume_unit_conversion_return = UnitVolumeConversion_type | Error_type; + +export default async function get_volume_unit_conversion({ + client, + output_format, + src_format, + value, +}: Get_volume_unit_conversion_params): Promise { + const url = `/unit/conversion/volume/${src_format}/${output_format}?value=${value}`; + const fullUrl = 'https://api.kittycad.io' + url; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; + const headers = { + Authorization: `Bearer ${kittycadToken}`, + }; + const fetchOptions = { + method: 'GET', + headers, + }; + const response = await fetch(fullUrl, fetchOptions); + const result = (await response.json()) as Get_volume_unit_conversion_return; + return result; +} diff --git a/src/api/users/delete_user_self.ts b/src/api/users/delete_user_self.ts index f4eb16d..9fae439 100644 --- a/src/api/users/delete_user_self.ts +++ b/src/api/users/delete_user_self.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Delete_user_self_params { + client?: Client; +} type Delete_user_self_return = Error_type; -export default async function delete_user_self(): Promise { +export default async function delete_user_self({ + client, +}: Delete_user_self_params = {}): Promise { const url = `/user`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'DELETE', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/users/get_user.ts b/src/api/users/get_user.ts deleted file mode 100644 index 89fb536..0000000 --- a/src/api/users/get_user.ts +++ /dev/null @@ -1,26 +0,0 @@ -import fetch from 'node-fetch'; -import { User_type, Error_type } from '../../models.js'; - -interface Get_user_params { - id: string; -} - -type Get_user_return = User_type | Error_type; - -export default async function get_user({ - id, -}: Get_user_params): Promise { - const url = `/users/${id}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Get_user_return; - return result; -} diff --git a/src/api/users/get_user_extended.ts b/src/api/users/get_user_extended.ts deleted file mode 100644 index c1f690d..0000000 --- a/src/api/users/get_user_extended.ts +++ /dev/null @@ -1,26 +0,0 @@ -import fetch from 'node-fetch'; -import { ExtendedUser_type, Error_type } from '../../models.js'; - -interface Get_user_extended_params { - id: string; -} - -type Get_user_extended_return = ExtendedUser_type | Error_type; - -export default async function get_user_extended({ - id, -}: Get_user_extended_params): Promise { - const url = `/users-extended/${id}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as Get_user_extended_return; - return result; -} diff --git a/src/api/users/get_user_self.ts b/src/api/users/get_user_self.ts index 8251f8e..813af40 100644 --- a/src/api/users/get_user_self.ts +++ b/src/api/users/get_user_self.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { User_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_user_self_params { + client?: Client; +} type Get_user_self_return = User_type | Error_type; -export default async function get_user_self(): Promise { +export default async function get_user_self({ + client, +}: Get_user_self_params = {}): Promise { const url = `/user`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/users/get_user_self_extended.ts b/src/api/users/get_user_self_extended.ts index 044d26e..7542796 100644 --- a/src/api/users/get_user_self_extended.ts +++ b/src/api/users/get_user_self_extended.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { ExtendedUser_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Get_user_self_extended_params { + client?: Client; +} type Get_user_self_extended_return = ExtendedUser_type | Error_type; -export default async function get_user_self_extended(): Promise { +export default async function get_user_self_extended({ + client, +}: Get_user_self_extended_params = {}): Promise { const url = `/user/extended`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'GET', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/api/users/list_users.ts b/src/api/users/list_users.ts deleted file mode 100644 index a1e860b..0000000 --- a/src/api/users/list_users.ts +++ /dev/null @@ -1,30 +0,0 @@ -import fetch from 'node-fetch'; -import { UserResultsPage_type, Error_type } from '../../models.js'; - -interface List_users_params { - limit: string; - page_token: string; - sort_by: string; -} - -type List_users_return = UserResultsPage_type | Error_type; - -export default async function list_users({ - limit, - page_token, - sort_by, -}: List_users_params): Promise { - const url = `/users?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as List_users_return; - return result; -} diff --git a/src/api/users/list_users_extended.ts b/src/api/users/list_users_extended.ts deleted file mode 100644 index ce0c7c9..0000000 --- a/src/api/users/list_users_extended.ts +++ /dev/null @@ -1,30 +0,0 @@ -import fetch from 'node-fetch'; -import { ExtendedUserResultsPage_type, Error_type } from '../../models.js'; - -interface List_users_extended_params { - limit: string; - page_token: string; - sort_by: string; -} - -type List_users_extended_return = ExtendedUserResultsPage_type | Error_type; - -export default async function list_users_extended({ - limit, - page_token, - sort_by, -}: List_users_extended_params): Promise { - const url = `/users-extended?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`; - const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; - const headers = { - Authorization: `Bearer ${kittycadToken}`, - }; - const fetchOptions = { - method: 'POST', - headers, - }; - const response = await fetch(fullUrl, fetchOptions); - const result = (await response.json()) as List_users_extended_return; - return result; -} diff --git a/src/api/users/update_user_self.ts b/src/api/users/update_user_self.ts index b370ee3..f028abd 100644 --- a/src/api/users/update_user_self.ts +++ b/src/api/users/update_user_self.ts @@ -1,17 +1,26 @@ import fetch from 'node-fetch'; import { User_type, Error_type } from '../../models.js'; +import { Client } from '../../client.js'; + +interface Update_user_self_params { + client?: Client; +} type Update_user_self_return = User_type | Error_type; -export default async function update_user_self(): Promise { +export default async function update_user_self({ + client, +}: Update_user_self_params = {}): Promise { const url = `/user`; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || ''; + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; const fetchOptions = { - method: 'POST', + method: 'PUT', headers, }; const response = await fetch(fullUrl, fetchOptions); diff --git a/src/apiGen.ts b/src/apiGen.ts index 066302f..4198eef 100644 --- a/src/apiGen.ts +++ b/src/apiGen.ts @@ -1,11 +1,20 @@ import fsp from 'node:fs/promises'; import { OpenAPIV3 } from 'openapi-types'; +import { observe, generate } from 'fast-json-patch'; +import { format } from 'prettier'; export default async function apiGen(lookup: any) { const spec: OpenAPIV3.Document = JSON.parse( await fsp.readFile('./spec.json', 'utf8'), ); + const observer = observe(spec); const tags = spec.tags; + + await fsp.rmdir('./src/api', { recursive: true }); + await fsp.rmdir('./__tests__/gen', { recursive: true }); + + await fsp.mkdir(`./src/api`); + await fsp.mkdir(`./__tests__/gen`); await Promise.allSettled( tags.map(({ name }) => fsp.mkdir(`./src/api/${name}`)), ); @@ -28,6 +37,9 @@ export default async function apiGen(lookup: any) { if (!operationId) { throw `no operationId for ${path} ${method}`; } + if (methodValue.tags.includes('hidden')) { + return; + } operations[operationId] = { path, method, @@ -45,22 +57,59 @@ export default async function apiGen(lookup: any) { const writePromises = Object.entries(operations).map( async ([operationId, operation]) => { if ('hidden' === (operation.specSection as any).tags[0]) { - return; + return []; } - let template: string = await fsp.readFile( - './src/template.ts.txt', - 'utf8', - ); + let template: string = (await fsp.readFile('./src/template.md', 'utf8')) + .replaceAll('```typescript', '') + .replaceAll('```', ''); + let exampleTemplate: string = ( + await fsp.readFile('./src/exampleAndGenTestTemplate.md', 'utf8') + ) + .replaceAll('```typescript', '') + .replaceAll('```', ''); + + const importedParamTypes: string[] = []; const path = operation.path; const params = operation.specSection .parameters as OpenAPIV3.ParameterObject[]; template = template.replaceAll(',', ','); - const inputTypes: string[] = []; - const inputParams: string[] = []; + const inputTypes: string[] = ['client?: Client']; + const inputParams: string[] = ['client']; + const inputParamsExamples: string[] = []; let urlPathParams: string[] = path.split('/'); const urlQueryParams: string[] = []; - (params || []).forEach(({ name, in: _in }) => { - inputTypes.push(`${name}: string`); + (params || []).forEach(({ name, in: _in, schema }) => { + let _type = 'any'; + if ('$ref' in schema) { + const ref = schema.$ref; + _type = lookup[ref]; + importedParamTypes.push(_type); + const refName = ref.split('/').pop(); + const reffedSchema = spec.components.schemas[refName]; + if ('$ref' in reffedSchema) { + throw 'bad'; + } + if (reffedSchema.type === 'string' && reffedSchema.enum) { + if (operationId.includes('file') && name === 'input_format') { + inputParamsExamples.push(`${name}: 'obj'`); + } else if (name === 'output_format') { + inputParamsExamples.push(`${name}: '${reffedSchema.enum[0]}'`); + } else { + inputParamsExamples.push(`${name}: '${reffedSchema.enum[1]}'`); + } + } + } else { + if (schema.type === 'number' || schema.type === 'integer') { + _type = 'number'; + inputParamsExamples.push(`${name}: ${7}`); + } else if (schema.type === 'string' || schema.type === 'boolean') { + inputParamsExamples.push( + `${name}: ${schema.type === 'string' ? "'string'" : 'true'}`, + ); + _type = schema.type; + } + } + inputTypes.push(`${name}: ${_type}`); if (!name) { throw 'no name for param'; } @@ -92,18 +141,26 @@ export default async function apiGen(lookup: any) { } inputTypes.push('body: string'); inputParams.push('body'); + inputParamsExamples.push( + "body: await fsp.readFile('./example.obj', 'base64')", + ); + exampleTemplate = `import fsp from 'fs/promises';` + exampleTemplate; template = template.replaceAll("body: 'BODY'", 'body'); } else { template = template.replaceAll(/body: 'BODY'.+/g, ''); } - if (!inputParams.length) { + if (inputParams.length === 1) { template = replacer(template, [ - [/interface FunctionNameParams(.|\n)+?}/g, ''], - [/functionNameParams: FunctionNameParams.+/g, ''], + [ + 'functionNameParams: FunctionNameParams,', + 'functionNameParams: FunctionNameParams = {},', + ], + ]); + exampleTemplate = replacer(exampleTemplate, [ + [`{ param: 'param' }`, ''], ]); } - const importedTypes: string[] = []; Object.values(operation.specSection?.responses).forEach((response) => { const schema = (response as any)?.content?.['application/json'] @@ -138,7 +195,7 @@ export default async function apiGen(lookup: any) { throw 'not implemented'; } } else { - console.log(schema); + console.log('apiGen', schema); throw 'not implemented'; } }); @@ -155,13 +212,13 @@ export default async function apiGen(lookup: any) { `{${inputParams.filter((a) => a).join(', ')}}:`, ], [`exampleParam: string`, inputTypes.join('; ')], - ["method: 'METHOD'", `method: 'POST'`], + ["method: 'METHOD'", `method: '${operation.method.toUpperCase()}'`], ['function functionName', `function ${operationId}`], ['FunctionNameReturn', `${FC(operationId)}_return`], ['FunctionNameParams', `${FC(operationId)}_params`], [ "import * as types from './src/models.ts';", - `import {${importedTypes + `import {${[...new Set([...importedTypes, ...importedParamTypes])] .map((a) => (a || '').replaceAll('[', '').replaceAll(']', '')) .join(', ')}} from '../../models.js';`, ], @@ -169,6 +226,57 @@ export default async function apiGen(lookup: any) { const tag = operation.specSection?.tags?.[0] || 'err'; const safeTag = tag.replaceAll('-', '_'); + exampleTemplate = replacer(exampleTemplate, [ + [`param: 'param'`, inputParamsExamples.filter((a) => a).join(', ')], + ['{ api }', `{ ${safeTag} }`], + ['api.section', `${safeTag}.${operationId}`], + ]); + if ( + [ + 'payments.delete_payment_information_for_user', + 'users.delete_user_self', + 'file.get_file_conversion', + 'file.get_file_conversion_for_user', + 'api-calls.get_api_call_for_user', + 'api-calls.get_async_operation', + ].includes(`${tag.trim()}.${operationId.trim()}`) + ) { + // these test are expected to fail + exampleTemplate = replacer(exampleTemplate, [ + ['expect(await example()).toBeTruthy();', ''], + ]); + } else { + exampleTemplate = replacer(exampleTemplate, [ + [/try {(.|\n)+?}(.|\n)+?}/g, ''], + ]); + } + let genTest = exampleTemplate; + + genTest = replacer(genTest, [ + ['console.log(JSON.stringify(response, null, 2));', ''], + ]); + const genTestsWritePromise = fsp.writeFile( + `./__tests__/gen/${tag}-${operationId}.test.ts`, + genTest, + 'utf8', + ); + exampleTemplate = replacer(exampleTemplate, [ + ["from '../../src/index.js'", "from '@kittycad/lib'"], + [/describe\('Testing(.|\n)+?(}\);)(.|\n)+?(}\);)/g, ''], + [/.+return response;\n/g, ''], + ]); + spec.paths[operation.path][operation.method]['x-typescript'] = { + example: format(exampleTemplate, { + parser: 'babel', + tabWidth: 4, + semi: false, + singleQuote: true, + arrowParens: 'avoid', + trailingComma: 'es5', + }), + libDocsLink: '', + }; + if (!indexFile[safeTag]) { indexFile[safeTag] = { importsStr: [], @@ -179,14 +287,15 @@ export default async function apiGen(lookup: any) { `import ${operationId} from './api/${tag}/${operationId}.js';`, ); indexFile[safeTag].exportsStr.push(operationId); - return fsp.writeFile( + const libWritePromise = fsp.writeFile( `./src/api/${tag}/${operationId}.ts`, template, 'utf8', ); + return [genTestsWritePromise, libWritePromise]; }, ); - await Promise.all(writePromises); + await Promise.all(writePromises.flat()); let indexFileString = ''; // sorts are added to keep a consistent order since awaiting the promises has non-deterministic order Object.entries(indexFile) @@ -197,8 +306,37 @@ export default async function apiGen(lookup: any) { .sort() .join(', ')} };\n\n`; }); - indexFileString += `export type {Models} from './models.js';\n`; + indexFileString += `export type { Models } from './models.js';\n`; + indexFileString += `export { Client} from './client.js';\n`; await fsp.writeFile(`./src/index.ts`, indexFileString, 'utf8'); + spec.info['x-typescript'] = { + client: [ + `// Create a client with your token.`, + `async function ExampleWithClient() {`, + ` const client = new Client(process.env.KITTYCAD_TOKEN || '');`, + ` const response = await meta.ping({ client });`, + ` if ('error_code' in response) throw 'error';`, + ` console.log(response.message); // 'pong'`, + `}`, + ``, + `// - OR -`, + ``, + `// Your token will be parsed from the environment`, + `// variable: 'KITTYCAD_TOKEN'.`, + `async function ExampleWithOutClient() {`, + ` const response = await meta.ping();`, + ` if ('error_code' in response) throw 'error';`, + ` console.log(response.message); // 'pong'`, + `}`, + ].join('\n'), + install: 'npm install @kittycad/lib\n# or \n$ yarn add @kittycad/lib', + }; + const patch = generate(observer); + await fsp.writeFile( + `./kittycad.ts.patch.json`, + JSON.stringify(patch, null, 2), + 'utf8', + ); } function wrapInBacktics(str: string) { diff --git a/src/client.ts b/src/client.ts new file mode 100644 index 0000000..0c331b8 --- /dev/null +++ b/src/client.ts @@ -0,0 +1,5 @@ +export class Client { + constructor(readonly token: string) { + this.token = token; + } +} diff --git a/src/exampleAndGenTestTemplate.md b/src/exampleAndGenTestTemplate.md new file mode 100644 index 0000000..34ea2d4 --- /dev/null +++ b/src/exampleAndGenTestTemplate.md @@ -0,0 +1,21 @@ +```typescript +import { api } from '../../src/index.js'; + +async function example() { + const response = await api.section({ param: 'param' }); + if ('error_code' in response) throw response; + console.log(JSON.stringify(response, null, 2)); + return response; +} + +describe('Testing api.section', () => { + it('should be truthy or throw', async () => { + expect(await example()).toBeTruthy(); + try { + await example(); + } catch (err) { + expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect + } + }); +}); +``` diff --git a/src/index.ts b/src/index.ts index 9db334c..08e04d2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,19 +1,9 @@ -import get_api_call from './api/api-calls/get_api_call.js'; import get_api_call_for_user from './api/api-calls/get_api_call_for_user.js'; -import get_api_call_metrics from './api/api-calls/get_api_call_metrics.js'; import get_async_operation from './api/api-calls/get_async_operation.js'; -import list_api_calls from './api/api-calls/list_api_calls.js'; -import list_api_calls_for_user from './api/api-calls/list_api_calls_for_user.js'; -import list_async_operations from './api/api-calls/list_async_operations.js'; import user_list_api_calls from './api/api-calls/user_list_api_calls.js'; export const api_calls = { - get_api_call, get_api_call_for_user, - get_api_call_metrics, get_async_operation, - list_api_calls, - list_api_calls_for_user, - list_async_operations, user_list_api_calls, }; @@ -28,47 +18,32 @@ export const api_tokens = { list_api_tokens_for_user, }; +import get_physics_constant from './api/constant/get_physics_constant.js'; +export const constant = { get_physics_constant }; + import create_file_conversion from './api/file/create_file_conversion.js'; import create_file_density from './api/file/create_file_density.js'; -import create_file_execution from './api/file/create_file_execution.js'; import create_file_mass from './api/file/create_file_mass.js'; +import create_file_surface_area from './api/file/create_file_surface_area.js'; import create_file_volume from './api/file/create_file_volume.js'; import get_file_conversion from './api/file/get_file_conversion.js'; import get_file_conversion_for_user from './api/file/get_file_conversion_for_user.js'; export const file = { create_file_conversion, create_file_density, - create_file_execution, create_file_mass, + create_file_surface_area, create_file_volume, get_file_conversion, get_file_conversion_for_user, }; -import get_metadata from './api/meta/get_metadata.js'; import get_schema from './api/meta/get_schema.js'; import ping from './api/meta/ping.js'; -export const meta = { get_metadata, get_schema, ping }; - -import device_access_token from './api/oauth2/device_access_token.js'; -import device_auth_confirm from './api/oauth2/device_auth_confirm.js'; -import device_auth_request from './api/oauth2/device_auth_request.js'; -import device_auth_verify from './api/oauth2/device_auth_verify.js'; -import listen_oauth2_provider_callback from './api/oauth2/listen_oauth2_provider_callback.js'; -import listen_oauth2_provider_consent from './api/oauth2/listen_oauth2_provider_consent.js'; -export const oauth2 = { - device_access_token, - device_auth_confirm, - device_auth_request, - device_auth_verify, - listen_oauth2_provider_callback, - listen_oauth2_provider_consent, -}; +export const meta = { get_schema, ping }; import create_payment_information_for_user from './api/payments/create_payment_information_for_user.js'; -import create_payment_intent_for_user from './api/payments/create_payment_intent_for_user.js'; import delete_payment_information_for_user from './api/payments/delete_payment_information_for_user.js'; -import delete_payment_method_for_user from './api/payments/delete_payment_method_for_user.js'; import get_payment_balance_for_user from './api/payments/get_payment_balance_for_user.js'; import get_payment_information_for_user from './api/payments/get_payment_information_for_user.js'; import list_invoices_for_user from './api/payments/list_invoices_for_user.js'; @@ -76,9 +51,7 @@ import list_payment_methods_for_user from './api/payments/list_payment_methods_f import update_payment_information_for_user from './api/payments/update_payment_information_for_user.js'; export const payments = { create_payment_information_for_user, - create_payment_intent_for_user, delete_payment_information_for_user, - delete_payment_method_for_user, get_payment_balance_for_user, get_payment_information_for_user, list_invoices_for_user, @@ -89,26 +62,75 @@ export const payments = { import get_session_for_user from './api/sessions/get_session_for_user.js'; export const sessions = { get_session_for_user }; -import create_unit_conversion from './api/unit/create_unit_conversion.js'; -export const unit = { create_unit_conversion }; +import get_acceleration_unit_conversion from './api/unit/get_acceleration_unit_conversion.js'; +import get_angle_unit_conversion from './api/unit/get_angle_unit_conversion.js'; +import get_angular_velocity_unit_conversion from './api/unit/get_angular_velocity_unit_conversion.js'; +import get_area_unit_conversion from './api/unit/get_area_unit_conversion.js'; +import get_charge_unit_conversion from './api/unit/get_charge_unit_conversion.js'; +import get_concentration_unit_conversion from './api/unit/get_concentration_unit_conversion.js'; +import get_data_transfer_rate_unit_conversion from './api/unit/get_data_transfer_rate_unit_conversion.js'; +import get_data_unit_conversion from './api/unit/get_data_unit_conversion.js'; +import get_density_unit_conversion from './api/unit/get_density_unit_conversion.js'; +import get_energy_unit_conversion from './api/unit/get_energy_unit_conversion.js'; +import get_force_unit_conversion from './api/unit/get_force_unit_conversion.js'; +import get_illuminance_unit_conversion from './api/unit/get_illuminance_unit_conversion.js'; +import get_length_unit_conversion from './api/unit/get_length_unit_conversion.js'; +import get_magnetic_field_strength_unit_conversion from './api/unit/get_magnetic_field_strength_unit_conversion.js'; +import get_magnetic_flux_unit_conversion from './api/unit/get_magnetic_flux_unit_conversion.js'; +import get_mass_unit_conversion from './api/unit/get_mass_unit_conversion.js'; +import get_metric_power_cubed_unit_conversion from './api/unit/get_metric_power_cubed_unit_conversion.js'; +import get_metric_power_squared_unit_conversion from './api/unit/get_metric_power_squared_unit_conversion.js'; +import get_metric_power_unit_conversion from './api/unit/get_metric_power_unit_conversion.js'; +import get_power_unit_conversion from './api/unit/get_power_unit_conversion.js'; +import get_pressure_unit_conversion from './api/unit/get_pressure_unit_conversion.js'; +import get_radiation_unit_conversion from './api/unit/get_radiation_unit_conversion.js'; +import get_solid_angle_unit_conversion from './api/unit/get_solid_angle_unit_conversion.js'; +import get_temperature_unit_conversion from './api/unit/get_temperature_unit_conversion.js'; +import get_time_unit_conversion from './api/unit/get_time_unit_conversion.js'; +import get_velocity_unit_conversion from './api/unit/get_velocity_unit_conversion.js'; +import get_voltage_unit_conversion from './api/unit/get_voltage_unit_conversion.js'; +import get_volume_unit_conversion from './api/unit/get_volume_unit_conversion.js'; +export const unit = { + get_acceleration_unit_conversion, + get_angle_unit_conversion, + get_angular_velocity_unit_conversion, + get_area_unit_conversion, + get_charge_unit_conversion, + get_concentration_unit_conversion, + get_data_transfer_rate_unit_conversion, + get_data_unit_conversion, + get_density_unit_conversion, + get_energy_unit_conversion, + get_force_unit_conversion, + get_illuminance_unit_conversion, + get_length_unit_conversion, + get_magnetic_field_strength_unit_conversion, + get_magnetic_flux_unit_conversion, + get_mass_unit_conversion, + get_metric_power_cubed_unit_conversion, + get_metric_power_squared_unit_conversion, + get_metric_power_unit_conversion, + get_power_unit_conversion, + get_pressure_unit_conversion, + get_radiation_unit_conversion, + get_solid_angle_unit_conversion, + get_temperature_unit_conversion, + get_time_unit_conversion, + get_velocity_unit_conversion, + get_voltage_unit_conversion, + get_volume_unit_conversion, +}; import delete_user_self from './api/users/delete_user_self.js'; -import get_user from './api/users/get_user.js'; -import get_user_extended from './api/users/get_user_extended.js'; import get_user_self from './api/users/get_user_self.js'; import get_user_self_extended from './api/users/get_user_self_extended.js'; -import list_users from './api/users/list_users.js'; -import list_users_extended from './api/users/list_users_extended.js'; import update_user_self from './api/users/update_user_self.js'; export const users = { delete_user_self, - get_user, - get_user_extended, get_user_self, get_user_self_extended, - list_users, - list_users_extended, update_user_self, }; export type { Models } from './models.js'; +export { Client } from './client.js'; diff --git a/src/models.ts b/src/models.ts index 36c7dbb..c6d8573 100644 --- a/src/models.ts +++ b/src/models.ts @@ -2,21 +2,6 @@ export type AccountProvider_type = /* An account provider. */ 'google' | 'github'; -export interface Address_type { - city: string /* The city component. */; - country: string /* The country component. */; - /* format:date-time, title:DateTime, description:The time and date the address was created. */ - created_at: string; - id: Uuid_type /* The unique identifier of the address. */; - state: string /* The state component. */; - street1: string /* The first street component. */; - street2: string /* The second street component. */; - /* format:date-time, title:DateTime, description:The time and date the address was last updated. */ - updated_at: string; - user_id: string /* The user ID that this address belongs to. */; - zip: string /* The zip component. */; -} - export interface ApiCallQueryGroup_type { /*{ "format": "int64" @@ -61,6 +46,11 @@ export interface ApiCallWithPrice_type { "description": "The ip address of the origin." }*/ ip_address: string; + /*{ + "nullable": true, + "description": "If the API call was spawned from the litterbox or not." +}*/ + litterbox?: boolean; method: Method_type /* The HTTP method requsted by the API call. */; /*{ "format": "int32", @@ -135,6 +125,10 @@ export interface ApiTokenResultsPage_type { next_page?: string; } +export interface AppClientInfo_type { + url: string /* The URL for consent. */; +} + export interface AsyncApiCall_type { /*{ "format": "date-time", @@ -151,7 +145,7 @@ export interface AsyncApiCall_type { This is the same as the API call ID. */ id: Uuid_type; - input: string; + input: any; output?: string; /*{ "format": "date-time", @@ -318,6 +312,38 @@ This is the same as the API call ID. */ /* format:date-time, title:DateTime, description:The time and date the density was last updated. */ updated_at: string; user_id: string /* The user ID of the user who created the density. */; + } + | { + /*{ + "format": "date-time", + "nullable": true, + "title": "DateTime", + "description": "The time and date the density was completed." +}*/ + completed_at?: string; + /* format:date-time, title:DateTime, description:The time and date the density was created. */ + created_at: string; + /* nullable:true, description:The error the function returned, if any. */ + error?: string; + /* The unique identifier of the density request. + +This is the same as the API call ID. */ + id: Uuid_type; + src_format: FileSourceFormat_type /* The source format of the file. */; + /*{ + "format": "date-time", + "nullable": true, + "title": "DateTime", + "description": "The time and date the density was started." +}*/ + started_at?: string; + status: ApiCallStatus_type /* The status of the density. */; + /* format:double, nullable:true, description:The resulting surface area. */ + surface_area?: number; + type: 'FileSurfaceArea'; + /* format:date-time, title:DateTime, description:The time and date the density was last updated. */ + updated_at: string; + user_id: string /* The user ID of the user who created the density. */; }; export interface AsyncApiCallResultsPage_type { @@ -331,11 +357,15 @@ export interface AsyncApiCallResultsPage_type { export type AsyncApiCallType_type = /* The type of async API call. */ - 'FileConversion' | 'FileVolume' | 'FileMass' | 'FileDensity'; + | 'FileConversion' + | 'FileVolume' + | 'FileMass' + | 'FileDensity' + | 'FileSurfaceArea'; export interface BillingInfo_type { /* nullable:true, description:The address of the customer. */ - address: Address_type; + address: NewAddress_type; name: string /* The name of the customer. */; /*{ "default": "", @@ -668,7 +698,7 @@ For more details see { const url = 'string' + functionNameParams.exampleParam; const fullUrl = 'https://api.kittycad.io' + url; - const kittycadToken = process.env.KITTYCAD_TOKEN || '' + const kittycadToken = client + ? client.token + : process.env.KITTYCAD_TOKEN || ''; const headers = { Authorization: `Bearer ${kittycadToken}`, }; @@ -27,3 +31,4 @@ export default async function functionName( const result = (await response.json()) as FunctionNameReturn; return result; } +``` diff --git a/yarn.lock b/yarn.lock index 44bdc67..cd79ad3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2282,6 +2282,11 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-json-patch@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" + integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ== + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"