@betterinternship/schema.moa 2.3.6 → 2.3.8

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,1040 +1,1073 @@
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", "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
- PostgrestVersion: "13.0.4";
313
- }>;
314
- export declare const schoolDb: import("@supabase/supabase-js").SupabaseClient<_SchoolDatabase, "public", "public", {
315
- Tables: {
316
- moa_histories: {
317
- Row: {
318
- entity_id: string;
319
- history: import("./db.uni.types").Json | null;
320
- id: string;
321
- school_id: string;
322
- };
323
- Insert: {
324
- entity_id: string;
325
- history?: import("./db.uni.types").Json | null;
326
- id?: string;
327
- school_id?: string;
328
- };
329
- Update: {
330
- entity_id?: string;
331
- history?: import("./db.uni.types").Json | null;
332
- id?: string;
333
- school_id?: string;
334
- };
335
- Relationships: [{
336
- foreignKeyName: "moa_histories_school_id_fkey";
337
- columns: ["school_id"];
338
- isOneToOne: false;
339
- referencedRelation: "schools";
340
- referencedColumns: ["id"];
341
- }];
342
- };
343
- private_entity_notes: {
344
- Row: {
345
- author_school_account_id: string;
346
- entity_id: string;
347
- id: string;
348
- message: string;
349
- timestamp: string;
350
- };
351
- Insert: {
352
- author_school_account_id: string;
353
- entity_id: string;
354
- id?: string;
355
- message: string;
356
- timestamp?: string;
357
- };
358
- Update: {
359
- author_school_account_id?: string;
360
- entity_id?: string;
361
- id?: string;
362
- message?: string;
363
- timestamp?: string;
364
- };
365
- Relationships: [{
366
- foreignKeyName: "private_entity_notes_author_school_account_id_fkey";
367
- columns: ["author_school_account_id"];
368
- isOneToOne: false;
369
- referencedRelation: "school_accounts";
370
- referencedColumns: ["id"];
371
- }];
372
- };
373
- school_accounts: {
374
- Row: {
375
- created_at: string;
376
- email: string;
377
- id: string;
378
- name: string;
379
- password: string | null;
380
- receive_moa_requests: boolean;
381
- receive_new_entity_requests: boolean;
382
- role: string;
383
- school_id: string;
384
- };
385
- Insert: {
386
- created_at?: string;
387
- email?: string;
388
- id?: string;
389
- name: string;
390
- password?: string | null;
391
- receive_moa_requests?: boolean;
392
- receive_new_entity_requests?: boolean;
393
- role?: string;
394
- school_id: string;
395
- };
396
- Update: {
397
- created_at?: string;
398
- email?: string;
399
- id?: string;
400
- name?: string;
401
- password?: string | null;
402
- receive_moa_requests?: boolean;
403
- receive_new_entity_requests?: boolean;
404
- role?: string;
405
- school_id?: string;
406
- };
407
- Relationships: [{
408
- foreignKeyName: "school_accounts_school_id_fkey";
409
- columns: ["school_id"];
410
- isOneToOne: false;
411
- referencedRelation: "schools";
412
- referencedColumns: ["id"];
413
- }];
414
- };
415
- school_entities: {
416
- Row: {
417
- entity_id: string;
418
- id: string;
419
- school_id: string;
420
- status: string;
421
- };
422
- Insert: {
423
- entity_id: string;
424
- id?: string;
425
- school_id: string;
426
- status: string;
427
- };
428
- Update: {
429
- entity_id?: string;
430
- id?: string;
431
- school_id?: string;
432
- status?: string;
433
- };
434
- Relationships: [{
435
- foreignKeyName: "school_entities_school_id_fkey";
436
- columns: ["school_id"];
437
- isOneToOne: false;
438
- referencedRelation: "schools";
439
- referencedColumns: ["id"];
440
- }];
441
- };
442
- school_logs: {
443
- Row: {
444
- entity_id: string | null;
445
- id: number;
446
- school_account_id: string;
447
- timestamp: string;
448
- update_type: string;
449
- };
450
- Insert: {
451
- entity_id?: string | null;
452
- id?: number;
453
- school_account_id: string;
454
- timestamp?: string;
455
- update_type: string;
456
- };
457
- Update: {
458
- entity_id?: string | null;
459
- id?: number;
460
- school_account_id?: string;
461
- timestamp?: string;
462
- update_type?: string;
463
- };
464
- Relationships: [{
465
- foreignKeyName: "school_logs_school_account_id_fkey";
466
- columns: ["school_account_id"];
467
- isOneToOne: false;
468
- referencedRelation: "school_accounts";
469
- referencedColumns: ["id"];
470
- }];
471
- };
472
- school_sessions: {
473
- Row: {
474
- id: string;
475
- school_id: string;
476
- timestamp: string;
477
- };
478
- Insert: {
479
- id?: string;
480
- school_id: string;
481
- timestamp?: string;
482
- };
483
- Update: {
484
- id?: string;
485
- school_id?: string;
486
- timestamp?: string;
487
- };
488
- Relationships: [{
489
- foreignKeyName: "school_sessions_school_id_fkey";
490
- columns: ["school_id"];
491
- isOneToOne: false;
492
- referencedRelation: "schools";
493
- referencedColumns: ["id"];
494
- }];
495
- };
496
- schools: {
497
- Row: {
498
- created_at: string;
499
- domain: string;
500
- full_name: string;
501
- id: string;
502
- short_name: string;
503
- };
504
- Insert: {
505
- created_at?: string;
506
- domain: string;
507
- full_name: string;
508
- id?: string;
509
- short_name: string;
510
- };
511
- Update: {
512
- created_at?: string;
513
- domain?: string;
514
- full_name?: string;
515
- id?: string;
516
- short_name?: string;
517
- };
518
- Relationships: [];
519
- };
520
- };
521
- Views: { [_ in never]: never; };
522
- Functions: { [_ in never]: never; };
523
- Enums: { [_ in never]: never; };
524
- CompositeTypes: { [_ in never]: never; };
525
- }, {
526
- PostgrestVersion: "13.0.4";
527
- }>;
528
- export declare const documentDb: import("@supabase/supabase-js").SupabaseClient<_DocumentDatabase, "public", "public", {
529
- Tables: {
530
- base_documents: {
531
- Row: {
532
- created_at: string;
533
- id: string;
534
- name: string;
535
- url: string;
536
- };
537
- Insert: {
538
- created_at?: string;
539
- id?: string;
540
- name: string;
541
- url: string;
542
- };
543
- Update: {
544
- created_at?: string;
545
- id?: string;
546
- name?: string;
547
- url?: string;
548
- };
549
- Relationships: [];
550
- };
551
- base_images: {
552
- Row: {
553
- filename: string;
554
- id: string;
555
- source_text: string;
556
- url: string;
557
- };
558
- Insert: {
559
- filename: string;
560
- id?: string;
561
- source_text: string;
562
- url: string;
563
- };
564
- Update: {
565
- filename?: string;
566
- id?: string;
567
- source_text?: string;
568
- url?: string;
569
- };
570
- Relationships: [];
571
- };
572
- external_documents: {
573
- Row: {
574
- effective_date: string | null;
575
- expiry_date: string | null;
576
- id: string;
577
- uploaded_at: string;
578
- url: string;
579
- };
580
- Insert: {
581
- effective_date?: string | null;
582
- expiry_date?: string | null;
583
- id?: string;
584
- uploaded_at?: string;
585
- url: string;
586
- };
587
- Update: {
588
- effective_date?: string | null;
589
- expiry_date?: string | null;
590
- id?: string;
591
- uploaded_at?: string;
592
- url?: string;
593
- };
594
- Relationships: [];
595
- };
596
- field_template_registry: {
597
- Row: {
598
- id: string;
599
- is_phantom: boolean;
600
- label: string;
601
- name: string;
602
- party: string | null;
603
- prefiller: string | null;
604
- preset: string;
605
- shared: boolean;
606
- source: string;
607
- tooltip_label: string | null;
608
- type: string;
609
- validator: string | null;
610
- };
611
- Insert: {
612
- id?: string;
613
- is_phantom?: boolean;
614
- label: string;
615
- name: string;
616
- party?: string | null;
617
- prefiller?: string | null;
618
- preset?: string;
619
- shared?: boolean;
620
- source: string;
621
- tooltip_label?: string | null;
622
- type?: string;
623
- validator?: string | null;
624
- };
625
- Update: {
626
- id?: string;
627
- is_phantom?: boolean;
628
- label?: string;
629
- name?: string;
630
- party?: string | null;
631
- prefiller?: string | null;
632
- preset?: string;
633
- shared?: boolean;
634
- source?: string;
635
- tooltip_label?: string | null;
636
- type?: string;
637
- validator?: string | null;
638
- };
639
- Relationships: [];
640
- };
641
- form_groups: {
642
- Row: {
643
- description: string;
644
- forms: string[];
645
- id: string;
646
- };
647
- Insert: {
648
- description: string;
649
- forms: string[];
650
- id?: string;
651
- };
652
- Update: {
653
- description?: string;
654
- forms?: string[];
655
- id?: string;
656
- };
657
- Relationships: [];
658
- };
659
- form_template_registry: {
660
- Row: {
661
- base_document_id: string | null;
662
- form_metadata_id: string | null;
663
- id: string;
664
- label: string | null;
665
- name: string;
666
- time_generated: string | null;
667
- version: number;
668
- };
669
- Insert: {
670
- base_document_id?: string | null;
671
- form_metadata_id?: string | null;
672
- id?: string;
673
- label?: string | null;
674
- name: string;
675
- time_generated?: string | null;
676
- version?: number;
677
- };
678
- Update: {
679
- base_document_id?: string | null;
680
- form_metadata_id?: string | null;
681
- id?: string;
682
- label?: string | null;
683
- name?: string;
684
- time_generated?: string | null;
685
- version?: number;
686
- };
687
- Relationships: [{
688
- foreignKeyName: "form_schemas_base_document_id_fkey";
689
- columns: ["base_document_id"];
690
- isOneToOne: false;
691
- referencedRelation: "base_documents";
692
- referencedColumns: ["id"];
693
- }];
694
- };
695
- pending_forms: {
696
- Row: {
697
- audit: import("./db.doc.types").Json | null;
698
- base_document_id: string | null;
699
- date_made: string;
700
- descriptors: import("./db.doc.types").Json;
701
- form_label: string | null;
702
- form_name: string | null;
703
- id: string;
704
- inputs: import("./db.doc.types").Json;
705
- latest_document_url: string | null;
706
- signing_parties: import("./db.doc.types").Json;
707
- subscribers: import("./db.doc.types").Json | null;
708
- version: number | null;
709
- };
710
- Insert: {
711
- audit?: import("./db.doc.types").Json | null;
712
- base_document_id?: string | null;
713
- date_made?: string;
714
- descriptors?: import("./db.doc.types").Json;
715
- form_label?: string | null;
716
- form_name?: string | null;
717
- id?: string;
718
- inputs?: import("./db.doc.types").Json;
719
- latest_document_url?: string | null;
720
- signing_parties?: import("./db.doc.types").Json;
721
- subscribers?: import("./db.doc.types").Json | null;
722
- version?: number | null;
723
- };
724
- Update: {
725
- audit?: import("./db.doc.types").Json | null;
726
- base_document_id?: string | null;
727
- date_made?: string;
728
- descriptors?: import("./db.doc.types").Json;
729
- form_label?: string | null;
730
- form_name?: string | null;
731
- id?: string;
732
- inputs?: import("./db.doc.types").Json;
733
- latest_document_url?: string | null;
734
- signing_parties?: import("./db.doc.types").Json;
735
- subscribers?: import("./db.doc.types").Json | null;
736
- version?: number | null;
737
- };
738
- Relationships: [{
739
- foreignKeyName: "pending_documents_base_document_id_fkey";
740
- columns: ["base_document_id"];
741
- isOneToOne: false;
742
- referencedRelation: "base_documents";
743
- referencedColumns: ["id"];
744
- }];
745
- };
746
- signed_documents: {
747
- Row: {
748
- base_document_id: string | null;
749
- date_made: string;
750
- descriptors: import("./db.doc.types").Json;
751
- effective_date: string | null;
752
- expiry_date: string | null;
753
- form_label: string | null;
754
- form_name: string | null;
755
- id: string;
756
- inputs: import("./db.doc.types").Json | null;
757
- inputs_hash: string | null;
758
- notarized_url: string | null;
759
- schema: import("./db.doc.types").Json | null;
760
- schema_hash: string | null;
761
- signatories: import("./db.doc.types").Json | null;
762
- url: string;
763
- verification_code: string | null;
764
- };
765
- Insert: {
766
- base_document_id?: string | null;
767
- date_made?: string;
768
- descriptors?: import("./db.doc.types").Json;
769
- effective_date?: string | null;
770
- expiry_date?: string | null;
771
- form_label?: string | null;
772
- form_name?: string | null;
773
- id?: string;
774
- inputs?: import("./db.doc.types").Json | null;
775
- inputs_hash?: string | null;
776
- notarized_url?: string | null;
777
- schema?: import("./db.doc.types").Json | null;
778
- schema_hash?: string | null;
779
- signatories?: import("./db.doc.types").Json | null;
780
- url: string;
781
- verification_code?: string | null;
782
- };
783
- Update: {
784
- base_document_id?: string | null;
785
- date_made?: string;
786
- descriptors?: import("./db.doc.types").Json;
787
- effective_date?: string | null;
788
- expiry_date?: string | null;
789
- form_label?: string | null;
790
- form_name?: string | null;
791
- id?: string;
792
- inputs?: import("./db.doc.types").Json | null;
793
- inputs_hash?: string | null;
794
- notarized_url?: string | null;
795
- schema?: import("./db.doc.types").Json | null;
796
- schema_hash?: string | null;
797
- signatories?: import("./db.doc.types").Json | null;
798
- url?: string;
799
- verification_code?: string | null;
800
- };
801
- Relationships: [{
802
- foreignKeyName: "signed_documents_base_document_id_fkey";
803
- columns: ["base_document_id"];
804
- isOneToOne: false;
805
- referencedRelation: "base_documents";
806
- referencedColumns: ["id"];
807
- }];
808
- };
809
- };
810
- Views: { [_ in never]: never; };
811
- Functions: { [_ in never]: never; };
812
- Enums: {
813
- input_type: "text" | "number" | "date" | "select" | "time" | "signature" | "reference" | "checkbox";
814
- section: "student" | "entity" | "university" | "student-guardian" | "internship";
815
- };
816
- CompositeTypes: { [_ in never]: never; };
817
- }, {
818
- PostgrestVersion: "13.0.5";
819
- }>;
820
- export declare const internshipDb: import("@supabase/supabase-js").SupabaseClient<_InternshipDatabase, "public", "public", {
821
- Tables: {
822
- coordinator_accounts: {
823
- Row: {
824
- created_at: string;
825
- email: string;
826
- forms: string[];
827
- id: string;
828
- name: string | null;
829
- signatory_account_id: string | null;
830
- };
831
- Insert: {
832
- created_at?: string;
833
- email: string;
834
- forms: string[];
835
- id?: string;
836
- name?: string | null;
837
- signatory_account_id?: string | null;
838
- };
839
- Update: {
840
- created_at?: string;
841
- email?: string;
842
- forms?: string[];
843
- id?: string;
844
- name?: string | null;
845
- signatory_account_id?: string | null;
846
- };
847
- Relationships: [{
848
- foreignKeyName: "coordinator_accounts_signatory_account_id_fkey";
849
- columns: ["signatory_account_id"];
850
- isOneToOne: false;
851
- referencedRelation: "signatory_accounts";
852
- referencedColumns: ["id"];
853
- }];
854
- };
855
- form_processes: {
856
- Row: {
857
- created_at: string;
858
- display_information: import("./db.internship.types").Json | null;
859
- form_inputs: import("./db.internship.types").Json | null;
860
- form_label: string | null;
861
- form_name: string;
862
- form_version: number;
863
- id: string;
864
- initiator_id: string | null;
865
- latest_document_url: string | null;
866
- pending_document_id: string | null;
867
- prefilled_document_id: string | null;
868
- signed_document_id: string | null;
869
- signing_parties: import("./db.internship.types").Json;
870
- subscribers: import("./db.internship.types").Json;
871
- timestamp: string;
872
- };
873
- Insert: {
874
- created_at?: string;
875
- display_information?: import("./db.internship.types").Json | null;
876
- form_inputs?: import("./db.internship.types").Json | null;
877
- form_label?: string | null;
878
- form_name: string;
879
- form_version?: number;
880
- id?: string;
881
- initiator_id?: string | null;
882
- latest_document_url?: string | null;
883
- pending_document_id?: string | null;
884
- prefilled_document_id?: string | null;
885
- signed_document_id?: string | null;
886
- signing_parties?: import("./db.internship.types").Json;
887
- subscribers?: import("./db.internship.types").Json;
888
- timestamp?: string;
889
- };
890
- Update: {
891
- created_at?: string;
892
- display_information?: import("./db.internship.types").Json | null;
893
- form_inputs?: import("./db.internship.types").Json | null;
894
- form_label?: string | null;
895
- form_name?: string;
896
- form_version?: number;
897
- id?: string;
898
- initiator_id?: string | null;
899
- latest_document_url?: string | null;
900
- pending_document_id?: string | null;
901
- prefilled_document_id?: string | null;
902
- signed_document_id?: string | null;
903
- signing_parties?: import("./db.internship.types").Json;
904
- subscribers?: import("./db.internship.types").Json;
905
- timestamp?: string;
906
- };
907
- Relationships: [];
908
- };
909
- gods: {
910
- Row: {
911
- id: string;
912
- signatory_account: string;
913
- };
914
- Insert: {
915
- id?: string;
916
- signatory_account?: string;
917
- };
918
- Update: {
919
- id?: string;
920
- signatory_account?: string;
921
- };
922
- Relationships: [{
923
- foreignKeyName: "gods_signatory_account_fkey";
924
- columns: ["signatory_account"];
925
- isOneToOne: false;
926
- referencedRelation: "signatory_accounts";
927
- referencedColumns: ["id"];
928
- }];
929
- };
930
- signatory_accounts: {
931
- Row: {
932
- auto_form_permissions: import("./db.internship.types").Json | null;
933
- autofill: import("./db.internship.types").Json | null;
934
- created_at: string;
935
- email: string;
936
- honorific: string | null;
937
- id: string;
938
- name: string | null;
939
- title: string | null;
940
- };
941
- Insert: {
942
- auto_form_permissions?: import("./db.internship.types").Json | null;
943
- autofill?: import("./db.internship.types").Json | null;
944
- created_at?: string;
945
- email: string;
946
- honorific?: string | null;
947
- id?: string;
948
- name?: string | null;
949
- title?: string | null;
950
- };
951
- Update: {
952
- auto_form_permissions?: import("./db.internship.types").Json | null;
953
- autofill?: import("./db.internship.types").Json | null;
954
- created_at?: string;
955
- email?: string;
956
- honorific?: string | null;
957
- id?: string;
958
- name?: string | null;
959
- title?: string | null;
960
- };
961
- Relationships: [];
962
- };
963
- signatory_audits: {
964
- Row: {
965
- audit: import("./db.internship.types").Json;
966
- created_at: string;
967
- id: string;
968
- signatory_id: string;
969
- };
970
- Insert: {
971
- audit?: import("./db.internship.types").Json;
972
- created_at?: string;
973
- id?: string;
974
- signatory_id: string;
975
- };
976
- Update: {
977
- audit?: import("./db.internship.types").Json;
978
- created_at?: string;
979
- id?: string;
980
- signatory_id?: string;
981
- };
982
- Relationships: [{
983
- foreignKeyName: "signatory_audits_signatory_id_fkey";
984
- columns: ["signatory_id"];
985
- isOneToOne: false;
986
- referencedRelation: "signatory_accounts";
987
- referencedColumns: ["id"];
988
- }];
989
- };
990
- signatory_forms: {
991
- Row: {
992
- form_label: string | null;
993
- form_name: string;
994
- form_process_id: string;
995
- form_process_status: string | null;
996
- id: string;
997
- signatory_id: string | null;
998
- timestamp: string;
999
- };
1000
- Insert: {
1001
- form_label?: string | null;
1002
- form_name: string;
1003
- form_process_id: string;
1004
- form_process_status?: string | null;
1005
- id?: string;
1006
- signatory_id?: string | null;
1007
- timestamp?: string;
1008
- };
1009
- Update: {
1010
- form_label?: string | null;
1011
- form_name?: string;
1012
- form_process_id?: string;
1013
- form_process_status?: string | null;
1014
- id?: string;
1015
- signatory_id?: string | null;
1016
- timestamp?: string;
1017
- };
1018
- Relationships: [{
1019
- foreignKeyName: "signatory_forms_form_process_id_fkey";
1020
- columns: ["form_process_id"];
1021
- isOneToOne: false;
1022
- referencedRelation: "form_processes";
1023
- referencedColumns: ["id"];
1024
- }, {
1025
- foreignKeyName: "signatory_forms_signatory_id_fkey";
1026
- columns: ["signatory_id"];
1027
- isOneToOne: false;
1028
- referencedRelation: "signatory_accounts";
1029
- referencedColumns: ["id"];
1030
- }];
1031
- };
1032
- };
1033
- Views: { [_ in never]: never; };
1034
- Functions: { [_ in never]: never; };
1035
- Enums: { [_ in never]: never; };
1036
- CompositeTypes: { [_ in never]: never; };
1037
- }, {
1038
- PostgrestVersion: "13.0.5";
1039
- }>;
1040
- 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" | "signatory_audits" | "signatory_keyring" | {
20
+ schema: "public";
21
+ }> = _InternshipTables<T>;
22
+ export declare const entityDb: import("@supabase/supabase-js").SupabaseClient<_EntityDatabase, "public", "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
+ PostgrestVersion: "13.0.4";
313
+ }>;
314
+ export declare const schoolDb: import("@supabase/supabase-js").SupabaseClient<_SchoolDatabase, "public", "public", {
315
+ Tables: {
316
+ moa_histories: {
317
+ Row: {
318
+ entity_id: string;
319
+ history: import("./db.uni.types").Json | null;
320
+ id: string;
321
+ school_id: string;
322
+ };
323
+ Insert: {
324
+ entity_id: string;
325
+ history?: import("./db.uni.types").Json | null;
326
+ id?: string;
327
+ school_id?: string;
328
+ };
329
+ Update: {
330
+ entity_id?: string;
331
+ history?: import("./db.uni.types").Json | null;
332
+ id?: string;
333
+ school_id?: string;
334
+ };
335
+ Relationships: [{
336
+ foreignKeyName: "moa_histories_school_id_fkey";
337
+ columns: ["school_id"];
338
+ isOneToOne: false;
339
+ referencedRelation: "schools";
340
+ referencedColumns: ["id"];
341
+ }];
342
+ };
343
+ private_entity_notes: {
344
+ Row: {
345
+ author_school_account_id: string;
346
+ entity_id: string;
347
+ id: string;
348
+ message: string;
349
+ timestamp: string;
350
+ };
351
+ Insert: {
352
+ author_school_account_id: string;
353
+ entity_id: string;
354
+ id?: string;
355
+ message: string;
356
+ timestamp?: string;
357
+ };
358
+ Update: {
359
+ author_school_account_id?: string;
360
+ entity_id?: string;
361
+ id?: string;
362
+ message?: string;
363
+ timestamp?: string;
364
+ };
365
+ Relationships: [{
366
+ foreignKeyName: "private_entity_notes_author_school_account_id_fkey";
367
+ columns: ["author_school_account_id"];
368
+ isOneToOne: false;
369
+ referencedRelation: "school_accounts";
370
+ referencedColumns: ["id"];
371
+ }];
372
+ };
373
+ school_accounts: {
374
+ Row: {
375
+ created_at: string;
376
+ email: string;
377
+ id: string;
378
+ name: string;
379
+ password: string | null;
380
+ receive_moa_requests: boolean;
381
+ receive_new_entity_requests: boolean;
382
+ role: string;
383
+ school_id: string;
384
+ };
385
+ Insert: {
386
+ created_at?: string;
387
+ email?: string;
388
+ id?: string;
389
+ name: string;
390
+ password?: string | null;
391
+ receive_moa_requests?: boolean;
392
+ receive_new_entity_requests?: boolean;
393
+ role?: string;
394
+ school_id: string;
395
+ };
396
+ Update: {
397
+ created_at?: string;
398
+ email?: string;
399
+ id?: string;
400
+ name?: string;
401
+ password?: string | null;
402
+ receive_moa_requests?: boolean;
403
+ receive_new_entity_requests?: boolean;
404
+ role?: string;
405
+ school_id?: string;
406
+ };
407
+ Relationships: [{
408
+ foreignKeyName: "school_accounts_school_id_fkey";
409
+ columns: ["school_id"];
410
+ isOneToOne: false;
411
+ referencedRelation: "schools";
412
+ referencedColumns: ["id"];
413
+ }];
414
+ };
415
+ school_entities: {
416
+ Row: {
417
+ entity_id: string;
418
+ id: string;
419
+ school_id: string;
420
+ status: string;
421
+ };
422
+ Insert: {
423
+ entity_id: string;
424
+ id?: string;
425
+ school_id: string;
426
+ status: string;
427
+ };
428
+ Update: {
429
+ entity_id?: string;
430
+ id?: string;
431
+ school_id?: string;
432
+ status?: string;
433
+ };
434
+ Relationships: [{
435
+ foreignKeyName: "school_entities_school_id_fkey";
436
+ columns: ["school_id"];
437
+ isOneToOne: false;
438
+ referencedRelation: "schools";
439
+ referencedColumns: ["id"];
440
+ }];
441
+ };
442
+ school_logs: {
443
+ Row: {
444
+ entity_id: string | null;
445
+ id: number;
446
+ school_account_id: string;
447
+ timestamp: string;
448
+ update_type: string;
449
+ };
450
+ Insert: {
451
+ entity_id?: string | null;
452
+ id?: number;
453
+ school_account_id: string;
454
+ timestamp?: string;
455
+ update_type: string;
456
+ };
457
+ Update: {
458
+ entity_id?: string | null;
459
+ id?: number;
460
+ school_account_id?: string;
461
+ timestamp?: string;
462
+ update_type?: string;
463
+ };
464
+ Relationships: [{
465
+ foreignKeyName: "school_logs_school_account_id_fkey";
466
+ columns: ["school_account_id"];
467
+ isOneToOne: false;
468
+ referencedRelation: "school_accounts";
469
+ referencedColumns: ["id"];
470
+ }];
471
+ };
472
+ school_sessions: {
473
+ Row: {
474
+ id: string;
475
+ school_id: string;
476
+ timestamp: string;
477
+ };
478
+ Insert: {
479
+ id?: string;
480
+ school_id: string;
481
+ timestamp?: string;
482
+ };
483
+ Update: {
484
+ id?: string;
485
+ school_id?: string;
486
+ timestamp?: string;
487
+ };
488
+ Relationships: [{
489
+ foreignKeyName: "school_sessions_school_id_fkey";
490
+ columns: ["school_id"];
491
+ isOneToOne: false;
492
+ referencedRelation: "schools";
493
+ referencedColumns: ["id"];
494
+ }];
495
+ };
496
+ schools: {
497
+ Row: {
498
+ created_at: string;
499
+ domain: string;
500
+ full_name: string;
501
+ id: string;
502
+ short_name: string;
503
+ };
504
+ Insert: {
505
+ created_at?: string;
506
+ domain: string;
507
+ full_name: string;
508
+ id?: string;
509
+ short_name: string;
510
+ };
511
+ Update: {
512
+ created_at?: string;
513
+ domain?: string;
514
+ full_name?: string;
515
+ id?: string;
516
+ short_name?: string;
517
+ };
518
+ Relationships: [];
519
+ };
520
+ };
521
+ Views: { [_ in never]: never; };
522
+ Functions: { [_ in never]: never; };
523
+ Enums: { [_ in never]: never; };
524
+ CompositeTypes: { [_ in never]: never; };
525
+ }, {
526
+ PostgrestVersion: "13.0.4";
527
+ }>;
528
+ export declare const documentDb: import("@supabase/supabase-js").SupabaseClient<_DocumentDatabase, "public", "public", {
529
+ Tables: {
530
+ base_documents: {
531
+ Row: {
532
+ created_at: string;
533
+ id: string;
534
+ name: string;
535
+ url: string;
536
+ };
537
+ Insert: {
538
+ created_at?: string;
539
+ id?: string;
540
+ name: string;
541
+ url: string;
542
+ };
543
+ Update: {
544
+ created_at?: string;
545
+ id?: string;
546
+ name?: string;
547
+ url?: string;
548
+ };
549
+ Relationships: [];
550
+ };
551
+ base_images: {
552
+ Row: {
553
+ filename: string;
554
+ id: string;
555
+ source_text: string;
556
+ url: string;
557
+ };
558
+ Insert: {
559
+ filename: string;
560
+ id?: string;
561
+ source_text: string;
562
+ url: string;
563
+ };
564
+ Update: {
565
+ filename?: string;
566
+ id?: string;
567
+ source_text?: string;
568
+ url?: string;
569
+ };
570
+ Relationships: [];
571
+ };
572
+ external_documents: {
573
+ Row: {
574
+ effective_date: string | null;
575
+ expiry_date: string | null;
576
+ id: string;
577
+ uploaded_at: string;
578
+ url: string;
579
+ };
580
+ Insert: {
581
+ effective_date?: string | null;
582
+ expiry_date?: string | null;
583
+ id?: string;
584
+ uploaded_at?: string;
585
+ url: string;
586
+ };
587
+ Update: {
588
+ effective_date?: string | null;
589
+ expiry_date?: string | null;
590
+ id?: string;
591
+ uploaded_at?: string;
592
+ url?: string;
593
+ };
594
+ Relationships: [];
595
+ };
596
+ field_template_registry: {
597
+ Row: {
598
+ id: string;
599
+ is_phantom: boolean;
600
+ label: string;
601
+ name: string;
602
+ party: string | null;
603
+ prefiller: string | null;
604
+ preset: string;
605
+ shared: boolean;
606
+ source: string;
607
+ tooltip_label: string | null;
608
+ type: string;
609
+ validator: string | null;
610
+ };
611
+ Insert: {
612
+ id?: string;
613
+ is_phantom?: boolean;
614
+ label: string;
615
+ name: string;
616
+ party?: string | null;
617
+ prefiller?: string | null;
618
+ preset?: string;
619
+ shared?: boolean;
620
+ source: string;
621
+ tooltip_label?: string | null;
622
+ type?: string;
623
+ validator?: string | null;
624
+ };
625
+ Update: {
626
+ id?: string;
627
+ is_phantom?: boolean;
628
+ label?: string;
629
+ name?: string;
630
+ party?: string | null;
631
+ prefiller?: string | null;
632
+ preset?: string;
633
+ shared?: boolean;
634
+ source?: string;
635
+ tooltip_label?: string | null;
636
+ type?: string;
637
+ validator?: string | null;
638
+ };
639
+ Relationships: [];
640
+ };
641
+ form_groups: {
642
+ Row: {
643
+ description: string;
644
+ forms: string[];
645
+ id: string;
646
+ };
647
+ Insert: {
648
+ description: string;
649
+ forms: string[];
650
+ id?: string;
651
+ };
652
+ Update: {
653
+ description?: string;
654
+ forms?: string[];
655
+ id?: string;
656
+ };
657
+ Relationships: [];
658
+ };
659
+ form_template_registry: {
660
+ Row: {
661
+ base_document_id: string | null;
662
+ form_metadata_id: string | null;
663
+ id: string;
664
+ label: string | null;
665
+ name: string;
666
+ time_generated: string | null;
667
+ version: number;
668
+ };
669
+ Insert: {
670
+ base_document_id?: string | null;
671
+ form_metadata_id?: string | null;
672
+ id?: string;
673
+ label?: string | null;
674
+ name: string;
675
+ time_generated?: string | null;
676
+ version?: number;
677
+ };
678
+ Update: {
679
+ base_document_id?: string | null;
680
+ form_metadata_id?: string | null;
681
+ id?: string;
682
+ label?: string | null;
683
+ name?: string;
684
+ time_generated?: string | null;
685
+ version?: number;
686
+ };
687
+ Relationships: [{
688
+ foreignKeyName: "form_schemas_base_document_id_fkey";
689
+ columns: ["base_document_id"];
690
+ isOneToOne: false;
691
+ referencedRelation: "base_documents";
692
+ referencedColumns: ["id"];
693
+ }];
694
+ };
695
+ pending_forms: {
696
+ Row: {
697
+ audit: import("./db.doc.types").Json | null;
698
+ base_document_id: string | null;
699
+ date_made: string;
700
+ descriptors: import("./db.doc.types").Json;
701
+ form_label: string | null;
702
+ form_name: string | null;
703
+ id: string;
704
+ inputs: import("./db.doc.types").Json;
705
+ latest_document_url: string | null;
706
+ signing_parties: import("./db.doc.types").Json;
707
+ subscribers: import("./db.doc.types").Json | null;
708
+ version: number | null;
709
+ };
710
+ Insert: {
711
+ audit?: import("./db.doc.types").Json | null;
712
+ base_document_id?: string | null;
713
+ date_made?: string;
714
+ descriptors?: import("./db.doc.types").Json;
715
+ form_label?: string | null;
716
+ form_name?: string | null;
717
+ id?: string;
718
+ inputs?: import("./db.doc.types").Json;
719
+ latest_document_url?: string | null;
720
+ signing_parties?: import("./db.doc.types").Json;
721
+ subscribers?: import("./db.doc.types").Json | null;
722
+ version?: number | null;
723
+ };
724
+ Update: {
725
+ audit?: import("./db.doc.types").Json | null;
726
+ base_document_id?: string | null;
727
+ date_made?: string;
728
+ descriptors?: import("./db.doc.types").Json;
729
+ form_label?: string | null;
730
+ form_name?: string | null;
731
+ id?: string;
732
+ inputs?: import("./db.doc.types").Json;
733
+ latest_document_url?: string | null;
734
+ signing_parties?: import("./db.doc.types").Json;
735
+ subscribers?: import("./db.doc.types").Json | null;
736
+ version?: number | null;
737
+ };
738
+ Relationships: [{
739
+ foreignKeyName: "pending_documents_base_document_id_fkey";
740
+ columns: ["base_document_id"];
741
+ isOneToOne: false;
742
+ referencedRelation: "base_documents";
743
+ referencedColumns: ["id"];
744
+ }];
745
+ };
746
+ signed_documents: {
747
+ Row: {
748
+ base_document_id: string | null;
749
+ date_made: string;
750
+ descriptors: import("./db.doc.types").Json;
751
+ effective_date: string | null;
752
+ expiry_date: string | null;
753
+ form_label: string | null;
754
+ form_name: string | null;
755
+ id: string;
756
+ inputs: import("./db.doc.types").Json | null;
757
+ inputs_hash: string | null;
758
+ notarized_url: string | null;
759
+ schema: import("./db.doc.types").Json | null;
760
+ schema_hash: string | null;
761
+ signatories: import("./db.doc.types").Json | null;
762
+ url: string;
763
+ verification_code: string | null;
764
+ };
765
+ Insert: {
766
+ base_document_id?: string | null;
767
+ date_made?: string;
768
+ descriptors?: import("./db.doc.types").Json;
769
+ effective_date?: string | null;
770
+ expiry_date?: string | null;
771
+ form_label?: string | null;
772
+ form_name?: string | null;
773
+ id?: string;
774
+ inputs?: import("./db.doc.types").Json | null;
775
+ inputs_hash?: string | null;
776
+ notarized_url?: string | null;
777
+ schema?: import("./db.doc.types").Json | null;
778
+ schema_hash?: string | null;
779
+ signatories?: import("./db.doc.types").Json | null;
780
+ url: string;
781
+ verification_code?: string | null;
782
+ };
783
+ Update: {
784
+ base_document_id?: string | null;
785
+ date_made?: string;
786
+ descriptors?: import("./db.doc.types").Json;
787
+ effective_date?: string | null;
788
+ expiry_date?: string | null;
789
+ form_label?: string | null;
790
+ form_name?: string | null;
791
+ id?: string;
792
+ inputs?: import("./db.doc.types").Json | null;
793
+ inputs_hash?: string | null;
794
+ notarized_url?: string | null;
795
+ schema?: import("./db.doc.types").Json | null;
796
+ schema_hash?: string | null;
797
+ signatories?: import("./db.doc.types").Json | null;
798
+ url?: string;
799
+ verification_code?: string | null;
800
+ };
801
+ Relationships: [{
802
+ foreignKeyName: "signed_documents_base_document_id_fkey";
803
+ columns: ["base_document_id"];
804
+ isOneToOne: false;
805
+ referencedRelation: "base_documents";
806
+ referencedColumns: ["id"];
807
+ }];
808
+ };
809
+ };
810
+ Views: { [_ in never]: never; };
811
+ Functions: { [_ in never]: never; };
812
+ Enums: {
813
+ input_type: "text" | "number" | "date" | "select" | "time" | "signature" | "reference" | "checkbox";
814
+ section: "student" | "entity" | "university" | "student-guardian" | "internship";
815
+ };
816
+ CompositeTypes: { [_ in never]: never; };
817
+ }, {
818
+ PostgrestVersion: "13.0.5";
819
+ }>;
820
+ export declare const internshipDb: import("@supabase/supabase-js").SupabaseClient<_InternshipDatabase, "public", "public", {
821
+ Tables: {
822
+ coordinator_accounts: {
823
+ Row: {
824
+ created_at: string;
825
+ email: string;
826
+ forms: string[];
827
+ id: string;
828
+ name: string | null;
829
+ signatory_account_id: string | null;
830
+ };
831
+ Insert: {
832
+ created_at?: string;
833
+ email: string;
834
+ forms: string[];
835
+ id?: string;
836
+ name?: string | null;
837
+ signatory_account_id?: string | null;
838
+ };
839
+ Update: {
840
+ created_at?: string;
841
+ email?: string;
842
+ forms?: string[];
843
+ id?: string;
844
+ name?: string | null;
845
+ signatory_account_id?: string | null;
846
+ };
847
+ Relationships: [{
848
+ foreignKeyName: "coordinator_accounts_signatory_account_id_fkey";
849
+ columns: ["signatory_account_id"];
850
+ isOneToOne: false;
851
+ referencedRelation: "signatory_accounts";
852
+ referencedColumns: ["id"];
853
+ }];
854
+ };
855
+ form_processes: {
856
+ Row: {
857
+ created_at: string;
858
+ display_information: import("./db.internship.types").Json | null;
859
+ form_inputs: import("./db.internship.types").Json | null;
860
+ form_label: string | null;
861
+ form_name: string;
862
+ form_version: number;
863
+ id: string;
864
+ initiator_id: string | null;
865
+ latest_document_url: string | null;
866
+ pending_document_id: string | null;
867
+ prefilled_document_id: string | null;
868
+ signed_document_id: string | null;
869
+ signing_parties: import("./db.internship.types").Json;
870
+ subscribers: import("./db.internship.types").Json;
871
+ timestamp: string;
872
+ };
873
+ Insert: {
874
+ created_at?: string;
875
+ display_information?: import("./db.internship.types").Json | null;
876
+ form_inputs?: import("./db.internship.types").Json | null;
877
+ form_label?: string | null;
878
+ form_name: string;
879
+ form_version?: number;
880
+ id?: string;
881
+ initiator_id?: string | null;
882
+ latest_document_url?: string | null;
883
+ pending_document_id?: string | null;
884
+ prefilled_document_id?: string | null;
885
+ signed_document_id?: string | null;
886
+ signing_parties?: import("./db.internship.types").Json;
887
+ subscribers?: import("./db.internship.types").Json;
888
+ timestamp?: string;
889
+ };
890
+ Update: {
891
+ created_at?: string;
892
+ display_information?: import("./db.internship.types").Json | null;
893
+ form_inputs?: import("./db.internship.types").Json | null;
894
+ form_label?: string | null;
895
+ form_name?: string;
896
+ form_version?: number;
897
+ id?: string;
898
+ initiator_id?: string | null;
899
+ latest_document_url?: string | null;
900
+ pending_document_id?: string | null;
901
+ prefilled_document_id?: string | null;
902
+ signed_document_id?: string | null;
903
+ signing_parties?: import("./db.internship.types").Json;
904
+ subscribers?: import("./db.internship.types").Json;
905
+ timestamp?: string;
906
+ };
907
+ Relationships: [];
908
+ };
909
+ gods: {
910
+ Row: {
911
+ id: string;
912
+ signatory_account: string;
913
+ };
914
+ Insert: {
915
+ id?: string;
916
+ signatory_account?: string;
917
+ };
918
+ Update: {
919
+ id?: string;
920
+ signatory_account?: string;
921
+ };
922
+ Relationships: [{
923
+ foreignKeyName: "gods_signatory_account_fkey";
924
+ columns: ["signatory_account"];
925
+ isOneToOne: false;
926
+ referencedRelation: "signatory_accounts";
927
+ referencedColumns: ["id"];
928
+ }];
929
+ };
930
+ signatory_accounts: {
931
+ Row: {
932
+ auto_form_permissions: import("./db.internship.types").Json | null;
933
+ autofill: import("./db.internship.types").Json | null;
934
+ created_at: string;
935
+ email: string;
936
+ honorific: string | null;
937
+ id: string;
938
+ name: string | null;
939
+ title: string | null;
940
+ };
941
+ Insert: {
942
+ auto_form_permissions?: import("./db.internship.types").Json | null;
943
+ autofill?: import("./db.internship.types").Json | null;
944
+ created_at?: string;
945
+ email: string;
946
+ honorific?: string | null;
947
+ id?: string;
948
+ name?: string | null;
949
+ title?: string | null;
950
+ };
951
+ Update: {
952
+ auto_form_permissions?: import("./db.internship.types").Json | null;
953
+ autofill?: import("./db.internship.types").Json | null;
954
+ created_at?: string;
955
+ email?: string;
956
+ honorific?: string | null;
957
+ id?: string;
958
+ name?: string | null;
959
+ title?: string | null;
960
+ };
961
+ Relationships: [];
962
+ };
963
+ signatory_audits: {
964
+ Row: {
965
+ audit: import("./db.internship.types").Json;
966
+ created_at: string;
967
+ id: string;
968
+ signatory_id: string;
969
+ };
970
+ Insert: {
971
+ audit?: import("./db.internship.types").Json;
972
+ created_at?: string;
973
+ id?: string;
974
+ signatory_id: string;
975
+ };
976
+ Update: {
977
+ audit?: import("./db.internship.types").Json;
978
+ created_at?: string;
979
+ id?: string;
980
+ signatory_id?: string;
981
+ };
982
+ Relationships: [{
983
+ foreignKeyName: "signatory_audits_signatory_id_fkey";
984
+ columns: ["signatory_id"];
985
+ isOneToOne: false;
986
+ referencedRelation: "signatory_accounts";
987
+ referencedColumns: ["id"];
988
+ }];
989
+ };
990
+ signatory_forms: {
991
+ Row: {
992
+ form_label: string | null;
993
+ form_name: string;
994
+ form_process_id: string;
995
+ form_process_status: string | null;
996
+ id: string;
997
+ signatory_id: string | null;
998
+ timestamp: string;
999
+ };
1000
+ Insert: {
1001
+ form_label?: string | null;
1002
+ form_name: string;
1003
+ form_process_id: string;
1004
+ form_process_status?: string | null;
1005
+ id?: string;
1006
+ signatory_id?: string | null;
1007
+ timestamp?: string;
1008
+ };
1009
+ Update: {
1010
+ form_label?: string | null;
1011
+ form_name?: string;
1012
+ form_process_id?: string;
1013
+ form_process_status?: string | null;
1014
+ id?: string;
1015
+ signatory_id?: string | null;
1016
+ timestamp?: string;
1017
+ };
1018
+ Relationships: [{
1019
+ foreignKeyName: "signatory_forms_form_process_id_fkey";
1020
+ columns: ["form_process_id"];
1021
+ isOneToOne: false;
1022
+ referencedRelation: "form_processes";
1023
+ referencedColumns: ["id"];
1024
+ }, {
1025
+ foreignKeyName: "signatory_forms_signatory_id_fkey";
1026
+ columns: ["signatory_id"];
1027
+ isOneToOne: false;
1028
+ referencedRelation: "signatory_accounts";
1029
+ referencedColumns: ["id"];
1030
+ }];
1031
+ };
1032
+ signatory_keyring: {
1033
+ Row: {
1034
+ consumed: boolean;
1035
+ consumed_at: string | null;
1036
+ created_at: string;
1037
+ hash: string;
1038
+ id: string;
1039
+ signatory_account_id: string;
1040
+ };
1041
+ Insert: {
1042
+ consumed?: boolean;
1043
+ consumed_at?: string | null;
1044
+ created_at?: string;
1045
+ hash: string;
1046
+ id?: string;
1047
+ signatory_account_id: string;
1048
+ };
1049
+ Update: {
1050
+ consumed?: boolean;
1051
+ consumed_at?: string | null;
1052
+ created_at?: string;
1053
+ hash?: string;
1054
+ id?: string;
1055
+ signatory_account_id?: string;
1056
+ };
1057
+ Relationships: [{
1058
+ foreignKeyName: "signatory_keyring_signatory_account_id_fkey";
1059
+ columns: ["signatory_account_id"];
1060
+ isOneToOne: false;
1061
+ referencedRelation: "signatory_accounts";
1062
+ referencedColumns: ["id"];
1063
+ }];
1064
+ };
1065
+ };
1066
+ Views: { [_ in never]: never; };
1067
+ Functions: { [_ in never]: never; };
1068
+ Enums: { [_ in never]: never; };
1069
+ CompositeTypes: { [_ in never]: never; };
1070
+ }, {
1071
+ PostgrestVersion: "13.0.5";
1072
+ }>;
1073
+ export declare const handleDBError: (error: PostgrestError, description?: string) => never;