@ai-matrx/data 0.22.27 → 0.22.28

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.cts CHANGED
@@ -5,7 +5,7 @@
5
5
  * the @ai-matrx packages read, copied verbatim — the ONE copy (architecture P5).
6
6
  * A host typed with the full platform `Database` passes its client unchanged.
7
7
  *
8
- * Schemas (19): admin, agent, ai, canvas, chat, content, deprecated, dictionary, education, files, iam, mandate, platform, public, scheduler, skill, tool, ui, users
8
+ * Schemas (20): admin, agent, ai, canvas, chat, content, deprecated, dictionary, docproc, education, files, iam, mandate, platform, public, scheduler, skill, tool, ui, users
9
9
  */
10
10
  type Json = unknown;
11
11
  type Database = {
@@ -11227,6 +11227,934 @@ type Database = {
11227
11227
  [_ in never]: never;
11228
11228
  };
11229
11229
  };
11230
+ docproc: {
11231
+ Tables: {
11232
+ derive_runs: {
11233
+ Row: {
11234
+ chunks_written: number | null;
11235
+ cost_usd: number | null;
11236
+ created_at: string;
11237
+ created_by: string | null;
11238
+ current: number | null;
11239
+ custom_fields: Json;
11240
+ deleted_at: string | null;
11241
+ derivation_kind: string;
11242
+ error: string | null;
11243
+ finished_at: string | null;
11244
+ id: string;
11245
+ metadata: Json;
11246
+ organization_id: string;
11247
+ processed_document_id: string;
11248
+ published_to_web: boolean;
11249
+ published_to_web_at: string | null;
11250
+ published_to_web_by: string | null;
11251
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
11252
+ started_at: string | null;
11253
+ status: string;
11254
+ total: number | null;
11255
+ updated_at: string;
11256
+ updated_by: string | null;
11257
+ user_id: string | null;
11258
+ version: number;
11259
+ visibility: Database["platform"]["Enums"]["visibility"];
11260
+ };
11261
+ Insert: {
11262
+ chunks_written?: number | null;
11263
+ cost_usd?: number | null;
11264
+ created_at?: string;
11265
+ created_by?: string | null;
11266
+ current?: number | null;
11267
+ custom_fields?: Json;
11268
+ deleted_at?: string | null;
11269
+ derivation_kind: string;
11270
+ error?: string | null;
11271
+ finished_at?: string | null;
11272
+ id?: string;
11273
+ metadata?: Json;
11274
+ organization_id: string;
11275
+ processed_document_id: string;
11276
+ published_to_web?: boolean;
11277
+ published_to_web_at?: string | null;
11278
+ published_to_web_by?: string | null;
11279
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
11280
+ started_at?: string | null;
11281
+ status?: string;
11282
+ total?: number | null;
11283
+ updated_at?: string;
11284
+ updated_by?: string | null;
11285
+ user_id?: string | null;
11286
+ version?: number;
11287
+ visibility?: Database["platform"]["Enums"]["visibility"];
11288
+ };
11289
+ Update: {
11290
+ chunks_written?: number | null;
11291
+ cost_usd?: number | null;
11292
+ created_at?: string;
11293
+ created_by?: string | null;
11294
+ current?: number | null;
11295
+ custom_fields?: Json;
11296
+ deleted_at?: string | null;
11297
+ derivation_kind?: string;
11298
+ error?: string | null;
11299
+ finished_at?: string | null;
11300
+ id?: string;
11301
+ metadata?: Json;
11302
+ organization_id?: string;
11303
+ processed_document_id?: string;
11304
+ published_to_web?: boolean;
11305
+ published_to_web_at?: string | null;
11306
+ published_to_web_by?: string | null;
11307
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
11308
+ started_at?: string | null;
11309
+ status?: string;
11310
+ total?: number | null;
11311
+ updated_at?: string;
11312
+ updated_by?: string | null;
11313
+ user_id?: string | null;
11314
+ version?: number;
11315
+ visibility?: Database["platform"]["Enums"]["visibility"];
11316
+ };
11317
+ Relationships: [
11318
+ {
11319
+ foreignKeyName: "derive_runs_processed_document_id_fkey";
11320
+ columns: ["processed_document_id"];
11321
+ isOneToOne: false;
11322
+ referencedRelation: "processed_documents";
11323
+ referencedColumns: ["id"];
11324
+ }
11325
+ ];
11326
+ };
11327
+ page_extraction_jobs: {
11328
+ Row: {
11329
+ agent_id: string | null;
11330
+ archived_at: string | null;
11331
+ attach_combined_pdf: boolean;
11332
+ chunk_overlap: number;
11333
+ chunk_size: number;
11334
+ chunking_strategy: string;
11335
+ column_order: Json;
11336
+ created_at: string;
11337
+ created_by: string | null;
11338
+ custom_fields: Json;
11339
+ deleted_at: string | null;
11340
+ description: string | null;
11341
+ extra_inputs: Json;
11342
+ file_id: string;
11343
+ id: string;
11344
+ is_saved: boolean;
11345
+ kind: string;
11346
+ latest_run_id: string | null;
11347
+ max_concurrent: number;
11348
+ metadata: Json;
11349
+ model_overrides: Json | null;
11350
+ name: string;
11351
+ organization_id: string;
11352
+ output_schema: Json;
11353
+ owner_id: string;
11354
+ processed_document_id: string | null;
11355
+ published_to_web: boolean;
11356
+ published_to_web_at: string | null;
11357
+ published_to_web_by: string | null;
11358
+ rag_boost: number | null;
11359
+ scope_pages: number[] | null;
11360
+ shortcut_id: string | null;
11361
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
11362
+ source_variations: Json;
11363
+ updated_at: string;
11364
+ updated_by: string | null;
11365
+ validates_job_id: string | null;
11366
+ variable_mapping: Json;
11367
+ version: number;
11368
+ visibility: Database["platform"]["Enums"]["visibility"];
11369
+ };
11370
+ Insert: {
11371
+ agent_id?: string | null;
11372
+ archived_at?: string | null;
11373
+ attach_combined_pdf?: boolean;
11374
+ chunk_overlap?: number;
11375
+ chunk_size?: number;
11376
+ chunking_strategy?: string;
11377
+ column_order?: Json;
11378
+ created_at?: string;
11379
+ created_by?: string | null;
11380
+ custom_fields?: Json;
11381
+ deleted_at?: string | null;
11382
+ description?: string | null;
11383
+ extra_inputs?: Json;
11384
+ file_id: string;
11385
+ id?: string;
11386
+ is_saved?: boolean;
11387
+ kind?: string;
11388
+ latest_run_id?: string | null;
11389
+ max_concurrent?: number;
11390
+ metadata?: Json;
11391
+ model_overrides?: Json | null;
11392
+ name: string;
11393
+ organization_id: string;
11394
+ output_schema: Json;
11395
+ owner_id?: string;
11396
+ processed_document_id?: string | null;
11397
+ published_to_web?: boolean;
11398
+ published_to_web_at?: string | null;
11399
+ published_to_web_by?: string | null;
11400
+ rag_boost?: number | null;
11401
+ scope_pages?: number[] | null;
11402
+ shortcut_id?: string | null;
11403
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
11404
+ source_variations?: Json;
11405
+ updated_at?: string;
11406
+ updated_by?: string | null;
11407
+ validates_job_id?: string | null;
11408
+ variable_mapping?: Json;
11409
+ version?: number;
11410
+ visibility?: Database["platform"]["Enums"]["visibility"];
11411
+ };
11412
+ Update: {
11413
+ agent_id?: string | null;
11414
+ archived_at?: string | null;
11415
+ attach_combined_pdf?: boolean;
11416
+ chunk_overlap?: number;
11417
+ chunk_size?: number;
11418
+ chunking_strategy?: string;
11419
+ column_order?: Json;
11420
+ created_at?: string;
11421
+ created_by?: string | null;
11422
+ custom_fields?: Json;
11423
+ deleted_at?: string | null;
11424
+ description?: string | null;
11425
+ extra_inputs?: Json;
11426
+ file_id?: string;
11427
+ id?: string;
11428
+ is_saved?: boolean;
11429
+ kind?: string;
11430
+ latest_run_id?: string | null;
11431
+ max_concurrent?: number;
11432
+ metadata?: Json;
11433
+ model_overrides?: Json | null;
11434
+ name?: string;
11435
+ organization_id?: string;
11436
+ output_schema?: Json;
11437
+ owner_id?: string;
11438
+ processed_document_id?: string | null;
11439
+ published_to_web?: boolean;
11440
+ published_to_web_at?: string | null;
11441
+ published_to_web_by?: string | null;
11442
+ rag_boost?: number | null;
11443
+ scope_pages?: number[] | null;
11444
+ shortcut_id?: string | null;
11445
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
11446
+ source_variations?: Json;
11447
+ updated_at?: string;
11448
+ updated_by?: string | null;
11449
+ validates_job_id?: string | null;
11450
+ variable_mapping?: Json;
11451
+ version?: number;
11452
+ visibility?: Database["platform"]["Enums"]["visibility"];
11453
+ };
11454
+ Relationships: [
11455
+ {
11456
+ foreignKeyName: "page_extraction_jobs_latest_run_fk";
11457
+ columns: ["latest_run_id"];
11458
+ isOneToOne: false;
11459
+ referencedRelation: "page_extraction_runs";
11460
+ referencedColumns: ["id"];
11461
+ },
11462
+ {
11463
+ foreignKeyName: "page_extraction_jobs_processed_document_id_fkey";
11464
+ columns: ["processed_document_id"];
11465
+ isOneToOne: false;
11466
+ referencedRelation: "processed_documents";
11467
+ referencedColumns: ["id"];
11468
+ },
11469
+ {
11470
+ foreignKeyName: "page_extraction_jobs_validates_job_id_fkey";
11471
+ columns: ["validates_job_id"];
11472
+ isOneToOne: false;
11473
+ referencedRelation: "page_extraction_jobs";
11474
+ referencedColumns: ["id"];
11475
+ }
11476
+ ];
11477
+ };
11478
+ page_extraction_page_runs: {
11479
+ Row: {
11480
+ chunk_index: number;
11481
+ cost: number | null;
11482
+ created_at: string;
11483
+ created_by: string | null;
11484
+ custom_fields: Json;
11485
+ deleted_at: string | null;
11486
+ duration_ms: number | null;
11487
+ error: string | null;
11488
+ file_id: string;
11489
+ finished_at: string | null;
11490
+ id: string;
11491
+ job_id: string;
11492
+ metadata: Json;
11493
+ organization_id: string;
11494
+ page_ids: string[] | null;
11495
+ page_numbers: number[];
11496
+ parse_error: string | null;
11497
+ parsed_payload: Json | null;
11498
+ published_to_web: boolean;
11499
+ published_to_web_at: string | null;
11500
+ published_to_web_by: string | null;
11501
+ raw_response: string | null;
11502
+ request_id: string | null;
11503
+ run_id: string;
11504
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
11505
+ started_at: string | null;
11506
+ status: string;
11507
+ tokens: number | null;
11508
+ updated_at: string;
11509
+ updated_by: string | null;
11510
+ user_id: string | null;
11511
+ version: number;
11512
+ visibility: Database["platform"]["Enums"]["visibility"];
11513
+ };
11514
+ Insert: {
11515
+ chunk_index: number;
11516
+ cost?: number | null;
11517
+ created_at?: string;
11518
+ created_by?: string | null;
11519
+ custom_fields?: Json;
11520
+ deleted_at?: string | null;
11521
+ duration_ms?: number | null;
11522
+ error?: string | null;
11523
+ file_id: string;
11524
+ finished_at?: string | null;
11525
+ id?: string;
11526
+ job_id: string;
11527
+ metadata?: Json;
11528
+ organization_id: string;
11529
+ page_ids?: string[] | null;
11530
+ page_numbers: number[];
11531
+ parse_error?: string | null;
11532
+ parsed_payload?: Json | null;
11533
+ published_to_web?: boolean;
11534
+ published_to_web_at?: string | null;
11535
+ published_to_web_by?: string | null;
11536
+ raw_response?: string | null;
11537
+ request_id?: string | null;
11538
+ run_id: string;
11539
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
11540
+ started_at?: string | null;
11541
+ status?: string;
11542
+ tokens?: number | null;
11543
+ updated_at?: string;
11544
+ updated_by?: string | null;
11545
+ user_id?: string | null;
11546
+ version?: number;
11547
+ visibility?: Database["platform"]["Enums"]["visibility"];
11548
+ };
11549
+ Update: {
11550
+ chunk_index?: number;
11551
+ cost?: number | null;
11552
+ created_at?: string;
11553
+ created_by?: string | null;
11554
+ custom_fields?: Json;
11555
+ deleted_at?: string | null;
11556
+ duration_ms?: number | null;
11557
+ error?: string | null;
11558
+ file_id?: string;
11559
+ finished_at?: string | null;
11560
+ id?: string;
11561
+ job_id?: string;
11562
+ metadata?: Json;
11563
+ organization_id?: string;
11564
+ page_ids?: string[] | null;
11565
+ page_numbers?: number[];
11566
+ parse_error?: string | null;
11567
+ parsed_payload?: Json | null;
11568
+ published_to_web?: boolean;
11569
+ published_to_web_at?: string | null;
11570
+ published_to_web_by?: string | null;
11571
+ raw_response?: string | null;
11572
+ request_id?: string | null;
11573
+ run_id?: string;
11574
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
11575
+ started_at?: string | null;
11576
+ status?: string;
11577
+ tokens?: number | null;
11578
+ updated_at?: string;
11579
+ updated_by?: string | null;
11580
+ user_id?: string | null;
11581
+ version?: number;
11582
+ visibility?: Database["platform"]["Enums"]["visibility"];
11583
+ };
11584
+ Relationships: [
11585
+ {
11586
+ foreignKeyName: "page_extraction_page_runs_job_id_fkey";
11587
+ columns: ["job_id"];
11588
+ isOneToOne: false;
11589
+ referencedRelation: "page_extraction_jobs";
11590
+ referencedColumns: ["id"];
11591
+ },
11592
+ {
11593
+ foreignKeyName: "page_extraction_page_runs_run_id_fkey";
11594
+ columns: ["run_id"];
11595
+ isOneToOne: false;
11596
+ referencedRelation: "page_extraction_runs";
11597
+ referencedColumns: ["id"];
11598
+ }
11599
+ ];
11600
+ };
11601
+ page_extraction_results: {
11602
+ Row: {
11603
+ canonical_page: number | null;
11604
+ created_at: string;
11605
+ custom_fields: Json;
11606
+ deleted_at: string | null;
11607
+ file_id: string;
11608
+ id: string;
11609
+ job_id: string;
11610
+ metadata: Json;
11611
+ organization_id: string;
11612
+ page_run_id: string;
11613
+ payload: Json;
11614
+ run_id: string;
11615
+ source_pages: number[];
11616
+ };
11617
+ Insert: {
11618
+ canonical_page?: number | null;
11619
+ created_at?: string;
11620
+ custom_fields?: Json;
11621
+ deleted_at?: string | null;
11622
+ file_id: string;
11623
+ id?: string;
11624
+ job_id: string;
11625
+ metadata?: Json;
11626
+ organization_id: string;
11627
+ page_run_id: string;
11628
+ payload: Json;
11629
+ run_id: string;
11630
+ source_pages: number[];
11631
+ };
11632
+ Update: {
11633
+ canonical_page?: number | null;
11634
+ created_at?: string;
11635
+ custom_fields?: Json;
11636
+ deleted_at?: string | null;
11637
+ file_id?: string;
11638
+ id?: string;
11639
+ job_id?: string;
11640
+ metadata?: Json;
11641
+ organization_id?: string;
11642
+ page_run_id?: string;
11643
+ payload?: Json;
11644
+ run_id?: string;
11645
+ source_pages?: number[];
11646
+ };
11647
+ Relationships: [
11648
+ {
11649
+ foreignKeyName: "page_extraction_results_job_id_fkey";
11650
+ columns: ["job_id"];
11651
+ isOneToOne: false;
11652
+ referencedRelation: "page_extraction_jobs";
11653
+ referencedColumns: ["id"];
11654
+ },
11655
+ {
11656
+ foreignKeyName: "page_extraction_results_page_run_id_fkey";
11657
+ columns: ["page_run_id"];
11658
+ isOneToOne: false;
11659
+ referencedRelation: "page_extraction_page_runs";
11660
+ referencedColumns: ["id"];
11661
+ },
11662
+ {
11663
+ foreignKeyName: "page_extraction_results_run_id_fkey";
11664
+ columns: ["run_id"];
11665
+ isOneToOne: false;
11666
+ referencedRelation: "page_extraction_runs";
11667
+ referencedColumns: ["id"];
11668
+ }
11669
+ ];
11670
+ };
11671
+ page_extraction_runs: {
11672
+ Row: {
11673
+ chunk_count: number;
11674
+ completed_chunks: number;
11675
+ created_at: string;
11676
+ custom_fields: Json;
11677
+ deleted_at: string | null;
11678
+ error: string | null;
11679
+ failed_chunks: number;
11680
+ finished_at: string | null;
11681
+ id: string;
11682
+ job_id: string;
11683
+ metadata: Json;
11684
+ organization_id: string;
11685
+ result_count: number;
11686
+ started_at: string | null;
11687
+ status: string;
11688
+ total_cost: number;
11689
+ total_tokens: number;
11690
+ trigger_source: string;
11691
+ triggered_by: string | null;
11692
+ };
11693
+ Insert: {
11694
+ chunk_count?: number;
11695
+ completed_chunks?: number;
11696
+ created_at?: string;
11697
+ custom_fields?: Json;
11698
+ deleted_at?: string | null;
11699
+ error?: string | null;
11700
+ failed_chunks?: number;
11701
+ finished_at?: string | null;
11702
+ id?: string;
11703
+ job_id: string;
11704
+ metadata?: Json;
11705
+ organization_id: string;
11706
+ result_count?: number;
11707
+ started_at?: string | null;
11708
+ status?: string;
11709
+ total_cost?: number;
11710
+ total_tokens?: number;
11711
+ trigger_source?: string;
11712
+ triggered_by?: string | null;
11713
+ };
11714
+ Update: {
11715
+ chunk_count?: number;
11716
+ completed_chunks?: number;
11717
+ created_at?: string;
11718
+ custom_fields?: Json;
11719
+ deleted_at?: string | null;
11720
+ error?: string | null;
11721
+ failed_chunks?: number;
11722
+ finished_at?: string | null;
11723
+ id?: string;
11724
+ job_id?: string;
11725
+ metadata?: Json;
11726
+ organization_id?: string;
11727
+ result_count?: number;
11728
+ started_at?: string | null;
11729
+ status?: string;
11730
+ total_cost?: number;
11731
+ total_tokens?: number;
11732
+ trigger_source?: string;
11733
+ triggered_by?: string | null;
11734
+ };
11735
+ Relationships: [
11736
+ {
11737
+ foreignKeyName: "page_extraction_runs_job_id_fkey";
11738
+ columns: ["job_id"];
11739
+ isOneToOne: false;
11740
+ referencedRelation: "page_extraction_jobs";
11741
+ referencedColumns: ["id"];
11742
+ }
11743
+ ];
11744
+ };
11745
+ processed_document_pages: {
11746
+ Row: {
11747
+ blocks: Json | null;
11748
+ cleaned_char_count: number;
11749
+ cleaned_text: string;
11750
+ created_at: string;
11751
+ custom_fields: Json;
11752
+ extraction_confidence: number | null;
11753
+ extraction_method: string | null;
11754
+ height: number | null;
11755
+ id: string;
11756
+ image_cld_file_id: string | null;
11757
+ image_dpi: number | null;
11758
+ is_continuation: boolean;
11759
+ locator: Json;
11760
+ metadata: Json;
11761
+ organization_id: string;
11762
+ page_index: number;
11763
+ page_number: number;
11764
+ portion_kind: string;
11765
+ processed_document_id: string;
11766
+ raw_char_count: number;
11767
+ raw_text: string;
11768
+ rotation: number | null;
11769
+ section_kind: string | null;
11770
+ section_subtype: string | null;
11771
+ section_title: string | null;
11772
+ speaker: string | null;
11773
+ used_ocr: boolean;
11774
+ verification_flags: string[] | null;
11775
+ verified_at: string | null;
11776
+ width: number | null;
11777
+ words: Json | null;
11778
+ };
11779
+ Insert: {
11780
+ blocks?: Json | null;
11781
+ cleaned_char_count?: number;
11782
+ cleaned_text?: string;
11783
+ created_at?: string;
11784
+ custom_fields?: Json;
11785
+ extraction_confidence?: number | null;
11786
+ extraction_method?: string | null;
11787
+ height?: number | null;
11788
+ id?: string;
11789
+ image_cld_file_id?: string | null;
11790
+ image_dpi?: number | null;
11791
+ is_continuation?: boolean;
11792
+ locator?: Json;
11793
+ metadata?: Json;
11794
+ organization_id: string;
11795
+ page_index: number;
11796
+ page_number: number;
11797
+ portion_kind?: string;
11798
+ processed_document_id: string;
11799
+ raw_char_count?: number;
11800
+ raw_text?: string;
11801
+ rotation?: number | null;
11802
+ section_kind?: string | null;
11803
+ section_subtype?: string | null;
11804
+ section_title?: string | null;
11805
+ speaker?: string | null;
11806
+ used_ocr?: boolean;
11807
+ verification_flags?: string[] | null;
11808
+ verified_at?: string | null;
11809
+ width?: number | null;
11810
+ words?: Json | null;
11811
+ };
11812
+ Update: {
11813
+ blocks?: Json | null;
11814
+ cleaned_char_count?: number;
11815
+ cleaned_text?: string;
11816
+ created_at?: string;
11817
+ custom_fields?: Json;
11818
+ extraction_confidence?: number | null;
11819
+ extraction_method?: string | null;
11820
+ height?: number | null;
11821
+ id?: string;
11822
+ image_cld_file_id?: string | null;
11823
+ image_dpi?: number | null;
11824
+ is_continuation?: boolean;
11825
+ locator?: Json;
11826
+ metadata?: Json;
11827
+ organization_id?: string;
11828
+ page_index?: number;
11829
+ page_number?: number;
11830
+ portion_kind?: string;
11831
+ processed_document_id?: string;
11832
+ raw_char_count?: number;
11833
+ raw_text?: string;
11834
+ rotation?: number | null;
11835
+ section_kind?: string | null;
11836
+ section_subtype?: string | null;
11837
+ section_title?: string | null;
11838
+ speaker?: string | null;
11839
+ used_ocr?: boolean;
11840
+ verification_flags?: string[] | null;
11841
+ verified_at?: string | null;
11842
+ width?: number | null;
11843
+ words?: Json | null;
11844
+ };
11845
+ Relationships: [
11846
+ {
11847
+ foreignKeyName: "processed_document_pages_processed_document_id_fkey";
11848
+ columns: ["processed_document_id"];
11849
+ isOneToOne: false;
11850
+ referencedRelation: "processed_documents";
11851
+ referencedColumns: ["id"];
11852
+ }
11853
+ ];
11854
+ };
11855
+ processed_documents: {
11856
+ Row: {
11857
+ archived_at: string | null;
11858
+ archived_reason: string | null;
11859
+ canonical_clean_id: string | null;
11860
+ canonical_identity: string | null;
11861
+ capture_method: string | null;
11862
+ captured_at: string;
11863
+ clean_content: string | null;
11864
+ clean_content_completed_at: string | null;
11865
+ clean_content_cost_usd: number | null;
11866
+ cleaner_name: string | null;
11867
+ cleaner_version: string | null;
11868
+ content: string | null;
11869
+ content_hash: string | null;
11870
+ created_at: string;
11871
+ created_by: string | null;
11872
+ custom_fields: Json;
11873
+ deleted_at: string | null;
11874
+ derivation_kind: string;
11875
+ derivation_metadata: Json;
11876
+ extractor_name: string;
11877
+ extractor_version: string;
11878
+ file_content_hash: string | null;
11879
+ id: string;
11880
+ intelligence_policy: string | null;
11881
+ kept_at: string | null;
11882
+ kept_by: string | null;
11883
+ metadata: Json;
11884
+ mime_type: string | null;
11885
+ name: string;
11886
+ organization_id: string;
11887
+ origin_client: string | null;
11888
+ original_file_id: string | null;
11889
+ owner_id: string;
11890
+ params_hash: string | null;
11891
+ parent_processed_id: string | null;
11892
+ published_to_web: boolean;
11893
+ published_to_web_at: string | null;
11894
+ published_to_web_by: string | null;
11895
+ rag_boost: number;
11896
+ replace_reason: string | null;
11897
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
11898
+ source_hash: string;
11899
+ source_id: string;
11900
+ source_kind: string;
11901
+ storage_uri: string | null;
11902
+ structured_json: Json | null;
11903
+ total_pages: number | null;
11904
+ updated_at: string;
11905
+ updated_by: string | null;
11906
+ version: number;
11907
+ visibility: Database["platform"]["Enums"]["visibility"];
11908
+ };
11909
+ Insert: {
11910
+ archived_at?: string | null;
11911
+ archived_reason?: string | null;
11912
+ canonical_clean_id?: string | null;
11913
+ canonical_identity?: string | null;
11914
+ capture_method?: string | null;
11915
+ captured_at?: string;
11916
+ clean_content?: string | null;
11917
+ clean_content_completed_at?: string | null;
11918
+ clean_content_cost_usd?: number | null;
11919
+ cleaner_name?: string | null;
11920
+ cleaner_version?: string | null;
11921
+ content?: string | null;
11922
+ content_hash?: string | null;
11923
+ created_at?: string;
11924
+ created_by?: string | null;
11925
+ custom_fields?: Json;
11926
+ deleted_at?: string | null;
11927
+ derivation_kind?: string;
11928
+ derivation_metadata?: Json;
11929
+ extractor_name?: string;
11930
+ extractor_version?: string;
11931
+ file_content_hash?: string | null;
11932
+ id?: string;
11933
+ intelligence_policy?: string | null;
11934
+ kept_at?: string | null;
11935
+ kept_by?: string | null;
11936
+ metadata?: Json;
11937
+ mime_type?: string | null;
11938
+ name: string;
11939
+ organization_id: string;
11940
+ origin_client?: string | null;
11941
+ original_file_id?: string | null;
11942
+ owner_id?: string;
11943
+ params_hash?: string | null;
11944
+ parent_processed_id?: string | null;
11945
+ published_to_web?: boolean;
11946
+ published_to_web_at?: string | null;
11947
+ published_to_web_by?: string | null;
11948
+ rag_boost?: number;
11949
+ replace_reason?: string | null;
11950
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
11951
+ source_hash: string;
11952
+ source_id: string;
11953
+ source_kind: string;
11954
+ storage_uri?: string | null;
11955
+ structured_json?: Json | null;
11956
+ total_pages?: number | null;
11957
+ updated_at?: string;
11958
+ updated_by?: string | null;
11959
+ version?: number;
11960
+ visibility: Database["platform"]["Enums"]["visibility"];
11961
+ };
11962
+ Update: {
11963
+ archived_at?: string | null;
11964
+ archived_reason?: string | null;
11965
+ canonical_clean_id?: string | null;
11966
+ canonical_identity?: string | null;
11967
+ capture_method?: string | null;
11968
+ captured_at?: string;
11969
+ clean_content?: string | null;
11970
+ clean_content_completed_at?: string | null;
11971
+ clean_content_cost_usd?: number | null;
11972
+ cleaner_name?: string | null;
11973
+ cleaner_version?: string | null;
11974
+ content?: string | null;
11975
+ content_hash?: string | null;
11976
+ created_at?: string;
11977
+ created_by?: string | null;
11978
+ custom_fields?: Json;
11979
+ deleted_at?: string | null;
11980
+ derivation_kind?: string;
11981
+ derivation_metadata?: Json;
11982
+ extractor_name?: string;
11983
+ extractor_version?: string;
11984
+ file_content_hash?: string | null;
11985
+ id?: string;
11986
+ intelligence_policy?: string | null;
11987
+ kept_at?: string | null;
11988
+ kept_by?: string | null;
11989
+ metadata?: Json;
11990
+ mime_type?: string | null;
11991
+ name?: string;
11992
+ organization_id?: string;
11993
+ origin_client?: string | null;
11994
+ original_file_id?: string | null;
11995
+ owner_id?: string;
11996
+ params_hash?: string | null;
11997
+ parent_processed_id?: string | null;
11998
+ published_to_web?: boolean;
11999
+ published_to_web_at?: string | null;
12000
+ published_to_web_by?: string | null;
12001
+ rag_boost?: number;
12002
+ replace_reason?: string | null;
12003
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
12004
+ source_hash?: string;
12005
+ source_id?: string;
12006
+ source_kind?: string;
12007
+ storage_uri?: string | null;
12008
+ structured_json?: Json | null;
12009
+ total_pages?: number | null;
12010
+ updated_at?: string;
12011
+ updated_by?: string | null;
12012
+ version?: number;
12013
+ visibility?: Database["platform"]["Enums"]["visibility"];
12014
+ };
12015
+ Relationships: [
12016
+ {
12017
+ foreignKeyName: "processed_documents_canonical_clean_id_fkey";
12018
+ columns: ["canonical_clean_id"];
12019
+ isOneToOne: false;
12020
+ referencedRelation: "processed_documents";
12021
+ referencedColumns: ["id"];
12022
+ },
12023
+ {
12024
+ foreignKeyName: "processed_documents_parent_processed_id_fkey";
12025
+ columns: ["parent_processed_id"];
12026
+ isOneToOne: false;
12027
+ referencedRelation: "processed_documents";
12028
+ referencedColumns: ["id"];
12029
+ }
12030
+ ];
12031
+ };
12032
+ };
12033
+ Views: {
12034
+ [_ in never]: never;
12035
+ };
12036
+ Functions: {
12037
+ _source_captured_at_of: {
12038
+ Args: {
12039
+ p_created_at: string;
12040
+ p_intelligence_policy: string;
12041
+ p_metadata: Json;
12042
+ p_source_id: string;
12043
+ p_source_kind: string;
12044
+ };
12045
+ Returns: string;
12046
+ };
12047
+ _source_facts_may_read: {
12048
+ Args: {
12049
+ p_doc: string;
12050
+ };
12051
+ Returns: boolean;
12052
+ };
12053
+ _source_facts_may_read_any: {
12054
+ Args: {
12055
+ p_id: string;
12056
+ p_type: string;
12057
+ };
12058
+ Returns: boolean;
12059
+ };
12060
+ page_extraction_job_lane_rows: {
12061
+ Args: {
12062
+ p_org_id?: string;
12063
+ p_scope?: string;
12064
+ };
12065
+ Returns: {
12066
+ agent_id: string | null;
12067
+ archived_at: string | null;
12068
+ attach_combined_pdf: boolean;
12069
+ chunk_overlap: number;
12070
+ chunk_size: number;
12071
+ chunking_strategy: string;
12072
+ column_order: Json;
12073
+ created_at: string;
12074
+ created_by: string | null;
12075
+ custom_fields: Json;
12076
+ deleted_at: string | null;
12077
+ description: string | null;
12078
+ extra_inputs: Json;
12079
+ file_id: string;
12080
+ id: string;
12081
+ is_saved: boolean;
12082
+ kind: string;
12083
+ latest_run_id: string | null;
12084
+ max_concurrent: number;
12085
+ metadata: Json;
12086
+ model_overrides: Json | null;
12087
+ name: string;
12088
+ organization_id: string;
12089
+ output_schema: Json;
12090
+ owner_id: string;
12091
+ processed_document_id: string | null;
12092
+ published_to_web: boolean;
12093
+ published_to_web_at: string | null;
12094
+ published_to_web_by: string | null;
12095
+ rag_boost: number | null;
12096
+ scope_pages: number[] | null;
12097
+ shortcut_id: string | null;
12098
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
12099
+ source_variations: Json;
12100
+ updated_at: string;
12101
+ updated_by: string | null;
12102
+ validates_job_id: string | null;
12103
+ variable_mapping: Json;
12104
+ version: number;
12105
+ visibility: Database["platform"]["Enums"]["visibility"];
12106
+ }[];
12107
+ SetofOptions: {
12108
+ from: "*";
12109
+ to: "page_extraction_jobs";
12110
+ isOneToOne: false;
12111
+ isSetofReturn: true;
12112
+ };
12113
+ };
12114
+ page_extraction_job_list_lanes: {
12115
+ Args: {
12116
+ p_include_archived?: boolean;
12117
+ p_org_id?: string;
12118
+ p_saved_only?: boolean;
12119
+ };
12120
+ Returns: {
12121
+ id: string;
12122
+ lane: string;
12123
+ organization_id: string;
12124
+ }[];
12125
+ };
12126
+ recompute_canonical_for_file: {
12127
+ Args: {
12128
+ p_file_id: string;
12129
+ };
12130
+ Returns: undefined;
12131
+ };
12132
+ source_list_facts: {
12133
+ Args: {
12134
+ p_ids: string[];
12135
+ };
12136
+ Returns: {
12137
+ attachments: Json;
12138
+ chunk_count: number;
12139
+ current_chunk_count: number;
12140
+ current_document_id: string;
12141
+ current_has_entities: boolean;
12142
+ entities_state: string;
12143
+ has_entities: boolean;
12144
+ head_document_id: string;
12145
+ indexing: boolean;
12146
+ processed_document_id: string;
12147
+ stale_chunk_count: number;
12148
+ }[];
12149
+ };
12150
+ };
12151
+ Enums: {
12152
+ [_ in never]: never;
12153
+ };
12154
+ CompositeTypes: {
12155
+ [_ in never]: never;
12156
+ };
12157
+ };
11230
12158
  education: {
11231
12159
  Tables: {
11232
12160
  assessment: {