Update api spec (#274)
* YOYO NEW API SPEC! * Add UserIdentifier test data generator * Add CodeLanguage test code generator * Fix up file creation executor test generator * Add shortlink deletion to expectedToFail * Whoops, include the new example files * Generated new lib * 2.0.8 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: 49lf <ircsurfer33@gmail.com>
This commit is contained in:
committed by
GitHub
parent
692924e327
commit
79b587300a
@ -2,7 +2,7 @@ import { api_calls } from '../../src/index.js';
|
|||||||
|
|
||||||
async function example() {
|
async function example() {
|
||||||
const response = await api_calls.list_api_calls_for_user({
|
const response = await api_calls.list_api_calls_for_user({
|
||||||
id: 'string',
|
id: '31337',
|
||||||
limit: 7,
|
limit: 7,
|
||||||
page_token: 'string',
|
page_token: 'string',
|
||||||
sort_by: 'created_at_ascending',
|
sort_by: 'created_at_ascending',
|
||||||
|
@ -5,7 +5,7 @@ async function example() {
|
|||||||
const response = await executor.create_file_execution({
|
const response = await executor.create_file_execution({
|
||||||
lang: 'go',
|
lang: 'go',
|
||||||
output: 'string',
|
output: 'string',
|
||||||
body: await fsp.readFile('./example', 'base64'),
|
body: await fsp.readFile('./example.go', 'base64'),
|
||||||
});
|
});
|
||||||
if ('error_code' in response) throw response;
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
18
__tests__/gen/orgs-get_org_shortlinks.test.ts
Normal file
18
__tests__/gen/orgs-get_org_shortlinks.test.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { orgs } from '../../src/index.js';
|
||||||
|
|
||||||
|
async function example() {
|
||||||
|
const response = await orgs.get_org_shortlinks({
|
||||||
|
limit: 7,
|
||||||
|
page_token: 'string',
|
||||||
|
sort_by: 'created_at_ascending',
|
||||||
|
});
|
||||||
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('Testing orgs.get_org_shortlinks', () => {
|
||||||
|
it('should be truthy or throw', async () => {
|
||||||
|
expect(await example()).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
@ -2,7 +2,7 @@ import { payments } from '../../src/index.js';
|
|||||||
|
|
||||||
async function example() {
|
async function example() {
|
||||||
const response = await payments.create_org_subscription({
|
const response = await payments.create_org_subscription({
|
||||||
body: { modeling_app: 'team' },
|
body: { modeling_app: 'team', pay_annually: true },
|
||||||
});
|
});
|
||||||
if ('error_code' in response) throw response;
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import { payments } from '../../src/index.js';
|
|||||||
|
|
||||||
async function example() {
|
async function example() {
|
||||||
const response = await payments.create_user_subscription({
|
const response = await payments.create_user_subscription({
|
||||||
body: { modeling_app: 'free' },
|
body: { modeling_app: 'free', pay_annually: true },
|
||||||
});
|
});
|
||||||
if ('error_code' in response) throw response;
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import { payments } from '../../src/index.js';
|
|||||||
|
|
||||||
async function example() {
|
async function example() {
|
||||||
const response = await payments.get_payment_balance_for_any_user({
|
const response = await payments.get_payment_balance_for_any_user({
|
||||||
id: '00000000-0000-0000-0000-000000000000',
|
id: '31337',
|
||||||
});
|
});
|
||||||
if ('error_code' in response) throw response;
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import { payments } from '../../src/index.js';
|
|||||||
|
|
||||||
async function example() {
|
async function example() {
|
||||||
const response = await payments.update_org_subscription({
|
const response = await payments.update_org_subscription({
|
||||||
body: { modeling_app: 'team' },
|
body: { modeling_app: 'team', pay_annually: true },
|
||||||
});
|
});
|
||||||
if ('error_code' in response) throw response;
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import { payments } from '../../src/index.js';
|
|||||||
|
|
||||||
async function example() {
|
async function example() {
|
||||||
const response = await payments.update_payment_balance_for_any_user({
|
const response = await payments.update_payment_balance_for_any_user({
|
||||||
id: '00000000-0000-0000-0000-000000000000',
|
id: '31337',
|
||||||
body: {
|
body: {
|
||||||
monthly_credits_remaining: 7,
|
monthly_credits_remaining: 7,
|
||||||
pre_pay_cash_remaining: 7,
|
pre_pay_cash_remaining: 7,
|
||||||
|
@ -2,7 +2,7 @@ import { payments } from '../../src/index.js';
|
|||||||
|
|
||||||
async function example() {
|
async function example() {
|
||||||
const response = await payments.update_user_subscription({
|
const response = await payments.update_user_subscription({
|
||||||
body: { modeling_app: 'free' },
|
body: { modeling_app: 'free', pay_annually: true },
|
||||||
});
|
});
|
||||||
if ('error_code' in response) throw response;
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
21
__tests__/gen/users-create_user_shortlink.test.ts
Normal file
21
__tests__/gen/users-create_user_shortlink.test.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { users } from '../../src/index.js';
|
||||||
|
|
||||||
|
async function example() {
|
||||||
|
const response = await users.create_user_shortlink({
|
||||||
|
body: {
|
||||||
|
password:
|
||||||
|
'The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here.',
|
||||||
|
restrict_to_org: true,
|
||||||
|
url: 'The URL to redirect back to.',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('Testing users.create_user_shortlink', () => {
|
||||||
|
it('should be truthy or throw', async () => {
|
||||||
|
expect(await example()).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
18
__tests__/gen/users-delete_user_shortlink.test.ts
Normal file
18
__tests__/gen/users-delete_user_shortlink.test.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { users } from '../../src/index.js';
|
||||||
|
|
||||||
|
async function example() {
|
||||||
|
const response = await users.delete_user_shortlink({ key: 'string' });
|
||||||
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('Testing users.delete_user_shortlink', () => {
|
||||||
|
it('should be truthy or throw', async () => {
|
||||||
|
try {
|
||||||
|
await example();
|
||||||
|
} catch (err) {
|
||||||
|
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
@ -1,7 +1,7 @@
|
|||||||
import { users } from '../../src/index.js';
|
import { users } from '../../src/index.js';
|
||||||
|
|
||||||
async function example() {
|
async function example() {
|
||||||
const response = await users.get_user({ id: 'string' });
|
const response = await users.get_user({ id: '31337' });
|
||||||
if ('error_code' in response) throw response;
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { users } from '../../src/index.js';
|
import { users } from '../../src/index.js';
|
||||||
|
|
||||||
async function example() {
|
async function example() {
|
||||||
const response = await users.get_user_extended({ id: 'string' });
|
const response = await users.get_user_extended({ id: '31337' });
|
||||||
if ('error_code' in response) throw response;
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
18
__tests__/gen/users-get_user_shortlinks.test.ts
Normal file
18
__tests__/gen/users-get_user_shortlinks.test.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { users } from '../../src/index.js';
|
||||||
|
|
||||||
|
async function example() {
|
||||||
|
const response = await users.get_user_shortlinks({
|
||||||
|
limit: 7,
|
||||||
|
page_token: 'string',
|
||||||
|
sort_by: 'created_at_ascending',
|
||||||
|
});
|
||||||
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('Testing users.get_user_shortlinks', () => {
|
||||||
|
it('should be truthy or throw', async () => {
|
||||||
|
expect(await example()).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
21
__tests__/gen/users-update_user_shortlink.test.ts
Normal file
21
__tests__/gen/users-update_user_shortlink.test.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { users } from '../../src/index.js';
|
||||||
|
|
||||||
|
async function example() {
|
||||||
|
const response = await users.update_user_shortlink({
|
||||||
|
key: 'string',
|
||||||
|
body: {
|
||||||
|
password:
|
||||||
|
'The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here.',
|
||||||
|
restrict_to_org: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
if ('error_code' in response) throw response;
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('Testing users.update_user_shortlink', () => {
|
||||||
|
it('should be truthy or throw', async () => {
|
||||||
|
expect(await example()).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
5
example.go
Normal file
5
example.go
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package main
|
||||||
|
import "fmt"
|
||||||
|
func main() {
|
||||||
|
fmt.Println("lee was here")
|
||||||
|
}
|
1
example.node
Normal file
1
example.node
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.log('lee was here')
|
1
example.python
Normal file
1
example.python
Normal file
@ -0,0 +1 @@
|
|||||||
|
print "lee was here"
|
@ -19,7 +19,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1users~1{id}~1payment~1balance/put/x-typescript",
|
"path": "/paths/~1users~1{id}~1payment~1balance/put/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.update_payment_balance_for_any_user({\n id: '00000000-0000-0000-0000-000000000000',\n body: {\n monthly_credits_remaining: 7,\n pre_pay_cash_remaining: 7,\n pre_pay_credits_remaining: 7,\n },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.update_payment_balance_for_any_user({\n id: '31337',\n body: {\n monthly_credits_remaining: 7,\n pre_pay_cash_remaining: 7,\n pre_pay_credits_remaining: 7,\n },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -27,7 +27,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1users~1{id}~1payment~1balance/get/x-typescript",
|
"path": "/paths/~1users~1{id}~1payment~1balance/get/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.get_payment_balance_for_any_user({\n id: '00000000-0000-0000-0000-000000000000',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.get_payment_balance_for_any_user({\n id: '31337',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -35,7 +35,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1users~1{id}~1api-calls/get/x-typescript",
|
"path": "/paths/~1users~1{id}~1api-calls/get/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import { api_calls } from '@kittycad/lib'\n\nasync function example() {\n const response = await api_calls.list_api_calls_for_user({\n id: 'string',\n limit: 7,\n page_token: 'string',\n sort_by: 'created_at_ascending',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
"example": "import { api_calls } from '@kittycad/lib'\n\nasync function example() {\n const response = await api_calls.list_api_calls_for_user({\n id: '31337',\n limit: 7,\n page_token: 'string',\n sort_by: 'created_at_ascending',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -43,7 +43,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1users~1{id}/get/x-typescript",
|
"path": "/paths/~1users~1{id}/get/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.get_user({ id: 'string' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
"example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.get_user({ id: '31337' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -51,7 +51,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1users-extended~1{id}/get/x-typescript",
|
"path": "/paths/~1users-extended~1{id}/get/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.get_user_extended({ id: 'string' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
"example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.get_user_extended({ id: '31337' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -95,6 +95,38 @@
|
|||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1shortlinks~1{key}/delete/x-typescript",
|
||||||
|
"value": {
|
||||||
|
"example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.delete_user_shortlink({ key: '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~1shortlinks~1{key}/put/x-typescript",
|
||||||
|
"value": {
|
||||||
|
"example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.update_user_shortlink({\n key: 'string',\n body: {\n password:\n 'The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here.',\n restrict_to_org: true,\n },\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~1shortlinks/post/x-typescript",
|
||||||
|
"value": {
|
||||||
|
"example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.create_user_shortlink({\n body: {\n password:\n 'The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here.',\n restrict_to_org: true,\n url: 'The URL to redirect back to.',\n },\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~1shortlinks/get/x-typescript",
|
||||||
|
"value": {
|
||||||
|
"example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.get_user_shortlinks({\n limit: 7,\n page_token: 'string',\n sort_by: 'created_at_ascending',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
|
"libDocsLink": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1user~1session~1{token}/get/x-typescript",
|
"path": "/paths/~1user~1session~1{token}/get/x-typescript",
|
||||||
@ -131,7 +163,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1user~1payment~1subscriptions/post/x-typescript",
|
"path": "/paths/~1user~1payment~1subscriptions/post/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.create_user_subscription({\n body: { modeling_app: 'free' },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.create_user_subscription({\n body: { modeling_app: 'free', pay_annually: true },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -139,7 +171,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1user~1payment~1subscriptions/put/x-typescript",
|
"path": "/paths/~1user~1payment~1subscriptions/put/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.update_user_subscription({\n body: { modeling_app: 'free' },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.update_user_subscription({\n body: { modeling_app: 'free', pay_annually: true },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -495,6 +527,14 @@
|
|||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1org~1shortlinks/get/x-typescript",
|
||||||
|
"value": {
|
||||||
|
"example": "import { orgs } from '@kittycad/lib'\n\nasync function example() {\n const response = await orgs.get_org_shortlinks({\n limit: 7,\n page_token: 'string',\n sort_by: 'created_at_ascending',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
|
"libDocsLink": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1org~1service-accounts~1{token}/delete/x-typescript",
|
"path": "/paths/~1org~1service-accounts~1{token}/delete/x-typescript",
|
||||||
@ -587,7 +627,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1org~1payment~1subscriptions/post/x-typescript",
|
"path": "/paths/~1org~1payment~1subscriptions/post/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.create_org_subscription({\n body: { modeling_app: 'team' },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.create_org_subscription({\n body: { modeling_app: 'team', pay_annually: true },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -595,7 +635,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1org~1payment~1subscriptions/put/x-typescript",
|
"path": "/paths/~1org~1payment~1subscriptions/put/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.update_org_subscription({\n body: { modeling_app: 'team' },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
"example": "import { payments } from '@kittycad/lib'\n\nasync function example() {\n const response = await payments.update_org_subscription({\n body: { modeling_app: 'team', pay_annually: true },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -899,7 +939,7 @@
|
|||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1file~1execute~1{lang}/post/x-typescript",
|
"path": "/paths/~1file~1execute~1{lang}/post/x-typescript",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "import fsp from 'fs/promises'\nimport { executor } from '@kittycad/lib'\n\nasync function example() {\n const response = await executor.create_file_execution({\n lang: 'go',\n output: 'string',\n body: await fsp.readFile('./example', '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 { executor } from '@kittycad/lib'\n\nasync function example() {\n const response = await executor.create_file_execution({\n lang: 'go',\n output: 'string',\n body: await fsp.readFile('./example.go', 'base64'),\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
|
||||||
"libDocsLink": ""
|
"libDocsLink": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kittycad/lib",
|
"name": "@kittycad/lib",
|
||||||
"version": "2.0.7",
|
"version": "2.0.8",
|
||||||
"description": "Javascript library for KittyCAD API",
|
"description": "Javascript library for KittyCAD API",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import {
|
import {
|
||||||
ApiCallWithPriceResultsPage_type,
|
ApiCallWithPriceResultsPage_type,
|
||||||
Error_type,
|
Error_type,
|
||||||
|
UserIdentifier_type,
|
||||||
CreatedAtSortMode_type,
|
CreatedAtSortMode_type,
|
||||||
} from '../../models.js';
|
} from '../../models.js';
|
||||||
import { Client } from '../../client.js';
|
import { Client } from '../../client.js';
|
||||||
|
|
||||||
interface List_api_calls_for_user_params {
|
interface List_api_calls_for_user_params {
|
||||||
client?: Client;
|
client?: Client;
|
||||||
id: string;
|
id: UserIdentifier_type;
|
||||||
limit: number;
|
limit: number;
|
||||||
page_token: string;
|
page_token: string;
|
||||||
sort_by: CreatedAtSortMode_type;
|
sort_by: CreatedAtSortMode_type;
|
||||||
|
39
src/api/orgs/get_org_shortlinks.ts
Normal file
39
src/api/orgs/get_org_shortlinks.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import {
|
||||||
|
ShortlinkResultsPage_type,
|
||||||
|
Error_type,
|
||||||
|
CreatedAtSortMode_type,
|
||||||
|
} from '../../models.js';
|
||||||
|
import { Client } from '../../client.js';
|
||||||
|
|
||||||
|
interface Get_org_shortlinks_params {
|
||||||
|
client?: Client;
|
||||||
|
limit: number;
|
||||||
|
page_token: string;
|
||||||
|
sort_by: CreatedAtSortMode_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
type Get_org_shortlinks_return = ShortlinkResultsPage_type | Error_type;
|
||||||
|
|
||||||
|
export default async function get_org_shortlinks({
|
||||||
|
client,
|
||||||
|
limit,
|
||||||
|
page_token,
|
||||||
|
sort_by,
|
||||||
|
}: Get_org_shortlinks_params): Promise<Get_org_shortlinks_return> {
|
||||||
|
const url = `/org/shortlinks?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`;
|
||||||
|
const urlBase = process?.env?.BASE_URL || 'https://api.zoo.dev';
|
||||||
|
const fullUrl = urlBase + 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_org_shortlinks_return;
|
||||||
|
return result;
|
||||||
|
}
|
@ -1,9 +1,13 @@
|
|||||||
import { CustomerBalance_type, Error_type, Uuid_type } from '../../models.js';
|
import {
|
||||||
|
CustomerBalance_type,
|
||||||
|
Error_type,
|
||||||
|
UserIdentifier_type,
|
||||||
|
} from '../../models.js';
|
||||||
import { Client } from '../../client.js';
|
import { Client } from '../../client.js';
|
||||||
|
|
||||||
interface Get_payment_balance_for_any_user_params {
|
interface Get_payment_balance_for_any_user_params {
|
||||||
client?: Client;
|
client?: Client;
|
||||||
id: Uuid_type;
|
id: UserIdentifier_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
type Get_payment_balance_for_any_user_return =
|
type Get_payment_balance_for_any_user_return =
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import {
|
import {
|
||||||
CustomerBalance_type,
|
CustomerBalance_type,
|
||||||
Error_type,
|
Error_type,
|
||||||
Uuid_type,
|
UserIdentifier_type,
|
||||||
UpdatePaymentBalance_type,
|
UpdatePaymentBalance_type,
|
||||||
} from '../../models.js';
|
} from '../../models.js';
|
||||||
import { Client } from '../../client.js';
|
import { Client } from '../../client.js';
|
||||||
|
|
||||||
interface Update_payment_balance_for_any_user_params {
|
interface Update_payment_balance_for_any_user_params {
|
||||||
client?: Client;
|
client?: Client;
|
||||||
id: Uuid_type;
|
id: UserIdentifier_type;
|
||||||
body: UpdatePaymentBalance_type;
|
body: UpdatePaymentBalance_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
36
src/api/users/create_user_shortlink.ts
Normal file
36
src/api/users/create_user_shortlink.ts
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import {
|
||||||
|
CreateShortlinkResponse_type,
|
||||||
|
Error_type,
|
||||||
|
CreateShortlinkRequest_type,
|
||||||
|
} from '../../models.js';
|
||||||
|
import { Client } from '../../client.js';
|
||||||
|
|
||||||
|
interface Create_user_shortlink_params {
|
||||||
|
client?: Client;
|
||||||
|
body: CreateShortlinkRequest_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
type Create_user_shortlink_return = CreateShortlinkResponse_type | Error_type;
|
||||||
|
|
||||||
|
export default async function create_user_shortlink({
|
||||||
|
client,
|
||||||
|
body,
|
||||||
|
}: Create_user_shortlink_params): Promise<Create_user_shortlink_return> {
|
||||||
|
const url = `/user/shortlinks`;
|
||||||
|
const urlBase = process?.env?.BASE_URL || 'https://api.zoo.dev';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
|
const kittycadToken = client
|
||||||
|
? client.token
|
||||||
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
const headers = {
|
||||||
|
Authorization: `Bearer ${kittycadToken}`,
|
||||||
|
};
|
||||||
|
const fetchOptions = {
|
||||||
|
method: 'POST',
|
||||||
|
headers,
|
||||||
|
body: JSON.stringify(body),
|
||||||
|
};
|
||||||
|
const response = await fetch(fullUrl, fetchOptions);
|
||||||
|
const result = (await response.json()) as Create_user_shortlink_return;
|
||||||
|
return result;
|
||||||
|
}
|
31
src/api/users/delete_user_shortlink.ts
Normal file
31
src/api/users/delete_user_shortlink.ts
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import { Error_type } from '../../models.js';
|
||||||
|
import { Client } from '../../client.js';
|
||||||
|
|
||||||
|
interface Delete_user_shortlink_params {
|
||||||
|
client?: Client;
|
||||||
|
key: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
type Delete_user_shortlink_return = Error_type;
|
||||||
|
|
||||||
|
export default async function delete_user_shortlink({
|
||||||
|
client,
|
||||||
|
key,
|
||||||
|
}: Delete_user_shortlink_params): Promise<Delete_user_shortlink_return> {
|
||||||
|
const url = `/user/shortlinks/${key}`;
|
||||||
|
const urlBase = process?.env?.BASE_URL || 'https://api.zoo.dev';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
|
const kittycadToken = client
|
||||||
|
? client.token
|
||||||
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
const headers = {
|
||||||
|
Authorization: `Bearer ${kittycadToken}`,
|
||||||
|
};
|
||||||
|
const fetchOptions = {
|
||||||
|
method: 'DELETE',
|
||||||
|
headers,
|
||||||
|
};
|
||||||
|
const response = await fetch(fullUrl, fetchOptions);
|
||||||
|
const result = (await response.json()) as Delete_user_shortlink_return;
|
||||||
|
return result;
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
import { User_type, Error_type } from '../../models.js';
|
import { User_type, Error_type, UserIdentifier_type } from '../../models.js';
|
||||||
import { Client } from '../../client.js';
|
import { Client } from '../../client.js';
|
||||||
|
|
||||||
interface Get_user_params {
|
interface Get_user_params {
|
||||||
client?: Client;
|
client?: Client;
|
||||||
id: string;
|
id: UserIdentifier_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
type Get_user_return = User_type | Error_type;
|
type Get_user_return = User_type | Error_type;
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
import { ExtendedUser_type, Error_type } from '../../models.js';
|
import {
|
||||||
|
ExtendedUser_type,
|
||||||
|
Error_type,
|
||||||
|
UserIdentifier_type,
|
||||||
|
} from '../../models.js';
|
||||||
import { Client } from '../../client.js';
|
import { Client } from '../../client.js';
|
||||||
|
|
||||||
interface Get_user_extended_params {
|
interface Get_user_extended_params {
|
||||||
client?: Client;
|
client?: Client;
|
||||||
id: string;
|
id: UserIdentifier_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
type Get_user_extended_return = ExtendedUser_type | Error_type;
|
type Get_user_extended_return = ExtendedUser_type | Error_type;
|
||||||
|
39
src/api/users/get_user_shortlinks.ts
Normal file
39
src/api/users/get_user_shortlinks.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import {
|
||||||
|
ShortlinkResultsPage_type,
|
||||||
|
Error_type,
|
||||||
|
CreatedAtSortMode_type,
|
||||||
|
} from '../../models.js';
|
||||||
|
import { Client } from '../../client.js';
|
||||||
|
|
||||||
|
interface Get_user_shortlinks_params {
|
||||||
|
client?: Client;
|
||||||
|
limit: number;
|
||||||
|
page_token: string;
|
||||||
|
sort_by: CreatedAtSortMode_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
type Get_user_shortlinks_return = ShortlinkResultsPage_type | Error_type;
|
||||||
|
|
||||||
|
export default async function get_user_shortlinks({
|
||||||
|
client,
|
||||||
|
limit,
|
||||||
|
page_token,
|
||||||
|
sort_by,
|
||||||
|
}: Get_user_shortlinks_params): Promise<Get_user_shortlinks_return> {
|
||||||
|
const url = `/user/shortlinks?limit=${limit}&page_token=${page_token}&sort_by=${sort_by}`;
|
||||||
|
const urlBase = process?.env?.BASE_URL || 'https://api.zoo.dev';
|
||||||
|
const fullUrl = urlBase + 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_user_shortlinks_return;
|
||||||
|
return result;
|
||||||
|
}
|
34
src/api/users/update_user_shortlink.ts
Normal file
34
src/api/users/update_user_shortlink.ts
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { Error_type, UpdateShortlinkRequest_type } from '../../models.js';
|
||||||
|
import { Client } from '../../client.js';
|
||||||
|
|
||||||
|
interface Update_user_shortlink_params {
|
||||||
|
client?: Client;
|
||||||
|
key: string;
|
||||||
|
body: UpdateShortlinkRequest_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
type Update_user_shortlink_return = Error_type;
|
||||||
|
|
||||||
|
export default async function update_user_shortlink({
|
||||||
|
client,
|
||||||
|
key,
|
||||||
|
body,
|
||||||
|
}: Update_user_shortlink_params): Promise<Update_user_shortlink_return> {
|
||||||
|
const url = `/user/shortlinks/${key}`;
|
||||||
|
const urlBase = process?.env?.BASE_URL || 'https://api.zoo.dev';
|
||||||
|
const fullUrl = urlBase + url;
|
||||||
|
const kittycadToken = client
|
||||||
|
? client.token
|
||||||
|
: process.env.KITTYCAD_TOKEN || '';
|
||||||
|
const headers = {
|
||||||
|
Authorization: `Bearer ${kittycadToken}`,
|
||||||
|
};
|
||||||
|
const fetchOptions = {
|
||||||
|
method: 'PUT',
|
||||||
|
headers,
|
||||||
|
body: JSON.stringify(body),
|
||||||
|
};
|
||||||
|
const response = await fetch(fullUrl, fetchOptions);
|
||||||
|
const result = (await response.json()) as Update_user_shortlink_return;
|
||||||
|
return result;
|
||||||
|
}
|
@ -144,6 +144,16 @@ export default async function apiGen(lookup: any) {
|
|||||||
inputParamsExamples.push(
|
inputParamsExamples.push(
|
||||||
`${name}: '${'dev-00000000-0000-0000-0000-000000000000'}'`,
|
`${name}: '${'dev-00000000-0000-0000-0000-000000000000'}'`,
|
||||||
);
|
);
|
||||||
|
} else if (
|
||||||
|
reffedSchema.type === 'string' &&
|
||||||
|
refName == 'UserIdentifier'
|
||||||
|
) {
|
||||||
|
inputParamsExamples.push(`${name}: '${'31337'}'`);
|
||||||
|
} else if (
|
||||||
|
reffedSchema.type === 'string' &&
|
||||||
|
refName == 'CodeLanguage'
|
||||||
|
) {
|
||||||
|
inputParamsExamples.push(`${name}: '${'node'}'`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (schema.type === 'number' || schema.type === 'integer') {
|
if (schema.type === 'number' || schema.type === 'integer') {
|
||||||
@ -284,14 +294,27 @@ export default async function apiGen(lookup: any) {
|
|||||||
}
|
}
|
||||||
inputTypes.push('body: string');
|
inputTypes.push('body: string');
|
||||||
inputParams.push('body');
|
inputParams.push('body');
|
||||||
const srcFmts = inputParamsExamples.find((str) => {
|
|
||||||
|
let exampleFile = 'example';
|
||||||
|
|
||||||
|
// For requests depending on a model file
|
||||||
|
const modelFmts = inputParamsExamples.find((str) => {
|
||||||
return str.startsWith('src_format:');
|
return str.startsWith('src_format:');
|
||||||
});
|
});
|
||||||
const exampleFile = !srcFmts
|
if (modelFmts) {
|
||||||
? 'example'
|
exampleFile = modelFmts.includes('obj')
|
||||||
: srcFmts.includes('obj')
|
? 'example.obj'
|
||||||
? 'example.obj'
|
: 'example.svg';
|
||||||
: 'example.svg';
|
}
|
||||||
|
|
||||||
|
// For requests depending on a source code file
|
||||||
|
const langFmts = inputParamsExamples.find((str) => {
|
||||||
|
return str.startsWith('lang:');
|
||||||
|
});
|
||||||
|
if (langFmts) {
|
||||||
|
exampleFile = `example.${langFmts.replace(/lang: '([a-z]+)'/, '$1')}`;
|
||||||
|
}
|
||||||
|
|
||||||
inputParamsExamples.push(
|
inputParamsExamples.push(
|
||||||
`body: await fsp.readFile('./${exampleFile}', 'base64')`,
|
`body: await fsp.readFile('./${exampleFile}', 'base64')`,
|
||||||
);
|
);
|
||||||
|
@ -57,4 +57,7 @@ export const testsExpectedToFail =
|
|||||||
'payments.validate_customer_tax_information_for_org',
|
'payments.validate_customer_tax_information_for_org',
|
||||||
'service-accounts.create_service_account_for_org',
|
'service-accounts.create_service_account_for_org',
|
||||||
'users.get_user_privacy_settings',
|
'users.get_user_privacy_settings',
|
||||||
|
|
||||||
|
// stateful. what matters is the creation variants succeed.
|
||||||
|
'users.delete_user_shortlink',
|
||||||
];
|
];
|
||||||
|
10
src/index.ts
10
src/index.ts
@ -128,6 +128,7 @@ import get_org from './api/orgs/get_org.js';
|
|||||||
import get_org_member from './api/orgs/get_org_member.js';
|
import get_org_member from './api/orgs/get_org_member.js';
|
||||||
import get_org_privacy_settings from './api/orgs/get_org_privacy_settings.js';
|
import get_org_privacy_settings from './api/orgs/get_org_privacy_settings.js';
|
||||||
import get_org_saml_idp from './api/orgs/get_org_saml_idp.js';
|
import get_org_saml_idp from './api/orgs/get_org_saml_idp.js';
|
||||||
|
import get_org_shortlinks from './api/orgs/get_org_shortlinks.js';
|
||||||
import get_user_org from './api/orgs/get_user_org.js';
|
import get_user_org from './api/orgs/get_user_org.js';
|
||||||
import list_org_members from './api/orgs/list_org_members.js';
|
import list_org_members from './api/orgs/list_org_members.js';
|
||||||
import list_orgs from './api/orgs/list_orgs.js';
|
import list_orgs from './api/orgs/list_orgs.js';
|
||||||
@ -148,6 +149,7 @@ export const orgs = {
|
|||||||
get_org_member,
|
get_org_member,
|
||||||
get_org_privacy_settings,
|
get_org_privacy_settings,
|
||||||
get_org_saml_idp,
|
get_org_saml_idp,
|
||||||
|
get_org_shortlinks,
|
||||||
get_user_org,
|
get_user_org,
|
||||||
list_org_members,
|
list_org_members,
|
||||||
list_orgs,
|
list_orgs,
|
||||||
@ -264,7 +266,9 @@ export const unit = {
|
|||||||
get_volume_unit_conversion,
|
get_volume_unit_conversion,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
import create_user_shortlink from './api/users/create_user_shortlink.js';
|
||||||
import delete_user_self from './api/users/delete_user_self.js';
|
import delete_user_self from './api/users/delete_user_self.js';
|
||||||
|
import delete_user_shortlink from './api/users/delete_user_shortlink.js';
|
||||||
import get_oauth2_providers_for_user from './api/users/get_oauth2_providers_for_user.js';
|
import get_oauth2_providers_for_user from './api/users/get_oauth2_providers_for_user.js';
|
||||||
import get_session_for_user from './api/users/get_session_for_user.js';
|
import get_session_for_user from './api/users/get_session_for_user.js';
|
||||||
import get_user from './api/users/get_user.js';
|
import get_user from './api/users/get_user.js';
|
||||||
@ -273,12 +277,16 @@ import get_user_onboarding_self from './api/users/get_user_onboarding_self.js';
|
|||||||
import get_user_privacy_settings from './api/users/get_user_privacy_settings.js';
|
import get_user_privacy_settings from './api/users/get_user_privacy_settings.js';
|
||||||
import get_user_self from './api/users/get_user_self.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 get_user_self_extended from './api/users/get_user_self_extended.js';
|
||||||
|
import get_user_shortlinks from './api/users/get_user_shortlinks.js';
|
||||||
import list_users from './api/users/list_users.js';
|
import list_users from './api/users/list_users.js';
|
||||||
import list_users_extended from './api/users/list_users_extended.js';
|
import list_users_extended from './api/users/list_users_extended.js';
|
||||||
import update_user_privacy_settings from './api/users/update_user_privacy_settings.js';
|
import update_user_privacy_settings from './api/users/update_user_privacy_settings.js';
|
||||||
import update_user_self from './api/users/update_user_self.js';
|
import update_user_self from './api/users/update_user_self.js';
|
||||||
|
import update_user_shortlink from './api/users/update_user_shortlink.js';
|
||||||
export const users = {
|
export const users = {
|
||||||
|
create_user_shortlink,
|
||||||
delete_user_self,
|
delete_user_self,
|
||||||
|
delete_user_shortlink,
|
||||||
get_oauth2_providers_for_user,
|
get_oauth2_providers_for_user,
|
||||||
get_session_for_user,
|
get_session_for_user,
|
||||||
get_user,
|
get_user,
|
||||||
@ -287,10 +295,12 @@ export const users = {
|
|||||||
get_user_privacy_settings,
|
get_user_privacy_settings,
|
||||||
get_user_self,
|
get_user_self,
|
||||||
get_user_self_extended,
|
get_user_self_extended,
|
||||||
|
get_user_shortlinks,
|
||||||
list_users,
|
list_users,
|
||||||
list_users_extended,
|
list_users_extended,
|
||||||
update_user_privacy_settings,
|
update_user_privacy_settings,
|
||||||
update_user_self,
|
update_user_self,
|
||||||
|
update_user_shortlink,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type { Models } from './models.js';
|
export type { Models } from './models.js';
|
||||||
|
122
src/models.ts
122
src/models.ts
@ -910,6 +910,27 @@ export interface Coupon_type {
|
|||||||
percent_off?: number;
|
percent_off?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CreateShortlinkRequest_type {
|
||||||
|
/*{
|
||||||
|
"nullable": true,
|
||||||
|
"description": "The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here."
|
||||||
|
}*/
|
||||||
|
password?: string;
|
||||||
|
/*{
|
||||||
|
"default": false,
|
||||||
|
"description": "If the shortlink should be restricted to the user's organization to view. This only applies to org shortlinks. If you are creating a user shortlink and you are not a member of a team or enterprise and you try to set this to true, it will fail."
|
||||||
|
}*/
|
||||||
|
restrict_to_org: boolean;
|
||||||
|
/* format:uri, description:The URL to redirect back to. */
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CreateShortlinkResponse_type {
|
||||||
|
key: string /* The key for this url. This is what you use to update or delete the specific shortlink. */;
|
||||||
|
/* format:uri, description:The shortened url. */
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
export type CreatedAtSortMode_type =
|
export type CreatedAtSortMode_type =
|
||||||
| 'created_at_ascending'
|
| 'created_at_ascending'
|
||||||
| 'created_at_descending';
|
| 'created_at_descending';
|
||||||
@ -2172,7 +2193,19 @@ export type ModelingAppOrganizationSubscriptionTier_type =
|
|||||||
| 'team'
|
| 'team'
|
||||||
| 'enterprise';
|
| 'enterprise';
|
||||||
|
|
||||||
|
export type ModelingAppShareLinks_type =
|
||||||
|
| 'public'
|
||||||
|
| 'password_protected'
|
||||||
|
| 'organization_only';
|
||||||
|
|
||||||
export interface ModelingAppSubscriptionTier_type {
|
export interface ModelingAppSubscriptionTier_type {
|
||||||
|
/*{
|
||||||
|
"nullable": true,
|
||||||
|
"format": "uint",
|
||||||
|
"minimum": 0,
|
||||||
|
"description": "Annual discount. The percentage off the monthly price if the user pays annually."
|
||||||
|
}*/
|
||||||
|
annual_discount?: number;
|
||||||
description: string /* A description of the tier. */;
|
description: string /* A description of the tier. */;
|
||||||
/* minItems:0, maxItems:15, description:Features that are included in the subscription. */
|
/* minItems:0, maxItems:15, description:Features that are included in the subscription. */
|
||||||
features: SubscriptionTierFeature_type[];
|
features: SubscriptionTierFeature_type[];
|
||||||
@ -2184,6 +2217,7 @@ export interface ModelingAppSubscriptionTier_type {
|
|||||||
}*/
|
}*/
|
||||||
pay_as_you_go_credits: number;
|
pay_as_you_go_credits: number;
|
||||||
price: SubscriptionTierPrice_type /* The price of the tier per month. If this is for an individual, this is the price they pay. If this is for an organization, this is the price the organization pays per member in the org. This is in USD. */;
|
price: SubscriptionTierPrice_type /* The price of the tier per month. If this is for an individual, this is the price they pay. If this is for an organization, this is the price the organization pays per member in the org. This is in USD. */;
|
||||||
|
share_links: ModelingAppShareLinks_type[] /* The options for sharable links through the modeling app. */;
|
||||||
support_tier: SupportTier_type /* The support tier the subscription provides. */;
|
support_tier: SupportTier_type /* The support tier the subscription provides. */;
|
||||||
training_data_behavior: SubscriptionTrainingDataBehavior_type /* The behavior of the users data (can it be used for training, etc). */;
|
training_data_behavior: SubscriptionTrainingDataBehavior_type /* The behavior of the users data (can it be used for training, etc). */;
|
||||||
type: SubscriptionTierType_type /* If the tier is offered for an individual or an org. */;
|
type: SubscriptionTierType_type /* If the tier is offered for an individual or an org. */;
|
||||||
@ -2600,6 +2634,15 @@ export type ModelingCmd_type =
|
|||||||
object_id: string;
|
object_id: string;
|
||||||
type: 'solid3d_get_prev_adjacent_edge';
|
type: 'solid3d_get_prev_adjacent_edge';
|
||||||
}
|
}
|
||||||
|
| {
|
||||||
|
/*{
|
||||||
|
"format": "uuid"
|
||||||
|
}*/
|
||||||
|
face_ids: string[];
|
||||||
|
/* format:uuid, description:Which object is being queried. */
|
||||||
|
object_id: string;
|
||||||
|
type: 'solid3d_get_common_edge';
|
||||||
|
}
|
||||||
| {
|
| {
|
||||||
/* default:fillet, description:How to apply the cut. */
|
/* default:fillet, description:How to apply the cut. */
|
||||||
cut_type: CutType_type;
|
cut_type: CutType_type;
|
||||||
@ -3549,6 +3592,13 @@ export type OkModelingCmdResponse_type =
|
|||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
/*{
|
/*{
|
||||||
|
"$ref": "#/components/schemas/Solid3dGetCommonEdge"
|
||||||
|
}*/
|
||||||
|
data: Solid3dGetCommonEdge_type;
|
||||||
|
type: 'solid3d_get_common_edge';
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
/*{
|
||||||
"$ref": "#/components/schemas/GetEntityType"
|
"$ref": "#/components/schemas/GetEntityType"
|
||||||
}*/
|
}*/
|
||||||
data: GetEntityType_type;
|
data: GetEntityType_type;
|
||||||
@ -4450,6 +4500,36 @@ export interface SetSelectionType_type {} /* Empty object */
|
|||||||
|
|
||||||
export interface SetTool_type {} /* Empty object */
|
export interface SetTool_type {} /* Empty object */
|
||||||
|
|
||||||
|
export interface Shortlink_type {
|
||||||
|
/* title:DateTime, format:date-time, description:The date and time the shortlink was created. */
|
||||||
|
created_at: string;
|
||||||
|
id: Uuid_type /* The unique identifier for the shortlink. */;
|
||||||
|
key: string /* The key of the shortlink. This is the short part of the URL. */;
|
||||||
|
/* nullable:true, description:The organization ID of the shortlink. */
|
||||||
|
org_id?: Uuid_type;
|
||||||
|
/* nullable:true, description:The hash of the password for the shortlink. */
|
||||||
|
password_hash?: string;
|
||||||
|
/*{
|
||||||
|
"default": false,
|
||||||
|
"description": "If the shortlink should be restricted to the organization. This only applies to org shortlinks. If you are creating a user shortlink and you are not a member of a team or enterprise and you try to set this to true, it will fail."
|
||||||
|
}*/
|
||||||
|
restrict_to_org: boolean;
|
||||||
|
/* title:DateTime, format:date-time, description:The date and time the shortlink was last updated. */
|
||||||
|
updated_at: string;
|
||||||
|
user_id: Uuid_type /* The ID of the user that made the shortlink. */;
|
||||||
|
/* title:String, format:uri, description:The URL the shortlink redirects to. */
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ShortlinkResultsPage_type {
|
||||||
|
items: Shortlink_type[] /* list of items on this page of results */;
|
||||||
|
/*{
|
||||||
|
"nullable": true,
|
||||||
|
"description": "token used to fetch the next page of results (if any)"
|
||||||
|
}*/
|
||||||
|
next_page?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface SketchModeDisable_type {} /* Empty object */
|
export interface SketchModeDisable_type {} /* Empty object */
|
||||||
|
|
||||||
export interface Solid2dAddHole_type {} /* Empty object */
|
export interface Solid2dAddHole_type {} /* Empty object */
|
||||||
@ -4470,6 +4550,11 @@ export interface Solid3dGetAllOppositeEdges_type {
|
|||||||
edges: string[];
|
edges: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Solid3dGetCommonEdge_type {
|
||||||
|
/* nullable:true, format:uuid, description:The UUID of the common edge, if any. */
|
||||||
|
edge?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Solid3dGetExtrusionFaceInfo_type {
|
export interface Solid3dGetExtrusionFaceInfo_type {
|
||||||
faces: ExtrusionFaceInfo_type[] /* Details of each face. */;
|
faces: ExtrusionFaceInfo_type[] /* Details of each face. */;
|
||||||
}
|
}
|
||||||
@ -5320,6 +5405,15 @@ export interface UpdatePaymentBalance_type {
|
|||||||
pre_pay_credits_remaining?: number;
|
pre_pay_credits_remaining?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface UpdateShortlinkRequest_type {
|
||||||
|
/*{
|
||||||
|
"nullable": true,
|
||||||
|
"description": "The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here."
|
||||||
|
}*/
|
||||||
|
password?: string;
|
||||||
|
restrict_to_org: boolean /* If the shortlink should be restricted to the user's organization to view. This only applies to org shortlinks. If you are creating a user shortlink and you are not a member of a team or enterprise and you try to set this to true, it will fail. */;
|
||||||
|
}
|
||||||
|
|
||||||
export interface UpdateUser_type {
|
export interface UpdateUser_type {
|
||||||
company: string /* The user's company. */;
|
company: string /* The user's company. */;
|
||||||
discord: string /* The user's Discord handle. */;
|
discord: string /* The user's Discord handle. */;
|
||||||
@ -5382,6 +5476,8 @@ export interface User_type {
|
|||||||
updated_at: string;
|
updated_at: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type UserIdentifier_type = string;
|
||||||
|
|
||||||
export interface UserOrgInfo_type {
|
export interface UserOrgInfo_type {
|
||||||
/*{
|
/*{
|
||||||
"nullable": true,
|
"nullable": true,
|
||||||
@ -5535,6 +5631,13 @@ export type WebSocketResponse_type =
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type ZooProductSubscription_type = {
|
export type ZooProductSubscription_type = {
|
||||||
|
/*{
|
||||||
|
"nullable": true,
|
||||||
|
"format": "uint",
|
||||||
|
"minimum": 0,
|
||||||
|
"description": "Annual discount. The percentage off the monthly price if the user pays annually."
|
||||||
|
}*/
|
||||||
|
annual_discount?: number;
|
||||||
description: string /* A description of the tier. */;
|
description: string /* A description of the tier. */;
|
||||||
/* minItems:0, maxItems:15, description:Features that are included in the subscription. */
|
/* minItems:0, maxItems:15, description:Features that are included in the subscription. */
|
||||||
features: SubscriptionTierFeature_type[];
|
features: SubscriptionTierFeature_type[];
|
||||||
@ -5546,6 +5649,7 @@ export type ZooProductSubscription_type = {
|
|||||||
}*/
|
}*/
|
||||||
pay_as_you_go_credits: number;
|
pay_as_you_go_credits: number;
|
||||||
price: SubscriptionTierPrice_type /* The price of the tier per month. If this is for an individual, this is the price they pay. If this is for an organization, this is the price the organization pays per member in the org. This is in USD. */;
|
price: SubscriptionTierPrice_type /* The price of the tier per month. If this is for an individual, this is the price they pay. If this is for an organization, this is the price the organization pays per member in the org. This is in USD. */;
|
||||||
|
share_links: ModelingAppShareLinks_type[] /* The options for sharable links through the modeling app. */;
|
||||||
support_tier: SupportTier_type /* The support tier the subscription provides. */;
|
support_tier: SupportTier_type /* The support tier the subscription provides. */;
|
||||||
training_data_behavior: SubscriptionTrainingDataBehavior_type /* The behavior of the users data (can it be used for training, etc). */;
|
training_data_behavior: SubscriptionTrainingDataBehavior_type /* The behavior of the users data (can it be used for training, etc). */;
|
||||||
type: SubscriptionTierType_type /* If the tier is offered for an individual or an org. */;
|
type: SubscriptionTierType_type /* If the tier is offered for an individual or an org. */;
|
||||||
@ -5559,11 +5663,21 @@ export interface ZooProductSubscriptions_type {
|
|||||||
export interface ZooProductSubscriptionsOrgRequest_type {
|
export interface ZooProductSubscriptionsOrgRequest_type {
|
||||||
/* default:team, description:A modeling app subscription. */
|
/* default:team, description:A modeling app subscription. */
|
||||||
modeling_app: ModelingAppOrganizationSubscriptionTier_type;
|
modeling_app: ModelingAppOrganizationSubscriptionTier_type;
|
||||||
|
/*{
|
||||||
|
"nullable": true,
|
||||||
|
"description": "If the customer chooses to pay annually or monthly, we can add that here. The annual discount will apply if there is a discount for the subscription."
|
||||||
|
}*/
|
||||||
|
pay_annually?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ZooProductSubscriptionsUserRequest_type {
|
export interface ZooProductSubscriptionsUserRequest_type {
|
||||||
/* default:free, description:A modeling app subscription. */
|
/* default:free, description:A modeling app subscription. */
|
||||||
modeling_app: ModelingAppIndividualSubscriptionTier_type;
|
modeling_app: ModelingAppIndividualSubscriptionTier_type;
|
||||||
|
/*{
|
||||||
|
"nullable": true,
|
||||||
|
"description": "If the customer chooses to pay annually or monthly, we can add that here. The annual discount will apply if there is a discount for the subscription."
|
||||||
|
}*/
|
||||||
|
pay_annually?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ZooTool_type =
|
export type ZooTool_type =
|
||||||
@ -5624,6 +5738,8 @@ export interface Models {
|
|||||||
Connection_type: Connection_type;
|
Connection_type: Connection_type;
|
||||||
CountryCode_type: CountryCode_type;
|
CountryCode_type: CountryCode_type;
|
||||||
Coupon_type: Coupon_type;
|
Coupon_type: Coupon_type;
|
||||||
|
CreateShortlinkRequest_type: CreateShortlinkRequest_type;
|
||||||
|
CreateShortlinkResponse_type: CreateShortlinkResponse_type;
|
||||||
CreatedAtSortMode_type: CreatedAtSortMode_type;
|
CreatedAtSortMode_type: CreatedAtSortMode_type;
|
||||||
Currency_type: Currency_type;
|
Currency_type: Currency_type;
|
||||||
CurveGetControlPoints_type: CurveGetControlPoints_type;
|
CurveGetControlPoints_type: CurveGetControlPoints_type;
|
||||||
@ -5746,6 +5862,7 @@ export interface Models {
|
|||||||
ModelingAppEventType_type: ModelingAppEventType_type;
|
ModelingAppEventType_type: ModelingAppEventType_type;
|
||||||
ModelingAppIndividualSubscriptionTier_type: ModelingAppIndividualSubscriptionTier_type;
|
ModelingAppIndividualSubscriptionTier_type: ModelingAppIndividualSubscriptionTier_type;
|
||||||
ModelingAppOrganizationSubscriptionTier_type: ModelingAppOrganizationSubscriptionTier_type;
|
ModelingAppOrganizationSubscriptionTier_type: ModelingAppOrganizationSubscriptionTier_type;
|
||||||
|
ModelingAppShareLinks_type: ModelingAppShareLinks_type;
|
||||||
ModelingAppSubscriptionTier_type: ModelingAppSubscriptionTier_type;
|
ModelingAppSubscriptionTier_type: ModelingAppSubscriptionTier_type;
|
||||||
ModelingAppSubscriptionTierName_type: ModelingAppSubscriptionTierName_type;
|
ModelingAppSubscriptionTierName_type: ModelingAppSubscriptionTierName_type;
|
||||||
ModelingCmd_type: ModelingCmd_type;
|
ModelingCmd_type: ModelingCmd_type;
|
||||||
@ -5832,11 +5949,14 @@ export interface Models {
|
|||||||
SetSelectionFilter_type: SetSelectionFilter_type;
|
SetSelectionFilter_type: SetSelectionFilter_type;
|
||||||
SetSelectionType_type: SetSelectionType_type;
|
SetSelectionType_type: SetSelectionType_type;
|
||||||
SetTool_type: SetTool_type;
|
SetTool_type: SetTool_type;
|
||||||
|
Shortlink_type: Shortlink_type;
|
||||||
|
ShortlinkResultsPage_type: ShortlinkResultsPage_type;
|
||||||
SketchModeDisable_type: SketchModeDisable_type;
|
SketchModeDisable_type: SketchModeDisable_type;
|
||||||
Solid2dAddHole_type: Solid2dAddHole_type;
|
Solid2dAddHole_type: Solid2dAddHole_type;
|
||||||
Solid3dFilletEdge_type: Solid3dFilletEdge_type;
|
Solid3dFilletEdge_type: Solid3dFilletEdge_type;
|
||||||
Solid3dGetAllEdgeFaces_type: Solid3dGetAllEdgeFaces_type;
|
Solid3dGetAllEdgeFaces_type: Solid3dGetAllEdgeFaces_type;
|
||||||
Solid3dGetAllOppositeEdges_type: Solid3dGetAllOppositeEdges_type;
|
Solid3dGetAllOppositeEdges_type: Solid3dGetAllOppositeEdges_type;
|
||||||
|
Solid3dGetCommonEdge_type: Solid3dGetCommonEdge_type;
|
||||||
Solid3dGetExtrusionFaceInfo_type: Solid3dGetExtrusionFaceInfo_type;
|
Solid3dGetExtrusionFaceInfo_type: Solid3dGetExtrusionFaceInfo_type;
|
||||||
Solid3dGetNextAdjacentEdge_type: Solid3dGetNextAdjacentEdge_type;
|
Solid3dGetNextAdjacentEdge_type: Solid3dGetNextAdjacentEdge_type;
|
||||||
Solid3dGetOppositeEdge_type: Solid3dGetOppositeEdge_type;
|
Solid3dGetOppositeEdge_type: Solid3dGetOppositeEdge_type;
|
||||||
@ -5895,8 +6015,10 @@ export interface Models {
|
|||||||
UpdateAnnotation_type: UpdateAnnotation_type;
|
UpdateAnnotation_type: UpdateAnnotation_type;
|
||||||
UpdateMemberToOrgBody_type: UpdateMemberToOrgBody_type;
|
UpdateMemberToOrgBody_type: UpdateMemberToOrgBody_type;
|
||||||
UpdatePaymentBalance_type: UpdatePaymentBalance_type;
|
UpdatePaymentBalance_type: UpdatePaymentBalance_type;
|
||||||
|
UpdateShortlinkRequest_type: UpdateShortlinkRequest_type;
|
||||||
UpdateUser_type: UpdateUser_type;
|
UpdateUser_type: UpdateUser_type;
|
||||||
User_type: User_type;
|
User_type: User_type;
|
||||||
|
UserIdentifier_type: UserIdentifier_type;
|
||||||
UserOrgInfo_type: UserOrgInfo_type;
|
UserOrgInfo_type: UserOrgInfo_type;
|
||||||
UserOrgRole_type: UserOrgRole_type;
|
UserOrgRole_type: UserOrgRole_type;
|
||||||
UserResultsPage_type: UserResultsPage_type;
|
UserResultsPage_type: UserResultsPage_type;
|
||||||
|
Reference in New Issue
Block a user