@betterinternship/schema.moa 1.4.26 → 1.4.27

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/db.d.ts CHANGED
@@ -1,866 +1,866 @@
1
- import { PostgrestError } from "@supabase/supabase-js";
2
- import { Database as _EntityDatabase, Tables as _EntityTables } from "./db.ent.types";
3
- import { Database as _SchoolDatabase, Tables as _SchoolTables } from "./db.uni.types";
4
- import { Database as _DocumentDatabase, Tables as _DocumentTables } from "./db.doc.types";
5
- export type DocumentDatabase = _DocumentDatabase;
6
- export type EntityDatabase = _EntityDatabase;
7
- export type SchoolDatabase = _SchoolDatabase;
8
- export type DocumentTables<T extends "base_documents" | "base_images" | "signed_documents" | "field_validators" | "field_repository" | "form_schemas" | "pending_documents" | "field_transformers" | "form_groups" | {
9
- schema: "public";
10
- }> = _DocumentTables<T>;
11
- export type EntityTables<T extends "entities" | "entity_logs" | "messages" | "threads" | "moa_requests" | "new_entity_requests" | "student_internship_forms" | {
12
- schema: "public";
13
- }> = _EntityTables<T>;
14
- export type SchoolTables<T extends "moa_histories" | "schools" | "private_entity_notes" | "school_accounts" | "school_entities" | "school_logs" | {
15
- schema: "public";
16
- }> = _SchoolTables<T>;
17
- export declare const entityDb: import("@supabase/supabase-js").SupabaseClient<_EntityDatabase, "public", {
18
- Tables: {
19
- entities: {
20
- Row: {
21
- address: string | null;
22
- contact_email: string | null;
23
- contact_name: string | null;
24
- contact_phone: string | null;
25
- created_at: string;
26
- display_name: string | null;
27
- documents: import("./db.ent.types").Json | null;
28
- id: string;
29
- industry: string | null;
30
- is_deactivated: boolean;
31
- legal_identifier: string;
32
- password: string;
33
- type: string;
34
- };
35
- Insert: {
36
- address?: string | null;
37
- contact_email?: string | null;
38
- contact_name?: string | null;
39
- contact_phone?: string | null;
40
- created_at?: string;
41
- display_name?: string | null;
42
- documents?: import("./db.ent.types").Json | null;
43
- id?: string;
44
- industry?: string | null;
45
- is_deactivated?: boolean;
46
- legal_identifier: string;
47
- password?: string;
48
- type: string;
49
- };
50
- Update: {
51
- address?: string | null;
52
- contact_email?: string | null;
53
- contact_name?: string | null;
54
- contact_phone?: string | null;
55
- created_at?: string;
56
- display_name?: string | null;
57
- documents?: import("./db.ent.types").Json | null;
58
- id?: string;
59
- industry?: string | null;
60
- is_deactivated?: boolean;
61
- legal_identifier?: string;
62
- password?: string;
63
- type?: string;
64
- };
65
- Relationships: [{
66
- foreignKeyName: "entities_industry_fkey";
67
- columns: ["industry"];
68
- isOneToOne: false;
69
- referencedRelation: "ref_industries";
70
- referencedColumns: ["id"];
71
- }];
72
- };
73
- entity_logs: {
74
- Row: {
75
- entity_id: string;
76
- file: string;
77
- id: string;
78
- source_type: string;
79
- target: string | null;
80
- timestamp: string;
81
- update_type: string;
82
- };
83
- Insert: {
84
- entity_id: string;
85
- file: string;
86
- id?: string;
87
- source_type: string;
88
- target?: string | null;
89
- timestamp?: string;
90
- update_type: string;
91
- };
92
- Update: {
93
- entity_id?: string;
94
- file?: string;
95
- id?: string;
96
- source_type?: string;
97
- target?: string | null;
98
- timestamp?: string;
99
- update_type?: string;
100
- };
101
- Relationships: [{
102
- foreignKeyName: "entity_logs_entity_id_fkey";
103
- columns: ["entity_id"];
104
- isOneToOne: false;
105
- referencedRelation: "entities";
106
- referencedColumns: ["id"];
107
- }];
108
- };
109
- entity_sessions: {
110
- Row: {
111
- entity_id: string;
112
- id: number;
113
- timestamp: string;
114
- };
115
- Insert: {
116
- entity_id: string;
117
- id?: number;
118
- timestamp?: string;
119
- };
120
- Update: {
121
- entity_id?: string;
122
- id?: number;
123
- timestamp?: string;
124
- };
125
- Relationships: [{
126
- foreignKeyName: "entity_sessions_entity_id_fkey";
127
- columns: ["entity_id"];
128
- isOneToOne: false;
129
- referencedRelation: "entities";
130
- referencedColumns: ["id"];
131
- }];
132
- };
133
- messages: {
134
- Row: {
135
- action: string;
136
- attachments: import("./db.ent.types").Json | null;
137
- id: string;
138
- moa_document: string | null;
139
- source_id: string;
140
- source_type: string;
141
- target_id: string;
142
- text: string | null;
143
- thread_id: string;
144
- timestamp: string;
145
- };
146
- Insert: {
147
- action: string;
148
- attachments?: import("./db.ent.types").Json | null;
149
- id?: string;
150
- moa_document?: string | null;
151
- source_id: string;
152
- source_type: string;
153
- target_id: string;
154
- text?: string | null;
155
- thread_id: string;
156
- timestamp?: string;
157
- };
158
- Update: {
159
- action?: string;
160
- attachments?: import("./db.ent.types").Json | null;
161
- id?: string;
162
- moa_document?: string | null;
163
- source_id?: string;
164
- source_type?: string;
165
- target_id?: string;
166
- text?: string | null;
167
- thread_id?: string;
168
- timestamp?: string;
169
- };
170
- Relationships: [{
171
- foreignKeyName: "messages_thread_id_fkey";
172
- columns: ["thread_id"];
173
- isOneToOne: false;
174
- referencedRelation: "threads";
175
- referencedColumns: ["id"];
176
- }];
177
- };
178
- moa_requests: {
179
- Row: {
180
- entity_id: string;
181
- id: string;
182
- notified_school_account_id: string | null;
183
- outcome: string | null;
184
- processed_by_account_id: string | null;
185
- processed_date: string | null;
186
- school_id: string;
187
- signed_document_id: string | null;
188
- thread_id: string | null;
189
- timestamp: string;
190
- };
191
- Insert: {
192
- entity_id: string;
193
- id?: string;
194
- notified_school_account_id?: string | null;
195
- outcome?: string | null;
196
- processed_by_account_id?: string | null;
197
- processed_date?: string | null;
198
- school_id: string;
199
- signed_document_id?: string | null;
200
- thread_id?: string | null;
201
- timestamp?: string;
202
- };
203
- Update: {
204
- entity_id?: string;
205
- id?: string;
206
- notified_school_account_id?: string | null;
207
- outcome?: string | null;
208
- processed_by_account_id?: string | null;
209
- processed_date?: string | null;
210
- school_id?: string;
211
- signed_document_id?: string | null;
212
- thread_id?: string | null;
213
- timestamp?: string;
214
- };
215
- Relationships: [{
216
- foreignKeyName: "moa_requests_entity_id_fkey";
217
- columns: ["entity_id"];
218
- isOneToOne: false;
219
- referencedRelation: "entities";
220
- referencedColumns: ["id"];
221
- }, {
222
- foreignKeyName: "moa_requests_thread_id_fkey";
223
- columns: ["thread_id"];
224
- isOneToOne: false;
225
- referencedRelation: "threads";
226
- referencedColumns: ["id"];
227
- }];
228
- };
229
- new_entity_requests: {
230
- Row: {
231
- entity_id: string;
232
- id: string;
233
- outcome: string | null;
234
- processed_by_account_id: string | null;
235
- processed_date: string | null;
236
- school_id: string;
237
- thread_id: string;
238
- timestamp: string;
239
- };
240
- Insert: {
241
- entity_id: string;
242
- id?: string;
243
- outcome?: string | null;
244
- processed_by_account_id?: string | null;
245
- processed_date?: string | null;
246
- school_id: string;
247
- thread_id: string;
248
- timestamp?: string;
249
- };
250
- Update: {
251
- entity_id?: string;
252
- id?: string;
253
- outcome?: string | null;
254
- processed_by_account_id?: string | null;
255
- processed_date?: string | null;
256
- school_id?: string;
257
- thread_id?: string;
258
- timestamp?: string;
259
- };
260
- Relationships: [{
261
- foreignKeyName: "new_entity_requests_entity_id_fkey";
262
- columns: ["entity_id"];
263
- isOneToOne: false;
264
- referencedRelation: "entities";
265
- referencedColumns: ["id"];
266
- }, {
267
- foreignKeyName: "new_entity_requests_thread_id_fkey";
268
- columns: ["thread_id"];
269
- isOneToOne: false;
270
- referencedRelation: "threads";
271
- referencedColumns: ["id"];
272
- }];
273
- };
274
- ref_industries: {
275
- Row: {
276
- id: string;
277
- name: string;
278
- };
279
- Insert: {
280
- id?: string;
281
- name: string;
282
- };
283
- Update: {
284
- id?: string;
285
- name?: string;
286
- };
287
- Relationships: [];
288
- };
289
- student_internship_forms: {
290
- Row: {
291
- entity_id: string | null;
292
- form_name: string | null;
293
- id: string;
294
- pending_document_id: string | null;
295
- signed_document_id: string | null;
296
- timestamp: string;
297
- university_id: string | null;
298
- user_id: string | null;
299
- };
300
- Insert: {
301
- entity_id?: string | null;
302
- form_name?: string | null;
303
- id?: string;
304
- pending_document_id?: string | null;
305
- signed_document_id?: string | null;
306
- timestamp?: string;
307
- university_id?: string | null;
308
- user_id?: string | null;
309
- };
310
- Update: {
311
- entity_id?: string | null;
312
- form_name?: string | null;
313
- id?: string;
314
- pending_document_id?: string | null;
315
- signed_document_id?: string | null;
316
- timestamp?: string;
317
- university_id?: string | null;
318
- user_id?: string | null;
319
- };
320
- Relationships: [];
321
- };
322
- threads: {
323
- Row: {
324
- id: string;
325
- };
326
- Insert: {
327
- id?: string;
328
- };
329
- Update: {
330
- id?: string;
331
- };
332
- Relationships: [];
333
- };
334
- };
335
- Views: { [_ in never]: never; };
336
- Functions: { [_ in never]: never; };
337
- Enums: { [_ in never]: never; };
338
- CompositeTypes: { [_ in never]: never; };
339
- }>;
340
- export declare const schoolDb: import("@supabase/supabase-js").SupabaseClient<_SchoolDatabase, "public", {
341
- Tables: {
342
- moa_histories: {
343
- Row: {
344
- entity_id: string;
345
- history: import("./db.uni.types").Json | null;
346
- id: string;
347
- school_id: string;
348
- };
349
- Insert: {
350
- entity_id: string;
351
- history?: import("./db.uni.types").Json | null;
352
- id?: string;
353
- school_id?: string;
354
- };
355
- Update: {
356
- entity_id?: string;
357
- history?: import("./db.uni.types").Json | null;
358
- id?: string;
359
- school_id?: string;
360
- };
361
- Relationships: [{
362
- foreignKeyName: "moa_histories_school_id_fkey";
363
- columns: ["school_id"];
364
- isOneToOne: false;
365
- referencedRelation: "schools";
366
- referencedColumns: ["id"];
367
- }];
368
- };
369
- private_entity_notes: {
370
- Row: {
371
- author_school_account_id: string;
372
- entity_id: string;
373
- id: string;
374
- message: string;
375
- timestamp: string;
376
- };
377
- Insert: {
378
- author_school_account_id: string;
379
- entity_id: string;
380
- id?: string;
381
- message: string;
382
- timestamp?: string;
383
- };
384
- Update: {
385
- author_school_account_id?: string;
386
- entity_id?: string;
387
- id?: string;
388
- message?: string;
389
- timestamp?: string;
390
- };
391
- Relationships: [{
392
- foreignKeyName: "private_entity_notes_author_school_account_id_fkey";
393
- columns: ["author_school_account_id"];
394
- isOneToOne: false;
395
- referencedRelation: "school_accounts";
396
- referencedColumns: ["id"];
397
- }];
398
- };
399
- school_accounts: {
400
- Row: {
401
- created_at: string;
402
- email: string;
403
- id: string;
404
- name: string;
405
- password: string | null;
406
- receive_moa_requests: boolean;
407
- receive_new_entity_requests: boolean;
408
- role: string;
409
- school_id: string;
410
- };
411
- Insert: {
412
- created_at?: string;
413
- email?: string;
414
- id?: string;
415
- name: string;
416
- password?: string | null;
417
- receive_moa_requests?: boolean;
418
- receive_new_entity_requests?: boolean;
419
- role?: string;
420
- school_id: string;
421
- };
422
- Update: {
423
- created_at?: string;
424
- email?: string;
425
- id?: string;
426
- name?: string;
427
- password?: string | null;
428
- receive_moa_requests?: boolean;
429
- receive_new_entity_requests?: boolean;
430
- role?: string;
431
- school_id?: string;
432
- };
433
- Relationships: [{
434
- foreignKeyName: "school_accounts_school_id_fkey";
435
- columns: ["school_id"];
436
- isOneToOne: false;
437
- referencedRelation: "schools";
438
- referencedColumns: ["id"];
439
- }];
440
- };
441
- school_entities: {
442
- Row: {
443
- entity_id: string;
444
- id: string;
445
- school_id: string;
446
- status: string;
447
- };
448
- Insert: {
449
- entity_id: string;
450
- id?: string;
451
- school_id: string;
452
- status: string;
453
- };
454
- Update: {
455
- entity_id?: string;
456
- id?: string;
457
- school_id?: string;
458
- status?: string;
459
- };
460
- Relationships: [{
461
- foreignKeyName: "school_entities_school_id_fkey";
462
- columns: ["school_id"];
463
- isOneToOne: false;
464
- referencedRelation: "schools";
465
- referencedColumns: ["id"];
466
- }];
467
- };
468
- school_logs: {
469
- Row: {
470
- entity_id: string | null;
471
- id: number;
472
- school_account_id: string;
473
- timestamp: string;
474
- update_type: string;
475
- };
476
- Insert: {
477
- entity_id?: string | null;
478
- id?: number;
479
- school_account_id: string;
480
- timestamp?: string;
481
- update_type: string;
482
- };
483
- Update: {
484
- entity_id?: string | null;
485
- id?: number;
486
- school_account_id?: string;
487
- timestamp?: string;
488
- update_type?: string;
489
- };
490
- Relationships: [{
491
- foreignKeyName: "school_logs_school_account_id_fkey";
492
- columns: ["school_account_id"];
493
- isOneToOne: false;
494
- referencedRelation: "school_accounts";
495
- referencedColumns: ["id"];
496
- }];
497
- };
498
- school_sessions: {
499
- Row: {
500
- id: string;
501
- school_id: string;
502
- timestamp: string;
503
- };
504
- Insert: {
505
- id?: string;
506
- school_id: string;
507
- timestamp?: string;
508
- };
509
- Update: {
510
- id?: string;
511
- school_id?: string;
512
- timestamp?: string;
513
- };
514
- Relationships: [{
515
- foreignKeyName: "school_sessions_school_id_fkey";
516
- columns: ["school_id"];
517
- isOneToOne: false;
518
- referencedRelation: "schools";
519
- referencedColumns: ["id"];
520
- }];
521
- };
522
- schools: {
523
- Row: {
524
- created_at: string;
525
- domain: string;
526
- full_name: string;
527
- id: string;
528
- short_name: string;
529
- };
530
- Insert: {
531
- created_at?: string;
532
- domain: string;
533
- full_name: string;
534
- id?: string;
535
- short_name: string;
536
- };
537
- Update: {
538
- created_at?: string;
539
- domain?: string;
540
- full_name?: string;
541
- id?: string;
542
- short_name?: string;
543
- };
544
- Relationships: [];
545
- };
546
- };
547
- Views: { [_ in never]: never; };
548
- Functions: { [_ in never]: never; };
549
- Enums: { [_ in never]: never; };
550
- CompositeTypes: { [_ in never]: never; };
551
- }>;
552
- export declare const documentDb: import("@supabase/supabase-js").SupabaseClient<_DocumentDatabase, "public", {
553
- Tables: {
554
- base_documents: {
555
- Row: {
556
- id: string;
557
- name: string;
558
- url: string;
559
- };
560
- Insert: {
561
- id?: string;
562
- name: string;
563
- url: string;
564
- };
565
- Update: {
566
- id?: string;
567
- name?: string;
568
- url?: string;
569
- };
570
- Relationships: [];
571
- };
572
- base_images: {
573
- Row: {
574
- filename: string;
575
- id: string;
576
- source_text: string;
577
- url: string;
578
- };
579
- Insert: {
580
- filename: string;
581
- id?: string;
582
- source_text: string;
583
- url: string;
584
- };
585
- Update: {
586
- filename?: string;
587
- id?: string;
588
- source_text?: string;
589
- url?: string;
590
- };
591
- Relationships: [];
592
- };
593
- external_documents: {
594
- Row: {
595
- effective_date: string | null;
596
- expiry_date: string | null;
597
- id: string;
598
- uploaded_at: string;
599
- url: string;
600
- };
601
- Insert: {
602
- effective_date?: string | null;
603
- expiry_date?: string | null;
604
- id?: string;
605
- uploaded_at?: string;
606
- url: string;
607
- };
608
- Update: {
609
- effective_date?: string | null;
610
- expiry_date?: string | null;
611
- id?: string;
612
- uploaded_at?: string;
613
- url?: string;
614
- };
615
- Relationships: [];
616
- };
617
- field_repository: {
618
- Row: {
619
- helper: string | null;
620
- id: string;
621
- label: string | null;
622
- name: string;
623
- options: import("./db.doc.types").Json | null;
624
- section: _DocumentDatabase["public"]["Enums"]["section"] | null;
625
- transformers: string[];
626
- type: _DocumentDatabase["public"]["Enums"]["input_type"] | null;
627
- validators: string[] | null;
628
- };
629
- Insert: {
630
- helper?: string | null;
631
- id?: string;
632
- label?: string | null;
633
- name: string;
634
- options?: import("./db.doc.types").Json | null;
635
- section?: _DocumentDatabase["public"]["Enums"]["section"] | null;
636
- transformers?: string[];
637
- type?: _DocumentDatabase["public"]["Enums"]["input_type"] | null;
638
- validators?: string[] | null;
639
- };
640
- Update: {
641
- helper?: string | null;
642
- id?: string;
643
- label?: string | null;
644
- name?: string;
645
- options?: import("./db.doc.types").Json | null;
646
- section?: _DocumentDatabase["public"]["Enums"]["section"] | null;
647
- transformers?: string[];
648
- type?: _DocumentDatabase["public"]["Enums"]["input_type"] | null;
649
- validators?: string[] | null;
650
- };
651
- Relationships: [];
652
- };
653
- field_transformers: {
654
- Row: {
655
- id: string;
656
- name: string;
657
- rule: string;
658
- };
659
- Insert: {
660
- id?: string;
661
- name: string;
662
- rule: string;
663
- };
664
- Update: {
665
- id?: string;
666
- name?: string;
667
- rule?: string;
668
- };
669
- Relationships: [];
670
- };
671
- field_validators: {
672
- Row: {
673
- id: string;
674
- name: string;
675
- rule: string;
676
- };
677
- Insert: {
678
- id?: string;
679
- name: string;
680
- rule: string;
681
- };
682
- Update: {
683
- id?: string;
684
- name?: string;
685
- rule?: string;
686
- };
687
- Relationships: [];
688
- };
689
- form_groups: {
690
- Row: {
691
- description: string;
692
- forms: string[];
693
- id: string;
694
- };
695
- Insert: {
696
- description: string;
697
- forms?: string[];
698
- id?: string;
699
- };
700
- Update: {
701
- description?: string;
702
- forms?: string[];
703
- id?: string;
704
- };
705
- Relationships: [];
706
- };
707
- form_schemas: {
708
- Row: {
709
- base_document_id: string | null;
710
- fields: import("./db.doc.types").Json;
711
- fields_filled_by_user: string[] | null;
712
- id: string;
713
- initiators: string[] | null;
714
- label: string | null;
715
- name: string;
716
- params: import("./db.doc.types").Json;
717
- required_parties: string[];
718
- schema: import("./db.doc.types").Json;
719
- subscribers: string[];
720
- };
721
- Insert: {
722
- base_document_id?: string | null;
723
- fields?: import("./db.doc.types").Json;
724
- fields_filled_by_user?: string[] | null;
725
- id?: string;
726
- initiators?: string[] | null;
727
- label?: string | null;
728
- name: string;
729
- params?: import("./db.doc.types").Json;
730
- required_parties?: string[];
731
- schema?: import("./db.doc.types").Json;
732
- subscribers?: string[];
733
- };
734
- Update: {
735
- base_document_id?: string | null;
736
- fields?: import("./db.doc.types").Json;
737
- fields_filled_by_user?: string[] | null;
738
- id?: string;
739
- initiators?: string[] | null;
740
- label?: string | null;
741
- name?: string;
742
- params?: import("./db.doc.types").Json;
743
- required_parties?: string[];
744
- schema?: import("./db.doc.types").Json;
745
- subscribers?: string[];
746
- };
747
- Relationships: [{
748
- foreignKeyName: "form_schemas_base_document_id_fkey";
749
- columns: ["base_document_id"];
750
- isOneToOne: false;
751
- referencedRelation: "base_documents";
752
- referencedColumns: ["id"];
753
- }];
754
- };
755
- pending_documents: {
756
- Row: {
757
- form_name: string | null;
758
- id: string;
759
- inputs: import("./db.doc.types").Json;
760
- latest_document_url: string | null;
761
- pending_parties: import("./db.doc.types").Json;
762
- signatories: import("./db.doc.types").Json;
763
- };
764
- Insert: {
765
- form_name?: string | null;
766
- id?: string;
767
- inputs?: import("./db.doc.types").Json;
768
- latest_document_url?: string | null;
769
- pending_parties?: import("./db.doc.types").Json;
770
- signatories?: import("./db.doc.types").Json;
771
- };
772
- Update: {
773
- form_name?: string | null;
774
- id?: string;
775
- inputs?: import("./db.doc.types").Json;
776
- latest_document_url?: string | null;
777
- pending_parties?: import("./db.doc.types").Json;
778
- signatories?: import("./db.doc.types").Json;
779
- };
780
- Relationships: [];
781
- };
782
- prefilled_documents: {
783
- Row: {
784
- base_document_id: string;
785
- id: string;
786
- url: string;
787
- };
788
- Insert: {
789
- base_document_id: string;
790
- id?: string;
791
- url: string;
792
- };
793
- Update: {
794
- base_document_id?: string;
795
- id?: string;
796
- url?: string;
797
- };
798
- Relationships: [{
799
- foreignKeyName: "prefilled_documents_base_document_id_fkey";
800
- columns: ["base_document_id"];
801
- isOneToOne: false;
802
- referencedRelation: "base_documents";
803
- referencedColumns: ["id"];
804
- }];
805
- };
806
- signed_documents: {
807
- Row: {
808
- base_document_id: string | null;
809
- effective_date: string;
810
- expiry_date: string;
811
- id: string;
812
- inputs: import("./db.doc.types").Json | null;
813
- inputs_hash: string | null;
814
- notarized_url: string | null;
815
- schema: import("./db.doc.types").Json | null;
816
- schema_hash: string | null;
817
- signatories: import("./db.doc.types").Json;
818
- url: string;
819
- verification_code: string | null;
820
- };
821
- Insert: {
822
- base_document_id?: string | null;
823
- effective_date: string;
824
- expiry_date: string;
825
- id?: string;
826
- inputs?: import("./db.doc.types").Json | null;
827
- inputs_hash?: string | null;
828
- notarized_url?: string | null;
829
- schema?: import("./db.doc.types").Json | null;
830
- schema_hash?: string | null;
831
- signatories: import("./db.doc.types").Json;
832
- url: string;
833
- verification_code?: string | null;
834
- };
835
- Update: {
836
- base_document_id?: string | null;
837
- effective_date?: string;
838
- expiry_date?: string;
839
- id?: string;
840
- inputs?: import("./db.doc.types").Json | null;
841
- inputs_hash?: string | null;
842
- notarized_url?: string | null;
843
- schema?: import("./db.doc.types").Json | null;
844
- schema_hash?: string | null;
845
- signatories?: import("./db.doc.types").Json;
846
- url?: string;
847
- verification_code?: string | null;
848
- };
849
- Relationships: [{
850
- foreignKeyName: "signed_documents_base_document_id_fkey";
851
- columns: ["base_document_id"];
852
- isOneToOne: false;
853
- referencedRelation: "base_documents";
854
- referencedColumns: ["id"];
855
- }];
856
- };
857
- };
858
- Views: { [_ in never]: never; };
859
- Functions: { [_ in never]: never; };
860
- Enums: {
861
- input_type: "text" | "number" | "date" | "select" | "time" | "signature" | "reference";
862
- section: "student" | "entity" | "university" | "student-guardian" | "internship";
863
- };
864
- CompositeTypes: { [_ in never]: never; };
865
- }>;
866
- export declare const handleDBError: (error: PostgrestError, description?: string) => never;
1
+ import { PostgrestError } from "@supabase/supabase-js";
2
+ import { Database as _EntityDatabase, Tables as _EntityTables } from "./db.ent.types";
3
+ import { Database as _SchoolDatabase, Tables as _SchoolTables } from "./db.uni.types";
4
+ import { Database as _DocumentDatabase, Tables as _DocumentTables } from "./db.doc.types";
5
+ export type DocumentDatabase = _DocumentDatabase;
6
+ export type EntityDatabase = _EntityDatabase;
7
+ export type SchoolDatabase = _SchoolDatabase;
8
+ export type DocumentTables<T extends "base_documents" | "base_images" | "signed_documents" | "field_validators" | "field_repository" | "form_schemas" | "pending_documents" | "field_transformers" | "form_groups" | "prefilled_documents" | {
9
+ schema: "public";
10
+ }> = _DocumentTables<T>;
11
+ export type EntityTables<T extends "entities" | "entity_logs" | "messages" | "threads" | "moa_requests" | "new_entity_requests" | "student_internship_forms" | {
12
+ schema: "public";
13
+ }> = _EntityTables<T>;
14
+ export type SchoolTables<T extends "moa_histories" | "schools" | "private_entity_notes" | "school_accounts" | "school_entities" | "school_logs" | {
15
+ schema: "public";
16
+ }> = _SchoolTables<T>;
17
+ export declare const entityDb: import("@supabase/supabase-js").SupabaseClient<_EntityDatabase, "public", {
18
+ Tables: {
19
+ entities: {
20
+ Row: {
21
+ address: string | null;
22
+ contact_email: string | null;
23
+ contact_name: string | null;
24
+ contact_phone: string | null;
25
+ created_at: string;
26
+ display_name: string | null;
27
+ documents: import("./db.ent.types").Json | null;
28
+ id: string;
29
+ industry: string | null;
30
+ is_deactivated: boolean;
31
+ legal_identifier: string;
32
+ password: string;
33
+ type: string;
34
+ };
35
+ Insert: {
36
+ address?: string | null;
37
+ contact_email?: string | null;
38
+ contact_name?: string | null;
39
+ contact_phone?: string | null;
40
+ created_at?: string;
41
+ display_name?: string | null;
42
+ documents?: import("./db.ent.types").Json | null;
43
+ id?: string;
44
+ industry?: string | null;
45
+ is_deactivated?: boolean;
46
+ legal_identifier: string;
47
+ password?: string;
48
+ type: string;
49
+ };
50
+ Update: {
51
+ address?: string | null;
52
+ contact_email?: string | null;
53
+ contact_name?: string | null;
54
+ contact_phone?: string | null;
55
+ created_at?: string;
56
+ display_name?: string | null;
57
+ documents?: import("./db.ent.types").Json | null;
58
+ id?: string;
59
+ industry?: string | null;
60
+ is_deactivated?: boolean;
61
+ legal_identifier?: string;
62
+ password?: string;
63
+ type?: string;
64
+ };
65
+ Relationships: [{
66
+ foreignKeyName: "entities_industry_fkey";
67
+ columns: ["industry"];
68
+ isOneToOne: false;
69
+ referencedRelation: "ref_industries";
70
+ referencedColumns: ["id"];
71
+ }];
72
+ };
73
+ entity_logs: {
74
+ Row: {
75
+ entity_id: string;
76
+ file: string;
77
+ id: string;
78
+ source_type: string;
79
+ target: string | null;
80
+ timestamp: string;
81
+ update_type: string;
82
+ };
83
+ Insert: {
84
+ entity_id: string;
85
+ file: string;
86
+ id?: string;
87
+ source_type: string;
88
+ target?: string | null;
89
+ timestamp?: string;
90
+ update_type: string;
91
+ };
92
+ Update: {
93
+ entity_id?: string;
94
+ file?: string;
95
+ id?: string;
96
+ source_type?: string;
97
+ target?: string | null;
98
+ timestamp?: string;
99
+ update_type?: string;
100
+ };
101
+ Relationships: [{
102
+ foreignKeyName: "entity_logs_entity_id_fkey";
103
+ columns: ["entity_id"];
104
+ isOneToOne: false;
105
+ referencedRelation: "entities";
106
+ referencedColumns: ["id"];
107
+ }];
108
+ };
109
+ entity_sessions: {
110
+ Row: {
111
+ entity_id: string;
112
+ id: number;
113
+ timestamp: string;
114
+ };
115
+ Insert: {
116
+ entity_id: string;
117
+ id?: number;
118
+ timestamp?: string;
119
+ };
120
+ Update: {
121
+ entity_id?: string;
122
+ id?: number;
123
+ timestamp?: string;
124
+ };
125
+ Relationships: [{
126
+ foreignKeyName: "entity_sessions_entity_id_fkey";
127
+ columns: ["entity_id"];
128
+ isOneToOne: false;
129
+ referencedRelation: "entities";
130
+ referencedColumns: ["id"];
131
+ }];
132
+ };
133
+ messages: {
134
+ Row: {
135
+ action: string;
136
+ attachments: import("./db.ent.types").Json | null;
137
+ id: string;
138
+ moa_document: string | null;
139
+ source_id: string;
140
+ source_type: string;
141
+ target_id: string;
142
+ text: string | null;
143
+ thread_id: string;
144
+ timestamp: string;
145
+ };
146
+ Insert: {
147
+ action: string;
148
+ attachments?: import("./db.ent.types").Json | null;
149
+ id?: string;
150
+ moa_document?: string | null;
151
+ source_id: string;
152
+ source_type: string;
153
+ target_id: string;
154
+ text?: string | null;
155
+ thread_id: string;
156
+ timestamp?: string;
157
+ };
158
+ Update: {
159
+ action?: string;
160
+ attachments?: import("./db.ent.types").Json | null;
161
+ id?: string;
162
+ moa_document?: string | null;
163
+ source_id?: string;
164
+ source_type?: string;
165
+ target_id?: string;
166
+ text?: string | null;
167
+ thread_id?: string;
168
+ timestamp?: string;
169
+ };
170
+ Relationships: [{
171
+ foreignKeyName: "messages_thread_id_fkey";
172
+ columns: ["thread_id"];
173
+ isOneToOne: false;
174
+ referencedRelation: "threads";
175
+ referencedColumns: ["id"];
176
+ }];
177
+ };
178
+ moa_requests: {
179
+ Row: {
180
+ entity_id: string;
181
+ id: string;
182
+ notified_school_account_id: string | null;
183
+ outcome: string | null;
184
+ processed_by_account_id: string | null;
185
+ processed_date: string | null;
186
+ school_id: string;
187
+ signed_document_id: string | null;
188
+ thread_id: string | null;
189
+ timestamp: string;
190
+ };
191
+ Insert: {
192
+ entity_id: string;
193
+ id?: string;
194
+ notified_school_account_id?: string | null;
195
+ outcome?: string | null;
196
+ processed_by_account_id?: string | null;
197
+ processed_date?: string | null;
198
+ school_id: string;
199
+ signed_document_id?: string | null;
200
+ thread_id?: string | null;
201
+ timestamp?: string;
202
+ };
203
+ Update: {
204
+ entity_id?: string;
205
+ id?: string;
206
+ notified_school_account_id?: string | null;
207
+ outcome?: string | null;
208
+ processed_by_account_id?: string | null;
209
+ processed_date?: string | null;
210
+ school_id?: string;
211
+ signed_document_id?: string | null;
212
+ thread_id?: string | null;
213
+ timestamp?: string;
214
+ };
215
+ Relationships: [{
216
+ foreignKeyName: "moa_requests_entity_id_fkey";
217
+ columns: ["entity_id"];
218
+ isOneToOne: false;
219
+ referencedRelation: "entities";
220
+ referencedColumns: ["id"];
221
+ }, {
222
+ foreignKeyName: "moa_requests_thread_id_fkey";
223
+ columns: ["thread_id"];
224
+ isOneToOne: false;
225
+ referencedRelation: "threads";
226
+ referencedColumns: ["id"];
227
+ }];
228
+ };
229
+ new_entity_requests: {
230
+ Row: {
231
+ entity_id: string;
232
+ id: string;
233
+ outcome: string | null;
234
+ processed_by_account_id: string | null;
235
+ processed_date: string | null;
236
+ school_id: string;
237
+ thread_id: string;
238
+ timestamp: string;
239
+ };
240
+ Insert: {
241
+ entity_id: string;
242
+ id?: string;
243
+ outcome?: string | null;
244
+ processed_by_account_id?: string | null;
245
+ processed_date?: string | null;
246
+ school_id: string;
247
+ thread_id: string;
248
+ timestamp?: string;
249
+ };
250
+ Update: {
251
+ entity_id?: string;
252
+ id?: string;
253
+ outcome?: string | null;
254
+ processed_by_account_id?: string | null;
255
+ processed_date?: string | null;
256
+ school_id?: string;
257
+ thread_id?: string;
258
+ timestamp?: string;
259
+ };
260
+ Relationships: [{
261
+ foreignKeyName: "new_entity_requests_entity_id_fkey";
262
+ columns: ["entity_id"];
263
+ isOneToOne: false;
264
+ referencedRelation: "entities";
265
+ referencedColumns: ["id"];
266
+ }, {
267
+ foreignKeyName: "new_entity_requests_thread_id_fkey";
268
+ columns: ["thread_id"];
269
+ isOneToOne: false;
270
+ referencedRelation: "threads";
271
+ referencedColumns: ["id"];
272
+ }];
273
+ };
274
+ ref_industries: {
275
+ Row: {
276
+ id: string;
277
+ name: string;
278
+ };
279
+ Insert: {
280
+ id?: string;
281
+ name: string;
282
+ };
283
+ Update: {
284
+ id?: string;
285
+ name?: string;
286
+ };
287
+ Relationships: [];
288
+ };
289
+ student_internship_forms: {
290
+ Row: {
291
+ entity_id: string | null;
292
+ form_name: string | null;
293
+ id: string;
294
+ pending_document_id: string | null;
295
+ signed_document_id: string | null;
296
+ timestamp: string;
297
+ university_id: string | null;
298
+ user_id: string | null;
299
+ };
300
+ Insert: {
301
+ entity_id?: string | null;
302
+ form_name?: string | null;
303
+ id?: string;
304
+ pending_document_id?: string | null;
305
+ signed_document_id?: string | null;
306
+ timestamp?: string;
307
+ university_id?: string | null;
308
+ user_id?: string | null;
309
+ };
310
+ Update: {
311
+ entity_id?: string | null;
312
+ form_name?: string | null;
313
+ id?: string;
314
+ pending_document_id?: string | null;
315
+ signed_document_id?: string | null;
316
+ timestamp?: string;
317
+ university_id?: string | null;
318
+ user_id?: string | null;
319
+ };
320
+ Relationships: [];
321
+ };
322
+ threads: {
323
+ Row: {
324
+ id: string;
325
+ };
326
+ Insert: {
327
+ id?: string;
328
+ };
329
+ Update: {
330
+ id?: string;
331
+ };
332
+ Relationships: [];
333
+ };
334
+ };
335
+ Views: { [_ in never]: never; };
336
+ Functions: { [_ in never]: never; };
337
+ Enums: { [_ in never]: never; };
338
+ CompositeTypes: { [_ in never]: never; };
339
+ }>;
340
+ export declare const schoolDb: import("@supabase/supabase-js").SupabaseClient<_SchoolDatabase, "public", {
341
+ Tables: {
342
+ moa_histories: {
343
+ Row: {
344
+ entity_id: string;
345
+ history: import("./db.uni.types").Json | null;
346
+ id: string;
347
+ school_id: string;
348
+ };
349
+ Insert: {
350
+ entity_id: string;
351
+ history?: import("./db.uni.types").Json | null;
352
+ id?: string;
353
+ school_id?: string;
354
+ };
355
+ Update: {
356
+ entity_id?: string;
357
+ history?: import("./db.uni.types").Json | null;
358
+ id?: string;
359
+ school_id?: string;
360
+ };
361
+ Relationships: [{
362
+ foreignKeyName: "moa_histories_school_id_fkey";
363
+ columns: ["school_id"];
364
+ isOneToOne: false;
365
+ referencedRelation: "schools";
366
+ referencedColumns: ["id"];
367
+ }];
368
+ };
369
+ private_entity_notes: {
370
+ Row: {
371
+ author_school_account_id: string;
372
+ entity_id: string;
373
+ id: string;
374
+ message: string;
375
+ timestamp: string;
376
+ };
377
+ Insert: {
378
+ author_school_account_id: string;
379
+ entity_id: string;
380
+ id?: string;
381
+ message: string;
382
+ timestamp?: string;
383
+ };
384
+ Update: {
385
+ author_school_account_id?: string;
386
+ entity_id?: string;
387
+ id?: string;
388
+ message?: string;
389
+ timestamp?: string;
390
+ };
391
+ Relationships: [{
392
+ foreignKeyName: "private_entity_notes_author_school_account_id_fkey";
393
+ columns: ["author_school_account_id"];
394
+ isOneToOne: false;
395
+ referencedRelation: "school_accounts";
396
+ referencedColumns: ["id"];
397
+ }];
398
+ };
399
+ school_accounts: {
400
+ Row: {
401
+ created_at: string;
402
+ email: string;
403
+ id: string;
404
+ name: string;
405
+ password: string | null;
406
+ receive_moa_requests: boolean;
407
+ receive_new_entity_requests: boolean;
408
+ role: string;
409
+ school_id: string;
410
+ };
411
+ Insert: {
412
+ created_at?: string;
413
+ email?: string;
414
+ id?: string;
415
+ name: string;
416
+ password?: string | null;
417
+ receive_moa_requests?: boolean;
418
+ receive_new_entity_requests?: boolean;
419
+ role?: string;
420
+ school_id: string;
421
+ };
422
+ Update: {
423
+ created_at?: string;
424
+ email?: string;
425
+ id?: string;
426
+ name?: string;
427
+ password?: string | null;
428
+ receive_moa_requests?: boolean;
429
+ receive_new_entity_requests?: boolean;
430
+ role?: string;
431
+ school_id?: string;
432
+ };
433
+ Relationships: [{
434
+ foreignKeyName: "school_accounts_school_id_fkey";
435
+ columns: ["school_id"];
436
+ isOneToOne: false;
437
+ referencedRelation: "schools";
438
+ referencedColumns: ["id"];
439
+ }];
440
+ };
441
+ school_entities: {
442
+ Row: {
443
+ entity_id: string;
444
+ id: string;
445
+ school_id: string;
446
+ status: string;
447
+ };
448
+ Insert: {
449
+ entity_id: string;
450
+ id?: string;
451
+ school_id: string;
452
+ status: string;
453
+ };
454
+ Update: {
455
+ entity_id?: string;
456
+ id?: string;
457
+ school_id?: string;
458
+ status?: string;
459
+ };
460
+ Relationships: [{
461
+ foreignKeyName: "school_entities_school_id_fkey";
462
+ columns: ["school_id"];
463
+ isOneToOne: false;
464
+ referencedRelation: "schools";
465
+ referencedColumns: ["id"];
466
+ }];
467
+ };
468
+ school_logs: {
469
+ Row: {
470
+ entity_id: string | null;
471
+ id: number;
472
+ school_account_id: string;
473
+ timestamp: string;
474
+ update_type: string;
475
+ };
476
+ Insert: {
477
+ entity_id?: string | null;
478
+ id?: number;
479
+ school_account_id: string;
480
+ timestamp?: string;
481
+ update_type: string;
482
+ };
483
+ Update: {
484
+ entity_id?: string | null;
485
+ id?: number;
486
+ school_account_id?: string;
487
+ timestamp?: string;
488
+ update_type?: string;
489
+ };
490
+ Relationships: [{
491
+ foreignKeyName: "school_logs_school_account_id_fkey";
492
+ columns: ["school_account_id"];
493
+ isOneToOne: false;
494
+ referencedRelation: "school_accounts";
495
+ referencedColumns: ["id"];
496
+ }];
497
+ };
498
+ school_sessions: {
499
+ Row: {
500
+ id: string;
501
+ school_id: string;
502
+ timestamp: string;
503
+ };
504
+ Insert: {
505
+ id?: string;
506
+ school_id: string;
507
+ timestamp?: string;
508
+ };
509
+ Update: {
510
+ id?: string;
511
+ school_id?: string;
512
+ timestamp?: string;
513
+ };
514
+ Relationships: [{
515
+ foreignKeyName: "school_sessions_school_id_fkey";
516
+ columns: ["school_id"];
517
+ isOneToOne: false;
518
+ referencedRelation: "schools";
519
+ referencedColumns: ["id"];
520
+ }];
521
+ };
522
+ schools: {
523
+ Row: {
524
+ created_at: string;
525
+ domain: string;
526
+ full_name: string;
527
+ id: string;
528
+ short_name: string;
529
+ };
530
+ Insert: {
531
+ created_at?: string;
532
+ domain: string;
533
+ full_name: string;
534
+ id?: string;
535
+ short_name: string;
536
+ };
537
+ Update: {
538
+ created_at?: string;
539
+ domain?: string;
540
+ full_name?: string;
541
+ id?: string;
542
+ short_name?: string;
543
+ };
544
+ Relationships: [];
545
+ };
546
+ };
547
+ Views: { [_ in never]: never; };
548
+ Functions: { [_ in never]: never; };
549
+ Enums: { [_ in never]: never; };
550
+ CompositeTypes: { [_ in never]: never; };
551
+ }>;
552
+ export declare const documentDb: import("@supabase/supabase-js").SupabaseClient<_DocumentDatabase, "public", {
553
+ Tables: {
554
+ base_documents: {
555
+ Row: {
556
+ id: string;
557
+ name: string;
558
+ url: string;
559
+ };
560
+ Insert: {
561
+ id?: string;
562
+ name: string;
563
+ url: string;
564
+ };
565
+ Update: {
566
+ id?: string;
567
+ name?: string;
568
+ url?: string;
569
+ };
570
+ Relationships: [];
571
+ };
572
+ base_images: {
573
+ Row: {
574
+ filename: string;
575
+ id: string;
576
+ source_text: string;
577
+ url: string;
578
+ };
579
+ Insert: {
580
+ filename: string;
581
+ id?: string;
582
+ source_text: string;
583
+ url: string;
584
+ };
585
+ Update: {
586
+ filename?: string;
587
+ id?: string;
588
+ source_text?: string;
589
+ url?: string;
590
+ };
591
+ Relationships: [];
592
+ };
593
+ external_documents: {
594
+ Row: {
595
+ effective_date: string | null;
596
+ expiry_date: string | null;
597
+ id: string;
598
+ uploaded_at: string;
599
+ url: string;
600
+ };
601
+ Insert: {
602
+ effective_date?: string | null;
603
+ expiry_date?: string | null;
604
+ id?: string;
605
+ uploaded_at?: string;
606
+ url: string;
607
+ };
608
+ Update: {
609
+ effective_date?: string | null;
610
+ expiry_date?: string | null;
611
+ id?: string;
612
+ uploaded_at?: string;
613
+ url?: string;
614
+ };
615
+ Relationships: [];
616
+ };
617
+ field_repository: {
618
+ Row: {
619
+ helper: string | null;
620
+ id: string;
621
+ label: string | null;
622
+ name: string;
623
+ options: import("./db.doc.types").Json | null;
624
+ section: _DocumentDatabase["public"]["Enums"]["section"] | null;
625
+ transformers: string[];
626
+ type: _DocumentDatabase["public"]["Enums"]["input_type"] | null;
627
+ validators: string[] | null;
628
+ };
629
+ Insert: {
630
+ helper?: string | null;
631
+ id?: string;
632
+ label?: string | null;
633
+ name: string;
634
+ options?: import("./db.doc.types").Json | null;
635
+ section?: _DocumentDatabase["public"]["Enums"]["section"] | null;
636
+ transformers?: string[];
637
+ type?: _DocumentDatabase["public"]["Enums"]["input_type"] | null;
638
+ validators?: string[] | null;
639
+ };
640
+ Update: {
641
+ helper?: string | null;
642
+ id?: string;
643
+ label?: string | null;
644
+ name?: string;
645
+ options?: import("./db.doc.types").Json | null;
646
+ section?: _DocumentDatabase["public"]["Enums"]["section"] | null;
647
+ transformers?: string[];
648
+ type?: _DocumentDatabase["public"]["Enums"]["input_type"] | null;
649
+ validators?: string[] | null;
650
+ };
651
+ Relationships: [];
652
+ };
653
+ field_transformers: {
654
+ Row: {
655
+ id: string;
656
+ name: string;
657
+ rule: string;
658
+ };
659
+ Insert: {
660
+ id?: string;
661
+ name: string;
662
+ rule: string;
663
+ };
664
+ Update: {
665
+ id?: string;
666
+ name?: string;
667
+ rule?: string;
668
+ };
669
+ Relationships: [];
670
+ };
671
+ field_validators: {
672
+ Row: {
673
+ id: string;
674
+ name: string;
675
+ rule: string;
676
+ };
677
+ Insert: {
678
+ id?: string;
679
+ name: string;
680
+ rule: string;
681
+ };
682
+ Update: {
683
+ id?: string;
684
+ name?: string;
685
+ rule?: string;
686
+ };
687
+ Relationships: [];
688
+ };
689
+ form_groups: {
690
+ Row: {
691
+ description: string;
692
+ forms: string[];
693
+ id: string;
694
+ };
695
+ Insert: {
696
+ description: string;
697
+ forms?: string[];
698
+ id?: string;
699
+ };
700
+ Update: {
701
+ description?: string;
702
+ forms?: string[];
703
+ id?: string;
704
+ };
705
+ Relationships: [];
706
+ };
707
+ form_schemas: {
708
+ Row: {
709
+ base_document_id: string | null;
710
+ fields: import("./db.doc.types").Json;
711
+ fields_filled_by_user: string[] | null;
712
+ id: string;
713
+ initiators: string[] | null;
714
+ label: string | null;
715
+ name: string;
716
+ params: import("./db.doc.types").Json;
717
+ required_parties: string[];
718
+ schema: import("./db.doc.types").Json;
719
+ subscribers: string[];
720
+ };
721
+ Insert: {
722
+ base_document_id?: string | null;
723
+ fields?: import("./db.doc.types").Json;
724
+ fields_filled_by_user?: string[] | null;
725
+ id?: string;
726
+ initiators?: string[] | null;
727
+ label?: string | null;
728
+ name: string;
729
+ params?: import("./db.doc.types").Json;
730
+ required_parties?: string[];
731
+ schema?: import("./db.doc.types").Json;
732
+ subscribers?: string[];
733
+ };
734
+ Update: {
735
+ base_document_id?: string | null;
736
+ fields?: import("./db.doc.types").Json;
737
+ fields_filled_by_user?: string[] | null;
738
+ id?: string;
739
+ initiators?: string[] | null;
740
+ label?: string | null;
741
+ name?: string;
742
+ params?: import("./db.doc.types").Json;
743
+ required_parties?: string[];
744
+ schema?: import("./db.doc.types").Json;
745
+ subscribers?: string[];
746
+ };
747
+ Relationships: [{
748
+ foreignKeyName: "form_schemas_base_document_id_fkey";
749
+ columns: ["base_document_id"];
750
+ isOneToOne: false;
751
+ referencedRelation: "base_documents";
752
+ referencedColumns: ["id"];
753
+ }];
754
+ };
755
+ pending_documents: {
756
+ Row: {
757
+ form_name: string | null;
758
+ id: string;
759
+ inputs: import("./db.doc.types").Json;
760
+ latest_document_url: string | null;
761
+ pending_parties: import("./db.doc.types").Json;
762
+ signatories: import("./db.doc.types").Json;
763
+ };
764
+ Insert: {
765
+ form_name?: string | null;
766
+ id?: string;
767
+ inputs?: import("./db.doc.types").Json;
768
+ latest_document_url?: string | null;
769
+ pending_parties?: import("./db.doc.types").Json;
770
+ signatories?: import("./db.doc.types").Json;
771
+ };
772
+ Update: {
773
+ form_name?: string | null;
774
+ id?: string;
775
+ inputs?: import("./db.doc.types").Json;
776
+ latest_document_url?: string | null;
777
+ pending_parties?: import("./db.doc.types").Json;
778
+ signatories?: import("./db.doc.types").Json;
779
+ };
780
+ Relationships: [];
781
+ };
782
+ prefilled_documents: {
783
+ Row: {
784
+ base_document_id: string;
785
+ id: string;
786
+ url: string;
787
+ };
788
+ Insert: {
789
+ base_document_id: string;
790
+ id?: string;
791
+ url: string;
792
+ };
793
+ Update: {
794
+ base_document_id?: string;
795
+ id?: string;
796
+ url?: string;
797
+ };
798
+ Relationships: [{
799
+ foreignKeyName: "prefilled_documents_base_document_id_fkey";
800
+ columns: ["base_document_id"];
801
+ isOneToOne: false;
802
+ referencedRelation: "base_documents";
803
+ referencedColumns: ["id"];
804
+ }];
805
+ };
806
+ signed_documents: {
807
+ Row: {
808
+ base_document_id: string | null;
809
+ effective_date: string;
810
+ expiry_date: string;
811
+ id: string;
812
+ inputs: import("./db.doc.types").Json | null;
813
+ inputs_hash: string | null;
814
+ notarized_url: string | null;
815
+ schema: import("./db.doc.types").Json | null;
816
+ schema_hash: string | null;
817
+ signatories: import("./db.doc.types").Json;
818
+ url: string;
819
+ verification_code: string | null;
820
+ };
821
+ Insert: {
822
+ base_document_id?: string | null;
823
+ effective_date: string;
824
+ expiry_date: string;
825
+ id?: string;
826
+ inputs?: import("./db.doc.types").Json | null;
827
+ inputs_hash?: string | null;
828
+ notarized_url?: string | null;
829
+ schema?: import("./db.doc.types").Json | null;
830
+ schema_hash?: string | null;
831
+ signatories: import("./db.doc.types").Json;
832
+ url: string;
833
+ verification_code?: string | null;
834
+ };
835
+ Update: {
836
+ base_document_id?: string | null;
837
+ effective_date?: string;
838
+ expiry_date?: string;
839
+ id?: string;
840
+ inputs?: import("./db.doc.types").Json | null;
841
+ inputs_hash?: string | null;
842
+ notarized_url?: string | null;
843
+ schema?: import("./db.doc.types").Json | null;
844
+ schema_hash?: string | null;
845
+ signatories?: import("./db.doc.types").Json;
846
+ url?: string;
847
+ verification_code?: string | null;
848
+ };
849
+ Relationships: [{
850
+ foreignKeyName: "signed_documents_base_document_id_fkey";
851
+ columns: ["base_document_id"];
852
+ isOneToOne: false;
853
+ referencedRelation: "base_documents";
854
+ referencedColumns: ["id"];
855
+ }];
856
+ };
857
+ };
858
+ Views: { [_ in never]: never; };
859
+ Functions: { [_ in never]: never; };
860
+ Enums: {
861
+ input_type: "text" | "number" | "date" | "select" | "time" | "signature" | "reference";
862
+ section: "student" | "entity" | "university" | "student-guardian" | "internship";
863
+ };
864
+ CompositeTypes: { [_ in never]: never; };
865
+ }>;
866
+ export declare const handleDBError: (error: PostgrestError, description?: string) => never;