@betterinternship/schema.moa 2.3.2 → 2.3.4

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,990 +1,987 @@
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 { Database as _InternshipDatabase, 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 = _InternshipDatabase;
10
- export type DocumentTables<T extends "base_documents" | "base_images" | "signed_documents" | "field_template_registry" | "form_template_registry" | "pending_forms" | "form_groups" | {
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" | "form_processes" | {
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_groups: {
638
- Row: {
639
- description: string;
640
- forms: string[];
641
- id: string;
642
- };
643
- Insert: {
644
- description: string;
645
- forms: string[];
646
- id?: string;
647
- };
648
- Update: {
649
- description?: string;
650
- forms?: string[];
651
- id?: string;
652
- };
653
- Relationships: [];
654
- };
655
- form_template_registry: {
656
- Row: {
657
- base_document_id: string | null;
658
- form_metadata_id: string;
659
- id: string;
660
- label: string | null;
661
- name: string;
662
- time_generated: string | null;
663
- version: number;
664
- };
665
- Insert: {
666
- base_document_id?: string | null;
667
- form_metadata_id?: string;
668
- id?: string;
669
- label?: string | null;
670
- name: string;
671
- time_generated?: string | null;
672
- version?: number;
673
- };
674
- Update: {
675
- base_document_id?: string | null;
676
- form_metadata_id?: string;
677
- id?: string;
678
- label?: string | null;
679
- name?: string;
680
- time_generated?: string | null;
681
- version?: number;
682
- };
683
- Relationships: [{
684
- foreignKeyName: "form_schemas_base_document_id_fkey";
685
- columns: ["base_document_id"];
686
- isOneToOne: false;
687
- referencedRelation: "base_documents";
688
- referencedColumns: ["id"];
689
- }];
690
- };
691
- pending_forms: {
692
- Row: {
693
- audit: import("./db.doc.types").Json | null;
694
- base_document_id: string | null;
695
- date_made: string;
696
- descriptors: import("./db.doc.types").Json;
697
- form_label: string | null;
698
- form_name: string | null;
699
- id: string;
700
- inputs: import("./db.doc.types").Json;
701
- latest_document_url: string | null;
702
- pending_parties: import("./db.doc.types").Json;
703
- signatories: import("./db.doc.types").Json;
704
- subscribers: import("./db.doc.types").Json | null;
705
- version: number | null;
706
- };
707
- Insert: {
708
- audit?: import("./db.doc.types").Json | null;
709
- base_document_id?: string | null;
710
- date_made?: string;
711
- descriptors?: import("./db.doc.types").Json;
712
- form_label?: string | null;
713
- form_name?: string | null;
714
- id?: string;
715
- inputs?: import("./db.doc.types").Json;
716
- latest_document_url?: string | null;
717
- pending_parties?: import("./db.doc.types").Json;
718
- signatories?: import("./db.doc.types").Json;
719
- subscribers?: import("./db.doc.types").Json | null;
720
- version?: number | null;
721
- };
722
- Update: {
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
- Relationships: [{
738
- foreignKeyName: "pending_documents_base_document_id_fkey";
739
- columns: ["base_document_id"];
740
- isOneToOne: false;
741
- referencedRelation: "base_documents";
742
- referencedColumns: ["id"];
743
- }];
744
- };
745
- signed_documents: {
746
- Row: {
747
- base_document_id: string | null;
748
- date_made: string;
749
- descriptors: import("./db.doc.types").Json;
750
- effective_date: string;
751
- expiry_date: string;
752
- form_label: string | null;
753
- form_name: string | null;
754
- id: string;
755
- inputs: import("./db.doc.types").Json | null;
756
- inputs_hash: string | null;
757
- notarized_url: string | null;
758
- schema: import("./db.doc.types").Json | null;
759
- schema_hash: string | null;
760
- signatories: import("./db.doc.types").Json | null;
761
- url: string;
762
- verification_code: string | null;
763
- };
764
- Insert: {
765
- base_document_id?: string | null;
766
- date_made?: string;
767
- descriptors?: import("./db.doc.types").Json;
768
- effective_date: string;
769
- expiry_date: string;
770
- form_label?: string | null;
771
- form_name?: string | null;
772
- id?: string;
773
- inputs?: import("./db.doc.types").Json | null;
774
- inputs_hash?: string | null;
775
- notarized_url?: string | null;
776
- schema?: import("./db.doc.types").Json | null;
777
- schema_hash?: string | null;
778
- signatories?: import("./db.doc.types").Json | null;
779
- url: string;
780
- verification_code?: string | null;
781
- };
782
- Update: {
783
- base_document_id?: string | null;
784
- date_made?: string;
785
- descriptors?: import("./db.doc.types").Json;
786
- effective_date?: string;
787
- expiry_date?: string;
788
- form_label?: string | null;
789
- form_name?: string | null;
790
- id?: string;
791
- inputs?: import("./db.doc.types").Json | null;
792
- inputs_hash?: string | null;
793
- notarized_url?: string | null;
794
- schema?: import("./db.doc.types").Json | null;
795
- schema_hash?: string | null;
796
- signatories?: import("./db.doc.types").Json | null;
797
- url?: string;
798
- verification_code?: string | null;
799
- };
800
- Relationships: [{
801
- foreignKeyName: "signed_documents_base_document_id_fkey";
802
- columns: ["base_document_id"];
803
- isOneToOne: false;
804
- referencedRelation: "base_documents";
805
- referencedColumns: ["id"];
806
- }];
807
- };
808
- };
809
- Views: { [_ in never]: never; };
810
- Functions: { [_ in never]: never; };
811
- Enums: {
812
- input_type: "text" | "number" | "date" | "select" | "time" | "signature" | "reference" | "checkbox";
813
- section: "student" | "entity" | "university" | "student-guardian" | "internship";
814
- };
815
- CompositeTypes: { [_ in never]: never; };
816
- }>;
817
- export declare const internshipDb: import("@supabase/supabase-js").SupabaseClient<_InternshipDatabase, "public", {
818
- Tables: {
819
- coordinator_accounts: {
820
- Row: {
821
- created_at: string;
822
- email: string;
823
- forms: string[];
824
- id: string;
825
- name: string | null;
826
- signatory_account_id: string | null;
827
- };
828
- Insert: {
829
- created_at?: string;
830
- email: string;
831
- forms: string[];
832
- id?: string;
833
- name?: string | null;
834
- signatory_account_id?: string | null;
835
- };
836
- Update: {
837
- created_at?: string;
838
- email?: string;
839
- forms?: string[];
840
- id?: string;
841
- name?: string | null;
842
- signatory_account_id?: string | null;
843
- };
844
- Relationships: [{
845
- foreignKeyName: "coordinator_accounts_signatory_account_id_fkey";
846
- columns: ["signatory_account_id"];
847
- isOneToOne: false;
848
- referencedRelation: "signatory_accounts";
849
- referencedColumns: ["id"];
850
- }];
851
- };
852
- form_processes: {
853
- Row: {
854
- display_information: import("./db.internship.types").Json | null;
855
- form_label: string | null;
856
- form_name: string;
857
- id: string;
858
- initiator_id: string | null;
859
- pending_document_id: string | null;
860
- prefilled_document_id: string | null;
861
- signed_document_id: string | null;
862
- timestamp: string;
863
- };
864
- Insert: {
865
- display_information?: import("./db.internship.types").Json | null;
866
- form_label?: string | null;
867
- form_name: string;
868
- id?: string;
869
- initiator_id?: string | null;
870
- pending_document_id?: string | null;
871
- prefilled_document_id?: string | null;
872
- signed_document_id?: string | null;
873
- timestamp?: string;
874
- };
875
- Update: {
876
- display_information?: import("./db.internship.types").Json | null;
877
- form_label?: string | null;
878
- form_name?: string;
879
- id?: string;
880
- initiator_id?: string | null;
881
- pending_document_id?: string | null;
882
- prefilled_document_id?: string | null;
883
- signed_document_id?: string | null;
884
- timestamp?: string;
885
- };
886
- Relationships: [];
887
- };
888
- gods: {
889
- Row: {
890
- id: string;
891
- signatory_account: string;
892
- };
893
- Insert: {
894
- id?: string;
895
- signatory_account?: string;
896
- };
897
- Update: {
898
- id?: string;
899
- signatory_account?: string;
900
- };
901
- Relationships: [{
902
- foreignKeyName: "gods_signatory_account_fkey";
903
- columns: ["signatory_account"];
904
- isOneToOne: false;
905
- referencedRelation: "signatory_accounts";
906
- referencedColumns: ["id"];
907
- }];
908
- };
909
- signatory_accounts: {
910
- Row: {
911
- auto_form_permissions: import("./db.internship.types").Json | null;
912
- autofill: import("./db.internship.types").Json | null;
913
- created_at: string;
914
- email: string;
915
- honorific: string | null;
916
- id: string;
917
- name: string | null;
918
- title: string | null;
919
- };
920
- Insert: {
921
- auto_form_permissions?: import("./db.internship.types").Json | null;
922
- autofill?: import("./db.internship.types").Json | null;
923
- created_at?: string;
924
- email: string;
925
- honorific?: string | null;
926
- id?: string;
927
- name?: string | null;
928
- title?: string | null;
929
- };
930
- Update: {
931
- auto_form_permissions?: import("./db.internship.types").Json | null;
932
- autofill?: import("./db.internship.types").Json | null;
933
- created_at?: string;
934
- email?: string;
935
- honorific?: string | null;
936
- id?: string;
937
- name?: string | null;
938
- title?: string | null;
939
- };
940
- Relationships: [];
941
- };
942
- signatory_forms: {
943
- Row: {
944
- form_label: string | null;
945
- form_name: string;
946
- form_process_id: string;
947
- form_status: string | null;
948
- id: string;
949
- signatory_id: string | null;
950
- timestamp: string;
951
- };
952
- Insert: {
953
- form_label?: string | null;
954
- form_name: string;
955
- form_process_id: string;
956
- form_status?: string | null;
957
- id?: string;
958
- signatory_id?: string | null;
959
- timestamp?: string;
960
- };
961
- Update: {
962
- form_label?: string | null;
963
- form_name?: string;
964
- form_process_id?: string;
965
- form_status?: string | null;
966
- id?: string;
967
- signatory_id?: string | null;
968
- timestamp?: string;
969
- };
970
- Relationships: [{
971
- foreignKeyName: "signatory_forms_form_process_id_fkey";
972
- columns: ["form_process_id"];
973
- isOneToOne: false;
974
- referencedRelation: "form_processes";
975
- referencedColumns: ["id"];
976
- }, {
977
- foreignKeyName: "signatory_forms_signatory_id_fkey";
978
- columns: ["signatory_id"];
979
- isOneToOne: false;
980
- referencedRelation: "signatory_accounts";
981
- referencedColumns: ["id"];
982
- }];
983
- };
984
- };
985
- Views: { [_ in never]: never; };
986
- Functions: { [_ in never]: never; };
987
- Enums: { [_ in never]: never; };
988
- CompositeTypes: { [_ in never]: never; };
989
- }>;
990
- 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 { Database as _InternshipDatabase, 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 = _InternshipDatabase;
10
+ export type DocumentTables<T extends "base_documents" | "base_images" | "signed_documents" | "field_template_registry" | "form_template_registry" | "pending_forms" | "form_groups" | {
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" | "form_processes" | {
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_groups: {
638
+ Row: {
639
+ description: string;
640
+ forms: string[];
641
+ id: string;
642
+ };
643
+ Insert: {
644
+ description: string;
645
+ forms: string[];
646
+ id?: string;
647
+ };
648
+ Update: {
649
+ description?: string;
650
+ forms?: string[];
651
+ id?: string;
652
+ };
653
+ Relationships: [];
654
+ };
655
+ form_template_registry: {
656
+ Row: {
657
+ base_document_id: string | null;
658
+ form_metadata_id: string | null;
659
+ id: string;
660
+ label: string | null;
661
+ name: string;
662
+ time_generated: string | null;
663
+ version: number;
664
+ };
665
+ Insert: {
666
+ base_document_id?: string | null;
667
+ form_metadata_id?: string | null;
668
+ id?: string;
669
+ label?: string | null;
670
+ name: string;
671
+ time_generated?: string | null;
672
+ version?: number;
673
+ };
674
+ Update: {
675
+ base_document_id?: string | null;
676
+ form_metadata_id?: string | null;
677
+ id?: string;
678
+ label?: string | null;
679
+ name?: string;
680
+ time_generated?: string | null;
681
+ version?: number;
682
+ };
683
+ Relationships: [{
684
+ foreignKeyName: "form_schemas_base_document_id_fkey";
685
+ columns: ["base_document_id"];
686
+ isOneToOne: false;
687
+ referencedRelation: "base_documents";
688
+ referencedColumns: ["id"];
689
+ }];
690
+ };
691
+ pending_forms: {
692
+ Row: {
693
+ audit: import("./db.doc.types").Json | null;
694
+ base_document_id: string | null;
695
+ date_made: string;
696
+ descriptors: import("./db.doc.types").Json;
697
+ form_label: string | null;
698
+ form_name: string | null;
699
+ id: string;
700
+ inputs: import("./db.doc.types").Json;
701
+ latest_document_url: string | null;
702
+ signing_parties: import("./db.doc.types").Json;
703
+ subscribers: import("./db.doc.types").Json | null;
704
+ version: number | null;
705
+ };
706
+ Insert: {
707
+ audit?: import("./db.doc.types").Json | null;
708
+ base_document_id?: string | null;
709
+ date_made?: string;
710
+ descriptors?: import("./db.doc.types").Json;
711
+ form_label?: string | null;
712
+ form_name?: string | null;
713
+ id?: string;
714
+ inputs?: import("./db.doc.types").Json;
715
+ latest_document_url?: string | null;
716
+ signing_parties?: import("./db.doc.types").Json;
717
+ subscribers?: import("./db.doc.types").Json | null;
718
+ version?: number | null;
719
+ };
720
+ Update: {
721
+ audit?: import("./db.doc.types").Json | null;
722
+ base_document_id?: string | null;
723
+ date_made?: string;
724
+ descriptors?: import("./db.doc.types").Json;
725
+ form_label?: string | null;
726
+ form_name?: string | null;
727
+ id?: string;
728
+ inputs?: import("./db.doc.types").Json;
729
+ latest_document_url?: string | null;
730
+ signing_parties?: import("./db.doc.types").Json;
731
+ subscribers?: import("./db.doc.types").Json | null;
732
+ version?: number | null;
733
+ };
734
+ Relationships: [{
735
+ foreignKeyName: "pending_documents_base_document_id_fkey";
736
+ columns: ["base_document_id"];
737
+ isOneToOne: false;
738
+ referencedRelation: "base_documents";
739
+ referencedColumns: ["id"];
740
+ }];
741
+ };
742
+ signed_documents: {
743
+ Row: {
744
+ base_document_id: string | null;
745
+ date_made: string;
746
+ descriptors: import("./db.doc.types").Json;
747
+ effective_date: string | null;
748
+ expiry_date: string | null;
749
+ form_label: string | null;
750
+ form_name: string | null;
751
+ id: string;
752
+ inputs: import("./db.doc.types").Json | null;
753
+ inputs_hash: string | null;
754
+ notarized_url: string | null;
755
+ schema: import("./db.doc.types").Json | null;
756
+ schema_hash: string | null;
757
+ signatories: import("./db.doc.types").Json | null;
758
+ url: string;
759
+ verification_code: string | null;
760
+ };
761
+ Insert: {
762
+ base_document_id?: string | null;
763
+ date_made?: string;
764
+ descriptors?: import("./db.doc.types").Json;
765
+ effective_date?: string | null;
766
+ expiry_date?: string | null;
767
+ form_label?: string | null;
768
+ form_name?: string | null;
769
+ id?: string;
770
+ inputs?: import("./db.doc.types").Json | null;
771
+ inputs_hash?: string | null;
772
+ notarized_url?: string | null;
773
+ schema?: import("./db.doc.types").Json | null;
774
+ schema_hash?: string | null;
775
+ signatories?: import("./db.doc.types").Json | null;
776
+ url: string;
777
+ verification_code?: string | null;
778
+ };
779
+ Update: {
780
+ base_document_id?: string | null;
781
+ date_made?: string;
782
+ descriptors?: import("./db.doc.types").Json;
783
+ effective_date?: string | null;
784
+ expiry_date?: string | null;
785
+ form_label?: string | null;
786
+ form_name?: string | null;
787
+ id?: string;
788
+ inputs?: import("./db.doc.types").Json | null;
789
+ inputs_hash?: string | null;
790
+ notarized_url?: string | null;
791
+ schema?: import("./db.doc.types").Json | null;
792
+ schema_hash?: string | null;
793
+ signatories?: import("./db.doc.types").Json | null;
794
+ url?: string;
795
+ verification_code?: string | null;
796
+ };
797
+ Relationships: [{
798
+ foreignKeyName: "signed_documents_base_document_id_fkey";
799
+ columns: ["base_document_id"];
800
+ isOneToOne: false;
801
+ referencedRelation: "base_documents";
802
+ referencedColumns: ["id"];
803
+ }];
804
+ };
805
+ };
806
+ Views: { [_ in never]: never; };
807
+ Functions: { [_ in never]: never; };
808
+ Enums: {
809
+ input_type: "text" | "number" | "date" | "select" | "time" | "signature" | "reference" | "checkbox";
810
+ section: "student" | "entity" | "university" | "student-guardian" | "internship";
811
+ };
812
+ CompositeTypes: { [_ in never]: never; };
813
+ }>;
814
+ export declare const internshipDb: import("@supabase/supabase-js").SupabaseClient<_InternshipDatabase, "public", {
815
+ Tables: {
816
+ coordinator_accounts: {
817
+ Row: {
818
+ created_at: string;
819
+ email: string;
820
+ forms: string[];
821
+ id: string;
822
+ name: string | null;
823
+ signatory_account_id: string | null;
824
+ };
825
+ Insert: {
826
+ created_at?: string;
827
+ email: string;
828
+ forms: string[];
829
+ id?: string;
830
+ name?: string | null;
831
+ signatory_account_id?: string | null;
832
+ };
833
+ Update: {
834
+ created_at?: string;
835
+ email?: string;
836
+ forms?: string[];
837
+ id?: string;
838
+ name?: string | null;
839
+ signatory_account_id?: string | null;
840
+ };
841
+ Relationships: [{
842
+ foreignKeyName: "coordinator_accounts_signatory_account_id_fkey";
843
+ columns: ["signatory_account_id"];
844
+ isOneToOne: false;
845
+ referencedRelation: "signatory_accounts";
846
+ referencedColumns: ["id"];
847
+ }];
848
+ };
849
+ form_processes: {
850
+ Row: {
851
+ display_information: import("./db.internship.types").Json | null;
852
+ form_label: string | null;
853
+ form_name: string;
854
+ id: string;
855
+ initiator_id: string | null;
856
+ pending_document_id: string | null;
857
+ prefilled_document_id: string | null;
858
+ signed_document_id: string | null;
859
+ timestamp: string;
860
+ };
861
+ Insert: {
862
+ display_information?: import("./db.internship.types").Json | null;
863
+ form_label?: string | null;
864
+ form_name: string;
865
+ id?: string;
866
+ initiator_id?: string | null;
867
+ pending_document_id?: string | null;
868
+ prefilled_document_id?: string | null;
869
+ signed_document_id?: string | null;
870
+ timestamp?: string;
871
+ };
872
+ Update: {
873
+ display_information?: import("./db.internship.types").Json | null;
874
+ form_label?: string | null;
875
+ form_name?: string;
876
+ id?: string;
877
+ initiator_id?: string | null;
878
+ pending_document_id?: string | null;
879
+ prefilled_document_id?: string | null;
880
+ signed_document_id?: string | null;
881
+ timestamp?: string;
882
+ };
883
+ Relationships: [];
884
+ };
885
+ gods: {
886
+ Row: {
887
+ id: string;
888
+ signatory_account: string;
889
+ };
890
+ Insert: {
891
+ id?: string;
892
+ signatory_account?: string;
893
+ };
894
+ Update: {
895
+ id?: string;
896
+ signatory_account?: string;
897
+ };
898
+ Relationships: [{
899
+ foreignKeyName: "gods_signatory_account_fkey";
900
+ columns: ["signatory_account"];
901
+ isOneToOne: false;
902
+ referencedRelation: "signatory_accounts";
903
+ referencedColumns: ["id"];
904
+ }];
905
+ };
906
+ signatory_accounts: {
907
+ Row: {
908
+ auto_form_permissions: import("./db.internship.types").Json | null;
909
+ autofill: import("./db.internship.types").Json | null;
910
+ created_at: string;
911
+ email: string;
912
+ honorific: string | null;
913
+ id: string;
914
+ name: string | null;
915
+ title: string | null;
916
+ };
917
+ Insert: {
918
+ auto_form_permissions?: import("./db.internship.types").Json | null;
919
+ autofill?: import("./db.internship.types").Json | null;
920
+ created_at?: string;
921
+ email: string;
922
+ honorific?: string | null;
923
+ id?: string;
924
+ name?: string | null;
925
+ title?: string | null;
926
+ };
927
+ Update: {
928
+ auto_form_permissions?: import("./db.internship.types").Json | null;
929
+ autofill?: import("./db.internship.types").Json | null;
930
+ created_at?: string;
931
+ email?: string;
932
+ honorific?: string | null;
933
+ id?: string;
934
+ name?: string | null;
935
+ title?: string | null;
936
+ };
937
+ Relationships: [];
938
+ };
939
+ signatory_forms: {
940
+ Row: {
941
+ form_label: string | null;
942
+ form_name: string;
943
+ form_process_id: string;
944
+ form_status: string | null;
945
+ id: string;
946
+ signatory_id: string | null;
947
+ timestamp: string;
948
+ };
949
+ Insert: {
950
+ form_label?: string | null;
951
+ form_name: string;
952
+ form_process_id: string;
953
+ form_status?: string | null;
954
+ id?: string;
955
+ signatory_id?: string | null;
956
+ timestamp?: string;
957
+ };
958
+ Update: {
959
+ form_label?: string | null;
960
+ form_name?: string;
961
+ form_process_id?: string;
962
+ form_status?: string | null;
963
+ id?: string;
964
+ signatory_id?: string | null;
965
+ timestamp?: string;
966
+ };
967
+ Relationships: [{
968
+ foreignKeyName: "signatory_forms_form_process_id_fkey";
969
+ columns: ["form_process_id"];
970
+ isOneToOne: false;
971
+ referencedRelation: "form_processes";
972
+ referencedColumns: ["id"];
973
+ }, {
974
+ foreignKeyName: "signatory_forms_signatory_id_fkey";
975
+ columns: ["signatory_id"];
976
+ isOneToOne: false;
977
+ referencedRelation: "signatory_accounts";
978
+ referencedColumns: ["id"];
979
+ }];
980
+ };
981
+ };
982
+ Views: { [_ in never]: never; };
983
+ Functions: { [_ in never]: never; };
984
+ Enums: { [_ in never]: never; };
985
+ CompositeTypes: { [_ in never]: never; };
986
+ }>;
987
+ export declare const handleDBError: (error: PostgrestError, description?: string) => never;