@elevasis/sdk 1.15.0 → 1.16.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/cli.cjs +2325 -124
- package/dist/index.d.ts +882 -794
- package/dist/index.js +170 -46
- package/dist/node/index.d.ts +69 -0
- package/dist/node/index.js +273 -0
- package/dist/test-utils/index.d.ts +857 -711
- package/dist/test-utils/index.js +2 -0
- package/dist/types/worker/adapters/lead.d.ts +1 -1
- package/dist/types/worker/platform.d.ts +2 -9
- package/dist/worker/index.js +1 -0
- package/package.json +12 -3
- package/reference/_navigation.md +23 -1
- package/reference/_reference-manifest.json +98 -0
- package/reference/claude-config/rules/agent-start-here.md +13 -0
- package/reference/claude-config/rules/organization-model.md +40 -40
- package/reference/claude-config/rules/organization-os.md +16 -16
- package/reference/claude-config/rules/ui.md +2 -6
- package/reference/claude-config/rules/vibe.md +13 -13
- package/reference/claude-config/skills/knowledge/SKILL.md +253 -0
- package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-a.md +100 -100
- package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-b.md +158 -158
- package/reference/claude-config/skills/knowledge/operations/customers.md +109 -0
- package/reference/claude-config/skills/knowledge/operations/features.md +113 -0
- package/reference/claude-config/skills/knowledge/operations/goals.md +118 -0
- package/reference/claude-config/skills/knowledge/operations/identity.md +93 -0
- package/reference/claude-config/skills/knowledge/operations/labels.md +89 -0
- package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -0
- package/reference/claude-config/skills/knowledge/operations/roles.md +99 -0
- package/reference/claude-config/skills/knowledge/operations/techStack.md +102 -0
- package/reference/claude-config/skills/run-ui/SKILL.md +73 -0
- package/reference/claude-config/skills/setup/SKILL.md +270 -270
- package/reference/claude-config/skills/tutorial/SKILL.md +249 -0
- package/reference/claude-config/skills/tutorial/progress-template.md +74 -0
- package/reference/claude-config/skills/tutorial/technical.md +1309 -0
- package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -0
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -0
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -0
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -0
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -0
- package/reference/deployment/index.mdx +5 -5
- package/reference/examples/organization-model.ts +40 -0
- package/reference/framework/index.mdx +1 -1
- package/reference/framework/tutorial-system.mdx +86 -173
- package/reference/packages/core/src/knowledge/README.md +32 -0
- package/reference/packages/ui/src/knowledge/README.md +31 -0
- package/reference/packages/ui/src/theme/presets/README.md +19 -0
- package/reference/scaffold/core/organization-model.mdx +1 -1
- package/reference/scaffold/recipes/add-a-feature.md +1 -1
- package/reference/scaffold/recipes/customize-crm-actions.md +3 -3
- package/reference/scaffold/recipes/customize-organization-model.md +3 -3
- package/reference/scaffold/recipes/extend-crm.md +12 -8
- package/reference/scaffold/recipes/extend-lead-gen.md +129 -20
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +1 -1
- package/reference/scaffold/recipes/index.md +6 -0
- package/reference/scaffold/reference/contracts.md +829 -595
- package/reference/scaffold/reference/feature-registry.md +2 -1
- package/reference/scaffold/ui/composition-extensibility.mdx +17 -0
- package/reference/claude-config/skills/configure/SKILL.md +0 -98
- package/reference/claude-config/skills/configure/operations/customers.md +0 -150
- package/reference/claude-config/skills/configure/operations/features.md +0 -162
- package/reference/claude-config/skills/configure/operations/goals.md +0 -147
- package/reference/claude-config/skills/configure/operations/identity.md +0 -133
- package/reference/claude-config/skills/configure/operations/labels.md +0 -128
- package/reference/claude-config/skills/configure/operations/offerings.md +0 -159
- package/reference/claude-config/skills/configure/operations/roles.md +0 -153
- package/reference/claude-config/skills/configure/operations/techStack.md +0 -139
|
@@ -237,56 +237,6 @@ interface IExecutionLogger {
|
|
|
237
237
|
error(message: string, context?: LogContext): void;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
/**
|
|
241
|
-
* Shared form field types for dynamic form generation
|
|
242
|
-
* Used by: Command Queue, Execution Runner UI, future form-based features
|
|
243
|
-
*/
|
|
244
|
-
/**
|
|
245
|
-
* Supported form field types for action payloads
|
|
246
|
-
* Maps to Mantine form components
|
|
247
|
-
*/
|
|
248
|
-
type FormFieldType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'radio' | 'richtext';
|
|
249
|
-
/**
|
|
250
|
-
* Form field definition
|
|
251
|
-
*/
|
|
252
|
-
interface FormField {
|
|
253
|
-
/** Field key in payload object */
|
|
254
|
-
name: string;
|
|
255
|
-
/** Field label for UI */
|
|
256
|
-
label: string;
|
|
257
|
-
/** Field type (determines UI component) */
|
|
258
|
-
type: FormFieldType;
|
|
259
|
-
/** Default value */
|
|
260
|
-
defaultValue?: unknown;
|
|
261
|
-
/** Required field */
|
|
262
|
-
required?: boolean;
|
|
263
|
-
/** Placeholder text */
|
|
264
|
-
placeholder?: string;
|
|
265
|
-
/** Help text */
|
|
266
|
-
description?: string;
|
|
267
|
-
/** Options for select/radio */
|
|
268
|
-
options?: Array<{
|
|
269
|
-
label: string;
|
|
270
|
-
value: string | number;
|
|
271
|
-
}>;
|
|
272
|
-
/** Min/max for number */
|
|
273
|
-
min?: number;
|
|
274
|
-
max?: number;
|
|
275
|
-
/** Path to context value for pre-filling (dot notation, e.g., 'proposal.summary') */
|
|
276
|
-
defaultValueFromContext?: string;
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Form schema for action payload collection
|
|
280
|
-
*/
|
|
281
|
-
interface FormSchema {
|
|
282
|
-
/** Form title */
|
|
283
|
-
title?: string;
|
|
284
|
-
/** Form description */
|
|
285
|
-
description?: string;
|
|
286
|
-
/** Form fields */
|
|
287
|
-
fields: FormField[];
|
|
288
|
-
}
|
|
289
|
-
|
|
290
240
|
/**
|
|
291
241
|
* Model Configuration
|
|
292
242
|
* Centralized model information, configuration, options, constraints, and validation
|
|
@@ -385,6 +335,56 @@ interface ModelConfig {
|
|
|
385
335
|
modelOptions?: ModelSpecificOptions;
|
|
386
336
|
}
|
|
387
337
|
|
|
338
|
+
/**
|
|
339
|
+
* Shared form field types for dynamic form generation
|
|
340
|
+
* Used by: Command Queue, Execution Runner UI, future form-based features
|
|
341
|
+
*/
|
|
342
|
+
/**
|
|
343
|
+
* Supported form field types for action payloads
|
|
344
|
+
* Maps to Mantine form components
|
|
345
|
+
*/
|
|
346
|
+
type FormFieldType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'radio' | 'richtext';
|
|
347
|
+
/**
|
|
348
|
+
* Form field definition
|
|
349
|
+
*/
|
|
350
|
+
interface FormField {
|
|
351
|
+
/** Field key in payload object */
|
|
352
|
+
name: string;
|
|
353
|
+
/** Field label for UI */
|
|
354
|
+
label: string;
|
|
355
|
+
/** Field type (determines UI component) */
|
|
356
|
+
type: FormFieldType;
|
|
357
|
+
/** Default value */
|
|
358
|
+
defaultValue?: unknown;
|
|
359
|
+
/** Required field */
|
|
360
|
+
required?: boolean;
|
|
361
|
+
/** Placeholder text */
|
|
362
|
+
placeholder?: string;
|
|
363
|
+
/** Help text */
|
|
364
|
+
description?: string;
|
|
365
|
+
/** Options for select/radio */
|
|
366
|
+
options?: Array<{
|
|
367
|
+
label: string;
|
|
368
|
+
value: string | number;
|
|
369
|
+
}>;
|
|
370
|
+
/** Min/max for number */
|
|
371
|
+
min?: number;
|
|
372
|
+
max?: number;
|
|
373
|
+
/** Path to context value for pre-filling (dot notation, e.g., 'proposal.summary') */
|
|
374
|
+
defaultValueFromContext?: string;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Form schema for action payload collection
|
|
378
|
+
*/
|
|
379
|
+
interface FormSchema {
|
|
380
|
+
/** Form title */
|
|
381
|
+
title?: string;
|
|
382
|
+
/** Form description */
|
|
383
|
+
description?: string;
|
|
384
|
+
/** Form fields */
|
|
385
|
+
fields: FormField[];
|
|
386
|
+
}
|
|
387
|
+
|
|
388
388
|
/**
|
|
389
389
|
* Execution interface configuration
|
|
390
390
|
* Defines how a resource is executed via the UI (forms, scheduling, webhooks)
|
|
@@ -442,6 +442,8 @@ interface WebhookConfig {
|
|
|
442
442
|
|
|
443
443
|
interface WorkflowConfig extends ResourceDefinition {
|
|
444
444
|
type: 'workflow';
|
|
445
|
+
/** Lead-gen capability key for registry derivation (e.g. 'lead-gen.company.apollo-import') */
|
|
446
|
+
capabilityKey?: string;
|
|
445
447
|
}
|
|
446
448
|
interface WorkflowStepDefinition {
|
|
447
449
|
id: string;
|
|
@@ -895,7 +897,7 @@ type Json = string | number | boolean | null | {
|
|
|
895
897
|
} | Json[];
|
|
896
898
|
type Database = {
|
|
897
899
|
__InternalSupabase: {
|
|
898
|
-
PostgrestVersion:
|
|
900
|
+
PostgrestVersion: "12.2.3 (519615d)";
|
|
899
901
|
};
|
|
900
902
|
public: {
|
|
901
903
|
Tables: {
|
|
@@ -938,11 +940,11 @@ type Database = {
|
|
|
938
940
|
};
|
|
939
941
|
Relationships: [
|
|
940
942
|
{
|
|
941
|
-
foreignKeyName:
|
|
942
|
-
columns: [
|
|
943
|
+
foreignKeyName: "acq_artifacts_organization_id_fkey";
|
|
944
|
+
columns: ["organization_id"];
|
|
943
945
|
isOneToOne: false;
|
|
944
|
-
referencedRelation:
|
|
945
|
-
referencedColumns: [
|
|
946
|
+
referencedRelation: "organizations";
|
|
947
|
+
referencedColumns: ["id"];
|
|
946
948
|
}
|
|
947
949
|
];
|
|
948
950
|
};
|
|
@@ -1027,11 +1029,11 @@ type Database = {
|
|
|
1027
1029
|
};
|
|
1028
1030
|
Relationships: [
|
|
1029
1031
|
{
|
|
1030
|
-
foreignKeyName:
|
|
1031
|
-
columns: [
|
|
1032
|
+
foreignKeyName: "acq_companies_organization_id_fkey";
|
|
1033
|
+
columns: ["organization_id"];
|
|
1032
1034
|
isOneToOne: false;
|
|
1033
|
-
referencedRelation:
|
|
1034
|
-
referencedColumns: [
|
|
1035
|
+
referencedRelation: "organizations";
|
|
1036
|
+
referencedColumns: ["id"];
|
|
1035
1037
|
}
|
|
1036
1038
|
];
|
|
1037
1039
|
};
|
|
@@ -1122,18 +1124,18 @@ type Database = {
|
|
|
1122
1124
|
};
|
|
1123
1125
|
Relationships: [
|
|
1124
1126
|
{
|
|
1125
|
-
foreignKeyName:
|
|
1126
|
-
columns: [
|
|
1127
|
+
foreignKeyName: "acq_contacts_company_id_fkey";
|
|
1128
|
+
columns: ["company_id"];
|
|
1127
1129
|
isOneToOne: false;
|
|
1128
|
-
referencedRelation:
|
|
1129
|
-
referencedColumns: [
|
|
1130
|
+
referencedRelation: "acq_companies";
|
|
1131
|
+
referencedColumns: ["id"];
|
|
1130
1132
|
},
|
|
1131
1133
|
{
|
|
1132
|
-
foreignKeyName:
|
|
1133
|
-
columns: [
|
|
1134
|
+
foreignKeyName: "acq_contacts_organization_id_fkey";
|
|
1135
|
+
columns: ["organization_id"];
|
|
1134
1136
|
isOneToOne: false;
|
|
1135
|
-
referencedRelation:
|
|
1136
|
-
referencedColumns: [
|
|
1137
|
+
referencedRelation: "organizations";
|
|
1138
|
+
referencedColumns: ["id"];
|
|
1137
1139
|
}
|
|
1138
1140
|
];
|
|
1139
1141
|
};
|
|
@@ -1170,11 +1172,11 @@ type Database = {
|
|
|
1170
1172
|
};
|
|
1171
1173
|
Relationships: [
|
|
1172
1174
|
{
|
|
1173
|
-
foreignKeyName:
|
|
1174
|
-
columns: [
|
|
1175
|
+
foreignKeyName: "acq_content_organization_id_fkey";
|
|
1176
|
+
columns: ["organization_id"];
|
|
1175
1177
|
isOneToOne: false;
|
|
1176
|
-
referencedRelation:
|
|
1177
|
-
referencedColumns: [
|
|
1178
|
+
referencedRelation: "organizations";
|
|
1179
|
+
referencedColumns: ["id"];
|
|
1178
1180
|
}
|
|
1179
1181
|
];
|
|
1180
1182
|
};
|
|
@@ -1238,18 +1240,18 @@ type Database = {
|
|
|
1238
1240
|
};
|
|
1239
1241
|
Relationships: [
|
|
1240
1242
|
{
|
|
1241
|
-
foreignKeyName:
|
|
1242
|
-
columns: [
|
|
1243
|
+
foreignKeyName: "acq_content_distributions_content_id_fkey";
|
|
1244
|
+
columns: ["content_id"];
|
|
1243
1245
|
isOneToOne: false;
|
|
1244
|
-
referencedRelation:
|
|
1245
|
-
referencedColumns: [
|
|
1246
|
+
referencedRelation: "acq_content";
|
|
1247
|
+
referencedColumns: ["id"];
|
|
1246
1248
|
},
|
|
1247
1249
|
{
|
|
1248
|
-
foreignKeyName:
|
|
1249
|
-
columns: [
|
|
1250
|
+
foreignKeyName: "acq_content_distributions_organization_id_fkey";
|
|
1251
|
+
columns: ["organization_id"];
|
|
1250
1252
|
isOneToOne: false;
|
|
1251
|
-
referencedRelation:
|
|
1252
|
-
referencedColumns: [
|
|
1253
|
+
referencedRelation: "organizations";
|
|
1254
|
+
referencedColumns: ["id"];
|
|
1253
1255
|
}
|
|
1254
1256
|
];
|
|
1255
1257
|
};
|
|
@@ -1283,18 +1285,18 @@ type Database = {
|
|
|
1283
1285
|
};
|
|
1284
1286
|
Relationships: [
|
|
1285
1287
|
{
|
|
1286
|
-
foreignKeyName:
|
|
1287
|
-
columns: [
|
|
1288
|
+
foreignKeyName: "acq_deal_notes_deal_id_fkey";
|
|
1289
|
+
columns: ["deal_id"];
|
|
1288
1290
|
isOneToOne: false;
|
|
1289
|
-
referencedRelation:
|
|
1290
|
-
referencedColumns: [
|
|
1291
|
+
referencedRelation: "acq_deals";
|
|
1292
|
+
referencedColumns: ["id"];
|
|
1291
1293
|
},
|
|
1292
1294
|
{
|
|
1293
|
-
foreignKeyName:
|
|
1294
|
-
columns: [
|
|
1295
|
+
foreignKeyName: "acq_deal_notes_organization_id_fkey";
|
|
1296
|
+
columns: ["organization_id"];
|
|
1295
1297
|
isOneToOne: false;
|
|
1296
|
-
referencedRelation:
|
|
1297
|
-
referencedColumns: [
|
|
1298
|
+
referencedRelation: "organizations";
|
|
1299
|
+
referencedColumns: ["id"];
|
|
1298
1300
|
}
|
|
1299
1301
|
];
|
|
1300
1302
|
};
|
|
@@ -1346,18 +1348,18 @@ type Database = {
|
|
|
1346
1348
|
};
|
|
1347
1349
|
Relationships: [
|
|
1348
1350
|
{
|
|
1349
|
-
foreignKeyName:
|
|
1350
|
-
columns: [
|
|
1351
|
+
foreignKeyName: "acq_deal_tasks_deal_id_fkey";
|
|
1352
|
+
columns: ["deal_id"];
|
|
1351
1353
|
isOneToOne: false;
|
|
1352
|
-
referencedRelation:
|
|
1353
|
-
referencedColumns: [
|
|
1354
|
+
referencedRelation: "acq_deals";
|
|
1355
|
+
referencedColumns: ["id"];
|
|
1354
1356
|
},
|
|
1355
1357
|
{
|
|
1356
|
-
foreignKeyName:
|
|
1357
|
-
columns: [
|
|
1358
|
+
foreignKeyName: "acq_deal_tasks_organization_id_fkey";
|
|
1359
|
+
columns: ["organization_id"];
|
|
1358
1360
|
isOneToOne: false;
|
|
1359
|
-
referencedRelation:
|
|
1360
|
-
referencedColumns: [
|
|
1361
|
+
referencedRelation: "organizations";
|
|
1362
|
+
referencedColumns: ["id"];
|
|
1361
1363
|
}
|
|
1362
1364
|
];
|
|
1363
1365
|
};
|
|
@@ -1374,6 +1376,8 @@ type Database = {
|
|
|
1374
1376
|
discovery_submitted_by: string | null;
|
|
1375
1377
|
id: string;
|
|
1376
1378
|
initial_fee: number | null;
|
|
1379
|
+
instantly_email_account: string | null;
|
|
1380
|
+
instantly_thread_uuid: string | null;
|
|
1377
1381
|
monthly_fee: number | null;
|
|
1378
1382
|
organization_id: string;
|
|
1379
1383
|
payment_link_sent_at: string | null;
|
|
@@ -1409,6 +1413,8 @@ type Database = {
|
|
|
1409
1413
|
discovery_submitted_by?: string | null;
|
|
1410
1414
|
id?: string;
|
|
1411
1415
|
initial_fee?: number | null;
|
|
1416
|
+
instantly_email_account?: string | null;
|
|
1417
|
+
instantly_thread_uuid?: string | null;
|
|
1412
1418
|
monthly_fee?: number | null;
|
|
1413
1419
|
organization_id: string;
|
|
1414
1420
|
payment_link_sent_at?: string | null;
|
|
@@ -1444,6 +1450,8 @@ type Database = {
|
|
|
1444
1450
|
discovery_submitted_by?: string | null;
|
|
1445
1451
|
id?: string;
|
|
1446
1452
|
initial_fee?: number | null;
|
|
1453
|
+
instantly_email_account?: string | null;
|
|
1454
|
+
instantly_thread_uuid?: string | null;
|
|
1447
1455
|
monthly_fee?: number | null;
|
|
1448
1456
|
organization_id?: string;
|
|
1449
1457
|
payment_link_sent_at?: string | null;
|
|
@@ -1469,25 +1477,25 @@ type Database = {
|
|
|
1469
1477
|
};
|
|
1470
1478
|
Relationships: [
|
|
1471
1479
|
{
|
|
1472
|
-
foreignKeyName:
|
|
1473
|
-
columns: [
|
|
1480
|
+
foreignKeyName: "acq_deals_contact_id_fkey";
|
|
1481
|
+
columns: ["contact_id"];
|
|
1474
1482
|
isOneToOne: false;
|
|
1475
|
-
referencedRelation:
|
|
1476
|
-
referencedColumns: [
|
|
1483
|
+
referencedRelation: "acq_contacts";
|
|
1484
|
+
referencedColumns: ["id"];
|
|
1477
1485
|
},
|
|
1478
1486
|
{
|
|
1479
|
-
foreignKeyName:
|
|
1480
|
-
columns: [
|
|
1487
|
+
foreignKeyName: "acq_deals_organization_id_fkey";
|
|
1488
|
+
columns: ["organization_id"];
|
|
1481
1489
|
isOneToOne: false;
|
|
1482
|
-
referencedRelation:
|
|
1483
|
-
referencedColumns: [
|
|
1490
|
+
referencedRelation: "organizations";
|
|
1491
|
+
referencedColumns: ["id"];
|
|
1484
1492
|
},
|
|
1485
1493
|
{
|
|
1486
|
-
foreignKeyName:
|
|
1487
|
-
columns: [
|
|
1494
|
+
foreignKeyName: "acq_deals_source_list_id_fkey";
|
|
1495
|
+
columns: ["source_list_id"];
|
|
1488
1496
|
isOneToOne: false;
|
|
1489
|
-
referencedRelation:
|
|
1490
|
-
referencedColumns: [
|
|
1497
|
+
referencedRelation: "acq_lists";
|
|
1498
|
+
referencedColumns: ["id"];
|
|
1491
1499
|
}
|
|
1492
1500
|
];
|
|
1493
1501
|
};
|
|
@@ -1539,25 +1547,25 @@ type Database = {
|
|
|
1539
1547
|
};
|
|
1540
1548
|
Relationships: [
|
|
1541
1549
|
{
|
|
1542
|
-
foreignKeyName:
|
|
1543
|
-
columns: [
|
|
1550
|
+
foreignKeyName: "acq_list_companies_company_id_fkey";
|
|
1551
|
+
columns: ["company_id"];
|
|
1544
1552
|
isOneToOne: false;
|
|
1545
|
-
referencedRelation:
|
|
1546
|
-
referencedColumns: [
|
|
1553
|
+
referencedRelation: "acq_companies";
|
|
1554
|
+
referencedColumns: ["id"];
|
|
1547
1555
|
},
|
|
1548
1556
|
{
|
|
1549
|
-
foreignKeyName:
|
|
1550
|
-
columns: [
|
|
1557
|
+
foreignKeyName: "acq_list_companies_list_id_fkey";
|
|
1558
|
+
columns: ["list_id"];
|
|
1551
1559
|
isOneToOne: false;
|
|
1552
|
-
referencedRelation:
|
|
1553
|
-
referencedColumns: [
|
|
1560
|
+
referencedRelation: "acq_lists";
|
|
1561
|
+
referencedColumns: ["id"];
|
|
1554
1562
|
},
|
|
1555
1563
|
{
|
|
1556
|
-
foreignKeyName:
|
|
1557
|
-
columns: [
|
|
1564
|
+
foreignKeyName: "acq_list_companies_source_execution_id_fkey";
|
|
1565
|
+
columns: ["source_execution_id"];
|
|
1558
1566
|
isOneToOne: false;
|
|
1559
|
-
referencedRelation:
|
|
1560
|
-
referencedColumns: [
|
|
1567
|
+
referencedRelation: "execution_logs";
|
|
1568
|
+
referencedColumns: ["execution_id"];
|
|
1561
1569
|
}
|
|
1562
1570
|
];
|
|
1563
1571
|
};
|
|
@@ -1585,18 +1593,18 @@ type Database = {
|
|
|
1585
1593
|
};
|
|
1586
1594
|
Relationships: [
|
|
1587
1595
|
{
|
|
1588
|
-
foreignKeyName:
|
|
1589
|
-
columns: [
|
|
1596
|
+
foreignKeyName: "acq_list_executions_execution_id_fkey";
|
|
1597
|
+
columns: ["execution_id"];
|
|
1590
1598
|
isOneToOne: false;
|
|
1591
|
-
referencedRelation:
|
|
1592
|
-
referencedColumns: [
|
|
1599
|
+
referencedRelation: "execution_logs";
|
|
1600
|
+
referencedColumns: ["execution_id"];
|
|
1593
1601
|
},
|
|
1594
1602
|
{
|
|
1595
|
-
foreignKeyName:
|
|
1596
|
-
columns: [
|
|
1603
|
+
foreignKeyName: "acq_list_executions_list_id_fkey";
|
|
1604
|
+
columns: ["list_id"];
|
|
1597
1605
|
isOneToOne: false;
|
|
1598
|
-
referencedRelation:
|
|
1599
|
-
referencedColumns: [
|
|
1606
|
+
referencedRelation: "acq_lists";
|
|
1607
|
+
referencedColumns: ["id"];
|
|
1600
1608
|
}
|
|
1601
1609
|
];
|
|
1602
1610
|
};
|
|
@@ -1648,25 +1656,25 @@ type Database = {
|
|
|
1648
1656
|
};
|
|
1649
1657
|
Relationships: [
|
|
1650
1658
|
{
|
|
1651
|
-
foreignKeyName:
|
|
1652
|
-
columns: [
|
|
1659
|
+
foreignKeyName: "acq_list_members_contact_id_fkey";
|
|
1660
|
+
columns: ["contact_id"];
|
|
1653
1661
|
isOneToOne: false;
|
|
1654
|
-
referencedRelation:
|
|
1655
|
-
referencedColumns: [
|
|
1662
|
+
referencedRelation: "acq_contacts";
|
|
1663
|
+
referencedColumns: ["id"];
|
|
1656
1664
|
},
|
|
1657
1665
|
{
|
|
1658
|
-
foreignKeyName:
|
|
1659
|
-
columns: [
|
|
1666
|
+
foreignKeyName: "acq_list_members_list_id_fkey";
|
|
1667
|
+
columns: ["list_id"];
|
|
1660
1668
|
isOneToOne: false;
|
|
1661
|
-
referencedRelation:
|
|
1662
|
-
referencedColumns: [
|
|
1669
|
+
referencedRelation: "acq_lists";
|
|
1670
|
+
referencedColumns: ["id"];
|
|
1663
1671
|
},
|
|
1664
1672
|
{
|
|
1665
|
-
foreignKeyName:
|
|
1666
|
-
columns: [
|
|
1673
|
+
foreignKeyName: "acq_list_members_source_execution_id_fkey";
|
|
1674
|
+
columns: ["source_execution_id"];
|
|
1667
1675
|
isOneToOne: false;
|
|
1668
|
-
referencedRelation:
|
|
1669
|
-
referencedColumns: [
|
|
1676
|
+
referencedRelation: "execution_logs";
|
|
1677
|
+
referencedColumns: ["execution_id"];
|
|
1670
1678
|
}
|
|
1671
1679
|
];
|
|
1672
1680
|
};
|
|
@@ -1721,11 +1729,11 @@ type Database = {
|
|
|
1721
1729
|
};
|
|
1722
1730
|
Relationships: [
|
|
1723
1731
|
{
|
|
1724
|
-
foreignKeyName:
|
|
1725
|
-
columns: [
|
|
1732
|
+
foreignKeyName: "acq_lists_organization_id_fkey";
|
|
1733
|
+
columns: ["organization_id"];
|
|
1726
1734
|
isOneToOne: false;
|
|
1727
|
-
referencedRelation:
|
|
1728
|
-
referencedColumns: [
|
|
1735
|
+
referencedRelation: "organizations";
|
|
1736
|
+
referencedColumns: ["id"];
|
|
1729
1737
|
}
|
|
1730
1738
|
];
|
|
1731
1739
|
};
|
|
@@ -1801,18 +1809,18 @@ type Database = {
|
|
|
1801
1809
|
};
|
|
1802
1810
|
Relationships: [
|
|
1803
1811
|
{
|
|
1804
|
-
foreignKeyName:
|
|
1805
|
-
columns: [
|
|
1812
|
+
foreignKeyName: "acq_seo_metrics_organization_id_fkey";
|
|
1813
|
+
columns: ["organization_id"];
|
|
1806
1814
|
isOneToOne: false;
|
|
1807
|
-
referencedRelation:
|
|
1808
|
-
referencedColumns: [
|
|
1815
|
+
referencedRelation: "organizations";
|
|
1816
|
+
referencedColumns: ["id"];
|
|
1809
1817
|
},
|
|
1810
1818
|
{
|
|
1811
|
-
foreignKeyName:
|
|
1812
|
-
columns: [
|
|
1819
|
+
foreignKeyName: "acq_seo_metrics_seo_page_id_fkey";
|
|
1820
|
+
columns: ["seo_page_id"];
|
|
1813
1821
|
isOneToOne: false;
|
|
1814
|
-
referencedRelation:
|
|
1815
|
-
referencedColumns: [
|
|
1822
|
+
referencedRelation: "acq_seo_pages";
|
|
1823
|
+
referencedColumns: ["id"];
|
|
1816
1824
|
}
|
|
1817
1825
|
];
|
|
1818
1826
|
};
|
|
@@ -1888,11 +1896,11 @@ type Database = {
|
|
|
1888
1896
|
};
|
|
1889
1897
|
Relationships: [
|
|
1890
1898
|
{
|
|
1891
|
-
foreignKeyName:
|
|
1892
|
-
columns: [
|
|
1899
|
+
foreignKeyName: "acq_seo_pages_organization_id_fkey";
|
|
1900
|
+
columns: ["organization_id"];
|
|
1893
1901
|
isOneToOne: false;
|
|
1894
|
-
referencedRelation:
|
|
1895
|
-
referencedColumns: [
|
|
1902
|
+
referencedRelation: "organizations";
|
|
1903
|
+
referencedColumns: ["id"];
|
|
1896
1904
|
}
|
|
1897
1905
|
];
|
|
1898
1906
|
};
|
|
@@ -1989,11 +1997,11 @@ type Database = {
|
|
|
1989
1997
|
};
|
|
1990
1998
|
Relationships: [
|
|
1991
1999
|
{
|
|
1992
|
-
foreignKeyName:
|
|
1993
|
-
columns: [
|
|
2000
|
+
foreignKeyName: "acq_social_posts_organization_id_fkey";
|
|
2001
|
+
columns: ["organization_id"];
|
|
1994
2002
|
isOneToOne: false;
|
|
1995
|
-
referencedRelation:
|
|
1996
|
-
referencedColumns: [
|
|
2003
|
+
referencedRelation: "organizations";
|
|
2004
|
+
referencedColumns: ["id"];
|
|
1997
2005
|
}
|
|
1998
2006
|
];
|
|
1999
2007
|
};
|
|
@@ -2048,11 +2056,11 @@ type Database = {
|
|
|
2048
2056
|
};
|
|
2049
2057
|
Relationships: [
|
|
2050
2058
|
{
|
|
2051
|
-
foreignKeyName:
|
|
2052
|
-
columns: [
|
|
2059
|
+
foreignKeyName: "activities_organization_id_fkey";
|
|
2060
|
+
columns: ["organization_id"];
|
|
2053
2061
|
isOneToOne: false;
|
|
2054
|
-
referencedRelation:
|
|
2055
|
-
referencedColumns: [
|
|
2062
|
+
referencedRelation: "organizations";
|
|
2063
|
+
referencedColumns: ["id"];
|
|
2056
2064
|
}
|
|
2057
2065
|
];
|
|
2058
2066
|
};
|
|
@@ -2083,11 +2091,11 @@ type Database = {
|
|
|
2083
2091
|
};
|
|
2084
2092
|
Relationships: [
|
|
2085
2093
|
{
|
|
2086
|
-
foreignKeyName:
|
|
2087
|
-
columns: [
|
|
2094
|
+
foreignKeyName: "api_keys_organization_id_fkey";
|
|
2095
|
+
columns: ["organization_id"];
|
|
2088
2096
|
isOneToOne: false;
|
|
2089
|
-
referencedRelation:
|
|
2090
|
-
referencedColumns: [
|
|
2097
|
+
referencedRelation: "organizations";
|
|
2098
|
+
referencedColumns: ["id"];
|
|
2091
2099
|
}
|
|
2092
2100
|
];
|
|
2093
2101
|
};
|
|
@@ -2166,25 +2174,25 @@ type Database = {
|
|
|
2166
2174
|
};
|
|
2167
2175
|
Relationships: [
|
|
2168
2176
|
{
|
|
2169
|
-
foreignKeyName:
|
|
2170
|
-
columns: [
|
|
2177
|
+
foreignKeyName: "command_queue_completed_by_fkey";
|
|
2178
|
+
columns: ["completed_by"];
|
|
2171
2179
|
isOneToOne: false;
|
|
2172
|
-
referencedRelation:
|
|
2173
|
-
referencedColumns: [
|
|
2180
|
+
referencedRelation: "users";
|
|
2181
|
+
referencedColumns: ["id"];
|
|
2174
2182
|
},
|
|
2175
2183
|
{
|
|
2176
|
-
foreignKeyName:
|
|
2177
|
-
columns: [
|
|
2184
|
+
foreignKeyName: "command_queue_organization_id_fkey";
|
|
2185
|
+
columns: ["organization_id"];
|
|
2178
2186
|
isOneToOne: false;
|
|
2179
|
-
referencedRelation:
|
|
2180
|
-
referencedColumns: [
|
|
2187
|
+
referencedRelation: "organizations";
|
|
2188
|
+
referencedColumns: ["id"];
|
|
2181
2189
|
},
|
|
2182
2190
|
{
|
|
2183
|
-
foreignKeyName:
|
|
2184
|
-
columns: [
|
|
2191
|
+
foreignKeyName: "command_queue_target_execution_id_fkey";
|
|
2192
|
+
columns: ["target_execution_id"];
|
|
2185
2193
|
isOneToOne: false;
|
|
2186
|
-
referencedRelation:
|
|
2187
|
-
referencedColumns: [
|
|
2194
|
+
referencedRelation: "execution_logs";
|
|
2195
|
+
referencedColumns: ["execution_id"];
|
|
2188
2196
|
}
|
|
2189
2197
|
];
|
|
2190
2198
|
};
|
|
@@ -2224,18 +2232,18 @@ type Database = {
|
|
|
2224
2232
|
};
|
|
2225
2233
|
Relationships: [
|
|
2226
2234
|
{
|
|
2227
|
-
foreignKeyName:
|
|
2228
|
-
columns: [
|
|
2235
|
+
foreignKeyName: "credentials_created_by_fkey";
|
|
2236
|
+
columns: ["created_by"];
|
|
2229
2237
|
isOneToOne: false;
|
|
2230
|
-
referencedRelation:
|
|
2231
|
-
referencedColumns: [
|
|
2238
|
+
referencedRelation: "users";
|
|
2239
|
+
referencedColumns: ["id"];
|
|
2232
2240
|
},
|
|
2233
2241
|
{
|
|
2234
|
-
foreignKeyName:
|
|
2235
|
-
columns: [
|
|
2242
|
+
foreignKeyName: "credentials_organization_id_fkey";
|
|
2243
|
+
columns: ["organization_id"];
|
|
2236
2244
|
isOneToOne: false;
|
|
2237
|
-
referencedRelation:
|
|
2238
|
-
referencedColumns: [
|
|
2245
|
+
referencedRelation: "organizations";
|
|
2246
|
+
referencedColumns: ["id"];
|
|
2239
2247
|
}
|
|
2240
2248
|
];
|
|
2241
2249
|
};
|
|
@@ -2281,11 +2289,11 @@ type Database = {
|
|
|
2281
2289
|
};
|
|
2282
2290
|
Relationships: [
|
|
2283
2291
|
{
|
|
2284
|
-
foreignKeyName:
|
|
2285
|
-
columns: [
|
|
2292
|
+
foreignKeyName: "deployments_organization_id_fkey";
|
|
2293
|
+
columns: ["organization_id"];
|
|
2286
2294
|
isOneToOne: false;
|
|
2287
|
-
referencedRelation:
|
|
2288
|
-
referencedColumns: [
|
|
2295
|
+
referencedRelation: "organizations";
|
|
2296
|
+
referencedColumns: ["id"];
|
|
2289
2297
|
}
|
|
2290
2298
|
];
|
|
2291
2299
|
};
|
|
@@ -2340,25 +2348,25 @@ type Database = {
|
|
|
2340
2348
|
};
|
|
2341
2349
|
Relationships: [
|
|
2342
2350
|
{
|
|
2343
|
-
foreignKeyName:
|
|
2344
|
-
columns: [
|
|
2351
|
+
foreignKeyName: "execution_errors_execution_id_fkey";
|
|
2352
|
+
columns: ["execution_id"];
|
|
2345
2353
|
isOneToOne: false;
|
|
2346
|
-
referencedRelation:
|
|
2347
|
-
referencedColumns: [
|
|
2354
|
+
referencedRelation: "execution_logs";
|
|
2355
|
+
referencedColumns: ["execution_id"];
|
|
2348
2356
|
},
|
|
2349
2357
|
{
|
|
2350
|
-
foreignKeyName:
|
|
2351
|
-
columns: [
|
|
2358
|
+
foreignKeyName: "execution_errors_organization_id_fkey";
|
|
2359
|
+
columns: ["organization_id"];
|
|
2352
2360
|
isOneToOne: false;
|
|
2353
|
-
referencedRelation:
|
|
2354
|
-
referencedColumns: [
|
|
2361
|
+
referencedRelation: "organizations";
|
|
2362
|
+
referencedColumns: ["id"];
|
|
2355
2363
|
},
|
|
2356
2364
|
{
|
|
2357
|
-
foreignKeyName:
|
|
2358
|
-
columns: [
|
|
2365
|
+
foreignKeyName: "execution_errors_resolved_by_fkey";
|
|
2366
|
+
columns: ["resolved_by"];
|
|
2359
2367
|
isOneToOne: false;
|
|
2360
|
-
referencedRelation:
|
|
2361
|
-
referencedColumns: [
|
|
2368
|
+
referencedRelation: "users";
|
|
2369
|
+
referencedColumns: ["id"];
|
|
2362
2370
|
}
|
|
2363
2371
|
];
|
|
2364
2372
|
};
|
|
@@ -2440,32 +2448,32 @@ type Database = {
|
|
|
2440
2448
|
};
|
|
2441
2449
|
Relationships: [
|
|
2442
2450
|
{
|
|
2443
|
-
foreignKeyName:
|
|
2444
|
-
columns: [
|
|
2451
|
+
foreignKeyName: "execution_history_organization_id_fkey";
|
|
2452
|
+
columns: ["organization_id"];
|
|
2445
2453
|
isOneToOne: false;
|
|
2446
|
-
referencedRelation:
|
|
2447
|
-
referencedColumns: [
|
|
2454
|
+
referencedRelation: "organizations";
|
|
2455
|
+
referencedColumns: ["id"];
|
|
2448
2456
|
},
|
|
2449
2457
|
{
|
|
2450
|
-
foreignKeyName:
|
|
2451
|
-
columns: [
|
|
2458
|
+
foreignKeyName: "execution_logs_origin_execution_id_fkey";
|
|
2459
|
+
columns: ["origin_execution_id"];
|
|
2452
2460
|
isOneToOne: false;
|
|
2453
|
-
referencedRelation:
|
|
2454
|
-
referencedColumns: [
|
|
2461
|
+
referencedRelation: "execution_logs";
|
|
2462
|
+
referencedColumns: ["execution_id"];
|
|
2455
2463
|
},
|
|
2456
2464
|
{
|
|
2457
|
-
foreignKeyName:
|
|
2458
|
-
columns: [
|
|
2465
|
+
foreignKeyName: "execution_logs_session_id_fkey";
|
|
2466
|
+
columns: ["session_id"];
|
|
2459
2467
|
isOneToOne: false;
|
|
2460
|
-
referencedRelation:
|
|
2461
|
-
referencedColumns: [
|
|
2468
|
+
referencedRelation: "sessions";
|
|
2469
|
+
referencedColumns: ["session_id"];
|
|
2462
2470
|
},
|
|
2463
2471
|
{
|
|
2464
|
-
foreignKeyName:
|
|
2465
|
-
columns: [
|
|
2472
|
+
foreignKeyName: "execution_logs_user_id_fkey";
|
|
2473
|
+
columns: ["user_id"];
|
|
2466
2474
|
isOneToOne: false;
|
|
2467
|
-
referencedRelation:
|
|
2468
|
-
referencedColumns: [
|
|
2475
|
+
referencedRelation: "users";
|
|
2476
|
+
referencedColumns: ["id"];
|
|
2469
2477
|
}
|
|
2470
2478
|
];
|
|
2471
2479
|
};
|
|
@@ -2511,18 +2519,18 @@ type Database = {
|
|
|
2511
2519
|
};
|
|
2512
2520
|
Relationships: [
|
|
2513
2521
|
{
|
|
2514
|
-
foreignKeyName:
|
|
2515
|
-
columns: [
|
|
2522
|
+
foreignKeyName: "execution_metrics_execution_id_fkey";
|
|
2523
|
+
columns: ["execution_id"];
|
|
2516
2524
|
isOneToOne: true;
|
|
2517
|
-
referencedRelation:
|
|
2518
|
-
referencedColumns: [
|
|
2525
|
+
referencedRelation: "execution_logs";
|
|
2526
|
+
referencedColumns: ["execution_id"];
|
|
2519
2527
|
},
|
|
2520
2528
|
{
|
|
2521
|
-
foreignKeyName:
|
|
2522
|
-
columns: [
|
|
2529
|
+
foreignKeyName: "execution_metrics_organization_id_fkey";
|
|
2530
|
+
columns: ["organization_id"];
|
|
2523
2531
|
isOneToOne: false;
|
|
2524
|
-
referencedRelation:
|
|
2525
|
-
referencedColumns: [
|
|
2532
|
+
referencedRelation: "organizations";
|
|
2533
|
+
referencedColumns: ["id"];
|
|
2526
2534
|
}
|
|
2527
2535
|
];
|
|
2528
2536
|
};
|
|
@@ -2565,18 +2573,18 @@ type Database = {
|
|
|
2565
2573
|
};
|
|
2566
2574
|
Relationships: [
|
|
2567
2575
|
{
|
|
2568
|
-
foreignKeyName:
|
|
2569
|
-
columns: [
|
|
2576
|
+
foreignKeyName: "notifications_organization_id_fkey";
|
|
2577
|
+
columns: ["organization_id"];
|
|
2570
2578
|
isOneToOne: false;
|
|
2571
|
-
referencedRelation:
|
|
2572
|
-
referencedColumns: [
|
|
2579
|
+
referencedRelation: "organizations";
|
|
2580
|
+
referencedColumns: ["id"];
|
|
2573
2581
|
},
|
|
2574
2582
|
{
|
|
2575
|
-
foreignKeyName:
|
|
2576
|
-
columns: [
|
|
2583
|
+
foreignKeyName: "notifications_user_id_fkey";
|
|
2584
|
+
columns: ["user_id"];
|
|
2577
2585
|
isOneToOne: false;
|
|
2578
|
-
referencedRelation:
|
|
2579
|
-
referencedColumns: [
|
|
2586
|
+
referencedRelation: "users";
|
|
2587
|
+
referencedColumns: ["id"];
|
|
2580
2588
|
}
|
|
2581
2589
|
];
|
|
2582
2590
|
};
|
|
@@ -2631,18 +2639,18 @@ type Database = {
|
|
|
2631
2639
|
};
|
|
2632
2640
|
Relationships: [
|
|
2633
2641
|
{
|
|
2634
|
-
foreignKeyName:
|
|
2635
|
-
columns: [
|
|
2642
|
+
foreignKeyName: "org_invitations_inviter_user_id_fkey";
|
|
2643
|
+
columns: ["inviter_user_id"];
|
|
2636
2644
|
isOneToOne: false;
|
|
2637
|
-
referencedRelation:
|
|
2638
|
-
referencedColumns: [
|
|
2645
|
+
referencedRelation: "users";
|
|
2646
|
+
referencedColumns: ["id"];
|
|
2639
2647
|
},
|
|
2640
2648
|
{
|
|
2641
|
-
foreignKeyName:
|
|
2642
|
-
columns: [
|
|
2649
|
+
foreignKeyName: "org_invitations_organization_id_fkey";
|
|
2650
|
+
columns: ["organization_id"];
|
|
2643
2651
|
isOneToOne: false;
|
|
2644
|
-
referencedRelation:
|
|
2645
|
-
referencedColumns: [
|
|
2652
|
+
referencedRelation: "organizations";
|
|
2653
|
+
referencedColumns: ["id"];
|
|
2646
2654
|
}
|
|
2647
2655
|
];
|
|
2648
2656
|
};
|
|
@@ -2685,18 +2693,18 @@ type Database = {
|
|
|
2685
2693
|
};
|
|
2686
2694
|
Relationships: [
|
|
2687
2695
|
{
|
|
2688
|
-
foreignKeyName:
|
|
2689
|
-
columns: [
|
|
2696
|
+
foreignKeyName: "org_memberships_organization_id_fkey";
|
|
2697
|
+
columns: ["organization_id"];
|
|
2690
2698
|
isOneToOne: false;
|
|
2691
|
-
referencedRelation:
|
|
2692
|
-
referencedColumns: [
|
|
2699
|
+
referencedRelation: "organizations";
|
|
2700
|
+
referencedColumns: ["id"];
|
|
2693
2701
|
},
|
|
2694
2702
|
{
|
|
2695
|
-
foreignKeyName:
|
|
2696
|
-
columns: [
|
|
2703
|
+
foreignKeyName: "org_memberships_user_id_fkey";
|
|
2704
|
+
columns: ["user_id"];
|
|
2697
2705
|
isOneToOne: false;
|
|
2698
|
-
referencedRelation:
|
|
2699
|
-
referencedColumns: [
|
|
2706
|
+
referencedRelation: "users";
|
|
2707
|
+
referencedColumns: ["id"];
|
|
2700
2708
|
}
|
|
2701
2709
|
];
|
|
2702
2710
|
};
|
|
@@ -2721,25 +2729,25 @@ type Database = {
|
|
|
2721
2729
|
};
|
|
2722
2730
|
Relationships: [
|
|
2723
2731
|
{
|
|
2724
|
-
foreignKeyName:
|
|
2725
|
-
columns: [
|
|
2732
|
+
foreignKeyName: "org_rol_assignments_granted_by_fkey";
|
|
2733
|
+
columns: ["granted_by"];
|
|
2726
2734
|
isOneToOne: false;
|
|
2727
|
-
referencedRelation:
|
|
2728
|
-
referencedColumns: [
|
|
2735
|
+
referencedRelation: "users";
|
|
2736
|
+
referencedColumns: ["id"];
|
|
2729
2737
|
},
|
|
2730
2738
|
{
|
|
2731
|
-
foreignKeyName:
|
|
2732
|
-
columns: [
|
|
2739
|
+
foreignKeyName: "org_rol_assignments_membership_id_fkey";
|
|
2740
|
+
columns: ["membership_id"];
|
|
2733
2741
|
isOneToOne: false;
|
|
2734
|
-
referencedRelation:
|
|
2735
|
-
referencedColumns: [
|
|
2742
|
+
referencedRelation: "org_memberships";
|
|
2743
|
+
referencedColumns: ["id"];
|
|
2736
2744
|
},
|
|
2737
2745
|
{
|
|
2738
|
-
foreignKeyName:
|
|
2739
|
-
columns: [
|
|
2746
|
+
foreignKeyName: "org_rol_assignments_role_id_fkey";
|
|
2747
|
+
columns: ["role_id"];
|
|
2740
2748
|
isOneToOne: false;
|
|
2741
|
-
referencedRelation:
|
|
2742
|
-
referencedColumns: [
|
|
2749
|
+
referencedRelation: "org_rol_definitions";
|
|
2750
|
+
referencedColumns: ["id"];
|
|
2743
2751
|
}
|
|
2744
2752
|
];
|
|
2745
2753
|
};
|
|
@@ -2776,11 +2784,11 @@ type Database = {
|
|
|
2776
2784
|
};
|
|
2777
2785
|
Relationships: [
|
|
2778
2786
|
{
|
|
2779
|
-
foreignKeyName:
|
|
2780
|
-
columns: [
|
|
2787
|
+
foreignKeyName: "org_rol_definitions_organization_id_fkey";
|
|
2788
|
+
columns: ["organization_id"];
|
|
2781
2789
|
isOneToOne: false;
|
|
2782
|
-
referencedRelation:
|
|
2783
|
-
referencedColumns: [
|
|
2790
|
+
referencedRelation: "organizations";
|
|
2791
|
+
referencedColumns: ["id"];
|
|
2784
2792
|
}
|
|
2785
2793
|
];
|
|
2786
2794
|
};
|
|
@@ -2802,18 +2810,18 @@ type Database = {
|
|
|
2802
2810
|
};
|
|
2803
2811
|
Relationships: [
|
|
2804
2812
|
{
|
|
2805
|
-
foreignKeyName:
|
|
2806
|
-
columns: [
|
|
2813
|
+
foreignKeyName: "org_rol_grants_permission_key_fkey";
|
|
2814
|
+
columns: ["permission_key"];
|
|
2807
2815
|
isOneToOne: false;
|
|
2808
|
-
referencedRelation:
|
|
2809
|
-
referencedColumns: [
|
|
2816
|
+
referencedRelation: "org_rol_permissions";
|
|
2817
|
+
referencedColumns: ["key"];
|
|
2810
2818
|
},
|
|
2811
2819
|
{
|
|
2812
|
-
foreignKeyName:
|
|
2813
|
-
columns: [
|
|
2820
|
+
foreignKeyName: "org_rol_grants_role_id_fkey";
|
|
2821
|
+
columns: ["role_id"];
|
|
2814
2822
|
isOneToOne: false;
|
|
2815
|
-
referencedRelation:
|
|
2816
|
-
referencedColumns: [
|
|
2823
|
+
referencedRelation: "org_rol_definitions";
|
|
2824
|
+
referencedColumns: ["id"];
|
|
2817
2825
|
}
|
|
2818
2826
|
];
|
|
2819
2827
|
};
|
|
@@ -2925,25 +2933,25 @@ type Database = {
|
|
|
2925
2933
|
};
|
|
2926
2934
|
Relationships: [
|
|
2927
2935
|
{
|
|
2928
|
-
foreignKeyName:
|
|
2929
|
-
columns: [
|
|
2936
|
+
foreignKeyName: "fk_milestones_project";
|
|
2937
|
+
columns: ["project_id"];
|
|
2930
2938
|
isOneToOne: false;
|
|
2931
|
-
referencedRelation:
|
|
2932
|
-
referencedColumns: [
|
|
2939
|
+
referencedRelation: "prj_projects";
|
|
2940
|
+
referencedColumns: ["id"];
|
|
2933
2941
|
},
|
|
2934
2942
|
{
|
|
2935
|
-
foreignKeyName:
|
|
2936
|
-
columns: [
|
|
2943
|
+
foreignKeyName: "prj_milestones_organization_id_fkey";
|
|
2944
|
+
columns: ["organization_id"];
|
|
2937
2945
|
isOneToOne: false;
|
|
2938
|
-
referencedRelation:
|
|
2939
|
-
referencedColumns: [
|
|
2946
|
+
referencedRelation: "organizations";
|
|
2947
|
+
referencedColumns: ["id"];
|
|
2940
2948
|
},
|
|
2941
2949
|
{
|
|
2942
|
-
foreignKeyName:
|
|
2943
|
-
columns: [
|
|
2950
|
+
foreignKeyName: "prj_milestones_project_id_fkey";
|
|
2951
|
+
columns: ["project_id"];
|
|
2944
2952
|
isOneToOne: false;
|
|
2945
|
-
referencedRelation:
|
|
2946
|
-
referencedColumns: [
|
|
2953
|
+
referencedRelation: "prj_projects";
|
|
2954
|
+
referencedColumns: ["id"];
|
|
2947
2955
|
}
|
|
2948
2956
|
];
|
|
2949
2957
|
};
|
|
@@ -2992,67 +3000,67 @@ type Database = {
|
|
|
2992
3000
|
};
|
|
2993
3001
|
Relationships: [
|
|
2994
3002
|
{
|
|
2995
|
-
foreignKeyName:
|
|
2996
|
-
columns: [
|
|
3003
|
+
foreignKeyName: "fk_notes_created_by";
|
|
3004
|
+
columns: ["created_by"];
|
|
2997
3005
|
isOneToOne: false;
|
|
2998
|
-
referencedRelation:
|
|
2999
|
-
referencedColumns: [
|
|
3006
|
+
referencedRelation: "users";
|
|
3007
|
+
referencedColumns: ["id"];
|
|
3000
3008
|
},
|
|
3001
3009
|
{
|
|
3002
|
-
foreignKeyName:
|
|
3003
|
-
columns: [
|
|
3010
|
+
foreignKeyName: "fk_notes_milestone";
|
|
3011
|
+
columns: ["milestone_id"];
|
|
3004
3012
|
isOneToOne: false;
|
|
3005
|
-
referencedRelation:
|
|
3006
|
-
referencedColumns: [
|
|
3013
|
+
referencedRelation: "prj_milestones";
|
|
3014
|
+
referencedColumns: ["id"];
|
|
3007
3015
|
},
|
|
3008
3016
|
{
|
|
3009
|
-
foreignKeyName:
|
|
3010
|
-
columns: [
|
|
3017
|
+
foreignKeyName: "fk_notes_project";
|
|
3018
|
+
columns: ["project_id"];
|
|
3011
3019
|
isOneToOne: false;
|
|
3012
|
-
referencedRelation:
|
|
3013
|
-
referencedColumns: [
|
|
3020
|
+
referencedRelation: "prj_projects";
|
|
3021
|
+
referencedColumns: ["id"];
|
|
3014
3022
|
},
|
|
3015
3023
|
{
|
|
3016
|
-
foreignKeyName:
|
|
3017
|
-
columns: [
|
|
3024
|
+
foreignKeyName: "fk_notes_task";
|
|
3025
|
+
columns: ["task_id"];
|
|
3018
3026
|
isOneToOne: false;
|
|
3019
|
-
referencedRelation:
|
|
3020
|
-
referencedColumns: [
|
|
3027
|
+
referencedRelation: "prj_tasks";
|
|
3028
|
+
referencedColumns: ["id"];
|
|
3021
3029
|
},
|
|
3022
3030
|
{
|
|
3023
|
-
foreignKeyName:
|
|
3024
|
-
columns: [
|
|
3031
|
+
foreignKeyName: "prj_notes_created_by_fkey";
|
|
3032
|
+
columns: ["created_by"];
|
|
3025
3033
|
isOneToOne: false;
|
|
3026
|
-
referencedRelation:
|
|
3027
|
-
referencedColumns: [
|
|
3034
|
+
referencedRelation: "users";
|
|
3035
|
+
referencedColumns: ["id"];
|
|
3028
3036
|
},
|
|
3029
3037
|
{
|
|
3030
|
-
foreignKeyName:
|
|
3031
|
-
columns: [
|
|
3038
|
+
foreignKeyName: "prj_notes_milestone_id_fkey";
|
|
3039
|
+
columns: ["milestone_id"];
|
|
3032
3040
|
isOneToOne: false;
|
|
3033
|
-
referencedRelation:
|
|
3034
|
-
referencedColumns: [
|
|
3041
|
+
referencedRelation: "prj_milestones";
|
|
3042
|
+
referencedColumns: ["id"];
|
|
3035
3043
|
},
|
|
3036
3044
|
{
|
|
3037
|
-
foreignKeyName:
|
|
3038
|
-
columns: [
|
|
3045
|
+
foreignKeyName: "prj_notes_organization_id_fkey";
|
|
3046
|
+
columns: ["organization_id"];
|
|
3039
3047
|
isOneToOne: false;
|
|
3040
|
-
referencedRelation:
|
|
3041
|
-
referencedColumns: [
|
|
3048
|
+
referencedRelation: "organizations";
|
|
3049
|
+
referencedColumns: ["id"];
|
|
3042
3050
|
},
|
|
3043
3051
|
{
|
|
3044
|
-
foreignKeyName:
|
|
3045
|
-
columns: [
|
|
3052
|
+
foreignKeyName: "prj_notes_project_id_fkey";
|
|
3053
|
+
columns: ["project_id"];
|
|
3046
3054
|
isOneToOne: false;
|
|
3047
|
-
referencedRelation:
|
|
3048
|
-
referencedColumns: [
|
|
3055
|
+
referencedRelation: "prj_projects";
|
|
3056
|
+
referencedColumns: ["id"];
|
|
3049
3057
|
},
|
|
3050
3058
|
{
|
|
3051
|
-
foreignKeyName:
|
|
3052
|
-
columns: [
|
|
3059
|
+
foreignKeyName: "prj_notes_task_id_fkey";
|
|
3060
|
+
columns: ["task_id"];
|
|
3053
3061
|
isOneToOne: false;
|
|
3054
|
-
referencedRelation:
|
|
3055
|
-
referencedColumns: [
|
|
3062
|
+
referencedRelation: "prj_tasks";
|
|
3063
|
+
referencedColumns: ["id"];
|
|
3056
3064
|
}
|
|
3057
3065
|
];
|
|
3058
3066
|
};
|
|
@@ -3110,39 +3118,39 @@ type Database = {
|
|
|
3110
3118
|
};
|
|
3111
3119
|
Relationships: [
|
|
3112
3120
|
{
|
|
3113
|
-
foreignKeyName:
|
|
3114
|
-
columns: [
|
|
3121
|
+
foreignKeyName: "fk_projects_company";
|
|
3122
|
+
columns: ["client_company_id"];
|
|
3115
3123
|
isOneToOne: false;
|
|
3116
|
-
referencedRelation:
|
|
3117
|
-
referencedColumns: [
|
|
3124
|
+
referencedRelation: "acq_companies";
|
|
3125
|
+
referencedColumns: ["id"];
|
|
3118
3126
|
},
|
|
3119
3127
|
{
|
|
3120
|
-
foreignKeyName:
|
|
3121
|
-
columns: [
|
|
3128
|
+
foreignKeyName: "fk_projects_deal";
|
|
3129
|
+
columns: ["deal_id"];
|
|
3122
3130
|
isOneToOne: false;
|
|
3123
|
-
referencedRelation:
|
|
3124
|
-
referencedColumns: [
|
|
3131
|
+
referencedRelation: "acq_deals";
|
|
3132
|
+
referencedColumns: ["id"];
|
|
3125
3133
|
},
|
|
3126
3134
|
{
|
|
3127
|
-
foreignKeyName:
|
|
3128
|
-
columns: [
|
|
3135
|
+
foreignKeyName: "prj_projects_client_company_id_fkey";
|
|
3136
|
+
columns: ["client_company_id"];
|
|
3129
3137
|
isOneToOne: false;
|
|
3130
|
-
referencedRelation:
|
|
3131
|
-
referencedColumns: [
|
|
3138
|
+
referencedRelation: "acq_companies";
|
|
3139
|
+
referencedColumns: ["id"];
|
|
3132
3140
|
},
|
|
3133
3141
|
{
|
|
3134
|
-
foreignKeyName:
|
|
3135
|
-
columns: [
|
|
3142
|
+
foreignKeyName: "prj_projects_deal_id_fkey";
|
|
3143
|
+
columns: ["deal_id"];
|
|
3136
3144
|
isOneToOne: false;
|
|
3137
|
-
referencedRelation:
|
|
3138
|
-
referencedColumns: [
|
|
3145
|
+
referencedRelation: "acq_deals";
|
|
3146
|
+
referencedColumns: ["id"];
|
|
3139
3147
|
},
|
|
3140
3148
|
{
|
|
3141
|
-
foreignKeyName:
|
|
3142
|
-
columns: [
|
|
3149
|
+
foreignKeyName: "prj_projects_organization_id_fkey";
|
|
3150
|
+
columns: ["organization_id"];
|
|
3143
3151
|
isOneToOne: false;
|
|
3144
|
-
referencedRelation:
|
|
3145
|
-
referencedColumns: [
|
|
3152
|
+
referencedRelation: "organizations";
|
|
3153
|
+
referencedColumns: ["id"];
|
|
3146
3154
|
}
|
|
3147
3155
|
];
|
|
3148
3156
|
};
|
|
@@ -3206,53 +3214,53 @@ type Database = {
|
|
|
3206
3214
|
};
|
|
3207
3215
|
Relationships: [
|
|
3208
3216
|
{
|
|
3209
|
-
foreignKeyName:
|
|
3210
|
-
columns: [
|
|
3217
|
+
foreignKeyName: "fk_tasks_milestone";
|
|
3218
|
+
columns: ["milestone_id"];
|
|
3211
3219
|
isOneToOne: false;
|
|
3212
|
-
referencedRelation:
|
|
3213
|
-
referencedColumns: [
|
|
3220
|
+
referencedRelation: "prj_milestones";
|
|
3221
|
+
referencedColumns: ["id"];
|
|
3214
3222
|
},
|
|
3215
3223
|
{
|
|
3216
|
-
foreignKeyName:
|
|
3217
|
-
columns: [
|
|
3224
|
+
foreignKeyName: "fk_tasks_parent";
|
|
3225
|
+
columns: ["parent_task_id"];
|
|
3218
3226
|
isOneToOne: false;
|
|
3219
|
-
referencedRelation:
|
|
3220
|
-
referencedColumns: [
|
|
3227
|
+
referencedRelation: "prj_tasks";
|
|
3228
|
+
referencedColumns: ["id"];
|
|
3221
3229
|
},
|
|
3222
3230
|
{
|
|
3223
|
-
foreignKeyName:
|
|
3224
|
-
columns: [
|
|
3231
|
+
foreignKeyName: "fk_tasks_project";
|
|
3232
|
+
columns: ["project_id"];
|
|
3225
3233
|
isOneToOne: false;
|
|
3226
|
-
referencedRelation:
|
|
3227
|
-
referencedColumns: [
|
|
3234
|
+
referencedRelation: "prj_projects";
|
|
3235
|
+
referencedColumns: ["id"];
|
|
3228
3236
|
},
|
|
3229
3237
|
{
|
|
3230
|
-
foreignKeyName:
|
|
3231
|
-
columns: [
|
|
3238
|
+
foreignKeyName: "prj_tasks_milestone_id_fkey";
|
|
3239
|
+
columns: ["milestone_id"];
|
|
3232
3240
|
isOneToOne: false;
|
|
3233
|
-
referencedRelation:
|
|
3234
|
-
referencedColumns: [
|
|
3241
|
+
referencedRelation: "prj_milestones";
|
|
3242
|
+
referencedColumns: ["id"];
|
|
3235
3243
|
},
|
|
3236
3244
|
{
|
|
3237
|
-
foreignKeyName:
|
|
3238
|
-
columns: [
|
|
3245
|
+
foreignKeyName: "prj_tasks_organization_id_fkey";
|
|
3246
|
+
columns: ["organization_id"];
|
|
3239
3247
|
isOneToOne: false;
|
|
3240
|
-
referencedRelation:
|
|
3241
|
-
referencedColumns: [
|
|
3248
|
+
referencedRelation: "organizations";
|
|
3249
|
+
referencedColumns: ["id"];
|
|
3242
3250
|
},
|
|
3243
3251
|
{
|
|
3244
|
-
foreignKeyName:
|
|
3245
|
-
columns: [
|
|
3252
|
+
foreignKeyName: "prj_tasks_parent_task_id_fkey";
|
|
3253
|
+
columns: ["parent_task_id"];
|
|
3246
3254
|
isOneToOne: false;
|
|
3247
|
-
referencedRelation:
|
|
3248
|
-
referencedColumns: [
|
|
3255
|
+
referencedRelation: "prj_tasks";
|
|
3256
|
+
referencedColumns: ["id"];
|
|
3249
3257
|
},
|
|
3250
3258
|
{
|
|
3251
|
-
foreignKeyName:
|
|
3252
|
-
columns: [
|
|
3259
|
+
foreignKeyName: "prj_tasks_project_id_fkey";
|
|
3260
|
+
columns: ["project_id"];
|
|
3253
3261
|
isOneToOne: false;
|
|
3254
|
-
referencedRelation:
|
|
3255
|
-
referencedColumns: [
|
|
3262
|
+
referencedRelation: "prj_projects";
|
|
3263
|
+
referencedColumns: ["id"];
|
|
3256
3264
|
}
|
|
3257
3265
|
];
|
|
3258
3266
|
};
|
|
@@ -3322,25 +3330,25 @@ type Database = {
|
|
|
3322
3330
|
};
|
|
3323
3331
|
Relationships: [
|
|
3324
3332
|
{
|
|
3325
|
-
foreignKeyName:
|
|
3326
|
-
columns: [
|
|
3333
|
+
foreignKeyName: "reported_requests_organization_id_fkey";
|
|
3334
|
+
columns: ["organization_id"];
|
|
3327
3335
|
isOneToOne: false;
|
|
3328
|
-
referencedRelation:
|
|
3329
|
-
referencedColumns: [
|
|
3336
|
+
referencedRelation: "organizations";
|
|
3337
|
+
referencedColumns: ["id"];
|
|
3330
3338
|
},
|
|
3331
3339
|
{
|
|
3332
|
-
foreignKeyName:
|
|
3333
|
-
columns: [
|
|
3340
|
+
foreignKeyName: "reported_requests_project_id_fkey";
|
|
3341
|
+
columns: ["project_id"];
|
|
3334
3342
|
isOneToOne: false;
|
|
3335
|
-
referencedRelation:
|
|
3336
|
-
referencedColumns: [
|
|
3343
|
+
referencedRelation: "prj_projects";
|
|
3344
|
+
referencedColumns: ["id"];
|
|
3337
3345
|
},
|
|
3338
3346
|
{
|
|
3339
|
-
foreignKeyName:
|
|
3340
|
-
columns: [
|
|
3347
|
+
foreignKeyName: "reported_requests_task_id_fkey";
|
|
3348
|
+
columns: ["task_id"];
|
|
3341
3349
|
isOneToOne: false;
|
|
3342
|
-
referencedRelation:
|
|
3343
|
-
referencedColumns: [
|
|
3350
|
+
referencedRelation: "prj_tasks";
|
|
3351
|
+
referencedColumns: ["id"];
|
|
3344
3352
|
}
|
|
3345
3353
|
];
|
|
3346
3354
|
};
|
|
@@ -3380,11 +3388,11 @@ type Database = {
|
|
|
3380
3388
|
};
|
|
3381
3389
|
Relationships: [
|
|
3382
3390
|
{
|
|
3383
|
-
foreignKeyName:
|
|
3384
|
-
columns: [
|
|
3391
|
+
foreignKeyName: "session_messages_session_id_fkey";
|
|
3392
|
+
columns: ["session_id"];
|
|
3385
3393
|
isOneToOne: false;
|
|
3386
|
-
referencedRelation:
|
|
3387
|
-
referencedColumns: [
|
|
3394
|
+
referencedRelation: "sessions";
|
|
3395
|
+
referencedColumns: ["session_id"];
|
|
3388
3396
|
}
|
|
3389
3397
|
];
|
|
3390
3398
|
};
|
|
@@ -3439,18 +3447,18 @@ type Database = {
|
|
|
3439
3447
|
};
|
|
3440
3448
|
Relationships: [
|
|
3441
3449
|
{
|
|
3442
|
-
foreignKeyName:
|
|
3443
|
-
columns: [
|
|
3450
|
+
foreignKeyName: "fk_organization";
|
|
3451
|
+
columns: ["organization_id"];
|
|
3444
3452
|
isOneToOne: false;
|
|
3445
|
-
referencedRelation:
|
|
3446
|
-
referencedColumns: [
|
|
3453
|
+
referencedRelation: "organizations";
|
|
3454
|
+
referencedColumns: ["id"];
|
|
3447
3455
|
},
|
|
3448
3456
|
{
|
|
3449
|
-
foreignKeyName:
|
|
3450
|
-
columns: [
|
|
3457
|
+
foreignKeyName: "fk_user";
|
|
3458
|
+
columns: ["user_id"];
|
|
3451
3459
|
isOneToOne: false;
|
|
3452
|
-
referencedRelation:
|
|
3453
|
-
referencedColumns: [
|
|
3460
|
+
referencedRelation: "users";
|
|
3461
|
+
referencedColumns: ["id"];
|
|
3454
3462
|
}
|
|
3455
3463
|
];
|
|
3456
3464
|
};
|
|
@@ -3526,11 +3534,11 @@ type Database = {
|
|
|
3526
3534
|
};
|
|
3527
3535
|
Relationships: [
|
|
3528
3536
|
{
|
|
3529
|
-
foreignKeyName:
|
|
3530
|
-
columns: [
|
|
3537
|
+
foreignKeyName: "task_schedules_organization_id_fkey";
|
|
3538
|
+
columns: ["organization_id"];
|
|
3531
3539
|
isOneToOne: false;
|
|
3532
|
-
referencedRelation:
|
|
3533
|
-
referencedColumns: [
|
|
3540
|
+
referencedRelation: "organizations";
|
|
3541
|
+
referencedColumns: ["id"];
|
|
3534
3542
|
}
|
|
3535
3543
|
];
|
|
3536
3544
|
};
|
|
@@ -3585,11 +3593,11 @@ type Database = {
|
|
|
3585
3593
|
};
|
|
3586
3594
|
Relationships: [
|
|
3587
3595
|
{
|
|
3588
|
-
foreignKeyName:
|
|
3589
|
-
columns: [
|
|
3596
|
+
foreignKeyName: "user_profiles_last_visited_org_fkey";
|
|
3597
|
+
columns: ["last_visited_org"];
|
|
3590
3598
|
isOneToOne: false;
|
|
3591
|
-
referencedRelation:
|
|
3592
|
-
referencedColumns: [
|
|
3599
|
+
referencedRelation: "organizations";
|
|
3600
|
+
referencedColumns: ["id"];
|
|
3593
3601
|
}
|
|
3594
3602
|
];
|
|
3595
3603
|
};
|
|
@@ -3638,11 +3646,11 @@ type Database = {
|
|
|
3638
3646
|
};
|
|
3639
3647
|
Relationships: [
|
|
3640
3648
|
{
|
|
3641
|
-
foreignKeyName:
|
|
3642
|
-
columns: [
|
|
3649
|
+
foreignKeyName: "webhook_endpoints_organization_id_fkey";
|
|
3650
|
+
columns: ["organization_id"];
|
|
3643
3651
|
isOneToOne: false;
|
|
3644
|
-
referencedRelation:
|
|
3645
|
-
referencedColumns: [
|
|
3652
|
+
referencedRelation: "organizations";
|
|
3653
|
+
referencedColumns: ["id"];
|
|
3646
3654
|
}
|
|
3647
3655
|
];
|
|
3648
3656
|
};
|
|
@@ -3791,272 +3799,6 @@ type Database = {
|
|
|
3791
3799
|
};
|
|
3792
3800
|
};
|
|
3793
3801
|
|
|
3794
|
-
/** Raw database row type for acq_deals table */
|
|
3795
|
-
type AcqDealRow = Database['public']['Tables']['acq_deals']['Row'];
|
|
3796
|
-
/**
|
|
3797
|
-
* Tracks pipeline status for a company across all processing stages.
|
|
3798
|
-
*/
|
|
3799
|
-
interface CompanyPipelineStatus {
|
|
3800
|
-
acquired: boolean;
|
|
3801
|
-
enrichment: {
|
|
3802
|
-
[source: string]: {
|
|
3803
|
-
status: 'pending' | 'complete' | 'failed' | 'skipped';
|
|
3804
|
-
completedAt?: string;
|
|
3805
|
-
error?: string;
|
|
3806
|
-
};
|
|
3807
|
-
};
|
|
3808
|
-
}
|
|
3809
|
-
/**
|
|
3810
|
-
* Tracks pipeline status for a contact across all processing stages.
|
|
3811
|
-
*/
|
|
3812
|
-
interface ContactPipelineStatus {
|
|
3813
|
-
enrichment: {
|
|
3814
|
-
[source: string]: {
|
|
3815
|
-
status: 'pending' | 'complete' | 'failed' | 'skipped';
|
|
3816
|
-
completedAt?: string;
|
|
3817
|
-
error?: string;
|
|
3818
|
-
};
|
|
3819
|
-
};
|
|
3820
|
-
personalization: {
|
|
3821
|
-
status: 'pending' | 'complete' | 'failed' | 'skipped';
|
|
3822
|
-
completedAt?: string;
|
|
3823
|
-
};
|
|
3824
|
-
outreach: {
|
|
3825
|
-
status: 'pending' | 'sent' | 'replied' | 'bounced' | 'opted-out';
|
|
3826
|
-
sentAt?: string;
|
|
3827
|
-
channel?: string;
|
|
3828
|
-
campaignId?: string;
|
|
3829
|
-
};
|
|
3830
|
-
}
|
|
3831
|
-
/**
|
|
3832
|
-
* Enrichment data collected for a company from various sources.
|
|
3833
|
-
*/
|
|
3834
|
-
interface CompanyEnrichmentData {
|
|
3835
|
-
googleMaps?: {
|
|
3836
|
-
placeId?: string;
|
|
3837
|
-
totalScore?: number;
|
|
3838
|
-
reviewsCount?: number;
|
|
3839
|
-
address?: string;
|
|
3840
|
-
phone?: string;
|
|
3841
|
-
categoryName?: string;
|
|
3842
|
-
googleMapsUrl?: string;
|
|
3843
|
-
scrapedAt?: string;
|
|
3844
|
-
};
|
|
3845
|
-
websiteCrawl?: {
|
|
3846
|
-
companyDescription?: string;
|
|
3847
|
-
services?: string[];
|
|
3848
|
-
specialties?: string[];
|
|
3849
|
-
staff?: Array<{
|
|
3850
|
-
name: string;
|
|
3851
|
-
title?: string;
|
|
3852
|
-
email?: string;
|
|
3853
|
-
}>;
|
|
3854
|
-
automationGaps?: string[];
|
|
3855
|
-
targetAudience?: string;
|
|
3856
|
-
category?: string;
|
|
3857
|
-
segment?: string;
|
|
3858
|
-
recentWin?: string;
|
|
3859
|
-
emailCount?: number;
|
|
3860
|
-
pageCount?: number;
|
|
3861
|
-
totalChars?: number;
|
|
3862
|
-
crawledAt?: string;
|
|
3863
|
-
extractedAt?: string;
|
|
3864
|
-
};
|
|
3865
|
-
website?: {
|
|
3866
|
-
missionVision?: string;
|
|
3867
|
-
uniqueAttributes?: string;
|
|
3868
|
-
coreOfferings?: string;
|
|
3869
|
-
targetAudience?: string;
|
|
3870
|
-
companyValues?: string;
|
|
3871
|
-
businessDescription?: string;
|
|
3872
|
-
recentPosts?: Array<{
|
|
3873
|
-
date?: string;
|
|
3874
|
-
title?: string;
|
|
3875
|
-
summary?: string;
|
|
3876
|
-
aiInsight?: string;
|
|
3877
|
-
}>;
|
|
3878
|
-
};
|
|
3879
|
-
tomba?: {
|
|
3880
|
-
waterfallEmail?: {
|
|
3881
|
-
email: string;
|
|
3882
|
-
name?: string;
|
|
3883
|
-
title?: string;
|
|
3884
|
-
department?: string;
|
|
3885
|
-
} | null;
|
|
3886
|
-
genericEmail?: string | null;
|
|
3887
|
-
totalFound?: number;
|
|
3888
|
-
searchedAt?: string;
|
|
3889
|
-
};
|
|
3890
|
-
}
|
|
3891
|
-
/**
|
|
3892
|
-
* Enrichment data collected for a contact from various sources.
|
|
3893
|
-
*/
|
|
3894
|
-
interface ContactEnrichmentData {
|
|
3895
|
-
linkedin?: {
|
|
3896
|
-
summary?: string;
|
|
3897
|
-
pastExperience?: string;
|
|
3898
|
-
education?: string;
|
|
3899
|
-
activity?: Array<{
|
|
3900
|
-
date?: string;
|
|
3901
|
-
content?: string;
|
|
3902
|
-
}>;
|
|
3903
|
-
};
|
|
3904
|
-
}
|
|
3905
|
-
type ListStatus = 'draft' | 'enriching' | 'launched' | 'closing' | 'archived';
|
|
3906
|
-
interface ScrapingConfig {
|
|
3907
|
-
source?: string;
|
|
3908
|
-
query?: string;
|
|
3909
|
-
filters?: Record<string, unknown>;
|
|
3910
|
-
[key: string]: unknown;
|
|
3911
|
-
}
|
|
3912
|
-
interface IcpRubric {
|
|
3913
|
-
targetDescription?: string;
|
|
3914
|
-
minReviewCount?: number;
|
|
3915
|
-
minRating?: number;
|
|
3916
|
-
excludeFranchises?: boolean;
|
|
3917
|
-
customRules?: string;
|
|
3918
|
-
qualificationRubricKey?: string | null;
|
|
3919
|
-
[key: string]: unknown;
|
|
3920
|
-
}
|
|
3921
|
-
interface PipelineStage {
|
|
3922
|
-
key: string;
|
|
3923
|
-
label?: string;
|
|
3924
|
-
description?: string;
|
|
3925
|
-
resourceId?: string;
|
|
3926
|
-
inputTemplate?: Record<string, unknown>;
|
|
3927
|
-
enabled?: boolean;
|
|
3928
|
-
order?: number;
|
|
3929
|
-
}
|
|
3930
|
-
interface PipelineConfig {
|
|
3931
|
-
stages: PipelineStage[];
|
|
3932
|
-
}
|
|
3933
|
-
interface AcqList {
|
|
3934
|
-
id: string;
|
|
3935
|
-
organizationId: string;
|
|
3936
|
-
name: string;
|
|
3937
|
-
description: string | null;
|
|
3938
|
-
batchIds: string[];
|
|
3939
|
-
instantlyCampaignId: string | null;
|
|
3940
|
-
status: ListStatus;
|
|
3941
|
-
scrapingConfig: ScrapingConfig;
|
|
3942
|
-
icp: IcpRubric;
|
|
3943
|
-
pipelineConfig: PipelineConfig;
|
|
3944
|
-
metadata: Record<string, unknown>;
|
|
3945
|
-
launchedAt: Date | null;
|
|
3946
|
-
completedAt: Date | null;
|
|
3947
|
-
createdAt: Date;
|
|
3948
|
-
}
|
|
3949
|
-
/**
|
|
3950
|
-
* Company record in the acquisition database.
|
|
3951
|
-
* Contains enriched company data from various sources.
|
|
3952
|
-
* Transformed from AcqCompanyRow with camelCase properties.
|
|
3953
|
-
*/
|
|
3954
|
-
interface AcqCompany {
|
|
3955
|
-
id: string;
|
|
3956
|
-
organizationId: string;
|
|
3957
|
-
name: string;
|
|
3958
|
-
domain: string | null;
|
|
3959
|
-
linkedinUrl: string | null;
|
|
3960
|
-
website: string | null;
|
|
3961
|
-
numEmployees: number | null;
|
|
3962
|
-
foundedYear: number | null;
|
|
3963
|
-
locationCity: string | null;
|
|
3964
|
-
locationState: string | null;
|
|
3965
|
-
category: string | null;
|
|
3966
|
-
categoryPain: string | null;
|
|
3967
|
-
segment: string | null;
|
|
3968
|
-
pipelineStatus: CompanyPipelineStatus | null;
|
|
3969
|
-
enrichmentData: CompanyEnrichmentData | null;
|
|
3970
|
-
source: string | null;
|
|
3971
|
-
batchId: string | null;
|
|
3972
|
-
status: 'active' | 'invalid';
|
|
3973
|
-
verticalResearch: string | null;
|
|
3974
|
-
/** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
|
|
3975
|
-
qualificationScore: number | null;
|
|
3976
|
-
/** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
|
|
3977
|
-
qualificationSignals: Record<string, unknown> | null;
|
|
3978
|
-
/** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
|
|
3979
|
-
qualificationRubricKey: string | null;
|
|
3980
|
-
createdAt: Date;
|
|
3981
|
-
updatedAt: Date;
|
|
3982
|
-
}
|
|
3983
|
-
/**
|
|
3984
|
-
* Contact record in the acquisition database.
|
|
3985
|
-
* Contains enriched contact data and personalization content.
|
|
3986
|
-
* Transformed from AcqContactRow with camelCase properties.
|
|
3987
|
-
*/
|
|
3988
|
-
interface AcqContact {
|
|
3989
|
-
id: string;
|
|
3990
|
-
organizationId: string;
|
|
3991
|
-
companyId: string | null;
|
|
3992
|
-
email: string;
|
|
3993
|
-
emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null;
|
|
3994
|
-
firstName: string | null;
|
|
3995
|
-
lastName: string | null;
|
|
3996
|
-
linkedinUrl: string | null;
|
|
3997
|
-
title: string | null;
|
|
3998
|
-
headline: string | null;
|
|
3999
|
-
filterReason: string | null;
|
|
4000
|
-
openingLine: string | null;
|
|
4001
|
-
source: string | null;
|
|
4002
|
-
sourceId: string | null;
|
|
4003
|
-
pipelineStatus: ContactPipelineStatus | null;
|
|
4004
|
-
enrichmentData: ContactEnrichmentData | null;
|
|
4005
|
-
/** Attio Person record ID - set when contact responds and is added to CRM */
|
|
4006
|
-
attioPersonId: string | null;
|
|
4007
|
-
batchId: string | null;
|
|
4008
|
-
status: 'active' | 'invalid';
|
|
4009
|
-
createdAt: Date;
|
|
4010
|
-
updatedAt: Date;
|
|
4011
|
-
}
|
|
4012
|
-
interface DealContact {
|
|
4013
|
-
id: string;
|
|
4014
|
-
first_name: string | null;
|
|
4015
|
-
last_name: string | null;
|
|
4016
|
-
email: string;
|
|
4017
|
-
title: string | null;
|
|
4018
|
-
headline: string | null;
|
|
4019
|
-
linkedin_url: string | null;
|
|
4020
|
-
pipeline_status: Record<string, unknown> | null;
|
|
4021
|
-
enrichment_data: Record<string, unknown> | null;
|
|
4022
|
-
company: {
|
|
4023
|
-
id: string;
|
|
4024
|
-
name: string;
|
|
4025
|
-
domain: string | null;
|
|
4026
|
-
website: string | null;
|
|
4027
|
-
linkedin_url: string | null;
|
|
4028
|
-
segment: string | null;
|
|
4029
|
-
category: string | null;
|
|
4030
|
-
num_employees: number | null;
|
|
4031
|
-
} | null;
|
|
4032
|
-
}
|
|
4033
|
-
/** Deal list item with joined contact and company data */
|
|
4034
|
-
interface DealListItem extends AcqDealRow {
|
|
4035
|
-
contact: DealContact | null;
|
|
4036
|
-
}
|
|
4037
|
-
type DealDetail = DealListItem;
|
|
4038
|
-
/** Task kind options for a deal task (human follow-up action type) */
|
|
4039
|
-
type AcqDealTaskKind = 'call' | 'email' | 'meeting' | 'other';
|
|
4040
|
-
/**
|
|
4041
|
-
* A CRM to-do item attached to a deal representing a human follow-up action.
|
|
4042
|
-
* Transformed from AcqDealTaskRow with camelCase properties.
|
|
4043
|
-
*/
|
|
4044
|
-
interface AcqDealTask {
|
|
4045
|
-
id: string;
|
|
4046
|
-
organizationId: string;
|
|
4047
|
-
dealId: string;
|
|
4048
|
-
title: string;
|
|
4049
|
-
description: string | null;
|
|
4050
|
-
kind: AcqDealTaskKind;
|
|
4051
|
-
dueAt: string | null;
|
|
4052
|
-
assigneeUserId: string | null;
|
|
4053
|
-
completedAt: string | null;
|
|
4054
|
-
completedByUserId: string | null;
|
|
4055
|
-
createdAt: string;
|
|
4056
|
-
updatedAt: string;
|
|
4057
|
-
createdByUserId: string | null;
|
|
4058
|
-
}
|
|
4059
|
-
|
|
4060
3802
|
declare const DealSchemas: {
|
|
4061
3803
|
DealIdParams: z.ZodObject<{
|
|
4062
3804
|
dealId: z.ZodString;
|
|
@@ -4125,6 +3867,21 @@ declare const DealSchemas: {
|
|
|
4125
3867
|
ExecuteActionRequest: z.ZodObject<{
|
|
4126
3868
|
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4127
3869
|
}, z.core.$strict>;
|
|
3870
|
+
DealPriority: z.ZodObject<{
|
|
3871
|
+
bucketKey: z.ZodEnum<{
|
|
3872
|
+
needs_response: "needs_response";
|
|
3873
|
+
follow_up_due: "follow_up_due";
|
|
3874
|
+
waiting: "waiting";
|
|
3875
|
+
stale: "stale";
|
|
3876
|
+
closed_low: "closed_low";
|
|
3877
|
+
}>;
|
|
3878
|
+
rank: z.ZodNumber;
|
|
3879
|
+
label: z.ZodString;
|
|
3880
|
+
color: z.ZodString;
|
|
3881
|
+
reason: z.ZodString;
|
|
3882
|
+
latestActivityAt: z.ZodNullable<z.ZodString>;
|
|
3883
|
+
nextActionAt: z.ZodNullable<z.ZodString>;
|
|
3884
|
+
}, z.core.$strip>;
|
|
4128
3885
|
DealListResponse: z.ZodObject<{
|
|
4129
3886
|
data: z.ZodArray<z.ZodObject<{
|
|
4130
3887
|
id: z.ZodString;
|
|
@@ -4150,6 +3907,26 @@ declare const DealSchemas: {
|
|
|
4150
3907
|
closed_lost_reason: z.ZodNullable<z.ZodString>;
|
|
4151
3908
|
created_at: z.ZodString;
|
|
4152
3909
|
updated_at: z.ZodString;
|
|
3910
|
+
priority: z.ZodObject<{
|
|
3911
|
+
bucketKey: z.ZodEnum<{
|
|
3912
|
+
needs_response: "needs_response";
|
|
3913
|
+
follow_up_due: "follow_up_due";
|
|
3914
|
+
waiting: "waiting";
|
|
3915
|
+
stale: "stale";
|
|
3916
|
+
closed_low: "closed_low";
|
|
3917
|
+
}>;
|
|
3918
|
+
rank: z.ZodNumber;
|
|
3919
|
+
label: z.ZodString;
|
|
3920
|
+
color: z.ZodString;
|
|
3921
|
+
reason: z.ZodString;
|
|
3922
|
+
latestActivityAt: z.ZodNullable<z.ZodString>;
|
|
3923
|
+
nextActionAt: z.ZodNullable<z.ZodString>;
|
|
3924
|
+
}, z.core.$strip>;
|
|
3925
|
+
ownership: z.ZodNullable<z.ZodEnum<{
|
|
3926
|
+
us: "us";
|
|
3927
|
+
them: "them";
|
|
3928
|
+
}>>;
|
|
3929
|
+
nextAction: z.ZodNullable<z.ZodString>;
|
|
4153
3930
|
contact: z.ZodNullable<z.ZodObject<{
|
|
4154
3931
|
id: z.ZodString;
|
|
4155
3932
|
first_name: z.ZodNullable<z.ZodString>;
|
|
@@ -4208,6 +3985,18 @@ declare const DealSchemas: {
|
|
|
4208
3985
|
companyName: z.ZodNullable<z.ZodString>;
|
|
4209
3986
|
displayLabel: z.ZodString;
|
|
4210
3987
|
}, z.core.$strip>>;
|
|
3988
|
+
ConversationMessage: z.ZodObject<{
|
|
3989
|
+
id: z.ZodString;
|
|
3990
|
+
direction: z.ZodEnum<{
|
|
3991
|
+
inbound: "inbound";
|
|
3992
|
+
outbound: "outbound";
|
|
3993
|
+
}>;
|
|
3994
|
+
fromEmail: z.ZodString;
|
|
3995
|
+
toEmail: z.ZodString;
|
|
3996
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
3997
|
+
body: z.ZodString;
|
|
3998
|
+
sentAt: z.ZodNullable<z.ZodString>;
|
|
3999
|
+
}, z.core.$strip>;
|
|
4211
4000
|
DealDetailResponse: z.ZodObject<{
|
|
4212
4001
|
id: z.ZodString;
|
|
4213
4002
|
organization_id: z.ZodString;
|
|
@@ -4232,6 +4021,26 @@ declare const DealSchemas: {
|
|
|
4232
4021
|
closed_lost_reason: z.ZodNullable<z.ZodString>;
|
|
4233
4022
|
created_at: z.ZodString;
|
|
4234
4023
|
updated_at: z.ZodString;
|
|
4024
|
+
priority: z.ZodObject<{
|
|
4025
|
+
bucketKey: z.ZodEnum<{
|
|
4026
|
+
needs_response: "needs_response";
|
|
4027
|
+
follow_up_due: "follow_up_due";
|
|
4028
|
+
waiting: "waiting";
|
|
4029
|
+
stale: "stale";
|
|
4030
|
+
closed_low: "closed_low";
|
|
4031
|
+
}>;
|
|
4032
|
+
rank: z.ZodNumber;
|
|
4033
|
+
label: z.ZodString;
|
|
4034
|
+
color: z.ZodString;
|
|
4035
|
+
reason: z.ZodString;
|
|
4036
|
+
latestActivityAt: z.ZodNullable<z.ZodString>;
|
|
4037
|
+
nextActionAt: z.ZodNullable<z.ZodString>;
|
|
4038
|
+
}, z.core.$strip>;
|
|
4039
|
+
ownership: z.ZodNullable<z.ZodEnum<{
|
|
4040
|
+
us: "us";
|
|
4041
|
+
them: "them";
|
|
4042
|
+
}>>;
|
|
4043
|
+
nextAction: z.ZodNullable<z.ZodString>;
|
|
4235
4044
|
contact: z.ZodNullable<z.ZodObject<{
|
|
4236
4045
|
id: z.ZodString;
|
|
4237
4046
|
first_name: z.ZodNullable<z.ZodString>;
|
|
@@ -4253,6 +4062,20 @@ declare const DealSchemas: {
|
|
|
4253
4062
|
num_employees: z.ZodNullable<z.ZodNumber>;
|
|
4254
4063
|
}, z.core.$strip>>;
|
|
4255
4064
|
}, z.core.$strip>>;
|
|
4065
|
+
conversation: z.ZodObject<{
|
|
4066
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
4067
|
+
id: z.ZodString;
|
|
4068
|
+
direction: z.ZodEnum<{
|
|
4069
|
+
inbound: "inbound";
|
|
4070
|
+
outbound: "outbound";
|
|
4071
|
+
}>;
|
|
4072
|
+
fromEmail: z.ZodString;
|
|
4073
|
+
toEmail: z.ZodString;
|
|
4074
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
4075
|
+
body: z.ZodString;
|
|
4076
|
+
sentAt: z.ZodNullable<z.ZodString>;
|
|
4077
|
+
}, z.core.$strip>>;
|
|
4078
|
+
}, z.core.$strip>;
|
|
4256
4079
|
}, z.core.$strip>;
|
|
4257
4080
|
DealNoteResponse: z.ZodObject<{
|
|
4258
4081
|
id: z.ZodString;
|
|
@@ -4284,47 +4107,353 @@ declare const DealSchemas: {
|
|
|
4284
4107
|
call: "call";
|
|
4285
4108
|
meeting: "meeting";
|
|
4286
4109
|
}>;
|
|
4287
|
-
dueAt: z.ZodNullable<z.ZodString>;
|
|
4288
|
-
assigneeUserId: z.ZodNullable<z.ZodString>;
|
|
4289
|
-
completedAt: z.ZodNullable<z.ZodString>;
|
|
4290
|
-
completedByUserId: z.ZodNullable<z.ZodString>;
|
|
4291
|
-
createdAt: z.ZodString;
|
|
4292
|
-
updatedAt: z.ZodString;
|
|
4293
|
-
createdByUserId: z.ZodNullable<z.ZodString>;
|
|
4294
|
-
}, z.core.$strip>;
|
|
4295
|
-
DealTaskListResponse: z.ZodArray<z.ZodObject<{
|
|
4296
|
-
id: z.ZodString;
|
|
4297
|
-
organizationId: z.ZodString;
|
|
4298
|
-
dealId: z.ZodString;
|
|
4299
|
-
title: z.ZodString;
|
|
4300
|
-
description: z.ZodNullable<z.ZodString>;
|
|
4301
|
-
kind: z.ZodEnum<{
|
|
4302
|
-
other: "other";
|
|
4303
|
-
email: "email";
|
|
4304
|
-
call: "call";
|
|
4305
|
-
meeting: "meeting";
|
|
4110
|
+
dueAt: z.ZodNullable<z.ZodString>;
|
|
4111
|
+
assigneeUserId: z.ZodNullable<z.ZodString>;
|
|
4112
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
4113
|
+
completedByUserId: z.ZodNullable<z.ZodString>;
|
|
4114
|
+
createdAt: z.ZodString;
|
|
4115
|
+
updatedAt: z.ZodString;
|
|
4116
|
+
createdByUserId: z.ZodNullable<z.ZodString>;
|
|
4117
|
+
}, z.core.$strip>;
|
|
4118
|
+
DealTaskListResponse: z.ZodArray<z.ZodObject<{
|
|
4119
|
+
id: z.ZodString;
|
|
4120
|
+
organizationId: z.ZodString;
|
|
4121
|
+
dealId: z.ZodString;
|
|
4122
|
+
title: z.ZodString;
|
|
4123
|
+
description: z.ZodNullable<z.ZodString>;
|
|
4124
|
+
kind: z.ZodEnum<{
|
|
4125
|
+
other: "other";
|
|
4126
|
+
email: "email";
|
|
4127
|
+
call: "call";
|
|
4128
|
+
meeting: "meeting";
|
|
4129
|
+
}>;
|
|
4130
|
+
dueAt: z.ZodNullable<z.ZodString>;
|
|
4131
|
+
assigneeUserId: z.ZodNullable<z.ZodString>;
|
|
4132
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
4133
|
+
completedByUserId: z.ZodNullable<z.ZodString>;
|
|
4134
|
+
createdAt: z.ZodString;
|
|
4135
|
+
updatedAt: z.ZodString;
|
|
4136
|
+
createdByUserId: z.ZodNullable<z.ZodString>;
|
|
4137
|
+
}, z.core.$strip>>;
|
|
4138
|
+
};
|
|
4139
|
+
/**
|
|
4140
|
+
* One stage entry in a list's `pipeline_config.stages[]`. The `key` is
|
|
4141
|
+
* validated against `LEAD_GEN_STAGE_CATALOG` so list pipeline definitions
|
|
4142
|
+
* stay aligned with the org-os semantic layer.
|
|
4143
|
+
*/
|
|
4144
|
+
declare const PipelineStageSchema: z.ZodObject<{
|
|
4145
|
+
key: z.ZodString;
|
|
4146
|
+
label: z.ZodOptional<z.ZodString>;
|
|
4147
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
4148
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
4149
|
+
}, z.core.$strip>;
|
|
4150
|
+
/**
|
|
4151
|
+
* Terminal row-level status for one lead-gen processing stage.
|
|
4152
|
+
* Missing key still means not attempted; legacy boolean `true` is normalized
|
|
4153
|
+
* to `success` by the API reader during rollout.
|
|
4154
|
+
*/
|
|
4155
|
+
declare const ProcessingStageStatusSchema: z.ZodEnum<{
|
|
4156
|
+
error: "error";
|
|
4157
|
+
success: "success";
|
|
4158
|
+
no_result: "no_result";
|
|
4159
|
+
skipped: "skipped";
|
|
4160
|
+
}>;
|
|
4161
|
+
type PipelineStage = z.infer<typeof PipelineStageSchema>;
|
|
4162
|
+
type ProcessingStageStatus = z.infer<typeof ProcessingStageStatusSchema>;
|
|
4163
|
+
|
|
4164
|
+
/** Raw database row type for acq_deals table */
|
|
4165
|
+
type AcqDealRow = Database['public']['Tables']['acq_deals']['Row'];
|
|
4166
|
+
/**
|
|
4167
|
+
* Tracks pipeline status for a company across all processing stages.
|
|
4168
|
+
*/
|
|
4169
|
+
interface CompanyPipelineStatus {
|
|
4170
|
+
acquired: boolean;
|
|
4171
|
+
enrichment: {
|
|
4172
|
+
[source: string]: {
|
|
4173
|
+
status: 'pending' | 'complete' | 'failed' | 'skipped';
|
|
4174
|
+
completedAt?: string;
|
|
4175
|
+
error?: string;
|
|
4176
|
+
};
|
|
4177
|
+
};
|
|
4178
|
+
}
|
|
4179
|
+
/**
|
|
4180
|
+
* Tracks pipeline status for a contact across all processing stages.
|
|
4181
|
+
*/
|
|
4182
|
+
interface ContactPipelineStatus {
|
|
4183
|
+
enrichment: {
|
|
4184
|
+
[source: string]: {
|
|
4185
|
+
status: 'pending' | 'complete' | 'failed' | 'skipped';
|
|
4186
|
+
completedAt?: string;
|
|
4187
|
+
error?: string;
|
|
4188
|
+
};
|
|
4189
|
+
};
|
|
4190
|
+
personalization: {
|
|
4191
|
+
status: 'pending' | 'complete' | 'failed' | 'skipped';
|
|
4192
|
+
completedAt?: string;
|
|
4193
|
+
};
|
|
4194
|
+
outreach: {
|
|
4195
|
+
status: 'pending' | 'sent' | 'replied' | 'bounced' | 'opted-out';
|
|
4196
|
+
sentAt?: string;
|
|
4197
|
+
channel?: string;
|
|
4198
|
+
campaignId?: string;
|
|
4199
|
+
};
|
|
4200
|
+
}
|
|
4201
|
+
/**
|
|
4202
|
+
* Enrichment data collected for a company from various sources.
|
|
4203
|
+
*/
|
|
4204
|
+
interface CompanyEnrichmentData {
|
|
4205
|
+
googleMaps?: {
|
|
4206
|
+
placeId?: string;
|
|
4207
|
+
totalScore?: number;
|
|
4208
|
+
reviewsCount?: number;
|
|
4209
|
+
address?: string;
|
|
4210
|
+
phone?: string;
|
|
4211
|
+
categoryName?: string;
|
|
4212
|
+
googleMapsUrl?: string;
|
|
4213
|
+
scrapedAt?: string;
|
|
4214
|
+
};
|
|
4215
|
+
websiteCrawl?: {
|
|
4216
|
+
companyDescription?: string;
|
|
4217
|
+
services?: string[];
|
|
4218
|
+
specialties?: string[];
|
|
4219
|
+
staff?: Array<{
|
|
4220
|
+
name: string;
|
|
4221
|
+
title?: string;
|
|
4222
|
+
email?: string;
|
|
4223
|
+
}>;
|
|
4224
|
+
automationGaps?: string[];
|
|
4225
|
+
targetAudience?: string;
|
|
4226
|
+
category?: string;
|
|
4227
|
+
segment?: string;
|
|
4228
|
+
recentWin?: string;
|
|
4229
|
+
emailCount?: number;
|
|
4230
|
+
pageCount?: number;
|
|
4231
|
+
totalChars?: number;
|
|
4232
|
+
crawledAt?: string;
|
|
4233
|
+
extractedAt?: string;
|
|
4234
|
+
};
|
|
4235
|
+
website?: {
|
|
4236
|
+
missionVision?: string;
|
|
4237
|
+
uniqueAttributes?: string;
|
|
4238
|
+
coreOfferings?: string;
|
|
4239
|
+
targetAudience?: string;
|
|
4240
|
+
companyValues?: string;
|
|
4241
|
+
businessDescription?: string;
|
|
4242
|
+
recentPosts?: Array<{
|
|
4243
|
+
date?: string;
|
|
4244
|
+
title?: string;
|
|
4245
|
+
summary?: string;
|
|
4246
|
+
aiInsight?: string;
|
|
4306
4247
|
}>;
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4248
|
+
};
|
|
4249
|
+
tomba?: {
|
|
4250
|
+
waterfallEmail?: {
|
|
4251
|
+
email: string;
|
|
4252
|
+
name?: string;
|
|
4253
|
+
title?: string;
|
|
4254
|
+
department?: string;
|
|
4255
|
+
} | null;
|
|
4256
|
+
genericEmail?: string | null;
|
|
4257
|
+
totalFound?: number;
|
|
4258
|
+
searchedAt?: string;
|
|
4259
|
+
};
|
|
4260
|
+
}
|
|
4316
4261
|
/**
|
|
4317
|
-
*
|
|
4318
|
-
* Missing key still means not attempted; legacy boolean `true` is normalized
|
|
4319
|
-
* to `success` by the API reader during rollout.
|
|
4262
|
+
* Enrichment data collected for a contact from various sources.
|
|
4320
4263
|
*/
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4264
|
+
interface ContactEnrichmentData {
|
|
4265
|
+
linkedin?: {
|
|
4266
|
+
summary?: string;
|
|
4267
|
+
pastExperience?: string;
|
|
4268
|
+
education?: string;
|
|
4269
|
+
activity?: Array<{
|
|
4270
|
+
date?: string;
|
|
4271
|
+
content?: string;
|
|
4272
|
+
}>;
|
|
4273
|
+
};
|
|
4274
|
+
}
|
|
4275
|
+
type ListStatus = 'draft' | 'enriching' | 'launched' | 'closing' | 'archived';
|
|
4276
|
+
interface ScrapingConfig {
|
|
4277
|
+
source?: string;
|
|
4278
|
+
query?: string;
|
|
4279
|
+
filters?: Record<string, unknown>;
|
|
4280
|
+
[key: string]: unknown;
|
|
4281
|
+
}
|
|
4282
|
+
interface IcpRubric {
|
|
4283
|
+
targetDescription?: string;
|
|
4284
|
+
minReviewCount?: number;
|
|
4285
|
+
minRating?: number;
|
|
4286
|
+
excludeFranchises?: boolean;
|
|
4287
|
+
customRules?: string;
|
|
4288
|
+
qualificationRubricKey?: string | null;
|
|
4289
|
+
[key: string]: unknown;
|
|
4290
|
+
}
|
|
4291
|
+
interface PipelineConfig {
|
|
4292
|
+
stages: PipelineStage[];
|
|
4293
|
+
}
|
|
4294
|
+
type BuildPlanSnapshotPrimaryEntity = 'company' | 'contact';
|
|
4295
|
+
type BuildPlanSnapshotOutput = 'company' | 'contact' | 'export';
|
|
4296
|
+
type BuildPlanSnapshotDependencyMode = 'per-record-eligibility';
|
|
4297
|
+
interface BuildPlanSnapshotStep {
|
|
4298
|
+
id: string;
|
|
4299
|
+
label: string;
|
|
4300
|
+
description?: string;
|
|
4301
|
+
primaryEntity: BuildPlanSnapshotPrimaryEntity;
|
|
4302
|
+
outputs: BuildPlanSnapshotOutput[];
|
|
4303
|
+
stageKey: string;
|
|
4304
|
+
dependsOn?: string[];
|
|
4305
|
+
dependencyMode: BuildPlanSnapshotDependencyMode;
|
|
4306
|
+
capabilityKey: string;
|
|
4307
|
+
defaultBatchSize: number;
|
|
4308
|
+
maxBatchSize: number;
|
|
4309
|
+
}
|
|
4310
|
+
interface BuildPlanSnapshot {
|
|
4311
|
+
templateId: string;
|
|
4312
|
+
templateLabel: string;
|
|
4313
|
+
steps: BuildPlanSnapshotStep[];
|
|
4314
|
+
}
|
|
4315
|
+
interface AcqListMetadata extends Record<string, unknown> {
|
|
4316
|
+
buildPlanSnapshot?: BuildPlanSnapshot;
|
|
4317
|
+
}
|
|
4318
|
+
interface AcqList {
|
|
4319
|
+
id: string;
|
|
4320
|
+
organizationId: string;
|
|
4321
|
+
name: string;
|
|
4322
|
+
description: string | null;
|
|
4323
|
+
batchIds: string[];
|
|
4324
|
+
instantlyCampaignId: string | null;
|
|
4325
|
+
status: ListStatus;
|
|
4326
|
+
scrapingConfig: ScrapingConfig;
|
|
4327
|
+
icp: IcpRubric;
|
|
4328
|
+
pipelineConfig: PipelineConfig;
|
|
4329
|
+
metadata: AcqListMetadata;
|
|
4330
|
+
launchedAt: Date | null;
|
|
4331
|
+
completedAt: Date | null;
|
|
4332
|
+
createdAt: Date;
|
|
4333
|
+
}
|
|
4334
|
+
/**
|
|
4335
|
+
* Company record in the acquisition database.
|
|
4336
|
+
* Contains enriched company data from various sources.
|
|
4337
|
+
* Transformed from AcqCompanyRow with camelCase properties.
|
|
4338
|
+
*/
|
|
4339
|
+
interface AcqCompany {
|
|
4340
|
+
id: string;
|
|
4341
|
+
organizationId: string;
|
|
4342
|
+
name: string;
|
|
4343
|
+
domain: string | null;
|
|
4344
|
+
linkedinUrl: string | null;
|
|
4345
|
+
website: string | null;
|
|
4346
|
+
numEmployees: number | null;
|
|
4347
|
+
foundedYear: number | null;
|
|
4348
|
+
locationCity: string | null;
|
|
4349
|
+
locationState: string | null;
|
|
4350
|
+
category: string | null;
|
|
4351
|
+
categoryPain: string | null;
|
|
4352
|
+
segment: string | null;
|
|
4353
|
+
pipelineStatus: CompanyPipelineStatus | null;
|
|
4354
|
+
enrichmentData: CompanyEnrichmentData | null;
|
|
4355
|
+
source: string | null;
|
|
4356
|
+
batchId: string | null;
|
|
4357
|
+
status: 'active' | 'invalid';
|
|
4358
|
+
verticalResearch: string | null;
|
|
4359
|
+
/** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
|
|
4360
|
+
qualificationScore: number | null;
|
|
4361
|
+
/** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
|
|
4362
|
+
qualificationSignals: Record<string, unknown> | null;
|
|
4363
|
+
/** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
|
|
4364
|
+
qualificationRubricKey: string | null;
|
|
4365
|
+
createdAt: Date;
|
|
4366
|
+
updatedAt: Date;
|
|
4367
|
+
}
|
|
4368
|
+
/**
|
|
4369
|
+
* Contact record in the acquisition database.
|
|
4370
|
+
* Contains enriched contact data and personalization content.
|
|
4371
|
+
* Transformed from AcqContactRow with camelCase properties.
|
|
4372
|
+
*/
|
|
4373
|
+
interface AcqContact {
|
|
4374
|
+
id: string;
|
|
4375
|
+
organizationId: string;
|
|
4376
|
+
companyId: string | null;
|
|
4377
|
+
email: string;
|
|
4378
|
+
emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null;
|
|
4379
|
+
firstName: string | null;
|
|
4380
|
+
lastName: string | null;
|
|
4381
|
+
linkedinUrl: string | null;
|
|
4382
|
+
title: string | null;
|
|
4383
|
+
headline: string | null;
|
|
4384
|
+
filterReason: string | null;
|
|
4385
|
+
openingLine: string | null;
|
|
4386
|
+
source: string | null;
|
|
4387
|
+
sourceId: string | null;
|
|
4388
|
+
pipelineStatus: ContactPipelineStatus | null;
|
|
4389
|
+
enrichmentData: ContactEnrichmentData | null;
|
|
4390
|
+
/** Attio Person record ID - set when contact responds and is added to CRM */
|
|
4391
|
+
attioPersonId: string | null;
|
|
4392
|
+
batchId: string | null;
|
|
4393
|
+
status: 'active' | 'invalid';
|
|
4394
|
+
createdAt: Date;
|
|
4395
|
+
updatedAt: Date;
|
|
4396
|
+
}
|
|
4397
|
+
type DealPriorityBucketKey = 'needs_response' | 'follow_up_due' | 'waiting' | 'stale' | 'closed_low';
|
|
4398
|
+
interface DealPriority {
|
|
4399
|
+
bucketKey: DealPriorityBucketKey;
|
|
4400
|
+
rank: number;
|
|
4401
|
+
label: string;
|
|
4402
|
+
color: string;
|
|
4403
|
+
reason: string;
|
|
4404
|
+
latestActivityAt: string | null;
|
|
4405
|
+
nextActionAt: string | null;
|
|
4406
|
+
}
|
|
4407
|
+
interface DealContact {
|
|
4408
|
+
id: string;
|
|
4409
|
+
first_name: string | null;
|
|
4410
|
+
last_name: string | null;
|
|
4411
|
+
email: string;
|
|
4412
|
+
title: string | null;
|
|
4413
|
+
headline: string | null;
|
|
4414
|
+
linkedin_url: string | null;
|
|
4415
|
+
pipeline_status: Record<string, unknown> | null;
|
|
4416
|
+
enrichment_data: Record<string, unknown> | null;
|
|
4417
|
+
company: {
|
|
4418
|
+
id: string;
|
|
4419
|
+
name: string;
|
|
4420
|
+
domain: string | null;
|
|
4421
|
+
website: string | null;
|
|
4422
|
+
linkedin_url: string | null;
|
|
4423
|
+
segment: string | null;
|
|
4424
|
+
category: string | null;
|
|
4425
|
+
num_employees: number | null;
|
|
4426
|
+
} | null;
|
|
4427
|
+
}
|
|
4428
|
+
/** Deal list item with joined contact and company data */
|
|
4429
|
+
interface DealListItem extends AcqDealRow {
|
|
4430
|
+
priority: DealPriority;
|
|
4431
|
+
ownership: 'us' | 'them' | null;
|
|
4432
|
+
nextAction: string | null;
|
|
4433
|
+
contact: DealContact | null;
|
|
4434
|
+
}
|
|
4435
|
+
type DealDetail = DealListItem;
|
|
4436
|
+
/** Task kind options for a deal task (human follow-up action type) */
|
|
4437
|
+
type AcqDealTaskKind = 'call' | 'email' | 'meeting' | 'other';
|
|
4438
|
+
/**
|
|
4439
|
+
* A CRM to-do item attached to a deal representing a human follow-up action.
|
|
4440
|
+
* Transformed from AcqDealTaskRow with camelCase properties.
|
|
4441
|
+
*/
|
|
4442
|
+
interface AcqDealTask {
|
|
4443
|
+
id: string;
|
|
4444
|
+
organizationId: string;
|
|
4445
|
+
dealId: string;
|
|
4446
|
+
title: string;
|
|
4447
|
+
description: string | null;
|
|
4448
|
+
kind: AcqDealTaskKind;
|
|
4449
|
+
dueAt: string | null;
|
|
4450
|
+
assigneeUserId: string | null;
|
|
4451
|
+
completedAt: string | null;
|
|
4452
|
+
completedByUserId: string | null;
|
|
4453
|
+
createdAt: string;
|
|
4454
|
+
updatedAt: string;
|
|
4455
|
+
createdByUserId: string | null;
|
|
4456
|
+
}
|
|
4328
4457
|
|
|
4329
4458
|
/**
|
|
4330
4459
|
* Lead Service Types
|
|
@@ -4347,6 +4476,7 @@ interface CreateListParams {
|
|
|
4347
4476
|
batchIds?: string[];
|
|
4348
4477
|
instantlyCampaignId?: string;
|
|
4349
4478
|
status?: ListStatus;
|
|
4479
|
+
buildTemplateId?: string;
|
|
4350
4480
|
metadata?: Record<string, unknown>;
|
|
4351
4481
|
scrapingConfig?: ScrapingConfig;
|
|
4352
4482
|
icp?: IcpRubric;
|
|
@@ -4411,6 +4541,7 @@ interface CompanyFilters {
|
|
|
4411
4541
|
status?: 'active' | 'invalid';
|
|
4412
4542
|
includeAll?: boolean;
|
|
4413
4543
|
excludeColumns?: Array<'enrichmentData' | 'pipelineStatus'>;
|
|
4544
|
+
limit?: number;
|
|
4414
4545
|
}
|
|
4415
4546
|
interface CreateContactParams {
|
|
4416
4547
|
organizationId: string;
|
|
@@ -4461,6 +4592,10 @@ interface UpsertDealParams {
|
|
|
4461
4592
|
discoveryData?: unknown;
|
|
4462
4593
|
/** Optional proposal data JSONB to set on upsert */
|
|
4463
4594
|
proposalData?: unknown;
|
|
4595
|
+
/** Instantly email UUID used to hydrate the reply thread */
|
|
4596
|
+
instantlyThreadUuid?: string;
|
|
4597
|
+
/** Instantly sender account for direction detection */
|
|
4598
|
+
instantlyEmailAccount?: string;
|
|
4464
4599
|
}
|
|
4465
4600
|
interface UpdateDiscoveryDataParams {
|
|
4466
4601
|
organizationId: string;
|
|
@@ -4496,6 +4631,12 @@ interface UpdateFeesParams {
|
|
|
4496
4631
|
initialFee?: number;
|
|
4497
4632
|
monthlyFee?: number;
|
|
4498
4633
|
}
|
|
4634
|
+
interface CacheInstantlyThreadIdsParams {
|
|
4635
|
+
organizationId: string;
|
|
4636
|
+
dealId: string;
|
|
4637
|
+
instantlyThreadUuid: string;
|
|
4638
|
+
instantlyEmailAccount: string;
|
|
4639
|
+
}
|
|
4499
4640
|
interface TransitionItemParams {
|
|
4500
4641
|
organizationId: string;
|
|
4501
4642
|
dealId: string;
|
|
@@ -7560,6 +7701,10 @@ type LeadToolMap = {
|
|
|
7560
7701
|
params: Omit<UpdateFeesParams, 'organizationId'>;
|
|
7561
7702
|
result: void;
|
|
7562
7703
|
};
|
|
7704
|
+
cacheInstantlyThreadIds: {
|
|
7705
|
+
params: Omit<CacheInstantlyThreadIdsParams, 'organizationId'>;
|
|
7706
|
+
result: void;
|
|
7707
|
+
};
|
|
7563
7708
|
transitionItem: {
|
|
7564
7709
|
params: Omit<TransitionItemParams, 'organizationId'>;
|
|
7565
7710
|
result: void;
|
|
@@ -8375,6 +8520,7 @@ declare const LinkSchema: z.ZodObject<{
|
|
|
8375
8520
|
maps_to: "maps_to";
|
|
8376
8521
|
"operates-on": "operates-on";
|
|
8377
8522
|
uses: "uses";
|
|
8523
|
+
governs: "governs";
|
|
8378
8524
|
}>;
|
|
8379
8525
|
}, z.core.$strip>;
|
|
8380
8526
|
type Link = z.infer<typeof LinkSchema>;
|