Skip to content

Commit a6d2a73

Browse files
zoo-github-actions-auth[bot]github-actions[bot]Irev-Dev
authored
Update api spec (#214)
* YOYO NEW API SPEC! * add extra if statements * expect org tests to fail atm * 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 e8b4e3a commit a6d2a73

File tree

59 files changed

+4451
-299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

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

__tests__/gen/api-tokens-create_api_token_for_user.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { api_tokens } from '../../src/index.js';
22

33
async function example() {
4-
const response = await api_tokens.create_api_token_for_user();
4+
const response = await api_tokens.create_api_token_for_user({
5+
label: 'string',
6+
});
57
if ('error_code' in response) throw response;
68

79
return response;

__tests__/gen/oauth2-oauth2_provider_callback.test.ts

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

33
async function example() {
44
const response = await oauth2.oauth2_provider_callback({
5-
provider: 'discord',
5+
provider: 'apple',
66
code: 'string',
7+
id_token: 'string',
78
state: 'string',
9+
user: 'string',
810
});
911
if ('error_code' in response) throw response;
1012

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

__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: 'discord',
5+
provider: 'apple',
66
callback_url: 'string',
77
});
88
if ('error_code' in response) throw response;

__tests__/gen/orgs-create_org.test.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { orgs } from '../../src/index.js';
2+
3+
async function example() {
4+
const response = await orgs.create_org({
5+
body: {
6+
allow_users_in_domain_to_auto_join: true,
7+
billing_email: 'The billing email address of the org.',
8+
domain: "The org's domain.",
9+
image: 'The image for the org. This is a URL.',
10+
name: 'The name of the org.',
11+
phone: "The org's phone number.",
12+
},
13+
});
14+
if ('error_code' in response) throw response;
15+
16+
return response;
17+
}
18+
19+
describe('Testing orgs.create_org', () => {
20+
it('should be truthy or throw', async () => {
21+
expect(await example()).toBeTruthy();
22+
});
23+
});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { orgs } from '../../src/index.js';
2+
3+
async function example() {
4+
const response = await orgs.create_org_member({
5+
body: {
6+
email: 'The email address of the user to add to the org.',
7+
role: 'admin',
8+
},
9+
});
10+
if ('error_code' in response) throw response;
11+
12+
return response;
13+
}
14+
15+
describe('Testing orgs.create_org_member', () => {
16+
it('should be truthy or throw', async () => {
17+
expect(await example()).toBeTruthy();
18+
});
19+
});

__tests__/gen/orgs-delete_org.test.ts

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();
5+
if ('error_code' in response) throw response;
6+
7+
return response;
8+
}
9+
10+
describe('Testing orgs.delete_org', () => {
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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { orgs } from '../../src/index.js';
2+
3+
async function example() {
4+
const response = await orgs.delete_org_member({
5+
user_id: '00000000-0000-0000-0000-000000000000',
6+
});
7+
if ('error_code' in response) throw response;
8+
9+
return response;
10+
}
11+
12+
describe('Testing orgs.delete_org_member', () => {
13+
it('should be truthy or throw', async () => {
14+
try {
15+
await example();
16+
} catch (err) {
17+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
18+
}
19+
});
20+
});

0 commit comments

Comments
 (0)