@betterinternship/schema.moa 1.4.29 → 1.4.31

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,893 +1,884 @@
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" | "form_metadata_files" | {
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_metadata_files: {
708
- Row: {
709
- base_document_id: string;
710
- created_at: string;
711
- id: string;
712
- };
713
- Insert: {
714
- base_document_id: string;
715
- created_at?: string;
716
- id?: string;
717
- };
718
- Update: {
719
- base_document_id?: string;
720
- created_at?: string;
721
- id?: string;
722
- };
723
- Relationships: [];
724
- };
725
- form_schemas: {
726
- Row: {
727
- base_document_id: string | null;
728
- fields: import("./db.doc.types").Json;
729
- fields_filled_by_user: string[] | null;
730
- id: string;
731
- initiators: string[] | null;
732
- label: string | null;
733
- name: string;
734
- params: import("./db.doc.types").Json;
735
- required_parties: string[];
736
- schema: import("./db.doc.types").Json;
737
- subscribers: string[];
738
- };
739
- Insert: {
740
- base_document_id?: string | null;
741
- fields: import("./db.doc.types").Json;
742
- fields_filled_by_user?: string[] | null;
743
- id?: string;
744
- initiators?: string[] | null;
745
- label?: string | null;
746
- name: string;
747
- params?: import("./db.doc.types").Json;
748
- required_parties?: string[];
749
- schema?: import("./db.doc.types").Json;
750
- subscribers?: string[];
751
- };
752
- Update: {
753
- base_document_id?: string | null;
754
- fields?: import("./db.doc.types").Json;
755
- fields_filled_by_user?: string[] | null;
756
- id?: string;
757
- initiators?: string[] | null;
758
- label?: string | null;
759
- name?: string;
760
- params?: import("./db.doc.types").Json;
761
- required_parties?: string[];
762
- schema?: import("./db.doc.types").Json;
763
- subscribers?: string[];
764
- };
765
- Relationships: [{
766
- foreignKeyName: "form_schemas_base_document_id_fkey";
767
- columns: ["base_document_id"];
768
- isOneToOne: false;
769
- referencedRelation: "base_documents";
770
- referencedColumns: ["id"];
771
- }];
772
- };
773
- pending_documents: {
774
- Row: {
775
- date_made: string;
776
- form_name: string | null;
777
- id: string;
778
- inputs: import("./db.doc.types").Json;
779
- latest_document_url: string | null;
780
- pending_parties: import("./db.doc.types").Json;
781
- signatories: import("./db.doc.types").Json;
782
- subscribers: import("./db.doc.types").Json | null;
783
- };
784
- Insert: {
785
- date_made?: string;
786
- form_name?: string | null;
787
- id?: string;
788
- inputs?: import("./db.doc.types").Json;
789
- latest_document_url?: string | null;
790
- pending_parties?: import("./db.doc.types").Json;
791
- signatories?: import("./db.doc.types").Json;
792
- subscribers?: import("./db.doc.types").Json | null;
793
- };
794
- Update: {
795
- date_made?: string;
796
- form_name?: string | null;
797
- id?: string;
798
- inputs?: import("./db.doc.types").Json;
799
- latest_document_url?: string | null;
800
- pending_parties?: import("./db.doc.types").Json;
801
- signatories?: import("./db.doc.types").Json;
802
- subscribers?: import("./db.doc.types").Json | null;
803
- };
804
- Relationships: [];
805
- };
806
- prefilled_documents: {
807
- Row: {
808
- base_document_id: string;
809
- id: string;
810
- url: string;
811
- };
812
- Insert: {
813
- base_document_id: string;
814
- id?: string;
815
- url: string;
816
- };
817
- Update: {
818
- base_document_id?: string;
819
- id?: string;
820
- url?: string;
821
- };
822
- Relationships: [{
823
- foreignKeyName: "prefilled_documents_base_document_id_fkey";
824
- columns: ["base_document_id"];
825
- isOneToOne: false;
826
- referencedRelation: "base_documents";
827
- referencedColumns: ["id"];
828
- }];
829
- };
830
- signed_documents: {
831
- Row: {
832
- base_document_id: string | null;
833
- date_made: string;
834
- effective_date: string;
835
- expiry_date: string;
836
- id: string;
837
- inputs: import("./db.doc.types").Json | null;
838
- inputs_hash: string | null;
839
- notarized_url: string | null;
840
- schema: import("./db.doc.types").Json | null;
841
- schema_hash: string | null;
842
- signatories: import("./db.doc.types").Json;
843
- url: string;
844
- verification_code: string | null;
845
- };
846
- Insert: {
847
- base_document_id?: string | null;
848
- date_made?: string;
849
- effective_date: string;
850
- expiry_date: string;
851
- id?: string;
852
- inputs?: import("./db.doc.types").Json | null;
853
- inputs_hash?: string | null;
854
- notarized_url?: string | null;
855
- schema?: import("./db.doc.types").Json | null;
856
- schema_hash?: string | null;
857
- signatories: import("./db.doc.types").Json;
858
- url: string;
859
- verification_code?: string | null;
860
- };
861
- Update: {
862
- base_document_id?: string | null;
863
- date_made?: string;
864
- effective_date?: string;
865
- expiry_date?: string;
866
- id?: string;
867
- inputs?: import("./db.doc.types").Json | null;
868
- inputs_hash?: string | null;
869
- notarized_url?: string | null;
870
- schema?: import("./db.doc.types").Json | null;
871
- schema_hash?: string | null;
872
- signatories?: import("./db.doc.types").Json;
873
- url?: string;
874
- verification_code?: string | null;
875
- };
876
- Relationships: [{
877
- foreignKeyName: "signed_documents_base_document_id_fkey";
878
- columns: ["base_document_id"];
879
- isOneToOne: false;
880
- referencedRelation: "base_documents";
881
- referencedColumns: ["id"];
882
- }];
883
- };
884
- };
885
- Views: { [_ in never]: never; };
886
- Functions: { [_ in never]: never; };
887
- Enums: {
888
- input_type: "text" | "number" | "date" | "select" | "time" | "signature" | "reference" | "checkbox";
889
- section: "student" | "entity" | "university" | "student-guardian" | "internship";
890
- };
891
- CompositeTypes: { [_ in never]: never; };
892
- }>;
893
- 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
+ created_at: string;
557
+ document_metadata_id: string;
558
+ id: string;
559
+ name: string;
560
+ url: string;
561
+ };
562
+ Insert: {
563
+ created_at?: string;
564
+ document_metadata_id?: string;
565
+ id?: string;
566
+ name: string;
567
+ url: string;
568
+ };
569
+ Update: {
570
+ created_at?: string;
571
+ document_metadata_id?: string;
572
+ id?: string;
573
+ name?: string;
574
+ url?: string;
575
+ };
576
+ Relationships: [];
577
+ };
578
+ base_images: {
579
+ Row: {
580
+ filename: string;
581
+ id: string;
582
+ source_text: string;
583
+ url: string;
584
+ };
585
+ Insert: {
586
+ filename: string;
587
+ id?: string;
588
+ source_text: string;
589
+ url: string;
590
+ };
591
+ Update: {
592
+ filename?: string;
593
+ id?: string;
594
+ source_text?: string;
595
+ url?: string;
596
+ };
597
+ Relationships: [];
598
+ };
599
+ external_documents: {
600
+ Row: {
601
+ effective_date: string | null;
602
+ expiry_date: string | null;
603
+ id: string;
604
+ uploaded_at: string;
605
+ url: string;
606
+ };
607
+ Insert: {
608
+ effective_date?: string | null;
609
+ expiry_date?: string | null;
610
+ id?: string;
611
+ uploaded_at?: string;
612
+ url: string;
613
+ };
614
+ Update: {
615
+ effective_date?: string | null;
616
+ expiry_date?: string | null;
617
+ id?: string;
618
+ uploaded_at?: string;
619
+ url?: string;
620
+ };
621
+ Relationships: [];
622
+ };
623
+ field_repository: {
624
+ Row: {
625
+ helper: string | null;
626
+ id: string;
627
+ label: string | null;
628
+ name: string;
629
+ options: import("./db.doc.types").Json | null;
630
+ section: _DocumentDatabase["public"]["Enums"]["section"] | null;
631
+ transformers: string[];
632
+ type: _DocumentDatabase["public"]["Enums"]["input_type"] | null;
633
+ validators: string[] | null;
634
+ };
635
+ Insert: {
636
+ helper?: string | null;
637
+ id?: string;
638
+ label?: string | null;
639
+ name: string;
640
+ options?: import("./db.doc.types").Json | null;
641
+ section?: _DocumentDatabase["public"]["Enums"]["section"] | null;
642
+ transformers?: string[];
643
+ type?: _DocumentDatabase["public"]["Enums"]["input_type"] | null;
644
+ validators?: string[] | null;
645
+ };
646
+ Update: {
647
+ helper?: string | null;
648
+ id?: string;
649
+ label?: string | null;
650
+ name?: string;
651
+ options?: import("./db.doc.types").Json | null;
652
+ section?: _DocumentDatabase["public"]["Enums"]["section"] | null;
653
+ transformers?: string[];
654
+ type?: _DocumentDatabase["public"]["Enums"]["input_type"] | null;
655
+ validators?: string[] | null;
656
+ };
657
+ Relationships: [];
658
+ };
659
+ field_transformers: {
660
+ Row: {
661
+ id: string;
662
+ name: string;
663
+ rule: string;
664
+ };
665
+ Insert: {
666
+ id?: string;
667
+ name: string;
668
+ rule: string;
669
+ };
670
+ Update: {
671
+ id?: string;
672
+ name?: string;
673
+ rule?: string;
674
+ };
675
+ Relationships: [];
676
+ };
677
+ field_validators: {
678
+ Row: {
679
+ id: string;
680
+ name: string;
681
+ rule: string;
682
+ };
683
+ Insert: {
684
+ id?: string;
685
+ name: string;
686
+ rule: string;
687
+ };
688
+ Update: {
689
+ id?: string;
690
+ name?: string;
691
+ rule?: string;
692
+ };
693
+ Relationships: [];
694
+ };
695
+ form_groups: {
696
+ Row: {
697
+ description: string;
698
+ forms: string[];
699
+ id: string;
700
+ };
701
+ Insert: {
702
+ description: string;
703
+ forms?: string[];
704
+ id?: string;
705
+ };
706
+ Update: {
707
+ description?: string;
708
+ forms?: string[];
709
+ id?: string;
710
+ };
711
+ Relationships: [];
712
+ };
713
+ form_schemas: {
714
+ Row: {
715
+ base_document_id: string | null;
716
+ fields: import("./db.doc.types").Json;
717
+ fields_filled_by_user: string[] | null;
718
+ id: string;
719
+ initiators: string[] | null;
720
+ label: string | null;
721
+ name: string;
722
+ params: import("./db.doc.types").Json;
723
+ required_parties: string[];
724
+ schema: import("./db.doc.types").Json;
725
+ subscribers: string[];
726
+ version: number;
727
+ };
728
+ Insert: {
729
+ base_document_id?: string | null;
730
+ fields: import("./db.doc.types").Json;
731
+ fields_filled_by_user?: string[] | null;
732
+ id?: string;
733
+ initiators?: string[] | null;
734
+ label?: string | null;
735
+ name: string;
736
+ params?: import("./db.doc.types").Json;
737
+ required_parties?: string[];
738
+ schema?: import("./db.doc.types").Json;
739
+ subscribers?: string[];
740
+ version?: number;
741
+ };
742
+ Update: {
743
+ base_document_id?: string | null;
744
+ fields?: import("./db.doc.types").Json;
745
+ fields_filled_by_user?: string[] | null;
746
+ id?: string;
747
+ initiators?: string[] | null;
748
+ label?: string | null;
749
+ name?: string;
750
+ params?: import("./db.doc.types").Json;
751
+ required_parties?: string[];
752
+ schema?: import("./db.doc.types").Json;
753
+ subscribers?: string[];
754
+ version?: number;
755
+ };
756
+ Relationships: [{
757
+ foreignKeyName: "form_schemas_base_document_id_fkey";
758
+ columns: ["base_document_id"];
759
+ isOneToOne: false;
760
+ referencedRelation: "base_documents";
761
+ referencedColumns: ["id"];
762
+ }];
763
+ };
764
+ pending_documents: {
765
+ Row: {
766
+ date_made: string;
767
+ form_name: string | null;
768
+ id: string;
769
+ inputs: import("./db.doc.types").Json;
770
+ latest_document_url: string | null;
771
+ pending_parties: import("./db.doc.types").Json;
772
+ signatories: import("./db.doc.types").Json;
773
+ subscribers: import("./db.doc.types").Json | null;
774
+ };
775
+ Insert: {
776
+ date_made?: string;
777
+ form_name?: string | null;
778
+ id?: string;
779
+ inputs?: import("./db.doc.types").Json;
780
+ latest_document_url?: string | null;
781
+ pending_parties?: import("./db.doc.types").Json;
782
+ signatories?: import("./db.doc.types").Json;
783
+ subscribers?: import("./db.doc.types").Json | null;
784
+ };
785
+ Update: {
786
+ date_made?: string;
787
+ form_name?: string | null;
788
+ id?: string;
789
+ inputs?: import("./db.doc.types").Json;
790
+ latest_document_url?: string | null;
791
+ pending_parties?: import("./db.doc.types").Json;
792
+ signatories?: import("./db.doc.types").Json;
793
+ subscribers?: import("./db.doc.types").Json | null;
794
+ };
795
+ Relationships: [];
796
+ };
797
+ prefilled_documents: {
798
+ Row: {
799
+ base_document_id: string;
800
+ id: string;
801
+ url: string;
802
+ };
803
+ Insert: {
804
+ base_document_id: string;
805
+ id?: string;
806
+ url: string;
807
+ };
808
+ Update: {
809
+ base_document_id?: string;
810
+ id?: string;
811
+ url?: string;
812
+ };
813
+ Relationships: [{
814
+ foreignKeyName: "prefilled_documents_base_document_id_fkey";
815
+ columns: ["base_document_id"];
816
+ isOneToOne: false;
817
+ referencedRelation: "base_documents";
818
+ referencedColumns: ["id"];
819
+ }];
820
+ };
821
+ signed_documents: {
822
+ Row: {
823
+ base_document_id: string | null;
824
+ date_made: string;
825
+ effective_date: string;
826
+ expiry_date: string;
827
+ id: string;
828
+ inputs: import("./db.doc.types").Json | null;
829
+ inputs_hash: string | null;
830
+ notarized_url: string | null;
831
+ schema: import("./db.doc.types").Json | null;
832
+ schema_hash: string | null;
833
+ signatories: import("./db.doc.types").Json;
834
+ url: string;
835
+ verification_code: string | null;
836
+ };
837
+ Insert: {
838
+ base_document_id?: string | null;
839
+ date_made?: string;
840
+ effective_date: string;
841
+ expiry_date: string;
842
+ id?: string;
843
+ inputs?: import("./db.doc.types").Json | null;
844
+ inputs_hash?: string | null;
845
+ notarized_url?: string | null;
846
+ schema?: import("./db.doc.types").Json | null;
847
+ schema_hash?: string | null;
848
+ signatories: import("./db.doc.types").Json;
849
+ url: string;
850
+ verification_code?: string | null;
851
+ };
852
+ Update: {
853
+ base_document_id?: string | null;
854
+ date_made?: string;
855
+ effective_date?: string;
856
+ expiry_date?: string;
857
+ id?: string;
858
+ inputs?: import("./db.doc.types").Json | null;
859
+ inputs_hash?: string | null;
860
+ notarized_url?: string | null;
861
+ schema?: import("./db.doc.types").Json | null;
862
+ schema_hash?: string | null;
863
+ signatories?: import("./db.doc.types").Json;
864
+ url?: string;
865
+ verification_code?: string | null;
866
+ };
867
+ Relationships: [{
868
+ foreignKeyName: "signed_documents_base_document_id_fkey";
869
+ columns: ["base_document_id"];
870
+ isOneToOne: false;
871
+ referencedRelation: "base_documents";
872
+ referencedColumns: ["id"];
873
+ }];
874
+ };
875
+ };
876
+ Views: { [_ in never]: never; };
877
+ Functions: { [_ in never]: never; };
878
+ Enums: {
879
+ input_type: "text" | "number" | "date" | "select" | "time" | "signature" | "reference" | "checkbox";
880
+ section: "student" | "entity" | "university" | "student-guardian" | "internship";
881
+ };
882
+ CompositeTypes: { [_ in never]: never; };
883
+ }>;
884
+ export declare const handleDBError: (error: PostgrestError, description?: string) => never;