@studyfetch/sdk 1.23.0 → 1.25.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.
Files changed (88) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
  3. package/resources/v1/index.d.mts +1 -1
  4. package/resources/v1/index.d.mts.map +1 -1
  5. package/resources/v1/index.d.ts +1 -1
  6. package/resources/v1/index.d.ts.map +1 -1
  7. package/resources/v1/index.js.map +1 -1
  8. package/resources/v1/index.mjs.map +1 -1
  9. package/resources/v1/materials/bulk.d.mts +30 -2
  10. package/resources/v1/materials/bulk.d.mts.map +1 -1
  11. package/resources/v1/materials/bulk.d.ts +30 -2
  12. package/resources/v1/materials/bulk.d.ts.map +1 -1
  13. package/resources/v1/materials/bulk.js +8 -7
  14. package/resources/v1/materials/bulk.js.map +1 -1
  15. package/resources/v1/materials/bulk.mjs +8 -7
  16. package/resources/v1/materials/bulk.mjs.map +1 -1
  17. package/resources/v1/materials/index.d.mts +4 -4
  18. package/resources/v1/materials/index.d.mts.map +1 -1
  19. package/resources/v1/materials/index.d.ts +4 -4
  20. package/resources/v1/materials/index.d.ts.map +1 -1
  21. package/resources/v1/materials/index.js.map +1 -1
  22. package/resources/v1/materials/index.mjs +2 -2
  23. package/resources/v1/materials/index.mjs.map +1 -1
  24. package/resources/v1/materials/materials.d.mts +224 -29
  25. package/resources/v1/materials/materials.d.mts.map +1 -1
  26. package/resources/v1/materials/materials.d.ts +224 -29
  27. package/resources/v1/materials/materials.d.ts.map +1 -1
  28. package/resources/v1/materials/materials.js +47 -44
  29. package/resources/v1/materials/materials.js.map +1 -1
  30. package/resources/v1/materials/materials.mjs +49 -46
  31. package/resources/v1/materials/materials.mjs.map +1 -1
  32. package/resources/v1/materials/test.d.mts +111 -8
  33. package/resources/v1/materials/test.d.mts.map +1 -1
  34. package/resources/v1/materials/test.d.ts +111 -8
  35. package/resources/v1/materials/test.d.ts.map +1 -1
  36. package/resources/v1/materials/test.js +20 -21
  37. package/resources/v1/materials/test.js.map +1 -1
  38. package/resources/v1/materials/test.mjs +20 -21
  39. package/resources/v1/materials/test.mjs.map +1 -1
  40. package/resources/v1/materials/upload.d.mts +66 -5
  41. package/resources/v1/materials/upload.d.mts.map +1 -1
  42. package/resources/v1/materials/upload.d.ts +66 -5
  43. package/resources/v1/materials/upload.d.ts.map +1 -1
  44. package/resources/v1/materials/upload.js +21 -13
  45. package/resources/v1/materials/upload.js.map +1 -1
  46. package/resources/v1/materials/upload.mjs +21 -13
  47. package/resources/v1/materials/upload.mjs.map +1 -1
  48. package/resources/v1/upload/component.d.mts +26 -47
  49. package/resources/v1/upload/component.d.mts.map +1 -1
  50. package/resources/v1/upload/component.d.ts +26 -47
  51. package/resources/v1/upload/component.d.ts.map +1 -1
  52. package/resources/v1/upload/component.js +11 -10
  53. package/resources/v1/upload/component.js.map +1 -1
  54. package/resources/v1/upload/component.mjs +11 -10
  55. package/resources/v1/upload/component.mjs.map +1 -1
  56. package/resources/v1/upload/index.d.mts +1 -1
  57. package/resources/v1/upload/index.d.mts.map +1 -1
  58. package/resources/v1/upload/index.d.ts +1 -1
  59. package/resources/v1/upload/index.d.ts.map +1 -1
  60. package/resources/v1/upload/index.js.map +1 -1
  61. package/resources/v1/upload/index.mjs.map +1 -1
  62. package/resources/v1/upload/upload.d.mts +2 -2
  63. package/resources/v1/upload/upload.d.mts.map +1 -1
  64. package/resources/v1/upload/upload.d.ts +2 -2
  65. package/resources/v1/upload/upload.d.ts.map +1 -1
  66. package/resources/v1/upload/upload.js.map +1 -1
  67. package/resources/v1/upload/upload.mjs.map +1 -1
  68. package/resources/v1/v1.d.mts +2 -2
  69. package/resources/v1/v1.d.mts.map +1 -1
  70. package/resources/v1/v1.d.ts +2 -2
  71. package/resources/v1/v1.d.ts.map +1 -1
  72. package/resources/v1/v1.js.map +1 -1
  73. package/resources/v1/v1.mjs.map +1 -1
  74. package/src/resources/v1/index.ts +7 -0
  75. package/src/resources/v1/materials/bulk.ts +36 -7
  76. package/src/resources/v1/materials/index.ts +23 -3
  77. package/src/resources/v1/materials/materials.ts +302 -58
  78. package/src/resources/v1/materials/test.ts +141 -25
  79. package/src/resources/v1/materials/upload.ts +86 -13
  80. package/src/resources/v1/upload/component.ts +26 -53
  81. package/src/resources/v1/upload/index.ts +1 -2
  82. package/src/resources/v1/upload/upload.ts +2 -4
  83. package/src/resources/v1/v1.ts +14 -0
  84. package/src/version.ts +1 -1
  85. package/version.d.mts +1 -1
  86. package/version.d.ts +1 -1
  87. package/version.js +1 -1
  88. 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,97 @@ 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
- ...options,
77
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
78
- });
84
+ batchCreate(body, options) {
85
+ return this._client.post('/api/v1/materials/batch', { body, ...options });
79
86
  }
80
87
  /**
88
+ * Get debug information for a material including extracted content
89
+ *
81
90
  * @example
82
91
  * ```ts
83
- * await client.v1.materials.debug('id');
92
+ * const response = await client.v1.materials.debug('id');
84
93
  * ```
85
94
  */
86
95
  debug(id, options) {
87
- return this._client.get(path `/api/v1/materials/${id}/debug`, {
88
- ...options,
89
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
90
- });
96
+ return this._client.get(path `/api/v1/materials/${id}/debug`, options);
91
97
  }
92
98
  /**
99
+ * Get temporary download URL for material
100
+ *
93
101
  * @example
94
102
  * ```ts
95
- * await client.v1.materials.getDownloadURL('id', {
96
- * expiresIn: 'expiresIn',
97
- * });
103
+ * const response = await client.v1.materials.getDownloadURL(
104
+ * 'id',
105
+ * );
98
106
  * ```
99
107
  */
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
- });
108
+ getDownloadURL(id, query = {}, options) {
109
+ return this._client.get(path `/api/v1/materials/${id}/download-url`, { query, ...options });
106
110
  }
107
111
  /**
112
+ * Move material to a different folder
113
+ *
108
114
  * @example
109
115
  * ```ts
110
- * await client.v1.materials.move('id');
116
+ * const material = await client.v1.materials.move('id', {
117
+ * folderId: 'folderId',
118
+ * });
111
119
  * ```
112
120
  */
113
- move(id, options) {
114
- return this._client.post(path `/api/v1/materials/${id}/move`, {
115
- ...options,
116
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
117
- });
121
+ move(id, body, options) {
122
+ return this._client.post(path `/api/v1/materials/${id}/move`, { body, ...options });
118
123
  }
119
124
  /**
125
+ * Rename a material
126
+ *
120
127
  * @example
121
128
  * ```ts
122
- * await client.v1.materials.rename('id');
129
+ * const material = await client.v1.materials.rename('id', {
130
+ * name: 'New Material Name',
131
+ * });
123
132
  * ```
124
133
  */
125
- rename(id, options) {
126
- return this._client.post(path `/api/v1/materials/${id}/rename`, {
127
- ...options,
128
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
129
- });
134
+ rename(id, body, options) {
135
+ return this._client.post(path `/api/v1/materials/${id}/rename`, { body, ...options });
130
136
  }
131
137
  /**
138
+ * Reprocess material to regenerate embeddings and extract content
139
+ *
132
140
  * @example
133
141
  * ```ts
134
- * await client.v1.materials.reprocess('id');
142
+ * const material = await client.v1.materials.reprocess('id');
135
143
  * ```
136
144
  */
137
145
  reprocess(id, options) {
138
- return this._client.post(path `/api/v1/materials/${id}/reprocess`, {
139
- ...options,
140
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
141
- });
146
+ return this._client.post(path `/api/v1/materials/${id}/reprocess`, options);
142
147
  }
143
148
  /**
144
- * Search materials using RAG
149
+ * Search materials using RAG (Retrieval-Augmented Generation)
145
150
  *
146
151
  * @example
147
152
  * ```ts
148
- * await client.v1.materials.search({ query: 'query' });
153
+ * const response = await client.v1.materials.search({
154
+ * query: 'What is photosynthesis?',
155
+ * });
149
156
  * ```
150
157
  */
151
158
  search(body, options) {
152
- return this._client.post('/api/v1/materials/search', {
153
- body,
154
- ...options,
155
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
156
- });
159
+ return this._client.post('/api/v1/materials/search', { body, ...options });
157
160
  }
158
161
  }
159
162
  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,EAAE;OACR,KAAK,OAAO;OACZ,EAAE,IAAI,EAAE;OACR,KAAK,SAAS;OACd,EAAE,MAAM,EAAqD;OAE7D,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,SAAI,GAAiB,IAAI,OAAO,CAAC,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,QAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,qBAAqB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAA0B,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,qBAAqB,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,EAAU,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,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;AAiXD,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
- * await client.v1.materials.test.performOcr();
10
+ * const response =
11
+ * await client.v1.materials.test.performOcr();
9
12
  * ```
10
13
  */
11
- performOcr(options?: RequestOptions): APIPromise<void>;
14
+ performOcr(options?: RequestOptions): APIPromise<TestPerformOcrResponse>;
12
15
  /**
16
+ * Test EPUB processing functionality
17
+ *
13
18
  * @example
14
19
  * ```ts
15
- * await client.v1.materials.test.processEpub();
20
+ * const response =
21
+ * await client.v1.materials.test.processEpub();
16
22
  * ```
17
23
  */
18
- processEpub(options?: RequestOptions): APIPromise<void>;
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
- * await client.v1.materials.test.processImage();
30
+ * const response =
31
+ * await client.v1.materials.test.processImage();
23
32
  * ```
24
33
  */
25
- processImage(options?: RequestOptions): APIPromise<void>;
34
+ processImage(options?: RequestOptions): APIPromise<TestProcessImageResponse>;
26
35
  /**
36
+ * Test video processing setup and dependencies
37
+ *
27
38
  * @example
28
39
  * ```ts
29
- * await client.v1.materials.test.processVideo();
40
+ * const response =
41
+ * await client.v1.materials.test.processVideo();
30
42
  * ```
31
43
  */
32
- processVideo(options?: RequestOptions): APIPromise<void>;
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,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;OAKG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOtD;;;;;OAKG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOvD;;;;;OAKG;IACH,YAAY,CAAC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;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,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
- * await client.v1.materials.test.performOcr();
10
+ * const response =
11
+ * await client.v1.materials.test.performOcr();
9
12
  * ```
10
13
  */
11
- performOcr(options?: RequestOptions): APIPromise<void>;
14
+ performOcr(options?: RequestOptions): APIPromise<TestPerformOcrResponse>;
12
15
  /**
16
+ * Test EPUB processing functionality
17
+ *
13
18
  * @example
14
19
  * ```ts
15
- * await client.v1.materials.test.processEpub();
20
+ * const response =
21
+ * await client.v1.materials.test.processEpub();
16
22
  * ```
17
23
  */
18
- processEpub(options?: RequestOptions): APIPromise<void>;
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
- * await client.v1.materials.test.processImage();
30
+ * const response =
31
+ * await client.v1.materials.test.processImage();
23
32
  * ```
24
33
  */
25
- processImage(options?: RequestOptions): APIPromise<void>;
34
+ processImage(options?: RequestOptions): APIPromise<TestProcessImageResponse>;
26
35
  /**
36
+ * Test video processing setup and dependencies
37
+ *
27
38
  * @example
28
39
  * ```ts
29
- * await client.v1.materials.test.processVideo();
40
+ * const response =
41
+ * await client.v1.materials.test.processVideo();
30
42
  * ```
31
43
  */
32
- processVideo(options?: RequestOptions): APIPromise<void>;
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;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;OAKG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOtD;;;;;OAKG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOvD;;;;;OAKG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOxD;;;;;OAKG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAMzD"}
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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,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
- * await client.v1.materials.test.performOcr();
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
- * await client.v1.materials.test.processEpub();
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
- * await client.v1.materials.test.processImage();
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
- * await client.v1.materials.test.processVideo();
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;AAErD,0DAAyD;AAGzD,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;OAKG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACrD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE;YACjE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAA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,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
- * await client.v1.materials.test.performOcr();
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
- * await client.v1.materials.test.processEpub();
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
- * await client.v1.materials.test.processImage();
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
- * await client.v1.materials.test.processVideo();
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;OAEf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;OAKG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACrD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE;YACjE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yCAAyC,EAAE;YAClE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,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