Skip to content

Commit 39968ed

Browse files
Update api spec (#196)
* YOYO NEW API SPEC! * Generated new lib --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 284535d commit 39968ed

8 files changed

+444
-116
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { ai } from '../../src/index.js';
2+
3+
async function example() {
4+
const response = await ai.get_text_to_cad_model_for_user({ id: 'string' });
5+
if ('error_code' in response) throw response;
6+
7+
return response;
8+
}
9+
10+
describe('Testing ai.get_text_to_cad_model_for_user', () => {
11+
it('should be truthy or throw', async () => {
12+
expect(await example()).toBeTruthy();
13+
});
14+
});

__tests__/gen/oauth2-oauth2_provider_callback.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { oauth2 } from '../../src/index.js';
22

33
async function example() {
44
const response = await oauth2.oauth2_provider_callback({
5-
provider: 'google',
5+
provider: 'discord',
66
code: 'string',
77
state: 'string',
88
});

__tests__/gen/oauth2-oauth2_provider_consent.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { oauth2 } from '../../src/index.js';
22

33
async function example() {
44
const response = await oauth2.oauth2_provider_consent({
5-
provider: 'google',
5+
provider: 'discord',
66
callback_url: 'string',
77
});
88
if ('error_code' in response) throw response;

kittycad.ts.patch.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@
6363
"libDocsLink": ""
6464
}
6565
},
66+
{
67+
"op": "add",
68+
"path": "/paths/~1user~1text-to-cad~1{id}/get/x-typescript",
69+
"value": {
70+
"example": "import { ai } from '@kittycad/lib'\n\nasync function example() {\n const response = await ai.get_text_to_cad_model_for_user({ id: 'string' })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
71+
"libDocsLink": ""
72+
}
73+
},
6674
{
6775
"op": "add",
6876
"path": "/paths/~1user~1text-to-cad/get/x-typescript",
@@ -379,15 +387,15 @@
379387
"op": "add",
380388
"path": "/paths/~1oauth2~1provider~1{provider}~1consent/get/x-typescript",
381389
"value": {
382-
"example": "import { oauth2 } from '@kittycad/lib'\n\nasync function example() {\n const response = await oauth2.oauth2_provider_consent({\n provider: 'google',\n callback_url: 'string',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
390+
"example": "import { oauth2 } from '@kittycad/lib'\n\nasync function example() {\n const response = await oauth2.oauth2_provider_consent({\n provider: 'discord',\n callback_url: 'string',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
383391
"libDocsLink": ""
384392
}
385393
},
386394
{
387395
"op": "add",
388396
"path": "/paths/~1oauth2~1provider~1{provider}~1callback/get/x-typescript",
389397
"value": {
390-
"example": "import { oauth2 } from '@kittycad/lib'\n\nasync function example() {\n const response = await oauth2.oauth2_provider_callback({\n provider: 'google',\n code: 'string',\n state: 'string',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
398+
"example": "import { oauth2 } from '@kittycad/lib'\n\nasync function example() {\n const response = await oauth2.oauth2_provider_callback({\n provider: 'discord',\n code: 'string',\n state: 'string',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
391399
"libDocsLink": ""
392400
}
393401
},

0 commit comments

Comments
 (0)