@managemint-solutions/sdk 0.1.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,2570 @@
1
+ export type Json = string | number | boolean | null | {
2
+ [key: string]: Json | undefined;
3
+ } | Json[];
4
+ export type Database = {
5
+ graphql_public: {
6
+ Tables: {
7
+ [_ in never]: never;
8
+ };
9
+ Views: {
10
+ [_ in never]: never;
11
+ };
12
+ Functions: {
13
+ graphql: {
14
+ Args: {
15
+ extensions?: Json;
16
+ operationName?: string;
17
+ query?: string;
18
+ variables?: Json;
19
+ };
20
+ Returns: Json;
21
+ };
22
+ };
23
+ Enums: {
24
+ [_ in never]: never;
25
+ };
26
+ CompositeTypes: {
27
+ [_ in never]: never;
28
+ };
29
+ };
30
+ public: {
31
+ Tables: {
32
+ additional_details: {
33
+ Row: {
34
+ copyable: boolean;
35
+ created_at: string;
36
+ created_by: string | null;
37
+ entity_id: string;
38
+ entity_type: string;
39
+ id: number;
40
+ key: string;
41
+ last_updated_by: string | null;
42
+ mms_id: string;
43
+ organization_id: string | null;
44
+ type: string;
45
+ updated_at: string | null;
46
+ value: string;
47
+ };
48
+ Insert: {
49
+ copyable?: boolean;
50
+ created_at?: string;
51
+ created_by?: string | null;
52
+ entity_id: string;
53
+ entity_type?: string;
54
+ id?: never;
55
+ key?: string;
56
+ last_updated_by?: string | null;
57
+ mms_id?: string;
58
+ organization_id?: string | null;
59
+ type?: string;
60
+ updated_at?: string | null;
61
+ value?: string;
62
+ };
63
+ Update: {
64
+ copyable?: boolean;
65
+ created_at?: string;
66
+ created_by?: string | null;
67
+ entity_id?: string;
68
+ entity_type?: string;
69
+ id?: never;
70
+ key?: string;
71
+ last_updated_by?: string | null;
72
+ mms_id?: string;
73
+ organization_id?: string | null;
74
+ type?: string;
75
+ updated_at?: string | null;
76
+ value?: string;
77
+ };
78
+ Relationships: [
79
+ {
80
+ foreignKeyName: "additional_details_created_by_fkey";
81
+ columns: ["created_by"];
82
+ isOneToOne: false;
83
+ referencedRelation: "user_profiles";
84
+ referencedColumns: ["mms_id"];
85
+ },
86
+ {
87
+ foreignKeyName: "additional_details_created_by_fkey";
88
+ columns: ["created_by"];
89
+ isOneToOne: false;
90
+ referencedRelation: "users";
91
+ referencedColumns: ["mms_id"];
92
+ },
93
+ {
94
+ foreignKeyName: "additional_details_last_updated_by_fkey";
95
+ columns: ["last_updated_by"];
96
+ isOneToOne: false;
97
+ referencedRelation: "user_profiles";
98
+ referencedColumns: ["mms_id"];
99
+ },
100
+ {
101
+ foreignKeyName: "additional_details_last_updated_by_fkey";
102
+ columns: ["last_updated_by"];
103
+ isOneToOne: false;
104
+ referencedRelation: "users";
105
+ referencedColumns: ["mms_id"];
106
+ },
107
+ {
108
+ foreignKeyName: "additional_details_organization_id_fkey";
109
+ columns: ["organization_id"];
110
+ isOneToOne: false;
111
+ referencedRelation: "organizations";
112
+ referencedColumns: ["mms_id"];
113
+ }
114
+ ];
115
+ };
116
+ audit_logs: {
117
+ Row: {
118
+ action: string;
119
+ changes: Json;
120
+ created_at: string;
121
+ created_by: string | null;
122
+ entity_id: string;
123
+ entity_type: string;
124
+ id: number;
125
+ mms_id: string;
126
+ organization_id: string | null;
127
+ related_entity_id: string | null;
128
+ related_entity_type: string | null;
129
+ };
130
+ Insert: {
131
+ action: string;
132
+ changes?: Json;
133
+ created_at?: string;
134
+ created_by?: string | null;
135
+ entity_id: string;
136
+ entity_type: string;
137
+ id?: never;
138
+ mms_id?: string;
139
+ organization_id?: string | null;
140
+ related_entity_id?: string | null;
141
+ related_entity_type?: string | null;
142
+ };
143
+ Update: {
144
+ action?: string;
145
+ changes?: Json;
146
+ created_at?: string;
147
+ created_by?: string | null;
148
+ entity_id?: string;
149
+ entity_type?: string;
150
+ id?: never;
151
+ mms_id?: string;
152
+ organization_id?: string | null;
153
+ related_entity_id?: string | null;
154
+ related_entity_type?: string | null;
155
+ };
156
+ Relationships: [
157
+ {
158
+ foreignKeyName: "audit_logs_created_by_fkey";
159
+ columns: ["created_by"];
160
+ isOneToOne: false;
161
+ referencedRelation: "user_profiles";
162
+ referencedColumns: ["mms_id"];
163
+ },
164
+ {
165
+ foreignKeyName: "audit_logs_created_by_fkey";
166
+ columns: ["created_by"];
167
+ isOneToOne: false;
168
+ referencedRelation: "users";
169
+ referencedColumns: ["mms_id"];
170
+ },
171
+ {
172
+ foreignKeyName: "audit_logs_organization_id_fkey";
173
+ columns: ["organization_id"];
174
+ isOneToOne: false;
175
+ referencedRelation: "organizations";
176
+ referencedColumns: ["mms_id"];
177
+ }
178
+ ];
179
+ };
180
+ billing_events: {
181
+ Row: {
182
+ billing_transaction_id: string | null;
183
+ created_at: string;
184
+ created_by: string | null;
185
+ details: Json;
186
+ event_source: string;
187
+ event_type: string;
188
+ id: number;
189
+ idempotency_key: string | null;
190
+ mms_id: string;
191
+ organization_id: string;
192
+ };
193
+ Insert: {
194
+ billing_transaction_id?: string | null;
195
+ created_at?: string;
196
+ created_by?: string | null;
197
+ details?: Json;
198
+ event_source: string;
199
+ event_type: string;
200
+ id?: never;
201
+ idempotency_key?: string | null;
202
+ mms_id?: string;
203
+ organization_id: string;
204
+ };
205
+ Update: {
206
+ billing_transaction_id?: string | null;
207
+ created_at?: string;
208
+ created_by?: string | null;
209
+ details?: Json;
210
+ event_source?: string;
211
+ event_type?: string;
212
+ id?: never;
213
+ idempotency_key?: string | null;
214
+ mms_id?: string;
215
+ organization_id?: string;
216
+ };
217
+ Relationships: [
218
+ {
219
+ foreignKeyName: "billing_events_billing_transaction_id_fkey";
220
+ columns: ["billing_transaction_id"];
221
+ isOneToOne: false;
222
+ referencedRelation: "billing_transactions";
223
+ referencedColumns: ["mms_id"];
224
+ },
225
+ {
226
+ foreignKeyName: "billing_events_created_by_fkey";
227
+ columns: ["created_by"];
228
+ isOneToOne: false;
229
+ referencedRelation: "user_profiles";
230
+ referencedColumns: ["mms_id"];
231
+ },
232
+ {
233
+ foreignKeyName: "billing_events_created_by_fkey";
234
+ columns: ["created_by"];
235
+ isOneToOne: false;
236
+ referencedRelation: "users";
237
+ referencedColumns: ["mms_id"];
238
+ },
239
+ {
240
+ foreignKeyName: "billing_events_organization_id_fkey";
241
+ columns: ["organization_id"];
242
+ isOneToOne: false;
243
+ referencedRelation: "organizations";
244
+ referencedColumns: ["mms_id"];
245
+ }
246
+ ];
247
+ };
248
+ billing_modules: {
249
+ Row: {
250
+ active: boolean;
251
+ created_at: string;
252
+ id: number;
253
+ mms_id: string;
254
+ module_key: string;
255
+ updated_at: string | null;
256
+ };
257
+ Insert: {
258
+ active?: boolean;
259
+ created_at?: string;
260
+ id?: never;
261
+ mms_id?: string;
262
+ module_key: string;
263
+ updated_at?: string | null;
264
+ };
265
+ Update: {
266
+ active?: boolean;
267
+ created_at?: string;
268
+ id?: never;
269
+ mms_id?: string;
270
+ module_key?: string;
271
+ updated_at?: string | null;
272
+ };
273
+ Relationships: [];
274
+ };
275
+ billing_transactions: {
276
+ Row: {
277
+ active_seat_count: number;
278
+ amount_minor: number;
279
+ created_at: string;
280
+ currency: string;
281
+ failure_reason: string | null;
282
+ id: number;
283
+ idempotency_key: string;
284
+ mms_id: string;
285
+ module_price_snapshot: Json | null;
286
+ modules: string[];
287
+ organization_id: string;
288
+ paid_at: string | null;
289
+ paid_seat_count: number;
290
+ paystack_access_code: string | null;
291
+ paystack_authorization_url: string | null;
292
+ paystack_reference: string | null;
293
+ proration_end_at: string | null;
294
+ proration_start_at: string | null;
295
+ transaction_status: string;
296
+ transaction_type: string;
297
+ updated_at: string | null;
298
+ user_id: string | null;
299
+ };
300
+ Insert: {
301
+ active_seat_count: number;
302
+ amount_minor: number;
303
+ created_at?: string;
304
+ currency?: string;
305
+ failure_reason?: string | null;
306
+ id?: never;
307
+ idempotency_key: string;
308
+ mms_id?: string;
309
+ module_price_snapshot?: Json | null;
310
+ modules?: string[];
311
+ organization_id: string;
312
+ paid_at?: string | null;
313
+ paid_seat_count: number;
314
+ paystack_access_code?: string | null;
315
+ paystack_authorization_url?: string | null;
316
+ paystack_reference?: string | null;
317
+ proration_end_at?: string | null;
318
+ proration_start_at?: string | null;
319
+ transaction_status?: string;
320
+ transaction_type: string;
321
+ updated_at?: string | null;
322
+ user_id?: string | null;
323
+ };
324
+ Update: {
325
+ active_seat_count?: number;
326
+ amount_minor?: number;
327
+ created_at?: string;
328
+ currency?: string;
329
+ failure_reason?: string | null;
330
+ id?: never;
331
+ idempotency_key?: string;
332
+ mms_id?: string;
333
+ module_price_snapshot?: Json | null;
334
+ modules?: string[];
335
+ organization_id?: string;
336
+ paid_at?: string | null;
337
+ paid_seat_count?: number;
338
+ paystack_access_code?: string | null;
339
+ paystack_authorization_url?: string | null;
340
+ paystack_reference?: string | null;
341
+ proration_end_at?: string | null;
342
+ proration_start_at?: string | null;
343
+ transaction_status?: string;
344
+ transaction_type?: string;
345
+ updated_at?: string | null;
346
+ user_id?: string | null;
347
+ };
348
+ Relationships: [
349
+ {
350
+ foreignKeyName: "billing_transactions_organization_id_fkey";
351
+ columns: ["organization_id"];
352
+ isOneToOne: false;
353
+ referencedRelation: "organizations";
354
+ referencedColumns: ["mms_id"];
355
+ },
356
+ {
357
+ foreignKeyName: "billing_transactions_user_id_fkey";
358
+ columns: ["user_id"];
359
+ isOneToOne: false;
360
+ referencedRelation: "user_profiles";
361
+ referencedColumns: ["mms_id"];
362
+ },
363
+ {
364
+ foreignKeyName: "billing_transactions_user_id_fkey";
365
+ columns: ["user_id"];
366
+ isOneToOne: false;
367
+ referencedRelation: "users";
368
+ referencedColumns: ["mms_id"];
369
+ }
370
+ ];
371
+ };
372
+ budget_allocations: {
373
+ Row: {
374
+ allocated_amount: number;
375
+ category_name: string;
376
+ created_at: string;
377
+ created_by: string | null;
378
+ description: string | null;
379
+ id: number;
380
+ last_updated_by: string | null;
381
+ mms_id: string;
382
+ organization_id: string;
383
+ project_id: string;
384
+ updated_at: string | null;
385
+ };
386
+ Insert: {
387
+ allocated_amount?: number;
388
+ category_name: string;
389
+ created_at?: string;
390
+ created_by?: string | null;
391
+ description?: string | null;
392
+ id?: never;
393
+ last_updated_by?: string | null;
394
+ mms_id?: string;
395
+ organization_id: string;
396
+ project_id: string;
397
+ updated_at?: string | null;
398
+ };
399
+ Update: {
400
+ allocated_amount?: number;
401
+ category_name?: string;
402
+ created_at?: string;
403
+ created_by?: string | null;
404
+ description?: string | null;
405
+ id?: never;
406
+ last_updated_by?: string | null;
407
+ mms_id?: string;
408
+ organization_id?: string;
409
+ project_id?: string;
410
+ updated_at?: string | null;
411
+ };
412
+ Relationships: [
413
+ {
414
+ foreignKeyName: "budget_allocations_created_by_fkey";
415
+ columns: ["created_by"];
416
+ isOneToOne: false;
417
+ referencedRelation: "user_profiles";
418
+ referencedColumns: ["mms_id"];
419
+ },
420
+ {
421
+ foreignKeyName: "budget_allocations_created_by_fkey";
422
+ columns: ["created_by"];
423
+ isOneToOne: false;
424
+ referencedRelation: "users";
425
+ referencedColumns: ["mms_id"];
426
+ },
427
+ {
428
+ foreignKeyName: "budget_allocations_last_updated_by_fkey";
429
+ columns: ["last_updated_by"];
430
+ isOneToOne: false;
431
+ referencedRelation: "user_profiles";
432
+ referencedColumns: ["mms_id"];
433
+ },
434
+ {
435
+ foreignKeyName: "budget_allocations_last_updated_by_fkey";
436
+ columns: ["last_updated_by"];
437
+ isOneToOne: false;
438
+ referencedRelation: "users";
439
+ referencedColumns: ["mms_id"];
440
+ },
441
+ {
442
+ foreignKeyName: "budget_allocations_organization_id_fkey";
443
+ columns: ["organization_id"];
444
+ isOneToOne: false;
445
+ referencedRelation: "organizations";
446
+ referencedColumns: ["mms_id"];
447
+ },
448
+ {
449
+ foreignKeyName: "budget_allocations_project_id_fkey";
450
+ columns: ["project_id"];
451
+ isOneToOne: false;
452
+ referencedRelation: "project_profiles";
453
+ referencedColumns: ["mms_id"];
454
+ },
455
+ {
456
+ foreignKeyName: "budget_allocations_project_id_fkey";
457
+ columns: ["project_id"];
458
+ isOneToOne: false;
459
+ referencedRelation: "projects";
460
+ referencedColumns: ["mms_id"];
461
+ }
462
+ ];
463
+ };
464
+ budget_expenses: {
465
+ Row: {
466
+ allocation_id: string | null;
467
+ amount: number;
468
+ created_at: string;
469
+ created_by: string | null;
470
+ description: string;
471
+ expense_date: string;
472
+ id: number;
473
+ last_updated_by: string | null;
474
+ mms_id: string;
475
+ organization_id: string;
476
+ project_id: string;
477
+ reference_number: string | null;
478
+ updated_at: string | null;
479
+ vendor: string | null;
480
+ };
481
+ Insert: {
482
+ allocation_id?: string | null;
483
+ amount: number;
484
+ created_at?: string;
485
+ created_by?: string | null;
486
+ description: string;
487
+ expense_date?: string;
488
+ id?: never;
489
+ last_updated_by?: string | null;
490
+ mms_id?: string;
491
+ organization_id: string;
492
+ project_id: string;
493
+ reference_number?: string | null;
494
+ updated_at?: string | null;
495
+ vendor?: string | null;
496
+ };
497
+ Update: {
498
+ allocation_id?: string | null;
499
+ amount?: number;
500
+ created_at?: string;
501
+ created_by?: string | null;
502
+ description?: string;
503
+ expense_date?: string;
504
+ id?: never;
505
+ last_updated_by?: string | null;
506
+ mms_id?: string;
507
+ organization_id?: string;
508
+ project_id?: string;
509
+ reference_number?: string | null;
510
+ updated_at?: string | null;
511
+ vendor?: string | null;
512
+ };
513
+ Relationships: [
514
+ {
515
+ foreignKeyName: "budget_expenses_allocation_id_fkey";
516
+ columns: ["allocation_id"];
517
+ isOneToOne: false;
518
+ referencedRelation: "budget_allocations";
519
+ referencedColumns: ["mms_id"];
520
+ },
521
+ {
522
+ foreignKeyName: "budget_expenses_created_by_fkey";
523
+ columns: ["created_by"];
524
+ isOneToOne: false;
525
+ referencedRelation: "user_profiles";
526
+ referencedColumns: ["mms_id"];
527
+ },
528
+ {
529
+ foreignKeyName: "budget_expenses_created_by_fkey";
530
+ columns: ["created_by"];
531
+ isOneToOne: false;
532
+ referencedRelation: "users";
533
+ referencedColumns: ["mms_id"];
534
+ },
535
+ {
536
+ foreignKeyName: "budget_expenses_last_updated_by_fkey";
537
+ columns: ["last_updated_by"];
538
+ isOneToOne: false;
539
+ referencedRelation: "user_profiles";
540
+ referencedColumns: ["mms_id"];
541
+ },
542
+ {
543
+ foreignKeyName: "budget_expenses_last_updated_by_fkey";
544
+ columns: ["last_updated_by"];
545
+ isOneToOne: false;
546
+ referencedRelation: "users";
547
+ referencedColumns: ["mms_id"];
548
+ },
549
+ {
550
+ foreignKeyName: "budget_expenses_organization_id_fkey";
551
+ columns: ["organization_id"];
552
+ isOneToOne: false;
553
+ referencedRelation: "organizations";
554
+ referencedColumns: ["mms_id"];
555
+ },
556
+ {
557
+ foreignKeyName: "budget_expenses_project_id_fkey";
558
+ columns: ["project_id"];
559
+ isOneToOne: false;
560
+ referencedRelation: "project_profiles";
561
+ referencedColumns: ["mms_id"];
562
+ },
563
+ {
564
+ foreignKeyName: "budget_expenses_project_id_fkey";
565
+ columns: ["project_id"];
566
+ isOneToOne: false;
567
+ referencedRelation: "projects";
568
+ referencedColumns: ["mms_id"];
569
+ }
570
+ ];
571
+ };
572
+ clients: {
573
+ Row: {
574
+ acquired_date: string | null;
575
+ archived: boolean;
576
+ archived_at: string | null;
577
+ archived_by: string | null;
578
+ contract_client: boolean;
579
+ contracted_hours: number | null;
580
+ created_at: string;
581
+ created_by: string | null;
582
+ deleted: boolean;
583
+ deleted_at: string | null;
584
+ deleted_by: string | null;
585
+ email: string | null;
586
+ id: number;
587
+ last_updated_by: string | null;
588
+ mms_id: string;
589
+ name: string;
590
+ organization_id: string | null;
591
+ phone: string | null;
592
+ restored_at: string | null;
593
+ restored_by: string | null;
594
+ status_id: string | null;
595
+ unarchived_at: string | null;
596
+ unarchived_by: string | null;
597
+ updated_at: string | null;
598
+ };
599
+ Insert: {
600
+ acquired_date?: string | null;
601
+ archived?: boolean;
602
+ archived_at?: string | null;
603
+ archived_by?: string | null;
604
+ contract_client?: boolean;
605
+ contracted_hours?: number | null;
606
+ created_at?: string;
607
+ created_by?: string | null;
608
+ deleted?: boolean;
609
+ deleted_at?: string | null;
610
+ deleted_by?: string | null;
611
+ email?: string | null;
612
+ id?: never;
613
+ last_updated_by?: string | null;
614
+ mms_id?: string;
615
+ name?: string;
616
+ organization_id?: string | null;
617
+ phone?: string | null;
618
+ restored_at?: string | null;
619
+ restored_by?: string | null;
620
+ status_id?: string | null;
621
+ unarchived_at?: string | null;
622
+ unarchived_by?: string | null;
623
+ updated_at?: string | null;
624
+ };
625
+ Update: {
626
+ acquired_date?: string | null;
627
+ archived?: boolean;
628
+ archived_at?: string | null;
629
+ archived_by?: string | null;
630
+ contract_client?: boolean;
631
+ contracted_hours?: number | null;
632
+ created_at?: string;
633
+ created_by?: string | null;
634
+ deleted?: boolean;
635
+ deleted_at?: string | null;
636
+ deleted_by?: string | null;
637
+ email?: string | null;
638
+ id?: never;
639
+ last_updated_by?: string | null;
640
+ mms_id?: string;
641
+ name?: string;
642
+ organization_id?: string | null;
643
+ phone?: string | null;
644
+ restored_at?: string | null;
645
+ restored_by?: string | null;
646
+ status_id?: string | null;
647
+ unarchived_at?: string | null;
648
+ unarchived_by?: string | null;
649
+ updated_at?: string | null;
650
+ };
651
+ Relationships: [
652
+ {
653
+ foreignKeyName: "clients_archived_by_fkey";
654
+ columns: ["archived_by"];
655
+ isOneToOne: false;
656
+ referencedRelation: "user_profiles";
657
+ referencedColumns: ["mms_id"];
658
+ },
659
+ {
660
+ foreignKeyName: "clients_archived_by_fkey";
661
+ columns: ["archived_by"];
662
+ isOneToOne: false;
663
+ referencedRelation: "users";
664
+ referencedColumns: ["mms_id"];
665
+ },
666
+ {
667
+ foreignKeyName: "clients_created_by_fkey";
668
+ columns: ["created_by"];
669
+ isOneToOne: false;
670
+ referencedRelation: "user_profiles";
671
+ referencedColumns: ["mms_id"];
672
+ },
673
+ {
674
+ foreignKeyName: "clients_created_by_fkey";
675
+ columns: ["created_by"];
676
+ isOneToOne: false;
677
+ referencedRelation: "users";
678
+ referencedColumns: ["mms_id"];
679
+ },
680
+ {
681
+ foreignKeyName: "clients_deleted_by_fkey";
682
+ columns: ["deleted_by"];
683
+ isOneToOne: false;
684
+ referencedRelation: "user_profiles";
685
+ referencedColumns: ["mms_id"];
686
+ },
687
+ {
688
+ foreignKeyName: "clients_deleted_by_fkey";
689
+ columns: ["deleted_by"];
690
+ isOneToOne: false;
691
+ referencedRelation: "users";
692
+ referencedColumns: ["mms_id"];
693
+ },
694
+ {
695
+ foreignKeyName: "clients_last_updated_by_fkey";
696
+ columns: ["last_updated_by"];
697
+ isOneToOne: false;
698
+ referencedRelation: "user_profiles";
699
+ referencedColumns: ["mms_id"];
700
+ },
701
+ {
702
+ foreignKeyName: "clients_last_updated_by_fkey";
703
+ columns: ["last_updated_by"];
704
+ isOneToOne: false;
705
+ referencedRelation: "users";
706
+ referencedColumns: ["mms_id"];
707
+ },
708
+ {
709
+ foreignKeyName: "clients_organization_id_fkey";
710
+ columns: ["organization_id"];
711
+ isOneToOne: false;
712
+ referencedRelation: "organizations";
713
+ referencedColumns: ["mms_id"];
714
+ },
715
+ {
716
+ foreignKeyName: "clients_restored_by_fkey";
717
+ columns: ["restored_by"];
718
+ isOneToOne: false;
719
+ referencedRelation: "user_profiles";
720
+ referencedColumns: ["mms_id"];
721
+ },
722
+ {
723
+ foreignKeyName: "clients_restored_by_fkey";
724
+ columns: ["restored_by"];
725
+ isOneToOne: false;
726
+ referencedRelation: "users";
727
+ referencedColumns: ["mms_id"];
728
+ },
729
+ {
730
+ foreignKeyName: "clients_status_id_fkey";
731
+ columns: ["status_id"];
732
+ isOneToOne: false;
733
+ referencedRelation: "statuses";
734
+ referencedColumns: ["mms_id"];
735
+ },
736
+ {
737
+ foreignKeyName: "clients_unarchived_by_fkey";
738
+ columns: ["unarchived_by"];
739
+ isOneToOne: false;
740
+ referencedRelation: "user_profiles";
741
+ referencedColumns: ["mms_id"];
742
+ },
743
+ {
744
+ foreignKeyName: "clients_unarchived_by_fkey";
745
+ columns: ["unarchived_by"];
746
+ isOneToOne: false;
747
+ referencedRelation: "users";
748
+ referencedColumns: ["mms_id"];
749
+ }
750
+ ];
751
+ };
752
+ notes: {
753
+ Row: {
754
+ content: string;
755
+ created_at: string;
756
+ entity_id: string;
757
+ entity_type: string;
758
+ id: number;
759
+ last_updated_by: string | null;
760
+ mms_id: string;
761
+ organization_id: string;
762
+ pinned: boolean;
763
+ updated_at: string;
764
+ user_id: string;
765
+ };
766
+ Insert: {
767
+ content: string;
768
+ created_at?: string;
769
+ entity_id: string;
770
+ entity_type?: string;
771
+ id?: never;
772
+ last_updated_by?: string | null;
773
+ mms_id?: string;
774
+ organization_id: string;
775
+ pinned?: boolean;
776
+ updated_at?: string;
777
+ user_id: string;
778
+ };
779
+ Update: {
780
+ content?: string;
781
+ created_at?: string;
782
+ entity_id?: string;
783
+ entity_type?: string;
784
+ id?: never;
785
+ last_updated_by?: string | null;
786
+ mms_id?: string;
787
+ organization_id?: string;
788
+ pinned?: boolean;
789
+ updated_at?: string;
790
+ user_id?: string;
791
+ };
792
+ Relationships: [
793
+ {
794
+ foreignKeyName: "notes_last_updated_by_fkey";
795
+ columns: ["last_updated_by"];
796
+ isOneToOne: false;
797
+ referencedRelation: "user_profiles";
798
+ referencedColumns: ["mms_id"];
799
+ },
800
+ {
801
+ foreignKeyName: "notes_last_updated_by_fkey";
802
+ columns: ["last_updated_by"];
803
+ isOneToOne: false;
804
+ referencedRelation: "users";
805
+ referencedColumns: ["mms_id"];
806
+ },
807
+ {
808
+ foreignKeyName: "notes_organization_id_fkey";
809
+ columns: ["organization_id"];
810
+ isOneToOne: false;
811
+ referencedRelation: "organizations";
812
+ referencedColumns: ["mms_id"];
813
+ },
814
+ {
815
+ foreignKeyName: "notes_user_id_fkey";
816
+ columns: ["user_id"];
817
+ isOneToOne: false;
818
+ referencedRelation: "user_profiles";
819
+ referencedColumns: ["mms_id"];
820
+ },
821
+ {
822
+ foreignKeyName: "notes_user_id_fkey";
823
+ columns: ["user_id"];
824
+ isOneToOne: false;
825
+ referencedRelation: "users";
826
+ referencedColumns: ["mms_id"];
827
+ }
828
+ ];
829
+ };
830
+ notifications: {
831
+ Row: {
832
+ attempts: number;
833
+ channel: string;
834
+ created_at: string;
835
+ created_by: string | null;
836
+ deleted: boolean;
837
+ deleted_at: string | null;
838
+ delivered_at: string | null;
839
+ delivery_failure_reason: string | null;
840
+ failed_at: string | null;
841
+ failure_reason: string | null;
842
+ id: number;
843
+ last_attempted_at: string | null;
844
+ mms_id: string;
845
+ opened_at: string | null;
846
+ organization_id: string | null;
847
+ provider: string | null;
848
+ provider_message_id: string | null;
849
+ read_at: string | null;
850
+ recipient_email: string | null;
851
+ recipient_id: string | null;
852
+ recipient_phone: string | null;
853
+ rendered_content: Json | null;
854
+ sent_at: string | null;
855
+ status: string;
856
+ template_id: string | null;
857
+ template_variables: Json;
858
+ type: string;
859
+ updated_at: string | null;
860
+ };
861
+ Insert: {
862
+ attempts?: number;
863
+ channel: string;
864
+ created_at?: string;
865
+ created_by?: string | null;
866
+ deleted?: boolean;
867
+ deleted_at?: string | null;
868
+ delivered_at?: string | null;
869
+ delivery_failure_reason?: string | null;
870
+ failed_at?: string | null;
871
+ failure_reason?: string | null;
872
+ id?: never;
873
+ last_attempted_at?: string | null;
874
+ mms_id?: string;
875
+ opened_at?: string | null;
876
+ organization_id?: string | null;
877
+ provider?: string | null;
878
+ provider_message_id?: string | null;
879
+ read_at?: string | null;
880
+ recipient_email?: string | null;
881
+ recipient_id?: string | null;
882
+ recipient_phone?: string | null;
883
+ rendered_content?: Json | null;
884
+ sent_at?: string | null;
885
+ status?: string;
886
+ template_id?: string | null;
887
+ template_variables?: Json;
888
+ type: string;
889
+ updated_at?: string | null;
890
+ };
891
+ Update: {
892
+ attempts?: number;
893
+ channel?: string;
894
+ created_at?: string;
895
+ created_by?: string | null;
896
+ deleted?: boolean;
897
+ deleted_at?: string | null;
898
+ delivered_at?: string | null;
899
+ delivery_failure_reason?: string | null;
900
+ failed_at?: string | null;
901
+ failure_reason?: string | null;
902
+ id?: never;
903
+ last_attempted_at?: string | null;
904
+ mms_id?: string;
905
+ opened_at?: string | null;
906
+ organization_id?: string | null;
907
+ provider?: string | null;
908
+ provider_message_id?: string | null;
909
+ read_at?: string | null;
910
+ recipient_email?: string | null;
911
+ recipient_id?: string | null;
912
+ recipient_phone?: string | null;
913
+ rendered_content?: Json | null;
914
+ sent_at?: string | null;
915
+ status?: string;
916
+ template_id?: string | null;
917
+ template_variables?: Json;
918
+ type?: string;
919
+ updated_at?: string | null;
920
+ };
921
+ Relationships: [
922
+ {
923
+ foreignKeyName: "notifications_created_by_fkey";
924
+ columns: ["created_by"];
925
+ isOneToOne: false;
926
+ referencedRelation: "user_profiles";
927
+ referencedColumns: ["mms_id"];
928
+ },
929
+ {
930
+ foreignKeyName: "notifications_created_by_fkey";
931
+ columns: ["created_by"];
932
+ isOneToOne: false;
933
+ referencedRelation: "users";
934
+ referencedColumns: ["mms_id"];
935
+ },
936
+ {
937
+ foreignKeyName: "notifications_organization_id_fkey";
938
+ columns: ["organization_id"];
939
+ isOneToOne: false;
940
+ referencedRelation: "organizations";
941
+ referencedColumns: ["mms_id"];
942
+ },
943
+ {
944
+ foreignKeyName: "notifications_recipient_id_fkey";
945
+ columns: ["recipient_id"];
946
+ isOneToOne: false;
947
+ referencedRelation: "user_profiles";
948
+ referencedColumns: ["mms_id"];
949
+ },
950
+ {
951
+ foreignKeyName: "notifications_recipient_id_fkey";
952
+ columns: ["recipient_id"];
953
+ isOneToOne: false;
954
+ referencedRelation: "users";
955
+ referencedColumns: ["mms_id"];
956
+ }
957
+ ];
958
+ };
959
+ organizations: {
960
+ Row: {
961
+ access_expires_at: string | null;
962
+ active_seat_count: number;
963
+ address_billing_line_1: string | null;
964
+ address_billing_line_2: string | null;
965
+ address_line_1: string | null;
966
+ address_line_2: string | null;
967
+ billing_city: string | null;
968
+ billing_country: string | null;
969
+ billing_cycle_locked: boolean;
970
+ billing_post_code: string | null;
971
+ billing_state: string | null;
972
+ billing_status: string;
973
+ billing_status_updated_at: string | null;
974
+ card_brand: string | null;
975
+ card_description: string | null;
976
+ card_expiring_soon: boolean;
977
+ card_expiry_date: string | null;
978
+ city: string | null;
979
+ consent: boolean;
980
+ consent_given_at: string | null;
981
+ country: string | null;
982
+ created_at: string;
983
+ currency: string;
984
+ email: string;
985
+ id: number;
986
+ industry: string | null;
987
+ last_payment_date: string | null;
988
+ last_updated_by: string | null;
989
+ leave_calendar_start_month: number;
990
+ marketing_consent: boolean;
991
+ mms_id: string;
992
+ modules: string[] | null;
993
+ name: string;
994
+ next_payment_date: string | null;
995
+ paid_seat_count: number;
996
+ payment_frequency: string;
997
+ payment_override: boolean;
998
+ paystack_customer_authorization_code: string | null;
999
+ paystack_customer_code: string | null;
1000
+ paystack_customer_created_at: string | null;
1001
+ paystack_plan_code: string | null;
1002
+ paystack_plan_created_at: string | null;
1003
+ paystack_subscription_code: string | null;
1004
+ paystack_subscription_created_at: string | null;
1005
+ paystack_subscription_email_token: string | null;
1006
+ phone: string | null;
1007
+ post_code: string | null;
1008
+ pricebook_id: string | null;
1009
+ registration_number: string | null;
1010
+ state: string | null;
1011
+ trading_name: string | null;
1012
+ type: string;
1013
+ updated_at: string | null;
1014
+ use_address_for_billing: boolean;
1015
+ vat_number: string | null;
1016
+ website: string | null;
1017
+ };
1018
+ Insert: {
1019
+ access_expires_at?: string | null;
1020
+ active_seat_count?: number;
1021
+ address_billing_line_1?: string | null;
1022
+ address_billing_line_2?: string | null;
1023
+ address_line_1?: string | null;
1024
+ address_line_2?: string | null;
1025
+ billing_city?: string | null;
1026
+ billing_country?: string | null;
1027
+ billing_cycle_locked?: boolean;
1028
+ billing_post_code?: string | null;
1029
+ billing_state?: string | null;
1030
+ billing_status?: string;
1031
+ billing_status_updated_at?: string | null;
1032
+ card_brand?: string | null;
1033
+ card_description?: string | null;
1034
+ card_expiring_soon?: boolean;
1035
+ card_expiry_date?: string | null;
1036
+ city?: string | null;
1037
+ consent?: boolean;
1038
+ consent_given_at?: string | null;
1039
+ country?: string | null;
1040
+ created_at?: string;
1041
+ currency?: string;
1042
+ email?: string;
1043
+ id?: never;
1044
+ industry?: string | null;
1045
+ last_payment_date?: string | null;
1046
+ last_updated_by?: string | null;
1047
+ leave_calendar_start_month?: number;
1048
+ marketing_consent?: boolean;
1049
+ mms_id?: string;
1050
+ modules?: string[] | null;
1051
+ name?: string;
1052
+ next_payment_date?: string | null;
1053
+ paid_seat_count?: number;
1054
+ payment_frequency?: string;
1055
+ payment_override?: boolean;
1056
+ paystack_customer_authorization_code?: string | null;
1057
+ paystack_customer_code?: string | null;
1058
+ paystack_customer_created_at?: string | null;
1059
+ paystack_plan_code?: string | null;
1060
+ paystack_plan_created_at?: string | null;
1061
+ paystack_subscription_code?: string | null;
1062
+ paystack_subscription_created_at?: string | null;
1063
+ paystack_subscription_email_token?: string | null;
1064
+ phone?: string | null;
1065
+ post_code?: string | null;
1066
+ pricebook_id?: string | null;
1067
+ registration_number?: string | null;
1068
+ state?: string | null;
1069
+ trading_name?: string | null;
1070
+ type?: string;
1071
+ updated_at?: string | null;
1072
+ use_address_for_billing?: boolean;
1073
+ vat_number?: string | null;
1074
+ website?: string | null;
1075
+ };
1076
+ Update: {
1077
+ access_expires_at?: string | null;
1078
+ active_seat_count?: number;
1079
+ address_billing_line_1?: string | null;
1080
+ address_billing_line_2?: string | null;
1081
+ address_line_1?: string | null;
1082
+ address_line_2?: string | null;
1083
+ billing_city?: string | null;
1084
+ billing_country?: string | null;
1085
+ billing_cycle_locked?: boolean;
1086
+ billing_post_code?: string | null;
1087
+ billing_state?: string | null;
1088
+ billing_status?: string;
1089
+ billing_status_updated_at?: string | null;
1090
+ card_brand?: string | null;
1091
+ card_description?: string | null;
1092
+ card_expiring_soon?: boolean;
1093
+ card_expiry_date?: string | null;
1094
+ city?: string | null;
1095
+ consent?: boolean;
1096
+ consent_given_at?: string | null;
1097
+ country?: string | null;
1098
+ created_at?: string;
1099
+ currency?: string;
1100
+ email?: string;
1101
+ id?: never;
1102
+ industry?: string | null;
1103
+ last_payment_date?: string | null;
1104
+ last_updated_by?: string | null;
1105
+ leave_calendar_start_month?: number;
1106
+ marketing_consent?: boolean;
1107
+ mms_id?: string;
1108
+ modules?: string[] | null;
1109
+ name?: string;
1110
+ next_payment_date?: string | null;
1111
+ paid_seat_count?: number;
1112
+ payment_frequency?: string;
1113
+ payment_override?: boolean;
1114
+ paystack_customer_authorization_code?: string | null;
1115
+ paystack_customer_code?: string | null;
1116
+ paystack_customer_created_at?: string | null;
1117
+ paystack_plan_code?: string | null;
1118
+ paystack_plan_created_at?: string | null;
1119
+ paystack_subscription_code?: string | null;
1120
+ paystack_subscription_created_at?: string | null;
1121
+ paystack_subscription_email_token?: string | null;
1122
+ phone?: string | null;
1123
+ post_code?: string | null;
1124
+ pricebook_id?: string | null;
1125
+ registration_number?: string | null;
1126
+ state?: string | null;
1127
+ trading_name?: string | null;
1128
+ type?: string;
1129
+ updated_at?: string | null;
1130
+ use_address_for_billing?: boolean;
1131
+ vat_number?: string | null;
1132
+ website?: string | null;
1133
+ };
1134
+ Relationships: [
1135
+ {
1136
+ foreignKeyName: "organizations_last_updated_by_fkey";
1137
+ columns: ["last_updated_by"];
1138
+ isOneToOne: false;
1139
+ referencedRelation: "user_profiles";
1140
+ referencedColumns: ["mms_id"];
1141
+ },
1142
+ {
1143
+ foreignKeyName: "organizations_last_updated_by_fkey";
1144
+ columns: ["last_updated_by"];
1145
+ isOneToOne: false;
1146
+ referencedRelation: "users";
1147
+ referencedColumns: ["mms_id"];
1148
+ },
1149
+ {
1150
+ foreignKeyName: "organizations_pricebook_id_fkey";
1151
+ columns: ["pricebook_id"];
1152
+ isOneToOne: false;
1153
+ referencedRelation: "pricebooks";
1154
+ referencedColumns: ["mms_id"];
1155
+ }
1156
+ ];
1157
+ };
1158
+ paystack_webhook_events: {
1159
+ Row: {
1160
+ created_at: string;
1161
+ event_key: string;
1162
+ event_type: string;
1163
+ failed_at: string | null;
1164
+ failure_reason: string | null;
1165
+ id: number;
1166
+ mms_id: string;
1167
+ organization_id: string | null;
1168
+ payload: Json;
1169
+ processed_at: string | null;
1170
+ processing_started_at: string | null;
1171
+ processing_status: string;
1172
+ received_at: string;
1173
+ };
1174
+ Insert: {
1175
+ created_at?: string;
1176
+ event_key: string;
1177
+ event_type: string;
1178
+ failed_at?: string | null;
1179
+ failure_reason?: string | null;
1180
+ id?: never;
1181
+ mms_id?: string;
1182
+ organization_id?: string | null;
1183
+ payload: Json;
1184
+ processed_at?: string | null;
1185
+ processing_started_at?: string | null;
1186
+ processing_status?: string;
1187
+ received_at?: string;
1188
+ };
1189
+ Update: {
1190
+ created_at?: string;
1191
+ event_key?: string;
1192
+ event_type?: string;
1193
+ failed_at?: string | null;
1194
+ failure_reason?: string | null;
1195
+ id?: never;
1196
+ mms_id?: string;
1197
+ organization_id?: string | null;
1198
+ payload?: Json;
1199
+ processed_at?: string | null;
1200
+ processing_started_at?: string | null;
1201
+ processing_status?: string;
1202
+ received_at?: string;
1203
+ };
1204
+ Relationships: [
1205
+ {
1206
+ foreignKeyName: "paystack_webhook_events_organization_id_fkey";
1207
+ columns: ["organization_id"];
1208
+ isOneToOne: false;
1209
+ referencedRelation: "organizations";
1210
+ referencedColumns: ["mms_id"];
1211
+ }
1212
+ ];
1213
+ };
1214
+ permissions: {
1215
+ Row: {
1216
+ create_budgets: boolean;
1217
+ create_clients: boolean;
1218
+ create_documents: boolean;
1219
+ create_invoices: boolean;
1220
+ create_leave: boolean;
1221
+ create_leave_requests: boolean;
1222
+ create_leave_types: boolean;
1223
+ create_logs: boolean;
1224
+ create_notifications: boolean;
1225
+ create_organizations: boolean;
1226
+ create_payments: boolean;
1227
+ create_projects: boolean;
1228
+ create_statuses: boolean;
1229
+ create_subscriptions: boolean;
1230
+ create_tasks: boolean;
1231
+ create_user_permissions: boolean;
1232
+ create_users: boolean;
1233
+ delete_budgets: boolean;
1234
+ delete_clients: boolean;
1235
+ delete_documents: boolean;
1236
+ delete_invoices: boolean;
1237
+ delete_leave: boolean;
1238
+ delete_leave_requests: boolean;
1239
+ delete_leave_types: boolean;
1240
+ delete_logs: boolean;
1241
+ delete_notifications: boolean;
1242
+ delete_organizations: boolean;
1243
+ delete_payments: boolean;
1244
+ delete_projects: boolean;
1245
+ delete_statuses: boolean;
1246
+ delete_subscriptions: boolean;
1247
+ delete_tasks: boolean;
1248
+ delete_user_permissions: boolean;
1249
+ delete_users: boolean;
1250
+ id: number;
1251
+ is_admin: boolean;
1252
+ is_owner: boolean;
1253
+ mms_id: string;
1254
+ organization_id: string;
1255
+ read_budgets: boolean;
1256
+ read_clients: boolean;
1257
+ read_docuemnts: boolean;
1258
+ read_invoices: boolean;
1259
+ read_leave: boolean;
1260
+ read_leave_requests: boolean;
1261
+ read_leave_types: boolean;
1262
+ read_logs: boolean;
1263
+ read_notifications: boolean;
1264
+ read_organizations: boolean;
1265
+ read_payments: boolean;
1266
+ read_projects: boolean;
1267
+ read_statuses: boolean;
1268
+ read_subscriptions: boolean;
1269
+ read_tasks: boolean;
1270
+ read_user_permissions: boolean;
1271
+ read_users: boolean;
1272
+ update_budgets: boolean;
1273
+ update_clients: boolean;
1274
+ update_documents: boolean;
1275
+ update_invoices: boolean;
1276
+ update_leave: boolean;
1277
+ update_leave_requests: boolean;
1278
+ update_leave_types: boolean;
1279
+ update_logs: boolean;
1280
+ update_notifications: boolean;
1281
+ update_organizations: boolean;
1282
+ update_payments: boolean;
1283
+ update_projects: boolean;
1284
+ update_statuses: boolean;
1285
+ update_subscriptions: boolean;
1286
+ update_tasks: boolean;
1287
+ update_user_permissions: boolean;
1288
+ update_users: boolean;
1289
+ user_id: string;
1290
+ view_dashboard: boolean;
1291
+ };
1292
+ Insert: {
1293
+ create_budgets?: boolean;
1294
+ create_clients?: boolean;
1295
+ create_documents?: boolean;
1296
+ create_invoices?: boolean;
1297
+ create_leave?: boolean;
1298
+ create_leave_requests?: boolean;
1299
+ create_leave_types?: boolean;
1300
+ create_logs?: boolean;
1301
+ create_notifications?: boolean;
1302
+ create_organizations?: boolean;
1303
+ create_payments?: boolean;
1304
+ create_projects?: boolean;
1305
+ create_statuses?: boolean;
1306
+ create_subscriptions?: boolean;
1307
+ create_tasks?: boolean;
1308
+ create_user_permissions?: boolean;
1309
+ create_users?: boolean;
1310
+ delete_budgets?: boolean;
1311
+ delete_clients?: boolean;
1312
+ delete_documents?: boolean;
1313
+ delete_invoices?: boolean;
1314
+ delete_leave?: boolean;
1315
+ delete_leave_requests?: boolean;
1316
+ delete_leave_types?: boolean;
1317
+ delete_logs?: boolean;
1318
+ delete_notifications?: boolean;
1319
+ delete_organizations?: boolean;
1320
+ delete_payments?: boolean;
1321
+ delete_projects?: boolean;
1322
+ delete_statuses?: boolean;
1323
+ delete_subscriptions?: boolean;
1324
+ delete_tasks?: boolean;
1325
+ delete_user_permissions?: boolean;
1326
+ delete_users?: boolean;
1327
+ id?: never;
1328
+ is_admin?: boolean;
1329
+ is_owner?: boolean;
1330
+ mms_id?: string;
1331
+ organization_id: string;
1332
+ read_budgets?: boolean;
1333
+ read_clients?: boolean;
1334
+ read_docuemnts?: boolean;
1335
+ read_invoices?: boolean;
1336
+ read_leave?: boolean;
1337
+ read_leave_requests?: boolean;
1338
+ read_leave_types?: boolean;
1339
+ read_logs?: boolean;
1340
+ read_notifications?: boolean;
1341
+ read_organizations?: boolean;
1342
+ read_payments?: boolean;
1343
+ read_projects?: boolean;
1344
+ read_statuses?: boolean;
1345
+ read_subscriptions?: boolean;
1346
+ read_tasks?: boolean;
1347
+ read_user_permissions?: boolean;
1348
+ read_users?: boolean;
1349
+ update_budgets?: boolean;
1350
+ update_clients?: boolean;
1351
+ update_documents?: boolean;
1352
+ update_invoices?: boolean;
1353
+ update_leave?: boolean;
1354
+ update_leave_requests?: boolean;
1355
+ update_leave_types?: boolean;
1356
+ update_logs?: boolean;
1357
+ update_notifications?: boolean;
1358
+ update_organizations?: boolean;
1359
+ update_payments?: boolean;
1360
+ update_projects?: boolean;
1361
+ update_statuses?: boolean;
1362
+ update_subscriptions?: boolean;
1363
+ update_tasks?: boolean;
1364
+ update_user_permissions?: boolean;
1365
+ update_users?: boolean;
1366
+ user_id: string;
1367
+ view_dashboard?: boolean;
1368
+ };
1369
+ Update: {
1370
+ create_budgets?: boolean;
1371
+ create_clients?: boolean;
1372
+ create_documents?: boolean;
1373
+ create_invoices?: boolean;
1374
+ create_leave?: boolean;
1375
+ create_leave_requests?: boolean;
1376
+ create_leave_types?: boolean;
1377
+ create_logs?: boolean;
1378
+ create_notifications?: boolean;
1379
+ create_organizations?: boolean;
1380
+ create_payments?: boolean;
1381
+ create_projects?: boolean;
1382
+ create_statuses?: boolean;
1383
+ create_subscriptions?: boolean;
1384
+ create_tasks?: boolean;
1385
+ create_user_permissions?: boolean;
1386
+ create_users?: boolean;
1387
+ delete_budgets?: boolean;
1388
+ delete_clients?: boolean;
1389
+ delete_documents?: boolean;
1390
+ delete_invoices?: boolean;
1391
+ delete_leave?: boolean;
1392
+ delete_leave_requests?: boolean;
1393
+ delete_leave_types?: boolean;
1394
+ delete_logs?: boolean;
1395
+ delete_notifications?: boolean;
1396
+ delete_organizations?: boolean;
1397
+ delete_payments?: boolean;
1398
+ delete_projects?: boolean;
1399
+ delete_statuses?: boolean;
1400
+ delete_subscriptions?: boolean;
1401
+ delete_tasks?: boolean;
1402
+ delete_user_permissions?: boolean;
1403
+ delete_users?: boolean;
1404
+ id?: never;
1405
+ is_admin?: boolean;
1406
+ is_owner?: boolean;
1407
+ mms_id?: string;
1408
+ organization_id?: string;
1409
+ read_budgets?: boolean;
1410
+ read_clients?: boolean;
1411
+ read_docuemnts?: boolean;
1412
+ read_invoices?: boolean;
1413
+ read_leave?: boolean;
1414
+ read_leave_requests?: boolean;
1415
+ read_leave_types?: boolean;
1416
+ read_logs?: boolean;
1417
+ read_notifications?: boolean;
1418
+ read_organizations?: boolean;
1419
+ read_payments?: boolean;
1420
+ read_projects?: boolean;
1421
+ read_statuses?: boolean;
1422
+ read_subscriptions?: boolean;
1423
+ read_tasks?: boolean;
1424
+ read_user_permissions?: boolean;
1425
+ read_users?: boolean;
1426
+ update_budgets?: boolean;
1427
+ update_clients?: boolean;
1428
+ update_documents?: boolean;
1429
+ update_invoices?: boolean;
1430
+ update_leave?: boolean;
1431
+ update_leave_requests?: boolean;
1432
+ update_leave_types?: boolean;
1433
+ update_logs?: boolean;
1434
+ update_notifications?: boolean;
1435
+ update_organizations?: boolean;
1436
+ update_payments?: boolean;
1437
+ update_projects?: boolean;
1438
+ update_statuses?: boolean;
1439
+ update_subscriptions?: boolean;
1440
+ update_tasks?: boolean;
1441
+ update_user_permissions?: boolean;
1442
+ update_users?: boolean;
1443
+ user_id?: string;
1444
+ view_dashboard?: boolean;
1445
+ };
1446
+ Relationships: [
1447
+ {
1448
+ foreignKeyName: "permissions_organization_id_fkey";
1449
+ columns: ["organization_id"];
1450
+ isOneToOne: false;
1451
+ referencedRelation: "organizations";
1452
+ referencedColumns: ["mms_id"];
1453
+ },
1454
+ {
1455
+ foreignKeyName: "permissions_user_id_fkey";
1456
+ columns: ["user_id"];
1457
+ isOneToOne: false;
1458
+ referencedRelation: "user_profiles";
1459
+ referencedColumns: ["mms_id"];
1460
+ },
1461
+ {
1462
+ foreignKeyName: "permissions_user_id_fkey";
1463
+ columns: ["user_id"];
1464
+ isOneToOne: false;
1465
+ referencedRelation: "users";
1466
+ referencedColumns: ["mms_id"];
1467
+ }
1468
+ ];
1469
+ };
1470
+ pricebook_modules: {
1471
+ Row: {
1472
+ created_at: string;
1473
+ currency: string;
1474
+ id: number;
1475
+ mms_id: string;
1476
+ module_id: string;
1477
+ pricebook_id: string;
1478
+ unit_amount_minor: number;
1479
+ };
1480
+ Insert: {
1481
+ created_at?: string;
1482
+ currency?: string;
1483
+ id?: never;
1484
+ mms_id?: string;
1485
+ module_id: string;
1486
+ pricebook_id: string;
1487
+ unit_amount_minor: number;
1488
+ };
1489
+ Update: {
1490
+ created_at?: string;
1491
+ currency?: string;
1492
+ id?: never;
1493
+ mms_id?: string;
1494
+ module_id?: string;
1495
+ pricebook_id?: string;
1496
+ unit_amount_minor?: number;
1497
+ };
1498
+ Relationships: [
1499
+ {
1500
+ foreignKeyName: "pricebook_modules_module_id_fkey";
1501
+ columns: ["module_id"];
1502
+ isOneToOne: false;
1503
+ referencedRelation: "billing_modules";
1504
+ referencedColumns: ["mms_id"];
1505
+ },
1506
+ {
1507
+ foreignKeyName: "pricebook_modules_pricebook_id_fkey";
1508
+ columns: ["pricebook_id"];
1509
+ isOneToOne: false;
1510
+ referencedRelation: "pricebooks";
1511
+ referencedColumns: ["mms_id"];
1512
+ }
1513
+ ];
1514
+ };
1515
+ pricebooks: {
1516
+ Row: {
1517
+ active: boolean;
1518
+ created_at: string;
1519
+ description: string | null;
1520
+ id: number;
1521
+ mms_id: string;
1522
+ name: string;
1523
+ updated_at: string | null;
1524
+ };
1525
+ Insert: {
1526
+ active?: boolean;
1527
+ created_at?: string;
1528
+ description?: string | null;
1529
+ id?: never;
1530
+ mms_id?: string;
1531
+ name: string;
1532
+ updated_at?: string | null;
1533
+ };
1534
+ Update: {
1535
+ active?: boolean;
1536
+ created_at?: string;
1537
+ description?: string | null;
1538
+ id?: never;
1539
+ mms_id?: string;
1540
+ name?: string;
1541
+ updated_at?: string | null;
1542
+ };
1543
+ Relationships: [];
1544
+ };
1545
+ projects: {
1546
+ Row: {
1547
+ archived: boolean;
1548
+ archived_at: string | null;
1549
+ archived_by: string | null;
1550
+ client_id: string | null;
1551
+ created_at: string;
1552
+ created_by: string | null;
1553
+ deleted: boolean;
1554
+ deleted_at: string | null;
1555
+ deleted_by: string | null;
1556
+ end_date: string | null;
1557
+ has_budget: boolean;
1558
+ id: number;
1559
+ last_updated_by: string | null;
1560
+ manager_id: string | null;
1561
+ mms_id: string;
1562
+ name: string;
1563
+ organization_id: string;
1564
+ restored_at: string | null;
1565
+ restored_by: string | null;
1566
+ specification: string | null;
1567
+ start_date: string | null;
1568
+ status_id: string | null;
1569
+ unarchived_at: string | null;
1570
+ unarchived_by: string | null;
1571
+ updated_at: string | null;
1572
+ };
1573
+ Insert: {
1574
+ archived?: boolean;
1575
+ archived_at?: string | null;
1576
+ archived_by?: string | null;
1577
+ client_id?: string | null;
1578
+ created_at?: string;
1579
+ created_by?: string | null;
1580
+ deleted?: boolean;
1581
+ deleted_at?: string | null;
1582
+ deleted_by?: string | null;
1583
+ end_date?: string | null;
1584
+ has_budget?: boolean;
1585
+ id?: never;
1586
+ last_updated_by?: string | null;
1587
+ manager_id?: string | null;
1588
+ mms_id?: string;
1589
+ name?: string;
1590
+ organization_id: string;
1591
+ restored_at?: string | null;
1592
+ restored_by?: string | null;
1593
+ specification?: string | null;
1594
+ start_date?: string | null;
1595
+ status_id?: string | null;
1596
+ unarchived_at?: string | null;
1597
+ unarchived_by?: string | null;
1598
+ updated_at?: string | null;
1599
+ };
1600
+ Update: {
1601
+ archived?: boolean;
1602
+ archived_at?: string | null;
1603
+ archived_by?: string | null;
1604
+ client_id?: string | null;
1605
+ created_at?: string;
1606
+ created_by?: string | null;
1607
+ deleted?: boolean;
1608
+ deleted_at?: string | null;
1609
+ deleted_by?: string | null;
1610
+ end_date?: string | null;
1611
+ has_budget?: boolean;
1612
+ id?: never;
1613
+ last_updated_by?: string | null;
1614
+ manager_id?: string | null;
1615
+ mms_id?: string;
1616
+ name?: string;
1617
+ organization_id?: string;
1618
+ restored_at?: string | null;
1619
+ restored_by?: string | null;
1620
+ specification?: string | null;
1621
+ start_date?: string | null;
1622
+ status_id?: string | null;
1623
+ unarchived_at?: string | null;
1624
+ unarchived_by?: string | null;
1625
+ updated_at?: string | null;
1626
+ };
1627
+ Relationships: [
1628
+ {
1629
+ foreignKeyName: "projects_archived_by_fkey";
1630
+ columns: ["archived_by"];
1631
+ isOneToOne: false;
1632
+ referencedRelation: "user_profiles";
1633
+ referencedColumns: ["mms_id"];
1634
+ },
1635
+ {
1636
+ foreignKeyName: "projects_archived_by_fkey";
1637
+ columns: ["archived_by"];
1638
+ isOneToOne: false;
1639
+ referencedRelation: "users";
1640
+ referencedColumns: ["mms_id"];
1641
+ },
1642
+ {
1643
+ foreignKeyName: "projects_client_id_fkey";
1644
+ columns: ["client_id"];
1645
+ isOneToOne: false;
1646
+ referencedRelation: "client_profiles";
1647
+ referencedColumns: ["mms_id"];
1648
+ },
1649
+ {
1650
+ foreignKeyName: "projects_client_id_fkey";
1651
+ columns: ["client_id"];
1652
+ isOneToOne: false;
1653
+ referencedRelation: "clients";
1654
+ referencedColumns: ["mms_id"];
1655
+ },
1656
+ {
1657
+ foreignKeyName: "projects_created_by_fkey";
1658
+ columns: ["created_by"];
1659
+ isOneToOne: false;
1660
+ referencedRelation: "user_profiles";
1661
+ referencedColumns: ["mms_id"];
1662
+ },
1663
+ {
1664
+ foreignKeyName: "projects_created_by_fkey";
1665
+ columns: ["created_by"];
1666
+ isOneToOne: false;
1667
+ referencedRelation: "users";
1668
+ referencedColumns: ["mms_id"];
1669
+ },
1670
+ {
1671
+ foreignKeyName: "projects_deleted_by_fkey";
1672
+ columns: ["deleted_by"];
1673
+ isOneToOne: false;
1674
+ referencedRelation: "user_profiles";
1675
+ referencedColumns: ["mms_id"];
1676
+ },
1677
+ {
1678
+ foreignKeyName: "projects_deleted_by_fkey";
1679
+ columns: ["deleted_by"];
1680
+ isOneToOne: false;
1681
+ referencedRelation: "users";
1682
+ referencedColumns: ["mms_id"];
1683
+ },
1684
+ {
1685
+ foreignKeyName: "projects_last_updated_by_fkey";
1686
+ columns: ["last_updated_by"];
1687
+ isOneToOne: false;
1688
+ referencedRelation: "user_profiles";
1689
+ referencedColumns: ["mms_id"];
1690
+ },
1691
+ {
1692
+ foreignKeyName: "projects_last_updated_by_fkey";
1693
+ columns: ["last_updated_by"];
1694
+ isOneToOne: false;
1695
+ referencedRelation: "users";
1696
+ referencedColumns: ["mms_id"];
1697
+ },
1698
+ {
1699
+ foreignKeyName: "projects_manager_id_fkey";
1700
+ columns: ["manager_id"];
1701
+ isOneToOne: false;
1702
+ referencedRelation: "user_profiles";
1703
+ referencedColumns: ["mms_id"];
1704
+ },
1705
+ {
1706
+ foreignKeyName: "projects_manager_id_fkey";
1707
+ columns: ["manager_id"];
1708
+ isOneToOne: false;
1709
+ referencedRelation: "users";
1710
+ referencedColumns: ["mms_id"];
1711
+ },
1712
+ {
1713
+ foreignKeyName: "projects_organization_id_fkey";
1714
+ columns: ["organization_id"];
1715
+ isOneToOne: false;
1716
+ referencedRelation: "organizations";
1717
+ referencedColumns: ["mms_id"];
1718
+ },
1719
+ {
1720
+ foreignKeyName: "projects_restored_by_fkey";
1721
+ columns: ["restored_by"];
1722
+ isOneToOne: false;
1723
+ referencedRelation: "user_profiles";
1724
+ referencedColumns: ["mms_id"];
1725
+ },
1726
+ {
1727
+ foreignKeyName: "projects_restored_by_fkey";
1728
+ columns: ["restored_by"];
1729
+ isOneToOne: false;
1730
+ referencedRelation: "users";
1731
+ referencedColumns: ["mms_id"];
1732
+ },
1733
+ {
1734
+ foreignKeyName: "projects_status_id_fkey";
1735
+ columns: ["status_id"];
1736
+ isOneToOne: false;
1737
+ referencedRelation: "statuses";
1738
+ referencedColumns: ["mms_id"];
1739
+ },
1740
+ {
1741
+ foreignKeyName: "projects_unarchived_by_fkey";
1742
+ columns: ["unarchived_by"];
1743
+ isOneToOne: false;
1744
+ referencedRelation: "user_profiles";
1745
+ referencedColumns: ["mms_id"];
1746
+ },
1747
+ {
1748
+ foreignKeyName: "projects_unarchived_by_fkey";
1749
+ columns: ["unarchived_by"];
1750
+ isOneToOne: false;
1751
+ referencedRelation: "users";
1752
+ referencedColumns: ["mms_id"];
1753
+ }
1754
+ ];
1755
+ };
1756
+ resend_webhook_events: {
1757
+ Row: {
1758
+ created_at: string;
1759
+ event_key: string;
1760
+ event_type: string;
1761
+ failed_at: string | null;
1762
+ failure_reason: string | null;
1763
+ id: number;
1764
+ mms_id: string;
1765
+ notification_id: string | null;
1766
+ organization_id: string | null;
1767
+ payload: Json;
1768
+ processed_at: string | null;
1769
+ processing_started_at: string | null;
1770
+ processing_status: string;
1771
+ provider_message_id: string | null;
1772
+ received_at: string;
1773
+ };
1774
+ Insert: {
1775
+ created_at?: string;
1776
+ event_key: string;
1777
+ event_type: string;
1778
+ failed_at?: string | null;
1779
+ failure_reason?: string | null;
1780
+ id?: never;
1781
+ mms_id?: string;
1782
+ notification_id?: string | null;
1783
+ organization_id?: string | null;
1784
+ payload: Json;
1785
+ processed_at?: string | null;
1786
+ processing_started_at?: string | null;
1787
+ processing_status?: string;
1788
+ provider_message_id?: string | null;
1789
+ received_at?: string;
1790
+ };
1791
+ Update: {
1792
+ created_at?: string;
1793
+ event_key?: string;
1794
+ event_type?: string;
1795
+ failed_at?: string | null;
1796
+ failure_reason?: string | null;
1797
+ id?: never;
1798
+ mms_id?: string;
1799
+ notification_id?: string | null;
1800
+ organization_id?: string | null;
1801
+ payload?: Json;
1802
+ processed_at?: string | null;
1803
+ processing_started_at?: string | null;
1804
+ processing_status?: string;
1805
+ provider_message_id?: string | null;
1806
+ received_at?: string;
1807
+ };
1808
+ Relationships: [
1809
+ {
1810
+ foreignKeyName: "resend_webhook_events_notification_id_fkey";
1811
+ columns: ["notification_id"];
1812
+ isOneToOne: false;
1813
+ referencedRelation: "notifications";
1814
+ referencedColumns: ["mms_id"];
1815
+ },
1816
+ {
1817
+ foreignKeyName: "resend_webhook_events_organization_id_fkey";
1818
+ columns: ["organization_id"];
1819
+ isOneToOne: false;
1820
+ referencedRelation: "organizations";
1821
+ referencedColumns: ["mms_id"];
1822
+ }
1823
+ ];
1824
+ };
1825
+ statuses: {
1826
+ Row: {
1827
+ colour: string;
1828
+ created_at: string;
1829
+ created_by: string | null;
1830
+ entity_type: string;
1831
+ id: number;
1832
+ label: string;
1833
+ last_updated_by: string | null;
1834
+ mms_id: string;
1835
+ organization_id: string | null;
1836
+ updated_at: string | null;
1837
+ };
1838
+ Insert: {
1839
+ colour?: string;
1840
+ created_at?: string;
1841
+ created_by?: string | null;
1842
+ entity_type?: string;
1843
+ id?: never;
1844
+ label?: string;
1845
+ last_updated_by?: string | null;
1846
+ mms_id?: string;
1847
+ organization_id?: string | null;
1848
+ updated_at?: string | null;
1849
+ };
1850
+ Update: {
1851
+ colour?: string;
1852
+ created_at?: string;
1853
+ created_by?: string | null;
1854
+ entity_type?: string;
1855
+ id?: never;
1856
+ label?: string;
1857
+ last_updated_by?: string | null;
1858
+ mms_id?: string;
1859
+ organization_id?: string | null;
1860
+ updated_at?: string | null;
1861
+ };
1862
+ Relationships: [
1863
+ {
1864
+ foreignKeyName: "statuses_created_by_fkey";
1865
+ columns: ["created_by"];
1866
+ isOneToOne: false;
1867
+ referencedRelation: "user_profiles";
1868
+ referencedColumns: ["mms_id"];
1869
+ },
1870
+ {
1871
+ foreignKeyName: "statuses_created_by_fkey";
1872
+ columns: ["created_by"];
1873
+ isOneToOne: false;
1874
+ referencedRelation: "users";
1875
+ referencedColumns: ["mms_id"];
1876
+ },
1877
+ {
1878
+ foreignKeyName: "statuses_last_updated_by_fkey";
1879
+ columns: ["last_updated_by"];
1880
+ isOneToOne: false;
1881
+ referencedRelation: "user_profiles";
1882
+ referencedColumns: ["mms_id"];
1883
+ },
1884
+ {
1885
+ foreignKeyName: "statuses_last_updated_by_fkey";
1886
+ columns: ["last_updated_by"];
1887
+ isOneToOne: false;
1888
+ referencedRelation: "users";
1889
+ referencedColumns: ["mms_id"];
1890
+ },
1891
+ {
1892
+ foreignKeyName: "statuses_organization_id_fkey";
1893
+ columns: ["organization_id"];
1894
+ isOneToOne: false;
1895
+ referencedRelation: "organizations";
1896
+ referencedColumns: ["mms_id"];
1897
+ }
1898
+ ];
1899
+ };
1900
+ supporting_files: {
1901
+ Row: {
1902
+ created_at: string;
1903
+ created_by: string | null;
1904
+ entity_id: string;
1905
+ entity_type: string;
1906
+ extension: string;
1907
+ id: number;
1908
+ last_updated_by: string | null;
1909
+ mms_id: string;
1910
+ name: string;
1911
+ organization_id: string | null;
1912
+ updated_at: string | null;
1913
+ url: string;
1914
+ };
1915
+ Insert: {
1916
+ created_at?: string;
1917
+ created_by?: string | null;
1918
+ entity_id: string;
1919
+ entity_type?: string;
1920
+ extension?: string;
1921
+ id?: never;
1922
+ last_updated_by?: string | null;
1923
+ mms_id?: string;
1924
+ name?: string;
1925
+ organization_id?: string | null;
1926
+ updated_at?: string | null;
1927
+ url?: string;
1928
+ };
1929
+ Update: {
1930
+ created_at?: string;
1931
+ created_by?: string | null;
1932
+ entity_id?: string;
1933
+ entity_type?: string;
1934
+ extension?: string;
1935
+ id?: never;
1936
+ last_updated_by?: string | null;
1937
+ mms_id?: string;
1938
+ name?: string;
1939
+ organization_id?: string | null;
1940
+ updated_at?: string | null;
1941
+ url?: string;
1942
+ };
1943
+ Relationships: [
1944
+ {
1945
+ foreignKeyName: "supporting_files_created_by_fkey";
1946
+ columns: ["created_by"];
1947
+ isOneToOne: false;
1948
+ referencedRelation: "user_profiles";
1949
+ referencedColumns: ["mms_id"];
1950
+ },
1951
+ {
1952
+ foreignKeyName: "supporting_files_created_by_fkey";
1953
+ columns: ["created_by"];
1954
+ isOneToOne: false;
1955
+ referencedRelation: "users";
1956
+ referencedColumns: ["mms_id"];
1957
+ },
1958
+ {
1959
+ foreignKeyName: "supporting_files_last_updated_by_fkey";
1960
+ columns: ["last_updated_by"];
1961
+ isOneToOne: false;
1962
+ referencedRelation: "user_profiles";
1963
+ referencedColumns: ["mms_id"];
1964
+ },
1965
+ {
1966
+ foreignKeyName: "supporting_files_last_updated_by_fkey";
1967
+ columns: ["last_updated_by"];
1968
+ isOneToOne: false;
1969
+ referencedRelation: "users";
1970
+ referencedColumns: ["mms_id"];
1971
+ },
1972
+ {
1973
+ foreignKeyName: "supporting_files_organization_id_fkey";
1974
+ columns: ["organization_id"];
1975
+ isOneToOne: false;
1976
+ referencedRelation: "organizations";
1977
+ referencedColumns: ["mms_id"];
1978
+ }
1979
+ ];
1980
+ };
1981
+ tasks: {
1982
+ Row: {
1983
+ archived: boolean;
1984
+ archived_at: string | null;
1985
+ archived_by: string | null;
1986
+ assigned_to_id: string | null;
1987
+ client_id: string | null;
1988
+ created_at: string;
1989
+ created_by: string | null;
1990
+ deleted: boolean;
1991
+ deleted_at: string | null;
1992
+ deleted_by: string | null;
1993
+ description: string | null;
1994
+ end_date: string | null;
1995
+ id: number;
1996
+ last_updated_by: string | null;
1997
+ mms_id: string;
1998
+ name: string;
1999
+ organization_id: string;
2000
+ priority: number;
2001
+ project_id: string | null;
2002
+ restored_at: string | null;
2003
+ restored_by: string | null;
2004
+ start_date: string | null;
2005
+ status_id: string | null;
2006
+ task_id: number;
2007
+ unarchived_at: string | null;
2008
+ unarchived_by: string | null;
2009
+ updated_at: string | null;
2010
+ };
2011
+ Insert: {
2012
+ archived?: boolean;
2013
+ archived_at?: string | null;
2014
+ archived_by?: string | null;
2015
+ assigned_to_id?: string | null;
2016
+ client_id?: string | null;
2017
+ created_at?: string;
2018
+ created_by?: string | null;
2019
+ deleted?: boolean;
2020
+ deleted_at?: string | null;
2021
+ deleted_by?: string | null;
2022
+ description?: string | null;
2023
+ end_date?: string | null;
2024
+ id?: never;
2025
+ last_updated_by?: string | null;
2026
+ mms_id?: string;
2027
+ name?: string;
2028
+ organization_id: string;
2029
+ priority?: number;
2030
+ project_id?: string | null;
2031
+ restored_at?: string | null;
2032
+ restored_by?: string | null;
2033
+ start_date?: string | null;
2034
+ status_id?: string | null;
2035
+ task_id: number;
2036
+ unarchived_at?: string | null;
2037
+ unarchived_by?: string | null;
2038
+ updated_at?: string | null;
2039
+ };
2040
+ Update: {
2041
+ archived?: boolean;
2042
+ archived_at?: string | null;
2043
+ archived_by?: string | null;
2044
+ assigned_to_id?: string | null;
2045
+ client_id?: string | null;
2046
+ created_at?: string;
2047
+ created_by?: string | null;
2048
+ deleted?: boolean;
2049
+ deleted_at?: string | null;
2050
+ deleted_by?: string | null;
2051
+ description?: string | null;
2052
+ end_date?: string | null;
2053
+ id?: never;
2054
+ last_updated_by?: string | null;
2055
+ mms_id?: string;
2056
+ name?: string;
2057
+ organization_id?: string;
2058
+ priority?: number;
2059
+ project_id?: string | null;
2060
+ restored_at?: string | null;
2061
+ restored_by?: string | null;
2062
+ start_date?: string | null;
2063
+ status_id?: string | null;
2064
+ task_id?: number;
2065
+ unarchived_at?: string | null;
2066
+ unarchived_by?: string | null;
2067
+ updated_at?: string | null;
2068
+ };
2069
+ Relationships: [
2070
+ {
2071
+ foreignKeyName: "tasks_archived_by_fkey";
2072
+ columns: ["archived_by"];
2073
+ isOneToOne: false;
2074
+ referencedRelation: "user_profiles";
2075
+ referencedColumns: ["mms_id"];
2076
+ },
2077
+ {
2078
+ foreignKeyName: "tasks_archived_by_fkey";
2079
+ columns: ["archived_by"];
2080
+ isOneToOne: false;
2081
+ referencedRelation: "users";
2082
+ referencedColumns: ["mms_id"];
2083
+ },
2084
+ {
2085
+ foreignKeyName: "tasks_assigned_to_id_fkey";
2086
+ columns: ["assigned_to_id"];
2087
+ isOneToOne: false;
2088
+ referencedRelation: "user_profiles";
2089
+ referencedColumns: ["mms_id"];
2090
+ },
2091
+ {
2092
+ foreignKeyName: "tasks_assigned_to_id_fkey";
2093
+ columns: ["assigned_to_id"];
2094
+ isOneToOne: false;
2095
+ referencedRelation: "users";
2096
+ referencedColumns: ["mms_id"];
2097
+ },
2098
+ {
2099
+ foreignKeyName: "tasks_client_id_fkey";
2100
+ columns: ["client_id"];
2101
+ isOneToOne: false;
2102
+ referencedRelation: "client_profiles";
2103
+ referencedColumns: ["mms_id"];
2104
+ },
2105
+ {
2106
+ foreignKeyName: "tasks_client_id_fkey";
2107
+ columns: ["client_id"];
2108
+ isOneToOne: false;
2109
+ referencedRelation: "clients";
2110
+ referencedColumns: ["mms_id"];
2111
+ },
2112
+ {
2113
+ foreignKeyName: "tasks_created_by_fkey";
2114
+ columns: ["created_by"];
2115
+ isOneToOne: false;
2116
+ referencedRelation: "user_profiles";
2117
+ referencedColumns: ["mms_id"];
2118
+ },
2119
+ {
2120
+ foreignKeyName: "tasks_created_by_fkey";
2121
+ columns: ["created_by"];
2122
+ isOneToOne: false;
2123
+ referencedRelation: "users";
2124
+ referencedColumns: ["mms_id"];
2125
+ },
2126
+ {
2127
+ foreignKeyName: "tasks_deleted_by_fkey";
2128
+ columns: ["deleted_by"];
2129
+ isOneToOne: false;
2130
+ referencedRelation: "user_profiles";
2131
+ referencedColumns: ["mms_id"];
2132
+ },
2133
+ {
2134
+ foreignKeyName: "tasks_deleted_by_fkey";
2135
+ columns: ["deleted_by"];
2136
+ isOneToOne: false;
2137
+ referencedRelation: "users";
2138
+ referencedColumns: ["mms_id"];
2139
+ },
2140
+ {
2141
+ foreignKeyName: "tasks_last_updated_by_fkey";
2142
+ columns: ["last_updated_by"];
2143
+ isOneToOne: false;
2144
+ referencedRelation: "user_profiles";
2145
+ referencedColumns: ["mms_id"];
2146
+ },
2147
+ {
2148
+ foreignKeyName: "tasks_last_updated_by_fkey";
2149
+ columns: ["last_updated_by"];
2150
+ isOneToOne: false;
2151
+ referencedRelation: "users";
2152
+ referencedColumns: ["mms_id"];
2153
+ },
2154
+ {
2155
+ foreignKeyName: "tasks_organization_id_fkey";
2156
+ columns: ["organization_id"];
2157
+ isOneToOne: false;
2158
+ referencedRelation: "organizations";
2159
+ referencedColumns: ["mms_id"];
2160
+ },
2161
+ {
2162
+ foreignKeyName: "tasks_project_id_fkey";
2163
+ columns: ["project_id"];
2164
+ isOneToOne: false;
2165
+ referencedRelation: "project_profiles";
2166
+ referencedColumns: ["mms_id"];
2167
+ },
2168
+ {
2169
+ foreignKeyName: "tasks_project_id_fkey";
2170
+ columns: ["project_id"];
2171
+ isOneToOne: false;
2172
+ referencedRelation: "projects";
2173
+ referencedColumns: ["mms_id"];
2174
+ },
2175
+ {
2176
+ foreignKeyName: "tasks_restored_by_fkey";
2177
+ columns: ["restored_by"];
2178
+ isOneToOne: false;
2179
+ referencedRelation: "user_profiles";
2180
+ referencedColumns: ["mms_id"];
2181
+ },
2182
+ {
2183
+ foreignKeyName: "tasks_restored_by_fkey";
2184
+ columns: ["restored_by"];
2185
+ isOneToOne: false;
2186
+ referencedRelation: "users";
2187
+ referencedColumns: ["mms_id"];
2188
+ },
2189
+ {
2190
+ foreignKeyName: "tasks_status_id_fkey";
2191
+ columns: ["status_id"];
2192
+ isOneToOne: false;
2193
+ referencedRelation: "statuses";
2194
+ referencedColumns: ["mms_id"];
2195
+ },
2196
+ {
2197
+ foreignKeyName: "tasks_unarchived_by_fkey";
2198
+ columns: ["unarchived_by"];
2199
+ isOneToOne: false;
2200
+ referencedRelation: "user_profiles";
2201
+ referencedColumns: ["mms_id"];
2202
+ },
2203
+ {
2204
+ foreignKeyName: "tasks_unarchived_by_fkey";
2205
+ columns: ["unarchived_by"];
2206
+ isOneToOne: false;
2207
+ referencedRelation: "users";
2208
+ referencedColumns: ["mms_id"];
2209
+ }
2210
+ ];
2211
+ };
2212
+ users: {
2213
+ Row: {
2214
+ active: boolean;
2215
+ birthday: string | null;
2216
+ country_code: string | null;
2217
+ created_at: string;
2218
+ created_by: string | null;
2219
+ email: string;
2220
+ emergency_contact_email: string | null;
2221
+ emergency_contact_name: string | null;
2222
+ emergency_contact_phone: string | null;
2223
+ emergency_contact_relationship: string | null;
2224
+ employment_type: string;
2225
+ end_date: string | null;
2226
+ id: number;
2227
+ job_title: string | null;
2228
+ last_logged_in: string | null;
2229
+ last_updated_by: string | null;
2230
+ manager_id: string | null;
2231
+ mms_id: string;
2232
+ name: string;
2233
+ organization_id: string;
2234
+ phone: string;
2235
+ profile_image: string | null;
2236
+ social_facebook: string | null;
2237
+ social_github: string | null;
2238
+ social_instagram: string | null;
2239
+ social_linkedin: string | null;
2240
+ social_twitter: string | null;
2241
+ social_website: string | null;
2242
+ start_date: string | null;
2243
+ surname: string;
2244
+ updated_at: string | null;
2245
+ };
2246
+ Insert: {
2247
+ active?: boolean;
2248
+ birthday?: string | null;
2249
+ country_code?: string | null;
2250
+ created_at?: string;
2251
+ created_by?: string | null;
2252
+ email?: string;
2253
+ emergency_contact_email?: string | null;
2254
+ emergency_contact_name?: string | null;
2255
+ emergency_contact_phone?: string | null;
2256
+ emergency_contact_relationship?: string | null;
2257
+ employment_type?: string;
2258
+ end_date?: string | null;
2259
+ id?: never;
2260
+ job_title?: string | null;
2261
+ last_logged_in?: string | null;
2262
+ last_updated_by?: string | null;
2263
+ manager_id?: string | null;
2264
+ mms_id?: string;
2265
+ name?: string;
2266
+ organization_id: string;
2267
+ phone?: string;
2268
+ profile_image?: string | null;
2269
+ social_facebook?: string | null;
2270
+ social_github?: string | null;
2271
+ social_instagram?: string | null;
2272
+ social_linkedin?: string | null;
2273
+ social_twitter?: string | null;
2274
+ social_website?: string | null;
2275
+ start_date?: string | null;
2276
+ surname?: string;
2277
+ updated_at?: string | null;
2278
+ };
2279
+ Update: {
2280
+ active?: boolean;
2281
+ birthday?: string | null;
2282
+ country_code?: string | null;
2283
+ created_at?: string;
2284
+ created_by?: string | null;
2285
+ email?: string;
2286
+ emergency_contact_email?: string | null;
2287
+ emergency_contact_name?: string | null;
2288
+ emergency_contact_phone?: string | null;
2289
+ emergency_contact_relationship?: string | null;
2290
+ employment_type?: string;
2291
+ end_date?: string | null;
2292
+ id?: never;
2293
+ job_title?: string | null;
2294
+ last_logged_in?: string | null;
2295
+ last_updated_by?: string | null;
2296
+ manager_id?: string | null;
2297
+ mms_id?: string;
2298
+ name?: string;
2299
+ organization_id?: string;
2300
+ phone?: string;
2301
+ profile_image?: string | null;
2302
+ social_facebook?: string | null;
2303
+ social_github?: string | null;
2304
+ social_instagram?: string | null;
2305
+ social_linkedin?: string | null;
2306
+ social_twitter?: string | null;
2307
+ social_website?: string | null;
2308
+ start_date?: string | null;
2309
+ surname?: string;
2310
+ updated_at?: string | null;
2311
+ };
2312
+ Relationships: [
2313
+ {
2314
+ foreignKeyName: "fk_users_created_by";
2315
+ columns: ["created_by"];
2316
+ isOneToOne: false;
2317
+ referencedRelation: "user_profiles";
2318
+ referencedColumns: ["mms_id"];
2319
+ },
2320
+ {
2321
+ foreignKeyName: "fk_users_created_by";
2322
+ columns: ["created_by"];
2323
+ isOneToOne: false;
2324
+ referencedRelation: "users";
2325
+ referencedColumns: ["mms_id"];
2326
+ },
2327
+ {
2328
+ foreignKeyName: "fk_users_last_updated_by";
2329
+ columns: ["last_updated_by"];
2330
+ isOneToOne: false;
2331
+ referencedRelation: "user_profiles";
2332
+ referencedColumns: ["mms_id"];
2333
+ },
2334
+ {
2335
+ foreignKeyName: "fk_users_last_updated_by";
2336
+ columns: ["last_updated_by"];
2337
+ isOneToOne: false;
2338
+ referencedRelation: "users";
2339
+ referencedColumns: ["mms_id"];
2340
+ },
2341
+ {
2342
+ foreignKeyName: "fk_users_manager_id";
2343
+ columns: ["manager_id"];
2344
+ isOneToOne: false;
2345
+ referencedRelation: "user_profiles";
2346
+ referencedColumns: ["mms_id"];
2347
+ },
2348
+ {
2349
+ foreignKeyName: "fk_users_manager_id";
2350
+ columns: ["manager_id"];
2351
+ isOneToOne: false;
2352
+ referencedRelation: "users";
2353
+ referencedColumns: ["mms_id"];
2354
+ },
2355
+ {
2356
+ foreignKeyName: "users_created_by_fkey";
2357
+ columns: ["created_by"];
2358
+ isOneToOne: false;
2359
+ referencedRelation: "user_profiles";
2360
+ referencedColumns: ["mms_id"];
2361
+ },
2362
+ {
2363
+ foreignKeyName: "users_created_by_fkey";
2364
+ columns: ["created_by"];
2365
+ isOneToOne: false;
2366
+ referencedRelation: "users";
2367
+ referencedColumns: ["mms_id"];
2368
+ },
2369
+ {
2370
+ foreignKeyName: "users_last_updated_by_fkey";
2371
+ columns: ["last_updated_by"];
2372
+ isOneToOne: false;
2373
+ referencedRelation: "user_profiles";
2374
+ referencedColumns: ["mms_id"];
2375
+ },
2376
+ {
2377
+ foreignKeyName: "users_last_updated_by_fkey";
2378
+ columns: ["last_updated_by"];
2379
+ isOneToOne: false;
2380
+ referencedRelation: "users";
2381
+ referencedColumns: ["mms_id"];
2382
+ },
2383
+ {
2384
+ foreignKeyName: "users_manager_id_fkey";
2385
+ columns: ["manager_id"];
2386
+ isOneToOne: false;
2387
+ referencedRelation: "user_profiles";
2388
+ referencedColumns: ["mms_id"];
2389
+ },
2390
+ {
2391
+ foreignKeyName: "users_manager_id_fkey";
2392
+ columns: ["manager_id"];
2393
+ isOneToOne: false;
2394
+ referencedRelation: "users";
2395
+ referencedColumns: ["mms_id"];
2396
+ },
2397
+ {
2398
+ foreignKeyName: "users_organization_id_fkey";
2399
+ columns: ["organization_id"];
2400
+ isOneToOne: false;
2401
+ referencedRelation: "organizations";
2402
+ referencedColumns: ["mms_id"];
2403
+ }
2404
+ ];
2405
+ };
2406
+ };
2407
+ Views: {
2408
+ client_profiles: {
2409
+ Row: {
2410
+ mms_id: string | null;
2411
+ name: string | null;
2412
+ };
2413
+ Insert: {
2414
+ mms_id?: string | null;
2415
+ name?: string | null;
2416
+ };
2417
+ Update: {
2418
+ mms_id?: string | null;
2419
+ name?: string | null;
2420
+ };
2421
+ Relationships: [];
2422
+ };
2423
+ project_profiles: {
2424
+ Row: {
2425
+ mms_id: string | null;
2426
+ name: string | null;
2427
+ };
2428
+ Insert: {
2429
+ mms_id?: string | null;
2430
+ name?: string | null;
2431
+ };
2432
+ Update: {
2433
+ mms_id?: string | null;
2434
+ name?: string | null;
2435
+ };
2436
+ Relationships: [];
2437
+ };
2438
+ task_profiles: {
2439
+ Row: {
2440
+ mms_id: string | null;
2441
+ name: string | null;
2442
+ };
2443
+ Insert: {
2444
+ mms_id?: string | null;
2445
+ name?: string | null;
2446
+ };
2447
+ Update: {
2448
+ mms_id?: string | null;
2449
+ name?: string | null;
2450
+ };
2451
+ Relationships: [];
2452
+ };
2453
+ user_profiles: {
2454
+ Row: {
2455
+ email: string | null;
2456
+ mms_id: string | null;
2457
+ name: string | null;
2458
+ profile_image: string | null;
2459
+ surname: string | null;
2460
+ };
2461
+ Insert: {
2462
+ email?: string | null;
2463
+ mms_id?: string | null;
2464
+ name?: string | null;
2465
+ profile_image?: string | null;
2466
+ surname?: string | null;
2467
+ };
2468
+ Update: {
2469
+ email?: string | null;
2470
+ mms_id?: string | null;
2471
+ name?: string | null;
2472
+ profile_image?: string | null;
2473
+ surname?: string | null;
2474
+ };
2475
+ Relationships: [];
2476
+ };
2477
+ };
2478
+ Functions: {
2479
+ current_user_organization_id: {
2480
+ Args: never;
2481
+ Returns: string;
2482
+ };
2483
+ release_organization_seat: {
2484
+ Args: {
2485
+ p_organization_id: string;
2486
+ };
2487
+ Returns: number;
2488
+ };
2489
+ reserve_organization_seat: {
2490
+ Args: {
2491
+ p_organization_id: string;
2492
+ };
2493
+ Returns: {
2494
+ active_seat_count: number;
2495
+ billing_status: string;
2496
+ paid_seat_count: number;
2497
+ seat_already_paid: boolean;
2498
+ }[];
2499
+ };
2500
+ uuidv7: {
2501
+ Args: never;
2502
+ Returns: string;
2503
+ };
2504
+ };
2505
+ Enums: {
2506
+ [_ in never]: never;
2507
+ };
2508
+ CompositeTypes: {
2509
+ [_ in never]: never;
2510
+ };
2511
+ };
2512
+ };
2513
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
2514
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
2515
+ export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
2516
+ schema: keyof DatabaseWithoutInternals;
2517
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
2518
+ schema: keyof DatabaseWithoutInternals;
2519
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
2520
+ schema: keyof DatabaseWithoutInternals;
2521
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
2522
+ Row: infer R;
2523
+ } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
2524
+ Row: infer R;
2525
+ } ? R : never : never;
2526
+ export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
2527
+ schema: keyof DatabaseWithoutInternals;
2528
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
2529
+ schema: keyof DatabaseWithoutInternals;
2530
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
2531
+ schema: keyof DatabaseWithoutInternals;
2532
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
2533
+ Insert: infer I;
2534
+ } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
2535
+ Insert: infer I;
2536
+ } ? I : never : never;
2537
+ export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
2538
+ schema: keyof DatabaseWithoutInternals;
2539
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
2540
+ schema: keyof DatabaseWithoutInternals;
2541
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
2542
+ schema: keyof DatabaseWithoutInternals;
2543
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
2544
+ Update: infer U;
2545
+ } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
2546
+ Update: infer U;
2547
+ } ? U : never : never;
2548
+ export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
2549
+ schema: keyof DatabaseWithoutInternals;
2550
+ }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
2551
+ schema: keyof DatabaseWithoutInternals;
2552
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
2553
+ schema: keyof DatabaseWithoutInternals;
2554
+ } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
2555
+ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
2556
+ schema: keyof DatabaseWithoutInternals;
2557
+ }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
2558
+ schema: keyof DatabaseWithoutInternals;
2559
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
2560
+ schema: keyof DatabaseWithoutInternals;
2561
+ } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
2562
+ export declare const Constants: {
2563
+ readonly graphql_public: {
2564
+ readonly Enums: {};
2565
+ };
2566
+ readonly public: {
2567
+ readonly Enums: {};
2568
+ };
2569
+ };
2570
+ export {};