@studyfetch/sdk 1.24.0 → 1.26.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 +18 -0
- package/package.json +1 -1
- package/resources/v1/assignment-grader.d.mts +34 -1
- package/resources/v1/assignment-grader.d.mts.map +1 -1
- package/resources/v1/assignment-grader.d.ts +34 -1
- package/resources/v1/assignment-grader.d.ts.map +1 -1
- package/resources/v1/assignment-grader.js +15 -0
- package/resources/v1/assignment-grader.js.map +1 -1
- package/resources/v1/assignment-grader.mjs +15 -0
- package/resources/v1/assignment-grader.mjs.map +1 -1
- package/resources/v1/chat/chat.d.mts +62 -1
- package/resources/v1/chat/chat.d.mts.map +1 -1
- package/resources/v1/chat/chat.d.ts +62 -1
- package/resources/v1/chat/chat.d.ts.map +1 -1
- package/resources/v1/chat/chat.js.map +1 -1
- package/resources/v1/chat/chat.mjs.map +1 -1
- package/resources/v1/chat/index.d.mts +1 -1
- package/resources/v1/chat/index.d.mts.map +1 -1
- package/resources/v1/chat/index.d.ts +1 -1
- package/resources/v1/chat/index.d.ts.map +1 -1
- package/resources/v1/chat/index.js.map +1 -1
- package/resources/v1/chat/index.mjs +1 -1
- package/resources/v1/chat/index.mjs.map +1 -1
- package/resources/v1/components.d.mts +62 -4
- package/resources/v1/components.d.mts.map +1 -1
- package/resources/v1/components.d.ts +62 -4
- package/resources/v1/components.d.ts.map +1 -1
- package/resources/v1/data-analyst/data-analyst.d.mts +156 -0
- package/resources/v1/data-analyst/data-analyst.d.mts.map +1 -0
- package/resources/v1/data-analyst/data-analyst.d.ts +156 -0
- package/resources/v1/data-analyst/data-analyst.d.ts.map +1 -0
- package/resources/v1/data-analyst/data-analyst.js +99 -0
- package/resources/v1/data-analyst/data-analyst.js.map +1 -0
- package/resources/v1/data-analyst/data-analyst.mjs +94 -0
- package/resources/v1/data-analyst/data-analyst.mjs.map +1 -0
- package/resources/v1/data-analyst/index.d.mts +4 -0
- package/resources/v1/data-analyst/index.d.mts.map +1 -0
- package/resources/v1/data-analyst/index.d.ts +4 -0
- package/resources/v1/data-analyst/index.d.ts.map +1 -0
- package/resources/v1/data-analyst/index.js +11 -0
- package/resources/v1/data-analyst/index.js.map +1 -0
- package/resources/v1/data-analyst/index.mjs +5 -0
- package/resources/v1/data-analyst/index.mjs.map +1 -0
- package/resources/v1/data-analyst/sessions.d.mts +28 -0
- package/resources/v1/data-analyst/sessions.d.mts.map +1 -0
- package/resources/v1/data-analyst/sessions.d.ts +28 -0
- package/resources/v1/data-analyst/sessions.d.ts.map +1 -0
- package/resources/v1/data-analyst/sessions.js +38 -0
- package/resources/v1/data-analyst/sessions.js.map +1 -0
- package/resources/v1/data-analyst/sessions.mjs +34 -0
- package/resources/v1/data-analyst/sessions.mjs.map +1 -0
- package/resources/v1/data-analyst/test.d.mts +20 -0
- package/resources/v1/data-analyst/test.d.mts.map +1 -0
- package/resources/v1/data-analyst/test.d.ts +20 -0
- package/resources/v1/data-analyst/test.d.ts.map +1 -0
- package/resources/v1/data-analyst/test.js +34 -0
- package/resources/v1/data-analyst/test.js.map +1 -0
- package/resources/v1/data-analyst/test.mjs +30 -0
- package/resources/v1/data-analyst/test.mjs.map +1 -0
- package/resources/v1/data-analyst.d.mts +2 -0
- package/resources/v1/data-analyst.d.mts.map +1 -0
- package/resources/v1/data-analyst.d.ts +2 -0
- package/resources/v1/data-analyst.d.ts.map +1 -0
- package/resources/v1/data-analyst.js +6 -0
- package/resources/v1/data-analyst.js.map +1 -0
- package/resources/v1/data-analyst.mjs +3 -0
- package/resources/v1/data-analyst.mjs.map +1 -0
- package/resources/v1/index.d.mts +3 -2
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +3 -2
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +15 -13
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -0
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/materials/bulk.d.mts +30 -2
- package/resources/v1/materials/bulk.d.mts.map +1 -1
- package/resources/v1/materials/bulk.d.ts +30 -2
- package/resources/v1/materials/bulk.d.ts.map +1 -1
- package/resources/v1/materials/bulk.js +8 -7
- package/resources/v1/materials/bulk.js.map +1 -1
- package/resources/v1/materials/bulk.mjs +8 -7
- package/resources/v1/materials/bulk.mjs.map +1 -1
- package/resources/v1/materials/index.d.mts +4 -4
- package/resources/v1/materials/index.d.mts.map +1 -1
- package/resources/v1/materials/index.d.ts +4 -4
- 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 +2 -2
- package/resources/v1/materials/index.mjs.map +1 -1
- package/resources/v1/materials/materials.d.mts +270 -43
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +270 -43
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +64 -44
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +66 -46
- package/resources/v1/materials/materials.mjs.map +1 -1
- package/resources/v1/materials/test.d.mts +111 -8
- package/resources/v1/materials/test.d.mts.map +1 -1
- package/resources/v1/materials/test.d.ts +111 -8
- package/resources/v1/materials/test.d.ts.map +1 -1
- package/resources/v1/materials/test.js +20 -21
- package/resources/v1/materials/test.js.map +1 -1
- package/resources/v1/materials/test.mjs +20 -21
- package/resources/v1/materials/test.mjs.map +1 -1
- package/resources/v1/materials/upload.d.mts +149 -5
- package/resources/v1/materials/upload.d.mts.map +1 -1
- package/resources/v1/materials/upload.d.ts +149 -5
- package/resources/v1/materials/upload.d.ts.map +1 -1
- package/resources/v1/materials/upload.js +53 -13
- package/resources/v1/materials/upload.js.map +1 -1
- package/resources/v1/materials/upload.mjs +53 -13
- package/resources/v1/materials/upload.mjs.map +1 -1
- package/resources/v1/usage/analyst.d.mts +51 -6
- package/resources/v1/usage/analyst.d.mts.map +1 -1
- package/resources/v1/usage/analyst.d.ts +51 -6
- package/resources/v1/usage/analyst.d.ts.map +1 -1
- package/resources/v1/usage/analyst.js +8 -9
- package/resources/v1/usage/analyst.js.map +1 -1
- package/resources/v1/usage/analyst.mjs +8 -9
- package/resources/v1/usage/analyst.mjs.map +1 -1
- package/resources/v1/usage/index.d.mts +1 -1
- package/resources/v1/usage/index.d.mts.map +1 -1
- package/resources/v1/usage/index.d.ts +1 -1
- package/resources/v1/usage/index.d.ts.map +1 -1
- package/resources/v1/usage/index.js.map +1 -1
- package/resources/v1/usage/index.mjs +1 -1
- package/resources/v1/usage/index.mjs.map +1 -1
- package/resources/v1/usage/usage.d.mts +2 -2
- package/resources/v1/usage/usage.d.mts.map +1 -1
- package/resources/v1/usage/usage.d.ts +2 -2
- package/resources/v1/usage/usage.d.ts.map +1 -1
- package/resources/v1/usage/usage.js.map +1 -1
- package/resources/v1/usage/usage.mjs +1 -1
- package/resources/v1/usage/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +19 -4
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +19 -4
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +19 -0
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +20 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/assignment-grader.ts +47 -1
- package/src/resources/v1/chat/chat.ts +74 -0
- package/src/resources/v1/chat/index.ts +7 -1
- package/src/resources/v1/components.ts +76 -0
- package/src/resources/v1/data-analyst/data-analyst.ts +233 -0
- package/src/resources/v1/data-analyst/index.ts +10 -0
- package/src/resources/v1/data-analyst/sessions.ts +46 -0
- package/src/resources/v1/data-analyst/test.ts +34 -0
- package/src/resources/v1/data-analyst.ts +3 -0
- package/src/resources/v1/index.ts +16 -0
- package/src/resources/v1/materials/bulk.ts +36 -7
- package/src/resources/v1/materials/index.ts +28 -3
- package/src/resources/v1/materials/materials.ts +364 -72
- package/src/resources/v1/materials/test.ts +141 -25
- package/src/resources/v1/materials/upload.ts +200 -13
- package/src/resources/v1/usage/analyst.ts +80 -10
- package/src/resources/v1/usage/index.ts +7 -1
- package/src/resources/v1/usage/usage.ts +14 -2
- package/src/resources/v1/v1.ts +60 -1
- 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
|
@@ -3,9 +3,9 @@ import { APIResource } from "../../../core/resource.mjs";
|
|
|
3
3
|
import * as BulkAPI from "./bulk.mjs";
|
|
4
4
|
import { Bulk } from "./bulk.mjs";
|
|
5
5
|
import * as TestAPI from "./test.mjs";
|
|
6
|
-
import { Test } from "./test.mjs";
|
|
6
|
+
import { Test, } from "./test.mjs";
|
|
7
7
|
import * as UploadAPI from "./upload.mjs";
|
|
8
|
-
import { Upload } from "./upload.mjs";
|
|
8
|
+
import { Upload, } from "./upload.mjs";
|
|
9
9
|
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
10
10
|
import { path } from "../../../internal/utils/path.mjs";
|
|
11
11
|
export class Materials extends APIResource {
|
|
@@ -66,94 +66,114 @@ export class Materials extends APIResource {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
+
* Create batch upload URLs for multiple materials
|
|
70
|
+
*
|
|
69
71
|
* @example
|
|
70
72
|
* ```ts
|
|
71
|
-
* await client.v1.materials.batchCreate(
|
|
73
|
+
* const response = await client.v1.materials.batchCreate({
|
|
74
|
+
* materials: [
|
|
75
|
+
* {
|
|
76
|
+
* contentType: 'application/pdf',
|
|
77
|
+
* filename: 'document.pdf',
|
|
78
|
+
* name: 'Chapter 1',
|
|
79
|
+
* },
|
|
80
|
+
* ],
|
|
81
|
+
* });
|
|
72
82
|
* ```
|
|
73
83
|
*/
|
|
74
|
-
batchCreate(options) {
|
|
75
|
-
return this._client.post('/api/v1/materials/batch', {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
batchCreate(body, options) {
|
|
85
|
+
return this._client.post('/api/v1/materials/batch', { body, ...options });
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Creates a material and waits for processing to finish before returning. Useful
|
|
89
|
+
* for synchronous API usage.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* const material = await client.v1.materials.createAndProcess(
|
|
94
|
+
* {
|
|
95
|
+
* content: { type: 'text' },
|
|
96
|
+
* name: 'Chapter 1 - Introduction',
|
|
97
|
+
* },
|
|
98
|
+
* );
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
createAndProcess(body, options) {
|
|
102
|
+
return this._client.post('/api/v1/materials/upload-and-process', { body, ...options });
|
|
79
103
|
}
|
|
80
104
|
/**
|
|
105
|
+
* Get debug information for a material including extracted content
|
|
106
|
+
*
|
|
81
107
|
* @example
|
|
82
108
|
* ```ts
|
|
83
|
-
* await client.v1.materials.debug('id');
|
|
109
|
+
* const response = await client.v1.materials.debug('id');
|
|
84
110
|
* ```
|
|
85
111
|
*/
|
|
86
112
|
debug(id, options) {
|
|
87
|
-
return this._client.get(path `/api/v1/materials/${id}/debug`,
|
|
88
|
-
...options,
|
|
89
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
90
|
-
});
|
|
113
|
+
return this._client.get(path `/api/v1/materials/${id}/debug`, options);
|
|
91
114
|
}
|
|
92
115
|
/**
|
|
116
|
+
* Get temporary download URL for material
|
|
117
|
+
*
|
|
93
118
|
* @example
|
|
94
119
|
* ```ts
|
|
95
|
-
* await client.v1.materials.getDownloadURL(
|
|
96
|
-
*
|
|
97
|
-
*
|
|
120
|
+
* const response = await client.v1.materials.getDownloadURL(
|
|
121
|
+
* 'id',
|
|
122
|
+
* );
|
|
98
123
|
* ```
|
|
99
124
|
*/
|
|
100
|
-
getDownloadURL(id, query, options) {
|
|
101
|
-
return this._client.get(path `/api/v1/materials/${id}/download-url`, {
|
|
102
|
-
query,
|
|
103
|
-
...options,
|
|
104
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
105
|
-
});
|
|
125
|
+
getDownloadURL(id, query = {}, options) {
|
|
126
|
+
return this._client.get(path `/api/v1/materials/${id}/download-url`, { query, ...options });
|
|
106
127
|
}
|
|
107
128
|
/**
|
|
129
|
+
* Move material to a different folder
|
|
130
|
+
*
|
|
108
131
|
* @example
|
|
109
132
|
* ```ts
|
|
110
|
-
* await client.v1.materials.move('id'
|
|
133
|
+
* const material = await client.v1.materials.move('id', {
|
|
134
|
+
* folderId: 'folderId',
|
|
135
|
+
* });
|
|
111
136
|
* ```
|
|
112
137
|
*/
|
|
113
|
-
move(id, options) {
|
|
114
|
-
return this._client.post(path `/api/v1/materials/${id}/move`, {
|
|
115
|
-
...options,
|
|
116
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
117
|
-
});
|
|
138
|
+
move(id, body, options) {
|
|
139
|
+
return this._client.post(path `/api/v1/materials/${id}/move`, { body, ...options });
|
|
118
140
|
}
|
|
119
141
|
/**
|
|
142
|
+
* Rename a material
|
|
143
|
+
*
|
|
120
144
|
* @example
|
|
121
145
|
* ```ts
|
|
122
|
-
* await client.v1.materials.rename('id'
|
|
146
|
+
* const material = await client.v1.materials.rename('id', {
|
|
147
|
+
* name: 'New Material Name',
|
|
148
|
+
* });
|
|
123
149
|
* ```
|
|
124
150
|
*/
|
|
125
|
-
rename(id, options) {
|
|
126
|
-
return this._client.post(path `/api/v1/materials/${id}/rename`, {
|
|
127
|
-
...options,
|
|
128
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
129
|
-
});
|
|
151
|
+
rename(id, body, options) {
|
|
152
|
+
return this._client.post(path `/api/v1/materials/${id}/rename`, { body, ...options });
|
|
130
153
|
}
|
|
131
154
|
/**
|
|
155
|
+
* Reprocess material to regenerate embeddings and extract content
|
|
156
|
+
*
|
|
132
157
|
* @example
|
|
133
158
|
* ```ts
|
|
134
|
-
* await client.v1.materials.reprocess('id');
|
|
159
|
+
* const material = await client.v1.materials.reprocess('id');
|
|
135
160
|
* ```
|
|
136
161
|
*/
|
|
137
162
|
reprocess(id, options) {
|
|
138
|
-
return this._client.post(path `/api/v1/materials/${id}/reprocess`,
|
|
139
|
-
...options,
|
|
140
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
141
|
-
});
|
|
163
|
+
return this._client.post(path `/api/v1/materials/${id}/reprocess`, options);
|
|
142
164
|
}
|
|
143
165
|
/**
|
|
144
|
-
* Search materials using RAG
|
|
166
|
+
* Search materials using RAG (Retrieval-Augmented Generation)
|
|
145
167
|
*
|
|
146
168
|
* @example
|
|
147
169
|
* ```ts
|
|
148
|
-
* await client.v1.materials.search({
|
|
170
|
+
* const response = await client.v1.materials.search({
|
|
171
|
+
* query: 'What is photosynthesis?',
|
|
172
|
+
* });
|
|
149
173
|
* ```
|
|
150
174
|
*/
|
|
151
175
|
search(body, options) {
|
|
152
|
-
return this._client.post('/api/v1/materials/search', {
|
|
153
|
-
body,
|
|
154
|
-
...options,
|
|
155
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
156
|
-
});
|
|
176
|
+
return this._client.post('/api/v1/materials/search', { body, ...options });
|
|
157
177
|
}
|
|
158
178
|
}
|
|
159
179
|
Materials.Upload = Upload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materials.mjs","sourceRoot":"","sources":["../../../src/resources/v1/materials/materials.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"materials.mjs","sourceRoot":"","sources":["../../../src/resources/v1/materials/materials.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,IAAI,EAAoC;OAC1C,KAAK,OAAO;OACZ,EACL,IAAI,GAKL;OACM,KAAK,SAAS;OACd,EAEL,MAAM,GA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AAO,CAAC,IAAI,CAAC,IAAI,CAAA,qBAAqB,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AAuYD,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;AAC1B,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC;AACtB,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC"}
|
|
@@ -3,32 +3,135 @@ import { APIPromise } from "../../../core/api-promise.mjs";
|
|
|
3
3
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
4
|
export declare class Test extends APIResource {
|
|
5
5
|
/**
|
|
6
|
+
* Test OCR functionality with a sample PDF
|
|
7
|
+
*
|
|
6
8
|
* @example
|
|
7
9
|
* ```ts
|
|
8
|
-
*
|
|
10
|
+
* const response =
|
|
11
|
+
* await client.v1.materials.test.performOcr();
|
|
9
12
|
* ```
|
|
10
13
|
*/
|
|
11
|
-
performOcr(options?: RequestOptions): APIPromise<
|
|
14
|
+
performOcr(options?: RequestOptions): APIPromise<TestPerformOcrResponse>;
|
|
12
15
|
/**
|
|
16
|
+
* Test EPUB processing functionality
|
|
17
|
+
*
|
|
13
18
|
* @example
|
|
14
19
|
* ```ts
|
|
15
|
-
*
|
|
20
|
+
* const response =
|
|
21
|
+
* await client.v1.materials.test.processEpub();
|
|
16
22
|
* ```
|
|
17
23
|
*/
|
|
18
|
-
processEpub(options?: RequestOptions): APIPromise<
|
|
24
|
+
processEpub(options?: RequestOptions): APIPromise<TestProcessEpubResponse>;
|
|
19
25
|
/**
|
|
26
|
+
* Test image processing with OCR and AI vision
|
|
27
|
+
*
|
|
20
28
|
* @example
|
|
21
29
|
* ```ts
|
|
22
|
-
*
|
|
30
|
+
* const response =
|
|
31
|
+
* await client.v1.materials.test.processImage();
|
|
23
32
|
* ```
|
|
24
33
|
*/
|
|
25
|
-
processImage(options?: RequestOptions): APIPromise<
|
|
34
|
+
processImage(options?: RequestOptions): APIPromise<TestProcessImageResponse>;
|
|
26
35
|
/**
|
|
36
|
+
* Test video processing setup and dependencies
|
|
37
|
+
*
|
|
27
38
|
* @example
|
|
28
39
|
* ```ts
|
|
29
|
-
*
|
|
40
|
+
* const response =
|
|
41
|
+
* await client.v1.materials.test.processVideo();
|
|
30
42
|
* ```
|
|
31
43
|
*/
|
|
32
|
-
processVideo(options?: RequestOptions): APIPromise<
|
|
44
|
+
processVideo(options?: RequestOptions): APIPromise<TestProcessVideoResponse>;
|
|
45
|
+
}
|
|
46
|
+
export interface TestPerformOcrResponse {
|
|
47
|
+
/**
|
|
48
|
+
* First 500 characters of extracted text
|
|
49
|
+
*/
|
|
50
|
+
firstChars: string;
|
|
51
|
+
/**
|
|
52
|
+
* Test success status
|
|
53
|
+
*/
|
|
54
|
+
success: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Length of extracted text
|
|
57
|
+
*/
|
|
58
|
+
textLength: number;
|
|
59
|
+
}
|
|
60
|
+
export interface TestProcessEpubResponse {
|
|
61
|
+
/**
|
|
62
|
+
* Test success status
|
|
63
|
+
*/
|
|
64
|
+
success: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* EPUB file size in bytes
|
|
67
|
+
*/
|
|
68
|
+
epubSize?: number;
|
|
69
|
+
/**
|
|
70
|
+
* EPUB file size in MB
|
|
71
|
+
*/
|
|
72
|
+
epubSizeMB?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Error message if failed
|
|
75
|
+
*/
|
|
76
|
+
error?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Success message
|
|
79
|
+
*/
|
|
80
|
+
message?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Error stack trace
|
|
83
|
+
*/
|
|
84
|
+
stack?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface TestProcessImageResponse {
|
|
87
|
+
/**
|
|
88
|
+
* Test success status
|
|
89
|
+
*/
|
|
90
|
+
success: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Error message if failed
|
|
93
|
+
*/
|
|
94
|
+
error?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Image info if no base64 data
|
|
97
|
+
*/
|
|
98
|
+
imageInfo?: unknown;
|
|
99
|
+
/**
|
|
100
|
+
* Success message
|
|
101
|
+
*/
|
|
102
|
+
message?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Test results
|
|
105
|
+
*/
|
|
106
|
+
results?: unknown;
|
|
107
|
+
/**
|
|
108
|
+
* Error stack trace
|
|
109
|
+
*/
|
|
110
|
+
stack?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface TestProcessVideoResponse {
|
|
113
|
+
/**
|
|
114
|
+
* Test success status
|
|
115
|
+
*/
|
|
116
|
+
success: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Error message if failed
|
|
119
|
+
*/
|
|
120
|
+
error?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Success message
|
|
123
|
+
*/
|
|
124
|
+
message?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Error stack trace
|
|
127
|
+
*/
|
|
128
|
+
stack?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Test results
|
|
131
|
+
*/
|
|
132
|
+
tests?: unknown;
|
|
133
|
+
}
|
|
134
|
+
export declare namespace Test {
|
|
135
|
+
export { type TestPerformOcrResponse as TestPerformOcrResponse, type TestProcessEpubResponse as TestProcessEpubResponse, type TestProcessImageResponse as TestProcessImageResponse, type TestProcessVideoResponse as TestProcessVideoResponse, };
|
|
33
136
|
}
|
|
34
137
|
//# sourceMappingURL=test.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/materials/test.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,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CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -3,32 +3,135 @@ import { APIPromise } from "../../../core/api-promise.js";
|
|
|
3
3
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
4
|
export declare class Test extends APIResource {
|
|
5
5
|
/**
|
|
6
|
+
* Test OCR functionality with a sample PDF
|
|
7
|
+
*
|
|
6
8
|
* @example
|
|
7
9
|
* ```ts
|
|
8
|
-
*
|
|
10
|
+
* const response =
|
|
11
|
+
* await client.v1.materials.test.performOcr();
|
|
9
12
|
* ```
|
|
10
13
|
*/
|
|
11
|
-
performOcr(options?: RequestOptions): APIPromise<
|
|
14
|
+
performOcr(options?: RequestOptions): APIPromise<TestPerformOcrResponse>;
|
|
12
15
|
/**
|
|
16
|
+
* Test EPUB processing functionality
|
|
17
|
+
*
|
|
13
18
|
* @example
|
|
14
19
|
* ```ts
|
|
15
|
-
*
|
|
20
|
+
* const response =
|
|
21
|
+
* await client.v1.materials.test.processEpub();
|
|
16
22
|
* ```
|
|
17
23
|
*/
|
|
18
|
-
processEpub(options?: RequestOptions): APIPromise<
|
|
24
|
+
processEpub(options?: RequestOptions): APIPromise<TestProcessEpubResponse>;
|
|
19
25
|
/**
|
|
26
|
+
* Test image processing with OCR and AI vision
|
|
27
|
+
*
|
|
20
28
|
* @example
|
|
21
29
|
* ```ts
|
|
22
|
-
*
|
|
30
|
+
* const response =
|
|
31
|
+
* await client.v1.materials.test.processImage();
|
|
23
32
|
* ```
|
|
24
33
|
*/
|
|
25
|
-
processImage(options?: RequestOptions): APIPromise<
|
|
34
|
+
processImage(options?: RequestOptions): APIPromise<TestProcessImageResponse>;
|
|
26
35
|
/**
|
|
36
|
+
* Test video processing setup and dependencies
|
|
37
|
+
*
|
|
27
38
|
* @example
|
|
28
39
|
* ```ts
|
|
29
|
-
*
|
|
40
|
+
* const response =
|
|
41
|
+
* await client.v1.materials.test.processVideo();
|
|
30
42
|
* ```
|
|
31
43
|
*/
|
|
32
|
-
processVideo(options?: RequestOptions): APIPromise<
|
|
44
|
+
processVideo(options?: RequestOptions): APIPromise<TestProcessVideoResponse>;
|
|
45
|
+
}
|
|
46
|
+
export interface TestPerformOcrResponse {
|
|
47
|
+
/**
|
|
48
|
+
* First 500 characters of extracted text
|
|
49
|
+
*/
|
|
50
|
+
firstChars: string;
|
|
51
|
+
/**
|
|
52
|
+
* Test success status
|
|
53
|
+
*/
|
|
54
|
+
success: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Length of extracted text
|
|
57
|
+
*/
|
|
58
|
+
textLength: number;
|
|
59
|
+
}
|
|
60
|
+
export interface TestProcessEpubResponse {
|
|
61
|
+
/**
|
|
62
|
+
* Test success status
|
|
63
|
+
*/
|
|
64
|
+
success: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* EPUB file size in bytes
|
|
67
|
+
*/
|
|
68
|
+
epubSize?: number;
|
|
69
|
+
/**
|
|
70
|
+
* EPUB file size in MB
|
|
71
|
+
*/
|
|
72
|
+
epubSizeMB?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Error message if failed
|
|
75
|
+
*/
|
|
76
|
+
error?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Success message
|
|
79
|
+
*/
|
|
80
|
+
message?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Error stack trace
|
|
83
|
+
*/
|
|
84
|
+
stack?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface TestProcessImageResponse {
|
|
87
|
+
/**
|
|
88
|
+
* Test success status
|
|
89
|
+
*/
|
|
90
|
+
success: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Error message if failed
|
|
93
|
+
*/
|
|
94
|
+
error?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Image info if no base64 data
|
|
97
|
+
*/
|
|
98
|
+
imageInfo?: unknown;
|
|
99
|
+
/**
|
|
100
|
+
* Success message
|
|
101
|
+
*/
|
|
102
|
+
message?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Test results
|
|
105
|
+
*/
|
|
106
|
+
results?: unknown;
|
|
107
|
+
/**
|
|
108
|
+
* Error stack trace
|
|
109
|
+
*/
|
|
110
|
+
stack?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface TestProcessVideoResponse {
|
|
113
|
+
/**
|
|
114
|
+
* Test success status
|
|
115
|
+
*/
|
|
116
|
+
success: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Error message if failed
|
|
119
|
+
*/
|
|
120
|
+
error?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Success message
|
|
123
|
+
*/
|
|
124
|
+
message?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Error stack trace
|
|
127
|
+
*/
|
|
128
|
+
stack?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Test results
|
|
131
|
+
*/
|
|
132
|
+
tests?: unknown;
|
|
133
|
+
}
|
|
134
|
+
export declare namespace Test {
|
|
135
|
+
export { type TestPerformOcrResponse as TestPerformOcrResponse, type TestProcessEpubResponse as TestProcessEpubResponse, type TestProcessImageResponse as TestProcessImageResponse, type TestProcessVideoResponse as TestProcessVideoResponse, };
|
|
33
136
|
}
|
|
34
137
|
//# sourceMappingURL=test.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/materials/test.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/materials/test.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;OAQG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIxE;;;;;;;;OAQG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAI1E;;;;;;;;OAQG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAI5E;;;;;;;;OAQG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAG7E;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -3,55 +3,54 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Test = void 0;
|
|
5
5
|
const resource_1 = require("../../../core/resource.js");
|
|
6
|
-
const headers_1 = require("../../../internal/headers.js");
|
|
7
6
|
class Test extends resource_1.APIResource {
|
|
8
7
|
/**
|
|
8
|
+
* Test OCR functionality with a sample PDF
|
|
9
|
+
*
|
|
9
10
|
* @example
|
|
10
11
|
* ```ts
|
|
11
|
-
*
|
|
12
|
+
* const response =
|
|
13
|
+
* await client.v1.materials.test.performOcr();
|
|
12
14
|
* ```
|
|
13
15
|
*/
|
|
14
16
|
performOcr(options) {
|
|
15
|
-
return this._client.post('/api/v1/materials/test/ocr',
|
|
16
|
-
...options,
|
|
17
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
18
|
-
});
|
|
17
|
+
return this._client.post('/api/v1/materials/test/ocr', options);
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
20
|
+
* Test EPUB processing functionality
|
|
21
|
+
*
|
|
21
22
|
* @example
|
|
22
23
|
* ```ts
|
|
23
|
-
*
|
|
24
|
+
* const response =
|
|
25
|
+
* await client.v1.materials.test.processEpub();
|
|
24
26
|
* ```
|
|
25
27
|
*/
|
|
26
28
|
processEpub(options) {
|
|
27
|
-
return this._client.post('/api/v1/materials/test/epub-processing',
|
|
28
|
-
...options,
|
|
29
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
30
|
-
});
|
|
29
|
+
return this._client.post('/api/v1/materials/test/epub-processing', options);
|
|
31
30
|
}
|
|
32
31
|
/**
|
|
32
|
+
* Test image processing with OCR and AI vision
|
|
33
|
+
*
|
|
33
34
|
* @example
|
|
34
35
|
* ```ts
|
|
35
|
-
*
|
|
36
|
+
* const response =
|
|
37
|
+
* await client.v1.materials.test.processImage();
|
|
36
38
|
* ```
|
|
37
39
|
*/
|
|
38
40
|
processImage(options) {
|
|
39
|
-
return this._client.post('/api/v1/materials/test/image-processing',
|
|
40
|
-
...options,
|
|
41
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
42
|
-
});
|
|
41
|
+
return this._client.post('/api/v1/materials/test/image-processing', options);
|
|
43
42
|
}
|
|
44
43
|
/**
|
|
44
|
+
* Test video processing setup and dependencies
|
|
45
|
+
*
|
|
45
46
|
* @example
|
|
46
47
|
* ```ts
|
|
47
|
-
*
|
|
48
|
+
* const response =
|
|
49
|
+
* await client.v1.materials.test.processVideo();
|
|
48
50
|
* ```
|
|
49
51
|
*/
|
|
50
52
|
processVideo(options) {
|
|
51
|
-
return this._client.post('/api/v1/materials/test/video-processing',
|
|
52
|
-
...options,
|
|
53
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
54
|
-
});
|
|
53
|
+
return this._client.post('/api/v1/materials/test/video-processing', options);
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
exports.Test = Test;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../src/resources/v1/materials/test.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../src/resources/v1/materials/test.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;OAQG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;OAQG;IACH,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yCAAyC,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yCAAyC,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;CACF;AApDD,oBAoDC"}
|
|
@@ -1,54 +1,53 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
-
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
4
3
|
export class Test extends APIResource {
|
|
5
4
|
/**
|
|
5
|
+
* Test OCR functionality with a sample PDF
|
|
6
|
+
*
|
|
6
7
|
* @example
|
|
7
8
|
* ```ts
|
|
8
|
-
*
|
|
9
|
+
* const response =
|
|
10
|
+
* await client.v1.materials.test.performOcr();
|
|
9
11
|
* ```
|
|
10
12
|
*/
|
|
11
13
|
performOcr(options) {
|
|
12
|
-
return this._client.post('/api/v1/materials/test/ocr',
|
|
13
|
-
...options,
|
|
14
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
15
|
-
});
|
|
14
|
+
return this._client.post('/api/v1/materials/test/ocr', options);
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
17
|
+
* Test EPUB processing functionality
|
|
18
|
+
*
|
|
18
19
|
* @example
|
|
19
20
|
* ```ts
|
|
20
|
-
*
|
|
21
|
+
* const response =
|
|
22
|
+
* await client.v1.materials.test.processEpub();
|
|
21
23
|
* ```
|
|
22
24
|
*/
|
|
23
25
|
processEpub(options) {
|
|
24
|
-
return this._client.post('/api/v1/materials/test/epub-processing',
|
|
25
|
-
...options,
|
|
26
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
27
|
-
});
|
|
26
|
+
return this._client.post('/api/v1/materials/test/epub-processing', options);
|
|
28
27
|
}
|
|
29
28
|
/**
|
|
29
|
+
* Test image processing with OCR and AI vision
|
|
30
|
+
*
|
|
30
31
|
* @example
|
|
31
32
|
* ```ts
|
|
32
|
-
*
|
|
33
|
+
* const response =
|
|
34
|
+
* await client.v1.materials.test.processImage();
|
|
33
35
|
* ```
|
|
34
36
|
*/
|
|
35
37
|
processImage(options) {
|
|
36
|
-
return this._client.post('/api/v1/materials/test/image-processing',
|
|
37
|
-
...options,
|
|
38
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
39
|
-
});
|
|
38
|
+
return this._client.post('/api/v1/materials/test/image-processing', options);
|
|
40
39
|
}
|
|
41
40
|
/**
|
|
41
|
+
* Test video processing setup and dependencies
|
|
42
|
+
*
|
|
42
43
|
* @example
|
|
43
44
|
* ```ts
|
|
44
|
-
*
|
|
45
|
+
* const response =
|
|
46
|
+
* await client.v1.materials.test.processVideo();
|
|
45
47
|
* ```
|
|
46
48
|
*/
|
|
47
49
|
processVideo(options) {
|
|
48
|
-
return this._client.post('/api/v1/materials/test/video-processing',
|
|
49
|
-
...options,
|
|
50
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
51
|
-
});
|
|
50
|
+
return this._client.post('/api/v1/materials/test/video-processing', options);
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
//# sourceMappingURL=test.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.mjs","sourceRoot":"","sources":["../../../src/resources/v1/materials/test.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"test.mjs","sourceRoot":"","sources":["../../../src/resources/v1/materials/test.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;OAQG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;OAQG;IACH,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yCAAyC,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yCAAyC,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;CACF"}
|