@elevasis/core 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +60 -0
- package/dist/index.js +198 -1
- package/dist/organization-model/index.d.ts +60 -0
- package/dist/organization-model/index.js +198 -1
- package/dist/test-utils/index.d.ts +399 -363
- package/dist/test-utils/index.js +198 -1
- package/package.json +3 -3
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +444 -309
- package/src/business/acquisition/activity-events.ts +12 -3
- package/src/business/acquisition/api-schemas.test.ts +315 -4
- package/src/business/acquisition/api-schemas.ts +140 -17
- package/src/business/acquisition/build-templates.ts +44 -0
- package/src/business/acquisition/crm-next-action.test.ts +262 -0
- package/src/business/acquisition/crm-next-action.ts +220 -0
- package/src/business/acquisition/crm-priority.test.ts +216 -0
- package/src/business/acquisition/crm-priority.ts +349 -0
- package/src/business/acquisition/crm-state-actions.test.ts +12 -21
- package/src/business/acquisition/deal-ownership.test.ts +351 -0
- package/src/business/acquisition/deal-ownership.ts +120 -0
- package/src/business/acquisition/derive-actions.test.ts +101 -37
- package/src/business/acquisition/derive-actions.ts +49 -24
- package/src/business/acquisition/index.ts +163 -149
- package/src/business/acquisition/types.ts +48 -4
- package/src/execution/engine/index.ts +4 -3
- package/src/execution/engine/tools/lead-service-types.ts +68 -51
- package/src/execution/engine/tools/platform/acquisition/list-tools.ts +6 -5
- package/src/execution/engine/tools/platform/acquisition/types.ts +3 -1
- package/src/execution/engine/tools/registry.ts +4 -3
- package/src/execution/engine/tools/tool-maps.ts +821 -816
- package/src/organization-model/domains/prospecting.ts +204 -1
- package/src/organization-model/domains/sales.test.ts +218 -0
- package/src/organization-model/domains/sales.ts +558 -366
- package/src/organization-model/types.ts +2 -2
- package/src/platform/constants/versions.ts +1 -1
- package/src/reference/_generated/contracts.md +444 -309
- package/src/supabase/database.types.ts +2978 -2958
|
@@ -9,7 +9,7 @@ type Json = string | number | boolean | null | {
|
|
|
9
9
|
} | Json[];
|
|
10
10
|
type Database = {
|
|
11
11
|
__InternalSupabase: {
|
|
12
|
-
PostgrestVersion:
|
|
12
|
+
PostgrestVersion: "12.2.3 (519615d)";
|
|
13
13
|
};
|
|
14
14
|
public: {
|
|
15
15
|
Tables: {
|
|
@@ -52,11 +52,11 @@ type Database = {
|
|
|
52
52
|
};
|
|
53
53
|
Relationships: [
|
|
54
54
|
{
|
|
55
|
-
foreignKeyName:
|
|
56
|
-
columns: [
|
|
55
|
+
foreignKeyName: "acq_artifacts_organization_id_fkey";
|
|
56
|
+
columns: ["organization_id"];
|
|
57
57
|
isOneToOne: false;
|
|
58
|
-
referencedRelation:
|
|
59
|
-
referencedColumns: [
|
|
58
|
+
referencedRelation: "organizations";
|
|
59
|
+
referencedColumns: ["id"];
|
|
60
60
|
}
|
|
61
61
|
];
|
|
62
62
|
};
|
|
@@ -141,11 +141,11 @@ type Database = {
|
|
|
141
141
|
};
|
|
142
142
|
Relationships: [
|
|
143
143
|
{
|
|
144
|
-
foreignKeyName:
|
|
145
|
-
columns: [
|
|
144
|
+
foreignKeyName: "acq_companies_organization_id_fkey";
|
|
145
|
+
columns: ["organization_id"];
|
|
146
146
|
isOneToOne: false;
|
|
147
|
-
referencedRelation:
|
|
148
|
-
referencedColumns: [
|
|
147
|
+
referencedRelation: "organizations";
|
|
148
|
+
referencedColumns: ["id"];
|
|
149
149
|
}
|
|
150
150
|
];
|
|
151
151
|
};
|
|
@@ -236,18 +236,18 @@ type Database = {
|
|
|
236
236
|
};
|
|
237
237
|
Relationships: [
|
|
238
238
|
{
|
|
239
|
-
foreignKeyName:
|
|
240
|
-
columns: [
|
|
239
|
+
foreignKeyName: "acq_contacts_company_id_fkey";
|
|
240
|
+
columns: ["company_id"];
|
|
241
241
|
isOneToOne: false;
|
|
242
|
-
referencedRelation:
|
|
243
|
-
referencedColumns: [
|
|
242
|
+
referencedRelation: "acq_companies";
|
|
243
|
+
referencedColumns: ["id"];
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
|
-
foreignKeyName:
|
|
247
|
-
columns: [
|
|
246
|
+
foreignKeyName: "acq_contacts_organization_id_fkey";
|
|
247
|
+
columns: ["organization_id"];
|
|
248
248
|
isOneToOne: false;
|
|
249
|
-
referencedRelation:
|
|
250
|
-
referencedColumns: [
|
|
249
|
+
referencedRelation: "organizations";
|
|
250
|
+
referencedColumns: ["id"];
|
|
251
251
|
}
|
|
252
252
|
];
|
|
253
253
|
};
|
|
@@ -284,11 +284,11 @@ type Database = {
|
|
|
284
284
|
};
|
|
285
285
|
Relationships: [
|
|
286
286
|
{
|
|
287
|
-
foreignKeyName:
|
|
288
|
-
columns: [
|
|
287
|
+
foreignKeyName: "acq_content_organization_id_fkey";
|
|
288
|
+
columns: ["organization_id"];
|
|
289
289
|
isOneToOne: false;
|
|
290
|
-
referencedRelation:
|
|
291
|
-
referencedColumns: [
|
|
290
|
+
referencedRelation: "organizations";
|
|
291
|
+
referencedColumns: ["id"];
|
|
292
292
|
}
|
|
293
293
|
];
|
|
294
294
|
};
|
|
@@ -352,18 +352,18 @@ type Database = {
|
|
|
352
352
|
};
|
|
353
353
|
Relationships: [
|
|
354
354
|
{
|
|
355
|
-
foreignKeyName:
|
|
356
|
-
columns: [
|
|
355
|
+
foreignKeyName: "acq_content_distributions_content_id_fkey";
|
|
356
|
+
columns: ["content_id"];
|
|
357
357
|
isOneToOne: false;
|
|
358
|
-
referencedRelation:
|
|
359
|
-
referencedColumns: [
|
|
358
|
+
referencedRelation: "acq_content";
|
|
359
|
+
referencedColumns: ["id"];
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
|
-
foreignKeyName:
|
|
363
|
-
columns: [
|
|
362
|
+
foreignKeyName: "acq_content_distributions_organization_id_fkey";
|
|
363
|
+
columns: ["organization_id"];
|
|
364
364
|
isOneToOne: false;
|
|
365
|
-
referencedRelation:
|
|
366
|
-
referencedColumns: [
|
|
365
|
+
referencedRelation: "organizations";
|
|
366
|
+
referencedColumns: ["id"];
|
|
367
367
|
}
|
|
368
368
|
];
|
|
369
369
|
};
|
|
@@ -397,18 +397,18 @@ type Database = {
|
|
|
397
397
|
};
|
|
398
398
|
Relationships: [
|
|
399
399
|
{
|
|
400
|
-
foreignKeyName:
|
|
401
|
-
columns: [
|
|
400
|
+
foreignKeyName: "acq_deal_notes_deal_id_fkey";
|
|
401
|
+
columns: ["deal_id"];
|
|
402
402
|
isOneToOne: false;
|
|
403
|
-
referencedRelation:
|
|
404
|
-
referencedColumns: [
|
|
403
|
+
referencedRelation: "acq_deals";
|
|
404
|
+
referencedColumns: ["id"];
|
|
405
405
|
},
|
|
406
406
|
{
|
|
407
|
-
foreignKeyName:
|
|
408
|
-
columns: [
|
|
407
|
+
foreignKeyName: "acq_deal_notes_organization_id_fkey";
|
|
408
|
+
columns: ["organization_id"];
|
|
409
409
|
isOneToOne: false;
|
|
410
|
-
referencedRelation:
|
|
411
|
-
referencedColumns: [
|
|
410
|
+
referencedRelation: "organizations";
|
|
411
|
+
referencedColumns: ["id"];
|
|
412
412
|
}
|
|
413
413
|
];
|
|
414
414
|
};
|
|
@@ -460,18 +460,18 @@ type Database = {
|
|
|
460
460
|
};
|
|
461
461
|
Relationships: [
|
|
462
462
|
{
|
|
463
|
-
foreignKeyName:
|
|
464
|
-
columns: [
|
|
463
|
+
foreignKeyName: "acq_deal_tasks_deal_id_fkey";
|
|
464
|
+
columns: ["deal_id"];
|
|
465
465
|
isOneToOne: false;
|
|
466
|
-
referencedRelation:
|
|
467
|
-
referencedColumns: [
|
|
466
|
+
referencedRelation: "acq_deals";
|
|
467
|
+
referencedColumns: ["id"];
|
|
468
468
|
},
|
|
469
469
|
{
|
|
470
|
-
foreignKeyName:
|
|
471
|
-
columns: [
|
|
470
|
+
foreignKeyName: "acq_deal_tasks_organization_id_fkey";
|
|
471
|
+
columns: ["organization_id"];
|
|
472
472
|
isOneToOne: false;
|
|
473
|
-
referencedRelation:
|
|
474
|
-
referencedColumns: [
|
|
473
|
+
referencedRelation: "organizations";
|
|
474
|
+
referencedColumns: ["id"];
|
|
475
475
|
}
|
|
476
476
|
];
|
|
477
477
|
};
|
|
@@ -488,6 +488,8 @@ type Database = {
|
|
|
488
488
|
discovery_submitted_by: string | null;
|
|
489
489
|
id: string;
|
|
490
490
|
initial_fee: number | null;
|
|
491
|
+
instantly_email_account: string | null;
|
|
492
|
+
instantly_thread_uuid: string | null;
|
|
491
493
|
monthly_fee: number | null;
|
|
492
494
|
organization_id: string;
|
|
493
495
|
payment_link_sent_at: string | null;
|
|
@@ -523,6 +525,8 @@ type Database = {
|
|
|
523
525
|
discovery_submitted_by?: string | null;
|
|
524
526
|
id?: string;
|
|
525
527
|
initial_fee?: number | null;
|
|
528
|
+
instantly_email_account?: string | null;
|
|
529
|
+
instantly_thread_uuid?: string | null;
|
|
526
530
|
monthly_fee?: number | null;
|
|
527
531
|
organization_id: string;
|
|
528
532
|
payment_link_sent_at?: string | null;
|
|
@@ -558,6 +562,8 @@ type Database = {
|
|
|
558
562
|
discovery_submitted_by?: string | null;
|
|
559
563
|
id?: string;
|
|
560
564
|
initial_fee?: number | null;
|
|
565
|
+
instantly_email_account?: string | null;
|
|
566
|
+
instantly_thread_uuid?: string | null;
|
|
561
567
|
monthly_fee?: number | null;
|
|
562
568
|
organization_id?: string;
|
|
563
569
|
payment_link_sent_at?: string | null;
|
|
@@ -583,25 +589,25 @@ type Database = {
|
|
|
583
589
|
};
|
|
584
590
|
Relationships: [
|
|
585
591
|
{
|
|
586
|
-
foreignKeyName:
|
|
587
|
-
columns: [
|
|
592
|
+
foreignKeyName: "acq_deals_contact_id_fkey";
|
|
593
|
+
columns: ["contact_id"];
|
|
588
594
|
isOneToOne: false;
|
|
589
|
-
referencedRelation:
|
|
590
|
-
referencedColumns: [
|
|
595
|
+
referencedRelation: "acq_contacts";
|
|
596
|
+
referencedColumns: ["id"];
|
|
591
597
|
},
|
|
592
598
|
{
|
|
593
|
-
foreignKeyName:
|
|
594
|
-
columns: [
|
|
599
|
+
foreignKeyName: "acq_deals_organization_id_fkey";
|
|
600
|
+
columns: ["organization_id"];
|
|
595
601
|
isOneToOne: false;
|
|
596
|
-
referencedRelation:
|
|
597
|
-
referencedColumns: [
|
|
602
|
+
referencedRelation: "organizations";
|
|
603
|
+
referencedColumns: ["id"];
|
|
598
604
|
},
|
|
599
605
|
{
|
|
600
|
-
foreignKeyName:
|
|
601
|
-
columns: [
|
|
606
|
+
foreignKeyName: "acq_deals_source_list_id_fkey";
|
|
607
|
+
columns: ["source_list_id"];
|
|
602
608
|
isOneToOne: false;
|
|
603
|
-
referencedRelation:
|
|
604
|
-
referencedColumns: [
|
|
609
|
+
referencedRelation: "acq_lists";
|
|
610
|
+
referencedColumns: ["id"];
|
|
605
611
|
}
|
|
606
612
|
];
|
|
607
613
|
};
|
|
@@ -653,25 +659,25 @@ type Database = {
|
|
|
653
659
|
};
|
|
654
660
|
Relationships: [
|
|
655
661
|
{
|
|
656
|
-
foreignKeyName:
|
|
657
|
-
columns: [
|
|
662
|
+
foreignKeyName: "acq_list_companies_company_id_fkey";
|
|
663
|
+
columns: ["company_id"];
|
|
658
664
|
isOneToOne: false;
|
|
659
|
-
referencedRelation:
|
|
660
|
-
referencedColumns: [
|
|
665
|
+
referencedRelation: "acq_companies";
|
|
666
|
+
referencedColumns: ["id"];
|
|
661
667
|
},
|
|
662
668
|
{
|
|
663
|
-
foreignKeyName:
|
|
664
|
-
columns: [
|
|
669
|
+
foreignKeyName: "acq_list_companies_list_id_fkey";
|
|
670
|
+
columns: ["list_id"];
|
|
665
671
|
isOneToOne: false;
|
|
666
|
-
referencedRelation:
|
|
667
|
-
referencedColumns: [
|
|
672
|
+
referencedRelation: "acq_lists";
|
|
673
|
+
referencedColumns: ["id"];
|
|
668
674
|
},
|
|
669
675
|
{
|
|
670
|
-
foreignKeyName:
|
|
671
|
-
columns: [
|
|
676
|
+
foreignKeyName: "acq_list_companies_source_execution_id_fkey";
|
|
677
|
+
columns: ["source_execution_id"];
|
|
672
678
|
isOneToOne: false;
|
|
673
|
-
referencedRelation:
|
|
674
|
-
referencedColumns: [
|
|
679
|
+
referencedRelation: "execution_logs";
|
|
680
|
+
referencedColumns: ["execution_id"];
|
|
675
681
|
}
|
|
676
682
|
];
|
|
677
683
|
};
|
|
@@ -699,18 +705,18 @@ type Database = {
|
|
|
699
705
|
};
|
|
700
706
|
Relationships: [
|
|
701
707
|
{
|
|
702
|
-
foreignKeyName:
|
|
703
|
-
columns: [
|
|
708
|
+
foreignKeyName: "acq_list_executions_execution_id_fkey";
|
|
709
|
+
columns: ["execution_id"];
|
|
704
710
|
isOneToOne: false;
|
|
705
|
-
referencedRelation:
|
|
706
|
-
referencedColumns: [
|
|
711
|
+
referencedRelation: "execution_logs";
|
|
712
|
+
referencedColumns: ["execution_id"];
|
|
707
713
|
},
|
|
708
714
|
{
|
|
709
|
-
foreignKeyName:
|
|
710
|
-
columns: [
|
|
715
|
+
foreignKeyName: "acq_list_executions_list_id_fkey";
|
|
716
|
+
columns: ["list_id"];
|
|
711
717
|
isOneToOne: false;
|
|
712
|
-
referencedRelation:
|
|
713
|
-
referencedColumns: [
|
|
718
|
+
referencedRelation: "acq_lists";
|
|
719
|
+
referencedColumns: ["id"];
|
|
714
720
|
}
|
|
715
721
|
];
|
|
716
722
|
};
|
|
@@ -762,25 +768,25 @@ type Database = {
|
|
|
762
768
|
};
|
|
763
769
|
Relationships: [
|
|
764
770
|
{
|
|
765
|
-
foreignKeyName:
|
|
766
|
-
columns: [
|
|
771
|
+
foreignKeyName: "acq_list_members_contact_id_fkey";
|
|
772
|
+
columns: ["contact_id"];
|
|
767
773
|
isOneToOne: false;
|
|
768
|
-
referencedRelation:
|
|
769
|
-
referencedColumns: [
|
|
774
|
+
referencedRelation: "acq_contacts";
|
|
775
|
+
referencedColumns: ["id"];
|
|
770
776
|
},
|
|
771
777
|
{
|
|
772
|
-
foreignKeyName:
|
|
773
|
-
columns: [
|
|
778
|
+
foreignKeyName: "acq_list_members_list_id_fkey";
|
|
779
|
+
columns: ["list_id"];
|
|
774
780
|
isOneToOne: false;
|
|
775
|
-
referencedRelation:
|
|
776
|
-
referencedColumns: [
|
|
781
|
+
referencedRelation: "acq_lists";
|
|
782
|
+
referencedColumns: ["id"];
|
|
777
783
|
},
|
|
778
784
|
{
|
|
779
|
-
foreignKeyName:
|
|
780
|
-
columns: [
|
|
785
|
+
foreignKeyName: "acq_list_members_source_execution_id_fkey";
|
|
786
|
+
columns: ["source_execution_id"];
|
|
781
787
|
isOneToOne: false;
|
|
782
|
-
referencedRelation:
|
|
783
|
-
referencedColumns: [
|
|
788
|
+
referencedRelation: "execution_logs";
|
|
789
|
+
referencedColumns: ["execution_id"];
|
|
784
790
|
}
|
|
785
791
|
];
|
|
786
792
|
};
|
|
@@ -835,11 +841,11 @@ type Database = {
|
|
|
835
841
|
};
|
|
836
842
|
Relationships: [
|
|
837
843
|
{
|
|
838
|
-
foreignKeyName:
|
|
839
|
-
columns: [
|
|
844
|
+
foreignKeyName: "acq_lists_organization_id_fkey";
|
|
845
|
+
columns: ["organization_id"];
|
|
840
846
|
isOneToOne: false;
|
|
841
|
-
referencedRelation:
|
|
842
|
-
referencedColumns: [
|
|
847
|
+
referencedRelation: "organizations";
|
|
848
|
+
referencedColumns: ["id"];
|
|
843
849
|
}
|
|
844
850
|
];
|
|
845
851
|
};
|
|
@@ -915,18 +921,18 @@ type Database = {
|
|
|
915
921
|
};
|
|
916
922
|
Relationships: [
|
|
917
923
|
{
|
|
918
|
-
foreignKeyName:
|
|
919
|
-
columns: [
|
|
924
|
+
foreignKeyName: "acq_seo_metrics_organization_id_fkey";
|
|
925
|
+
columns: ["organization_id"];
|
|
920
926
|
isOneToOne: false;
|
|
921
|
-
referencedRelation:
|
|
922
|
-
referencedColumns: [
|
|
927
|
+
referencedRelation: "organizations";
|
|
928
|
+
referencedColumns: ["id"];
|
|
923
929
|
},
|
|
924
930
|
{
|
|
925
|
-
foreignKeyName:
|
|
926
|
-
columns: [
|
|
931
|
+
foreignKeyName: "acq_seo_metrics_seo_page_id_fkey";
|
|
932
|
+
columns: ["seo_page_id"];
|
|
927
933
|
isOneToOne: false;
|
|
928
|
-
referencedRelation:
|
|
929
|
-
referencedColumns: [
|
|
934
|
+
referencedRelation: "acq_seo_pages";
|
|
935
|
+
referencedColumns: ["id"];
|
|
930
936
|
}
|
|
931
937
|
];
|
|
932
938
|
};
|
|
@@ -1002,11 +1008,11 @@ type Database = {
|
|
|
1002
1008
|
};
|
|
1003
1009
|
Relationships: [
|
|
1004
1010
|
{
|
|
1005
|
-
foreignKeyName:
|
|
1006
|
-
columns: [
|
|
1011
|
+
foreignKeyName: "acq_seo_pages_organization_id_fkey";
|
|
1012
|
+
columns: ["organization_id"];
|
|
1007
1013
|
isOneToOne: false;
|
|
1008
|
-
referencedRelation:
|
|
1009
|
-
referencedColumns: [
|
|
1014
|
+
referencedRelation: "organizations";
|
|
1015
|
+
referencedColumns: ["id"];
|
|
1010
1016
|
}
|
|
1011
1017
|
];
|
|
1012
1018
|
};
|
|
@@ -1103,11 +1109,11 @@ type Database = {
|
|
|
1103
1109
|
};
|
|
1104
1110
|
Relationships: [
|
|
1105
1111
|
{
|
|
1106
|
-
foreignKeyName:
|
|
1107
|
-
columns: [
|
|
1112
|
+
foreignKeyName: "acq_social_posts_organization_id_fkey";
|
|
1113
|
+
columns: ["organization_id"];
|
|
1108
1114
|
isOneToOne: false;
|
|
1109
|
-
referencedRelation:
|
|
1110
|
-
referencedColumns: [
|
|
1115
|
+
referencedRelation: "organizations";
|
|
1116
|
+
referencedColumns: ["id"];
|
|
1111
1117
|
}
|
|
1112
1118
|
];
|
|
1113
1119
|
};
|
|
@@ -1162,11 +1168,11 @@ type Database = {
|
|
|
1162
1168
|
};
|
|
1163
1169
|
Relationships: [
|
|
1164
1170
|
{
|
|
1165
|
-
foreignKeyName:
|
|
1166
|
-
columns: [
|
|
1171
|
+
foreignKeyName: "activities_organization_id_fkey";
|
|
1172
|
+
columns: ["organization_id"];
|
|
1167
1173
|
isOneToOne: false;
|
|
1168
|
-
referencedRelation:
|
|
1169
|
-
referencedColumns: [
|
|
1174
|
+
referencedRelation: "organizations";
|
|
1175
|
+
referencedColumns: ["id"];
|
|
1170
1176
|
}
|
|
1171
1177
|
];
|
|
1172
1178
|
};
|
|
@@ -1197,11 +1203,11 @@ type Database = {
|
|
|
1197
1203
|
};
|
|
1198
1204
|
Relationships: [
|
|
1199
1205
|
{
|
|
1200
|
-
foreignKeyName:
|
|
1201
|
-
columns: [
|
|
1206
|
+
foreignKeyName: "api_keys_organization_id_fkey";
|
|
1207
|
+
columns: ["organization_id"];
|
|
1202
1208
|
isOneToOne: false;
|
|
1203
|
-
referencedRelation:
|
|
1204
|
-
referencedColumns: [
|
|
1209
|
+
referencedRelation: "organizations";
|
|
1210
|
+
referencedColumns: ["id"];
|
|
1205
1211
|
}
|
|
1206
1212
|
];
|
|
1207
1213
|
};
|
|
@@ -1280,25 +1286,25 @@ type Database = {
|
|
|
1280
1286
|
};
|
|
1281
1287
|
Relationships: [
|
|
1282
1288
|
{
|
|
1283
|
-
foreignKeyName:
|
|
1284
|
-
columns: [
|
|
1289
|
+
foreignKeyName: "command_queue_completed_by_fkey";
|
|
1290
|
+
columns: ["completed_by"];
|
|
1285
1291
|
isOneToOne: false;
|
|
1286
|
-
referencedRelation:
|
|
1287
|
-
referencedColumns: [
|
|
1292
|
+
referencedRelation: "users";
|
|
1293
|
+
referencedColumns: ["id"];
|
|
1288
1294
|
},
|
|
1289
1295
|
{
|
|
1290
|
-
foreignKeyName:
|
|
1291
|
-
columns: [
|
|
1296
|
+
foreignKeyName: "command_queue_organization_id_fkey";
|
|
1297
|
+
columns: ["organization_id"];
|
|
1292
1298
|
isOneToOne: false;
|
|
1293
|
-
referencedRelation:
|
|
1294
|
-
referencedColumns: [
|
|
1299
|
+
referencedRelation: "organizations";
|
|
1300
|
+
referencedColumns: ["id"];
|
|
1295
1301
|
},
|
|
1296
1302
|
{
|
|
1297
|
-
foreignKeyName:
|
|
1298
|
-
columns: [
|
|
1303
|
+
foreignKeyName: "command_queue_target_execution_id_fkey";
|
|
1304
|
+
columns: ["target_execution_id"];
|
|
1299
1305
|
isOneToOne: false;
|
|
1300
|
-
referencedRelation:
|
|
1301
|
-
referencedColumns: [
|
|
1306
|
+
referencedRelation: "execution_logs";
|
|
1307
|
+
referencedColumns: ["execution_id"];
|
|
1302
1308
|
}
|
|
1303
1309
|
];
|
|
1304
1310
|
};
|
|
@@ -1338,18 +1344,18 @@ type Database = {
|
|
|
1338
1344
|
};
|
|
1339
1345
|
Relationships: [
|
|
1340
1346
|
{
|
|
1341
|
-
foreignKeyName:
|
|
1342
|
-
columns: [
|
|
1347
|
+
foreignKeyName: "credentials_created_by_fkey";
|
|
1348
|
+
columns: ["created_by"];
|
|
1343
1349
|
isOneToOne: false;
|
|
1344
|
-
referencedRelation:
|
|
1345
|
-
referencedColumns: [
|
|
1350
|
+
referencedRelation: "users";
|
|
1351
|
+
referencedColumns: ["id"];
|
|
1346
1352
|
},
|
|
1347
1353
|
{
|
|
1348
|
-
foreignKeyName:
|
|
1349
|
-
columns: [
|
|
1354
|
+
foreignKeyName: "credentials_organization_id_fkey";
|
|
1355
|
+
columns: ["organization_id"];
|
|
1350
1356
|
isOneToOne: false;
|
|
1351
|
-
referencedRelation:
|
|
1352
|
-
referencedColumns: [
|
|
1357
|
+
referencedRelation: "organizations";
|
|
1358
|
+
referencedColumns: ["id"];
|
|
1353
1359
|
}
|
|
1354
1360
|
];
|
|
1355
1361
|
};
|
|
@@ -1395,11 +1401,11 @@ type Database = {
|
|
|
1395
1401
|
};
|
|
1396
1402
|
Relationships: [
|
|
1397
1403
|
{
|
|
1398
|
-
foreignKeyName:
|
|
1399
|
-
columns: [
|
|
1404
|
+
foreignKeyName: "deployments_organization_id_fkey";
|
|
1405
|
+
columns: ["organization_id"];
|
|
1400
1406
|
isOneToOne: false;
|
|
1401
|
-
referencedRelation:
|
|
1402
|
-
referencedColumns: [
|
|
1407
|
+
referencedRelation: "organizations";
|
|
1408
|
+
referencedColumns: ["id"];
|
|
1403
1409
|
}
|
|
1404
1410
|
];
|
|
1405
1411
|
};
|
|
@@ -1454,25 +1460,25 @@ type Database = {
|
|
|
1454
1460
|
};
|
|
1455
1461
|
Relationships: [
|
|
1456
1462
|
{
|
|
1457
|
-
foreignKeyName:
|
|
1458
|
-
columns: [
|
|
1463
|
+
foreignKeyName: "execution_errors_execution_id_fkey";
|
|
1464
|
+
columns: ["execution_id"];
|
|
1459
1465
|
isOneToOne: false;
|
|
1460
|
-
referencedRelation:
|
|
1461
|
-
referencedColumns: [
|
|
1466
|
+
referencedRelation: "execution_logs";
|
|
1467
|
+
referencedColumns: ["execution_id"];
|
|
1462
1468
|
},
|
|
1463
1469
|
{
|
|
1464
|
-
foreignKeyName:
|
|
1465
|
-
columns: [
|
|
1470
|
+
foreignKeyName: "execution_errors_organization_id_fkey";
|
|
1471
|
+
columns: ["organization_id"];
|
|
1466
1472
|
isOneToOne: false;
|
|
1467
|
-
referencedRelation:
|
|
1468
|
-
referencedColumns: [
|
|
1473
|
+
referencedRelation: "organizations";
|
|
1474
|
+
referencedColumns: ["id"];
|
|
1469
1475
|
},
|
|
1470
1476
|
{
|
|
1471
|
-
foreignKeyName:
|
|
1472
|
-
columns: [
|
|
1477
|
+
foreignKeyName: "execution_errors_resolved_by_fkey";
|
|
1478
|
+
columns: ["resolved_by"];
|
|
1473
1479
|
isOneToOne: false;
|
|
1474
|
-
referencedRelation:
|
|
1475
|
-
referencedColumns: [
|
|
1480
|
+
referencedRelation: "users";
|
|
1481
|
+
referencedColumns: ["id"];
|
|
1476
1482
|
}
|
|
1477
1483
|
];
|
|
1478
1484
|
};
|
|
@@ -1554,32 +1560,32 @@ type Database = {
|
|
|
1554
1560
|
};
|
|
1555
1561
|
Relationships: [
|
|
1556
1562
|
{
|
|
1557
|
-
foreignKeyName:
|
|
1558
|
-
columns: [
|
|
1563
|
+
foreignKeyName: "execution_history_organization_id_fkey";
|
|
1564
|
+
columns: ["organization_id"];
|
|
1559
1565
|
isOneToOne: false;
|
|
1560
|
-
referencedRelation:
|
|
1561
|
-
referencedColumns: [
|
|
1566
|
+
referencedRelation: "organizations";
|
|
1567
|
+
referencedColumns: ["id"];
|
|
1562
1568
|
},
|
|
1563
1569
|
{
|
|
1564
|
-
foreignKeyName:
|
|
1565
|
-
columns: [
|
|
1570
|
+
foreignKeyName: "execution_logs_origin_execution_id_fkey";
|
|
1571
|
+
columns: ["origin_execution_id"];
|
|
1566
1572
|
isOneToOne: false;
|
|
1567
|
-
referencedRelation:
|
|
1568
|
-
referencedColumns: [
|
|
1573
|
+
referencedRelation: "execution_logs";
|
|
1574
|
+
referencedColumns: ["execution_id"];
|
|
1569
1575
|
},
|
|
1570
1576
|
{
|
|
1571
|
-
foreignKeyName:
|
|
1572
|
-
columns: [
|
|
1577
|
+
foreignKeyName: "execution_logs_session_id_fkey";
|
|
1578
|
+
columns: ["session_id"];
|
|
1573
1579
|
isOneToOne: false;
|
|
1574
|
-
referencedRelation:
|
|
1575
|
-
referencedColumns: [
|
|
1580
|
+
referencedRelation: "sessions";
|
|
1581
|
+
referencedColumns: ["session_id"];
|
|
1576
1582
|
},
|
|
1577
1583
|
{
|
|
1578
|
-
foreignKeyName:
|
|
1579
|
-
columns: [
|
|
1584
|
+
foreignKeyName: "execution_logs_user_id_fkey";
|
|
1585
|
+
columns: ["user_id"];
|
|
1580
1586
|
isOneToOne: false;
|
|
1581
|
-
referencedRelation:
|
|
1582
|
-
referencedColumns: [
|
|
1587
|
+
referencedRelation: "users";
|
|
1588
|
+
referencedColumns: ["id"];
|
|
1583
1589
|
}
|
|
1584
1590
|
];
|
|
1585
1591
|
};
|
|
@@ -1625,18 +1631,18 @@ type Database = {
|
|
|
1625
1631
|
};
|
|
1626
1632
|
Relationships: [
|
|
1627
1633
|
{
|
|
1628
|
-
foreignKeyName:
|
|
1629
|
-
columns: [
|
|
1634
|
+
foreignKeyName: "execution_metrics_execution_id_fkey";
|
|
1635
|
+
columns: ["execution_id"];
|
|
1630
1636
|
isOneToOne: true;
|
|
1631
|
-
referencedRelation:
|
|
1632
|
-
referencedColumns: [
|
|
1637
|
+
referencedRelation: "execution_logs";
|
|
1638
|
+
referencedColumns: ["execution_id"];
|
|
1633
1639
|
},
|
|
1634
1640
|
{
|
|
1635
|
-
foreignKeyName:
|
|
1636
|
-
columns: [
|
|
1641
|
+
foreignKeyName: "execution_metrics_organization_id_fkey";
|
|
1642
|
+
columns: ["organization_id"];
|
|
1637
1643
|
isOneToOne: false;
|
|
1638
|
-
referencedRelation:
|
|
1639
|
-
referencedColumns: [
|
|
1644
|
+
referencedRelation: "organizations";
|
|
1645
|
+
referencedColumns: ["id"];
|
|
1640
1646
|
}
|
|
1641
1647
|
];
|
|
1642
1648
|
};
|
|
@@ -1679,18 +1685,18 @@ type Database = {
|
|
|
1679
1685
|
};
|
|
1680
1686
|
Relationships: [
|
|
1681
1687
|
{
|
|
1682
|
-
foreignKeyName:
|
|
1683
|
-
columns: [
|
|
1688
|
+
foreignKeyName: "notifications_organization_id_fkey";
|
|
1689
|
+
columns: ["organization_id"];
|
|
1684
1690
|
isOneToOne: false;
|
|
1685
|
-
referencedRelation:
|
|
1686
|
-
referencedColumns: [
|
|
1691
|
+
referencedRelation: "organizations";
|
|
1692
|
+
referencedColumns: ["id"];
|
|
1687
1693
|
},
|
|
1688
1694
|
{
|
|
1689
|
-
foreignKeyName:
|
|
1690
|
-
columns: [
|
|
1695
|
+
foreignKeyName: "notifications_user_id_fkey";
|
|
1696
|
+
columns: ["user_id"];
|
|
1691
1697
|
isOneToOne: false;
|
|
1692
|
-
referencedRelation:
|
|
1693
|
-
referencedColumns: [
|
|
1698
|
+
referencedRelation: "users";
|
|
1699
|
+
referencedColumns: ["id"];
|
|
1694
1700
|
}
|
|
1695
1701
|
];
|
|
1696
1702
|
};
|
|
@@ -1745,18 +1751,18 @@ type Database = {
|
|
|
1745
1751
|
};
|
|
1746
1752
|
Relationships: [
|
|
1747
1753
|
{
|
|
1748
|
-
foreignKeyName:
|
|
1749
|
-
columns: [
|
|
1754
|
+
foreignKeyName: "org_invitations_inviter_user_id_fkey";
|
|
1755
|
+
columns: ["inviter_user_id"];
|
|
1750
1756
|
isOneToOne: false;
|
|
1751
|
-
referencedRelation:
|
|
1752
|
-
referencedColumns: [
|
|
1757
|
+
referencedRelation: "users";
|
|
1758
|
+
referencedColumns: ["id"];
|
|
1753
1759
|
},
|
|
1754
1760
|
{
|
|
1755
|
-
foreignKeyName:
|
|
1756
|
-
columns: [
|
|
1761
|
+
foreignKeyName: "org_invitations_organization_id_fkey";
|
|
1762
|
+
columns: ["organization_id"];
|
|
1757
1763
|
isOneToOne: false;
|
|
1758
|
-
referencedRelation:
|
|
1759
|
-
referencedColumns: [
|
|
1764
|
+
referencedRelation: "organizations";
|
|
1765
|
+
referencedColumns: ["id"];
|
|
1760
1766
|
}
|
|
1761
1767
|
];
|
|
1762
1768
|
};
|
|
@@ -1799,18 +1805,18 @@ type Database = {
|
|
|
1799
1805
|
};
|
|
1800
1806
|
Relationships: [
|
|
1801
1807
|
{
|
|
1802
|
-
foreignKeyName:
|
|
1803
|
-
columns: [
|
|
1808
|
+
foreignKeyName: "org_memberships_organization_id_fkey";
|
|
1809
|
+
columns: ["organization_id"];
|
|
1804
1810
|
isOneToOne: false;
|
|
1805
|
-
referencedRelation:
|
|
1806
|
-
referencedColumns: [
|
|
1811
|
+
referencedRelation: "organizations";
|
|
1812
|
+
referencedColumns: ["id"];
|
|
1807
1813
|
},
|
|
1808
1814
|
{
|
|
1809
|
-
foreignKeyName:
|
|
1810
|
-
columns: [
|
|
1815
|
+
foreignKeyName: "org_memberships_user_id_fkey";
|
|
1816
|
+
columns: ["user_id"];
|
|
1811
1817
|
isOneToOne: false;
|
|
1812
|
-
referencedRelation:
|
|
1813
|
-
referencedColumns: [
|
|
1818
|
+
referencedRelation: "users";
|
|
1819
|
+
referencedColumns: ["id"];
|
|
1814
1820
|
}
|
|
1815
1821
|
];
|
|
1816
1822
|
};
|
|
@@ -1835,25 +1841,25 @@ type Database = {
|
|
|
1835
1841
|
};
|
|
1836
1842
|
Relationships: [
|
|
1837
1843
|
{
|
|
1838
|
-
foreignKeyName:
|
|
1839
|
-
columns: [
|
|
1844
|
+
foreignKeyName: "org_rol_assignments_granted_by_fkey";
|
|
1845
|
+
columns: ["granted_by"];
|
|
1840
1846
|
isOneToOne: false;
|
|
1841
|
-
referencedRelation:
|
|
1842
|
-
referencedColumns: [
|
|
1847
|
+
referencedRelation: "users";
|
|
1848
|
+
referencedColumns: ["id"];
|
|
1843
1849
|
},
|
|
1844
1850
|
{
|
|
1845
|
-
foreignKeyName:
|
|
1846
|
-
columns: [
|
|
1851
|
+
foreignKeyName: "org_rol_assignments_membership_id_fkey";
|
|
1852
|
+
columns: ["membership_id"];
|
|
1847
1853
|
isOneToOne: false;
|
|
1848
|
-
referencedRelation:
|
|
1849
|
-
referencedColumns: [
|
|
1854
|
+
referencedRelation: "org_memberships";
|
|
1855
|
+
referencedColumns: ["id"];
|
|
1850
1856
|
},
|
|
1851
1857
|
{
|
|
1852
|
-
foreignKeyName:
|
|
1853
|
-
columns: [
|
|
1858
|
+
foreignKeyName: "org_rol_assignments_role_id_fkey";
|
|
1859
|
+
columns: ["role_id"];
|
|
1854
1860
|
isOneToOne: false;
|
|
1855
|
-
referencedRelation:
|
|
1856
|
-
referencedColumns: [
|
|
1861
|
+
referencedRelation: "org_rol_definitions";
|
|
1862
|
+
referencedColumns: ["id"];
|
|
1857
1863
|
}
|
|
1858
1864
|
];
|
|
1859
1865
|
};
|
|
@@ -1890,11 +1896,11 @@ type Database = {
|
|
|
1890
1896
|
};
|
|
1891
1897
|
Relationships: [
|
|
1892
1898
|
{
|
|
1893
|
-
foreignKeyName:
|
|
1894
|
-
columns: [
|
|
1899
|
+
foreignKeyName: "org_rol_definitions_organization_id_fkey";
|
|
1900
|
+
columns: ["organization_id"];
|
|
1895
1901
|
isOneToOne: false;
|
|
1896
|
-
referencedRelation:
|
|
1897
|
-
referencedColumns: [
|
|
1902
|
+
referencedRelation: "organizations";
|
|
1903
|
+
referencedColumns: ["id"];
|
|
1898
1904
|
}
|
|
1899
1905
|
];
|
|
1900
1906
|
};
|
|
@@ -1916,18 +1922,18 @@ type Database = {
|
|
|
1916
1922
|
};
|
|
1917
1923
|
Relationships: [
|
|
1918
1924
|
{
|
|
1919
|
-
foreignKeyName:
|
|
1920
|
-
columns: [
|
|
1925
|
+
foreignKeyName: "org_rol_grants_permission_key_fkey";
|
|
1926
|
+
columns: ["permission_key"];
|
|
1921
1927
|
isOneToOne: false;
|
|
1922
|
-
referencedRelation:
|
|
1923
|
-
referencedColumns: [
|
|
1928
|
+
referencedRelation: "org_rol_permissions";
|
|
1929
|
+
referencedColumns: ["key"];
|
|
1924
1930
|
},
|
|
1925
1931
|
{
|
|
1926
|
-
foreignKeyName:
|
|
1927
|
-
columns: [
|
|
1932
|
+
foreignKeyName: "org_rol_grants_role_id_fkey";
|
|
1933
|
+
columns: ["role_id"];
|
|
1928
1934
|
isOneToOne: false;
|
|
1929
|
-
referencedRelation:
|
|
1930
|
-
referencedColumns: [
|
|
1935
|
+
referencedRelation: "org_rol_definitions";
|
|
1936
|
+
referencedColumns: ["id"];
|
|
1931
1937
|
}
|
|
1932
1938
|
];
|
|
1933
1939
|
};
|
|
@@ -2039,25 +2045,25 @@ type Database = {
|
|
|
2039
2045
|
};
|
|
2040
2046
|
Relationships: [
|
|
2041
2047
|
{
|
|
2042
|
-
foreignKeyName:
|
|
2043
|
-
columns: [
|
|
2048
|
+
foreignKeyName: "fk_milestones_project";
|
|
2049
|
+
columns: ["project_id"];
|
|
2044
2050
|
isOneToOne: false;
|
|
2045
|
-
referencedRelation:
|
|
2046
|
-
referencedColumns: [
|
|
2051
|
+
referencedRelation: "prj_projects";
|
|
2052
|
+
referencedColumns: ["id"];
|
|
2047
2053
|
},
|
|
2048
2054
|
{
|
|
2049
|
-
foreignKeyName:
|
|
2050
|
-
columns: [
|
|
2055
|
+
foreignKeyName: "prj_milestones_organization_id_fkey";
|
|
2056
|
+
columns: ["organization_id"];
|
|
2051
2057
|
isOneToOne: false;
|
|
2052
|
-
referencedRelation:
|
|
2053
|
-
referencedColumns: [
|
|
2058
|
+
referencedRelation: "organizations";
|
|
2059
|
+
referencedColumns: ["id"];
|
|
2054
2060
|
},
|
|
2055
2061
|
{
|
|
2056
|
-
foreignKeyName:
|
|
2057
|
-
columns: [
|
|
2062
|
+
foreignKeyName: "prj_milestones_project_id_fkey";
|
|
2063
|
+
columns: ["project_id"];
|
|
2058
2064
|
isOneToOne: false;
|
|
2059
|
-
referencedRelation:
|
|
2060
|
-
referencedColumns: [
|
|
2065
|
+
referencedRelation: "prj_projects";
|
|
2066
|
+
referencedColumns: ["id"];
|
|
2061
2067
|
}
|
|
2062
2068
|
];
|
|
2063
2069
|
};
|
|
@@ -2106,67 +2112,67 @@ type Database = {
|
|
|
2106
2112
|
};
|
|
2107
2113
|
Relationships: [
|
|
2108
2114
|
{
|
|
2109
|
-
foreignKeyName:
|
|
2110
|
-
columns: [
|
|
2115
|
+
foreignKeyName: "fk_notes_created_by";
|
|
2116
|
+
columns: ["created_by"];
|
|
2111
2117
|
isOneToOne: false;
|
|
2112
|
-
referencedRelation:
|
|
2113
|
-
referencedColumns: [
|
|
2118
|
+
referencedRelation: "users";
|
|
2119
|
+
referencedColumns: ["id"];
|
|
2114
2120
|
},
|
|
2115
2121
|
{
|
|
2116
|
-
foreignKeyName:
|
|
2117
|
-
columns: [
|
|
2122
|
+
foreignKeyName: "fk_notes_milestone";
|
|
2123
|
+
columns: ["milestone_id"];
|
|
2118
2124
|
isOneToOne: false;
|
|
2119
|
-
referencedRelation:
|
|
2120
|
-
referencedColumns: [
|
|
2125
|
+
referencedRelation: "prj_milestones";
|
|
2126
|
+
referencedColumns: ["id"];
|
|
2121
2127
|
},
|
|
2122
2128
|
{
|
|
2123
|
-
foreignKeyName:
|
|
2124
|
-
columns: [
|
|
2129
|
+
foreignKeyName: "fk_notes_project";
|
|
2130
|
+
columns: ["project_id"];
|
|
2125
2131
|
isOneToOne: false;
|
|
2126
|
-
referencedRelation:
|
|
2127
|
-
referencedColumns: [
|
|
2132
|
+
referencedRelation: "prj_projects";
|
|
2133
|
+
referencedColumns: ["id"];
|
|
2128
2134
|
},
|
|
2129
2135
|
{
|
|
2130
|
-
foreignKeyName:
|
|
2131
|
-
columns: [
|
|
2136
|
+
foreignKeyName: "fk_notes_task";
|
|
2137
|
+
columns: ["task_id"];
|
|
2132
2138
|
isOneToOne: false;
|
|
2133
|
-
referencedRelation:
|
|
2134
|
-
referencedColumns: [
|
|
2139
|
+
referencedRelation: "prj_tasks";
|
|
2140
|
+
referencedColumns: ["id"];
|
|
2135
2141
|
},
|
|
2136
2142
|
{
|
|
2137
|
-
foreignKeyName:
|
|
2138
|
-
columns: [
|
|
2143
|
+
foreignKeyName: "prj_notes_created_by_fkey";
|
|
2144
|
+
columns: ["created_by"];
|
|
2139
2145
|
isOneToOne: false;
|
|
2140
|
-
referencedRelation:
|
|
2141
|
-
referencedColumns: [
|
|
2146
|
+
referencedRelation: "users";
|
|
2147
|
+
referencedColumns: ["id"];
|
|
2142
2148
|
},
|
|
2143
2149
|
{
|
|
2144
|
-
foreignKeyName:
|
|
2145
|
-
columns: [
|
|
2150
|
+
foreignKeyName: "prj_notes_milestone_id_fkey";
|
|
2151
|
+
columns: ["milestone_id"];
|
|
2146
2152
|
isOneToOne: false;
|
|
2147
|
-
referencedRelation:
|
|
2148
|
-
referencedColumns: [
|
|
2153
|
+
referencedRelation: "prj_milestones";
|
|
2154
|
+
referencedColumns: ["id"];
|
|
2149
2155
|
},
|
|
2150
2156
|
{
|
|
2151
|
-
foreignKeyName:
|
|
2152
|
-
columns: [
|
|
2157
|
+
foreignKeyName: "prj_notes_organization_id_fkey";
|
|
2158
|
+
columns: ["organization_id"];
|
|
2153
2159
|
isOneToOne: false;
|
|
2154
|
-
referencedRelation:
|
|
2155
|
-
referencedColumns: [
|
|
2160
|
+
referencedRelation: "organizations";
|
|
2161
|
+
referencedColumns: ["id"];
|
|
2156
2162
|
},
|
|
2157
2163
|
{
|
|
2158
|
-
foreignKeyName:
|
|
2159
|
-
columns: [
|
|
2164
|
+
foreignKeyName: "prj_notes_project_id_fkey";
|
|
2165
|
+
columns: ["project_id"];
|
|
2160
2166
|
isOneToOne: false;
|
|
2161
|
-
referencedRelation:
|
|
2162
|
-
referencedColumns: [
|
|
2167
|
+
referencedRelation: "prj_projects";
|
|
2168
|
+
referencedColumns: ["id"];
|
|
2163
2169
|
},
|
|
2164
2170
|
{
|
|
2165
|
-
foreignKeyName:
|
|
2166
|
-
columns: [
|
|
2171
|
+
foreignKeyName: "prj_notes_task_id_fkey";
|
|
2172
|
+
columns: ["task_id"];
|
|
2167
2173
|
isOneToOne: false;
|
|
2168
|
-
referencedRelation:
|
|
2169
|
-
referencedColumns: [
|
|
2174
|
+
referencedRelation: "prj_tasks";
|
|
2175
|
+
referencedColumns: ["id"];
|
|
2170
2176
|
}
|
|
2171
2177
|
];
|
|
2172
2178
|
};
|
|
@@ -2224,39 +2230,39 @@ type Database = {
|
|
|
2224
2230
|
};
|
|
2225
2231
|
Relationships: [
|
|
2226
2232
|
{
|
|
2227
|
-
foreignKeyName:
|
|
2228
|
-
columns: [
|
|
2233
|
+
foreignKeyName: "fk_projects_company";
|
|
2234
|
+
columns: ["client_company_id"];
|
|
2229
2235
|
isOneToOne: false;
|
|
2230
|
-
referencedRelation:
|
|
2231
|
-
referencedColumns: [
|
|
2236
|
+
referencedRelation: "acq_companies";
|
|
2237
|
+
referencedColumns: ["id"];
|
|
2232
2238
|
},
|
|
2233
2239
|
{
|
|
2234
|
-
foreignKeyName:
|
|
2235
|
-
columns: [
|
|
2240
|
+
foreignKeyName: "fk_projects_deal";
|
|
2241
|
+
columns: ["deal_id"];
|
|
2236
2242
|
isOneToOne: false;
|
|
2237
|
-
referencedRelation:
|
|
2238
|
-
referencedColumns: [
|
|
2243
|
+
referencedRelation: "acq_deals";
|
|
2244
|
+
referencedColumns: ["id"];
|
|
2239
2245
|
},
|
|
2240
2246
|
{
|
|
2241
|
-
foreignKeyName:
|
|
2242
|
-
columns: [
|
|
2247
|
+
foreignKeyName: "prj_projects_client_company_id_fkey";
|
|
2248
|
+
columns: ["client_company_id"];
|
|
2243
2249
|
isOneToOne: false;
|
|
2244
|
-
referencedRelation:
|
|
2245
|
-
referencedColumns: [
|
|
2250
|
+
referencedRelation: "acq_companies";
|
|
2251
|
+
referencedColumns: ["id"];
|
|
2246
2252
|
},
|
|
2247
2253
|
{
|
|
2248
|
-
foreignKeyName:
|
|
2249
|
-
columns: [
|
|
2254
|
+
foreignKeyName: "prj_projects_deal_id_fkey";
|
|
2255
|
+
columns: ["deal_id"];
|
|
2250
2256
|
isOneToOne: false;
|
|
2251
|
-
referencedRelation:
|
|
2252
|
-
referencedColumns: [
|
|
2257
|
+
referencedRelation: "acq_deals";
|
|
2258
|
+
referencedColumns: ["id"];
|
|
2253
2259
|
},
|
|
2254
2260
|
{
|
|
2255
|
-
foreignKeyName:
|
|
2256
|
-
columns: [
|
|
2261
|
+
foreignKeyName: "prj_projects_organization_id_fkey";
|
|
2262
|
+
columns: ["organization_id"];
|
|
2257
2263
|
isOneToOne: false;
|
|
2258
|
-
referencedRelation:
|
|
2259
|
-
referencedColumns: [
|
|
2264
|
+
referencedRelation: "organizations";
|
|
2265
|
+
referencedColumns: ["id"];
|
|
2260
2266
|
}
|
|
2261
2267
|
];
|
|
2262
2268
|
};
|
|
@@ -2320,53 +2326,53 @@ type Database = {
|
|
|
2320
2326
|
};
|
|
2321
2327
|
Relationships: [
|
|
2322
2328
|
{
|
|
2323
|
-
foreignKeyName:
|
|
2324
|
-
columns: [
|
|
2329
|
+
foreignKeyName: "fk_tasks_milestone";
|
|
2330
|
+
columns: ["milestone_id"];
|
|
2325
2331
|
isOneToOne: false;
|
|
2326
|
-
referencedRelation:
|
|
2327
|
-
referencedColumns: [
|
|
2332
|
+
referencedRelation: "prj_milestones";
|
|
2333
|
+
referencedColumns: ["id"];
|
|
2328
2334
|
},
|
|
2329
2335
|
{
|
|
2330
|
-
foreignKeyName:
|
|
2331
|
-
columns: [
|
|
2336
|
+
foreignKeyName: "fk_tasks_parent";
|
|
2337
|
+
columns: ["parent_task_id"];
|
|
2332
2338
|
isOneToOne: false;
|
|
2333
|
-
referencedRelation:
|
|
2334
|
-
referencedColumns: [
|
|
2339
|
+
referencedRelation: "prj_tasks";
|
|
2340
|
+
referencedColumns: ["id"];
|
|
2335
2341
|
},
|
|
2336
2342
|
{
|
|
2337
|
-
foreignKeyName:
|
|
2338
|
-
columns: [
|
|
2343
|
+
foreignKeyName: "fk_tasks_project";
|
|
2344
|
+
columns: ["project_id"];
|
|
2339
2345
|
isOneToOne: false;
|
|
2340
|
-
referencedRelation:
|
|
2341
|
-
referencedColumns: [
|
|
2346
|
+
referencedRelation: "prj_projects";
|
|
2347
|
+
referencedColumns: ["id"];
|
|
2342
2348
|
},
|
|
2343
2349
|
{
|
|
2344
|
-
foreignKeyName:
|
|
2345
|
-
columns: [
|
|
2350
|
+
foreignKeyName: "prj_tasks_milestone_id_fkey";
|
|
2351
|
+
columns: ["milestone_id"];
|
|
2346
2352
|
isOneToOne: false;
|
|
2347
|
-
referencedRelation:
|
|
2348
|
-
referencedColumns: [
|
|
2353
|
+
referencedRelation: "prj_milestones";
|
|
2354
|
+
referencedColumns: ["id"];
|
|
2349
2355
|
},
|
|
2350
2356
|
{
|
|
2351
|
-
foreignKeyName:
|
|
2352
|
-
columns: [
|
|
2357
|
+
foreignKeyName: "prj_tasks_organization_id_fkey";
|
|
2358
|
+
columns: ["organization_id"];
|
|
2353
2359
|
isOneToOne: false;
|
|
2354
|
-
referencedRelation:
|
|
2355
|
-
referencedColumns: [
|
|
2360
|
+
referencedRelation: "organizations";
|
|
2361
|
+
referencedColumns: ["id"];
|
|
2356
2362
|
},
|
|
2357
2363
|
{
|
|
2358
|
-
foreignKeyName:
|
|
2359
|
-
columns: [
|
|
2364
|
+
foreignKeyName: "prj_tasks_parent_task_id_fkey";
|
|
2365
|
+
columns: ["parent_task_id"];
|
|
2360
2366
|
isOneToOne: false;
|
|
2361
|
-
referencedRelation:
|
|
2362
|
-
referencedColumns: [
|
|
2367
|
+
referencedRelation: "prj_tasks";
|
|
2368
|
+
referencedColumns: ["id"];
|
|
2363
2369
|
},
|
|
2364
2370
|
{
|
|
2365
|
-
foreignKeyName:
|
|
2366
|
-
columns: [
|
|
2371
|
+
foreignKeyName: "prj_tasks_project_id_fkey";
|
|
2372
|
+
columns: ["project_id"];
|
|
2367
2373
|
isOneToOne: false;
|
|
2368
|
-
referencedRelation:
|
|
2369
|
-
referencedColumns: [
|
|
2374
|
+
referencedRelation: "prj_projects";
|
|
2375
|
+
referencedColumns: ["id"];
|
|
2370
2376
|
}
|
|
2371
2377
|
];
|
|
2372
2378
|
};
|
|
@@ -2436,25 +2442,25 @@ type Database = {
|
|
|
2436
2442
|
};
|
|
2437
2443
|
Relationships: [
|
|
2438
2444
|
{
|
|
2439
|
-
foreignKeyName:
|
|
2440
|
-
columns: [
|
|
2445
|
+
foreignKeyName: "reported_requests_organization_id_fkey";
|
|
2446
|
+
columns: ["organization_id"];
|
|
2441
2447
|
isOneToOne: false;
|
|
2442
|
-
referencedRelation:
|
|
2443
|
-
referencedColumns: [
|
|
2448
|
+
referencedRelation: "organizations";
|
|
2449
|
+
referencedColumns: ["id"];
|
|
2444
2450
|
},
|
|
2445
2451
|
{
|
|
2446
|
-
foreignKeyName:
|
|
2447
|
-
columns: [
|
|
2452
|
+
foreignKeyName: "reported_requests_project_id_fkey";
|
|
2453
|
+
columns: ["project_id"];
|
|
2448
2454
|
isOneToOne: false;
|
|
2449
|
-
referencedRelation:
|
|
2450
|
-
referencedColumns: [
|
|
2455
|
+
referencedRelation: "prj_projects";
|
|
2456
|
+
referencedColumns: ["id"];
|
|
2451
2457
|
},
|
|
2452
2458
|
{
|
|
2453
|
-
foreignKeyName:
|
|
2454
|
-
columns: [
|
|
2459
|
+
foreignKeyName: "reported_requests_task_id_fkey";
|
|
2460
|
+
columns: ["task_id"];
|
|
2455
2461
|
isOneToOne: false;
|
|
2456
|
-
referencedRelation:
|
|
2457
|
-
referencedColumns: [
|
|
2462
|
+
referencedRelation: "prj_tasks";
|
|
2463
|
+
referencedColumns: ["id"];
|
|
2458
2464
|
}
|
|
2459
2465
|
];
|
|
2460
2466
|
};
|
|
@@ -2494,11 +2500,11 @@ type Database = {
|
|
|
2494
2500
|
};
|
|
2495
2501
|
Relationships: [
|
|
2496
2502
|
{
|
|
2497
|
-
foreignKeyName:
|
|
2498
|
-
columns: [
|
|
2503
|
+
foreignKeyName: "session_messages_session_id_fkey";
|
|
2504
|
+
columns: ["session_id"];
|
|
2499
2505
|
isOneToOne: false;
|
|
2500
|
-
referencedRelation:
|
|
2501
|
-
referencedColumns: [
|
|
2506
|
+
referencedRelation: "sessions";
|
|
2507
|
+
referencedColumns: ["session_id"];
|
|
2502
2508
|
}
|
|
2503
2509
|
];
|
|
2504
2510
|
};
|
|
@@ -2553,18 +2559,18 @@ type Database = {
|
|
|
2553
2559
|
};
|
|
2554
2560
|
Relationships: [
|
|
2555
2561
|
{
|
|
2556
|
-
foreignKeyName:
|
|
2557
|
-
columns: [
|
|
2562
|
+
foreignKeyName: "fk_organization";
|
|
2563
|
+
columns: ["organization_id"];
|
|
2558
2564
|
isOneToOne: false;
|
|
2559
|
-
referencedRelation:
|
|
2560
|
-
referencedColumns: [
|
|
2565
|
+
referencedRelation: "organizations";
|
|
2566
|
+
referencedColumns: ["id"];
|
|
2561
2567
|
},
|
|
2562
2568
|
{
|
|
2563
|
-
foreignKeyName:
|
|
2564
|
-
columns: [
|
|
2569
|
+
foreignKeyName: "fk_user";
|
|
2570
|
+
columns: ["user_id"];
|
|
2565
2571
|
isOneToOne: false;
|
|
2566
|
-
referencedRelation:
|
|
2567
|
-
referencedColumns: [
|
|
2572
|
+
referencedRelation: "users";
|
|
2573
|
+
referencedColumns: ["id"];
|
|
2568
2574
|
}
|
|
2569
2575
|
];
|
|
2570
2576
|
};
|
|
@@ -2640,11 +2646,11 @@ type Database = {
|
|
|
2640
2646
|
};
|
|
2641
2647
|
Relationships: [
|
|
2642
2648
|
{
|
|
2643
|
-
foreignKeyName:
|
|
2644
|
-
columns: [
|
|
2649
|
+
foreignKeyName: "task_schedules_organization_id_fkey";
|
|
2650
|
+
columns: ["organization_id"];
|
|
2645
2651
|
isOneToOne: false;
|
|
2646
|
-
referencedRelation:
|
|
2647
|
-
referencedColumns: [
|
|
2652
|
+
referencedRelation: "organizations";
|
|
2653
|
+
referencedColumns: ["id"];
|
|
2648
2654
|
}
|
|
2649
2655
|
];
|
|
2650
2656
|
};
|
|
@@ -2699,11 +2705,11 @@ type Database = {
|
|
|
2699
2705
|
};
|
|
2700
2706
|
Relationships: [
|
|
2701
2707
|
{
|
|
2702
|
-
foreignKeyName:
|
|
2703
|
-
columns: [
|
|
2708
|
+
foreignKeyName: "user_profiles_last_visited_org_fkey";
|
|
2709
|
+
columns: ["last_visited_org"];
|
|
2704
2710
|
isOneToOne: false;
|
|
2705
|
-
referencedRelation:
|
|
2706
|
-
referencedColumns: [
|
|
2711
|
+
referencedRelation: "organizations";
|
|
2712
|
+
referencedColumns: ["id"];
|
|
2707
2713
|
}
|
|
2708
2714
|
];
|
|
2709
2715
|
};
|
|
@@ -2752,11 +2758,11 @@ type Database = {
|
|
|
2752
2758
|
};
|
|
2753
2759
|
Relationships: [
|
|
2754
2760
|
{
|
|
2755
|
-
foreignKeyName:
|
|
2756
|
-
columns: [
|
|
2761
|
+
foreignKeyName: "webhook_endpoints_organization_id_fkey";
|
|
2762
|
+
columns: ["organization_id"];
|
|
2757
2763
|
isOneToOne: false;
|
|
2758
|
-
referencedRelation:
|
|
2759
|
-
referencedColumns: [
|
|
2764
|
+
referencedRelation: "organizations";
|
|
2765
|
+
referencedColumns: ["id"];
|
|
2760
2766
|
}
|
|
2761
2767
|
];
|
|
2762
2768
|
};
|
|
@@ -2904,17 +2910,17 @@ type Database = {
|
|
|
2904
2910
|
};
|
|
2905
2911
|
};
|
|
2906
2912
|
};
|
|
2907
|
-
type DatabaseWithoutInternals = Omit<Database,
|
|
2908
|
-
type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database,
|
|
2909
|
-
type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema[
|
|
2913
|
+
type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
|
|
2914
|
+
type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
|
|
2915
|
+
type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
|
|
2910
2916
|
schema: keyof DatabaseWithoutInternals;
|
|
2911
2917
|
}, TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
2912
2918
|
schema: keyof DatabaseWithoutInternals;
|
|
2913
|
-
} ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions[
|
|
2919
|
+
} ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
|
|
2914
2920
|
schema: keyof DatabaseWithoutInternals;
|
|
2915
|
-
} ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions[
|
|
2921
|
+
} ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
2916
2922
|
Row: infer R;
|
|
2917
|
-
} ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema[
|
|
2923
|
+
} ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
|
|
2918
2924
|
Row: infer R;
|
|
2919
2925
|
} ? R : never : never;
|
|
2920
2926
|
|
|
@@ -3500,6 +3506,36 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
3500
3506
|
id: z.ZodString;
|
|
3501
3507
|
order: z.ZodNumber;
|
|
3502
3508
|
}, z.core.$strip>>;
|
|
3509
|
+
defaultBuildTemplateId: z.ZodString;
|
|
3510
|
+
buildTemplates: z.ZodArray<z.ZodObject<{
|
|
3511
|
+
label: z.ZodString;
|
|
3512
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3513
|
+
color: z.ZodOptional<z.ZodString>;
|
|
3514
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
3515
|
+
id: z.ZodString;
|
|
3516
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
3517
|
+
label: z.ZodString;
|
|
3518
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3519
|
+
color: z.ZodOptional<z.ZodString>;
|
|
3520
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
3521
|
+
id: z.ZodString;
|
|
3522
|
+
primaryEntity: z.ZodEnum<{
|
|
3523
|
+
company: "company";
|
|
3524
|
+
contact: "contact";
|
|
3525
|
+
}>;
|
|
3526
|
+
outputs: z.ZodArray<z.ZodEnum<{
|
|
3527
|
+
company: "company";
|
|
3528
|
+
contact: "contact";
|
|
3529
|
+
export: "export";
|
|
3530
|
+
}>>;
|
|
3531
|
+
stageKey: z.ZodString;
|
|
3532
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3533
|
+
dependencyMode: z.ZodLiteral<"per-record-eligibility">;
|
|
3534
|
+
capabilityKey: z.ZodString;
|
|
3535
|
+
defaultBatchSize: z.ZodNumber;
|
|
3536
|
+
maxBatchSize: z.ZodNumber;
|
|
3537
|
+
}, z.core.$strip>>;
|
|
3538
|
+
}, z.core.$strip>>;
|
|
3503
3539
|
}, z.core.$strip>;
|
|
3504
3540
|
projects: z.ZodObject<{
|
|
3505
3541
|
projectEntityId: z.ZodString;
|