use envvar for base url as well as some other fixes, updating spec (#67)
* use envvar for base url as well as some other fixes, updating spec * Generated new lib --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
1
.github/workflows/CI.yml
vendored
1
.github/workflows/CI.yml
vendored
@ -24,6 +24,7 @@ jobs:
|
|||||||
- run: yarn test
|
- run: yarn test
|
||||||
env:
|
env:
|
||||||
KITTYCAD_TOKEN: ${{ secrets.KITTYCAD_TOKEN }}
|
KITTYCAD_TOKEN: ${{ secrets.KITTYCAD_TOKEN }}
|
||||||
|
BASE_URL: "https://dev.api.kittycad.io/"
|
||||||
- name: check for changes
|
- name: check for changes
|
||||||
id: git-check
|
id: git-check
|
||||||
run: |
|
run: |
|
||||||
|
@ -9,6 +9,10 @@ async function example() {
|
|||||||
|
|
||||||
describe('Testing api_tokens.create_api_token_for_user', () => {
|
describe('Testing api_tokens.create_api_token_for_user', () => {
|
||||||
it('should be truthy or throw', async () => {
|
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
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -3,7 +3,6 @@ import { file } from '../../src/index.js';
|
|||||||
|
|
||||||
async function example() {
|
async function example() {
|
||||||
const response = await file.create_file_center_of_mass({
|
const response = await file.create_file_center_of_mass({
|
||||||
material_density: 7,
|
|
||||||
src_format: 'obj',
|
src_format: 'obj',
|
||||||
body: await fsp.readFile('./example.obj', 'base64'),
|
body: await fsp.readFile('./example.obj', 'base64'),
|
||||||
});
|
});
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
o
|
o
|
||||||
|
|
||||||
# material
|
# material
|
||||||
mtllib ORIGINALVOXEL-3.mtl
|
|
||||||
usemtl palette
|
usemtl palette
|
||||||
|
|
||||||
# normals
|
# normals
|
||||||
|
@ -443,7 +443,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1file~1center-of-mass/post/x-typescript",
|
"path": "/paths/~1file~1center-of-mass/post/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import fsp from 'fs/promises'\nimport { file } from '@kittycad/lib'\n\nasync function example() {\n const response = await file.create_file_center_of_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",
|
"example": "import fsp from 'fs/promises'\nimport { file } from '@kittycad/lib'\n\nasync function example() {\n const response = await file.create_file_center_of_mass({\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": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
271
spec.json
271
spec.json
@ -709,12 +709,6 @@
|
|||||||
],
|
],
|
||||||
"description": "The unique identifier of the API call.\n\nThis is the same as the API call ID."
|
"description": "The unique identifier of the API call.\n\nThis is the same as the API call ID."
|
||||||
},
|
},
|
||||||
"material_density": {
|
|
||||||
"default": 0.0,
|
|
||||||
"description": "The material density as denoted by the user.",
|
|
||||||
"format": "float",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
@ -2492,7 +2486,7 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"ExtendedUser": {
|
"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, Front, and Zendesk.",
|
"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 Front",
|
||||||
"properties": {
|
"properties": {
|
||||||
"company": {
|
"company": {
|
||||||
"description": "The user's company.",
|
"description": "The user's company.",
|
||||||
@ -2573,11 +2567,6 @@
|
|||||||
"format": "date-time",
|
"format": "date-time",
|
||||||
"title": "DateTime",
|
"title": "DateTime",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
|
||||||
"zendesk_id": {
|
|
||||||
"description": "The user's Zendesk ID. This is mostly used for internal mapping.",
|
|
||||||
"nullable": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@ -2701,6 +2690,8 @@
|
|||||||
"enum": [
|
"enum": [
|
||||||
"dxf",
|
"dxf",
|
||||||
"json",
|
"json",
|
||||||
|
"png",
|
||||||
|
"ps",
|
||||||
"svg"
|
"svg"
|
||||||
],
|
],
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -2802,26 +2793,29 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"File3DExportFormat": {
|
"File3DExportFormat": {
|
||||||
"description": "The valid types of 3d output file formats.",
|
"description": "The valid types of 3d output file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file.",
|
||||||
"enum": [
|
"enum": [
|
||||||
"dae",
|
"dae",
|
||||||
"fbx",
|
"fbx",
|
||||||
"fbxb",
|
"fbxb",
|
||||||
"obj",
|
"obj",
|
||||||
"obj_nomtl",
|
"obj_nomtl",
|
||||||
|
"ply",
|
||||||
"step",
|
"step",
|
||||||
"stl"
|
"stl"
|
||||||
],
|
],
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"File3DImportFormat": {
|
"File3DImportFormat": {
|
||||||
"description": "The valid types of 3d source file formats.",
|
"description": "The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file.",
|
||||||
"enum": [
|
"enum": [
|
||||||
"dae",
|
"dae",
|
||||||
"dxf",
|
"dxf",
|
||||||
"fbx",
|
"fbx",
|
||||||
|
"obj_zip",
|
||||||
"obj",
|
"obj",
|
||||||
"obj_nomtl",
|
"obj_nomtl",
|
||||||
|
"ply",
|
||||||
"step",
|
"step",
|
||||||
"stl"
|
"stl"
|
||||||
],
|
],
|
||||||
@ -2865,12 +2859,6 @@
|
|||||||
],
|
],
|
||||||
"description": "The unique identifier of the API call.\n\nThis is the same as the API call ID."
|
"description": "The unique identifier of the API call.\n\nThis is the same as the API call ID."
|
||||||
},
|
},
|
||||||
"material_density": {
|
|
||||||
"default": 0.0,
|
|
||||||
"description": "The material density as denoted by the user.",
|
|
||||||
"format": "float",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
@ -3096,6 +3084,7 @@
|
|||||||
"json",
|
"json",
|
||||||
"obj",
|
"obj",
|
||||||
"obj_nomtl",
|
"obj_nomtl",
|
||||||
|
"ply",
|
||||||
"step",
|
"step",
|
||||||
"stl",
|
"stl",
|
||||||
"svg"
|
"svg"
|
||||||
@ -3108,8 +3097,10 @@
|
|||||||
"dae",
|
"dae",
|
||||||
"dxf",
|
"dxf",
|
||||||
"fbx",
|
"fbx",
|
||||||
|
"obj_zip",
|
||||||
"obj",
|
"obj",
|
||||||
"obj_nomtl",
|
"obj_nomtl",
|
||||||
|
"ply",
|
||||||
"step",
|
"step",
|
||||||
"stl",
|
"stl",
|
||||||
"svg"
|
"svg"
|
||||||
@ -3403,6 +3394,14 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"ImageType": {
|
||||||
|
"description": "An enumeration.",
|
||||||
|
"enum": [
|
||||||
|
"png",
|
||||||
|
"jpg"
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"IndexInfo": {
|
"IndexInfo": {
|
||||||
"description": "IndexInfo contains information about a registry.",
|
"description": "IndexInfo contains information about a registry.",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -3828,6 +3827,17 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"Mesh": {
|
||||||
|
"properties": {
|
||||||
|
"mesh": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"mesh"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"MetaClusterInfo": {
|
"MetaClusterInfo": {
|
||||||
"description": "Jetstream statistics.",
|
"description": "Jetstream statistics.",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -3897,6 +3907,14 @@
|
|||||||
"description": "The git hash of the server.",
|
"description": "The git hash of the server.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"point_e": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/PointEMetadata"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Metadata about our point-e instance."
|
||||||
|
},
|
||||||
"pubsub": {
|
"pubsub": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
@ -3913,6 +3931,7 @@
|
|||||||
"executor",
|
"executor",
|
||||||
"fs",
|
"fs",
|
||||||
"git_hash",
|
"git_hash",
|
||||||
|
"point_e",
|
||||||
"pubsub"
|
"pubsub"
|
||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
@ -4269,6 +4288,19 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"PointEMetadata": {
|
||||||
|
"description": "Metadata about our point-e instance.\n\nThis is mostly used for internal purposes and debugging.",
|
||||||
|
"properties": {
|
||||||
|
"ok": {
|
||||||
|
"description": "If the point-e service returned an ok response from ping.",
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"ok"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"Pong": {
|
"Pong": {
|
||||||
"description": "The response from the `/ping` endpoint.",
|
"description": "The response from the `/ping` endpoint.",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -7777,6 +7809,187 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/ai/image-to-3d/{input_format}/{output_format}": {
|
||||||
|
"post": {
|
||||||
|
"operationId": "create_image_to_3d",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "The format of the image being converted.",
|
||||||
|
"in": "path",
|
||||||
|
"name": "input_format",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ImageType"
|
||||||
|
},
|
||||||
|
"style": "simple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The format the output file should be converted to.",
|
||||||
|
"in": "path",
|
||||||
|
"name": "output_format",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/FileExportFormat"
|
||||||
|
},
|
||||||
|
"style": "simple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/octet-stream": {
|
||||||
|
"schema": {
|
||||||
|
"format": "binary",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Mesh"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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": "Generate a 3D model from an image.",
|
||||||
|
"tags": [
|
||||||
|
"ai",
|
||||||
|
"beta",
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/ai/text-to-3d/{output_format}": {
|
||||||
|
"post": {
|
||||||
|
"operationId": "create_text_to_3d",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "The format the output file should be converted to.",
|
||||||
|
"in": "path",
|
||||||
|
"name": "output_format",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/FileExportFormat"
|
||||||
|
},
|
||||||
|
"style": "simple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The prompt for the model.",
|
||||||
|
"in": "query",
|
||||||
|
"name": "prompt",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"style": "form"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Mesh"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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": "Generate a 3D model from text.",
|
||||||
|
"tags": [
|
||||||
|
"ai",
|
||||||
|
"beta",
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api-call-metrics": {
|
"/api-call-metrics": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.",
|
"description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.",
|
||||||
@ -8888,17 +9101,6 @@
|
|||||||
"description": "Get the center of 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.",
|
"description": "Get the center of 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_center_of_mass",
|
"operationId": "create_file_center_of_mass",
|
||||||
"parameters": [
|
"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.",
|
"description": "The format of the file.",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
@ -15199,6 +15401,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tags": [
|
"tags": [
|
||||||
|
{
|
||||||
|
"description": "AI uses machine learning to generate 3D meshes.",
|
||||||
|
"externalDocs": {
|
||||||
|
"url": "https://docs.kittycad.io/api/ai"
|
||||||
|
},
|
||||||
|
"name": "ai"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.",
|
"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": {
|
"externalDocs": {
|
||||||
|
@ -14,7 +14,8 @@ export default async function get_api_call_for_user({
|
|||||||
id,
|
id,
|
||||||
}: Get_api_call_for_user_params): Promise<Get_api_call_for_user_return> {
|
}: Get_api_call_for_user_params): Promise<Get_api_call_for_user_return> {
|
||||||
const url = `/user/api-calls/${id}`;
|
const url = `/user/api-calls/${id}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -14,7 +14,8 @@ export default async function get_async_operation({
|
|||||||
id,
|
id,
|
||||||
}: Get_async_operation_params): Promise<Get_async_operation_return> {
|
}: Get_async_operation_params): Promise<Get_async_operation_return> {
|
||||||
const url = `/async/operations/${id}`;
|
const url = `/async/operations/${id}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function user_list_api_calls({
|
|||||||
sort_by,
|
sort_by,
|
||||||
}: User_list_api_calls_params): Promise<User_list_api_calls_return> {
|
}: User_list_api_calls_params): Promise<User_list_api_calls_return> {
|
||||||
const url = `/user/api-calls?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`;
|
const url = `/user/api-calls?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function create_api_token_for_user({
|
|||||||
client,
|
client,
|
||||||
}: Create_api_token_for_user_params = {}): Promise<Create_api_token_for_user_return> {
|
}: Create_api_token_for_user_params = {}): Promise<Create_api_token_for_user_return> {
|
||||||
const url = `/user/api-tokens`;
|
const url = `/user/api-tokens`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -14,7 +14,8 @@ export default async function delete_api_token_for_user({
|
|||||||
token,
|
token,
|
||||||
}: Delete_api_token_for_user_params): Promise<Delete_api_token_for_user_return> {
|
}: Delete_api_token_for_user_params): Promise<Delete_api_token_for_user_return> {
|
||||||
const url = `/user/api-tokens/${token}`;
|
const url = `/user/api-tokens/${token}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -14,7 +14,8 @@ export default async function get_api_token_for_user({
|
|||||||
token,
|
token,
|
||||||
}: Get_api_token_for_user_params): Promise<Get_api_token_for_user_return> {
|
}: Get_api_token_for_user_params): Promise<Get_api_token_for_user_return> {
|
||||||
const url = `/user/api-tokens/${token}`;
|
const url = `/user/api-tokens/${token}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function list_api_tokens_for_user({
|
|||||||
sort_by,
|
sort_by,
|
||||||
}: List_api_tokens_for_user_params): Promise<List_api_tokens_for_user_return> {
|
}: List_api_tokens_for_user_params): Promise<List_api_tokens_for_user_return> {
|
||||||
const url = `/user/api-tokens?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`;
|
const url = `/user/api-tokens?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -18,7 +18,8 @@ export default async function get_physics_constant({
|
|||||||
constant,
|
constant,
|
||||||
}: Get_physics_constant_params): Promise<Get_physics_constant_return> {
|
}: Get_physics_constant_params): Promise<Get_physics_constant_return> {
|
||||||
const url = `/constant/physics/${constant}`;
|
const url = `/constant/physics/${constant}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -25,7 +25,8 @@ export default async function create_file_2d_vector_conversion({
|
|||||||
body,
|
body,
|
||||||
}: Create_file_2d_vector_conversion_params): Promise<Create_file_2d_vector_conversion_return> {
|
}: Create_file_2d_vector_conversion_params): Promise<Create_file_2d_vector_conversion_return> {
|
||||||
const url = `/file/2d/vector/conversion/${src_format}/${output_format}`;
|
const url = `/file/2d/vector/conversion/${src_format}/${output_format}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -23,7 +23,8 @@ export default async function create_file_3d_conversion({
|
|||||||
body,
|
body,
|
||||||
}: Create_file_3d_conversion_params): Promise<Create_file_3d_conversion_return> {
|
}: Create_file_3d_conversion_params): Promise<Create_file_3d_conversion_return> {
|
||||||
const url = `/file/3d/conversion/${src_format}/${output_format}`;
|
const url = `/file/3d/conversion/${src_format}/${output_format}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -8,7 +8,6 @@ import { Client } from '../../client.js';
|
|||||||
|
|
||||||
interface Create_file_center_of_mass_params {
|
interface Create_file_center_of_mass_params {
|
||||||
client?: Client;
|
client?: Client;
|
||||||
material_density: number;
|
|
||||||
src_format: File3DImportFormat_type;
|
src_format: File3DImportFormat_type;
|
||||||
body: string;
|
body: string;
|
||||||
}
|
}
|
||||||
@ -17,12 +16,12 @@ type Create_file_center_of_mass_return = FileCenterOfMass_type | Error_type;
|
|||||||
|
|
||||||
export default async function create_file_center_of_mass({
|
export default async function create_file_center_of_mass({
|
||||||
client,
|
client,
|
||||||
material_density,
|
|
||||||
src_format,
|
src_format,
|
||||||
body,
|
body,
|
||||||
}: Create_file_center_of_mass_params): Promise<Create_file_center_of_mass_return> {
|
}: Create_file_center_of_mass_params): Promise<Create_file_center_of_mass_return> {
|
||||||
const url = `/file/center-of-mass?material_density=${material_density}&src_format=${src_format}`;
|
const url = `/file/center-of-mass?src_format=${src_format}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -23,7 +23,8 @@ export default async function create_file_conversion({
|
|||||||
body,
|
body,
|
||||||
}: Create_file_conversion_params): Promise<Create_file_conversion_return> {
|
}: Create_file_conversion_params): Promise<Create_file_conversion_return> {
|
||||||
const url = `/file/conversion/${src_format}/${output_format}`;
|
const url = `/file/conversion/${src_format}/${output_format}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function create_file_density({
|
|||||||
body,
|
body,
|
||||||
}: Create_file_density_params): Promise<Create_file_density_return> {
|
}: Create_file_density_params): Promise<Create_file_density_return> {
|
||||||
const url = `/file/density?material_mass=${material_mass}&src_format=${src_format}`;
|
const url = `/file/density?material_mass=${material_mass}&src_format=${src_format}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function create_file_mass({
|
|||||||
body,
|
body,
|
||||||
}: Create_file_mass_params): Promise<Create_file_mass_return> {
|
}: Create_file_mass_params): Promise<Create_file_mass_return> {
|
||||||
const url = `/file/mass?material_density=${material_density}&src_format=${src_format}`;
|
const url = `/file/mass?material_density=${material_density}&src_format=${src_format}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -20,7 +20,8 @@ export default async function create_file_surface_area({
|
|||||||
body,
|
body,
|
||||||
}: Create_file_surface_area_params): Promise<Create_file_surface_area_return> {
|
}: Create_file_surface_area_params): Promise<Create_file_surface_area_return> {
|
||||||
const url = `/file/surface-area?src_format=${src_format}`;
|
const url = `/file/surface-area?src_format=${src_format}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -20,7 +20,8 @@ export default async function create_file_volume({
|
|||||||
body,
|
body,
|
||||||
}: Create_file_volume_params): Promise<Create_file_volume_return> {
|
}: Create_file_volume_params): Promise<Create_file_volume_return> {
|
||||||
const url = `/file/volume?src_format=${src_format}`;
|
const url = `/file/volume?src_format=${src_format}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -14,7 +14,8 @@ export default async function get_file_conversion({
|
|||||||
id,
|
id,
|
||||||
}: Get_file_conversion_params): Promise<Get_file_conversion_return> {
|
}: Get_file_conversion_params): Promise<Get_file_conversion_return> {
|
||||||
const url = `/file/conversions/${id}`;
|
const url = `/file/conversions/${id}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -14,7 +14,8 @@ export default async function get_file_conversion_for_user({
|
|||||||
id,
|
id,
|
||||||
}: Get_file_conversion_for_user_params): Promise<Get_file_conversion_for_user_return> {
|
}: Get_file_conversion_for_user_params): Promise<Get_file_conversion_for_user_return> {
|
||||||
const url = `/user/file/conversions/${id}`;
|
const url = `/user/file/conversions/${id}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function get_schema({
|
|||||||
client,
|
client,
|
||||||
}: Get_schema_params = {}): Promise<Get_schema_return> {
|
}: Get_schema_params = {}): Promise<Get_schema_return> {
|
||||||
const url = `/`;
|
const url = `/`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function ping({
|
|||||||
client,
|
client,
|
||||||
}: Ping_params = {}): Promise<Ping_return> {
|
}: Ping_params = {}): Promise<Ping_return> {
|
||||||
const url = `/ping`;
|
const url = `/ping`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function create_payment_information_for_user({
|
|||||||
client,
|
client,
|
||||||
}: Create_payment_information_for_user_params = {}): Promise<Create_payment_information_for_user_return> {
|
}: Create_payment_information_for_user_params = {}): Promise<Create_payment_information_for_user_return> {
|
||||||
const url = `/user/payment`;
|
const url = `/user/payment`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function delete_payment_information_for_user({
|
|||||||
client,
|
client,
|
||||||
}: Delete_payment_information_for_user_params = {}): Promise<Delete_payment_information_for_user_return> {
|
}: Delete_payment_information_for_user_params = {}): Promise<Delete_payment_information_for_user_return> {
|
||||||
const url = `/user/payment`;
|
const url = `/user/payment`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function get_payment_balance_for_user({
|
|||||||
client,
|
client,
|
||||||
}: Get_payment_balance_for_user_params = {}): Promise<Get_payment_balance_for_user_return> {
|
}: Get_payment_balance_for_user_params = {}): Promise<Get_payment_balance_for_user_return> {
|
||||||
const url = `/user/payment/balance`;
|
const url = `/user/payment/balance`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function get_payment_information_for_user({
|
|||||||
client,
|
client,
|
||||||
}: Get_payment_information_for_user_params = {}): Promise<Get_payment_information_for_user_return> {
|
}: Get_payment_information_for_user_params = {}): Promise<Get_payment_information_for_user_return> {
|
||||||
const url = `/user/payment`;
|
const url = `/user/payment`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function list_invoices_for_user({
|
|||||||
client,
|
client,
|
||||||
}: List_invoices_for_user_params = {}): Promise<List_invoices_for_user_return> {
|
}: List_invoices_for_user_params = {}): Promise<List_invoices_for_user_return> {
|
||||||
const url = `/user/payment/invoices`;
|
const url = `/user/payment/invoices`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function list_payment_methods_for_user({
|
|||||||
client,
|
client,
|
||||||
}: List_payment_methods_for_user_params = {}): Promise<List_payment_methods_for_user_return> {
|
}: List_payment_methods_for_user_params = {}): Promise<List_payment_methods_for_user_return> {
|
||||||
const url = `/user/payment/methods`;
|
const url = `/user/payment/methods`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function update_payment_information_for_user({
|
|||||||
client,
|
client,
|
||||||
}: Update_payment_information_for_user_params = {}): Promise<Update_payment_information_for_user_return> {
|
}: Update_payment_information_for_user_params = {}): Promise<Update_payment_information_for_user_return> {
|
||||||
const url = `/user/payment`;
|
const url = `/user/payment`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -14,7 +14,8 @@ export default async function get_session_for_user({
|
|||||||
token,
|
token,
|
||||||
}: Get_session_for_user_params): Promise<Get_session_for_user_return> {
|
}: Get_session_for_user_params): Promise<Get_session_for_user_return> {
|
||||||
const url = `/user/session/${token}`;
|
const url = `/user/session/${token}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_acceleration_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_acceleration_unit_conversion_params): Promise<Get_acceleration_unit_conversion_return> {
|
}: Get_acceleration_unit_conversion_params): Promise<Get_acceleration_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/acceleration/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/acceleration/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_angle_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_angle_unit_conversion_params): Promise<Get_angle_unit_conversion_return> {
|
}: Get_angle_unit_conversion_params): Promise<Get_angle_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/angle/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/angle/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_angular_velocity_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_angular_velocity_unit_conversion_params): Promise<Get_angular_velocity_unit_conversion_return> {
|
}: Get_angular_velocity_unit_conversion_params): Promise<Get_angular_velocity_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/angular-velocity/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/angular-velocity/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_area_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_area_unit_conversion_params): Promise<Get_area_unit_conversion_return> {
|
}: Get_area_unit_conversion_params): Promise<Get_area_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/area/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/area/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_charge_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_charge_unit_conversion_params): Promise<Get_charge_unit_conversion_return> {
|
}: Get_charge_unit_conversion_params): Promise<Get_charge_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/charge/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/charge/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_concentration_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_concentration_unit_conversion_params): Promise<Get_concentration_unit_conversion_return> {
|
}: Get_concentration_unit_conversion_params): Promise<Get_concentration_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/concentration/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/concentration/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_data_transfer_rate_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_data_transfer_rate_unit_conversion_params): Promise<Get_data_transfer_rate_unit_conversion_return> {
|
}: Get_data_transfer_rate_unit_conversion_params): Promise<Get_data_transfer_rate_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/data-transfer-rate/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/data-transfer-rate/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_data_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_data_unit_conversion_params): Promise<Get_data_unit_conversion_return> {
|
}: Get_data_unit_conversion_params): Promise<Get_data_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/data/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/data/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_density_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_density_unit_conversion_params): Promise<Get_density_unit_conversion_return> {
|
}: Get_density_unit_conversion_params): Promise<Get_density_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/density/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/density/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_energy_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_energy_unit_conversion_params): Promise<Get_energy_unit_conversion_return> {
|
}: Get_energy_unit_conversion_params): Promise<Get_energy_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/energy/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/energy/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_force_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_force_unit_conversion_params): Promise<Get_force_unit_conversion_return> {
|
}: Get_force_unit_conversion_params): Promise<Get_force_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/force/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/force/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_illuminance_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_illuminance_unit_conversion_params): Promise<Get_illuminance_unit_conversion_return> {
|
}: Get_illuminance_unit_conversion_params): Promise<Get_illuminance_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/illuminance/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/illuminance/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_length_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_length_unit_conversion_params): Promise<Get_length_unit_conversion_return> {
|
}: Get_length_unit_conversion_params): Promise<Get_length_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/length/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/length/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_magnetic_field_strength_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_magnetic_field_strength_unit_conversion_params): Promise<Get_magnetic_field_strength_unit_conversion_return> {
|
}: Get_magnetic_field_strength_unit_conversion_params): Promise<Get_magnetic_field_strength_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/magnetic-field-strength/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/magnetic-field-strength/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_magnetic_flux_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_magnetic_flux_unit_conversion_params): Promise<Get_magnetic_flux_unit_conversion_return> {
|
}: Get_magnetic_flux_unit_conversion_params): Promise<Get_magnetic_flux_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/magnetic-flux/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/magnetic-flux/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_mass_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_mass_unit_conversion_params): Promise<Get_mass_unit_conversion_return> {
|
}: Get_mass_unit_conversion_params): Promise<Get_mass_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/mass/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/mass/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_metric_power_cubed_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_metric_power_cubed_unit_conversion_params): Promise<Get_metric_power_cubed_unit_conversion_return> {
|
}: Get_metric_power_cubed_unit_conversion_params): Promise<Get_metric_power_cubed_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/metric/cubed/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/metric/cubed/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_metric_power_squared_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_metric_power_squared_unit_conversion_params): Promise<Get_metric_power_squared_unit_conversion_return> {
|
}: Get_metric_power_squared_unit_conversion_params): Promise<Get_metric_power_squared_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/metric/squared/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/metric/squared/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_metric_power_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_metric_power_unit_conversion_params): Promise<Get_metric_power_unit_conversion_return> {
|
}: Get_metric_power_unit_conversion_params): Promise<Get_metric_power_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/metric/power/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/metric/power/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_power_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_power_unit_conversion_params): Promise<Get_power_unit_conversion_return> {
|
}: Get_power_unit_conversion_params): Promise<Get_power_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/power/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/power/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_pressure_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_pressure_unit_conversion_params): Promise<Get_pressure_unit_conversion_return> {
|
}: Get_pressure_unit_conversion_params): Promise<Get_pressure_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/pressure/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/pressure/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_radiation_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_radiation_unit_conversion_params): Promise<Get_radiation_unit_conversion_return> {
|
}: Get_radiation_unit_conversion_params): Promise<Get_radiation_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/radiation/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/radiation/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_radioactivity_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_radioactivity_unit_conversion_params): Promise<Get_radioactivity_unit_conversion_return> {
|
}: Get_radioactivity_unit_conversion_params): Promise<Get_radioactivity_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/radioactivity/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/radioactivity/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_solid_angle_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_solid_angle_unit_conversion_params): Promise<Get_solid_angle_unit_conversion_return> {
|
}: Get_solid_angle_unit_conversion_params): Promise<Get_solid_angle_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/solid-angle/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/solid-angle/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_temperature_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_temperature_unit_conversion_params): Promise<Get_temperature_unit_conversion_return> {
|
}: Get_temperature_unit_conversion_params): Promise<Get_temperature_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/temperature/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/temperature/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_time_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_time_unit_conversion_params): Promise<Get_time_unit_conversion_return> {
|
}: Get_time_unit_conversion_params): Promise<Get_time_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/time/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/time/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_velocity_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_velocity_unit_conversion_params): Promise<Get_velocity_unit_conversion_return> {
|
}: Get_velocity_unit_conversion_params): Promise<Get_velocity_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/velocity/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/velocity/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -24,7 +24,8 @@ export default async function get_voltage_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_voltage_unit_conversion_params): Promise<Get_voltage_unit_conversion_return> {
|
}: Get_voltage_unit_conversion_params): Promise<Get_voltage_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/voltage/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/voltage/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -22,7 +22,8 @@ export default async function get_volume_unit_conversion({
|
|||||||
value,
|
value,
|
||||||
}: Get_volume_unit_conversion_params): Promise<Get_volume_unit_conversion_return> {
|
}: Get_volume_unit_conversion_params): Promise<Get_volume_unit_conversion_return> {
|
||||||
const url = `/unit/conversion/volume/${src_format}/${output_format}?value=${value}`;
|
const url = `/unit/conversion/volume/${src_format}/${output_format}?value=${value}`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function delete_user_self({
|
|||||||
client,
|
client,
|
||||||
}: Delete_user_self_params = {}): Promise<Delete_user_self_return> {
|
}: Delete_user_self_params = {}): Promise<Delete_user_self_return> {
|
||||||
const url = `/user`;
|
const url = `/user`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function get_user_self({
|
|||||||
client,
|
client,
|
||||||
}: Get_user_self_params = {}): Promise<Get_user_self_return> {
|
}: Get_user_self_params = {}): Promise<Get_user_self_return> {
|
||||||
const url = `/user`;
|
const url = `/user`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function get_user_self_extended({
|
|||||||
client,
|
client,
|
||||||
}: Get_user_self_extended_params = {}): Promise<Get_user_self_extended_return> {
|
}: Get_user_self_extended_params = {}): Promise<Get_user_self_extended_return> {
|
||||||
const url = `/user/extended`;
|
const url = `/user/extended`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -12,7 +12,8 @@ export default async function update_user_self({
|
|||||||
client,
|
client,
|
||||||
}: Update_user_self_params = {}): Promise<Update_user_self_return> {
|
}: Update_user_self_params = {}): Promise<Update_user_self_return> {
|
||||||
const url = `/user`;
|
const url = `/user`;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
@ -241,6 +241,8 @@ export default async function apiGen(lookup: any) {
|
|||||||
['api.section', `${safeTag}.${operationId}`],
|
['api.section', `${safeTag}.${operationId}`],
|
||||||
]);
|
]);
|
||||||
if (
|
if (
|
||||||
|
// definitely a bit of a hack, these should probably be fixed,
|
||||||
|
// or at the very least checked periodically.
|
||||||
[
|
[
|
||||||
'payments.delete_payment_information_for_user',
|
'payments.delete_payment_information_for_user',
|
||||||
'users.delete_user_self',
|
'users.delete_user_self',
|
||||||
@ -248,6 +250,7 @@ export default async function apiGen(lookup: any) {
|
|||||||
'file.get_file_conversion_for_user',
|
'file.get_file_conversion_for_user',
|
||||||
'api-calls.get_api_call_for_user',
|
'api-calls.get_api_call_for_user',
|
||||||
'api-calls.get_async_operation',
|
'api-calls.get_async_operation',
|
||||||
|
'api-tokens.create_api_token_for_user',
|
||||||
].includes(`${tag.trim()}.${operationId.trim()}`)
|
].includes(`${tag.trim()}.${operationId.trim()}`)
|
||||||
) {
|
) {
|
||||||
// these test are expected to fail
|
// these test are expected to fail
|
||||||
|
@ -301,8 +301,6 @@ This is the same as the API call ID. */
|
|||||||
|
|
||||||
This is the same as the API call ID. */
|
This is the same as the API call ID. */
|
||||||
id: Uuid_type;
|
id: Uuid_type;
|
||||||
/* default:0, format:float, description:The material density as denoted by the user. */
|
|
||||||
material_density: number;
|
|
||||||
src_format: File3DImportFormat_type /* The source format of the file. */;
|
src_format: File3DImportFormat_type /* The source format of the file. */;
|
||||||
/*{
|
/*{
|
||||||
"format": "date-time",
|
"format": "date-time",
|
||||||
@ -1214,11 +1212,6 @@ export interface ExtendedUser_type {
|
|||||||
stripe_id?: string;
|
stripe_id?: string;
|
||||||
/* format:date-time, title:DateTime, description:The date and time the user was last updated. */
|
/* format:date-time, title:DateTime, description:The date and time the user was last updated. */
|
||||||
updated_at: string;
|
updated_at: string;
|
||||||
/*{
|
|
||||||
"nullable": true,
|
|
||||||
"description": "The user's Zendesk ID. This is mostly used for internal mapping."
|
|
||||||
}*/
|
|
||||||
zendesk_id?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExtendedUserResultsPage_type {
|
export interface ExtendedUserResultsPage_type {
|
||||||
@ -1270,7 +1263,7 @@ This is the same as the API call ID. */
|
|||||||
|
|
||||||
export type File2DVectorExportFormat_type =
|
export type File2DVectorExportFormat_type =
|
||||||
/* The valid types of Vector output file formats. */
|
/* The valid types of Vector output file formats. */
|
||||||
'dxf' | 'json' | 'svg';
|
'dxf' | 'json' | 'png' | 'ps' | 'svg';
|
||||||
|
|
||||||
export type File2DVectorImportFormat_type =
|
export type File2DVectorImportFormat_type =
|
||||||
/* The valid types of Vector source file formats. */
|
/* The valid types of Vector source file formats. */
|
||||||
@ -1315,12 +1308,20 @@ This is the same as the API call ID. */
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type File3DExportFormat_type =
|
export type File3DExportFormat_type =
|
||||||
/* The valid types of 3d output file formats. */
|
/* The valid types of 3d output file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. */
|
||||||
'dae' | 'fbx' | 'fbxb' | 'obj' | 'obj_nomtl' | 'step' | 'stl';
|
'dae' | 'fbx' | 'fbxb' | 'obj' | 'obj_nomtl' | 'ply' | 'step' | 'stl';
|
||||||
|
|
||||||
export type File3DImportFormat_type =
|
export type File3DImportFormat_type =
|
||||||
/* The valid types of 3d source file formats. */
|
/* The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. */
|
||||||
'dae' | 'dxf' | 'fbx' | 'obj' | 'obj_nomtl' | 'step' | 'stl';
|
| 'dae'
|
||||||
|
| 'dxf'
|
||||||
|
| 'fbx'
|
||||||
|
| 'obj_zip'
|
||||||
|
| 'obj'
|
||||||
|
| 'obj_nomtl'
|
||||||
|
| 'ply'
|
||||||
|
| 'step'
|
||||||
|
| 'stl';
|
||||||
|
|
||||||
export interface FileCenterOfMass_type {
|
export interface FileCenterOfMass_type {
|
||||||
/*{
|
/*{
|
||||||
@ -1342,8 +1343,6 @@ export interface FileCenterOfMass_type {
|
|||||||
|
|
||||||
This is the same as the API call ID. */
|
This is the same as the API call ID. */
|
||||||
id: Uuid_type;
|
id: Uuid_type;
|
||||||
/* default:0, format:float, description:The material density as denoted by the user. */
|
|
||||||
material_density: number;
|
|
||||||
src_format: File3DImportFormat_type /* The source format of the file. */;
|
src_format: File3DImportFormat_type /* The source format of the file. */;
|
||||||
/*{
|
/*{
|
||||||
"format": "date-time",
|
"format": "date-time",
|
||||||
@ -1439,13 +1438,23 @@ export type FileExportFormat_type =
|
|||||||
| 'json'
|
| 'json'
|
||||||
| 'obj'
|
| 'obj'
|
||||||
| 'obj_nomtl'
|
| 'obj_nomtl'
|
||||||
|
| 'ply'
|
||||||
| 'step'
|
| 'step'
|
||||||
| 'stl'
|
| 'stl'
|
||||||
| 'svg';
|
| 'svg';
|
||||||
|
|
||||||
export type FileImportFormat_type =
|
export type FileImportFormat_type =
|
||||||
/* The valid types of source file formats. */
|
/* The valid types of source file formats. */
|
||||||
'dae' | 'dxf' | 'fbx' | 'obj' | 'obj_nomtl' | 'step' | 'stl' | 'svg';
|
| 'dae'
|
||||||
|
| 'dxf'
|
||||||
|
| 'fbx'
|
||||||
|
| 'obj_zip'
|
||||||
|
| 'obj'
|
||||||
|
| 'obj_nomtl'
|
||||||
|
| 'ply'
|
||||||
|
| 'step'
|
||||||
|
| 'stl'
|
||||||
|
| 'svg';
|
||||||
|
|
||||||
export interface FileMass_type {
|
export interface FileMass_type {
|
||||||
/*{
|
/*{
|
||||||
@ -1562,6 +1571,10 @@ export interface Gateway_type {
|
|||||||
tls_timeout: number;
|
tls_timeout: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type ImageType_type =
|
||||||
|
/* An enumeration. */
|
||||||
|
'png' | 'jpg';
|
||||||
|
|
||||||
export interface IndexInfo_type {
|
export interface IndexInfo_type {
|
||||||
mirrors: string[];
|
mirrors: string[];
|
||||||
/* nullable:true, description:Name of the registry, such as \\\docker.io\\\. */
|
/* nullable:true, description:Name of the registry, such as \\\docker.io\\\. */
|
||||||
@ -1749,6 +1762,10 @@ export interface LeafNode_type {
|
|||||||
tls_timeout: number;
|
tls_timeout: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Mesh_type {
|
||||||
|
mesh: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface MetaClusterInfo_type {
|
export interface MetaClusterInfo_type {
|
||||||
/* default:0, format:int64, description:The size of the cluster. */
|
/* default:0, format:int64, description:The size of the cluster. */
|
||||||
cluster_size: number;
|
cluster_size: number;
|
||||||
@ -1765,6 +1782,7 @@ export interface Metadata_type {
|
|||||||
executor: ExecutorMetadata_type /* Metadata about our executor API connection. */;
|
executor: ExecutorMetadata_type /* Metadata about our executor API connection. */;
|
||||||
fs: FileSystemMetadata_type /* Metadata about our file system. */;
|
fs: FileSystemMetadata_type /* Metadata about our file system. */;
|
||||||
git_hash: string /* The git hash of the server. */;
|
git_hash: string /* The git hash of the server. */;
|
||||||
|
point_e: PointEMetadata_type /* Metadata about our point-e instance. */;
|
||||||
pubsub: Connection_type /* Metadata about our pub-sub connection. */;
|
pubsub: Connection_type /* Metadata about our pub-sub connection. */;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1926,6 +1944,10 @@ export interface PluginsInfo_type {
|
|||||||
volume: string[];
|
volume: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface PointEMetadata_type {
|
||||||
|
ok: boolean /* If the point-e service returned an ok response from ping. */;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Pong_type {
|
export interface Pong_type {
|
||||||
message: string /* The pong response. */;
|
message: string /* The pong response. */;
|
||||||
}
|
}
|
||||||
@ -3358,6 +3380,7 @@ export interface Models {
|
|||||||
FileSystemMetadata_type: FileSystemMetadata_type;
|
FileSystemMetadata_type: FileSystemMetadata_type;
|
||||||
FileVolume_type: FileVolume_type;
|
FileVolume_type: FileVolume_type;
|
||||||
Gateway_type: Gateway_type;
|
Gateway_type: Gateway_type;
|
||||||
|
ImageType_type: ImageType_type;
|
||||||
IndexInfo_type: IndexInfo_type;
|
IndexInfo_type: IndexInfo_type;
|
||||||
Invoice_type: Invoice_type;
|
Invoice_type: Invoice_type;
|
||||||
InvoiceLineItem_type: InvoiceLineItem_type;
|
InvoiceLineItem_type: InvoiceLineItem_type;
|
||||||
@ -3367,6 +3390,7 @@ export interface Models {
|
|||||||
JetstreamConfig_type: JetstreamConfig_type;
|
JetstreamConfig_type: JetstreamConfig_type;
|
||||||
JetstreamStats_type: JetstreamStats_type;
|
JetstreamStats_type: JetstreamStats_type;
|
||||||
LeafNode_type: LeafNode_type;
|
LeafNode_type: LeafNode_type;
|
||||||
|
Mesh_type: Mesh_type;
|
||||||
MetaClusterInfo_type: MetaClusterInfo_type;
|
MetaClusterInfo_type: MetaClusterInfo_type;
|
||||||
Metadata_type: Metadata_type;
|
Metadata_type: Metadata_type;
|
||||||
Method_type: Method_type;
|
Method_type: Method_type;
|
||||||
@ -3382,6 +3406,7 @@ export interface Models {
|
|||||||
PhysicsConstant_type: PhysicsConstant_type;
|
PhysicsConstant_type: PhysicsConstant_type;
|
||||||
PhysicsConstantName_type: PhysicsConstantName_type;
|
PhysicsConstantName_type: PhysicsConstantName_type;
|
||||||
PluginsInfo_type: PluginsInfo_type;
|
PluginsInfo_type: PluginsInfo_type;
|
||||||
|
PointEMetadata_type: PointEMetadata_type;
|
||||||
Pong_type: Pong_type;
|
Pong_type: Pong_type;
|
||||||
RegistryServiceConfig_type: RegistryServiceConfig_type;
|
RegistryServiceConfig_type: RegistryServiceConfig_type;
|
||||||
Runtime_type: Runtime_type;
|
Runtime_type: Runtime_type;
|
||||||
|
@ -15,7 +15,8 @@ export default async function functionName(
|
|||||||
functionNameParams: FunctionNameParams,
|
functionNameParams: FunctionNameParams,
|
||||||
): Promise<FunctionNameReturn> {
|
): Promise<FunctionNameReturn> {
|
||||||
const url = 'string' + functionNameParams.exampleParam;
|
const url = 'string' + functionNameParams.exampleParam;
|
||||||
const fullUrl = 'https://api.kittycad.io' + url;
|
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
const kittycadToken = client
|
const kittycadToken = client
|
||||||
? client.token
|
? client.token
|
||||||
: process.env.KITTYCAD_TOKEN || '';
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
Reference in New Issue
Block a user