@betterinternship/schema.moa 2.0.0 → 2.0.1

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,1224 @@
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
+ import { Tables as _InternshipTables } from "./db.internship.types";
6
+ export type DocumentDatabase = _DocumentDatabase;
7
+ export type EntityDatabase = _EntityDatabase;
8
+ export type SchoolDatabase = _SchoolDatabase;
9
+ export type InternshipDatabase = _DocumentDatabase;
10
+ 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" | {
11
+ schema: "public";
12
+ }> = _DocumentTables<T>;
13
+ export type EntityTables<T extends "entities" | "entity_logs" | "messages" | "threads" | "moa_requests" | "new_entity_requests" | {
14
+ schema: "public";
15
+ }> = _EntityTables<T>;
16
+ export type SchoolTables<T extends "moa_histories" | "schools" | "private_entity_notes" | "school_accounts" | "school_entities" | "school_logs" | {
17
+ schema: "public";
18
+ }> = _SchoolTables<T>;
19
+ export type InternshipTables<T extends "coordinator_accounts" | "signatory_accounts" | "signatory_forms" | "student_forms" | {
20
+ schema: "public";
21
+ }> = _InternshipTables<T>;
22
+ export declare const entityDb: import("@supabase/supabase-js").SupabaseClient<_EntityDatabase, "public", {
23
+ Tables: {
24
+ entities: {
25
+ Row: {
26
+ address: string | null;
27
+ contact_email: string | null;
28
+ contact_name: string | null;
29
+ contact_phone: string | null;
30
+ created_at: string;
31
+ display_name: string | null;
32
+ documents: import("./db.ent.types").Json | null;
33
+ id: string;
34
+ industry: string | null;
35
+ is_deactivated: boolean;
36
+ legal_identifier: string;
37
+ password: string;
38
+ type: string;
39
+ };
40
+ Insert: {
41
+ address?: string | null;
42
+ contact_email?: string | null;
43
+ contact_name?: string | null;
44
+ contact_phone?: string | null;
45
+ created_at?: string;
46
+ display_name?: string | null;
47
+ documents?: import("./db.ent.types").Json | null;
48
+ id?: string;
49
+ industry?: string | null;
50
+ is_deactivated?: boolean;
51
+ legal_identifier: string;
52
+ password?: string;
53
+ type: string;
54
+ };
55
+ Update: {
56
+ address?: string | null;
57
+ contact_email?: string | null;
58
+ contact_name?: string | null;
59
+ contact_phone?: string | null;
60
+ created_at?: string;
61
+ display_name?: string | null;
62
+ documents?: import("./db.ent.types").Json | null;
63
+ id?: string;
64
+ industry?: string | null;
65
+ is_deactivated?: boolean;
66
+ legal_identifier?: string;
67
+ password?: string;
68
+ type?: string;
69
+ };
70
+ Relationships: [{
71
+ foreignKeyName: "entities_industry_fkey";
72
+ columns: ["industry"];
73
+ isOneToOne: false;
74
+ referencedRelation: "ref_industries";
75
+ referencedColumns: ["id"];
76
+ }];
77
+ };
78
+ entity_logs: {
79
+ Row: {
80
+ entity_id: string;
81
+ file: string;
82
+ id: string;
83
+ source_type: string;
84
+ target: string | null;
85
+ timestamp: string;
86
+ update_type: string;
87
+ };
88
+ Insert: {
89
+ entity_id: string;
90
+ file: string;
91
+ id?: string;
92
+ source_type: string;
93
+ target?: string | null;
94
+ timestamp?: string;
95
+ update_type: string;
96
+ };
97
+ Update: {
98
+ entity_id?: string;
99
+ file?: string;
100
+ id?: string;
101
+ source_type?: string;
102
+ target?: string | null;
103
+ timestamp?: string;
104
+ update_type?: string;
105
+ };
106
+ Relationships: [{
107
+ foreignKeyName: "entity_logs_entity_id_fkey";
108
+ columns: ["entity_id"];
109
+ isOneToOne: false;
110
+ referencedRelation: "entities";
111
+ referencedColumns: ["id"];
112
+ }];
113
+ };
114
+ entity_sessions: {
115
+ Row: {
116
+ entity_id: string;
117
+ id: number;
118
+ timestamp: string;
119
+ };
120
+ Insert: {
121
+ entity_id: string;
122
+ id?: number;
123
+ timestamp?: string;
124
+ };
125
+ Update: {
126
+ entity_id?: string;
127
+ id?: number;
128
+ timestamp?: string;
129
+ };
130
+ Relationships: [{
131
+ foreignKeyName: "entity_sessions_entity_id_fkey";
132
+ columns: ["entity_id"];
133
+ isOneToOne: false;
134
+ referencedRelation: "entities";
135
+ referencedColumns: ["id"];
136
+ }];
137
+ };
138
+ messages: {
139
+ Row: {
140
+ action: string;
141
+ attachments: import("./db.ent.types").Json | null;
142
+ id: string;
143
+ moa_document: string | null;
144
+ source_id: string;
145
+ source_type: string;
146
+ target_id: string;
147
+ text: string | null;
148
+ thread_id: string;
149
+ timestamp: string;
150
+ };
151
+ Insert: {
152
+ action: string;
153
+ attachments?: import("./db.ent.types").Json | null;
154
+ id?: string;
155
+ moa_document?: string | null;
156
+ source_id: string;
157
+ source_type: string;
158
+ target_id: string;
159
+ text?: string | null;
160
+ thread_id: string;
161
+ timestamp?: string;
162
+ };
163
+ Update: {
164
+ action?: string;
165
+ attachments?: import("./db.ent.types").Json | null;
166
+ id?: string;
167
+ moa_document?: string | null;
168
+ source_id?: string;
169
+ source_type?: string;
170
+ target_id?: string;
171
+ text?: string | null;
172
+ thread_id?: string;
173
+ timestamp?: string;
174
+ };
175
+ Relationships: [{
176
+ foreignKeyName: "messages_thread_id_fkey";
177
+ columns: ["thread_id"];
178
+ isOneToOne: false;
179
+ referencedRelation: "threads";
180
+ referencedColumns: ["id"];
181
+ }];
182
+ };
183
+ moa_requests: {
184
+ Row: {
185
+ entity_id: string;
186
+ id: string;
187
+ notified_school_account_id: string | null;
188
+ outcome: string | null;
189
+ processed_by_account_id: string | null;
190
+ processed_date: string | null;
191
+ school_id: string;
192
+ signed_document_id: string | null;
193
+ thread_id: string | null;
194
+ timestamp: string;
195
+ };
196
+ Insert: {
197
+ entity_id: string;
198
+ id?: string;
199
+ notified_school_account_id?: string | null;
200
+ outcome?: string | null;
201
+ processed_by_account_id?: string | null;
202
+ processed_date?: string | null;
203
+ school_id: string;
204
+ signed_document_id?: string | null;
205
+ thread_id?: string | null;
206
+ timestamp?: string;
207
+ };
208
+ Update: {
209
+ entity_id?: string;
210
+ id?: string;
211
+ notified_school_account_id?: string | null;
212
+ outcome?: string | null;
213
+ processed_by_account_id?: string | null;
214
+ processed_date?: string | null;
215
+ school_id?: string;
216
+ signed_document_id?: string | null;
217
+ thread_id?: string | null;
218
+ timestamp?: string;
219
+ };
220
+ Relationships: [{
221
+ foreignKeyName: "moa_requests_entity_id_fkey";
222
+ columns: ["entity_id"];
223
+ isOneToOne: false;
224
+ referencedRelation: "entities";
225
+ referencedColumns: ["id"];
226
+ }, {
227
+ foreignKeyName: "moa_requests_thread_id_fkey";
228
+ columns: ["thread_id"];
229
+ isOneToOne: false;
230
+ referencedRelation: "threads";
231
+ referencedColumns: ["id"];
232
+ }];
233
+ };
234
+ new_entity_requests: {
235
+ Row: {
236
+ entity_id: string;
237
+ id: string;
238
+ outcome: string | null;
239
+ processed_by_account_id: string | null;
240
+ processed_date: string | null;
241
+ school_id: string;
242
+ thread_id: string;
243
+ timestamp: string;
244
+ };
245
+ Insert: {
246
+ entity_id: string;
247
+ id?: string;
248
+ outcome?: string | null;
249
+ processed_by_account_id?: string | null;
250
+ processed_date?: string | null;
251
+ school_id: string;
252
+ thread_id: string;
253
+ timestamp?: string;
254
+ };
255
+ Update: {
256
+ entity_id?: string;
257
+ id?: string;
258
+ outcome?: string | null;
259
+ processed_by_account_id?: string | null;
260
+ processed_date?: string | null;
261
+ school_id?: string;
262
+ thread_id?: string;
263
+ timestamp?: string;
264
+ };
265
+ Relationships: [{
266
+ foreignKeyName: "new_entity_requests_entity_id_fkey";
267
+ columns: ["entity_id"];
268
+ isOneToOne: false;
269
+ referencedRelation: "entities";
270
+ referencedColumns: ["id"];
271
+ }, {
272
+ foreignKeyName: "new_entity_requests_thread_id_fkey";
273
+ columns: ["thread_id"];
274
+ isOneToOne: false;
275
+ referencedRelation: "threads";
276
+ referencedColumns: ["id"];
277
+ }];
278
+ };
279
+ ref_industries: {
280
+ Row: {
281
+ id: string;
282
+ name: string;
283
+ };
284
+ Insert: {
285
+ id?: string;
286
+ name: string;
287
+ };
288
+ Update: {
289
+ id?: string;
290
+ name?: string;
291
+ };
292
+ Relationships: [];
293
+ };
294
+ threads: {
295
+ Row: {
296
+ id: string;
297
+ };
298
+ Insert: {
299
+ id?: string;
300
+ };
301
+ Update: {
302
+ id?: string;
303
+ };
304
+ Relationships: [];
305
+ };
306
+ };
307
+ Views: { [_ in never]: never; };
308
+ Functions: { [_ in never]: never; };
309
+ Enums: { [_ in never]: never; };
310
+ CompositeTypes: { [_ in never]: never; };
311
+ }>;
312
+ export declare const schoolDb: import("@supabase/supabase-js").SupabaseClient<_SchoolDatabase, "public", {
313
+ Tables: {
314
+ moa_histories: {
315
+ Row: {
316
+ entity_id: string;
317
+ history: import("./db.uni.types").Json | null;
318
+ id: string;
319
+ school_id: string;
320
+ };
321
+ Insert: {
322
+ entity_id: string;
323
+ history?: import("./db.uni.types").Json | null;
324
+ id?: string;
325
+ school_id?: string;
326
+ };
327
+ Update: {
328
+ entity_id?: string;
329
+ history?: import("./db.uni.types").Json | null;
330
+ id?: string;
331
+ school_id?: string;
332
+ };
333
+ Relationships: [{
334
+ foreignKeyName: "moa_histories_school_id_fkey";
335
+ columns: ["school_id"];
336
+ isOneToOne: false;
337
+ referencedRelation: "schools";
338
+ referencedColumns: ["id"];
339
+ }];
340
+ };
341
+ private_entity_notes: {
342
+ Row: {
343
+ author_school_account_id: string;
344
+ entity_id: string;
345
+ id: string;
346
+ message: string;
347
+ timestamp: string;
348
+ };
349
+ Insert: {
350
+ author_school_account_id: string;
351
+ entity_id: string;
352
+ id?: string;
353
+ message: string;
354
+ timestamp?: string;
355
+ };
356
+ Update: {
357
+ author_school_account_id?: string;
358
+ entity_id?: string;
359
+ id?: string;
360
+ message?: string;
361
+ timestamp?: string;
362
+ };
363
+ Relationships: [{
364
+ foreignKeyName: "private_entity_notes_author_school_account_id_fkey";
365
+ columns: ["author_school_account_id"];
366
+ isOneToOne: false;
367
+ referencedRelation: "school_accounts";
368
+ referencedColumns: ["id"];
369
+ }];
370
+ };
371
+ school_accounts: {
372
+ Row: {
373
+ created_at: string;
374
+ email: string;
375
+ id: string;
376
+ name: string;
377
+ password: string | null;
378
+ receive_moa_requests: boolean;
379
+ receive_new_entity_requests: boolean;
380
+ role: string;
381
+ school_id: string;
382
+ };
383
+ Insert: {
384
+ created_at?: string;
385
+ email?: string;
386
+ id?: string;
387
+ name: string;
388
+ password?: string | null;
389
+ receive_moa_requests?: boolean;
390
+ receive_new_entity_requests?: boolean;
391
+ role?: string;
392
+ school_id: string;
393
+ };
394
+ Update: {
395
+ created_at?: string;
396
+ email?: string;
397
+ id?: string;
398
+ name?: string;
399
+ password?: string | null;
400
+ receive_moa_requests?: boolean;
401
+ receive_new_entity_requests?: boolean;
402
+ role?: string;
403
+ school_id?: string;
404
+ };
405
+ Relationships: [{
406
+ foreignKeyName: "school_accounts_school_id_fkey";
407
+ columns: ["school_id"];
408
+ isOneToOne: false;
409
+ referencedRelation: "schools";
410
+ referencedColumns: ["id"];
411
+ }];
412
+ };
413
+ school_entities: {
414
+ Row: {
415
+ entity_id: string;
416
+ id: string;
417
+ school_id: string;
418
+ status: string;
419
+ };
420
+ Insert: {
421
+ entity_id: string;
422
+ id?: string;
423
+ school_id: string;
424
+ status: string;
425
+ };
426
+ Update: {
427
+ entity_id?: string;
428
+ id?: string;
429
+ school_id?: string;
430
+ status?: string;
431
+ };
432
+ Relationships: [{
433
+ foreignKeyName: "school_entities_school_id_fkey";
434
+ columns: ["school_id"];
435
+ isOneToOne: false;
436
+ referencedRelation: "schools";
437
+ referencedColumns: ["id"];
438
+ }];
439
+ };
440
+ school_logs: {
441
+ Row: {
442
+ entity_id: string | null;
443
+ id: number;
444
+ school_account_id: string;
445
+ timestamp: string;
446
+ update_type: string;
447
+ };
448
+ Insert: {
449
+ entity_id?: string | null;
450
+ id?: number;
451
+ school_account_id: string;
452
+ timestamp?: string;
453
+ update_type: string;
454
+ };
455
+ Update: {
456
+ entity_id?: string | null;
457
+ id?: number;
458
+ school_account_id?: string;
459
+ timestamp?: string;
460
+ update_type?: string;
461
+ };
462
+ Relationships: [{
463
+ foreignKeyName: "school_logs_school_account_id_fkey";
464
+ columns: ["school_account_id"];
465
+ isOneToOne: false;
466
+ referencedRelation: "school_accounts";
467
+ referencedColumns: ["id"];
468
+ }];
469
+ };
470
+ school_sessions: {
471
+ Row: {
472
+ id: string;
473
+ school_id: string;
474
+ timestamp: string;
475
+ };
476
+ Insert: {
477
+ id?: string;
478
+ school_id: string;
479
+ timestamp?: string;
480
+ };
481
+ Update: {
482
+ id?: string;
483
+ school_id?: string;
484
+ timestamp?: string;
485
+ };
486
+ Relationships: [{
487
+ foreignKeyName: "school_sessions_school_id_fkey";
488
+ columns: ["school_id"];
489
+ isOneToOne: false;
490
+ referencedRelation: "schools";
491
+ referencedColumns: ["id"];
492
+ }];
493
+ };
494
+ schools: {
495
+ Row: {
496
+ created_at: string;
497
+ domain: string;
498
+ full_name: string;
499
+ id: string;
500
+ short_name: string;
501
+ };
502
+ Insert: {
503
+ created_at?: string;
504
+ domain: string;
505
+ full_name: string;
506
+ id?: string;
507
+ short_name: string;
508
+ };
509
+ Update: {
510
+ created_at?: string;
511
+ domain?: string;
512
+ full_name?: string;
513
+ id?: string;
514
+ short_name?: string;
515
+ };
516
+ Relationships: [];
517
+ };
518
+ };
519
+ Views: { [_ in never]: never; };
520
+ Functions: { [_ in never]: never; };
521
+ Enums: { [_ in never]: never; };
522
+ CompositeTypes: { [_ in never]: never; };
523
+ }>;
524
+ export declare const documentDb: import("@supabase/supabase-js").SupabaseClient<_DocumentDatabase, "public", {
525
+ Tables: {
526
+ base_documents: {
527
+ Row: {
528
+ created_at: string;
529
+ id: string;
530
+ name: string;
531
+ url: string;
532
+ };
533
+ Insert: {
534
+ created_at?: string;
535
+ id?: string;
536
+ name: string;
537
+ url: string;
538
+ };
539
+ Update: {
540
+ created_at?: string;
541
+ id?: string;
542
+ name?: string;
543
+ url?: string;
544
+ };
545
+ Relationships: [];
546
+ };
547
+ base_images: {
548
+ Row: {
549
+ filename: string;
550
+ id: string;
551
+ source_text: string;
552
+ url: string;
553
+ };
554
+ Insert: {
555
+ filename: string;
556
+ id?: string;
557
+ source_text: string;
558
+ url: string;
559
+ };
560
+ Update: {
561
+ filename?: string;
562
+ id?: string;
563
+ source_text?: string;
564
+ url?: string;
565
+ };
566
+ Relationships: [];
567
+ };
568
+ external_documents: {
569
+ Row: {
570
+ effective_date: string | null;
571
+ expiry_date: string | null;
572
+ id: string;
573
+ uploaded_at: string;
574
+ url: string;
575
+ };
576
+ Insert: {
577
+ effective_date?: string | null;
578
+ expiry_date?: string | null;
579
+ id?: string;
580
+ uploaded_at?: string;
581
+ url: string;
582
+ };
583
+ Update: {
584
+ effective_date?: string | null;
585
+ expiry_date?: string | null;
586
+ id?: string;
587
+ uploaded_at?: string;
588
+ url?: string;
589
+ };
590
+ Relationships: [];
591
+ };
592
+ field_template_registry: {
593
+ Row: {
594
+ id: string;
595
+ is_phantom: boolean;
596
+ label: string;
597
+ name: string;
598
+ party: string | null;
599
+ prefiller: string | null;
600
+ preset: string;
601
+ shared: boolean;
602
+ source: string;
603
+ tooltip_label: string | null;
604
+ type: string;
605
+ validator: string | null;
606
+ };
607
+ Insert: {
608
+ id?: string;
609
+ is_phantom?: boolean;
610
+ label: string;
611
+ name: string;
612
+ party?: string | null;
613
+ prefiller?: string | null;
614
+ preset?: string;
615
+ shared?: boolean;
616
+ source: string;
617
+ tooltip_label?: string | null;
618
+ type?: string;
619
+ validator?: string | null;
620
+ };
621
+ Update: {
622
+ id?: string;
623
+ is_phantom?: boolean;
624
+ label?: string;
625
+ name?: string;
626
+ party?: string | null;
627
+ prefiller?: string | null;
628
+ preset?: string;
629
+ shared?: boolean;
630
+ source?: string;
631
+ tooltip_label?: string | null;
632
+ type?: string;
633
+ validator?: string | null;
634
+ };
635
+ Relationships: [];
636
+ };
637
+ form_group_accounts: {
638
+ Row: {
639
+ created_at: string;
640
+ email: string;
641
+ form_group_id: string;
642
+ id: string;
643
+ name: string | null;
644
+ };
645
+ Insert: {
646
+ created_at?: string;
647
+ email: string;
648
+ form_group_id: string;
649
+ id?: string;
650
+ name?: string | null;
651
+ };
652
+ Update: {
653
+ created_at?: string;
654
+ email?: string;
655
+ form_group_id?: string;
656
+ id?: string;
657
+ name?: string | null;
658
+ };
659
+ Relationships: [{
660
+ foreignKeyName: "form_group_accounts_form_group_id_fkey";
661
+ columns: ["form_group_id"];
662
+ isOneToOne: false;
663
+ referencedRelation: "form_groups";
664
+ referencedColumns: ["id"];
665
+ }];
666
+ };
667
+ form_groups: {
668
+ Row: {
669
+ description: string;
670
+ forms: string[];
671
+ id: string;
672
+ };
673
+ Insert: {
674
+ description: string;
675
+ forms: string[];
676
+ id?: string;
677
+ };
678
+ Update: {
679
+ description?: string;
680
+ forms?: string[];
681
+ id?: string;
682
+ };
683
+ Relationships: [];
684
+ };
685
+ form_schemas: {
686
+ Row: {
687
+ base_document_id: string | null;
688
+ form_metadata_id: string;
689
+ id: string;
690
+ label: string | null;
691
+ name: string;
692
+ time_generated: string | null;
693
+ version: number;
694
+ };
695
+ Insert: {
696
+ base_document_id?: string | null;
697
+ form_metadata_id?: string;
698
+ id?: string;
699
+ label?: string | null;
700
+ name: string;
701
+ time_generated?: string | null;
702
+ version?: number;
703
+ };
704
+ Update: {
705
+ base_document_id?: string | null;
706
+ form_metadata_id?: string;
707
+ id?: string;
708
+ label?: string | null;
709
+ name?: string;
710
+ time_generated?: string | null;
711
+ version?: number;
712
+ };
713
+ Relationships: [{
714
+ foreignKeyName: "form_schemas_base_document_id_fkey";
715
+ columns: ["base_document_id"];
716
+ isOneToOne: false;
717
+ referencedRelation: "base_documents";
718
+ referencedColumns: ["id"];
719
+ }];
720
+ };
721
+ pending_documents: {
722
+ Row: {
723
+ audit: import("./db.doc.types").Json | null;
724
+ base_document_id: string | null;
725
+ date_made: string;
726
+ descriptors: import("./db.doc.types").Json;
727
+ form_label: string | null;
728
+ form_name: string | null;
729
+ id: string;
730
+ inputs: import("./db.doc.types").Json;
731
+ latest_document_url: string | null;
732
+ pending_parties: import("./db.doc.types").Json;
733
+ signatories: import("./db.doc.types").Json;
734
+ subscribers: import("./db.doc.types").Json | null;
735
+ version: number | null;
736
+ };
737
+ Insert: {
738
+ audit?: import("./db.doc.types").Json | null;
739
+ base_document_id?: string | null;
740
+ date_made?: string;
741
+ descriptors?: import("./db.doc.types").Json;
742
+ form_label?: string | null;
743
+ form_name?: string | null;
744
+ id?: string;
745
+ inputs?: import("./db.doc.types").Json;
746
+ latest_document_url?: string | null;
747
+ pending_parties?: import("./db.doc.types").Json;
748
+ signatories?: import("./db.doc.types").Json;
749
+ subscribers?: import("./db.doc.types").Json | null;
750
+ version?: number | null;
751
+ };
752
+ Update: {
753
+ audit?: import("./db.doc.types").Json | null;
754
+ base_document_id?: string | null;
755
+ date_made?: string;
756
+ descriptors?: import("./db.doc.types").Json;
757
+ form_label?: string | null;
758
+ form_name?: string | null;
759
+ id?: string;
760
+ inputs?: import("./db.doc.types").Json;
761
+ latest_document_url?: string | null;
762
+ pending_parties?: import("./db.doc.types").Json;
763
+ signatories?: import("./db.doc.types").Json;
764
+ subscribers?: import("./db.doc.types").Json | null;
765
+ version?: number | null;
766
+ };
767
+ Relationships: [{
768
+ foreignKeyName: "pending_documents_base_document_id_fkey";
769
+ columns: ["base_document_id"];
770
+ isOneToOne: false;
771
+ referencedRelation: "base_documents";
772
+ referencedColumns: ["id"];
773
+ }];
774
+ };
775
+ prefilled_documents: {
776
+ Row: {
777
+ base_document_id: string;
778
+ descriptors: import("./db.doc.types").Json;
779
+ id: string;
780
+ url: string;
781
+ };
782
+ Insert: {
783
+ base_document_id: string;
784
+ descriptors?: import("./db.doc.types").Json;
785
+ id?: string;
786
+ url: string;
787
+ };
788
+ Update: {
789
+ base_document_id?: string;
790
+ descriptors?: import("./db.doc.types").Json;
791
+ id?: string;
792
+ url?: string;
793
+ };
794
+ Relationships: [{
795
+ foreignKeyName: "prefilled_documents_base_document_id_fkey";
796
+ columns: ["base_document_id"];
797
+ isOneToOne: false;
798
+ referencedRelation: "base_documents";
799
+ referencedColumns: ["id"];
800
+ }];
801
+ };
802
+ signed_documents: {
803
+ Row: {
804
+ base_document_id: string | null;
805
+ date_made: string;
806
+ descriptors: import("./db.doc.types").Json;
807
+ effective_date: string;
808
+ expiry_date: string;
809
+ form_label: string | null;
810
+ form_name: string | null;
811
+ id: string;
812
+ inputs: import("./db.doc.types").Json | null;
813
+ inputs_hash: string | null;
814
+ notarized_url: string | null;
815
+ schema: import("./db.doc.types").Json | null;
816
+ schema_hash: string | null;
817
+ signatories: import("./db.doc.types").Json | null;
818
+ url: string;
819
+ verification_code: string | null;
820
+ };
821
+ Insert: {
822
+ base_document_id?: string | null;
823
+ date_made?: string;
824
+ descriptors?: import("./db.doc.types").Json;
825
+ effective_date: string;
826
+ expiry_date: string;
827
+ form_label?: string | null;
828
+ form_name?: string | null;
829
+ id?: string;
830
+ inputs?: import("./db.doc.types").Json | null;
831
+ inputs_hash?: string | null;
832
+ notarized_url?: string | null;
833
+ schema?: import("./db.doc.types").Json | null;
834
+ schema_hash?: string | null;
835
+ signatories?: import("./db.doc.types").Json | null;
836
+ url: string;
837
+ verification_code?: string | null;
838
+ };
839
+ Update: {
840
+ base_document_id?: string | null;
841
+ date_made?: string;
842
+ descriptors?: import("./db.doc.types").Json;
843
+ effective_date?: string;
844
+ expiry_date?: string;
845
+ form_label?: string | null;
846
+ form_name?: string | null;
847
+ id?: string;
848
+ inputs?: import("./db.doc.types").Json | null;
849
+ inputs_hash?: string | null;
850
+ notarized_url?: string | null;
851
+ schema?: import("./db.doc.types").Json | null;
852
+ schema_hash?: string | null;
853
+ signatories?: import("./db.doc.types").Json | null;
854
+ url?: string;
855
+ verification_code?: string | null;
856
+ };
857
+ Relationships: [{
858
+ foreignKeyName: "signed_documents_base_document_id_fkey";
859
+ columns: ["base_document_id"];
860
+ isOneToOne: false;
861
+ referencedRelation: "base_documents";
862
+ referencedColumns: ["id"];
863
+ }];
864
+ };
865
+ };
866
+ Views: { [_ in never]: never; };
867
+ Functions: { [_ in never]: never; };
868
+ Enums: {
869
+ input_type: "text" | "number" | "date" | "select" | "time" | "signature" | "reference" | "checkbox";
870
+ section: "student" | "entity" | "university" | "student-guardian" | "internship";
871
+ };
872
+ CompositeTypes: { [_ in never]: never; };
873
+ }>;
874
+ export declare const internshipDb: import("@supabase/supabase-js").SupabaseClient<_DocumentDatabase, "public", {
875
+ Tables: {
876
+ base_documents: {
877
+ Row: {
878
+ created_at: string;
879
+ id: string;
880
+ name: string;
881
+ url: string;
882
+ };
883
+ Insert: {
884
+ created_at?: string;
885
+ id?: string;
886
+ name: string;
887
+ url: string;
888
+ };
889
+ Update: {
890
+ created_at?: string;
891
+ id?: string;
892
+ name?: string;
893
+ url?: string;
894
+ };
895
+ Relationships: [];
896
+ };
897
+ base_images: {
898
+ Row: {
899
+ filename: string;
900
+ id: string;
901
+ source_text: string;
902
+ url: string;
903
+ };
904
+ Insert: {
905
+ filename: string;
906
+ id?: string;
907
+ source_text: string;
908
+ url: string;
909
+ };
910
+ Update: {
911
+ filename?: string;
912
+ id?: string;
913
+ source_text?: string;
914
+ url?: string;
915
+ };
916
+ Relationships: [];
917
+ };
918
+ external_documents: {
919
+ Row: {
920
+ effective_date: string | null;
921
+ expiry_date: string | null;
922
+ id: string;
923
+ uploaded_at: string;
924
+ url: string;
925
+ };
926
+ Insert: {
927
+ effective_date?: string | null;
928
+ expiry_date?: string | null;
929
+ id?: string;
930
+ uploaded_at?: string;
931
+ url: string;
932
+ };
933
+ Update: {
934
+ effective_date?: string | null;
935
+ expiry_date?: string | null;
936
+ id?: string;
937
+ uploaded_at?: string;
938
+ url?: string;
939
+ };
940
+ Relationships: [];
941
+ };
942
+ field_template_registry: {
943
+ Row: {
944
+ id: string;
945
+ is_phantom: boolean;
946
+ label: string;
947
+ name: string;
948
+ party: string | null;
949
+ prefiller: string | null;
950
+ preset: string;
951
+ shared: boolean;
952
+ source: string;
953
+ tooltip_label: string | null;
954
+ type: string;
955
+ validator: string | null;
956
+ };
957
+ Insert: {
958
+ id?: string;
959
+ is_phantom?: boolean;
960
+ label: string;
961
+ name: string;
962
+ party?: string | null;
963
+ prefiller?: string | null;
964
+ preset?: string;
965
+ shared?: boolean;
966
+ source: string;
967
+ tooltip_label?: string | null;
968
+ type?: string;
969
+ validator?: string | null;
970
+ };
971
+ Update: {
972
+ id?: string;
973
+ is_phantom?: boolean;
974
+ label?: string;
975
+ name?: string;
976
+ party?: string | null;
977
+ prefiller?: string | null;
978
+ preset?: string;
979
+ shared?: boolean;
980
+ source?: string;
981
+ tooltip_label?: string | null;
982
+ type?: string;
983
+ validator?: string | null;
984
+ };
985
+ Relationships: [];
986
+ };
987
+ form_group_accounts: {
988
+ Row: {
989
+ created_at: string;
990
+ email: string;
991
+ form_group_id: string;
992
+ id: string;
993
+ name: string | null;
994
+ };
995
+ Insert: {
996
+ created_at?: string;
997
+ email: string;
998
+ form_group_id: string;
999
+ id?: string;
1000
+ name?: string | null;
1001
+ };
1002
+ Update: {
1003
+ created_at?: string;
1004
+ email?: string;
1005
+ form_group_id?: string;
1006
+ id?: string;
1007
+ name?: string | null;
1008
+ };
1009
+ Relationships: [{
1010
+ foreignKeyName: "form_group_accounts_form_group_id_fkey";
1011
+ columns: ["form_group_id"];
1012
+ isOneToOne: false;
1013
+ referencedRelation: "form_groups";
1014
+ referencedColumns: ["id"];
1015
+ }];
1016
+ };
1017
+ form_groups: {
1018
+ Row: {
1019
+ description: string;
1020
+ forms: string[];
1021
+ id: string;
1022
+ };
1023
+ Insert: {
1024
+ description: string;
1025
+ forms: string[];
1026
+ id?: string;
1027
+ };
1028
+ Update: {
1029
+ description?: string;
1030
+ forms?: string[];
1031
+ id?: string;
1032
+ };
1033
+ Relationships: [];
1034
+ };
1035
+ form_schemas: {
1036
+ Row: {
1037
+ base_document_id: string | null;
1038
+ form_metadata_id: string;
1039
+ id: string;
1040
+ label: string | null;
1041
+ name: string;
1042
+ time_generated: string | null;
1043
+ version: number;
1044
+ };
1045
+ Insert: {
1046
+ base_document_id?: string | null;
1047
+ form_metadata_id?: string;
1048
+ id?: string;
1049
+ label?: string | null;
1050
+ name: string;
1051
+ time_generated?: string | null;
1052
+ version?: number;
1053
+ };
1054
+ Update: {
1055
+ base_document_id?: string | null;
1056
+ form_metadata_id?: string;
1057
+ id?: string;
1058
+ label?: string | null;
1059
+ name?: string;
1060
+ time_generated?: string | null;
1061
+ version?: number;
1062
+ };
1063
+ Relationships: [{
1064
+ foreignKeyName: "form_schemas_base_document_id_fkey";
1065
+ columns: ["base_document_id"];
1066
+ isOneToOne: false;
1067
+ referencedRelation: "base_documents";
1068
+ referencedColumns: ["id"];
1069
+ }];
1070
+ };
1071
+ pending_documents: {
1072
+ Row: {
1073
+ audit: import("./db.doc.types").Json | null;
1074
+ base_document_id: string | null;
1075
+ date_made: string;
1076
+ descriptors: import("./db.doc.types").Json;
1077
+ form_label: string | null;
1078
+ form_name: string | null;
1079
+ id: string;
1080
+ inputs: import("./db.doc.types").Json;
1081
+ latest_document_url: string | null;
1082
+ pending_parties: import("./db.doc.types").Json;
1083
+ signatories: import("./db.doc.types").Json;
1084
+ subscribers: import("./db.doc.types").Json | null;
1085
+ version: number | null;
1086
+ };
1087
+ Insert: {
1088
+ audit?: import("./db.doc.types").Json | null;
1089
+ base_document_id?: string | null;
1090
+ date_made?: string;
1091
+ descriptors?: import("./db.doc.types").Json;
1092
+ form_label?: string | null;
1093
+ form_name?: string | null;
1094
+ id?: string;
1095
+ inputs?: import("./db.doc.types").Json;
1096
+ latest_document_url?: string | null;
1097
+ pending_parties?: import("./db.doc.types").Json;
1098
+ signatories?: import("./db.doc.types").Json;
1099
+ subscribers?: import("./db.doc.types").Json | null;
1100
+ version?: number | null;
1101
+ };
1102
+ Update: {
1103
+ audit?: import("./db.doc.types").Json | null;
1104
+ base_document_id?: string | null;
1105
+ date_made?: string;
1106
+ descriptors?: import("./db.doc.types").Json;
1107
+ form_label?: string | null;
1108
+ form_name?: string | null;
1109
+ id?: string;
1110
+ inputs?: import("./db.doc.types").Json;
1111
+ latest_document_url?: string | null;
1112
+ pending_parties?: import("./db.doc.types").Json;
1113
+ signatories?: import("./db.doc.types").Json;
1114
+ subscribers?: import("./db.doc.types").Json | null;
1115
+ version?: number | null;
1116
+ };
1117
+ Relationships: [{
1118
+ foreignKeyName: "pending_documents_base_document_id_fkey";
1119
+ columns: ["base_document_id"];
1120
+ isOneToOne: false;
1121
+ referencedRelation: "base_documents";
1122
+ referencedColumns: ["id"];
1123
+ }];
1124
+ };
1125
+ prefilled_documents: {
1126
+ Row: {
1127
+ base_document_id: string;
1128
+ descriptors: import("./db.doc.types").Json;
1129
+ id: string;
1130
+ url: string;
1131
+ };
1132
+ Insert: {
1133
+ base_document_id: string;
1134
+ descriptors?: import("./db.doc.types").Json;
1135
+ id?: string;
1136
+ url: string;
1137
+ };
1138
+ Update: {
1139
+ base_document_id?: string;
1140
+ descriptors?: import("./db.doc.types").Json;
1141
+ id?: string;
1142
+ url?: string;
1143
+ };
1144
+ Relationships: [{
1145
+ foreignKeyName: "prefilled_documents_base_document_id_fkey";
1146
+ columns: ["base_document_id"];
1147
+ isOneToOne: false;
1148
+ referencedRelation: "base_documents";
1149
+ referencedColumns: ["id"];
1150
+ }];
1151
+ };
1152
+ signed_documents: {
1153
+ Row: {
1154
+ base_document_id: string | null;
1155
+ date_made: string;
1156
+ descriptors: import("./db.doc.types").Json;
1157
+ effective_date: string;
1158
+ expiry_date: string;
1159
+ form_label: string | null;
1160
+ form_name: string | null;
1161
+ id: string;
1162
+ inputs: import("./db.doc.types").Json | null;
1163
+ inputs_hash: string | null;
1164
+ notarized_url: string | null;
1165
+ schema: import("./db.doc.types").Json | null;
1166
+ schema_hash: string | null;
1167
+ signatories: import("./db.doc.types").Json | null;
1168
+ url: string;
1169
+ verification_code: string | null;
1170
+ };
1171
+ Insert: {
1172
+ base_document_id?: string | null;
1173
+ date_made?: string;
1174
+ descriptors?: import("./db.doc.types").Json;
1175
+ effective_date: string;
1176
+ expiry_date: string;
1177
+ form_label?: string | null;
1178
+ form_name?: string | null;
1179
+ id?: string;
1180
+ inputs?: import("./db.doc.types").Json | null;
1181
+ inputs_hash?: string | null;
1182
+ notarized_url?: string | null;
1183
+ schema?: import("./db.doc.types").Json | null;
1184
+ schema_hash?: string | null;
1185
+ signatories?: import("./db.doc.types").Json | null;
1186
+ url: string;
1187
+ verification_code?: string | null;
1188
+ };
1189
+ Update: {
1190
+ base_document_id?: string | null;
1191
+ date_made?: string;
1192
+ descriptors?: import("./db.doc.types").Json;
1193
+ effective_date?: string;
1194
+ expiry_date?: string;
1195
+ form_label?: string | null;
1196
+ form_name?: string | null;
1197
+ id?: string;
1198
+ inputs?: import("./db.doc.types").Json | null;
1199
+ inputs_hash?: string | null;
1200
+ notarized_url?: string | null;
1201
+ schema?: import("./db.doc.types").Json | null;
1202
+ schema_hash?: string | null;
1203
+ signatories?: import("./db.doc.types").Json | null;
1204
+ url?: string;
1205
+ verification_code?: string | null;
1206
+ };
1207
+ Relationships: [{
1208
+ foreignKeyName: "signed_documents_base_document_id_fkey";
1209
+ columns: ["base_document_id"];
1210
+ isOneToOne: false;
1211
+ referencedRelation: "base_documents";
1212
+ referencedColumns: ["id"];
1213
+ }];
1214
+ };
1215
+ };
1216
+ Views: { [_ in never]: never; };
1217
+ Functions: { [_ in never]: never; };
1218
+ Enums: {
1219
+ input_type: "text" | "number" | "date" | "select" | "time" | "signature" | "reference" | "checkbox";
1220
+ section: "student" | "entity" | "university" | "student-guardian" | "internship";
1221
+ };
1222
+ CompositeTypes: { [_ in never]: never; };
1223
+ }>;
1224
+ export declare const handleDBError: (error: PostgrestError, description?: string) => never;