@codenkay/questionbankextractor-document-ir 0.0.0-stage → 1.0.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.
@@ -0,0 +1,711 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const DOCUMENT_IR_SCHEMA_VERSION: "1.0.0";
4
+ declare const BBoxSchema: z.ZodObject<{
5
+ x: z.ZodNumber;
6
+ y: z.ZodNumber;
7
+ w: z.ZodNumber;
8
+ h: z.ZodNumber;
9
+ }, "strip", z.ZodTypeAny, {
10
+ x: number;
11
+ y: number;
12
+ w: number;
13
+ h: number;
14
+ }, {
15
+ x: number;
16
+ y: number;
17
+ w: number;
18
+ h: number;
19
+ }>;
20
+ declare const RunStyleSchema: z.ZodObject<{
21
+ bold: z.ZodOptional<z.ZodBoolean>;
22
+ italic: z.ZodOptional<z.ZodBoolean>;
23
+ underline: z.ZodOptional<z.ZodBoolean>;
24
+ strike: z.ZodOptional<z.ZodBoolean>;
25
+ superscript: z.ZodOptional<z.ZodBoolean>;
26
+ subscript: z.ZodOptional<z.ZodBoolean>;
27
+ fontFamily: z.ZodOptional<z.ZodString>;
28
+ fontSizePt: z.ZodOptional<z.ZodNumber>;
29
+ color: z.ZodOptional<z.ZodString>;
30
+ highlight: z.ZodOptional<z.ZodString>;
31
+ }, "strict", z.ZodTypeAny, {
32
+ bold?: boolean | undefined;
33
+ italic?: boolean | undefined;
34
+ underline?: boolean | undefined;
35
+ strike?: boolean | undefined;
36
+ superscript?: boolean | undefined;
37
+ subscript?: boolean | undefined;
38
+ fontFamily?: string | undefined;
39
+ fontSizePt?: number | undefined;
40
+ color?: string | undefined;
41
+ highlight?: string | undefined;
42
+ }, {
43
+ bold?: boolean | undefined;
44
+ italic?: boolean | undefined;
45
+ underline?: boolean | undefined;
46
+ strike?: boolean | undefined;
47
+ superscript?: boolean | undefined;
48
+ subscript?: boolean | undefined;
49
+ fontFamily?: string | undefined;
50
+ fontSizePt?: number | undefined;
51
+ color?: string | undefined;
52
+ highlight?: string | undefined;
53
+ }>;
54
+ declare const TextRunSchema: z.ZodObject<{
55
+ text: z.ZodString;
56
+ styles: z.ZodOptional<z.ZodObject<{
57
+ bold: z.ZodOptional<z.ZodBoolean>;
58
+ italic: z.ZodOptional<z.ZodBoolean>;
59
+ underline: z.ZodOptional<z.ZodBoolean>;
60
+ strike: z.ZodOptional<z.ZodBoolean>;
61
+ superscript: z.ZodOptional<z.ZodBoolean>;
62
+ subscript: z.ZodOptional<z.ZodBoolean>;
63
+ fontFamily: z.ZodOptional<z.ZodString>;
64
+ fontSizePt: z.ZodOptional<z.ZodNumber>;
65
+ color: z.ZodOptional<z.ZodString>;
66
+ highlight: z.ZodOptional<z.ZodString>;
67
+ }, "strict", z.ZodTypeAny, {
68
+ bold?: boolean | undefined;
69
+ italic?: boolean | undefined;
70
+ underline?: boolean | undefined;
71
+ strike?: boolean | undefined;
72
+ superscript?: boolean | undefined;
73
+ subscript?: boolean | undefined;
74
+ fontFamily?: string | undefined;
75
+ fontSizePt?: number | undefined;
76
+ color?: string | undefined;
77
+ highlight?: string | undefined;
78
+ }, {
79
+ bold?: boolean | undefined;
80
+ italic?: boolean | undefined;
81
+ underline?: boolean | undefined;
82
+ strike?: boolean | undefined;
83
+ superscript?: boolean | undefined;
84
+ subscript?: boolean | undefined;
85
+ fontFamily?: string | undefined;
86
+ fontSizePt?: number | undefined;
87
+ color?: string | undefined;
88
+ highlight?: string | undefined;
89
+ }>>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ text: string;
92
+ styles?: {
93
+ bold?: boolean | undefined;
94
+ italic?: boolean | undefined;
95
+ underline?: boolean | undefined;
96
+ strike?: boolean | undefined;
97
+ superscript?: boolean | undefined;
98
+ subscript?: boolean | undefined;
99
+ fontFamily?: string | undefined;
100
+ fontSizePt?: number | undefined;
101
+ color?: string | undefined;
102
+ highlight?: string | undefined;
103
+ } | undefined;
104
+ }, {
105
+ text: string;
106
+ styles?: {
107
+ bold?: boolean | undefined;
108
+ italic?: boolean | undefined;
109
+ underline?: boolean | undefined;
110
+ strike?: boolean | undefined;
111
+ superscript?: boolean | undefined;
112
+ subscript?: boolean | undefined;
113
+ fontFamily?: string | undefined;
114
+ fontSizePt?: number | undefined;
115
+ color?: string | undefined;
116
+ highlight?: string | undefined;
117
+ } | undefined;
118
+ }>;
119
+ declare const IrBlockTypeSchema: z.ZodEnum<["paragraph", "heading", "list_item", "table", "math", "image", "chart", "diagram", "unknown"]>;
120
+ declare const IrBlockSchema: z.ZodObject<{
121
+ id: z.ZodString;
122
+ type: z.ZodEnum<["paragraph", "heading", "list_item", "table", "math", "image", "chart", "diagram", "unknown"]>;
123
+ order: z.ZodNumber;
124
+ pageNo: z.ZodOptional<z.ZodNumber>;
125
+ bbox: z.ZodOptional<z.ZodObject<{
126
+ x: z.ZodNumber;
127
+ y: z.ZodNumber;
128
+ w: z.ZodNumber;
129
+ h: z.ZodNumber;
130
+ }, "strip", z.ZodTypeAny, {
131
+ x: number;
132
+ y: number;
133
+ w: number;
134
+ h: number;
135
+ }, {
136
+ x: number;
137
+ y: number;
138
+ w: number;
139
+ h: number;
140
+ }>>;
141
+ text: z.ZodOptional<z.ZodString>;
142
+ runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
143
+ text: z.ZodString;
144
+ styles: z.ZodOptional<z.ZodObject<{
145
+ bold: z.ZodOptional<z.ZodBoolean>;
146
+ italic: z.ZodOptional<z.ZodBoolean>;
147
+ underline: z.ZodOptional<z.ZodBoolean>;
148
+ strike: z.ZodOptional<z.ZodBoolean>;
149
+ superscript: z.ZodOptional<z.ZodBoolean>;
150
+ subscript: z.ZodOptional<z.ZodBoolean>;
151
+ fontFamily: z.ZodOptional<z.ZodString>;
152
+ fontSizePt: z.ZodOptional<z.ZodNumber>;
153
+ color: z.ZodOptional<z.ZodString>;
154
+ highlight: z.ZodOptional<z.ZodString>;
155
+ }, "strict", z.ZodTypeAny, {
156
+ bold?: boolean | undefined;
157
+ italic?: boolean | undefined;
158
+ underline?: boolean | undefined;
159
+ strike?: boolean | undefined;
160
+ superscript?: boolean | undefined;
161
+ subscript?: boolean | undefined;
162
+ fontFamily?: string | undefined;
163
+ fontSizePt?: number | undefined;
164
+ color?: string | undefined;
165
+ highlight?: string | undefined;
166
+ }, {
167
+ bold?: boolean | undefined;
168
+ italic?: boolean | undefined;
169
+ underline?: boolean | undefined;
170
+ strike?: boolean | undefined;
171
+ superscript?: boolean | undefined;
172
+ subscript?: boolean | undefined;
173
+ fontFamily?: string | undefined;
174
+ fontSizePt?: number | undefined;
175
+ color?: string | undefined;
176
+ highlight?: string | undefined;
177
+ }>>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ text: string;
180
+ styles?: {
181
+ bold?: boolean | undefined;
182
+ italic?: boolean | undefined;
183
+ underline?: boolean | undefined;
184
+ strike?: boolean | undefined;
185
+ superscript?: boolean | undefined;
186
+ subscript?: boolean | undefined;
187
+ fontFamily?: string | undefined;
188
+ fontSizePt?: number | undefined;
189
+ color?: string | undefined;
190
+ highlight?: string | undefined;
191
+ } | undefined;
192
+ }, {
193
+ text: string;
194
+ styles?: {
195
+ bold?: boolean | undefined;
196
+ italic?: boolean | undefined;
197
+ underline?: boolean | undefined;
198
+ strike?: boolean | undefined;
199
+ superscript?: boolean | undefined;
200
+ subscript?: boolean | undefined;
201
+ fontFamily?: string | undefined;
202
+ fontSizePt?: number | undefined;
203
+ color?: string | undefined;
204
+ highlight?: string | undefined;
205
+ } | undefined;
206
+ }>, "many">>;
207
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
208
+ latex: z.ZodOptional<z.ZodString>;
209
+ mathml: z.ZodOptional<z.ZodString>;
210
+ mediaId: z.ZodOptional<z.ZodString>;
211
+ table: z.ZodOptional<z.ZodUnknown>;
212
+ chart: z.ZodOptional<z.ZodUnknown>;
213
+ confidence: z.ZodDefault<z.ZodNumber>;
214
+ sourceRef: z.ZodOptional<z.ZodString>;
215
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
216
+ }, "strip", z.ZodTypeAny, {
217
+ type: "paragraph" | "heading" | "list_item" | "table" | "math" | "image" | "chart" | "diagram" | "unknown";
218
+ id: string;
219
+ order: number;
220
+ confidence: number;
221
+ text?: string | undefined;
222
+ styles?: Record<string, unknown> | undefined;
223
+ table?: unknown;
224
+ chart?: unknown;
225
+ pageNo?: number | undefined;
226
+ bbox?: {
227
+ x: number;
228
+ y: number;
229
+ w: number;
230
+ h: number;
231
+ } | undefined;
232
+ runs?: {
233
+ text: string;
234
+ styles?: {
235
+ bold?: boolean | undefined;
236
+ italic?: boolean | undefined;
237
+ underline?: boolean | undefined;
238
+ strike?: boolean | undefined;
239
+ superscript?: boolean | undefined;
240
+ subscript?: boolean | undefined;
241
+ fontFamily?: string | undefined;
242
+ fontSizePt?: number | undefined;
243
+ color?: string | undefined;
244
+ highlight?: string | undefined;
245
+ } | undefined;
246
+ }[] | undefined;
247
+ latex?: string | undefined;
248
+ mathml?: string | undefined;
249
+ mediaId?: string | undefined;
250
+ sourceRef?: string | undefined;
251
+ warnings?: string[] | undefined;
252
+ }, {
253
+ type: "paragraph" | "heading" | "list_item" | "table" | "math" | "image" | "chart" | "diagram" | "unknown";
254
+ id: string;
255
+ order: number;
256
+ text?: string | undefined;
257
+ styles?: Record<string, unknown> | undefined;
258
+ table?: unknown;
259
+ chart?: unknown;
260
+ pageNo?: number | undefined;
261
+ bbox?: {
262
+ x: number;
263
+ y: number;
264
+ w: number;
265
+ h: number;
266
+ } | undefined;
267
+ runs?: {
268
+ text: string;
269
+ styles?: {
270
+ bold?: boolean | undefined;
271
+ italic?: boolean | undefined;
272
+ underline?: boolean | undefined;
273
+ strike?: boolean | undefined;
274
+ superscript?: boolean | undefined;
275
+ subscript?: boolean | undefined;
276
+ fontFamily?: string | undefined;
277
+ fontSizePt?: number | undefined;
278
+ color?: string | undefined;
279
+ highlight?: string | undefined;
280
+ } | undefined;
281
+ }[] | undefined;
282
+ latex?: string | undefined;
283
+ mathml?: string | undefined;
284
+ mediaId?: string | undefined;
285
+ confidence?: number | undefined;
286
+ sourceRef?: string | undefined;
287
+ warnings?: string[] | undefined;
288
+ }>;
289
+ declare const IrPageSchema: z.ZodObject<{
290
+ pageNo: z.ZodNumber;
291
+ width: z.ZodOptional<z.ZodNumber>;
292
+ height: z.ZodOptional<z.ZodNumber>;
293
+ strategy: z.ZodOptional<z.ZodEnum<["native", "ocr", "hybrid"]>>;
294
+ }, "strip", z.ZodTypeAny, {
295
+ pageNo: number;
296
+ width?: number | undefined;
297
+ height?: number | undefined;
298
+ strategy?: "native" | "ocr" | "hybrid" | undefined;
299
+ }, {
300
+ pageNo: number;
301
+ width?: number | undefined;
302
+ height?: number | undefined;
303
+ strategy?: "native" | "ocr" | "hybrid" | undefined;
304
+ }>;
305
+ declare const DocumentIrSchema: z.ZodObject<{
306
+ schemaVersion: z.ZodLiteral<"1.0.0">;
307
+ sourceFormat: z.ZodEnum<["docx", "pdf_digital", "pdf_scanned", "pdf_hybrid", "unknown"]>;
308
+ sourceSha256: z.ZodString;
309
+ fileName: z.ZodString;
310
+ languageHints: z.ZodOptional<z.ZodArray<z.ZodEnum<["en", "hi"]>, "many">>;
311
+ pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
312
+ pageNo: z.ZodNumber;
313
+ width: z.ZodOptional<z.ZodNumber>;
314
+ height: z.ZodOptional<z.ZodNumber>;
315
+ strategy: z.ZodOptional<z.ZodEnum<["native", "ocr", "hybrid"]>>;
316
+ }, "strip", z.ZodTypeAny, {
317
+ pageNo: number;
318
+ width?: number | undefined;
319
+ height?: number | undefined;
320
+ strategy?: "native" | "ocr" | "hybrid" | undefined;
321
+ }, {
322
+ pageNo: number;
323
+ width?: number | undefined;
324
+ height?: number | undefined;
325
+ strategy?: "native" | "ocr" | "hybrid" | undefined;
326
+ }>, "many">>;
327
+ blocks: z.ZodArray<z.ZodObject<{
328
+ id: z.ZodString;
329
+ type: z.ZodEnum<["paragraph", "heading", "list_item", "table", "math", "image", "chart", "diagram", "unknown"]>;
330
+ order: z.ZodNumber;
331
+ pageNo: z.ZodOptional<z.ZodNumber>;
332
+ bbox: z.ZodOptional<z.ZodObject<{
333
+ x: z.ZodNumber;
334
+ y: z.ZodNumber;
335
+ w: z.ZodNumber;
336
+ h: z.ZodNumber;
337
+ }, "strip", z.ZodTypeAny, {
338
+ x: number;
339
+ y: number;
340
+ w: number;
341
+ h: number;
342
+ }, {
343
+ x: number;
344
+ y: number;
345
+ w: number;
346
+ h: number;
347
+ }>>;
348
+ text: z.ZodOptional<z.ZodString>;
349
+ runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
350
+ text: z.ZodString;
351
+ styles: z.ZodOptional<z.ZodObject<{
352
+ bold: z.ZodOptional<z.ZodBoolean>;
353
+ italic: z.ZodOptional<z.ZodBoolean>;
354
+ underline: z.ZodOptional<z.ZodBoolean>;
355
+ strike: z.ZodOptional<z.ZodBoolean>;
356
+ superscript: z.ZodOptional<z.ZodBoolean>;
357
+ subscript: z.ZodOptional<z.ZodBoolean>;
358
+ fontFamily: z.ZodOptional<z.ZodString>;
359
+ fontSizePt: z.ZodOptional<z.ZodNumber>;
360
+ color: z.ZodOptional<z.ZodString>;
361
+ highlight: z.ZodOptional<z.ZodString>;
362
+ }, "strict", z.ZodTypeAny, {
363
+ bold?: boolean | undefined;
364
+ italic?: boolean | undefined;
365
+ underline?: boolean | undefined;
366
+ strike?: boolean | undefined;
367
+ superscript?: boolean | undefined;
368
+ subscript?: boolean | undefined;
369
+ fontFamily?: string | undefined;
370
+ fontSizePt?: number | undefined;
371
+ color?: string | undefined;
372
+ highlight?: string | undefined;
373
+ }, {
374
+ bold?: boolean | undefined;
375
+ italic?: boolean | undefined;
376
+ underline?: boolean | undefined;
377
+ strike?: boolean | undefined;
378
+ superscript?: boolean | undefined;
379
+ subscript?: boolean | undefined;
380
+ fontFamily?: string | undefined;
381
+ fontSizePt?: number | undefined;
382
+ color?: string | undefined;
383
+ highlight?: string | undefined;
384
+ }>>;
385
+ }, "strip", z.ZodTypeAny, {
386
+ text: string;
387
+ styles?: {
388
+ bold?: boolean | undefined;
389
+ italic?: boolean | undefined;
390
+ underline?: boolean | undefined;
391
+ strike?: boolean | undefined;
392
+ superscript?: boolean | undefined;
393
+ subscript?: boolean | undefined;
394
+ fontFamily?: string | undefined;
395
+ fontSizePt?: number | undefined;
396
+ color?: string | undefined;
397
+ highlight?: string | undefined;
398
+ } | undefined;
399
+ }, {
400
+ text: string;
401
+ styles?: {
402
+ bold?: boolean | undefined;
403
+ italic?: boolean | undefined;
404
+ underline?: boolean | undefined;
405
+ strike?: boolean | undefined;
406
+ superscript?: boolean | undefined;
407
+ subscript?: boolean | undefined;
408
+ fontFamily?: string | undefined;
409
+ fontSizePt?: number | undefined;
410
+ color?: string | undefined;
411
+ highlight?: string | undefined;
412
+ } | undefined;
413
+ }>, "many">>;
414
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
415
+ latex: z.ZodOptional<z.ZodString>;
416
+ mathml: z.ZodOptional<z.ZodString>;
417
+ mediaId: z.ZodOptional<z.ZodString>;
418
+ table: z.ZodOptional<z.ZodUnknown>;
419
+ chart: z.ZodOptional<z.ZodUnknown>;
420
+ confidence: z.ZodDefault<z.ZodNumber>;
421
+ sourceRef: z.ZodOptional<z.ZodString>;
422
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
423
+ }, "strip", z.ZodTypeAny, {
424
+ type: "paragraph" | "heading" | "list_item" | "table" | "math" | "image" | "chart" | "diagram" | "unknown";
425
+ id: string;
426
+ order: number;
427
+ confidence: number;
428
+ text?: string | undefined;
429
+ styles?: Record<string, unknown> | undefined;
430
+ table?: unknown;
431
+ chart?: unknown;
432
+ pageNo?: number | undefined;
433
+ bbox?: {
434
+ x: number;
435
+ y: number;
436
+ w: number;
437
+ h: number;
438
+ } | undefined;
439
+ runs?: {
440
+ text: string;
441
+ styles?: {
442
+ bold?: boolean | undefined;
443
+ italic?: boolean | undefined;
444
+ underline?: boolean | undefined;
445
+ strike?: boolean | undefined;
446
+ superscript?: boolean | undefined;
447
+ subscript?: boolean | undefined;
448
+ fontFamily?: string | undefined;
449
+ fontSizePt?: number | undefined;
450
+ color?: string | undefined;
451
+ highlight?: string | undefined;
452
+ } | undefined;
453
+ }[] | undefined;
454
+ latex?: string | undefined;
455
+ mathml?: string | undefined;
456
+ mediaId?: string | undefined;
457
+ sourceRef?: string | undefined;
458
+ warnings?: string[] | undefined;
459
+ }, {
460
+ type: "paragraph" | "heading" | "list_item" | "table" | "math" | "image" | "chart" | "diagram" | "unknown";
461
+ id: string;
462
+ order: number;
463
+ text?: string | undefined;
464
+ styles?: Record<string, unknown> | undefined;
465
+ table?: unknown;
466
+ chart?: unknown;
467
+ pageNo?: number | undefined;
468
+ bbox?: {
469
+ x: number;
470
+ y: number;
471
+ w: number;
472
+ h: number;
473
+ } | undefined;
474
+ runs?: {
475
+ text: string;
476
+ styles?: {
477
+ bold?: boolean | undefined;
478
+ italic?: boolean | undefined;
479
+ underline?: boolean | undefined;
480
+ strike?: boolean | undefined;
481
+ superscript?: boolean | undefined;
482
+ subscript?: boolean | undefined;
483
+ fontFamily?: string | undefined;
484
+ fontSizePt?: number | undefined;
485
+ color?: string | undefined;
486
+ highlight?: string | undefined;
487
+ } | undefined;
488
+ }[] | undefined;
489
+ latex?: string | undefined;
490
+ mathml?: string | undefined;
491
+ mediaId?: string | undefined;
492
+ confidence?: number | undefined;
493
+ sourceRef?: string | undefined;
494
+ warnings?: string[] | undefined;
495
+ }>, "many">;
496
+ media: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
497
+ warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
498
+ }, "strip", z.ZodTypeAny, {
499
+ warnings: string[];
500
+ schemaVersion: "1.0.0";
501
+ sourceFormat: "unknown" | "docx" | "pdf_digital" | "pdf_scanned" | "pdf_hybrid";
502
+ sourceSha256: string;
503
+ fileName: string;
504
+ blocks: {
505
+ type: "paragraph" | "heading" | "list_item" | "table" | "math" | "image" | "chart" | "diagram" | "unknown";
506
+ id: string;
507
+ order: number;
508
+ confidence: number;
509
+ text?: string | undefined;
510
+ styles?: Record<string, unknown> | undefined;
511
+ table?: unknown;
512
+ chart?: unknown;
513
+ pageNo?: number | undefined;
514
+ bbox?: {
515
+ x: number;
516
+ y: number;
517
+ w: number;
518
+ h: number;
519
+ } | undefined;
520
+ runs?: {
521
+ text: string;
522
+ styles?: {
523
+ bold?: boolean | undefined;
524
+ italic?: boolean | undefined;
525
+ underline?: boolean | undefined;
526
+ strike?: boolean | undefined;
527
+ superscript?: boolean | undefined;
528
+ subscript?: boolean | undefined;
529
+ fontFamily?: string | undefined;
530
+ fontSizePt?: number | undefined;
531
+ color?: string | undefined;
532
+ highlight?: string | undefined;
533
+ } | undefined;
534
+ }[] | undefined;
535
+ latex?: string | undefined;
536
+ mathml?: string | undefined;
537
+ mediaId?: string | undefined;
538
+ sourceRef?: string | undefined;
539
+ warnings?: string[] | undefined;
540
+ }[];
541
+ media: Record<string, unknown>[];
542
+ languageHints?: ("en" | "hi")[] | undefined;
543
+ pages?: {
544
+ pageNo: number;
545
+ width?: number | undefined;
546
+ height?: number | undefined;
547
+ strategy?: "native" | "ocr" | "hybrid" | undefined;
548
+ }[] | undefined;
549
+ }, {
550
+ schemaVersion: "1.0.0";
551
+ sourceFormat: "unknown" | "docx" | "pdf_digital" | "pdf_scanned" | "pdf_hybrid";
552
+ sourceSha256: string;
553
+ fileName: string;
554
+ blocks: {
555
+ type: "paragraph" | "heading" | "list_item" | "table" | "math" | "image" | "chart" | "diagram" | "unknown";
556
+ id: string;
557
+ order: number;
558
+ text?: string | undefined;
559
+ styles?: Record<string, unknown> | undefined;
560
+ table?: unknown;
561
+ chart?: unknown;
562
+ pageNo?: number | undefined;
563
+ bbox?: {
564
+ x: number;
565
+ y: number;
566
+ w: number;
567
+ h: number;
568
+ } | undefined;
569
+ runs?: {
570
+ text: string;
571
+ styles?: {
572
+ bold?: boolean | undefined;
573
+ italic?: boolean | undefined;
574
+ underline?: boolean | undefined;
575
+ strike?: boolean | undefined;
576
+ superscript?: boolean | undefined;
577
+ subscript?: boolean | undefined;
578
+ fontFamily?: string | undefined;
579
+ fontSizePt?: number | undefined;
580
+ color?: string | undefined;
581
+ highlight?: string | undefined;
582
+ } | undefined;
583
+ }[] | undefined;
584
+ latex?: string | undefined;
585
+ mathml?: string | undefined;
586
+ mediaId?: string | undefined;
587
+ confidence?: number | undefined;
588
+ sourceRef?: string | undefined;
589
+ warnings?: string[] | undefined;
590
+ }[];
591
+ warnings?: string[] | undefined;
592
+ languageHints?: ("en" | "hi")[] | undefined;
593
+ pages?: {
594
+ pageNo: number;
595
+ width?: number | undefined;
596
+ height?: number | undefined;
597
+ strategy?: "native" | "ocr" | "hybrid" | undefined;
598
+ }[] | undefined;
599
+ media?: Record<string, unknown>[] | undefined;
600
+ }>;
601
+ type BBox = z.infer<typeof BBoxSchema>;
602
+ type TextRun = z.infer<typeof TextRunSchema>;
603
+ type IrBlock = z.infer<typeof IrBlockSchema>;
604
+ type IrPage = z.infer<typeof IrPageSchema>;
605
+ type DocumentIr = z.infer<typeof DocumentIrSchema>;
606
+ declare function parseDocumentIr(input: unknown): DocumentIr;
607
+ declare function safeParseDocumentIr(input: unknown): z.SafeParseReturnType<{
608
+ schemaVersion: "1.0.0";
609
+ sourceFormat: "unknown" | "docx" | "pdf_digital" | "pdf_scanned" | "pdf_hybrid";
610
+ sourceSha256: string;
611
+ fileName: string;
612
+ blocks: {
613
+ type: "paragraph" | "heading" | "list_item" | "table" | "math" | "image" | "chart" | "diagram" | "unknown";
614
+ id: string;
615
+ order: number;
616
+ text?: string | undefined;
617
+ styles?: Record<string, unknown> | undefined;
618
+ table?: unknown;
619
+ chart?: unknown;
620
+ pageNo?: number | undefined;
621
+ bbox?: {
622
+ x: number;
623
+ y: number;
624
+ w: number;
625
+ h: number;
626
+ } | undefined;
627
+ runs?: {
628
+ text: string;
629
+ styles?: {
630
+ bold?: boolean | undefined;
631
+ italic?: boolean | undefined;
632
+ underline?: boolean | undefined;
633
+ strike?: boolean | undefined;
634
+ superscript?: boolean | undefined;
635
+ subscript?: boolean | undefined;
636
+ fontFamily?: string | undefined;
637
+ fontSizePt?: number | undefined;
638
+ color?: string | undefined;
639
+ highlight?: string | undefined;
640
+ } | undefined;
641
+ }[] | undefined;
642
+ latex?: string | undefined;
643
+ mathml?: string | undefined;
644
+ mediaId?: string | undefined;
645
+ confidence?: number | undefined;
646
+ sourceRef?: string | undefined;
647
+ warnings?: string[] | undefined;
648
+ }[];
649
+ warnings?: string[] | undefined;
650
+ languageHints?: ("en" | "hi")[] | undefined;
651
+ pages?: {
652
+ pageNo: number;
653
+ width?: number | undefined;
654
+ height?: number | undefined;
655
+ strategy?: "native" | "ocr" | "hybrid" | undefined;
656
+ }[] | undefined;
657
+ media?: Record<string, unknown>[] | undefined;
658
+ }, {
659
+ warnings: string[];
660
+ schemaVersion: "1.0.0";
661
+ sourceFormat: "unknown" | "docx" | "pdf_digital" | "pdf_scanned" | "pdf_hybrid";
662
+ sourceSha256: string;
663
+ fileName: string;
664
+ blocks: {
665
+ type: "paragraph" | "heading" | "list_item" | "table" | "math" | "image" | "chart" | "diagram" | "unknown";
666
+ id: string;
667
+ order: number;
668
+ confidence: number;
669
+ text?: string | undefined;
670
+ styles?: Record<string, unknown> | undefined;
671
+ table?: unknown;
672
+ chart?: unknown;
673
+ pageNo?: number | undefined;
674
+ bbox?: {
675
+ x: number;
676
+ y: number;
677
+ w: number;
678
+ h: number;
679
+ } | undefined;
680
+ runs?: {
681
+ text: string;
682
+ styles?: {
683
+ bold?: boolean | undefined;
684
+ italic?: boolean | undefined;
685
+ underline?: boolean | undefined;
686
+ strike?: boolean | undefined;
687
+ superscript?: boolean | undefined;
688
+ subscript?: boolean | undefined;
689
+ fontFamily?: string | undefined;
690
+ fontSizePt?: number | undefined;
691
+ color?: string | undefined;
692
+ highlight?: string | undefined;
693
+ } | undefined;
694
+ }[] | undefined;
695
+ latex?: string | undefined;
696
+ mathml?: string | undefined;
697
+ mediaId?: string | undefined;
698
+ sourceRef?: string | undefined;
699
+ warnings?: string[] | undefined;
700
+ }[];
701
+ media: Record<string, unknown>[];
702
+ languageHints?: ("en" | "hi")[] | undefined;
703
+ pages?: {
704
+ pageNo: number;
705
+ width?: number | undefined;
706
+ height?: number | undefined;
707
+ strategy?: "native" | "ocr" | "hybrid" | undefined;
708
+ }[] | undefined;
709
+ }>;
710
+
711
+ export { type BBox, BBoxSchema, DOCUMENT_IR_SCHEMA_VERSION, type DocumentIr, DocumentIrSchema, type IrBlock, IrBlockSchema, IrBlockTypeSchema, type IrPage, IrPageSchema, RunStyleSchema, type TextRun, TextRunSchema, parseDocumentIr, safeParseDocumentIr };