@studyfetch/sdk 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/resources/v1/admin/admin.d.mts +2 -11
- package/resources/v1/admin/admin.d.mts.map +1 -1
- package/resources/v1/admin/admin.d.ts +2 -11
- package/resources/v1/admin/admin.d.ts.map +1 -1
- package/resources/v1/admin/admin.js +0 -13
- package/resources/v1/admin/admin.js.map +1 -1
- package/resources/v1/admin/admin.mjs +0 -13
- package/resources/v1/admin/admin.mjs.map +1 -1
- package/resources/v1/admin/index.d.mts +1 -1
- package/resources/v1/admin/index.d.mts.map +1 -1
- package/resources/v1/admin/index.d.ts +1 -1
- package/resources/v1/admin/index.d.ts.map +1 -1
- package/resources/v1/admin/index.js.map +1 -1
- package/resources/v1/admin/index.mjs.map +1 -1
- package/resources/v1/admin/models.d.mts +0 -9
- package/resources/v1/admin/models.d.mts.map +1 -1
- package/resources/v1/admin/models.d.ts +0 -9
- package/resources/v1/admin/models.d.ts.map +1 -1
- package/resources/v1/admin/models.js +0 -13
- package/resources/v1/admin/models.js.map +1 -1
- package/resources/v1/admin/models.mjs +0 -13
- package/resources/v1/admin/models.mjs.map +1 -1
- package/resources/v1/admin/organization-invites.d.mts +0 -37
- package/resources/v1/admin/organization-invites.d.mts.map +1 -1
- package/resources/v1/admin/organization-invites.d.ts +0 -37
- package/resources/v1/admin/organization-invites.d.ts.map +1 -1
- package/resources/v1/admin/organization-invites.js +0 -53
- package/resources/v1/admin/organization-invites.js.map +1 -1
- package/resources/v1/admin/organization-invites.mjs +0 -53
- package/resources/v1/admin/organization-invites.mjs.map +1 -1
- package/resources/v1/admin/organizations/models/excluded.d.mts +0 -20
- package/resources/v1/admin/organizations/models/excluded.d.mts.map +1 -1
- package/resources/v1/admin/organizations/models/excluded.d.ts +0 -20
- package/resources/v1/admin/organizations/models/excluded.d.ts.map +1 -1
- package/resources/v1/admin/organizations/models/excluded.js +0 -30
- package/resources/v1/admin/organizations/models/excluded.js.map +1 -1
- package/resources/v1/admin/organizations/models/excluded.mjs +0 -30
- package/resources/v1/admin/organizations/models/excluded.mjs.map +1 -1
- package/resources/v1/admin/organizations/organizations.d.mts +0 -9
- package/resources/v1/admin/organizations/organizations.d.mts.map +1 -1
- package/resources/v1/admin/organizations/organizations.d.ts +0 -9
- package/resources/v1/admin/organizations/organizations.d.ts.map +1 -1
- package/resources/v1/admin/organizations/organizations.js +0 -13
- package/resources/v1/admin/organizations/organizations.js.map +1 -1
- package/resources/v1/admin/organizations/organizations.mjs +0 -13
- package/resources/v1/admin/organizations/organizations.mjs.map +1 -1
- package/resources/v1/components.d.mts +239 -11
- package/resources/v1/components.d.mts.map +1 -1
- package/resources/v1/components.d.ts +239 -11
- package/resources/v1/components.d.ts.map +1 -1
- package/resources/v1/components.js +10 -29
- package/resources/v1/components.js.map +1 -1
- package/resources/v1/components.mjs +10 -29
- package/resources/v1/components.mjs.map +1 -1
- package/resources/v1/index.d.mts +2 -2
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -2
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/materials/index.d.mts +2 -2
- package/resources/v1/materials/index.d.mts.map +1 -1
- package/resources/v1/materials/index.d.ts +2 -2
- package/resources/v1/materials/index.d.ts.map +1 -1
- package/resources/v1/materials/index.js.map +1 -1
- package/resources/v1/materials/index.mjs +1 -1
- package/resources/v1/materials/index.mjs.map +1 -1
- package/resources/v1/materials/materials.d.mts +192 -9
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +192 -9
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +6 -17
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +7 -18
- package/resources/v1/materials/materials.mjs.map +1 -1
- package/resources/v1/materials/upload.d.mts +133 -11
- package/resources/v1/materials/upload.d.mts.map +1 -1
- package/resources/v1/materials/upload.d.ts +133 -11
- package/resources/v1/materials/upload.d.ts.map +1 -1
- package/resources/v1/materials/upload.js +12 -14
- package/resources/v1/materials/upload.js.map +1 -1
- package/resources/v1/materials/upload.mjs +12 -14
- package/resources/v1/materials/upload.mjs.map +1 -1
- package/resources/v1/v1.d.mts +4 -4
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +4 -4
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/admin/admin.ts +2 -21
- package/src/resources/v1/admin/index.ts +1 -1
- package/src/resources/v1/admin/models.ts +1 -17
- package/src/resources/v1/admin/organization-invites.ts +1 -66
- package/src/resources/v1/admin/organizations/models/excluded.ts +1 -35
- package/src/resources/v1/admin/organizations/organizations.ts +0 -16
- package/src/resources/v1/components.ts +312 -34
- package/src/resources/v1/index.ts +8 -0
- package/src/resources/v1/materials/index.ts +10 -1
- package/src/resources/v1/materials/materials.ts +262 -21
- package/src/resources/v1/materials/upload.ts +175 -19
- package/src/resources/v1/v1.ts +16 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -4,31 +4,15 @@ import { APIResource } from '../../../core/resource';
|
|
|
4
4
|
import * as ModelsAPI from './models';
|
|
5
5
|
import { Models } from './models';
|
|
6
6
|
import * as OrganizationInvitesAPI from './organization-invites';
|
|
7
|
-
import {
|
|
7
|
+
import { OrganizationInvites } from './organization-invites';
|
|
8
8
|
import * as OrganizationsAPI from './organizations/organizations';
|
|
9
9
|
import { Organizations } from './organizations/organizations';
|
|
10
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
11
|
-
import { buildHeaders } from '../../../internal/headers';
|
|
12
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
13
10
|
|
|
14
11
|
export class Admin extends APIResource {
|
|
15
12
|
organizationInvites: OrganizationInvitesAPI.OrganizationInvites =
|
|
16
13
|
new OrganizationInvitesAPI.OrganizationInvites(this._client);
|
|
17
14
|
organizations: OrganizationsAPI.Organizations = new OrganizationsAPI.Organizations(this._client);
|
|
18
15
|
models: ModelsAPI.Models = new ModelsAPI.Models(this._client);
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* await client.v1.admin.getUsers();
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
getUsers(options?: RequestOptions): APIPromise<void> {
|
|
27
|
-
return this._client.get('/api/v1/admin/users', {
|
|
28
|
-
...options,
|
|
29
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
16
|
}
|
|
33
17
|
|
|
34
18
|
Admin.OrganizationInvites = OrganizationInvites;
|
|
@@ -36,10 +20,7 @@ Admin.Organizations = Organizations;
|
|
|
36
20
|
Admin.Models = Models;
|
|
37
21
|
|
|
38
22
|
export declare namespace Admin {
|
|
39
|
-
export {
|
|
40
|
-
OrganizationInvites as OrganizationInvites,
|
|
41
|
-
type OrganizationInviteCreateParams as OrganizationInviteCreateParams,
|
|
42
|
-
};
|
|
23
|
+
export { OrganizationInvites as OrganizationInvites };
|
|
43
24
|
|
|
44
25
|
export { Organizations as Organizations };
|
|
45
26
|
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
export { Admin } from './admin';
|
|
4
4
|
export { Models } from './models';
|
|
5
|
-
export { OrganizationInvites
|
|
5
|
+
export { OrganizationInvites } from './organization-invites';
|
|
6
6
|
export { Organizations } from './organizations/index';
|
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
-
import { buildHeaders } from '../../../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
4
|
|
|
8
|
-
export class Models extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* await client.v1.admin.models.listAll();
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
listAll(options?: RequestOptions): APIPromise<void> {
|
|
16
|
-
return this._client.get('/api/v1/admin/models/all', {
|
|
17
|
-
...options,
|
|
18
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
5
|
+
export class Models extends APIResource {}
|
|
@@ -1,70 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
-
import { buildHeaders } from '../../../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
-
import { path } from '../../../internal/utils/path';
|
|
8
4
|
|
|
9
|
-
export class OrganizationInvites extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Create organization invite
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* await client.v1.admin.organizationInvites.create();
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
create(body: OrganizationInviteCreateParams, options?: RequestOptions): APIPromise<void> {
|
|
19
|
-
return this._client.post('/api/v1/admin/organization-invites', {
|
|
20
|
-
body,
|
|
21
|
-
...options,
|
|
22
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* await client.v1.admin.organizationInvites.list();
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
list(options?: RequestOptions): APIPromise<void> {
|
|
33
|
-
return this._client.get('/api/v1/admin/organization-invites', {
|
|
34
|
-
...options,
|
|
35
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @example
|
|
41
|
-
* ```ts
|
|
42
|
-
* await client.v1.admin.organizationInvites.delete('id');
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
46
|
-
return this._client.delete(path`/api/v1/admin/organization-invites/${id}`, {
|
|
47
|
-
...options,
|
|
48
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* @example
|
|
54
|
-
* ```ts
|
|
55
|
-
* await client.v1.admin.organizationInvites.resend('id');
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
resend(id: string, options?: RequestOptions): APIPromise<void> {
|
|
59
|
-
return this._client.post(path`/api/v1/admin/organization-invites/${id}/resend`, {
|
|
60
|
-
...options,
|
|
61
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface OrganizationInviteCreateParams {}
|
|
67
|
-
|
|
68
|
-
export declare namespace OrganizationInvites {
|
|
69
|
-
export { type OrganizationInviteCreateParams as OrganizationInviteCreateParams };
|
|
70
|
-
}
|
|
5
|
+
export class OrganizationInvites extends APIResource {}
|
|
@@ -1,39 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../../../../core/api-promise';
|
|
5
|
-
import { buildHeaders } from '../../../../../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../../../../../internal/request-options';
|
|
7
|
-
import { path } from '../../../../../internal/utils/path';
|
|
8
4
|
|
|
9
|
-
export class Excluded extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* await client.v1.admin.organizations.models.excluded.create(
|
|
14
|
-
* 'organizationId',
|
|
15
|
-
* );
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
create(organizationID: string, options?: RequestOptions): APIPromise<void> {
|
|
19
|
-
return this._client.post(path`/api/v1/admin/organizations/${organizationID}/models/excluded`, {
|
|
20
|
-
...options,
|
|
21
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* await client.v1.admin.organizations.models.excluded.list(
|
|
29
|
-
* 'organizationId',
|
|
30
|
-
* );
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
list(organizationID: string, options?: RequestOptions): APIPromise<void> {
|
|
34
|
-
return this._client.get(path`/api/v1/admin/organizations/${organizationID}/models/excluded`, {
|
|
35
|
-
...options,
|
|
36
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
5
|
+
export class Excluded extends APIResource {}
|
|
@@ -3,25 +3,9 @@
|
|
|
3
3
|
import { APIResource } from '../../../../core/resource';
|
|
4
4
|
import * as ModelsAPI from './models/models';
|
|
5
5
|
import { Models } from './models/models';
|
|
6
|
-
import { APIPromise } from '../../../../core/api-promise';
|
|
7
|
-
import { buildHeaders } from '../../../../internal/headers';
|
|
8
|
-
import { RequestOptions } from '../../../../internal/request-options';
|
|
9
6
|
|
|
10
7
|
export class Organizations extends APIResource {
|
|
11
8
|
models: ModelsAPI.Models = new ModelsAPI.Models(this._client);
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* await client.v1.admin.organizations.list();
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
list(options?: RequestOptions): APIPromise<void> {
|
|
20
|
-
return this._client.get('/api/v1/admin/organizations', {
|
|
21
|
-
...options,
|
|
22
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
9
|
}
|
|
26
10
|
|
|
27
11
|
Organizations.Models = Models;
|
|
@@ -12,7 +12,7 @@ export class Components extends APIResource {
|
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts
|
|
15
|
-
* await client.v1.components.create({
|
|
15
|
+
* const component = await client.v1.components.create({
|
|
16
16
|
* config: {},
|
|
17
17
|
* name: 'My Study Component',
|
|
18
18
|
* origin: 'chat',
|
|
@@ -20,12 +20,8 @@ export class Components extends APIResource {
|
|
|
20
20
|
* });
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
create(body: ComponentCreateParams, options?: RequestOptions): APIPromise<
|
|
24
|
-
return this._client.post('/api/v1/components', {
|
|
25
|
-
body,
|
|
26
|
-
...options,
|
|
27
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
28
|
-
});
|
|
23
|
+
create(body: ComponentCreateParams, options?: RequestOptions): APIPromise<ComponentCreateResponse> {
|
|
24
|
+
return this._client.post('/api/v1/components', { body, ...options });
|
|
29
25
|
}
|
|
30
26
|
|
|
31
27
|
/**
|
|
@@ -33,14 +29,11 @@ export class Components extends APIResource {
|
|
|
33
29
|
*
|
|
34
30
|
* @example
|
|
35
31
|
* ```ts
|
|
36
|
-
* await client.v1.components.retrieve('id');
|
|
32
|
+
* const component = await client.v1.components.retrieve('id');
|
|
37
33
|
* ```
|
|
38
34
|
*/
|
|
39
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
40
|
-
return this._client.get(path`/api/v1/components/${id}`,
|
|
41
|
-
...options,
|
|
42
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
43
|
-
});
|
|
35
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<ComponentRetrieveResponse> {
|
|
36
|
+
return this._client.get(path`/api/v1/components/${id}`, options);
|
|
44
37
|
}
|
|
45
38
|
|
|
46
39
|
/**
|
|
@@ -48,15 +41,15 @@ export class Components extends APIResource {
|
|
|
48
41
|
*
|
|
49
42
|
* @example
|
|
50
43
|
* ```ts
|
|
51
|
-
* await client.v1.components.update('id');
|
|
44
|
+
* const component = await client.v1.components.update('id');
|
|
52
45
|
* ```
|
|
53
46
|
*/
|
|
54
|
-
update(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
47
|
+
update(
|
|
48
|
+
id: string,
|
|
49
|
+
body: ComponentUpdateParams,
|
|
50
|
+
options?: RequestOptions,
|
|
51
|
+
): APIPromise<ComponentUpdateResponse> {
|
|
52
|
+
return this._client.patch(path`/api/v1/components/${id}`, { body, ...options });
|
|
60
53
|
}
|
|
61
54
|
|
|
62
55
|
/**
|
|
@@ -64,15 +57,14 @@ export class Components extends APIResource {
|
|
|
64
57
|
*
|
|
65
58
|
* @example
|
|
66
59
|
* ```ts
|
|
67
|
-
* await client.v1.components.list();
|
|
60
|
+
* const components = await client.v1.components.list();
|
|
68
61
|
* ```
|
|
69
62
|
*/
|
|
70
|
-
list(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
63
|
+
list(
|
|
64
|
+
query: ComponentListParams | null | undefined = {},
|
|
65
|
+
options?: RequestOptions,
|
|
66
|
+
): APIPromise<ComponentListResponse> {
|
|
67
|
+
return this._client.get('/api/v1/components', { query, ...options });
|
|
76
68
|
}
|
|
77
69
|
|
|
78
70
|
/**
|
|
@@ -121,15 +113,15 @@ export class Components extends APIResource {
|
|
|
121
113
|
*
|
|
122
114
|
* @example
|
|
123
115
|
* ```ts
|
|
124
|
-
* await client.v1.components.embed('id');
|
|
116
|
+
* const response = await client.v1.components.embed('id');
|
|
125
117
|
* ```
|
|
126
118
|
*/
|
|
127
|
-
embed(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
});
|
|
119
|
+
embed(
|
|
120
|
+
id: string,
|
|
121
|
+
body: ComponentEmbedParams,
|
|
122
|
+
options?: RequestOptions,
|
|
123
|
+
): APIPromise<ComponentEmbedResponse> {
|
|
124
|
+
return this._client.post(path`/api/v1/components/${id}/embed`, { body, ...options });
|
|
133
125
|
}
|
|
134
126
|
|
|
135
127
|
/**
|
|
@@ -146,6 +138,287 @@ export class Components extends APIResource {
|
|
|
146
138
|
}
|
|
147
139
|
}
|
|
148
140
|
|
|
141
|
+
export interface ComponentCreateResponse {
|
|
142
|
+
/**
|
|
143
|
+
* Component ID (MongoDB ObjectId)
|
|
144
|
+
*/
|
|
145
|
+
_id: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Unique component identifier
|
|
149
|
+
*/
|
|
150
|
+
componentId: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Component configuration
|
|
154
|
+
*/
|
|
155
|
+
config: unknown;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Creation timestamp
|
|
159
|
+
*/
|
|
160
|
+
createdAt: string;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Component name
|
|
164
|
+
*/
|
|
165
|
+
name: string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Organization ID
|
|
169
|
+
*/
|
|
170
|
+
organization: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Component status
|
|
174
|
+
*/
|
|
175
|
+
status: 'active' | 'inactive' | 'draft';
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Component type
|
|
179
|
+
*/
|
|
180
|
+
type: 'chat' | 'flashcards' | 'tests' | 'scenarios' | 'explainers' | 'audio-recap';
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Last update timestamp
|
|
184
|
+
*/
|
|
185
|
+
updatedAt: string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Usage statistics
|
|
189
|
+
*/
|
|
190
|
+
usage: unknown;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Component description
|
|
194
|
+
*/
|
|
195
|
+
description?: string;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface ComponentRetrieveResponse {
|
|
199
|
+
/**
|
|
200
|
+
* Component ID (MongoDB ObjectId)
|
|
201
|
+
*/
|
|
202
|
+
_id: string;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Unique component identifier
|
|
206
|
+
*/
|
|
207
|
+
componentId: string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Component configuration
|
|
211
|
+
*/
|
|
212
|
+
config: unknown;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Creation timestamp
|
|
216
|
+
*/
|
|
217
|
+
createdAt: string;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Component name
|
|
221
|
+
*/
|
|
222
|
+
name: string;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Organization ID
|
|
226
|
+
*/
|
|
227
|
+
organization: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Component status
|
|
231
|
+
*/
|
|
232
|
+
status: 'active' | 'inactive' | 'draft';
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Component type
|
|
236
|
+
*/
|
|
237
|
+
type: 'chat' | 'flashcards' | 'tests' | 'scenarios' | 'explainers' | 'audio-recap';
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Last update timestamp
|
|
241
|
+
*/
|
|
242
|
+
updatedAt: string;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Usage statistics
|
|
246
|
+
*/
|
|
247
|
+
usage: unknown;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Component description
|
|
251
|
+
*/
|
|
252
|
+
description?: string;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface ComponentUpdateResponse {
|
|
256
|
+
/**
|
|
257
|
+
* Component ID (MongoDB ObjectId)
|
|
258
|
+
*/
|
|
259
|
+
_id: string;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Unique component identifier
|
|
263
|
+
*/
|
|
264
|
+
componentId: string;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Component configuration
|
|
268
|
+
*/
|
|
269
|
+
config: unknown;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Creation timestamp
|
|
273
|
+
*/
|
|
274
|
+
createdAt: string;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Component name
|
|
278
|
+
*/
|
|
279
|
+
name: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Organization ID
|
|
283
|
+
*/
|
|
284
|
+
organization: string;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Component status
|
|
288
|
+
*/
|
|
289
|
+
status: 'active' | 'inactive' | 'draft';
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Component type
|
|
293
|
+
*/
|
|
294
|
+
type: 'chat' | 'flashcards' | 'tests' | 'scenarios' | 'explainers' | 'audio-recap';
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Last update timestamp
|
|
298
|
+
*/
|
|
299
|
+
updatedAt: string;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Usage statistics
|
|
303
|
+
*/
|
|
304
|
+
usage: unknown;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Component description
|
|
308
|
+
*/
|
|
309
|
+
description?: string;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export type ComponentListResponse = Array<ComponentListResponse.ComponentListResponseItem>;
|
|
313
|
+
|
|
314
|
+
export namespace ComponentListResponse {
|
|
315
|
+
export interface ComponentListResponseItem {
|
|
316
|
+
/**
|
|
317
|
+
* Component ID (MongoDB ObjectId)
|
|
318
|
+
*/
|
|
319
|
+
_id: string;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Unique component identifier
|
|
323
|
+
*/
|
|
324
|
+
componentId: string;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Component configuration
|
|
328
|
+
*/
|
|
329
|
+
config: unknown;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Creation timestamp
|
|
333
|
+
*/
|
|
334
|
+
createdAt: string;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Component name
|
|
338
|
+
*/
|
|
339
|
+
name: string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Organization ID
|
|
343
|
+
*/
|
|
344
|
+
organization: string;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Component status
|
|
348
|
+
*/
|
|
349
|
+
status: 'active' | 'inactive' | 'draft';
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Component type
|
|
353
|
+
*/
|
|
354
|
+
type: 'chat' | 'flashcards' | 'tests' | 'scenarios' | 'explainers' | 'audio-recap';
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Last update timestamp
|
|
358
|
+
*/
|
|
359
|
+
updatedAt: string;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Usage statistics
|
|
363
|
+
*/
|
|
364
|
+
usage: unknown;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Component description
|
|
368
|
+
*/
|
|
369
|
+
description?: string;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export interface ComponentEmbedResponse {
|
|
374
|
+
/**
|
|
375
|
+
* JWT token for authentication
|
|
376
|
+
*/
|
|
377
|
+
token: string;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Component ID
|
|
381
|
+
*/
|
|
382
|
+
componentId: string;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Component type
|
|
386
|
+
*/
|
|
387
|
+
componentType: string;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* The embed URL for iframe integration
|
|
391
|
+
*/
|
|
392
|
+
embedUrl: string;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Token expiration timestamp
|
|
396
|
+
*/
|
|
397
|
+
expiresAt: string;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Embed options
|
|
401
|
+
*/
|
|
402
|
+
options: ComponentEmbedResponse.Options;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export namespace ComponentEmbedResponse {
|
|
406
|
+
/**
|
|
407
|
+
* Embed options
|
|
408
|
+
*/
|
|
409
|
+
export interface Options {
|
|
410
|
+
/**
|
|
411
|
+
* Embed height
|
|
412
|
+
*/
|
|
413
|
+
height?: string;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Embed width
|
|
417
|
+
*/
|
|
418
|
+
width?: string;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
149
422
|
export interface ComponentCreateParams {
|
|
150
423
|
/**
|
|
151
424
|
* Component-specific configuration
|
|
@@ -364,6 +637,11 @@ export namespace ComponentEmbedParams {
|
|
|
364
637
|
|
|
365
638
|
export declare namespace Components {
|
|
366
639
|
export {
|
|
640
|
+
type ComponentCreateResponse as ComponentCreateResponse,
|
|
641
|
+
type ComponentRetrieveResponse as ComponentRetrieveResponse,
|
|
642
|
+
type ComponentUpdateResponse as ComponentUpdateResponse,
|
|
643
|
+
type ComponentListResponse as ComponentListResponse,
|
|
644
|
+
type ComponentEmbedResponse as ComponentEmbedResponse,
|
|
367
645
|
type ComponentCreateParams as ComponentCreateParams,
|
|
368
646
|
type ComponentUpdateParams as ComponentUpdateParams,
|
|
369
647
|
type ComponentListParams as ComponentListParams,
|
|
@@ -22,6 +22,11 @@ export {
|
|
|
22
22
|
} from './chat/index';
|
|
23
23
|
export {
|
|
24
24
|
Components,
|
|
25
|
+
type ComponentCreateResponse,
|
|
26
|
+
type ComponentRetrieveResponse,
|
|
27
|
+
type ComponentUpdateResponse,
|
|
28
|
+
type ComponentListResponse,
|
|
29
|
+
type ComponentEmbedResponse,
|
|
25
30
|
type ComponentCreateParams,
|
|
26
31
|
type ComponentUpdateParams,
|
|
27
32
|
type ComponentListParams,
|
|
@@ -43,6 +48,9 @@ export {
|
|
|
43
48
|
export { Folders, type FolderCreateParams, type FolderUpdateParams, type FolderListParams } from './folders';
|
|
44
49
|
export {
|
|
45
50
|
Materials,
|
|
51
|
+
type MaterialCreateResponse,
|
|
52
|
+
type MaterialRetrieveResponse,
|
|
53
|
+
type MaterialListResponse,
|
|
46
54
|
type MaterialCreateParams,
|
|
47
55
|
type MaterialListParams,
|
|
48
56
|
type MaterialGetDownloadURLParams,
|
|
@@ -3,9 +3,18 @@
|
|
|
3
3
|
export { Bulk } from './bulk';
|
|
4
4
|
export {
|
|
5
5
|
Materials,
|
|
6
|
+
type MaterialCreateResponse,
|
|
7
|
+
type MaterialRetrieveResponse,
|
|
8
|
+
type MaterialListResponse,
|
|
6
9
|
type MaterialCreateParams,
|
|
7
10
|
type MaterialListParams,
|
|
8
11
|
type MaterialGetDownloadURLParams,
|
|
9
12
|
} from './materials';
|
|
10
13
|
export { Test } from './test';
|
|
11
|
-
export {
|
|
14
|
+
export {
|
|
15
|
+
Upload,
|
|
16
|
+
type UploadUploadFileResponse,
|
|
17
|
+
type UploadUploadFromURLResponse,
|
|
18
|
+
type UploadUploadFileParams,
|
|
19
|
+
type UploadUploadFromURLParams,
|
|
20
|
+
} from './upload';
|