@elevasis/core 0.12.0 → 0.14.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -2
- package/dist/organization-model/index.d.ts +1 -1
- package/dist/organization-model/index.js +9 -2
- package/dist/test-utils/index.d.ts +480 -389
- package/dist/test-utils/index.js +28 -2
- package/package.json +1 -1
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +2324 -0
- package/src/auth/multi-tenancy/credentials/__tests__/encryption.test.ts +217 -216
- package/src/auth/multi-tenancy/credentials/server/encryption.ts +5 -19
- package/src/auth/multi-tenancy/credentials/server/kek-loader.ts +3 -13
- package/src/auth/multi-tenancy/permissions.ts +12 -5
- package/src/business/acquisition/activity-events.test.ts +250 -0
- package/src/business/acquisition/activity-events.ts +84 -0
- package/src/business/acquisition/api-schemas.test.ts +1180 -0
- package/src/business/acquisition/api-schemas.ts +456 -235
- package/src/business/acquisition/crm-state-actions.test.ts +160 -0
- package/src/business/acquisition/derive-actions.test.ts +518 -0
- package/src/business/acquisition/derive-actions.ts +103 -0
- package/src/business/acquisition/index.ts +51 -11
- package/src/business/acquisition/stateful.ts +30 -0
- package/src/business/acquisition/types.ts +44 -77
- package/src/execution/engine/index.ts +4 -1
- package/src/execution/engine/tools/integration/server/adapters/apify/__tests__/apify-run-actor.integration.test.ts +1 -2
- package/src/execution/engine/tools/integration/server/adapters/attio/__tests__/attio-crud.integration.test.ts +363 -361
- package/src/execution/engine/tools/integration/server/adapters/attio/fetch/get-record/index.test.ts +162 -186
- package/src/execution/engine/tools/integration/server/adapters/attio/fetch/list-records/index.test.ts +316 -338
- package/src/execution/engine/tools/integration/server/adapters/gmail/gmail-adapter.ts +204 -210
- package/src/execution/engine/tools/integration/server/adapters/resend/fetch/send-email/index.test.ts +88 -0
- package/src/execution/engine/tools/integration/server/adapters/resend/fetch/send-email/index.ts +141 -134
- package/src/execution/engine/tools/integration/server/adapters/resend/fetch/utils/types.ts +76 -75
- package/src/execution/engine/tools/integration/service.test.ts +34 -9
- package/src/execution/engine/tools/integration/service.ts +6 -3
- package/src/execution/engine/tools/lead-service-types.ts +90 -30
- package/src/execution/engine/tools/platform/acquisition/types.ts +266 -260
- package/src/execution/engine/tools/registry.ts +5 -4
- package/src/execution/engine/tools/tool-maps.ts +43 -21
- package/src/execution/engine/workflow/types.ts +11 -0
- package/src/organization-model/contracts.ts +4 -4
- package/src/organization-model/domains/navigation.ts +62 -62
- package/src/organization-model/domains/sales.ts +272 -0
- package/src/organization-model/organization-graph.mdx +2 -2
- package/src/organization-model/published.ts +21 -21
- package/src/organization-model/resolve.ts +21 -8
- package/src/platform/constants/versions.ts +1 -1
- package/src/reference/_generated/contracts.md +2324 -0
- package/src/scaffold-registry/index.ts +10 -9
- package/src/scaffold-registry/schema.ts +68 -62
- package/src/supabase/database.types.ts +2958 -2884
- package/src/test-utils/rls/RLSTestContext.ts +585 -553
|
@@ -9,10 +9,57 @@ 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: {
|
|
16
|
+
acq_artifacts: {
|
|
17
|
+
Row: {
|
|
18
|
+
content: Json;
|
|
19
|
+
created_at: string;
|
|
20
|
+
created_by: string | null;
|
|
21
|
+
id: string;
|
|
22
|
+
kind: string;
|
|
23
|
+
organization_id: string;
|
|
24
|
+
owner_id: string;
|
|
25
|
+
owner_kind: string;
|
|
26
|
+
source_execution_id: string | null;
|
|
27
|
+
version: number;
|
|
28
|
+
};
|
|
29
|
+
Insert: {
|
|
30
|
+
content: Json;
|
|
31
|
+
created_at?: string;
|
|
32
|
+
created_by?: string | null;
|
|
33
|
+
id?: string;
|
|
34
|
+
kind: string;
|
|
35
|
+
organization_id: string;
|
|
36
|
+
owner_id: string;
|
|
37
|
+
owner_kind: string;
|
|
38
|
+
source_execution_id?: string | null;
|
|
39
|
+
version?: number;
|
|
40
|
+
};
|
|
41
|
+
Update: {
|
|
42
|
+
content?: Json;
|
|
43
|
+
created_at?: string;
|
|
44
|
+
created_by?: string | null;
|
|
45
|
+
id?: string;
|
|
46
|
+
kind?: string;
|
|
47
|
+
organization_id?: string;
|
|
48
|
+
owner_id?: string;
|
|
49
|
+
owner_kind?: string;
|
|
50
|
+
source_execution_id?: string | null;
|
|
51
|
+
version?: number;
|
|
52
|
+
};
|
|
53
|
+
Relationships: [
|
|
54
|
+
{
|
|
55
|
+
foreignKeyName: 'acq_artifacts_organization_id_fkey';
|
|
56
|
+
columns: ['organization_id'];
|
|
57
|
+
isOneToOne: false;
|
|
58
|
+
referencedRelation: 'organizations';
|
|
59
|
+
referencedColumns: ['id'];
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
};
|
|
16
63
|
acq_companies: {
|
|
17
64
|
Row: {
|
|
18
65
|
batch_id: string | null;
|
|
@@ -31,6 +78,9 @@ type Database = {
|
|
|
31
78
|
num_employees: number | null;
|
|
32
79
|
organization_id: string;
|
|
33
80
|
pipeline_status: Json;
|
|
81
|
+
qualification_rubric_key: string | null;
|
|
82
|
+
qualification_score: number | null;
|
|
83
|
+
qualification_signals: Json | null;
|
|
34
84
|
segment: string | null;
|
|
35
85
|
source: string | null;
|
|
36
86
|
status: string;
|
|
@@ -54,6 +104,9 @@ type Database = {
|
|
|
54
104
|
num_employees?: number | null;
|
|
55
105
|
organization_id: string;
|
|
56
106
|
pipeline_status?: Json;
|
|
107
|
+
qualification_rubric_key?: string | null;
|
|
108
|
+
qualification_score?: number | null;
|
|
109
|
+
qualification_signals?: Json | null;
|
|
57
110
|
segment?: string | null;
|
|
58
111
|
source?: string | null;
|
|
59
112
|
status?: string;
|
|
@@ -77,6 +130,9 @@ type Database = {
|
|
|
77
130
|
num_employees?: number | null;
|
|
78
131
|
organization_id?: string;
|
|
79
132
|
pipeline_status?: Json;
|
|
133
|
+
qualification_rubric_key?: string | null;
|
|
134
|
+
qualification_score?: number | null;
|
|
135
|
+
qualification_signals?: Json | null;
|
|
80
136
|
segment?: string | null;
|
|
81
137
|
source?: string | null;
|
|
82
138
|
status?: string;
|
|
@@ -85,11 +141,11 @@ type Database = {
|
|
|
85
141
|
};
|
|
86
142
|
Relationships: [
|
|
87
143
|
{
|
|
88
|
-
foreignKeyName:
|
|
89
|
-
columns: [
|
|
144
|
+
foreignKeyName: 'acq_companies_organization_id_fkey';
|
|
145
|
+
columns: ['organization_id'];
|
|
90
146
|
isOneToOne: false;
|
|
91
|
-
referencedRelation:
|
|
92
|
-
referencedColumns: [
|
|
147
|
+
referencedRelation: 'organizations';
|
|
148
|
+
referencedColumns: ['id'];
|
|
93
149
|
}
|
|
94
150
|
];
|
|
95
151
|
};
|
|
@@ -113,6 +169,9 @@ type Database = {
|
|
|
113
169
|
opening_line: string | null;
|
|
114
170
|
organization_id: string;
|
|
115
171
|
pipeline_status: Json;
|
|
172
|
+
qualification_rubric_key: string | null;
|
|
173
|
+
qualification_score: number | null;
|
|
174
|
+
qualification_signals: Json | null;
|
|
116
175
|
source: string | null;
|
|
117
176
|
source_id: string | null;
|
|
118
177
|
status: string;
|
|
@@ -138,6 +197,9 @@ type Database = {
|
|
|
138
197
|
opening_line?: string | null;
|
|
139
198
|
organization_id: string;
|
|
140
199
|
pipeline_status?: Json;
|
|
200
|
+
qualification_rubric_key?: string | null;
|
|
201
|
+
qualification_score?: number | null;
|
|
202
|
+
qualification_signals?: Json | null;
|
|
141
203
|
source?: string | null;
|
|
142
204
|
source_id?: string | null;
|
|
143
205
|
status?: string;
|
|
@@ -163,6 +225,9 @@ type Database = {
|
|
|
163
225
|
opening_line?: string | null;
|
|
164
226
|
organization_id?: string;
|
|
165
227
|
pipeline_status?: Json;
|
|
228
|
+
qualification_rubric_key?: string | null;
|
|
229
|
+
qualification_score?: number | null;
|
|
230
|
+
qualification_signals?: Json | null;
|
|
166
231
|
source?: string | null;
|
|
167
232
|
source_id?: string | null;
|
|
168
233
|
status?: string;
|
|
@@ -171,18 +236,18 @@ type Database = {
|
|
|
171
236
|
};
|
|
172
237
|
Relationships: [
|
|
173
238
|
{
|
|
174
|
-
foreignKeyName:
|
|
175
|
-
columns: [
|
|
239
|
+
foreignKeyName: 'acq_contacts_company_id_fkey';
|
|
240
|
+
columns: ['company_id'];
|
|
176
241
|
isOneToOne: false;
|
|
177
|
-
referencedRelation:
|
|
178
|
-
referencedColumns: [
|
|
242
|
+
referencedRelation: 'acq_companies';
|
|
243
|
+
referencedColumns: ['id'];
|
|
179
244
|
},
|
|
180
245
|
{
|
|
181
|
-
foreignKeyName:
|
|
182
|
-
columns: [
|
|
246
|
+
foreignKeyName: 'acq_contacts_organization_id_fkey';
|
|
247
|
+
columns: ['organization_id'];
|
|
183
248
|
isOneToOne: false;
|
|
184
|
-
referencedRelation:
|
|
185
|
-
referencedColumns: [
|
|
249
|
+
referencedRelation: 'organizations';
|
|
250
|
+
referencedColumns: ['id'];
|
|
186
251
|
}
|
|
187
252
|
];
|
|
188
253
|
};
|
|
@@ -219,11 +284,11 @@ type Database = {
|
|
|
219
284
|
};
|
|
220
285
|
Relationships: [
|
|
221
286
|
{
|
|
222
|
-
foreignKeyName:
|
|
223
|
-
columns: [
|
|
287
|
+
foreignKeyName: 'acq_content_organization_id_fkey';
|
|
288
|
+
columns: ['organization_id'];
|
|
224
289
|
isOneToOne: false;
|
|
225
|
-
referencedRelation:
|
|
226
|
-
referencedColumns: [
|
|
290
|
+
referencedRelation: 'organizations';
|
|
291
|
+
referencedColumns: ['id'];
|
|
227
292
|
}
|
|
228
293
|
];
|
|
229
294
|
};
|
|
@@ -287,18 +352,18 @@ type Database = {
|
|
|
287
352
|
};
|
|
288
353
|
Relationships: [
|
|
289
354
|
{
|
|
290
|
-
foreignKeyName:
|
|
291
|
-
columns: [
|
|
355
|
+
foreignKeyName: 'acq_content_distributions_content_id_fkey';
|
|
356
|
+
columns: ['content_id'];
|
|
292
357
|
isOneToOne: false;
|
|
293
|
-
referencedRelation:
|
|
294
|
-
referencedColumns: [
|
|
358
|
+
referencedRelation: 'acq_content';
|
|
359
|
+
referencedColumns: ['id'];
|
|
295
360
|
},
|
|
296
361
|
{
|
|
297
|
-
foreignKeyName:
|
|
298
|
-
columns: [
|
|
362
|
+
foreignKeyName: 'acq_content_distributions_organization_id_fkey';
|
|
363
|
+
columns: ['organization_id'];
|
|
299
364
|
isOneToOne: false;
|
|
300
|
-
referencedRelation:
|
|
301
|
-
referencedColumns: [
|
|
365
|
+
referencedRelation: 'organizations';
|
|
366
|
+
referencedColumns: ['id'];
|
|
302
367
|
}
|
|
303
368
|
];
|
|
304
369
|
};
|
|
@@ -332,18 +397,18 @@ type Database = {
|
|
|
332
397
|
};
|
|
333
398
|
Relationships: [
|
|
334
399
|
{
|
|
335
|
-
foreignKeyName:
|
|
336
|
-
columns: [
|
|
400
|
+
foreignKeyName: 'acq_deal_notes_deal_id_fkey';
|
|
401
|
+
columns: ['deal_id'];
|
|
337
402
|
isOneToOne: false;
|
|
338
|
-
referencedRelation:
|
|
339
|
-
referencedColumns: [
|
|
403
|
+
referencedRelation: 'acq_deals';
|
|
404
|
+
referencedColumns: ['id'];
|
|
340
405
|
},
|
|
341
406
|
{
|
|
342
|
-
foreignKeyName:
|
|
343
|
-
columns: [
|
|
407
|
+
foreignKeyName: 'acq_deal_notes_organization_id_fkey';
|
|
408
|
+
columns: ['organization_id'];
|
|
344
409
|
isOneToOne: false;
|
|
345
|
-
referencedRelation:
|
|
346
|
-
referencedColumns: [
|
|
410
|
+
referencedRelation: 'organizations';
|
|
411
|
+
referencedColumns: ['id'];
|
|
347
412
|
}
|
|
348
413
|
];
|
|
349
414
|
};
|
|
@@ -395,25 +460,24 @@ type Database = {
|
|
|
395
460
|
};
|
|
396
461
|
Relationships: [
|
|
397
462
|
{
|
|
398
|
-
foreignKeyName:
|
|
399
|
-
columns: [
|
|
463
|
+
foreignKeyName: 'acq_deal_tasks_deal_id_fkey';
|
|
464
|
+
columns: ['deal_id'];
|
|
400
465
|
isOneToOne: false;
|
|
401
|
-
referencedRelation:
|
|
402
|
-
referencedColumns: [
|
|
466
|
+
referencedRelation: 'acq_deals';
|
|
467
|
+
referencedColumns: ['id'];
|
|
403
468
|
},
|
|
404
469
|
{
|
|
405
|
-
foreignKeyName:
|
|
406
|
-
columns: [
|
|
470
|
+
foreignKeyName: 'acq_deal_tasks_organization_id_fkey';
|
|
471
|
+
columns: ['organization_id'];
|
|
407
472
|
isOneToOne: false;
|
|
408
|
-
referencedRelation:
|
|
409
|
-
referencedColumns: [
|
|
473
|
+
referencedRelation: 'organizations';
|
|
474
|
+
referencedColumns: ['id'];
|
|
410
475
|
}
|
|
411
476
|
];
|
|
412
477
|
};
|
|
413
478
|
acq_deals: {
|
|
414
479
|
Row: {
|
|
415
480
|
activity_log: Json;
|
|
416
|
-
cached_stage: string | null;
|
|
417
481
|
closed_lost_at: string | null;
|
|
418
482
|
closed_lost_reason: string | null;
|
|
419
483
|
contact_email: string;
|
|
@@ -428,6 +492,7 @@ type Database = {
|
|
|
428
492
|
organization_id: string;
|
|
429
493
|
payment_link_sent_at: string | null;
|
|
430
494
|
payment_received_at: string | null;
|
|
495
|
+
pipeline_key: string;
|
|
431
496
|
proposal_data: Json | null;
|
|
432
497
|
proposal_generated_at: string | null;
|
|
433
498
|
proposal_pdf_url: string | null;
|
|
@@ -435,10 +500,11 @@ type Database = {
|
|
|
435
500
|
proposal_reviewed_by: string | null;
|
|
436
501
|
proposal_sent_at: string | null;
|
|
437
502
|
proposal_signed_at: string | null;
|
|
438
|
-
proposal_status: string | null;
|
|
439
503
|
signature_envelope_id: string | null;
|
|
440
504
|
source_list_id: string | null;
|
|
441
505
|
source_type: string | null;
|
|
506
|
+
stage_key: string | null;
|
|
507
|
+
state_key: string | null;
|
|
442
508
|
stripe_payment_id: string | null;
|
|
443
509
|
stripe_payment_link: string | null;
|
|
444
510
|
stripe_payment_link_id: string | null;
|
|
@@ -447,7 +513,6 @@ type Database = {
|
|
|
447
513
|
};
|
|
448
514
|
Insert: {
|
|
449
515
|
activity_log?: Json;
|
|
450
|
-
cached_stage?: string | null;
|
|
451
516
|
closed_lost_at?: string | null;
|
|
452
517
|
closed_lost_reason?: string | null;
|
|
453
518
|
contact_email: string;
|
|
@@ -462,6 +527,7 @@ type Database = {
|
|
|
462
527
|
organization_id: string;
|
|
463
528
|
payment_link_sent_at?: string | null;
|
|
464
529
|
payment_received_at?: string | null;
|
|
530
|
+
pipeline_key?: string;
|
|
465
531
|
proposal_data?: Json | null;
|
|
466
532
|
proposal_generated_at?: string | null;
|
|
467
533
|
proposal_pdf_url?: string | null;
|
|
@@ -469,10 +535,11 @@ type Database = {
|
|
|
469
535
|
proposal_reviewed_by?: string | null;
|
|
470
536
|
proposal_sent_at?: string | null;
|
|
471
537
|
proposal_signed_at?: string | null;
|
|
472
|
-
proposal_status?: string | null;
|
|
473
538
|
signature_envelope_id?: string | null;
|
|
474
539
|
source_list_id?: string | null;
|
|
475
540
|
source_type?: string | null;
|
|
541
|
+
stage_key?: string | null;
|
|
542
|
+
state_key?: string | null;
|
|
476
543
|
stripe_payment_id?: string | null;
|
|
477
544
|
stripe_payment_link?: string | null;
|
|
478
545
|
stripe_payment_link_id?: string | null;
|
|
@@ -481,7 +548,6 @@ type Database = {
|
|
|
481
548
|
};
|
|
482
549
|
Update: {
|
|
483
550
|
activity_log?: Json;
|
|
484
|
-
cached_stage?: string | null;
|
|
485
551
|
closed_lost_at?: string | null;
|
|
486
552
|
closed_lost_reason?: string | null;
|
|
487
553
|
contact_email?: string;
|
|
@@ -496,6 +562,7 @@ type Database = {
|
|
|
496
562
|
organization_id?: string;
|
|
497
563
|
payment_link_sent_at?: string | null;
|
|
498
564
|
payment_received_at?: string | null;
|
|
565
|
+
pipeline_key?: string;
|
|
499
566
|
proposal_data?: Json | null;
|
|
500
567
|
proposal_generated_at?: string | null;
|
|
501
568
|
proposal_pdf_url?: string | null;
|
|
@@ -503,10 +570,11 @@ type Database = {
|
|
|
503
570
|
proposal_reviewed_by?: string | null;
|
|
504
571
|
proposal_sent_at?: string | null;
|
|
505
572
|
proposal_signed_at?: string | null;
|
|
506
|
-
proposal_status?: string | null;
|
|
507
573
|
signature_envelope_id?: string | null;
|
|
508
574
|
source_list_id?: string | null;
|
|
509
575
|
source_type?: string | null;
|
|
576
|
+
stage_key?: string | null;
|
|
577
|
+
state_key?: string | null;
|
|
510
578
|
stripe_payment_id?: string | null;
|
|
511
579
|
stripe_payment_link?: string | null;
|
|
512
580
|
stripe_payment_link_id?: string | null;
|
|
@@ -515,86 +583,95 @@ type Database = {
|
|
|
515
583
|
};
|
|
516
584
|
Relationships: [
|
|
517
585
|
{
|
|
518
|
-
foreignKeyName:
|
|
519
|
-
columns: [
|
|
586
|
+
foreignKeyName: 'acq_deals_contact_id_fkey';
|
|
587
|
+
columns: ['contact_id'];
|
|
520
588
|
isOneToOne: false;
|
|
521
|
-
referencedRelation:
|
|
522
|
-
referencedColumns: [
|
|
589
|
+
referencedRelation: 'acq_contacts';
|
|
590
|
+
referencedColumns: ['id'];
|
|
523
591
|
},
|
|
524
592
|
{
|
|
525
|
-
foreignKeyName:
|
|
526
|
-
columns: [
|
|
593
|
+
foreignKeyName: 'acq_deals_organization_id_fkey';
|
|
594
|
+
columns: ['organization_id'];
|
|
527
595
|
isOneToOne: false;
|
|
528
|
-
referencedRelation:
|
|
529
|
-
referencedColumns: [
|
|
596
|
+
referencedRelation: 'organizations';
|
|
597
|
+
referencedColumns: ['id'];
|
|
530
598
|
},
|
|
531
599
|
{
|
|
532
|
-
foreignKeyName:
|
|
533
|
-
columns: [
|
|
600
|
+
foreignKeyName: 'acq_deals_source_list_id_fkey';
|
|
601
|
+
columns: ['source_list_id'];
|
|
534
602
|
isOneToOne: false;
|
|
535
|
-
referencedRelation:
|
|
536
|
-
referencedColumns: [
|
|
603
|
+
referencedRelation: 'acq_lists';
|
|
604
|
+
referencedColumns: ['id'];
|
|
537
605
|
}
|
|
538
606
|
];
|
|
539
607
|
};
|
|
540
608
|
acq_list_companies: {
|
|
541
609
|
Row: {
|
|
610
|
+
activity_log: Json;
|
|
542
611
|
added_at: string;
|
|
543
612
|
added_by: string | null;
|
|
544
613
|
company_id: string;
|
|
545
614
|
id: string;
|
|
546
615
|
list_id: string;
|
|
616
|
+
pipeline_key: string;
|
|
617
|
+
processing_state: Json;
|
|
547
618
|
source_execution_id: string | null;
|
|
548
619
|
source_input_hash: string | null;
|
|
549
620
|
source_resource_id: string | null;
|
|
550
|
-
|
|
551
|
-
|
|
621
|
+
stage_key: string;
|
|
622
|
+
state_key: string;
|
|
552
623
|
};
|
|
553
624
|
Insert: {
|
|
625
|
+
activity_log?: Json;
|
|
554
626
|
added_at?: string;
|
|
555
627
|
added_by?: string | null;
|
|
556
628
|
company_id: string;
|
|
557
629
|
id?: string;
|
|
558
630
|
list_id: string;
|
|
631
|
+
pipeline_key?: string;
|
|
632
|
+
processing_state?: Json;
|
|
559
633
|
source_execution_id?: string | null;
|
|
560
634
|
source_input_hash?: string | null;
|
|
561
635
|
source_resource_id?: string | null;
|
|
562
|
-
|
|
563
|
-
|
|
636
|
+
stage_key: string;
|
|
637
|
+
state_key: string;
|
|
564
638
|
};
|
|
565
639
|
Update: {
|
|
640
|
+
activity_log?: Json;
|
|
566
641
|
added_at?: string;
|
|
567
642
|
added_by?: string | null;
|
|
568
643
|
company_id?: string;
|
|
569
644
|
id?: string;
|
|
570
645
|
list_id?: string;
|
|
646
|
+
pipeline_key?: string;
|
|
647
|
+
processing_state?: Json;
|
|
571
648
|
source_execution_id?: string | null;
|
|
572
649
|
source_input_hash?: string | null;
|
|
573
650
|
source_resource_id?: string | null;
|
|
574
|
-
|
|
575
|
-
|
|
651
|
+
stage_key?: string;
|
|
652
|
+
state_key?: string;
|
|
576
653
|
};
|
|
577
654
|
Relationships: [
|
|
578
655
|
{
|
|
579
|
-
foreignKeyName:
|
|
580
|
-
columns: [
|
|
656
|
+
foreignKeyName: 'acq_list_companies_company_id_fkey';
|
|
657
|
+
columns: ['company_id'];
|
|
581
658
|
isOneToOne: false;
|
|
582
|
-
referencedRelation:
|
|
583
|
-
referencedColumns: [
|
|
659
|
+
referencedRelation: 'acq_companies';
|
|
660
|
+
referencedColumns: ['id'];
|
|
584
661
|
},
|
|
585
662
|
{
|
|
586
|
-
foreignKeyName:
|
|
587
|
-
columns: [
|
|
663
|
+
foreignKeyName: 'acq_list_companies_list_id_fkey';
|
|
664
|
+
columns: ['list_id'];
|
|
588
665
|
isOneToOne: false;
|
|
589
|
-
referencedRelation:
|
|
590
|
-
referencedColumns: [
|
|
666
|
+
referencedRelation: 'acq_lists';
|
|
667
|
+
referencedColumns: ['id'];
|
|
591
668
|
},
|
|
592
669
|
{
|
|
593
|
-
foreignKeyName:
|
|
594
|
-
columns: [
|
|
670
|
+
foreignKeyName: 'acq_list_companies_source_execution_id_fkey';
|
|
671
|
+
columns: ['source_execution_id'];
|
|
595
672
|
isOneToOne: false;
|
|
596
|
-
referencedRelation:
|
|
597
|
-
referencedColumns: [
|
|
673
|
+
referencedRelation: 'execution_logs';
|
|
674
|
+
referencedColumns: ['execution_id'];
|
|
598
675
|
}
|
|
599
676
|
];
|
|
600
677
|
};
|
|
@@ -622,79 +699,88 @@ type Database = {
|
|
|
622
699
|
};
|
|
623
700
|
Relationships: [
|
|
624
701
|
{
|
|
625
|
-
foreignKeyName:
|
|
626
|
-
columns: [
|
|
702
|
+
foreignKeyName: 'acq_list_executions_execution_id_fkey';
|
|
703
|
+
columns: ['execution_id'];
|
|
627
704
|
isOneToOne: false;
|
|
628
|
-
referencedRelation:
|
|
629
|
-
referencedColumns: [
|
|
705
|
+
referencedRelation: 'execution_logs';
|
|
706
|
+
referencedColumns: ['execution_id'];
|
|
630
707
|
},
|
|
631
708
|
{
|
|
632
|
-
foreignKeyName:
|
|
633
|
-
columns: [
|
|
709
|
+
foreignKeyName: 'acq_list_executions_list_id_fkey';
|
|
710
|
+
columns: ['list_id'];
|
|
634
711
|
isOneToOne: false;
|
|
635
|
-
referencedRelation:
|
|
636
|
-
referencedColumns: [
|
|
712
|
+
referencedRelation: 'acq_lists';
|
|
713
|
+
referencedColumns: ['id'];
|
|
637
714
|
}
|
|
638
715
|
];
|
|
639
716
|
};
|
|
640
717
|
acq_list_members: {
|
|
641
718
|
Row: {
|
|
719
|
+
activity_log: Json;
|
|
642
720
|
added_at: string;
|
|
643
721
|
added_by: string | null;
|
|
644
722
|
contact_id: string;
|
|
645
723
|
id: string;
|
|
646
724
|
list_id: string;
|
|
725
|
+
pipeline_key: string;
|
|
726
|
+
processing_state: Json;
|
|
647
727
|
source_execution_id: string | null;
|
|
648
728
|
source_input_hash: string | null;
|
|
649
729
|
source_resource_id: string | null;
|
|
650
|
-
|
|
651
|
-
|
|
730
|
+
stage_key: string;
|
|
731
|
+
state_key: string;
|
|
652
732
|
};
|
|
653
733
|
Insert: {
|
|
734
|
+
activity_log?: Json;
|
|
654
735
|
added_at?: string;
|
|
655
736
|
added_by?: string | null;
|
|
656
737
|
contact_id: string;
|
|
657
738
|
id?: string;
|
|
658
739
|
list_id: string;
|
|
740
|
+
pipeline_key?: string;
|
|
741
|
+
processing_state?: Json;
|
|
659
742
|
source_execution_id?: string | null;
|
|
660
743
|
source_input_hash?: string | null;
|
|
661
744
|
source_resource_id?: string | null;
|
|
662
|
-
|
|
663
|
-
|
|
745
|
+
stage_key: string;
|
|
746
|
+
state_key: string;
|
|
664
747
|
};
|
|
665
748
|
Update: {
|
|
749
|
+
activity_log?: Json;
|
|
666
750
|
added_at?: string;
|
|
667
751
|
added_by?: string | null;
|
|
668
752
|
contact_id?: string;
|
|
669
753
|
id?: string;
|
|
670
754
|
list_id?: string;
|
|
755
|
+
pipeline_key?: string;
|
|
756
|
+
processing_state?: Json;
|
|
671
757
|
source_execution_id?: string | null;
|
|
672
758
|
source_input_hash?: string | null;
|
|
673
759
|
source_resource_id?: string | null;
|
|
674
|
-
|
|
675
|
-
|
|
760
|
+
stage_key?: string;
|
|
761
|
+
state_key?: string;
|
|
676
762
|
};
|
|
677
763
|
Relationships: [
|
|
678
764
|
{
|
|
679
|
-
foreignKeyName:
|
|
680
|
-
columns: [
|
|
765
|
+
foreignKeyName: 'acq_list_members_contact_id_fkey';
|
|
766
|
+
columns: ['contact_id'];
|
|
681
767
|
isOneToOne: false;
|
|
682
|
-
referencedRelation:
|
|
683
|
-
referencedColumns: [
|
|
768
|
+
referencedRelation: 'acq_contacts';
|
|
769
|
+
referencedColumns: ['id'];
|
|
684
770
|
},
|
|
685
771
|
{
|
|
686
|
-
foreignKeyName:
|
|
687
|
-
columns: [
|
|
772
|
+
foreignKeyName: 'acq_list_members_list_id_fkey';
|
|
773
|
+
columns: ['list_id'];
|
|
688
774
|
isOneToOne: false;
|
|
689
|
-
referencedRelation:
|
|
690
|
-
referencedColumns: [
|
|
775
|
+
referencedRelation: 'acq_lists';
|
|
776
|
+
referencedColumns: ['id'];
|
|
691
777
|
},
|
|
692
778
|
{
|
|
693
|
-
foreignKeyName:
|
|
694
|
-
columns: [
|
|
779
|
+
foreignKeyName: 'acq_list_members_source_execution_id_fkey';
|
|
780
|
+
columns: ['source_execution_id'];
|
|
695
781
|
isOneToOne: false;
|
|
696
|
-
referencedRelation:
|
|
697
|
-
referencedColumns: [
|
|
782
|
+
referencedRelation: 'execution_logs';
|
|
783
|
+
referencedColumns: ['execution_id'];
|
|
698
784
|
}
|
|
699
785
|
];
|
|
700
786
|
};
|
|
@@ -702,55 +788,58 @@ type Database = {
|
|
|
702
788
|
Row: {
|
|
703
789
|
batch_ids: string[];
|
|
704
790
|
completed_at: string | null;
|
|
705
|
-
config: Json;
|
|
706
791
|
created_at: string;
|
|
707
792
|
description: string | null;
|
|
793
|
+
icp: Json;
|
|
708
794
|
id: string;
|
|
709
795
|
instantly_campaign_id: string | null;
|
|
710
796
|
launched_at: string | null;
|
|
711
797
|
metadata: Json;
|
|
712
798
|
name: string;
|
|
713
799
|
organization_id: string;
|
|
800
|
+
pipeline_config: Json;
|
|
801
|
+
scraping_config: Json;
|
|
714
802
|
status: string;
|
|
715
|
-
type: string;
|
|
716
803
|
};
|
|
717
804
|
Insert: {
|
|
718
805
|
batch_ids?: string[];
|
|
719
806
|
completed_at?: string | null;
|
|
720
|
-
config?: Json;
|
|
721
807
|
created_at?: string;
|
|
722
808
|
description?: string | null;
|
|
809
|
+
icp?: Json;
|
|
723
810
|
id?: string;
|
|
724
811
|
instantly_campaign_id?: string | null;
|
|
725
812
|
launched_at?: string | null;
|
|
726
813
|
metadata?: Json;
|
|
727
814
|
name: string;
|
|
728
815
|
organization_id: string;
|
|
816
|
+
pipeline_config?: Json;
|
|
817
|
+
scraping_config?: Json;
|
|
729
818
|
status?: string;
|
|
730
|
-
type?: string;
|
|
731
819
|
};
|
|
732
820
|
Update: {
|
|
733
821
|
batch_ids?: string[];
|
|
734
822
|
completed_at?: string | null;
|
|
735
|
-
config?: Json;
|
|
736
823
|
created_at?: string;
|
|
737
824
|
description?: string | null;
|
|
825
|
+
icp?: Json;
|
|
738
826
|
id?: string;
|
|
739
827
|
instantly_campaign_id?: string | null;
|
|
740
828
|
launched_at?: string | null;
|
|
741
829
|
metadata?: Json;
|
|
742
830
|
name?: string;
|
|
743
831
|
organization_id?: string;
|
|
832
|
+
pipeline_config?: Json;
|
|
833
|
+
scraping_config?: Json;
|
|
744
834
|
status?: string;
|
|
745
|
-
type?: string;
|
|
746
835
|
};
|
|
747
836
|
Relationships: [
|
|
748
837
|
{
|
|
749
|
-
foreignKeyName:
|
|
750
|
-
columns: [
|
|
838
|
+
foreignKeyName: 'acq_lists_organization_id_fkey';
|
|
839
|
+
columns: ['organization_id'];
|
|
751
840
|
isOneToOne: false;
|
|
752
|
-
referencedRelation:
|
|
753
|
-
referencedColumns: [
|
|
841
|
+
referencedRelation: 'organizations';
|
|
842
|
+
referencedColumns: ['id'];
|
|
754
843
|
}
|
|
755
844
|
];
|
|
756
845
|
};
|
|
@@ -826,18 +915,18 @@ type Database = {
|
|
|
826
915
|
};
|
|
827
916
|
Relationships: [
|
|
828
917
|
{
|
|
829
|
-
foreignKeyName:
|
|
830
|
-
columns: [
|
|
918
|
+
foreignKeyName: 'acq_seo_metrics_organization_id_fkey';
|
|
919
|
+
columns: ['organization_id'];
|
|
831
920
|
isOneToOne: false;
|
|
832
|
-
referencedRelation:
|
|
833
|
-
referencedColumns: [
|
|
921
|
+
referencedRelation: 'organizations';
|
|
922
|
+
referencedColumns: ['id'];
|
|
834
923
|
},
|
|
835
924
|
{
|
|
836
|
-
foreignKeyName:
|
|
837
|
-
columns: [
|
|
925
|
+
foreignKeyName: 'acq_seo_metrics_seo_page_id_fkey';
|
|
926
|
+
columns: ['seo_page_id'];
|
|
838
927
|
isOneToOne: false;
|
|
839
|
-
referencedRelation:
|
|
840
|
-
referencedColumns: [
|
|
928
|
+
referencedRelation: 'acq_seo_pages';
|
|
929
|
+
referencedColumns: ['id'];
|
|
841
930
|
}
|
|
842
931
|
];
|
|
843
932
|
};
|
|
@@ -913,11 +1002,11 @@ type Database = {
|
|
|
913
1002
|
};
|
|
914
1003
|
Relationships: [
|
|
915
1004
|
{
|
|
916
|
-
foreignKeyName:
|
|
917
|
-
columns: [
|
|
1005
|
+
foreignKeyName: 'acq_seo_pages_organization_id_fkey';
|
|
1006
|
+
columns: ['organization_id'];
|
|
918
1007
|
isOneToOne: false;
|
|
919
|
-
referencedRelation:
|
|
920
|
-
referencedColumns: [
|
|
1008
|
+
referencedRelation: 'organizations';
|
|
1009
|
+
referencedColumns: ['id'];
|
|
921
1010
|
}
|
|
922
1011
|
];
|
|
923
1012
|
};
|
|
@@ -1014,11 +1103,11 @@ type Database = {
|
|
|
1014
1103
|
};
|
|
1015
1104
|
Relationships: [
|
|
1016
1105
|
{
|
|
1017
|
-
foreignKeyName:
|
|
1018
|
-
columns: [
|
|
1106
|
+
foreignKeyName: 'acq_social_posts_organization_id_fkey';
|
|
1107
|
+
columns: ['organization_id'];
|
|
1019
1108
|
isOneToOne: false;
|
|
1020
|
-
referencedRelation:
|
|
1021
|
-
referencedColumns: [
|
|
1109
|
+
referencedRelation: 'organizations';
|
|
1110
|
+
referencedColumns: ['id'];
|
|
1022
1111
|
}
|
|
1023
1112
|
];
|
|
1024
1113
|
};
|
|
@@ -1073,11 +1162,11 @@ type Database = {
|
|
|
1073
1162
|
};
|
|
1074
1163
|
Relationships: [
|
|
1075
1164
|
{
|
|
1076
|
-
foreignKeyName:
|
|
1077
|
-
columns: [
|
|
1165
|
+
foreignKeyName: 'activities_organization_id_fkey';
|
|
1166
|
+
columns: ['organization_id'];
|
|
1078
1167
|
isOneToOne: false;
|
|
1079
|
-
referencedRelation:
|
|
1080
|
-
referencedColumns: [
|
|
1168
|
+
referencedRelation: 'organizations';
|
|
1169
|
+
referencedColumns: ['id'];
|
|
1081
1170
|
}
|
|
1082
1171
|
];
|
|
1083
1172
|
};
|
|
@@ -1108,11 +1197,11 @@ type Database = {
|
|
|
1108
1197
|
};
|
|
1109
1198
|
Relationships: [
|
|
1110
1199
|
{
|
|
1111
|
-
foreignKeyName:
|
|
1112
|
-
columns: [
|
|
1200
|
+
foreignKeyName: 'api_keys_organization_id_fkey';
|
|
1201
|
+
columns: ['organization_id'];
|
|
1113
1202
|
isOneToOne: false;
|
|
1114
|
-
referencedRelation:
|
|
1115
|
-
referencedColumns: [
|
|
1203
|
+
referencedRelation: 'organizations';
|
|
1204
|
+
referencedColumns: ['id'];
|
|
1116
1205
|
}
|
|
1117
1206
|
];
|
|
1118
1207
|
};
|
|
@@ -1191,25 +1280,25 @@ type Database = {
|
|
|
1191
1280
|
};
|
|
1192
1281
|
Relationships: [
|
|
1193
1282
|
{
|
|
1194
|
-
foreignKeyName:
|
|
1195
|
-
columns: [
|
|
1283
|
+
foreignKeyName: 'command_queue_completed_by_fkey';
|
|
1284
|
+
columns: ['completed_by'];
|
|
1196
1285
|
isOneToOne: false;
|
|
1197
|
-
referencedRelation:
|
|
1198
|
-
referencedColumns: [
|
|
1286
|
+
referencedRelation: 'users';
|
|
1287
|
+
referencedColumns: ['id'];
|
|
1199
1288
|
},
|
|
1200
1289
|
{
|
|
1201
|
-
foreignKeyName:
|
|
1202
|
-
columns: [
|
|
1290
|
+
foreignKeyName: 'command_queue_organization_id_fkey';
|
|
1291
|
+
columns: ['organization_id'];
|
|
1203
1292
|
isOneToOne: false;
|
|
1204
|
-
referencedRelation:
|
|
1205
|
-
referencedColumns: [
|
|
1293
|
+
referencedRelation: 'organizations';
|
|
1294
|
+
referencedColumns: ['id'];
|
|
1206
1295
|
},
|
|
1207
1296
|
{
|
|
1208
|
-
foreignKeyName:
|
|
1209
|
-
columns: [
|
|
1297
|
+
foreignKeyName: 'command_queue_target_execution_id_fkey';
|
|
1298
|
+
columns: ['target_execution_id'];
|
|
1210
1299
|
isOneToOne: false;
|
|
1211
|
-
referencedRelation:
|
|
1212
|
-
referencedColumns: [
|
|
1300
|
+
referencedRelation: 'execution_logs';
|
|
1301
|
+
referencedColumns: ['execution_id'];
|
|
1213
1302
|
}
|
|
1214
1303
|
];
|
|
1215
1304
|
};
|
|
@@ -1249,18 +1338,18 @@ type Database = {
|
|
|
1249
1338
|
};
|
|
1250
1339
|
Relationships: [
|
|
1251
1340
|
{
|
|
1252
|
-
foreignKeyName:
|
|
1253
|
-
columns: [
|
|
1341
|
+
foreignKeyName: 'credentials_created_by_fkey';
|
|
1342
|
+
columns: ['created_by'];
|
|
1254
1343
|
isOneToOne: false;
|
|
1255
|
-
referencedRelation:
|
|
1256
|
-
referencedColumns: [
|
|
1344
|
+
referencedRelation: 'users';
|
|
1345
|
+
referencedColumns: ['id'];
|
|
1257
1346
|
},
|
|
1258
1347
|
{
|
|
1259
|
-
foreignKeyName:
|
|
1260
|
-
columns: [
|
|
1348
|
+
foreignKeyName: 'credentials_organization_id_fkey';
|
|
1349
|
+
columns: ['organization_id'];
|
|
1261
1350
|
isOneToOne: false;
|
|
1262
|
-
referencedRelation:
|
|
1263
|
-
referencedColumns: [
|
|
1351
|
+
referencedRelation: 'organizations';
|
|
1352
|
+
referencedColumns: ['id'];
|
|
1264
1353
|
}
|
|
1265
1354
|
];
|
|
1266
1355
|
};
|
|
@@ -1306,11 +1395,11 @@ type Database = {
|
|
|
1306
1395
|
};
|
|
1307
1396
|
Relationships: [
|
|
1308
1397
|
{
|
|
1309
|
-
foreignKeyName:
|
|
1310
|
-
columns: [
|
|
1398
|
+
foreignKeyName: 'deployments_organization_id_fkey';
|
|
1399
|
+
columns: ['organization_id'];
|
|
1311
1400
|
isOneToOne: false;
|
|
1312
|
-
referencedRelation:
|
|
1313
|
-
referencedColumns: [
|
|
1401
|
+
referencedRelation: 'organizations';
|
|
1402
|
+
referencedColumns: ['id'];
|
|
1314
1403
|
}
|
|
1315
1404
|
];
|
|
1316
1405
|
};
|
|
@@ -1365,25 +1454,25 @@ type Database = {
|
|
|
1365
1454
|
};
|
|
1366
1455
|
Relationships: [
|
|
1367
1456
|
{
|
|
1368
|
-
foreignKeyName:
|
|
1369
|
-
columns: [
|
|
1457
|
+
foreignKeyName: 'execution_errors_execution_id_fkey';
|
|
1458
|
+
columns: ['execution_id'];
|
|
1370
1459
|
isOneToOne: false;
|
|
1371
|
-
referencedRelation:
|
|
1372
|
-
referencedColumns: [
|
|
1460
|
+
referencedRelation: 'execution_logs';
|
|
1461
|
+
referencedColumns: ['execution_id'];
|
|
1373
1462
|
},
|
|
1374
1463
|
{
|
|
1375
|
-
foreignKeyName:
|
|
1376
|
-
columns: [
|
|
1464
|
+
foreignKeyName: 'execution_errors_organization_id_fkey';
|
|
1465
|
+
columns: ['organization_id'];
|
|
1377
1466
|
isOneToOne: false;
|
|
1378
|
-
referencedRelation:
|
|
1379
|
-
referencedColumns: [
|
|
1467
|
+
referencedRelation: 'organizations';
|
|
1468
|
+
referencedColumns: ['id'];
|
|
1380
1469
|
},
|
|
1381
1470
|
{
|
|
1382
|
-
foreignKeyName:
|
|
1383
|
-
columns: [
|
|
1471
|
+
foreignKeyName: 'execution_errors_resolved_by_fkey';
|
|
1472
|
+
columns: ['resolved_by'];
|
|
1384
1473
|
isOneToOne: false;
|
|
1385
|
-
referencedRelation:
|
|
1386
|
-
referencedColumns: [
|
|
1474
|
+
referencedRelation: 'users';
|
|
1475
|
+
referencedColumns: ['id'];
|
|
1387
1476
|
}
|
|
1388
1477
|
];
|
|
1389
1478
|
};
|
|
@@ -1465,32 +1554,32 @@ type Database = {
|
|
|
1465
1554
|
};
|
|
1466
1555
|
Relationships: [
|
|
1467
1556
|
{
|
|
1468
|
-
foreignKeyName:
|
|
1469
|
-
columns: [
|
|
1557
|
+
foreignKeyName: 'execution_history_organization_id_fkey';
|
|
1558
|
+
columns: ['organization_id'];
|
|
1470
1559
|
isOneToOne: false;
|
|
1471
|
-
referencedRelation:
|
|
1472
|
-
referencedColumns: [
|
|
1560
|
+
referencedRelation: 'organizations';
|
|
1561
|
+
referencedColumns: ['id'];
|
|
1473
1562
|
},
|
|
1474
1563
|
{
|
|
1475
|
-
foreignKeyName:
|
|
1476
|
-
columns: [
|
|
1564
|
+
foreignKeyName: 'execution_logs_origin_execution_id_fkey';
|
|
1565
|
+
columns: ['origin_execution_id'];
|
|
1477
1566
|
isOneToOne: false;
|
|
1478
|
-
referencedRelation:
|
|
1479
|
-
referencedColumns: [
|
|
1567
|
+
referencedRelation: 'execution_logs';
|
|
1568
|
+
referencedColumns: ['execution_id'];
|
|
1480
1569
|
},
|
|
1481
1570
|
{
|
|
1482
|
-
foreignKeyName:
|
|
1483
|
-
columns: [
|
|
1571
|
+
foreignKeyName: 'execution_logs_session_id_fkey';
|
|
1572
|
+
columns: ['session_id'];
|
|
1484
1573
|
isOneToOne: false;
|
|
1485
|
-
referencedRelation:
|
|
1486
|
-
referencedColumns: [
|
|
1574
|
+
referencedRelation: 'sessions';
|
|
1575
|
+
referencedColumns: ['session_id'];
|
|
1487
1576
|
},
|
|
1488
1577
|
{
|
|
1489
|
-
foreignKeyName:
|
|
1490
|
-
columns: [
|
|
1578
|
+
foreignKeyName: 'execution_logs_user_id_fkey';
|
|
1579
|
+
columns: ['user_id'];
|
|
1491
1580
|
isOneToOne: false;
|
|
1492
|
-
referencedRelation:
|
|
1493
|
-
referencedColumns: [
|
|
1581
|
+
referencedRelation: 'users';
|
|
1582
|
+
referencedColumns: ['id'];
|
|
1494
1583
|
}
|
|
1495
1584
|
];
|
|
1496
1585
|
};
|
|
@@ -1536,18 +1625,18 @@ type Database = {
|
|
|
1536
1625
|
};
|
|
1537
1626
|
Relationships: [
|
|
1538
1627
|
{
|
|
1539
|
-
foreignKeyName:
|
|
1540
|
-
columns: [
|
|
1628
|
+
foreignKeyName: 'execution_metrics_execution_id_fkey';
|
|
1629
|
+
columns: ['execution_id'];
|
|
1541
1630
|
isOneToOne: true;
|
|
1542
|
-
referencedRelation:
|
|
1543
|
-
referencedColumns: [
|
|
1631
|
+
referencedRelation: 'execution_logs';
|
|
1632
|
+
referencedColumns: ['execution_id'];
|
|
1544
1633
|
},
|
|
1545
1634
|
{
|
|
1546
|
-
foreignKeyName:
|
|
1547
|
-
columns: [
|
|
1635
|
+
foreignKeyName: 'execution_metrics_organization_id_fkey';
|
|
1636
|
+
columns: ['organization_id'];
|
|
1548
1637
|
isOneToOne: false;
|
|
1549
|
-
referencedRelation:
|
|
1550
|
-
referencedColumns: [
|
|
1638
|
+
referencedRelation: 'organizations';
|
|
1639
|
+
referencedColumns: ['id'];
|
|
1551
1640
|
}
|
|
1552
1641
|
];
|
|
1553
1642
|
};
|
|
@@ -1590,18 +1679,18 @@ type Database = {
|
|
|
1590
1679
|
};
|
|
1591
1680
|
Relationships: [
|
|
1592
1681
|
{
|
|
1593
|
-
foreignKeyName:
|
|
1594
|
-
columns: [
|
|
1682
|
+
foreignKeyName: 'notifications_organization_id_fkey';
|
|
1683
|
+
columns: ['organization_id'];
|
|
1595
1684
|
isOneToOne: false;
|
|
1596
|
-
referencedRelation:
|
|
1597
|
-
referencedColumns: [
|
|
1685
|
+
referencedRelation: 'organizations';
|
|
1686
|
+
referencedColumns: ['id'];
|
|
1598
1687
|
},
|
|
1599
1688
|
{
|
|
1600
|
-
foreignKeyName:
|
|
1601
|
-
columns: [
|
|
1689
|
+
foreignKeyName: 'notifications_user_id_fkey';
|
|
1690
|
+
columns: ['user_id'];
|
|
1602
1691
|
isOneToOne: false;
|
|
1603
|
-
referencedRelation:
|
|
1604
|
-
referencedColumns: [
|
|
1692
|
+
referencedRelation: 'users';
|
|
1693
|
+
referencedColumns: ['id'];
|
|
1605
1694
|
}
|
|
1606
1695
|
];
|
|
1607
1696
|
};
|
|
@@ -1656,18 +1745,18 @@ type Database = {
|
|
|
1656
1745
|
};
|
|
1657
1746
|
Relationships: [
|
|
1658
1747
|
{
|
|
1659
|
-
foreignKeyName:
|
|
1660
|
-
columns: [
|
|
1748
|
+
foreignKeyName: 'org_invitations_inviter_user_id_fkey';
|
|
1749
|
+
columns: ['inviter_user_id'];
|
|
1661
1750
|
isOneToOne: false;
|
|
1662
|
-
referencedRelation:
|
|
1663
|
-
referencedColumns: [
|
|
1751
|
+
referencedRelation: 'users';
|
|
1752
|
+
referencedColumns: ['id'];
|
|
1664
1753
|
},
|
|
1665
1754
|
{
|
|
1666
|
-
foreignKeyName:
|
|
1667
|
-
columns: [
|
|
1755
|
+
foreignKeyName: 'org_invitations_organization_id_fkey';
|
|
1756
|
+
columns: ['organization_id'];
|
|
1668
1757
|
isOneToOne: false;
|
|
1669
|
-
referencedRelation:
|
|
1670
|
-
referencedColumns: [
|
|
1758
|
+
referencedRelation: 'organizations';
|
|
1759
|
+
referencedColumns: ['id'];
|
|
1671
1760
|
}
|
|
1672
1761
|
];
|
|
1673
1762
|
};
|
|
@@ -1710,18 +1799,18 @@ type Database = {
|
|
|
1710
1799
|
};
|
|
1711
1800
|
Relationships: [
|
|
1712
1801
|
{
|
|
1713
|
-
foreignKeyName:
|
|
1714
|
-
columns: [
|
|
1802
|
+
foreignKeyName: 'org_memberships_organization_id_fkey';
|
|
1803
|
+
columns: ['organization_id'];
|
|
1715
1804
|
isOneToOne: false;
|
|
1716
|
-
referencedRelation:
|
|
1717
|
-
referencedColumns: [
|
|
1805
|
+
referencedRelation: 'organizations';
|
|
1806
|
+
referencedColumns: ['id'];
|
|
1718
1807
|
},
|
|
1719
1808
|
{
|
|
1720
|
-
foreignKeyName:
|
|
1721
|
-
columns: [
|
|
1809
|
+
foreignKeyName: 'org_memberships_user_id_fkey';
|
|
1810
|
+
columns: ['user_id'];
|
|
1722
1811
|
isOneToOne: false;
|
|
1723
|
-
referencedRelation:
|
|
1724
|
-
referencedColumns: [
|
|
1812
|
+
referencedRelation: 'users';
|
|
1813
|
+
referencedColumns: ['id'];
|
|
1725
1814
|
}
|
|
1726
1815
|
];
|
|
1727
1816
|
};
|
|
@@ -1746,25 +1835,25 @@ type Database = {
|
|
|
1746
1835
|
};
|
|
1747
1836
|
Relationships: [
|
|
1748
1837
|
{
|
|
1749
|
-
foreignKeyName:
|
|
1750
|
-
columns: [
|
|
1838
|
+
foreignKeyName: 'org_rol_assignments_granted_by_fkey';
|
|
1839
|
+
columns: ['granted_by'];
|
|
1751
1840
|
isOneToOne: false;
|
|
1752
|
-
referencedRelation:
|
|
1753
|
-
referencedColumns: [
|
|
1841
|
+
referencedRelation: 'users';
|
|
1842
|
+
referencedColumns: ['id'];
|
|
1754
1843
|
},
|
|
1755
1844
|
{
|
|
1756
|
-
foreignKeyName:
|
|
1757
|
-
columns: [
|
|
1845
|
+
foreignKeyName: 'org_rol_assignments_membership_id_fkey';
|
|
1846
|
+
columns: ['membership_id'];
|
|
1758
1847
|
isOneToOne: false;
|
|
1759
|
-
referencedRelation:
|
|
1760
|
-
referencedColumns: [
|
|
1848
|
+
referencedRelation: 'org_memberships';
|
|
1849
|
+
referencedColumns: ['id'];
|
|
1761
1850
|
},
|
|
1762
1851
|
{
|
|
1763
|
-
foreignKeyName:
|
|
1764
|
-
columns: [
|
|
1852
|
+
foreignKeyName: 'org_rol_assignments_role_id_fkey';
|
|
1853
|
+
columns: ['role_id'];
|
|
1765
1854
|
isOneToOne: false;
|
|
1766
|
-
referencedRelation:
|
|
1767
|
-
referencedColumns: [
|
|
1855
|
+
referencedRelation: 'org_rol_definitions';
|
|
1856
|
+
referencedColumns: ['id'];
|
|
1768
1857
|
}
|
|
1769
1858
|
];
|
|
1770
1859
|
};
|
|
@@ -1801,11 +1890,11 @@ type Database = {
|
|
|
1801
1890
|
};
|
|
1802
1891
|
Relationships: [
|
|
1803
1892
|
{
|
|
1804
|
-
foreignKeyName:
|
|
1805
|
-
columns: [
|
|
1893
|
+
foreignKeyName: 'org_rol_definitions_organization_id_fkey';
|
|
1894
|
+
columns: ['organization_id'];
|
|
1806
1895
|
isOneToOne: false;
|
|
1807
|
-
referencedRelation:
|
|
1808
|
-
referencedColumns: [
|
|
1896
|
+
referencedRelation: 'organizations';
|
|
1897
|
+
referencedColumns: ['id'];
|
|
1809
1898
|
}
|
|
1810
1899
|
];
|
|
1811
1900
|
};
|
|
@@ -1827,18 +1916,18 @@ type Database = {
|
|
|
1827
1916
|
};
|
|
1828
1917
|
Relationships: [
|
|
1829
1918
|
{
|
|
1830
|
-
foreignKeyName:
|
|
1831
|
-
columns: [
|
|
1919
|
+
foreignKeyName: 'org_rol_grants_permission_key_fkey';
|
|
1920
|
+
columns: ['permission_key'];
|
|
1832
1921
|
isOneToOne: false;
|
|
1833
|
-
referencedRelation:
|
|
1834
|
-
referencedColumns: [
|
|
1922
|
+
referencedRelation: 'org_rol_permissions';
|
|
1923
|
+
referencedColumns: ['key'];
|
|
1835
1924
|
},
|
|
1836
1925
|
{
|
|
1837
|
-
foreignKeyName:
|
|
1838
|
-
columns: [
|
|
1926
|
+
foreignKeyName: 'org_rol_grants_role_id_fkey';
|
|
1927
|
+
columns: ['role_id'];
|
|
1839
1928
|
isOneToOne: false;
|
|
1840
|
-
referencedRelation:
|
|
1841
|
-
referencedColumns: [
|
|
1929
|
+
referencedRelation: 'org_rol_definitions';
|
|
1930
|
+
referencedColumns: ['id'];
|
|
1842
1931
|
}
|
|
1843
1932
|
];
|
|
1844
1933
|
};
|
|
@@ -1950,25 +2039,25 @@ type Database = {
|
|
|
1950
2039
|
};
|
|
1951
2040
|
Relationships: [
|
|
1952
2041
|
{
|
|
1953
|
-
foreignKeyName:
|
|
1954
|
-
columns: [
|
|
2042
|
+
foreignKeyName: 'fk_milestones_project';
|
|
2043
|
+
columns: ['project_id'];
|
|
1955
2044
|
isOneToOne: false;
|
|
1956
|
-
referencedRelation:
|
|
1957
|
-
referencedColumns: [
|
|
2045
|
+
referencedRelation: 'prj_projects';
|
|
2046
|
+
referencedColumns: ['id'];
|
|
1958
2047
|
},
|
|
1959
2048
|
{
|
|
1960
|
-
foreignKeyName:
|
|
1961
|
-
columns: [
|
|
2049
|
+
foreignKeyName: 'prj_milestones_organization_id_fkey';
|
|
2050
|
+
columns: ['organization_id'];
|
|
1962
2051
|
isOneToOne: false;
|
|
1963
|
-
referencedRelation:
|
|
1964
|
-
referencedColumns: [
|
|
2052
|
+
referencedRelation: 'organizations';
|
|
2053
|
+
referencedColumns: ['id'];
|
|
1965
2054
|
},
|
|
1966
2055
|
{
|
|
1967
|
-
foreignKeyName:
|
|
1968
|
-
columns: [
|
|
2056
|
+
foreignKeyName: 'prj_milestones_project_id_fkey';
|
|
2057
|
+
columns: ['project_id'];
|
|
1969
2058
|
isOneToOne: false;
|
|
1970
|
-
referencedRelation:
|
|
1971
|
-
referencedColumns: [
|
|
2059
|
+
referencedRelation: 'prj_projects';
|
|
2060
|
+
referencedColumns: ['id'];
|
|
1972
2061
|
}
|
|
1973
2062
|
];
|
|
1974
2063
|
};
|
|
@@ -2017,67 +2106,67 @@ type Database = {
|
|
|
2017
2106
|
};
|
|
2018
2107
|
Relationships: [
|
|
2019
2108
|
{
|
|
2020
|
-
foreignKeyName:
|
|
2021
|
-
columns: [
|
|
2109
|
+
foreignKeyName: 'fk_notes_created_by';
|
|
2110
|
+
columns: ['created_by'];
|
|
2022
2111
|
isOneToOne: false;
|
|
2023
|
-
referencedRelation:
|
|
2024
|
-
referencedColumns: [
|
|
2112
|
+
referencedRelation: 'users';
|
|
2113
|
+
referencedColumns: ['id'];
|
|
2025
2114
|
},
|
|
2026
2115
|
{
|
|
2027
|
-
foreignKeyName:
|
|
2028
|
-
columns: [
|
|
2116
|
+
foreignKeyName: 'fk_notes_milestone';
|
|
2117
|
+
columns: ['milestone_id'];
|
|
2029
2118
|
isOneToOne: false;
|
|
2030
|
-
referencedRelation:
|
|
2031
|
-
referencedColumns: [
|
|
2119
|
+
referencedRelation: 'prj_milestones';
|
|
2120
|
+
referencedColumns: ['id'];
|
|
2032
2121
|
},
|
|
2033
2122
|
{
|
|
2034
|
-
foreignKeyName:
|
|
2035
|
-
columns: [
|
|
2123
|
+
foreignKeyName: 'fk_notes_project';
|
|
2124
|
+
columns: ['project_id'];
|
|
2036
2125
|
isOneToOne: false;
|
|
2037
|
-
referencedRelation:
|
|
2038
|
-
referencedColumns: [
|
|
2126
|
+
referencedRelation: 'prj_projects';
|
|
2127
|
+
referencedColumns: ['id'];
|
|
2039
2128
|
},
|
|
2040
2129
|
{
|
|
2041
|
-
foreignKeyName:
|
|
2042
|
-
columns: [
|
|
2130
|
+
foreignKeyName: 'fk_notes_task';
|
|
2131
|
+
columns: ['task_id'];
|
|
2043
2132
|
isOneToOne: false;
|
|
2044
|
-
referencedRelation:
|
|
2045
|
-
referencedColumns: [
|
|
2133
|
+
referencedRelation: 'prj_tasks';
|
|
2134
|
+
referencedColumns: ['id'];
|
|
2046
2135
|
},
|
|
2047
2136
|
{
|
|
2048
|
-
foreignKeyName:
|
|
2049
|
-
columns: [
|
|
2137
|
+
foreignKeyName: 'prj_notes_created_by_fkey';
|
|
2138
|
+
columns: ['created_by'];
|
|
2050
2139
|
isOneToOne: false;
|
|
2051
|
-
referencedRelation:
|
|
2052
|
-
referencedColumns: [
|
|
2140
|
+
referencedRelation: 'users';
|
|
2141
|
+
referencedColumns: ['id'];
|
|
2053
2142
|
},
|
|
2054
2143
|
{
|
|
2055
|
-
foreignKeyName:
|
|
2056
|
-
columns: [
|
|
2144
|
+
foreignKeyName: 'prj_notes_milestone_id_fkey';
|
|
2145
|
+
columns: ['milestone_id'];
|
|
2057
2146
|
isOneToOne: false;
|
|
2058
|
-
referencedRelation:
|
|
2059
|
-
referencedColumns: [
|
|
2147
|
+
referencedRelation: 'prj_milestones';
|
|
2148
|
+
referencedColumns: ['id'];
|
|
2060
2149
|
},
|
|
2061
2150
|
{
|
|
2062
|
-
foreignKeyName:
|
|
2063
|
-
columns: [
|
|
2151
|
+
foreignKeyName: 'prj_notes_organization_id_fkey';
|
|
2152
|
+
columns: ['organization_id'];
|
|
2064
2153
|
isOneToOne: false;
|
|
2065
|
-
referencedRelation:
|
|
2066
|
-
referencedColumns: [
|
|
2154
|
+
referencedRelation: 'organizations';
|
|
2155
|
+
referencedColumns: ['id'];
|
|
2067
2156
|
},
|
|
2068
2157
|
{
|
|
2069
|
-
foreignKeyName:
|
|
2070
|
-
columns: [
|
|
2158
|
+
foreignKeyName: 'prj_notes_project_id_fkey';
|
|
2159
|
+
columns: ['project_id'];
|
|
2071
2160
|
isOneToOne: false;
|
|
2072
|
-
referencedRelation:
|
|
2073
|
-
referencedColumns: [
|
|
2161
|
+
referencedRelation: 'prj_projects';
|
|
2162
|
+
referencedColumns: ['id'];
|
|
2074
2163
|
},
|
|
2075
2164
|
{
|
|
2076
|
-
foreignKeyName:
|
|
2077
|
-
columns: [
|
|
2165
|
+
foreignKeyName: 'prj_notes_task_id_fkey';
|
|
2166
|
+
columns: ['task_id'];
|
|
2078
2167
|
isOneToOne: false;
|
|
2079
|
-
referencedRelation:
|
|
2080
|
-
referencedColumns: [
|
|
2168
|
+
referencedRelation: 'prj_tasks';
|
|
2169
|
+
referencedColumns: ['id'];
|
|
2081
2170
|
}
|
|
2082
2171
|
];
|
|
2083
2172
|
};
|
|
@@ -2135,39 +2224,39 @@ type Database = {
|
|
|
2135
2224
|
};
|
|
2136
2225
|
Relationships: [
|
|
2137
2226
|
{
|
|
2138
|
-
foreignKeyName:
|
|
2139
|
-
columns: [
|
|
2227
|
+
foreignKeyName: 'fk_projects_company';
|
|
2228
|
+
columns: ['client_company_id'];
|
|
2140
2229
|
isOneToOne: false;
|
|
2141
|
-
referencedRelation:
|
|
2142
|
-
referencedColumns: [
|
|
2230
|
+
referencedRelation: 'acq_companies';
|
|
2231
|
+
referencedColumns: ['id'];
|
|
2143
2232
|
},
|
|
2144
2233
|
{
|
|
2145
|
-
foreignKeyName:
|
|
2146
|
-
columns: [
|
|
2234
|
+
foreignKeyName: 'fk_projects_deal';
|
|
2235
|
+
columns: ['deal_id'];
|
|
2147
2236
|
isOneToOne: false;
|
|
2148
|
-
referencedRelation:
|
|
2149
|
-
referencedColumns: [
|
|
2237
|
+
referencedRelation: 'acq_deals';
|
|
2238
|
+
referencedColumns: ['id'];
|
|
2150
2239
|
},
|
|
2151
2240
|
{
|
|
2152
|
-
foreignKeyName:
|
|
2153
|
-
columns: [
|
|
2241
|
+
foreignKeyName: 'prj_projects_client_company_id_fkey';
|
|
2242
|
+
columns: ['client_company_id'];
|
|
2154
2243
|
isOneToOne: false;
|
|
2155
|
-
referencedRelation:
|
|
2156
|
-
referencedColumns: [
|
|
2244
|
+
referencedRelation: 'acq_companies';
|
|
2245
|
+
referencedColumns: ['id'];
|
|
2157
2246
|
},
|
|
2158
2247
|
{
|
|
2159
|
-
foreignKeyName:
|
|
2160
|
-
columns: [
|
|
2248
|
+
foreignKeyName: 'prj_projects_deal_id_fkey';
|
|
2249
|
+
columns: ['deal_id'];
|
|
2161
2250
|
isOneToOne: false;
|
|
2162
|
-
referencedRelation:
|
|
2163
|
-
referencedColumns: [
|
|
2251
|
+
referencedRelation: 'acq_deals';
|
|
2252
|
+
referencedColumns: ['id'];
|
|
2164
2253
|
},
|
|
2165
2254
|
{
|
|
2166
|
-
foreignKeyName:
|
|
2167
|
-
columns: [
|
|
2255
|
+
foreignKeyName: 'prj_projects_organization_id_fkey';
|
|
2256
|
+
columns: ['organization_id'];
|
|
2168
2257
|
isOneToOne: false;
|
|
2169
|
-
referencedRelation:
|
|
2170
|
-
referencedColumns: [
|
|
2258
|
+
referencedRelation: 'organizations';
|
|
2259
|
+
referencedColumns: ['id'];
|
|
2171
2260
|
}
|
|
2172
2261
|
];
|
|
2173
2262
|
};
|
|
@@ -2231,53 +2320,53 @@ type Database = {
|
|
|
2231
2320
|
};
|
|
2232
2321
|
Relationships: [
|
|
2233
2322
|
{
|
|
2234
|
-
foreignKeyName:
|
|
2235
|
-
columns: [
|
|
2323
|
+
foreignKeyName: 'fk_tasks_milestone';
|
|
2324
|
+
columns: ['milestone_id'];
|
|
2236
2325
|
isOneToOne: false;
|
|
2237
|
-
referencedRelation:
|
|
2238
|
-
referencedColumns: [
|
|
2326
|
+
referencedRelation: 'prj_milestones';
|
|
2327
|
+
referencedColumns: ['id'];
|
|
2239
2328
|
},
|
|
2240
2329
|
{
|
|
2241
|
-
foreignKeyName:
|
|
2242
|
-
columns: [
|
|
2330
|
+
foreignKeyName: 'fk_tasks_parent';
|
|
2331
|
+
columns: ['parent_task_id'];
|
|
2243
2332
|
isOneToOne: false;
|
|
2244
|
-
referencedRelation:
|
|
2245
|
-
referencedColumns: [
|
|
2333
|
+
referencedRelation: 'prj_tasks';
|
|
2334
|
+
referencedColumns: ['id'];
|
|
2246
2335
|
},
|
|
2247
2336
|
{
|
|
2248
|
-
foreignKeyName:
|
|
2249
|
-
columns: [
|
|
2337
|
+
foreignKeyName: 'fk_tasks_project';
|
|
2338
|
+
columns: ['project_id'];
|
|
2250
2339
|
isOneToOne: false;
|
|
2251
|
-
referencedRelation:
|
|
2252
|
-
referencedColumns: [
|
|
2340
|
+
referencedRelation: 'prj_projects';
|
|
2341
|
+
referencedColumns: ['id'];
|
|
2253
2342
|
},
|
|
2254
2343
|
{
|
|
2255
|
-
foreignKeyName:
|
|
2256
|
-
columns: [
|
|
2344
|
+
foreignKeyName: 'prj_tasks_milestone_id_fkey';
|
|
2345
|
+
columns: ['milestone_id'];
|
|
2257
2346
|
isOneToOne: false;
|
|
2258
|
-
referencedRelation:
|
|
2259
|
-
referencedColumns: [
|
|
2347
|
+
referencedRelation: 'prj_milestones';
|
|
2348
|
+
referencedColumns: ['id'];
|
|
2260
2349
|
},
|
|
2261
2350
|
{
|
|
2262
|
-
foreignKeyName:
|
|
2263
|
-
columns: [
|
|
2351
|
+
foreignKeyName: 'prj_tasks_organization_id_fkey';
|
|
2352
|
+
columns: ['organization_id'];
|
|
2264
2353
|
isOneToOne: false;
|
|
2265
|
-
referencedRelation:
|
|
2266
|
-
referencedColumns: [
|
|
2354
|
+
referencedRelation: 'organizations';
|
|
2355
|
+
referencedColumns: ['id'];
|
|
2267
2356
|
},
|
|
2268
2357
|
{
|
|
2269
|
-
foreignKeyName:
|
|
2270
|
-
columns: [
|
|
2358
|
+
foreignKeyName: 'prj_tasks_parent_task_id_fkey';
|
|
2359
|
+
columns: ['parent_task_id'];
|
|
2271
2360
|
isOneToOne: false;
|
|
2272
|
-
referencedRelation:
|
|
2273
|
-
referencedColumns: [
|
|
2361
|
+
referencedRelation: 'prj_tasks';
|
|
2362
|
+
referencedColumns: ['id'];
|
|
2274
2363
|
},
|
|
2275
2364
|
{
|
|
2276
|
-
foreignKeyName:
|
|
2277
|
-
columns: [
|
|
2365
|
+
foreignKeyName: 'prj_tasks_project_id_fkey';
|
|
2366
|
+
columns: ['project_id'];
|
|
2278
2367
|
isOneToOne: false;
|
|
2279
|
-
referencedRelation:
|
|
2280
|
-
referencedColumns: [
|
|
2368
|
+
referencedRelation: 'prj_projects';
|
|
2369
|
+
referencedColumns: ['id'];
|
|
2281
2370
|
}
|
|
2282
2371
|
];
|
|
2283
2372
|
};
|
|
@@ -2347,25 +2436,25 @@ type Database = {
|
|
|
2347
2436
|
};
|
|
2348
2437
|
Relationships: [
|
|
2349
2438
|
{
|
|
2350
|
-
foreignKeyName:
|
|
2351
|
-
columns: [
|
|
2439
|
+
foreignKeyName: 'reported_requests_organization_id_fkey';
|
|
2440
|
+
columns: ['organization_id'];
|
|
2352
2441
|
isOneToOne: false;
|
|
2353
|
-
referencedRelation:
|
|
2354
|
-
referencedColumns: [
|
|
2442
|
+
referencedRelation: 'organizations';
|
|
2443
|
+
referencedColumns: ['id'];
|
|
2355
2444
|
},
|
|
2356
2445
|
{
|
|
2357
|
-
foreignKeyName:
|
|
2358
|
-
columns: [
|
|
2446
|
+
foreignKeyName: 'reported_requests_project_id_fkey';
|
|
2447
|
+
columns: ['project_id'];
|
|
2359
2448
|
isOneToOne: false;
|
|
2360
|
-
referencedRelation:
|
|
2361
|
-
referencedColumns: [
|
|
2449
|
+
referencedRelation: 'prj_projects';
|
|
2450
|
+
referencedColumns: ['id'];
|
|
2362
2451
|
},
|
|
2363
2452
|
{
|
|
2364
|
-
foreignKeyName:
|
|
2365
|
-
columns: [
|
|
2453
|
+
foreignKeyName: 'reported_requests_task_id_fkey';
|
|
2454
|
+
columns: ['task_id'];
|
|
2366
2455
|
isOneToOne: false;
|
|
2367
|
-
referencedRelation:
|
|
2368
|
-
referencedColumns: [
|
|
2456
|
+
referencedRelation: 'prj_tasks';
|
|
2457
|
+
referencedColumns: ['id'];
|
|
2369
2458
|
}
|
|
2370
2459
|
];
|
|
2371
2460
|
};
|
|
@@ -2405,11 +2494,11 @@ type Database = {
|
|
|
2405
2494
|
};
|
|
2406
2495
|
Relationships: [
|
|
2407
2496
|
{
|
|
2408
|
-
foreignKeyName:
|
|
2409
|
-
columns: [
|
|
2497
|
+
foreignKeyName: 'session_messages_session_id_fkey';
|
|
2498
|
+
columns: ['session_id'];
|
|
2410
2499
|
isOneToOne: false;
|
|
2411
|
-
referencedRelation:
|
|
2412
|
-
referencedColumns: [
|
|
2500
|
+
referencedRelation: 'sessions';
|
|
2501
|
+
referencedColumns: ['session_id'];
|
|
2413
2502
|
}
|
|
2414
2503
|
];
|
|
2415
2504
|
};
|
|
@@ -2464,18 +2553,18 @@ type Database = {
|
|
|
2464
2553
|
};
|
|
2465
2554
|
Relationships: [
|
|
2466
2555
|
{
|
|
2467
|
-
foreignKeyName:
|
|
2468
|
-
columns: [
|
|
2556
|
+
foreignKeyName: 'fk_organization';
|
|
2557
|
+
columns: ['organization_id'];
|
|
2469
2558
|
isOneToOne: false;
|
|
2470
|
-
referencedRelation:
|
|
2471
|
-
referencedColumns: [
|
|
2559
|
+
referencedRelation: 'organizations';
|
|
2560
|
+
referencedColumns: ['id'];
|
|
2472
2561
|
},
|
|
2473
2562
|
{
|
|
2474
|
-
foreignKeyName:
|
|
2475
|
-
columns: [
|
|
2563
|
+
foreignKeyName: 'fk_user';
|
|
2564
|
+
columns: ['user_id'];
|
|
2476
2565
|
isOneToOne: false;
|
|
2477
|
-
referencedRelation:
|
|
2478
|
-
referencedColumns: [
|
|
2566
|
+
referencedRelation: 'users';
|
|
2567
|
+
referencedColumns: ['id'];
|
|
2479
2568
|
}
|
|
2480
2569
|
];
|
|
2481
2570
|
};
|
|
@@ -2551,11 +2640,11 @@ type Database = {
|
|
|
2551
2640
|
};
|
|
2552
2641
|
Relationships: [
|
|
2553
2642
|
{
|
|
2554
|
-
foreignKeyName:
|
|
2555
|
-
columns: [
|
|
2643
|
+
foreignKeyName: 'task_schedules_organization_id_fkey';
|
|
2644
|
+
columns: ['organization_id'];
|
|
2556
2645
|
isOneToOne: false;
|
|
2557
|
-
referencedRelation:
|
|
2558
|
-
referencedColumns: [
|
|
2646
|
+
referencedRelation: 'organizations';
|
|
2647
|
+
referencedColumns: ['id'];
|
|
2559
2648
|
}
|
|
2560
2649
|
];
|
|
2561
2650
|
};
|
|
@@ -2610,11 +2699,11 @@ type Database = {
|
|
|
2610
2699
|
};
|
|
2611
2700
|
Relationships: [
|
|
2612
2701
|
{
|
|
2613
|
-
foreignKeyName:
|
|
2614
|
-
columns: [
|
|
2702
|
+
foreignKeyName: 'user_profiles_last_visited_org_fkey';
|
|
2703
|
+
columns: ['last_visited_org'];
|
|
2615
2704
|
isOneToOne: false;
|
|
2616
|
-
referencedRelation:
|
|
2617
|
-
referencedColumns: [
|
|
2705
|
+
referencedRelation: 'organizations';
|
|
2706
|
+
referencedColumns: ['id'];
|
|
2618
2707
|
}
|
|
2619
2708
|
];
|
|
2620
2709
|
};
|
|
@@ -2663,11 +2752,11 @@ type Database = {
|
|
|
2663
2752
|
};
|
|
2664
2753
|
Relationships: [
|
|
2665
2754
|
{
|
|
2666
|
-
foreignKeyName:
|
|
2667
|
-
columns: [
|
|
2755
|
+
foreignKeyName: 'webhook_endpoints_organization_id_fkey';
|
|
2756
|
+
columns: ['organization_id'];
|
|
2668
2757
|
isOneToOne: false;
|
|
2669
|
-
referencedRelation:
|
|
2670
|
-
referencedColumns: [
|
|
2758
|
+
referencedRelation: 'organizations';
|
|
2759
|
+
referencedColumns: ['id'];
|
|
2671
2760
|
}
|
|
2672
2761
|
];
|
|
2673
2762
|
};
|
|
@@ -2755,12 +2844,6 @@ type Database = {
|
|
|
2755
2844
|
};
|
|
2756
2845
|
Returns: boolean;
|
|
2757
2846
|
};
|
|
2758
|
-
is_org_admin: {
|
|
2759
|
-
Args: {
|
|
2760
|
-
org_id: string;
|
|
2761
|
-
};
|
|
2762
|
-
Returns: boolean;
|
|
2763
|
-
};
|
|
2764
2847
|
is_org_member: {
|
|
2765
2848
|
Args: {
|
|
2766
2849
|
org_id: string;
|
|
@@ -2821,17 +2904,17 @@ type Database = {
|
|
|
2821
2904
|
};
|
|
2822
2905
|
};
|
|
2823
2906
|
};
|
|
2824
|
-
type DatabaseWithoutInternals = Omit<Database,
|
|
2825
|
-
type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database,
|
|
2826
|
-
type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema[
|
|
2907
|
+
type DatabaseWithoutInternals = Omit<Database, '__InternalSupabase'>;
|
|
2908
|
+
type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, 'public'>];
|
|
2909
|
+
type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema['Tables'] & DefaultSchema['Views']) | {
|
|
2827
2910
|
schema: keyof DatabaseWithoutInternals;
|
|
2828
2911
|
}, TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
2829
2912
|
schema: keyof DatabaseWithoutInternals;
|
|
2830
|
-
} ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions[
|
|
2913
|
+
} ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Views']) : never = never> = DefaultSchemaTableNameOrOptions extends {
|
|
2831
2914
|
schema: keyof DatabaseWithoutInternals;
|
|
2832
|
-
} ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions[
|
|
2915
|
+
} ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Views'])[TableName] extends {
|
|
2833
2916
|
Row: infer R;
|
|
2834
|
-
} ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema[
|
|
2917
|
+
} ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema['Tables'] & DefaultSchema['Views']) ? (DefaultSchema['Tables'] & DefaultSchema['Views'])[DefaultSchemaTableNameOrOptions] extends {
|
|
2835
2918
|
Row: infer R;
|
|
2836
2919
|
} ? R : never : never;
|
|
2837
2920
|
|
|
@@ -2915,6 +2998,14 @@ declare class RLSTestContext {
|
|
|
2915
2998
|
* Create an organization membership
|
|
2916
2999
|
*/
|
|
2917
3000
|
createMembership(userId: string, organizationId: string, role: Role): Promise<Membership>;
|
|
3001
|
+
/**
|
|
3002
|
+
* Assign a system role to a membership via org_rol_assignments.
|
|
3003
|
+
* After the 2026-04-25 auth refactor, RLS policies read `effective_permissions[]`
|
|
3004
|
+
* (materialized by trigger from org_rol_assignments → org_rol_grants).
|
|
3005
|
+
* Without this assignment, role_slug is informational only and the membership
|
|
3006
|
+
* has zero permissions, causing all has_org_permission() checks to deny.
|
|
3007
|
+
*/
|
|
3008
|
+
private assignSystemRole;
|
|
2918
3009
|
/**
|
|
2919
3010
|
* Create a pre-provisioned organization membership (without WorkOS membership ID)
|
|
2920
3011
|
* Used for testing invitation flows where memberships are created before user accepts
|