Skip to content

Commit 2b64849

Browse files
zoo-github-actions-auth[bot]github-actions[bot]Irev-Dev
authored
Update api spec (#217)
* YOYO NEW API SPEC! * update apiGen * tests * Generated new lib * bump v --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <[email protected]>
1 parent 160f1fa commit 2b64849

14 files changed

+1675
-140
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { orgs } from '../../src/index.js';
2+
3+
async function example() {
4+
const response = await orgs.create_org_saml_idp({
5+
body: {
6+
idp_entity_id: 'The entity ID of the SAML identity provider.',
7+
idp_metadata_source: {
8+
type: 'url',
9+
url: 'The URL of the identity provider metadata descriptor.',
10+
},
11+
signing_keypair: {
12+
private_key: 'The request signing private key (pem file).',
13+
public_cert: 'The request signing public certificate (pem file).',
14+
},
15+
technical_contact_email:
16+
'The technical contact email address for the SAML identity provider.',
17+
},
18+
});
19+
if ('error_code' in response) throw response;
20+
21+
return response;
22+
}
23+
24+
describe('Testing orgs.create_org_saml_idp', () => {
25+
it('should be truthy or throw', async () => {
26+
expect(await example()).toBeTruthy();
27+
});
28+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { orgs } from '../../src/index.js';
2+
3+
async function example() {
4+
const response = await orgs.delete_org_saml_idp();
5+
if ('error_code' in response) throw response;
6+
7+
return response;
8+
}
9+
10+
describe('Testing orgs.delete_org_saml_idp', () => {
11+
it('should be truthy or throw', async () => {
12+
try {
13+
await example();
14+
} catch (err) {
15+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
16+
}
17+
});
18+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { orgs } from '../../src/index.js';
2+
3+
async function example() {
4+
const response = await orgs.get_org_saml_idp();
5+
if ('error_code' in response) throw response;
6+
7+
return response;
8+
}
9+
10+
describe('Testing orgs.get_org_saml_idp', () => {
11+
it('should be truthy or throw', async () => {
12+
try {
13+
await example();
14+
} catch (err) {
15+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
16+
}
17+
});
18+
});
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { orgs } from '../../src/index.js';
2+
3+
async function example() {
4+
const response = await orgs.update_org_saml_idp({
5+
body: {
6+
idp_entity_id: 'The entity ID of the SAML identity provider.',
7+
idp_metadata_source: {
8+
type: 'url',
9+
url: 'The URL of the identity provider metadata descriptor.',
10+
},
11+
signing_keypair: {
12+
private_key: 'The request signing private key (pem file).',
13+
public_cert: 'The request signing public certificate (pem file).',
14+
},
15+
technical_contact_email:
16+
'The technical contact email address for the SAML identity provider.',
17+
},
18+
});
19+
if ('error_code' in response) throw response;
20+
21+
return response;
22+
}
23+
24+
describe('Testing orgs.update_org_saml_idp', () => {
25+
it('should be truthy or throw', async () => {
26+
expect(await example()).toBeTruthy();
27+
});
28+
});

kittycad.ts.patch.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"op": "add",
44
"path": "/paths/~1ws~1modeling~1commands/get/x-typescript",
55
"value": {
6-
"example": "import { modeling } from '@kittycad/lib'\n\nasync function example() {\n const response = await modeling.modeling_commands_ws({\n fps: 7,\n unlocked_framerate: true,\n video_res_height: 7,\n video_res_width: 7,\n webrtc: true,\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
6+
"example": "import { modeling } from '@kittycad/lib'\n\nasync function example() {\n const response = await modeling.modeling_commands_ws({\n fps: 7,\n unlocked_framerate: true,\n video_res_height: 7,\n video_res_width: 7,\n webrtc: true,\n body: {\n candidate: {\n candidate: 'The candidate string associated with the object.',\n sdpMLineIndex: 7,\n sdpMid: \"The identifier of the 'media stream identification' as defined in [RFC 8841](https://tools.ietf.org/html/rfc8841).\",\n usernameFragment:\n 'The username fragment (as defined in [RFC 8445](https://tools.ietf.org/html/rfc8445#section-5.2.1)) associated with the object.',\n },\n type: 'trickle_ice',\n },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
77
"libDocsLink": ""
88
}
99
},
@@ -383,6 +383,38 @@
383383
"libDocsLink": ""
384384
}
385385
},
386+
{
387+
"op": "add",
388+
"path": "/paths/~1org~1saml~1idp/delete/x-typescript",
389+
"value": {
390+
"example": "import { orgs } from '@kittycad/lib'\n\nasync function example() {\n const response = await orgs.delete_org_saml_idp()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
391+
"libDocsLink": ""
392+
}
393+
},
394+
{
395+
"op": "add",
396+
"path": "/paths/~1org~1saml~1idp/post/x-typescript",
397+
"value": {
398+
"example": "import { orgs } from '@kittycad/lib'\n\nasync function example() {\n const response = await orgs.create_org_saml_idp({\n body: {\n idp_entity_id: 'The entity ID of the SAML identity provider.',\n idp_metadata_source: {\n type: 'url',\n url: 'The URL of the identity provider metadata descriptor.',\n },\n signing_keypair: {\n private_key: 'The request signing private key (pem file).',\n public_cert:\n 'The request signing public certificate (pem file).',\n },\n technical_contact_email:\n 'The technical contact email address for the SAML identity provider.',\n },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
399+
"libDocsLink": ""
400+
}
401+
},
402+
{
403+
"op": "add",
404+
"path": "/paths/~1org~1saml~1idp/put/x-typescript",
405+
"value": {
406+
"example": "import { orgs } from '@kittycad/lib'\n\nasync function example() {\n const response = await orgs.update_org_saml_idp({\n body: {\n idp_entity_id: 'The entity ID of the SAML identity provider.',\n idp_metadata_source: {\n type: 'url',\n url: 'The URL of the identity provider metadata descriptor.',\n },\n signing_keypair: {\n private_key: 'The request signing private key (pem file).',\n public_cert:\n 'The request signing public certificate (pem file).',\n },\n technical_contact_email:\n 'The technical contact email address for the SAML identity provider.',\n },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
407+
"libDocsLink": ""
408+
}
409+
},
410+
{
411+
"op": "add",
412+
"path": "/paths/~1org~1saml~1idp/get/x-typescript",
413+
"value": {
414+
"example": "import { orgs } from '@kittycad/lib'\n\nasync function example() {\n const response = await orgs.get_org_saml_idp()\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
415+
"libDocsLink": ""
416+
}
417+
},
386418
{
387419
"op": "add",
388420
"path": "/paths/~1org~1payment~1tax/get/x-typescript",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kittycad/lib",
3-
"version": "0.0.52",
3+
"version": "0.0.53",
44
"description": "Javascript library for KittyCAD API",
55
"type": "module",
66
"keywords": [

0 commit comments

Comments
 (0)