@elevasis/sdk 1.12.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +1 -1
- package/dist/index.d.ts +287 -55
- package/dist/index.js +62 -117
- package/dist/test-utils/index.d.ts +275 -15
- package/dist/test-utils/index.js +10 -1
- package/dist/worker/index.js +10 -1
- package/package.json +1 -1
- package/reference/claude-config/rules/agent-start-here.md +13 -7
- package/reference/claude-config/rules/organization-os.md +10 -6
- package/reference/claude-config/rules/platform.md +2 -1
- package/reference/claude-config/rules/ui.md +8 -6
- package/reference/claude-config/rules/vibe.md +11 -5
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +1 -5
- package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +110 -0
- package/reference/packages/ui/src/test-utils/README.md +2 -0
- package/reference/scaffold/index.mdx +8 -5
- package/reference/scaffold/recipes/customize-crm-actions.md +411 -0
- package/reference/scaffold/recipes/extend-crm.md +255 -0
- package/reference/scaffold/recipes/extend-lead-gen.md +297 -0
- package/reference/scaffold/recipes/index.md +20 -11
- package/reference/scaffold/reference/contracts.md +2612 -0
- package/reference/scaffold/ui/customization.md +4 -0
package/dist/cli.cjs
CHANGED
|
@@ -40481,7 +40481,7 @@ function wrapAction(commandName, fn) {
|
|
|
40481
40481
|
// package.json
|
|
40482
40482
|
var package_default = {
|
|
40483
40483
|
name: "@elevasis/sdk",
|
|
40484
|
-
version: "1.
|
|
40484
|
+
version: "1.13.1",
|
|
40485
40485
|
description: "SDK for building Elevasis organization resources",
|
|
40486
40486
|
type: "module",
|
|
40487
40487
|
bin: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1108,6 +1108,53 @@ type Database = {
|
|
|
1108
1108
|
};
|
|
1109
1109
|
public: {
|
|
1110
1110
|
Tables: {
|
|
1111
|
+
acq_artifacts: {
|
|
1112
|
+
Row: {
|
|
1113
|
+
content: Json;
|
|
1114
|
+
created_at: string;
|
|
1115
|
+
created_by: string | null;
|
|
1116
|
+
id: string;
|
|
1117
|
+
kind: string;
|
|
1118
|
+
organization_id: string;
|
|
1119
|
+
owner_id: string;
|
|
1120
|
+
owner_kind: string;
|
|
1121
|
+
source_execution_id: string | null;
|
|
1122
|
+
version: number;
|
|
1123
|
+
};
|
|
1124
|
+
Insert: {
|
|
1125
|
+
content: Json;
|
|
1126
|
+
created_at?: string;
|
|
1127
|
+
created_by?: string | null;
|
|
1128
|
+
id?: string;
|
|
1129
|
+
kind: string;
|
|
1130
|
+
organization_id: string;
|
|
1131
|
+
owner_id: string;
|
|
1132
|
+
owner_kind: string;
|
|
1133
|
+
source_execution_id?: string | null;
|
|
1134
|
+
version?: number;
|
|
1135
|
+
};
|
|
1136
|
+
Update: {
|
|
1137
|
+
content?: Json;
|
|
1138
|
+
created_at?: string;
|
|
1139
|
+
created_by?: string | null;
|
|
1140
|
+
id?: string;
|
|
1141
|
+
kind?: string;
|
|
1142
|
+
organization_id?: string;
|
|
1143
|
+
owner_id?: string;
|
|
1144
|
+
owner_kind?: string;
|
|
1145
|
+
source_execution_id?: string | null;
|
|
1146
|
+
version?: number;
|
|
1147
|
+
};
|
|
1148
|
+
Relationships: [
|
|
1149
|
+
{
|
|
1150
|
+
foreignKeyName: "acq_artifacts_organization_id_fkey";
|
|
1151
|
+
columns: ["organization_id"];
|
|
1152
|
+
isOneToOne: false;
|
|
1153
|
+
referencedRelation: "organizations";
|
|
1154
|
+
referencedColumns: ["id"];
|
|
1155
|
+
}
|
|
1156
|
+
];
|
|
1157
|
+
};
|
|
1111
1158
|
acq_companies: {
|
|
1112
1159
|
Row: {
|
|
1113
1160
|
batch_id: string | null;
|
|
@@ -1126,6 +1173,9 @@ type Database = {
|
|
|
1126
1173
|
num_employees: number | null;
|
|
1127
1174
|
organization_id: string;
|
|
1128
1175
|
pipeline_status: Json;
|
|
1176
|
+
qualification_rubric_key: string | null;
|
|
1177
|
+
qualification_score: number | null;
|
|
1178
|
+
qualification_signals: Json | null;
|
|
1129
1179
|
segment: string | null;
|
|
1130
1180
|
source: string | null;
|
|
1131
1181
|
status: string;
|
|
@@ -1149,6 +1199,9 @@ type Database = {
|
|
|
1149
1199
|
num_employees?: number | null;
|
|
1150
1200
|
organization_id: string;
|
|
1151
1201
|
pipeline_status?: Json;
|
|
1202
|
+
qualification_rubric_key?: string | null;
|
|
1203
|
+
qualification_score?: number | null;
|
|
1204
|
+
qualification_signals?: Json | null;
|
|
1152
1205
|
segment?: string | null;
|
|
1153
1206
|
source?: string | null;
|
|
1154
1207
|
status?: string;
|
|
@@ -1172,6 +1225,9 @@ type Database = {
|
|
|
1172
1225
|
num_employees?: number | null;
|
|
1173
1226
|
organization_id?: string;
|
|
1174
1227
|
pipeline_status?: Json;
|
|
1228
|
+
qualification_rubric_key?: string | null;
|
|
1229
|
+
qualification_score?: number | null;
|
|
1230
|
+
qualification_signals?: Json | null;
|
|
1175
1231
|
segment?: string | null;
|
|
1176
1232
|
source?: string | null;
|
|
1177
1233
|
status?: string;
|
|
@@ -1208,6 +1264,9 @@ type Database = {
|
|
|
1208
1264
|
opening_line: string | null;
|
|
1209
1265
|
organization_id: string;
|
|
1210
1266
|
pipeline_status: Json;
|
|
1267
|
+
qualification_rubric_key: string | null;
|
|
1268
|
+
qualification_score: number | null;
|
|
1269
|
+
qualification_signals: Json | null;
|
|
1211
1270
|
source: string | null;
|
|
1212
1271
|
source_id: string | null;
|
|
1213
1272
|
status: string;
|
|
@@ -1233,6 +1292,9 @@ type Database = {
|
|
|
1233
1292
|
opening_line?: string | null;
|
|
1234
1293
|
organization_id: string;
|
|
1235
1294
|
pipeline_status?: Json;
|
|
1295
|
+
qualification_rubric_key?: string | null;
|
|
1296
|
+
qualification_score?: number | null;
|
|
1297
|
+
qualification_signals?: Json | null;
|
|
1236
1298
|
source?: string | null;
|
|
1237
1299
|
source_id?: string | null;
|
|
1238
1300
|
status?: string;
|
|
@@ -1258,6 +1320,9 @@ type Database = {
|
|
|
1258
1320
|
opening_line?: string | null;
|
|
1259
1321
|
organization_id?: string;
|
|
1260
1322
|
pipeline_status?: Json;
|
|
1323
|
+
qualification_rubric_key?: string | null;
|
|
1324
|
+
qualification_score?: number | null;
|
|
1325
|
+
qualification_signals?: Json | null;
|
|
1261
1326
|
source?: string | null;
|
|
1262
1327
|
source_id?: string | null;
|
|
1263
1328
|
status?: string;
|
|
@@ -1637,40 +1702,46 @@ type Database = {
|
|
|
1637
1702
|
};
|
|
1638
1703
|
acq_list_companies: {
|
|
1639
1704
|
Row: {
|
|
1705
|
+
activity_log: Json;
|
|
1640
1706
|
added_at: string;
|
|
1641
1707
|
added_by: string | null;
|
|
1642
1708
|
company_id: string;
|
|
1643
1709
|
id: string;
|
|
1644
1710
|
list_id: string;
|
|
1711
|
+
pipeline_key: string;
|
|
1645
1712
|
source_execution_id: string | null;
|
|
1646
1713
|
source_input_hash: string | null;
|
|
1647
1714
|
source_resource_id: string | null;
|
|
1648
|
-
|
|
1649
|
-
|
|
1715
|
+
stage_key: string;
|
|
1716
|
+
state_key: string;
|
|
1650
1717
|
};
|
|
1651
1718
|
Insert: {
|
|
1719
|
+
activity_log?: Json;
|
|
1652
1720
|
added_at?: string;
|
|
1653
1721
|
added_by?: string | null;
|
|
1654
1722
|
company_id: string;
|
|
1655
1723
|
id?: string;
|
|
1656
1724
|
list_id: string;
|
|
1725
|
+
pipeline_key?: string;
|
|
1657
1726
|
source_execution_id?: string | null;
|
|
1658
1727
|
source_input_hash?: string | null;
|
|
1659
1728
|
source_resource_id?: string | null;
|
|
1660
|
-
|
|
1661
|
-
|
|
1729
|
+
stage_key: string;
|
|
1730
|
+
state_key: string;
|
|
1662
1731
|
};
|
|
1663
1732
|
Update: {
|
|
1733
|
+
activity_log?: Json;
|
|
1664
1734
|
added_at?: string;
|
|
1665
1735
|
added_by?: string | null;
|
|
1666
1736
|
company_id?: string;
|
|
1667
1737
|
id?: string;
|
|
1668
1738
|
list_id?: string;
|
|
1739
|
+
pipeline_key?: string;
|
|
1669
1740
|
source_execution_id?: string | null;
|
|
1670
1741
|
source_input_hash?: string | null;
|
|
1671
1742
|
source_resource_id?: string | null;
|
|
1672
|
-
|
|
1673
|
-
|
|
1743
|
+
stage_key?: string;
|
|
1744
|
+
state_key?: string;
|
|
1674
1745
|
};
|
|
1675
1746
|
Relationships: [
|
|
1676
1747
|
{
|
|
@@ -1737,40 +1808,46 @@ type Database = {
|
|
|
1737
1808
|
};
|
|
1738
1809
|
acq_list_members: {
|
|
1739
1810
|
Row: {
|
|
1811
|
+
activity_log: Json;
|
|
1740
1812
|
added_at: string;
|
|
1741
1813
|
added_by: string | null;
|
|
1742
1814
|
contact_id: string;
|
|
1743
1815
|
id: string;
|
|
1744
1816
|
list_id: string;
|
|
1817
|
+
pipeline_key: string;
|
|
1745
1818
|
source_execution_id: string | null;
|
|
1746
1819
|
source_input_hash: string | null;
|
|
1747
1820
|
source_resource_id: string | null;
|
|
1748
|
-
|
|
1749
|
-
|
|
1821
|
+
stage_key: string;
|
|
1822
|
+
state_key: string;
|
|
1750
1823
|
};
|
|
1751
1824
|
Insert: {
|
|
1825
|
+
activity_log?: Json;
|
|
1752
1826
|
added_at?: string;
|
|
1753
1827
|
added_by?: string | null;
|
|
1754
1828
|
contact_id: string;
|
|
1755
1829
|
id?: string;
|
|
1756
1830
|
list_id: string;
|
|
1831
|
+
pipeline_key?: string;
|
|
1757
1832
|
source_execution_id?: string | null;
|
|
1758
1833
|
source_input_hash?: string | null;
|
|
1759
1834
|
source_resource_id?: string | null;
|
|
1760
|
-
|
|
1761
|
-
|
|
1835
|
+
stage_key: string;
|
|
1836
|
+
state_key: string;
|
|
1762
1837
|
};
|
|
1763
1838
|
Update: {
|
|
1839
|
+
activity_log?: Json;
|
|
1764
1840
|
added_at?: string;
|
|
1765
1841
|
added_by?: string | null;
|
|
1766
1842
|
contact_id?: string;
|
|
1767
1843
|
id?: string;
|
|
1768
1844
|
list_id?: string;
|
|
1845
|
+
pipeline_key?: string;
|
|
1769
1846
|
source_execution_id?: string | null;
|
|
1770
1847
|
source_input_hash?: string | null;
|
|
1771
1848
|
source_resource_id?: string | null;
|
|
1772
|
-
|
|
1773
|
-
|
|
1849
|
+
stage_key?: string;
|
|
1850
|
+
state_key?: string;
|
|
1774
1851
|
};
|
|
1775
1852
|
Relationships: [
|
|
1776
1853
|
{
|
|
@@ -1798,6 +1875,7 @@ type Database = {
|
|
|
1798
1875
|
};
|
|
1799
1876
|
acq_lists: {
|
|
1800
1877
|
Row: {
|
|
1878
|
+
activity_log: Json;
|
|
1801
1879
|
batch_ids: string[];
|
|
1802
1880
|
completed_at: string | null;
|
|
1803
1881
|
config: Json;
|
|
@@ -1809,10 +1887,13 @@ type Database = {
|
|
|
1809
1887
|
metadata: Json;
|
|
1810
1888
|
name: string;
|
|
1811
1889
|
organization_id: string;
|
|
1812
|
-
|
|
1890
|
+
pipeline_key: string;
|
|
1891
|
+
stage_key: string;
|
|
1892
|
+
state_key: string;
|
|
1813
1893
|
type: string;
|
|
1814
1894
|
};
|
|
1815
1895
|
Insert: {
|
|
1896
|
+
activity_log?: Json;
|
|
1816
1897
|
batch_ids?: string[];
|
|
1817
1898
|
completed_at?: string | null;
|
|
1818
1899
|
config?: Json;
|
|
@@ -1824,10 +1905,13 @@ type Database = {
|
|
|
1824
1905
|
metadata?: Json;
|
|
1825
1906
|
name: string;
|
|
1826
1907
|
organization_id: string;
|
|
1827
|
-
|
|
1908
|
+
pipeline_key?: string;
|
|
1909
|
+
stage_key?: string;
|
|
1910
|
+
state_key?: string;
|
|
1828
1911
|
type?: string;
|
|
1829
1912
|
};
|
|
1830
1913
|
Update: {
|
|
1914
|
+
activity_log?: Json;
|
|
1831
1915
|
batch_ids?: string[];
|
|
1832
1916
|
completed_at?: string | null;
|
|
1833
1917
|
config?: Json;
|
|
@@ -1839,7 +1923,9 @@ type Database = {
|
|
|
1839
1923
|
metadata?: Json;
|
|
1840
1924
|
name?: string;
|
|
1841
1925
|
organization_id?: string;
|
|
1842
|
-
|
|
1926
|
+
pipeline_key?: string;
|
|
1927
|
+
stage_key?: string;
|
|
1928
|
+
state_key?: string;
|
|
1843
1929
|
type?: string;
|
|
1844
1930
|
};
|
|
1845
1931
|
Relationships: [
|
|
@@ -2120,6 +2206,62 @@ type Database = {
|
|
|
2120
2206
|
}
|
|
2121
2207
|
];
|
|
2122
2208
|
};
|
|
2209
|
+
acq_touchpoints: {
|
|
2210
|
+
Row: {
|
|
2211
|
+
artifact_id: string | null;
|
|
2212
|
+
channel: string;
|
|
2213
|
+
contact_id: string | null;
|
|
2214
|
+
created_at: string;
|
|
2215
|
+
direction: string;
|
|
2216
|
+
id: string;
|
|
2217
|
+
kind: string;
|
|
2218
|
+
list_id: string | null;
|
|
2219
|
+
list_member_id: string | null;
|
|
2220
|
+
occurred_at: string;
|
|
2221
|
+
organization_id: string;
|
|
2222
|
+
payload: Json | null;
|
|
2223
|
+
source_execution_id: string | null;
|
|
2224
|
+
};
|
|
2225
|
+
Insert: {
|
|
2226
|
+
artifact_id?: string | null;
|
|
2227
|
+
channel: string;
|
|
2228
|
+
contact_id?: string | null;
|
|
2229
|
+
created_at?: string;
|
|
2230
|
+
direction: string;
|
|
2231
|
+
id?: string;
|
|
2232
|
+
kind: string;
|
|
2233
|
+
list_id?: string | null;
|
|
2234
|
+
list_member_id?: string | null;
|
|
2235
|
+
occurred_at: string;
|
|
2236
|
+
organization_id: string;
|
|
2237
|
+
payload?: Json | null;
|
|
2238
|
+
source_execution_id?: string | null;
|
|
2239
|
+
};
|
|
2240
|
+
Update: {
|
|
2241
|
+
artifact_id?: string | null;
|
|
2242
|
+
channel?: string;
|
|
2243
|
+
contact_id?: string | null;
|
|
2244
|
+
created_at?: string;
|
|
2245
|
+
direction?: string;
|
|
2246
|
+
id?: string;
|
|
2247
|
+
kind?: string;
|
|
2248
|
+
list_id?: string | null;
|
|
2249
|
+
list_member_id?: string | null;
|
|
2250
|
+
occurred_at?: string;
|
|
2251
|
+
organization_id?: string;
|
|
2252
|
+
payload?: Json | null;
|
|
2253
|
+
source_execution_id?: string | null;
|
|
2254
|
+
};
|
|
2255
|
+
Relationships: [
|
|
2256
|
+
{
|
|
2257
|
+
foreignKeyName: "acq_touchpoints_organization_id_fkey";
|
|
2258
|
+
columns: ["organization_id"];
|
|
2259
|
+
isOneToOne: false;
|
|
2260
|
+
referencedRelation: "organizations";
|
|
2261
|
+
referencedColumns: ["id"];
|
|
2262
|
+
}
|
|
2263
|
+
];
|
|
2264
|
+
};
|
|
2123
2265
|
activities: {
|
|
2124
2266
|
Row: {
|
|
2125
2267
|
activity_type: string;
|
|
@@ -4028,6 +4170,10 @@ interface ContactEnrichmentData {
|
|
|
4028
4170
|
/**
|
|
4029
4171
|
* Acquisition list for organizing contacts and companies.
|
|
4030
4172
|
* Transformed from AcqListRow with camelCase properties.
|
|
4173
|
+
*
|
|
4174
|
+
* Track B: acq_lists adopts the Stateful trait (pipeline_key / stage_key / state_key / activity_log).
|
|
4175
|
+
* `status` is preserved as a convenience alias for `state_key` so existing consumers continue to
|
|
4176
|
+
* compile until they are migrated to read the trait fields directly.
|
|
4031
4177
|
*/
|
|
4032
4178
|
interface AcqList {
|
|
4033
4179
|
id: string;
|
|
@@ -4037,7 +4183,14 @@ interface AcqList {
|
|
|
4037
4183
|
type: string;
|
|
4038
4184
|
batchIds: string[];
|
|
4039
4185
|
instantlyCampaignId: string | null;
|
|
4186
|
+
/** @deprecated Use state_key. Retained as alias mapped from state_key for backward-compatibility. */
|
|
4040
4187
|
status: string;
|
|
4188
|
+
/** Stateful trait: pipeline identifier (always 'lead-gen' for acq_lists). Added by W2 migration. */
|
|
4189
|
+
pipelineKey: string;
|
|
4190
|
+
/** Stateful trait: stage within the pipeline (always 'lifecycle' for acq_lists). Added by W2 migration. */
|
|
4191
|
+
stageKey: string;
|
|
4192
|
+
/** Stateful trait: lifecycle state (draft | enriching | launched | closing | archived). Added by W2 migration. */
|
|
4193
|
+
stateKey: string;
|
|
4041
4194
|
metadata: Record<string, unknown>;
|
|
4042
4195
|
launchedAt: Date | null;
|
|
4043
4196
|
completedAt: Date | null;
|
|
@@ -4069,6 +4222,12 @@ interface AcqCompany {
|
|
|
4069
4222
|
batchId: string | null;
|
|
4070
4223
|
status: 'active' | 'invalid';
|
|
4071
4224
|
verticalResearch: string | null;
|
|
4225
|
+
/** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
|
|
4226
|
+
qualificationScore: number | null;
|
|
4227
|
+
/** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
|
|
4228
|
+
qualificationSignals: Record<string, unknown> | null;
|
|
4229
|
+
/** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
|
|
4230
|
+
qualificationRubricKey: string | null;
|
|
4072
4231
|
createdAt: Date;
|
|
4073
4232
|
updatedAt: Date;
|
|
4074
4233
|
}
|
|
@@ -4190,6 +4349,11 @@ interface ListConfig {
|
|
|
4190
4349
|
excludeFranchises: boolean;
|
|
4191
4350
|
/** Free-form LLM rules layered on top of the structured criteria. */
|
|
4192
4351
|
customRules: string;
|
|
4352
|
+
/**
|
|
4353
|
+
* Free-form text key identifying the ICP qualification rubric applied to this list.
|
|
4354
|
+
* Decision C4: stays as free-form text until an Org OS rubric registry lands.
|
|
4355
|
+
*/
|
|
4356
|
+
qualificationRubricKey?: string | null;
|
|
4193
4357
|
};
|
|
4194
4358
|
enrichment?: {
|
|
4195
4359
|
emailDiscovery?: {
|
|
@@ -4276,6 +4440,12 @@ interface UpdateCompanyParams {
|
|
|
4276
4440
|
batchId?: string;
|
|
4277
4441
|
status?: 'active' | 'invalid';
|
|
4278
4442
|
verticalResearch?: string | null;
|
|
4443
|
+
/** Track A: flat qualification score column (null until a scoring rubric is defined) */
|
|
4444
|
+
qualificationScore?: number | null;
|
|
4445
|
+
/** Track A: flat qualification signals jsonb — mirrors the former pipeline_status.qualification shape */
|
|
4446
|
+
qualificationSignals?: Record<string, unknown> | null;
|
|
4447
|
+
/** Track A: key identifying the rubric used for qualification */
|
|
4448
|
+
qualificationRubricKey?: string | null;
|
|
4279
4449
|
}
|
|
4280
4450
|
type UpsertCompanyParams = CreateCompanyParams;
|
|
4281
4451
|
interface CompanyFilters {
|
|
@@ -4774,51 +4944,41 @@ declare const ActivityEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4774
4944
|
}, z.core.$strip>, z.ZodObject<{
|
|
4775
4945
|
type: z.ZodLiteral<"deal_created">;
|
|
4776
4946
|
timestamp: z.ZodString;
|
|
4777
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4778
|
-
type: z.ZodLiteral<"reply_received">;
|
|
4779
|
-
timestamp: z.ZodString;
|
|
4780
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
4781
|
-
source: z.ZodOptional<z.ZodString>;
|
|
4782
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4783
|
-
type: z.ZodLiteral<"reply_sent_to_lead">;
|
|
4784
|
-
timestamp: z.ZodString;
|
|
4785
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
4786
|
-
source: z.ZodOptional<z.ZodString>;
|
|
4787
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4788
|
-
type: z.ZodLiteral<"booking_nudge_sent">;
|
|
4789
|
-
timestamp: z.ZodString;
|
|
4790
|
-
followupDay: z.ZodNumber;
|
|
4791
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4792
|
-
type: z.ZodLiteral<"reminder_sent">;
|
|
4793
|
-
timestamp: z.ZodString;
|
|
4794
|
-
followupDay: z.ZodOptional<z.ZodNumber>;
|
|
4795
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4796
|
-
type: z.ZodLiteral<"booking_cancelled">;
|
|
4797
|
-
timestamp: z.ZodString;
|
|
4798
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
4799
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4800
|
-
type: z.ZodLiteral<"discovery_submitted">;
|
|
4801
|
-
timestamp: z.ZodString;
|
|
4802
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4803
|
-
type: z.ZodLiteral<"moved_to_nurturing">;
|
|
4804
|
-
timestamp: z.ZodString;
|
|
4805
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4806
|
-
type: z.ZodLiteral<"no_show">;
|
|
4807
|
-
timestamp: z.ZodString;
|
|
4808
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4809
|
-
type: z.ZodLiteral<"followup_email_sent">;
|
|
4810
|
-
timestamp: z.ZodString;
|
|
4811
|
-
followupDay: z.ZodOptional<z.ZodNumber>;
|
|
4812
4947
|
}, z.core.$strip>], "type">;
|
|
4813
4948
|
type ActivityEvent = z.infer<typeof ActivityEventSchema>;
|
|
4814
4949
|
|
|
4815
4950
|
interface Action {
|
|
4816
4951
|
key: string;
|
|
4817
4952
|
label: string;
|
|
4818
|
-
|
|
4819
|
-
|
|
4953
|
+
payloadSchema?: z.ZodTypeAny;
|
|
4954
|
+
}
|
|
4955
|
+
interface ActionDef {
|
|
4956
|
+
key: string;
|
|
4957
|
+
label: string;
|
|
4958
|
+
isAvailableFor: (deal: AcqDealRow) => boolean;
|
|
4959
|
+
workflowId: string;
|
|
4960
|
+
payloadSchema?: z.ZodTypeAny;
|
|
4820
4961
|
}
|
|
4821
|
-
declare
|
|
4962
|
+
declare const DEFAULT_CRM_ACTIONS: ActionDef[];
|
|
4963
|
+
declare function deriveActions(deal: AcqDealRow, actions?: ActionDef[]): Action[];
|
|
4964
|
+
|
|
4965
|
+
/**
|
|
4966
|
+
* Canonical vocabulary for `acq_touchpoints.kind`.
|
|
4967
|
+
* DB CHECK constraint was dropped (Decision #9); validation lives here.
|
|
4968
|
+
* Subtype/intent detail (e.g. triggered_by_action, subtype) goes in the touchpoint `payload` JSONB.
|
|
4969
|
+
*/
|
|
4970
|
+
|
|
4971
|
+
declare const TouchpointKindSchema: z.ZodEnum<{
|
|
4972
|
+
initial: "initial";
|
|
4973
|
+
followup: "followup";
|
|
4974
|
+
reply: "reply";
|
|
4975
|
+
nudge: "nudge";
|
|
4976
|
+
reminder: "reminder";
|
|
4977
|
+
breakup: "breakup";
|
|
4978
|
+
bounce: "bounce";
|
|
4979
|
+
auto_reply: "auto_reply";
|
|
4980
|
+
}>;
|
|
4981
|
+
type TouchpointKind = z.infer<typeof TouchpointKindSchema>;
|
|
4822
4982
|
|
|
4823
4983
|
declare const DealSchemas: {
|
|
4824
4984
|
DealIdParams: z.ZodObject<{
|
|
@@ -4876,6 +5036,13 @@ declare const DealSchemas: {
|
|
|
4876
5036
|
reason: z.ZodOptional<z.ZodString>;
|
|
4877
5037
|
expectedUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
4878
5038
|
}, z.core.$strict>;
|
|
5039
|
+
ExecuteActionParams: z.ZodObject<{
|
|
5040
|
+
dealId: z.ZodString;
|
|
5041
|
+
actionKey: z.ZodString;
|
|
5042
|
+
}, z.core.$strict>;
|
|
5043
|
+
ExecuteActionRequest: z.ZodObject<{
|
|
5044
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5045
|
+
}, z.core.$strict>;
|
|
4879
5046
|
DealListResponse: z.ZodObject<{
|
|
4880
5047
|
data: z.ZodArray<z.ZodObject<{
|
|
4881
5048
|
id: z.ZodString;
|
|
@@ -4938,6 +5105,7 @@ declare const DealSchemas: {
|
|
|
4938
5105
|
stageSummary: z.ZodArray<z.ZodObject<{
|
|
4939
5106
|
stage: z.ZodString;
|
|
4940
5107
|
count: z.ZodNumber;
|
|
5108
|
+
totalValue: z.ZodNumber;
|
|
4941
5109
|
oldestUpdatedAt: z.ZodNullable<z.ZodString>;
|
|
4942
5110
|
newestUpdatedAt: z.ZodNullable<z.ZodString>;
|
|
4943
5111
|
}, z.core.$strip>>;
|
|
@@ -7848,6 +8016,70 @@ type LeadToolMap = {
|
|
|
7848
8016
|
};
|
|
7849
8017
|
result: UpsertSocialPostsResult;
|
|
7850
8018
|
};
|
|
8019
|
+
recordTouchpoint: {
|
|
8020
|
+
params: {
|
|
8021
|
+
contactId?: string;
|
|
8022
|
+
listMemberId?: string;
|
|
8023
|
+
listId?: string;
|
|
8024
|
+
direction: 'inbound' | 'outbound';
|
|
8025
|
+
channel: string;
|
|
8026
|
+
kind: TouchpointKind;
|
|
8027
|
+
payload?: Record<string, unknown>;
|
|
8028
|
+
artifactId?: string;
|
|
8029
|
+
sourceExecutionId?: string;
|
|
8030
|
+
occurredAt?: string;
|
|
8031
|
+
};
|
|
8032
|
+
result: {
|
|
8033
|
+
id: string;
|
|
8034
|
+
};
|
|
8035
|
+
};
|
|
8036
|
+
setDealStateKey: {
|
|
8037
|
+
params: {
|
|
8038
|
+
dealId: string;
|
|
8039
|
+
stateKey: string;
|
|
8040
|
+
};
|
|
8041
|
+
result: {
|
|
8042
|
+
ok: true;
|
|
8043
|
+
};
|
|
8044
|
+
};
|
|
8045
|
+
transitionDeal: {
|
|
8046
|
+
params: {
|
|
8047
|
+
dealId: string;
|
|
8048
|
+
toStage: string;
|
|
8049
|
+
toState?: string;
|
|
8050
|
+
};
|
|
8051
|
+
result: {
|
|
8052
|
+
deal: AcqDeal;
|
|
8053
|
+
};
|
|
8054
|
+
};
|
|
8055
|
+
loadDeal: {
|
|
8056
|
+
params: {
|
|
8057
|
+
dealId: string;
|
|
8058
|
+
};
|
|
8059
|
+
result: DealDetail | null;
|
|
8060
|
+
};
|
|
8061
|
+
listDealTouchpoints: {
|
|
8062
|
+
params: {
|
|
8063
|
+
dealId: string;
|
|
8064
|
+
kind?: string;
|
|
8065
|
+
limit?: number;
|
|
8066
|
+
};
|
|
8067
|
+
result: Array<{
|
|
8068
|
+
id: string;
|
|
8069
|
+
organization_id: string;
|
|
8070
|
+
contact_id: string | null;
|
|
8071
|
+
list_id: string | null;
|
|
8072
|
+
list_member_id: string | null;
|
|
8073
|
+
direction: string;
|
|
8074
|
+
channel: string;
|
|
8075
|
+
kind: string;
|
|
8076
|
+
payload: Record<string, unknown> | null;
|
|
8077
|
+
artifact_id: string | null;
|
|
8078
|
+
source_execution_id: string | null;
|
|
8079
|
+
occurred_at: string;
|
|
8080
|
+
created_at: string;
|
|
8081
|
+
}>;
|
|
8082
|
+
};
|
|
7851
8083
|
};
|
|
7852
8084
|
type ListToolMap = {
|
|
7853
8085
|
getConfig: {
|
|
@@ -9091,5 +9323,5 @@ declare class ToolingError extends ExecutionError {
|
|
|
9091
9323
|
constructor(errorType: string, message: string, details?: unknown);
|
|
9092
9324
|
}
|
|
9093
9325
|
|
|
9094
|
-
export { ActivityEventSchema, ExecutionError, RegistryValidationError, ResourceRegistry, StepType, ToolingError, deriveActions };
|
|
9095
|
-
export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqDealRow, AcqList, Action, ActivityEvent, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, CrmToolMap, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, PaginatedResult, PaginationParams, PdfToolMap, ProjectsToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceCategory, ResourceDefinition, ResourceLink, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TransitionItemParams, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };
|
|
9326
|
+
export { ActivityEventSchema, DEFAULT_CRM_ACTIONS, ExecutionError, RegistryValidationError, ResourceRegistry, StepType, ToolingError, deriveActions };
|
|
9327
|
+
export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqDealRow, AcqList, Action, ActionDef, ActivityEvent, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, CrmToolMap, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, PaginatedResult, PaginationParams, PdfToolMap, ProjectsToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceCategory, ResourceDefinition, ResourceLink, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TransitionItemParams, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };
|