@retab/node 1.0.63 → 1.0.65

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/dist/types.d.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  import { Readable } from "stream";
2
- import * as generated from "./generated_types";
3
2
  import { ZFieldItem, ZRefObject, ZRowList } from "./generated_types";
4
3
  export * from "./generated_types";
5
4
  import * as z from "zod";
6
- export * from "./schema_types";
7
5
  export declare function dataArray<Schema extends z.ZodType<any, any, any>>(schema: Schema): z.ZodType<z.output<Schema>[], z.ZodTypeDef, {
8
6
  data: z.input<Schema>[];
9
7
  }>;
@@ -29,10 +27,10 @@ export declare const ZMIMEData: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<
29
27
  }, {
30
28
  filename: string;
31
29
  url: string;
32
- }>>]>, any, string | {
30
+ }>>]>, any, string | Buffer<ArrayBufferLike> | Readable | {
33
31
  filename: string;
34
32
  url: string;
35
- } | Readable | Buffer<ArrayBufferLike>>;
33
+ }>;
36
34
  export type MIMEDataInput = z.input<typeof ZMIMEData>;
37
35
  export declare const ZJSONSchema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>, Record<string, any>, string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>>;
38
36
  export type JSONSchemaInput = z.input<typeof ZJSONSchema>;
@@ -47,10 +45,10 @@ export declare const ZDocumentExtractRequest: z.ZodEffects<z.ZodObject<{
47
45
  }, {
48
46
  filename: string;
49
47
  url: string;
50
- }>>]>, any, string | {
48
+ }>>]>, any, string | Buffer<ArrayBufferLike> | Readable | {
51
49
  filename: string;
52
50
  url: string;
53
- } | Readable | Buffer<ArrayBufferLike>>>;
51
+ }>>;
54
52
  documents: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>, z.ZodLazy<z.ZodObject<{
55
53
  filename: z.ZodString;
56
54
  url: z.ZodString;
@@ -60,10 +58,10 @@ export declare const ZDocumentExtractRequest: z.ZodEffects<z.ZodObject<{
60
58
  }, {
61
59
  filename: string;
62
60
  url: string;
63
- }>>]>, any, string | {
61
+ }>>]>, any, string | Buffer<ArrayBufferLike> | Readable | {
64
62
  filename: string;
65
63
  url: string;
66
- } | Readable | Buffer<ArrayBufferLike>>, "many">>;
64
+ }>, "many">>;
67
65
  json_schema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>, Record<string, any>, string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>>;
68
66
  image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
69
67
  model: z.ZodString;
@@ -73,6 +71,8 @@ export declare const ZDocumentExtractRequest: z.ZodEffects<z.ZodObject<{
73
71
  seed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
74
72
  store: z.ZodDefault<z.ZodBoolean>;
75
73
  need_validation: z.ZodDefault<z.ZodBoolean>;
74
+ modality: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"native">]>>;
75
+ parallel_ocr_keys: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
76
76
  }, "strip", z.ZodTypeAny, {
77
77
  json_schema: Record<string, any>;
78
78
  model: string;
@@ -80,9 +80,11 @@ export declare const ZDocumentExtractRequest: z.ZodEffects<z.ZodObject<{
80
80
  reasoning_effort: "low" | "high" | "minimal" | "medium" | null;
81
81
  image_resolution_dpi: number;
82
82
  n_consensus: number;
83
+ modality: "text" | "image" | "native";
83
84
  documents: any[];
84
85
  store: boolean;
85
86
  need_validation: boolean;
87
+ parallel_ocr_keys?: Record<string, string> | null | undefined;
86
88
  document?: any;
87
89
  seed?: number | null | undefined;
88
90
  }, {
@@ -92,14 +94,16 @@ export declare const ZDocumentExtractRequest: z.ZodEffects<z.ZodObject<{
92
94
  reasoning_effort?: "low" | "high" | "minimal" | "medium" | null | undefined;
93
95
  image_resolution_dpi?: number | undefined;
94
96
  n_consensus?: number | undefined;
95
- documents?: (string | {
97
+ modality?: "text" | "image" | "native" | undefined;
98
+ parallel_ocr_keys?: Record<string, string> | null | undefined;
99
+ documents?: (string | Buffer<ArrayBufferLike> | Readable | {
96
100
  filename: string;
97
101
  url: string;
98
- } | Readable | Buffer<ArrayBufferLike>)[] | undefined;
99
- document?: string | {
102
+ })[] | undefined;
103
+ document?: string | Buffer<ArrayBufferLike> | Readable | {
100
104
  filename: string;
101
105
  url: string;
102
- } | Readable | Buffer<ArrayBufferLike> | undefined;
106
+ } | undefined;
103
107
  seed?: number | null | undefined;
104
108
  store?: boolean | undefined;
105
109
  need_validation?: boolean | undefined;
@@ -110,14 +114,16 @@ export declare const ZDocumentExtractRequest: z.ZodEffects<z.ZodObject<{
110
114
  reasoning_effort?: "low" | "high" | "minimal" | "medium" | null | undefined;
111
115
  image_resolution_dpi?: number | undefined;
112
116
  n_consensus?: number | undefined;
113
- documents?: (string | {
117
+ modality?: "text" | "image" | "native" | undefined;
118
+ parallel_ocr_keys?: Record<string, string> | null | undefined;
119
+ documents?: (string | Buffer<ArrayBufferLike> | Readable | {
114
120
  filename: string;
115
121
  url: string;
116
- } | Readable | Buffer<ArrayBufferLike>)[] | undefined;
117
- document?: string | {
122
+ })[] | undefined;
123
+ document?: string | Buffer<ArrayBufferLike> | Readable | {
118
124
  filename: string;
119
125
  url: string;
120
- } | Readable | Buffer<ArrayBufferLike> | undefined;
126
+ } | undefined;
121
127
  seed?: number | null | undefined;
122
128
  store?: boolean | undefined;
123
129
  need_validation?: boolean | undefined;
@@ -133,28 +139,28 @@ export declare const ZParseRequest: z.ZodObject<{
133
139
  }, {
134
140
  filename: string;
135
141
  url: string;
136
- }>>]>, any, string | {
142
+ }>>]>, any, string | Buffer<ArrayBufferLike> | Readable | {
137
143
  filename: string;
138
144
  url: string;
139
- } | Readable | Buffer<ArrayBufferLike>>;
145
+ }>;
140
146
  model: z.ZodDefault<z.ZodString>;
141
147
  table_parsing_format: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"markdown">, z.ZodLiteral<"yaml">, z.ZodLiteral<"html">, z.ZodLiteral<"json">]>>;
142
148
  image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
143
- browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
149
+ browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A1">, z.ZodLiteral<"A2">, z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
144
150
  }, "strip", z.ZodTypeAny, {
145
151
  model: string;
146
152
  image_resolution_dpi: number;
147
- browser_canvas: "A3" | "A4" | "A5";
153
+ browser_canvas: "A1" | "A2" | "A3" | "A4" | "A5";
148
154
  table_parsing_format: "markdown" | "yaml" | "html" | "json";
149
155
  document?: any;
150
156
  }, {
151
- document: string | {
157
+ document: string | Buffer<ArrayBufferLike> | Readable | {
152
158
  filename: string;
153
159
  url: string;
154
- } | Readable | Buffer<ArrayBufferLike>;
160
+ };
155
161
  model?: string | undefined;
156
162
  image_resolution_dpi?: number | undefined;
157
- browser_canvas?: "A3" | "A4" | "A5" | undefined;
163
+ browser_canvas?: "A1" | "A2" | "A3" | "A4" | "A5" | undefined;
158
164
  table_parsing_format?: "markdown" | "yaml" | "html" | "json" | undefined;
159
165
  }>;
160
166
  export type ParseRequest = z.input<typeof ZParseRequest>;
@@ -168,26 +174,26 @@ export declare const ZDocumentCreateMessageRequest: z.ZodObject<{
168
174
  }, {
169
175
  filename: string;
170
176
  url: string;
171
- }>>]>, any, string | {
177
+ }>>]>, any, string | Buffer<ArrayBufferLike> | Readable | {
172
178
  filename: string;
173
179
  url: string;
174
- } | Readable | Buffer<ArrayBufferLike>>;
180
+ }>;
175
181
  image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
176
- browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
182
+ browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A1">, z.ZodLiteral<"A2">, z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
177
183
  model: z.ZodDefault<z.ZodString>;
178
184
  }, "strip", z.ZodTypeAny, {
179
185
  model: string;
180
186
  image_resolution_dpi: number;
181
- browser_canvas: "A3" | "A4" | "A5";
187
+ browser_canvas: "A1" | "A2" | "A3" | "A4" | "A5";
182
188
  document?: any;
183
189
  }, {
184
- document: string | {
190
+ document: string | Buffer<ArrayBufferLike> | Readable | {
185
191
  filename: string;
186
192
  url: string;
187
- } | Readable | Buffer<ArrayBufferLike>;
193
+ };
188
194
  model?: string | undefined;
189
195
  image_resolution_dpi?: number | undefined;
190
- browser_canvas?: "A3" | "A4" | "A5" | undefined;
196
+ browser_canvas?: "A1" | "A2" | "A3" | "A4" | "A5" | undefined;
191
197
  }>;
192
198
  export type DocumentCreateMessageRequest = z.input<typeof ZDocumentCreateMessageRequest>;
193
199
  export declare const ZDocumentCreateInputRequest: z.ZodObject<{
@@ -200,29 +206,29 @@ export declare const ZDocumentCreateInputRequest: z.ZodObject<{
200
206
  }, {
201
207
  filename: string;
202
208
  url: string;
203
- }>>]>, any, string | {
209
+ }>>]>, any, string | Buffer<ArrayBufferLike> | Readable | {
204
210
  filename: string;
205
211
  url: string;
206
- } | Readable | Buffer<ArrayBufferLike>>;
212
+ }>;
207
213
  json_schema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>, Record<string, any>, string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>>;
208
214
  image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
209
- browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
215
+ browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A1">, z.ZodLiteral<"A2">, z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
210
216
  model: z.ZodDefault<z.ZodString>;
211
217
  }, "strip", z.ZodTypeAny, {
212
218
  json_schema: Record<string, any>;
213
219
  model: string;
214
220
  image_resolution_dpi: number;
215
- browser_canvas: "A3" | "A4" | "A5";
221
+ browser_canvas: "A1" | "A2" | "A3" | "A4" | "A5";
216
222
  document?: any;
217
223
  }, {
218
224
  json_schema: string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>;
219
- document: string | {
225
+ document: string | Buffer<ArrayBufferLike> | Readable | {
220
226
  filename: string;
221
227
  url: string;
222
- } | Readable | Buffer<ArrayBufferLike>;
228
+ };
223
229
  model?: string | undefined;
224
230
  image_resolution_dpi?: number | undefined;
225
- browser_canvas?: "A3" | "A4" | "A5" | undefined;
231
+ browser_canvas?: "A1" | "A2" | "A3" | "A4" | "A5" | undefined;
226
232
  }>;
227
233
  export type DocumentCreateInputRequest = z.input<typeof ZDocumentCreateInputRequest>;
228
234
  export declare const ZGenerateSchemaRequest: z.ZodObject<{
@@ -235,16 +241,16 @@ export declare const ZGenerateSchemaRequest: z.ZodObject<{
235
241
  }, {
236
242
  filename: string;
237
243
  url: string;
238
- }>>]>, any, string | {
244
+ }>>]>, any, string | Buffer<ArrayBufferLike> | Readable | {
239
245
  filename: string;
240
246
  url: string;
241
- } | Readable | Buffer<ArrayBufferLike>>, "many">;
247
+ }>, "many">;
242
248
  model: z.ZodDefault<z.ZodString>;
243
249
  temperature: z.ZodDefault<z.ZodNumber>;
244
250
  reasoning_effort: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"minimal">, z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">]>>>>;
245
251
  instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
246
252
  image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
247
- browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
253
+ browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A1">, z.ZodLiteral<"A2">, z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
248
254
  stream: z.ZodDefault<z.ZodBoolean>;
249
255
  }, "strip", z.ZodTypeAny, {
250
256
  stream: boolean;
@@ -252,59 +258,23 @@ export declare const ZGenerateSchemaRequest: z.ZodObject<{
252
258
  temperature: number;
253
259
  reasoning_effort: "low" | "high" | "minimal" | "medium" | null;
254
260
  image_resolution_dpi: number;
255
- browser_canvas: "A3" | "A4" | "A5";
261
+ browser_canvas: "A1" | "A2" | "A3" | "A4" | "A5";
256
262
  documents: any[];
257
263
  instructions?: string | null | undefined;
258
264
  }, {
259
- documents: (string | {
265
+ documents: (string | Buffer<ArrayBufferLike> | Readable | {
260
266
  filename: string;
261
267
  url: string;
262
- } | Readable | Buffer<ArrayBufferLike>)[];
268
+ })[];
263
269
  stream?: boolean | undefined;
264
270
  model?: string | undefined;
265
271
  temperature?: number | undefined;
266
272
  reasoning_effort?: "low" | "high" | "minimal" | "medium" | null | undefined;
267
273
  image_resolution_dpi?: number | undefined;
268
- browser_canvas?: "A3" | "A4" | "A5" | undefined;
274
+ browser_canvas?: "A1" | "A2" | "A3" | "A4" | "A5" | undefined;
269
275
  instructions?: string | null | undefined;
270
276
  }>;
271
277
  export type GenerateSchemaRequest = z.input<typeof ZGenerateSchemaRequest>;
272
- export declare const ZBaseProject: z.ZodObject<{
273
- json_schema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>, Record<string, any>, string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>>;
274
- id: z.ZodString;
275
- name: z.ZodDefault<z.ZodString>;
276
- updated_at: z.ZodString;
277
- sheets_integration: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodObject<{
278
- sheet_id: z.ZodString;
279
- spreadsheet_id: z.ZodString;
280
- }, "strip", z.ZodTypeAny, {
281
- sheet_id: string;
282
- spreadsheet_id: string;
283
- }, {
284
- sheet_id: string;
285
- spreadsheet_id: string;
286
- }>>>>;
287
- }, "strip", z.ZodTypeAny, {
288
- id: string;
289
- json_schema: Record<string, any>;
290
- name: string;
291
- updated_at: string;
292
- sheets_integration?: {
293
- sheet_id: string;
294
- spreadsheet_id: string;
295
- } | null | undefined;
296
- }, {
297
- id: string;
298
- json_schema: string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>;
299
- updated_at: string;
300
- name?: string | undefined;
301
- sheets_integration?: {
302
- sheet_id: string;
303
- spreadsheet_id: string;
304
- } | null | undefined;
305
- }>;
306
- export type BaseProjectInput = z.input<typeof ZBaseProject>;
307
- export type BaseProject = z.output<typeof ZBaseProject>;
308
278
  export declare const ZCreateProjectRequest: z.ZodObject<{
309
279
  json_schema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>, Record<string, any>, string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>>;
310
280
  name: z.ZodString;
@@ -316,103 +286,6 @@ export declare const ZCreateProjectRequest: z.ZodObject<{
316
286
  name: string;
317
287
  }>;
318
288
  export type CreateProjectRequest = z.input<typeof ZCreateProjectRequest>;
319
- export declare const ZDocumentItem: z.ZodObject<{
320
- mime_data: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>, z.ZodLazy<z.ZodObject<{
321
- filename: z.ZodString;
322
- url: z.ZodString;
323
- }, "strip", z.ZodTypeAny, {
324
- filename: string;
325
- url: string;
326
- }, {
327
- filename: string;
328
- url: string;
329
- }>>]>, any, string | {
330
- filename: string;
331
- url: string;
332
- } | Readable | Buffer<ArrayBufferLike>>;
333
- annotation: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
334
- annotation_metadata: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodObject<{
335
- extraction_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
336
- likelihoods: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
337
- field_locations: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
338
- agentic_field_locations: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
339
- consensus_details: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
340
- }, "strip", z.ZodTypeAny, {
341
- extraction_id?: string | null | undefined;
342
- likelihoods?: Record<string, any> | null | undefined;
343
- field_locations?: Record<string, any> | null | undefined;
344
- agentic_field_locations?: Record<string, any> | null | undefined;
345
- consensus_details?: Record<string, any>[] | null | undefined;
346
- }, {
347
- extraction_id?: string | null | undefined;
348
- likelihoods?: Record<string, any> | null | undefined;
349
- field_locations?: Record<string, any> | null | undefined;
350
- agentic_field_locations?: Record<string, any> | null | undefined;
351
- consensus_details?: Record<string, any>[] | null | undefined;
352
- }>>>>;
353
- playground_extraction: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
354
- playground_extraction_metadata: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodObject<{
355
- extraction_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
356
- likelihoods: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
357
- field_locations: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
358
- agentic_field_locations: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
359
- consensus_details: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
360
- }, "strip", z.ZodTypeAny, {
361
- extraction_id?: string | null | undefined;
362
- likelihoods?: Record<string, any> | null | undefined;
363
- field_locations?: Record<string, any> | null | undefined;
364
- agentic_field_locations?: Record<string, any> | null | undefined;
365
- consensus_details?: Record<string, any>[] | null | undefined;
366
- }, {
367
- extraction_id?: string | null | undefined;
368
- likelihoods?: Record<string, any> | null | undefined;
369
- field_locations?: Record<string, any> | null | undefined;
370
- agentic_field_locations?: Record<string, any> | null | undefined;
371
- consensus_details?: Record<string, any>[] | null | undefined;
372
- }>>>>;
373
- }, "strip", z.ZodTypeAny, {
374
- annotation: Record<string, any>;
375
- playground_extraction: Record<string, any>;
376
- mime_data?: any;
377
- annotation_metadata?: {
378
- extraction_id?: string | null | undefined;
379
- likelihoods?: Record<string, any> | null | undefined;
380
- field_locations?: Record<string, any> | null | undefined;
381
- agentic_field_locations?: Record<string, any> | null | undefined;
382
- consensus_details?: Record<string, any>[] | null | undefined;
383
- } | null | undefined;
384
- playground_extraction_metadata?: {
385
- extraction_id?: string | null | undefined;
386
- likelihoods?: Record<string, any> | null | undefined;
387
- field_locations?: Record<string, any> | null | undefined;
388
- agentic_field_locations?: Record<string, any> | null | undefined;
389
- consensus_details?: Record<string, any>[] | null | undefined;
390
- } | null | undefined;
391
- }, {
392
- mime_data: string | {
393
- filename: string;
394
- url: string;
395
- } | Readable | Buffer<ArrayBufferLike>;
396
- annotation?: Record<string, any> | undefined;
397
- annotation_metadata?: {
398
- extraction_id?: string | null | undefined;
399
- likelihoods?: Record<string, any> | null | undefined;
400
- field_locations?: Record<string, any> | null | undefined;
401
- agentic_field_locations?: Record<string, any> | null | undefined;
402
- consensus_details?: Record<string, any>[] | null | undefined;
403
- } | null | undefined;
404
- playground_extraction?: Record<string, any> | undefined;
405
- playground_extraction_metadata?: {
406
- extraction_id?: string | null | undefined;
407
- likelihoods?: Record<string, any> | null | undefined;
408
- field_locations?: Record<string, any> | null | undefined;
409
- agentic_field_locations?: Record<string, any> | null | undefined;
410
- consensus_details?: Record<string, any>[] | null | undefined;
411
- } | null | undefined;
412
- }>;
413
- export type DocumentItemInput = z.input<typeof ZDocumentItem>;
414
- export type DocumentItem = z.output<typeof ZDocumentItem>;
415
- export declare const ZProjectLoose: z.ZodType<generated.Project>;
416
289
  export declare const ZModel: z.ZodLazy<z.ZodObject<{
417
290
  id: z.ZodString;
418
291
  created: z.ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACrE,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAIzB,cAAc,gBAAgB,CAAC;AAE/B,wBAAgB,SAAS,CAAC,MAAM,SAAS,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAA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AAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGxB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEzD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGxC,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEzF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAItC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAErF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE3E,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIzE,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;GAKf,CAAC;AACL,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC"}
package/dist/types.js CHANGED
@@ -6,7 +6,7 @@ import * as z from "zod";
6
6
  import { inferFileInfo } from "./mime";
7
7
  import fs from "fs";
8
8
  import { zodToJsonSchema } from 'zod-to-json-schema';
9
- export * from "./schema_types";
9
+ //export * from "./schema_types";
10
10
  export function dataArray(schema) {
11
11
  return z.object({ data: z.array(schema) }).transform((input) => input.data);
12
12
  }
@@ -97,23 +97,10 @@ export const ZGenerateSchemaRequest = z.object({
97
97
  ...generated.ZGenerateSchemaRequest.schema.shape,
98
98
  documents: ZMIMEData.array(),
99
99
  });
100
- export const ZBaseProject = z.object({
101
- ...generated.ZBaseProject.schema.shape,
102
- json_schema: ZJSONSchema,
103
- });
104
100
  export const ZCreateProjectRequest = z.object({
105
101
  ...generated.ZCreateProjectRequest.schema.shape,
106
102
  json_schema: ZJSONSchema,
107
103
  });
108
- export const ZDocumentItem = z.object({
109
- ...generated.ZDocumentItem.schema.shape,
110
- mime_data: ZMIMEData,
111
- });
112
- // Looser project schema to handle backends that omit arrays by default
113
- export const ZProjectLoose = z.lazy(() => (generated.ZBaseProject.schema).merge(z.object({
114
- documents: z.array(generated.ZProjectDocument).default([]),
115
- iterations: z.array(generated.ZIteration).default([]),
116
- })));
117
104
  export const ZModel = z.lazy(() => (z.object({
118
105
  id: z.string(),
119
106
  created: z.number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retab/node",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "Retab official Node.js library",
5
5
  "main": "dist/index.js",
6
6
  "exports": {