@betterinternship/schema.moa 1.4.31 → 1.5.1

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