@betterinternship/core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,794 @@
1
+ import { PostgrestError } from "@supabase/supabase-js";
2
+ import { Database } from "./db.types";
3
+ export declare const db: import("@supabase/supabase-js").SupabaseClient<Database, "public", {
4
+ Tables: {
5
+ applications: {
6
+ Row: {
7
+ applied_at: string;
8
+ cover_letter: string | null;
9
+ id: string;
10
+ job_id: string | null;
11
+ notes: string | null;
12
+ review: string | null;
13
+ status: number;
14
+ updated_at: string | null;
15
+ user_id: string | null;
16
+ };
17
+ Insert: {
18
+ applied_at?: string;
19
+ cover_letter?: string | null;
20
+ id?: string;
21
+ job_id?: string | null;
22
+ notes?: string | null;
23
+ review?: string | null;
24
+ status?: number;
25
+ updated_at?: string | null;
26
+ user_id?: string | null;
27
+ };
28
+ Update: {
29
+ applied_at?: string;
30
+ cover_letter?: string | null;
31
+ id?: string;
32
+ job_id?: string | null;
33
+ notes?: string | null;
34
+ review?: string | null;
35
+ status?: number;
36
+ updated_at?: string | null;
37
+ user_id?: string | null;
38
+ };
39
+ Relationships: [{
40
+ foreignKeyName: "applications_job_id_fkey";
41
+ columns: ["job_id"];
42
+ isOneToOne: false;
43
+ referencedRelation: "jobs";
44
+ referencedColumns: ["id"];
45
+ }, {
46
+ foreignKeyName: "applications_status_fkey";
47
+ columns: ["status"];
48
+ isOneToOne: false;
49
+ referencedRelation: "ref_app_statuses";
50
+ referencedColumns: ["id"];
51
+ }, {
52
+ foreignKeyName: "applications_user_id_fkey";
53
+ columns: ["user_id"];
54
+ isOneToOne: false;
55
+ referencedRelation: "users";
56
+ referencedColumns: ["id"];
57
+ }];
58
+ };
59
+ employer_users: {
60
+ Row: {
61
+ created_at: string;
62
+ email: string;
63
+ employer_id: string;
64
+ first_name: string | null;
65
+ id: string;
66
+ is_deactivated: boolean;
67
+ is_verified: boolean;
68
+ last_name: string | null;
69
+ middle_name: string | null;
70
+ password: string;
71
+ profile_picture: string | null;
72
+ updated_at: string;
73
+ };
74
+ Insert: {
75
+ created_at?: string;
76
+ email: string;
77
+ employer_id: string;
78
+ first_name?: string | null;
79
+ id?: string;
80
+ is_deactivated?: boolean;
81
+ is_verified?: boolean;
82
+ last_name?: string | null;
83
+ middle_name?: string | null;
84
+ password: string;
85
+ profile_picture?: string | null;
86
+ updated_at?: string;
87
+ };
88
+ Update: {
89
+ created_at?: string;
90
+ email?: string;
91
+ employer_id?: string;
92
+ first_name?: string | null;
93
+ id?: string;
94
+ is_deactivated?: boolean;
95
+ is_verified?: boolean;
96
+ last_name?: string | null;
97
+ middle_name?: string | null;
98
+ password?: string;
99
+ profile_picture?: string | null;
100
+ updated_at?: string;
101
+ };
102
+ Relationships: [{
103
+ foreignKeyName: "employer_users_employer_id_fkey";
104
+ columns: ["employer_id"];
105
+ isOneToOne: false;
106
+ referencedRelation: "employers";
107
+ referencedColumns: ["id"];
108
+ }];
109
+ };
110
+ employers: {
111
+ Row: {
112
+ accepted_universities: string[];
113
+ accepts_non_university: boolean;
114
+ created_at: string;
115
+ description: string | null;
116
+ email: string | null;
117
+ id: string;
118
+ industry: string | null;
119
+ is_verified: boolean;
120
+ job_count: number;
121
+ legal_entity_name: string;
122
+ location: string | null;
123
+ logo: string | null;
124
+ name: string;
125
+ phone_number: string | null;
126
+ updated_at: string;
127
+ website: string | null;
128
+ };
129
+ Insert: {
130
+ accepted_universities?: string[];
131
+ accepts_non_university?: boolean;
132
+ created_at?: string;
133
+ description?: string | null;
134
+ email?: string | null;
135
+ id?: string;
136
+ industry?: string | null;
137
+ is_verified?: boolean;
138
+ job_count?: number;
139
+ legal_entity_name: string;
140
+ location?: string | null;
141
+ logo?: string | null;
142
+ name: string;
143
+ phone_number?: string | null;
144
+ updated_at?: string;
145
+ website?: string | null;
146
+ };
147
+ Update: {
148
+ accepted_universities?: string[];
149
+ accepts_non_university?: boolean;
150
+ created_at?: string;
151
+ description?: string | null;
152
+ email?: string | null;
153
+ id?: string;
154
+ industry?: string | null;
155
+ is_verified?: boolean;
156
+ job_count?: number;
157
+ legal_entity_name?: string;
158
+ location?: string | null;
159
+ logo?: string | null;
160
+ name?: string;
161
+ phone_number?: string | null;
162
+ updated_at?: string;
163
+ website?: string | null;
164
+ };
165
+ Relationships: [];
166
+ };
167
+ gods: {
168
+ Row: {
169
+ employer_user_id: string;
170
+ id: string;
171
+ };
172
+ Insert: {
173
+ employer_user_id: string;
174
+ id?: string;
175
+ };
176
+ Update: {
177
+ employer_user_id?: string;
178
+ id?: string;
179
+ };
180
+ Relationships: [{
181
+ foreignKeyName: "gods_employer_user_id_fkey";
182
+ columns: ["employer_user_id"];
183
+ isOneToOne: true;
184
+ referencedRelation: "employer_users";
185
+ referencedColumns: ["id"];
186
+ }];
187
+ };
188
+ jobs: {
189
+ Row: {
190
+ allowance: number | null;
191
+ category: string | null;
192
+ created_at: string | null;
193
+ description: string;
194
+ employer_id: string | null;
195
+ end_date: number | null;
196
+ id: string;
197
+ is_active: boolean | null;
198
+ is_deleted: boolean;
199
+ is_unlisted: boolean;
200
+ is_year_round: boolean | null;
201
+ location: string | null;
202
+ mode: number | null;
203
+ require_cover_letter: boolean | null;
204
+ require_github: boolean | null;
205
+ require_portfolio: boolean | null;
206
+ requirements: string | null;
207
+ salary: number | null;
208
+ salary_freq: number | null;
209
+ start_date: number | null;
210
+ title: string;
211
+ type: number | null;
212
+ updated_at: string | null;
213
+ view_count: number;
214
+ };
215
+ Insert: {
216
+ allowance?: number | null;
217
+ category?: string | null;
218
+ created_at?: string | null;
219
+ description: string;
220
+ employer_id?: string | null;
221
+ end_date?: number | null;
222
+ id?: string;
223
+ is_active?: boolean | null;
224
+ is_deleted?: boolean;
225
+ is_unlisted?: boolean;
226
+ is_year_round?: boolean | null;
227
+ location?: string | null;
228
+ mode?: number | null;
229
+ require_cover_letter?: boolean | null;
230
+ require_github?: boolean | null;
231
+ require_portfolio?: boolean | null;
232
+ requirements?: string | null;
233
+ salary?: number | null;
234
+ salary_freq?: number | null;
235
+ start_date?: number | null;
236
+ title: string;
237
+ type?: number | null;
238
+ updated_at?: string | null;
239
+ view_count?: number;
240
+ };
241
+ Update: {
242
+ allowance?: number | null;
243
+ category?: string | null;
244
+ created_at?: string | null;
245
+ description?: string;
246
+ employer_id?: string | null;
247
+ end_date?: number | null;
248
+ id?: string;
249
+ is_active?: boolean | null;
250
+ is_deleted?: boolean;
251
+ is_unlisted?: boolean;
252
+ is_year_round?: boolean | null;
253
+ location?: string | null;
254
+ mode?: number | null;
255
+ require_cover_letter?: boolean | null;
256
+ require_github?: boolean | null;
257
+ require_portfolio?: boolean | null;
258
+ requirements?: string | null;
259
+ salary?: number | null;
260
+ salary_freq?: number | null;
261
+ start_date?: number | null;
262
+ title?: string;
263
+ type?: number | null;
264
+ updated_at?: string | null;
265
+ view_count?: number;
266
+ };
267
+ Relationships: [{
268
+ foreignKeyName: "jobs_allowance_fkey";
269
+ columns: ["allowance"];
270
+ isOneToOne: false;
271
+ referencedRelation: "ref_job_allowances";
272
+ referencedColumns: ["id"];
273
+ }, {
274
+ foreignKeyName: "jobs_category_fkey";
275
+ columns: ["category"];
276
+ isOneToOne: false;
277
+ referencedRelation: "ref_job_categories";
278
+ referencedColumns: ["id"];
279
+ }, {
280
+ foreignKeyName: "jobs_employer_id_fkey";
281
+ columns: ["employer_id"];
282
+ isOneToOne: false;
283
+ referencedRelation: "employers";
284
+ referencedColumns: ["id"];
285
+ }, {
286
+ foreignKeyName: "jobs_mode_fkey";
287
+ columns: ["mode"];
288
+ isOneToOne: false;
289
+ referencedRelation: "ref_job_modes";
290
+ referencedColumns: ["id"];
291
+ }, {
292
+ foreignKeyName: "jobs_salary_freq_fkey";
293
+ columns: ["salary_freq"];
294
+ isOneToOne: false;
295
+ referencedRelation: "ref_job_pay_freq";
296
+ referencedColumns: ["id"];
297
+ }, {
298
+ foreignKeyName: "jobs_type_fkey";
299
+ columns: ["type"];
300
+ isOneToOne: false;
301
+ referencedRelation: "ref_job_types";
302
+ referencedColumns: ["id"];
303
+ }];
304
+ };
305
+ moa: {
306
+ Row: {
307
+ employer_id: string;
308
+ expires_at: string;
309
+ id: string;
310
+ start_date: string;
311
+ university_id: string;
312
+ };
313
+ Insert: {
314
+ employer_id: string;
315
+ expires_at?: string;
316
+ id?: string;
317
+ start_date?: string;
318
+ university_id: string;
319
+ };
320
+ Update: {
321
+ employer_id?: string;
322
+ expires_at?: string;
323
+ id?: string;
324
+ start_date?: string;
325
+ university_id?: string;
326
+ };
327
+ Relationships: [{
328
+ foreignKeyName: "moa_employer_id_fkey";
329
+ columns: ["employer_id"];
330
+ isOneToOne: false;
331
+ referencedRelation: "employers";
332
+ referencedColumns: ["id"];
333
+ }, {
334
+ foreignKeyName: "moa_university_id_fkey";
335
+ columns: ["university_id"];
336
+ isOneToOne: false;
337
+ referencedRelation: "ref_universities";
338
+ referencedColumns: ["id"];
339
+ }];
340
+ };
341
+ ref_app_statuses: {
342
+ Row: {
343
+ id: number;
344
+ name: string;
345
+ order: number;
346
+ };
347
+ Insert: {
348
+ id?: number;
349
+ name: string;
350
+ order: number;
351
+ };
352
+ Update: {
353
+ id?: number;
354
+ name?: string;
355
+ order?: number;
356
+ };
357
+ Relationships: [];
358
+ };
359
+ ref_colleges: {
360
+ Row: {
361
+ id: string;
362
+ name: string;
363
+ short_name: string;
364
+ university_id: string;
365
+ };
366
+ Insert: {
367
+ id?: string;
368
+ name: string;
369
+ short_name?: string;
370
+ university_id: string;
371
+ };
372
+ Update: {
373
+ id?: string;
374
+ name?: string;
375
+ short_name?: string;
376
+ university_id?: string;
377
+ };
378
+ Relationships: [{
379
+ foreignKeyName: "ref_colleges_university_id_fkey";
380
+ columns: ["university_id"];
381
+ isOneToOne: false;
382
+ referencedRelation: "ref_universities";
383
+ referencedColumns: ["id"];
384
+ }];
385
+ };
386
+ ref_degrees: {
387
+ Row: {
388
+ id: string;
389
+ name: string;
390
+ type: string;
391
+ university_id: string;
392
+ };
393
+ Insert: {
394
+ id?: string;
395
+ name: string;
396
+ type: string;
397
+ university_id: string;
398
+ };
399
+ Update: {
400
+ id?: string;
401
+ name?: string;
402
+ type?: string;
403
+ university_id?: string;
404
+ };
405
+ Relationships: [{
406
+ foreignKeyName: "ref_degrees_university_id_fkey";
407
+ columns: ["university_id"];
408
+ isOneToOne: false;
409
+ referencedRelation: "ref_universities";
410
+ referencedColumns: ["id"];
411
+ }];
412
+ };
413
+ ref_departments: {
414
+ Row: {
415
+ college_id: string;
416
+ id: string;
417
+ name: string;
418
+ short_name: string;
419
+ };
420
+ Insert: {
421
+ college_id?: string;
422
+ id?: string;
423
+ name: string;
424
+ short_name: string;
425
+ };
426
+ Update: {
427
+ college_id?: string;
428
+ id?: string;
429
+ name?: string;
430
+ short_name?: string;
431
+ };
432
+ Relationships: [{
433
+ foreignKeyName: "ref_departments_college_id_fkey";
434
+ columns: ["college_id"];
435
+ isOneToOne: false;
436
+ referencedRelation: "ref_colleges";
437
+ referencedColumns: ["id"];
438
+ }];
439
+ };
440
+ ref_domains: {
441
+ Row: {
442
+ id: string;
443
+ name: string;
444
+ university_id: string;
445
+ };
446
+ Insert: {
447
+ id?: string;
448
+ name: string;
449
+ university_id: string;
450
+ };
451
+ Update: {
452
+ id?: string;
453
+ name?: string;
454
+ university_id?: string;
455
+ };
456
+ Relationships: [{
457
+ foreignKeyName: "ref_domains_university_id_fkey";
458
+ columns: ["university_id"];
459
+ isOneToOne: false;
460
+ referencedRelation: "ref_universities";
461
+ referencedColumns: ["id"];
462
+ }];
463
+ };
464
+ ref_industries: {
465
+ Row: {
466
+ id: string;
467
+ name: string;
468
+ };
469
+ Insert: {
470
+ id?: string;
471
+ name: string;
472
+ };
473
+ Update: {
474
+ id?: string;
475
+ name?: string;
476
+ };
477
+ Relationships: [];
478
+ };
479
+ ref_job_allowances: {
480
+ Row: {
481
+ id: number;
482
+ name: string;
483
+ };
484
+ Insert: {
485
+ id?: number;
486
+ name: string;
487
+ };
488
+ Update: {
489
+ id?: number;
490
+ name?: string;
491
+ };
492
+ Relationships: [];
493
+ };
494
+ ref_job_categories: {
495
+ Row: {
496
+ class: string;
497
+ id: string;
498
+ name: string;
499
+ order: number;
500
+ };
501
+ Insert: {
502
+ class: string;
503
+ id?: string;
504
+ name: string;
505
+ order: number;
506
+ };
507
+ Update: {
508
+ class?: string;
509
+ id?: string;
510
+ name?: string;
511
+ order?: number;
512
+ };
513
+ Relationships: [];
514
+ };
515
+ ref_job_modes: {
516
+ Row: {
517
+ id: number;
518
+ name: string;
519
+ };
520
+ Insert: {
521
+ id?: number;
522
+ name: string;
523
+ };
524
+ Update: {
525
+ id?: number;
526
+ name?: string;
527
+ };
528
+ Relationships: [];
529
+ };
530
+ ref_job_pay_freq: {
531
+ Row: {
532
+ description: string;
533
+ factor: number | null;
534
+ id: number;
535
+ name: string;
536
+ };
537
+ Insert: {
538
+ description: string;
539
+ factor?: number | null;
540
+ id?: number;
541
+ name: string;
542
+ };
543
+ Update: {
544
+ description?: string;
545
+ factor?: number | null;
546
+ id?: number;
547
+ name?: string;
548
+ };
549
+ Relationships: [];
550
+ };
551
+ ref_job_types: {
552
+ Row: {
553
+ id: number;
554
+ name: string;
555
+ };
556
+ Insert: {
557
+ id?: number;
558
+ name: string;
559
+ };
560
+ Update: {
561
+ id?: number;
562
+ name?: string;
563
+ };
564
+ Relationships: [];
565
+ };
566
+ ref_levels: {
567
+ Row: {
568
+ id: number;
569
+ name: string;
570
+ order: number;
571
+ };
572
+ Insert: {
573
+ id?: number;
574
+ name: string;
575
+ order: number;
576
+ };
577
+ Update: {
578
+ id?: number;
579
+ name?: string;
580
+ order?: number;
581
+ };
582
+ Relationships: [];
583
+ };
584
+ ref_universities: {
585
+ Row: {
586
+ id: string;
587
+ name: string;
588
+ };
589
+ Insert: {
590
+ id?: string;
591
+ name: string;
592
+ };
593
+ Update: {
594
+ id?: string;
595
+ name?: string;
596
+ };
597
+ Relationships: [];
598
+ };
599
+ saved_jobs: {
600
+ Row: {
601
+ id: string;
602
+ job_id: string | null;
603
+ saved_at: string | null;
604
+ user_id: string | null;
605
+ };
606
+ Insert: {
607
+ id?: string;
608
+ job_id?: string | null;
609
+ saved_at?: string | null;
610
+ user_id?: string | null;
611
+ };
612
+ Update: {
613
+ id?: string;
614
+ job_id?: string | null;
615
+ saved_at?: string | null;
616
+ user_id?: string | null;
617
+ };
618
+ Relationships: [{
619
+ foreignKeyName: "saved_jobs_job_id_fkey";
620
+ columns: ["job_id"];
621
+ isOneToOne: false;
622
+ referencedRelation: "jobs";
623
+ referencedColumns: ["id"];
624
+ }, {
625
+ foreignKeyName: "saved_jobs_user_id_fkey";
626
+ columns: ["user_id"];
627
+ isOneToOne: false;
628
+ referencedRelation: "users";
629
+ referencedColumns: ["id"];
630
+ }];
631
+ };
632
+ user_activity: {
633
+ Row: {
634
+ activity_type: string | null;
635
+ created_at: string | null;
636
+ id: string;
637
+ job_id: string | null;
638
+ metadata: import("./db.types").Json | null;
639
+ user_id: string | null;
640
+ };
641
+ Insert: {
642
+ activity_type?: string | null;
643
+ created_at?: string | null;
644
+ id?: string;
645
+ job_id?: string | null;
646
+ metadata?: import("./db.types").Json | null;
647
+ user_id?: string | null;
648
+ };
649
+ Update: {
650
+ activity_type?: string | null;
651
+ created_at?: string | null;
652
+ id?: string;
653
+ job_id?: string | null;
654
+ metadata?: import("./db.types").Json | null;
655
+ user_id?: string | null;
656
+ };
657
+ Relationships: [{
658
+ foreignKeyName: "user_activity_job_id_fkey";
659
+ columns: ["job_id"];
660
+ isOneToOne: false;
661
+ referencedRelation: "jobs";
662
+ referencedColumns: ["id"];
663
+ }, {
664
+ foreignKeyName: "user_activity_user_id_fkey";
665
+ columns: ["user_id"];
666
+ isOneToOne: false;
667
+ referencedRelation: "users";
668
+ referencedColumns: ["id"];
669
+ }];
670
+ };
671
+ users: {
672
+ Row: {
673
+ bio: string | null;
674
+ calendar_link: string | null;
675
+ college: string | null;
676
+ created_at: string | null;
677
+ degree: string | null;
678
+ degree_notes: string | null;
679
+ department: string | null;
680
+ email: string;
681
+ first_name: string | null;
682
+ github_link: string | null;
683
+ id: string;
684
+ is_deactivated: boolean | null;
685
+ is_verified: boolean;
686
+ last_name: string | null;
687
+ linkage_officer: string | null;
688
+ linkedin_link: string | null;
689
+ middle_name: string | null;
690
+ phone_number: string | null;
691
+ portfolio_link: string | null;
692
+ profile_picture: string | null;
693
+ resume: string | null;
694
+ taking_for_credit: boolean;
695
+ university: string | null;
696
+ updated_at: string | null;
697
+ verification_hash: string;
698
+ year_level: number | null;
699
+ };
700
+ Insert: {
701
+ bio?: string | null;
702
+ calendar_link?: string | null;
703
+ college?: string | null;
704
+ created_at?: string | null;
705
+ degree?: string | null;
706
+ degree_notes?: string | null;
707
+ department?: string | null;
708
+ email: string;
709
+ first_name?: string | null;
710
+ github_link?: string | null;
711
+ id?: string;
712
+ is_deactivated?: boolean | null;
713
+ is_verified?: boolean;
714
+ last_name?: string | null;
715
+ linkage_officer?: string | null;
716
+ linkedin_link?: string | null;
717
+ middle_name?: string | null;
718
+ phone_number?: string | null;
719
+ portfolio_link?: string | null;
720
+ profile_picture?: string | null;
721
+ resume?: string | null;
722
+ taking_for_credit?: boolean;
723
+ university?: string | null;
724
+ updated_at?: string | null;
725
+ verification_hash: string;
726
+ year_level?: number | null;
727
+ };
728
+ Update: {
729
+ bio?: string | null;
730
+ calendar_link?: string | null;
731
+ college?: string | null;
732
+ created_at?: string | null;
733
+ degree?: string | null;
734
+ degree_notes?: string | null;
735
+ department?: string | null;
736
+ email?: string;
737
+ first_name?: string | null;
738
+ github_link?: string | null;
739
+ id?: string;
740
+ is_deactivated?: boolean | null;
741
+ is_verified?: boolean;
742
+ last_name?: string | null;
743
+ linkage_officer?: string | null;
744
+ linkedin_link?: string | null;
745
+ middle_name?: string | null;
746
+ phone_number?: string | null;
747
+ portfolio_link?: string | null;
748
+ profile_picture?: string | null;
749
+ resume?: string | null;
750
+ taking_for_credit?: boolean;
751
+ university?: string | null;
752
+ updated_at?: string | null;
753
+ verification_hash?: string;
754
+ year_level?: number | null;
755
+ };
756
+ Relationships: [{
757
+ foreignKeyName: "users_college_fkey";
758
+ columns: ["college"];
759
+ isOneToOne: false;
760
+ referencedRelation: "ref_colleges";
761
+ referencedColumns: ["id"];
762
+ }, {
763
+ foreignKeyName: "users_degree_fkey";
764
+ columns: ["degree"];
765
+ isOneToOne: false;
766
+ referencedRelation: "ref_degrees";
767
+ referencedColumns: ["id"];
768
+ }, {
769
+ foreignKeyName: "users_department_fkey";
770
+ columns: ["department"];
771
+ isOneToOne: false;
772
+ referencedRelation: "ref_departments";
773
+ referencedColumns: ["id"];
774
+ }, {
775
+ foreignKeyName: "users_university_fkey";
776
+ columns: ["university"];
777
+ isOneToOne: false;
778
+ referencedRelation: "ref_universities";
779
+ referencedColumns: ["id"];
780
+ }, {
781
+ foreignKeyName: "users_year_level_fkey";
782
+ columns: ["year_level"];
783
+ isOneToOne: false;
784
+ referencedRelation: "ref_levels";
785
+ referencedColumns: ["id"];
786
+ }];
787
+ };
788
+ };
789
+ Views: { [_ in never]: never; };
790
+ Functions: { [_ in never]: never; };
791
+ Enums: { [_ in never]: never; };
792
+ CompositeTypes: { [_ in never]: never; };
793
+ }>;
794
+ export declare const handleDBError: (error: PostgrestError, description?: string) => never;