@betterinternship/schema.moa 1.6.1 → 2.0.0

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