@elevasis/sdk 1.17.0 → 1.19.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 +587 -175
- package/dist/index.d.ts +555 -83
- package/dist/index.js +1219 -66
- package/dist/node/index.d.ts +3 -0
- package/dist/node/index.js +34 -1
- package/dist/test-utils/index.d.ts +128 -81
- package/dist/test-utils/index.js +2007 -668
- package/dist/types/worker/index.d.ts +3 -2
- package/dist/worker/index.js +1507 -2
- package/package.json +2 -2
- package/reference/claude-config/registries/graph-skills.json +4 -0
- package/reference/claude-config/rules/package-taxonomy.md +33 -0
- package/reference/claude-config/rules/vibe.md +23 -0
- package/reference/claude-config/skills/knowledge/SKILL.md +46 -13
- package/reference/claude-config/skills/project/SKILL.md +21 -0
- package/reference/claude-config/skills/tutorial/SKILL.md +13 -3
- package/reference/claude-config/skills/tutorial/technical.md +6 -8
- package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +42 -0
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -0
- package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +37 -0
- package/reference/scaffold/reference/contracts.md +89 -69
- package/reference/scaffold/reference/feature-registry.md +1 -1
- package/reference/spine/spine-primer.md +99 -0
package/dist/index.d.ts
CHANGED
|
@@ -1131,7 +1131,7 @@ type Database = {
|
|
|
1131
1131
|
name: string;
|
|
1132
1132
|
num_employees: number | null;
|
|
1133
1133
|
organization_id: string;
|
|
1134
|
-
|
|
1134
|
+
processing_state: Json;
|
|
1135
1135
|
qualification_rubric_key: string | null;
|
|
1136
1136
|
qualification_score: number | null;
|
|
1137
1137
|
qualification_signals: Json | null;
|
|
@@ -1157,7 +1157,7 @@ type Database = {
|
|
|
1157
1157
|
name: string;
|
|
1158
1158
|
num_employees?: number | null;
|
|
1159
1159
|
organization_id: string;
|
|
1160
|
-
|
|
1160
|
+
processing_state?: Json;
|
|
1161
1161
|
qualification_rubric_key?: string | null;
|
|
1162
1162
|
qualification_score?: number | null;
|
|
1163
1163
|
qualification_signals?: Json | null;
|
|
@@ -1183,7 +1183,7 @@ type Database = {
|
|
|
1183
1183
|
name?: string;
|
|
1184
1184
|
num_employees?: number | null;
|
|
1185
1185
|
organization_id?: string;
|
|
1186
|
-
|
|
1186
|
+
processing_state?: Json;
|
|
1187
1187
|
qualification_rubric_key?: string | null;
|
|
1188
1188
|
qualification_score?: number | null;
|
|
1189
1189
|
qualification_signals?: Json | null;
|
|
@@ -1222,7 +1222,7 @@ type Database = {
|
|
|
1222
1222
|
nurture: boolean;
|
|
1223
1223
|
opening_line: string | null;
|
|
1224
1224
|
organization_id: string;
|
|
1225
|
-
|
|
1225
|
+
processing_state: Json;
|
|
1226
1226
|
qualification_rubric_key: string | null;
|
|
1227
1227
|
qualification_score: number | null;
|
|
1228
1228
|
qualification_signals: Json | null;
|
|
@@ -1250,7 +1250,7 @@ type Database = {
|
|
|
1250
1250
|
nurture?: boolean;
|
|
1251
1251
|
opening_line?: string | null;
|
|
1252
1252
|
organization_id: string;
|
|
1253
|
-
|
|
1253
|
+
processing_state?: Json;
|
|
1254
1254
|
qualification_rubric_key?: string | null;
|
|
1255
1255
|
qualification_score?: number | null;
|
|
1256
1256
|
qualification_signals?: Json | null;
|
|
@@ -1278,7 +1278,7 @@ type Database = {
|
|
|
1278
1278
|
nurture?: boolean;
|
|
1279
1279
|
opening_line?: string | null;
|
|
1280
1280
|
organization_id?: string;
|
|
1281
|
-
|
|
1281
|
+
processing_state?: Json;
|
|
1282
1282
|
qualification_rubric_key?: string | null;
|
|
1283
1283
|
qualification_score?: number | null;
|
|
1284
1284
|
qualification_signals?: Json | null;
|
|
@@ -1674,7 +1674,6 @@ type Database = {
|
|
|
1674
1674
|
id: string;
|
|
1675
1675
|
list_id: string;
|
|
1676
1676
|
pipeline_key: string;
|
|
1677
|
-
processing_state: Json;
|
|
1678
1677
|
source_execution_id: string | null;
|
|
1679
1678
|
source_input_hash: string | null;
|
|
1680
1679
|
source_resource_id: string | null;
|
|
@@ -1689,7 +1688,6 @@ type Database = {
|
|
|
1689
1688
|
id?: string;
|
|
1690
1689
|
list_id: string;
|
|
1691
1690
|
pipeline_key?: string;
|
|
1692
|
-
processing_state?: Json;
|
|
1693
1691
|
source_execution_id?: string | null;
|
|
1694
1692
|
source_input_hash?: string | null;
|
|
1695
1693
|
source_resource_id?: string | null;
|
|
@@ -1704,7 +1702,6 @@ type Database = {
|
|
|
1704
1702
|
id?: string;
|
|
1705
1703
|
list_id?: string;
|
|
1706
1704
|
pipeline_key?: string;
|
|
1707
|
-
processing_state?: Json;
|
|
1708
1705
|
source_execution_id?: string | null;
|
|
1709
1706
|
source_input_hash?: string | null;
|
|
1710
1707
|
source_resource_id?: string | null;
|
|
@@ -1783,7 +1780,6 @@ type Database = {
|
|
|
1783
1780
|
id: string;
|
|
1784
1781
|
list_id: string;
|
|
1785
1782
|
pipeline_key: string;
|
|
1786
|
-
processing_state: Json;
|
|
1787
1783
|
source_execution_id: string | null;
|
|
1788
1784
|
source_input_hash: string | null;
|
|
1789
1785
|
source_resource_id: string | null;
|
|
@@ -1798,7 +1794,6 @@ type Database = {
|
|
|
1798
1794
|
id?: string;
|
|
1799
1795
|
list_id: string;
|
|
1800
1796
|
pipeline_key?: string;
|
|
1801
|
-
processing_state?: Json;
|
|
1802
1797
|
source_execution_id?: string | null;
|
|
1803
1798
|
source_input_hash?: string | null;
|
|
1804
1799
|
source_resource_id?: string | null;
|
|
@@ -1813,7 +1808,6 @@ type Database = {
|
|
|
1813
1808
|
id?: string;
|
|
1814
1809
|
list_id?: string;
|
|
1815
1810
|
pipeline_key?: string;
|
|
1816
|
-
processing_state?: Json;
|
|
1817
1811
|
source_execution_id?: string | null;
|
|
1818
1812
|
source_input_hash?: string | null;
|
|
1819
1813
|
source_resource_id?: string | null;
|
|
@@ -3965,7 +3959,291 @@ type Database = {
|
|
|
3965
3959
|
};
|
|
3966
3960
|
};
|
|
3967
3961
|
|
|
3962
|
+
declare const ProspectingBuildTemplateStepSchema: z.ZodObject<{
|
|
3963
|
+
label: z.ZodString;
|
|
3964
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3965
|
+
color: z.ZodOptional<z.ZodString>;
|
|
3966
|
+
icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3967
|
+
"nav.dashboard": "nav.dashboard";
|
|
3968
|
+
"nav.calendar": "nav.calendar";
|
|
3969
|
+
"nav.sales": "nav.sales";
|
|
3970
|
+
"nav.crm": "nav.crm";
|
|
3971
|
+
"nav.lead-gen": "nav.lead-gen";
|
|
3972
|
+
"nav.projects": "nav.projects";
|
|
3973
|
+
"nav.operations": "nav.operations";
|
|
3974
|
+
"nav.monitoring": "nav.monitoring";
|
|
3975
|
+
"nav.knowledge": "nav.knowledge";
|
|
3976
|
+
"nav.settings": "nav.settings";
|
|
3977
|
+
"nav.admin": "nav.admin";
|
|
3978
|
+
"nav.archive": "nav.archive";
|
|
3979
|
+
"knowledge.playbook": "knowledge.playbook";
|
|
3980
|
+
"knowledge.strategy": "knowledge.strategy";
|
|
3981
|
+
"knowledge.reference": "knowledge.reference";
|
|
3982
|
+
"feature.dashboard": "feature.dashboard";
|
|
3983
|
+
"feature.calendar": "feature.calendar";
|
|
3984
|
+
"feature.sales": "feature.sales";
|
|
3985
|
+
"feature.crm": "feature.crm";
|
|
3986
|
+
"feature.finance": "feature.finance";
|
|
3987
|
+
"feature.lead-gen": "feature.lead-gen";
|
|
3988
|
+
"feature.platform": "feature.platform";
|
|
3989
|
+
"feature.projects": "feature.projects";
|
|
3990
|
+
"feature.operations": "feature.operations";
|
|
3991
|
+
"feature.knowledge": "feature.knowledge";
|
|
3992
|
+
"feature.monitoring": "feature.monitoring";
|
|
3993
|
+
"feature.settings": "feature.settings";
|
|
3994
|
+
"feature.admin": "feature.admin";
|
|
3995
|
+
"feature.archive": "feature.archive";
|
|
3996
|
+
"feature.seo": "feature.seo";
|
|
3997
|
+
"resource.agent": "resource.agent";
|
|
3998
|
+
"resource.workflow": "resource.workflow";
|
|
3999
|
+
"resource.integration": "resource.integration";
|
|
4000
|
+
"resource.database": "resource.database";
|
|
4001
|
+
"resource.user": "resource.user";
|
|
4002
|
+
"resource.team": "resource.team";
|
|
4003
|
+
"integration.gmail": "integration.gmail";
|
|
4004
|
+
"integration.google-sheets": "integration.google-sheets";
|
|
4005
|
+
"integration.attio": "integration.attio";
|
|
4006
|
+
"surface.dashboard": "surface.dashboard";
|
|
4007
|
+
"surface.calendar": "surface.calendar";
|
|
4008
|
+
"surface.overview": "surface.overview";
|
|
4009
|
+
"surface.command-view": "surface.command-view";
|
|
4010
|
+
"surface.command-queue": "surface.command-queue";
|
|
4011
|
+
"surface.pipeline": "surface.pipeline";
|
|
4012
|
+
"surface.lists": "surface.lists";
|
|
4013
|
+
"surface.resources": "surface.resources";
|
|
4014
|
+
"surface.settings": "surface.settings";
|
|
4015
|
+
"status.success": "status.success";
|
|
4016
|
+
"status.error": "status.error";
|
|
4017
|
+
"status.warning": "status.warning";
|
|
4018
|
+
"status.info": "status.info";
|
|
4019
|
+
"status.pending": "status.pending";
|
|
4020
|
+
"action.approve": "action.approve";
|
|
4021
|
+
"action.reject": "action.reject";
|
|
4022
|
+
"action.retry": "action.retry";
|
|
4023
|
+
"action.edit": "action.edit";
|
|
4024
|
+
"action.view": "action.view";
|
|
4025
|
+
"action.launch": "action.launch";
|
|
4026
|
+
"action.message": "action.message";
|
|
4027
|
+
"action.escalate": "action.escalate";
|
|
4028
|
+
"action.promote": "action.promote";
|
|
4029
|
+
"action.submit": "action.submit";
|
|
4030
|
+
"action.email": "action.email";
|
|
4031
|
+
}>, z.ZodString]>>;
|
|
4032
|
+
id: z.ZodString;
|
|
4033
|
+
primaryEntity: z.ZodEnum<{
|
|
4034
|
+
company: "company";
|
|
4035
|
+
contact: "contact";
|
|
4036
|
+
}>;
|
|
4037
|
+
outputs: z.ZodArray<z.ZodEnum<{
|
|
4038
|
+
company: "company";
|
|
4039
|
+
contact: "contact";
|
|
4040
|
+
export: "export";
|
|
4041
|
+
}>>;
|
|
4042
|
+
stageKey: z.ZodString;
|
|
4043
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4044
|
+
dependencyMode: z.ZodLiteral<"per-record-eligibility">;
|
|
4045
|
+
capabilityKey: z.ZodString;
|
|
4046
|
+
defaultBatchSize: z.ZodNumber;
|
|
4047
|
+
maxBatchSize: z.ZodNumber;
|
|
4048
|
+
}, z.core.$strip>;
|
|
4049
|
+
declare const ProspectingBuildTemplateSchema: z.ZodObject<{
|
|
4050
|
+
label: z.ZodString;
|
|
4051
|
+
description: z.ZodOptional<z.ZodString>;
|
|
4052
|
+
color: z.ZodOptional<z.ZodString>;
|
|
4053
|
+
icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
4054
|
+
"nav.dashboard": "nav.dashboard";
|
|
4055
|
+
"nav.calendar": "nav.calendar";
|
|
4056
|
+
"nav.sales": "nav.sales";
|
|
4057
|
+
"nav.crm": "nav.crm";
|
|
4058
|
+
"nav.lead-gen": "nav.lead-gen";
|
|
4059
|
+
"nav.projects": "nav.projects";
|
|
4060
|
+
"nav.operations": "nav.operations";
|
|
4061
|
+
"nav.monitoring": "nav.monitoring";
|
|
4062
|
+
"nav.knowledge": "nav.knowledge";
|
|
4063
|
+
"nav.settings": "nav.settings";
|
|
4064
|
+
"nav.admin": "nav.admin";
|
|
4065
|
+
"nav.archive": "nav.archive";
|
|
4066
|
+
"knowledge.playbook": "knowledge.playbook";
|
|
4067
|
+
"knowledge.strategy": "knowledge.strategy";
|
|
4068
|
+
"knowledge.reference": "knowledge.reference";
|
|
4069
|
+
"feature.dashboard": "feature.dashboard";
|
|
4070
|
+
"feature.calendar": "feature.calendar";
|
|
4071
|
+
"feature.sales": "feature.sales";
|
|
4072
|
+
"feature.crm": "feature.crm";
|
|
4073
|
+
"feature.finance": "feature.finance";
|
|
4074
|
+
"feature.lead-gen": "feature.lead-gen";
|
|
4075
|
+
"feature.platform": "feature.platform";
|
|
4076
|
+
"feature.projects": "feature.projects";
|
|
4077
|
+
"feature.operations": "feature.operations";
|
|
4078
|
+
"feature.knowledge": "feature.knowledge";
|
|
4079
|
+
"feature.monitoring": "feature.monitoring";
|
|
4080
|
+
"feature.settings": "feature.settings";
|
|
4081
|
+
"feature.admin": "feature.admin";
|
|
4082
|
+
"feature.archive": "feature.archive";
|
|
4083
|
+
"feature.seo": "feature.seo";
|
|
4084
|
+
"resource.agent": "resource.agent";
|
|
4085
|
+
"resource.workflow": "resource.workflow";
|
|
4086
|
+
"resource.integration": "resource.integration";
|
|
4087
|
+
"resource.database": "resource.database";
|
|
4088
|
+
"resource.user": "resource.user";
|
|
4089
|
+
"resource.team": "resource.team";
|
|
4090
|
+
"integration.gmail": "integration.gmail";
|
|
4091
|
+
"integration.google-sheets": "integration.google-sheets";
|
|
4092
|
+
"integration.attio": "integration.attio";
|
|
4093
|
+
"surface.dashboard": "surface.dashboard";
|
|
4094
|
+
"surface.calendar": "surface.calendar";
|
|
4095
|
+
"surface.overview": "surface.overview";
|
|
4096
|
+
"surface.command-view": "surface.command-view";
|
|
4097
|
+
"surface.command-queue": "surface.command-queue";
|
|
4098
|
+
"surface.pipeline": "surface.pipeline";
|
|
4099
|
+
"surface.lists": "surface.lists";
|
|
4100
|
+
"surface.resources": "surface.resources";
|
|
4101
|
+
"surface.settings": "surface.settings";
|
|
4102
|
+
"status.success": "status.success";
|
|
4103
|
+
"status.error": "status.error";
|
|
4104
|
+
"status.warning": "status.warning";
|
|
4105
|
+
"status.info": "status.info";
|
|
4106
|
+
"status.pending": "status.pending";
|
|
4107
|
+
"action.approve": "action.approve";
|
|
4108
|
+
"action.reject": "action.reject";
|
|
4109
|
+
"action.retry": "action.retry";
|
|
4110
|
+
"action.edit": "action.edit";
|
|
4111
|
+
"action.view": "action.view";
|
|
4112
|
+
"action.launch": "action.launch";
|
|
4113
|
+
"action.message": "action.message";
|
|
4114
|
+
"action.escalate": "action.escalate";
|
|
4115
|
+
"action.promote": "action.promote";
|
|
4116
|
+
"action.submit": "action.submit";
|
|
4117
|
+
"action.email": "action.email";
|
|
4118
|
+
}>, z.ZodString]>>;
|
|
4119
|
+
id: z.ZodString;
|
|
4120
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
4121
|
+
label: z.ZodString;
|
|
4122
|
+
description: z.ZodOptional<z.ZodString>;
|
|
4123
|
+
color: z.ZodOptional<z.ZodString>;
|
|
4124
|
+
icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
4125
|
+
"nav.dashboard": "nav.dashboard";
|
|
4126
|
+
"nav.calendar": "nav.calendar";
|
|
4127
|
+
"nav.sales": "nav.sales";
|
|
4128
|
+
"nav.crm": "nav.crm";
|
|
4129
|
+
"nav.lead-gen": "nav.lead-gen";
|
|
4130
|
+
"nav.projects": "nav.projects";
|
|
4131
|
+
"nav.operations": "nav.operations";
|
|
4132
|
+
"nav.monitoring": "nav.monitoring";
|
|
4133
|
+
"nav.knowledge": "nav.knowledge";
|
|
4134
|
+
"nav.settings": "nav.settings";
|
|
4135
|
+
"nav.admin": "nav.admin";
|
|
4136
|
+
"nav.archive": "nav.archive";
|
|
4137
|
+
"knowledge.playbook": "knowledge.playbook";
|
|
4138
|
+
"knowledge.strategy": "knowledge.strategy";
|
|
4139
|
+
"knowledge.reference": "knowledge.reference";
|
|
4140
|
+
"feature.dashboard": "feature.dashboard";
|
|
4141
|
+
"feature.calendar": "feature.calendar";
|
|
4142
|
+
"feature.sales": "feature.sales";
|
|
4143
|
+
"feature.crm": "feature.crm";
|
|
4144
|
+
"feature.finance": "feature.finance";
|
|
4145
|
+
"feature.lead-gen": "feature.lead-gen";
|
|
4146
|
+
"feature.platform": "feature.platform";
|
|
4147
|
+
"feature.projects": "feature.projects";
|
|
4148
|
+
"feature.operations": "feature.operations";
|
|
4149
|
+
"feature.knowledge": "feature.knowledge";
|
|
4150
|
+
"feature.monitoring": "feature.monitoring";
|
|
4151
|
+
"feature.settings": "feature.settings";
|
|
4152
|
+
"feature.admin": "feature.admin";
|
|
4153
|
+
"feature.archive": "feature.archive";
|
|
4154
|
+
"feature.seo": "feature.seo";
|
|
4155
|
+
"resource.agent": "resource.agent";
|
|
4156
|
+
"resource.workflow": "resource.workflow";
|
|
4157
|
+
"resource.integration": "resource.integration";
|
|
4158
|
+
"resource.database": "resource.database";
|
|
4159
|
+
"resource.user": "resource.user";
|
|
4160
|
+
"resource.team": "resource.team";
|
|
4161
|
+
"integration.gmail": "integration.gmail";
|
|
4162
|
+
"integration.google-sheets": "integration.google-sheets";
|
|
4163
|
+
"integration.attio": "integration.attio";
|
|
4164
|
+
"surface.dashboard": "surface.dashboard";
|
|
4165
|
+
"surface.calendar": "surface.calendar";
|
|
4166
|
+
"surface.overview": "surface.overview";
|
|
4167
|
+
"surface.command-view": "surface.command-view";
|
|
4168
|
+
"surface.command-queue": "surface.command-queue";
|
|
4169
|
+
"surface.pipeline": "surface.pipeline";
|
|
4170
|
+
"surface.lists": "surface.lists";
|
|
4171
|
+
"surface.resources": "surface.resources";
|
|
4172
|
+
"surface.settings": "surface.settings";
|
|
4173
|
+
"status.success": "status.success";
|
|
4174
|
+
"status.error": "status.error";
|
|
4175
|
+
"status.warning": "status.warning";
|
|
4176
|
+
"status.info": "status.info";
|
|
4177
|
+
"status.pending": "status.pending";
|
|
4178
|
+
"action.approve": "action.approve";
|
|
4179
|
+
"action.reject": "action.reject";
|
|
4180
|
+
"action.retry": "action.retry";
|
|
4181
|
+
"action.edit": "action.edit";
|
|
4182
|
+
"action.view": "action.view";
|
|
4183
|
+
"action.launch": "action.launch";
|
|
4184
|
+
"action.message": "action.message";
|
|
4185
|
+
"action.escalate": "action.escalate";
|
|
4186
|
+
"action.promote": "action.promote";
|
|
4187
|
+
"action.submit": "action.submit";
|
|
4188
|
+
"action.email": "action.email";
|
|
4189
|
+
}>, z.ZodString]>>;
|
|
4190
|
+
id: z.ZodString;
|
|
4191
|
+
primaryEntity: z.ZodEnum<{
|
|
4192
|
+
company: "company";
|
|
4193
|
+
contact: "contact";
|
|
4194
|
+
}>;
|
|
4195
|
+
outputs: z.ZodArray<z.ZodEnum<{
|
|
4196
|
+
company: "company";
|
|
4197
|
+
contact: "contact";
|
|
4198
|
+
export: "export";
|
|
4199
|
+
}>>;
|
|
4200
|
+
stageKey: z.ZodString;
|
|
4201
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4202
|
+
dependencyMode: z.ZodLiteral<"per-record-eligibility">;
|
|
4203
|
+
capabilityKey: z.ZodString;
|
|
4204
|
+
defaultBatchSize: z.ZodNumber;
|
|
4205
|
+
maxBatchSize: z.ZodNumber;
|
|
4206
|
+
}, z.core.$strip>>;
|
|
4207
|
+
}, z.core.$strip>;
|
|
4208
|
+
type ListBuilderStep = z.infer<typeof ProspectingBuildTemplateStepSchema>;
|
|
4209
|
+
|
|
4210
|
+
/** One entry in the lead-gen stage catalog. */
|
|
4211
|
+
interface LeadGenStageCatalogEntry {
|
|
4212
|
+
/** Matches the status key written into processing_state jsonb (e.g. 'scraped'). */
|
|
4213
|
+
key: string;
|
|
4214
|
+
/** Human-readable label for UI display. */
|
|
4215
|
+
label: string;
|
|
4216
|
+
/** Short description of what this stage represents. */
|
|
4217
|
+
description: string;
|
|
4218
|
+
/** Canonical pipeline order for UI sorting. Lower = earlier in the funnel. */
|
|
4219
|
+
order: number;
|
|
4220
|
+
/** Which entity's processing_state jsonb carries this stage status. */
|
|
4221
|
+
entity: 'company' | 'contact';
|
|
4222
|
+
}
|
|
4223
|
+
/**
|
|
4224
|
+
* Canonical lead-gen processing stage catalog.
|
|
4225
|
+
* Keys are the stage names written by workflow steps into processing_state jsonb.
|
|
4226
|
+
*
|
|
4227
|
+
* Ordered roughly by pipeline progression (prospecting → outreach → qualification).
|
|
4228
|
+
*/
|
|
4229
|
+
declare const LEAD_GEN_STAGE_CATALOG: Record<string, LeadGenStageCatalogEntry>;
|
|
4230
|
+
|
|
4231
|
+
declare const ProcessingStageStatusSchema: z.ZodEnum<{
|
|
4232
|
+
error: "error";
|
|
4233
|
+
success: "success";
|
|
4234
|
+
no_result: "no_result";
|
|
4235
|
+
skipped: "skipped";
|
|
4236
|
+
}>;
|
|
3968
4237
|
declare const DealSchemas: {
|
|
4238
|
+
CrmStageKey: z.ZodEnum<{
|
|
4239
|
+
[x: string]: string;
|
|
4240
|
+
}>;
|
|
4241
|
+
CrmStateKey: z.ZodEnum<{
|
|
4242
|
+
[x: string]: string;
|
|
4243
|
+
}>;
|
|
4244
|
+
DealStage: z.ZodEnum<{
|
|
4245
|
+
[x: string]: string;
|
|
4246
|
+
}>;
|
|
3969
4247
|
DealIdParams: z.ZodObject<{
|
|
3970
4248
|
dealId: z.ZodString;
|
|
3971
4249
|
}, z.core.$strip>;
|
|
@@ -3975,12 +4253,7 @@ declare const DealSchemas: {
|
|
|
3975
4253
|
}, z.core.$strip>;
|
|
3976
4254
|
ListDealsQuery: z.ZodObject<{
|
|
3977
4255
|
stage: z.ZodOptional<z.ZodEnum<{
|
|
3978
|
-
|
|
3979
|
-
closed_won: "closed_won";
|
|
3980
|
-
closed_lost: "closed_lost";
|
|
3981
|
-
interested: "interested";
|
|
3982
|
-
proposal: "proposal";
|
|
3983
|
-
closing: "closing";
|
|
4256
|
+
[x: string]: string;
|
|
3984
4257
|
}>>;
|
|
3985
4258
|
search: z.ZodOptional<z.ZodString>;
|
|
3986
4259
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -4015,14 +4288,20 @@ declare const DealSchemas: {
|
|
|
4015
4288
|
assigneeUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4016
4289
|
}, z.core.$strict>;
|
|
4017
4290
|
TransitionItemRequest: z.ZodObject<{
|
|
4018
|
-
pipelineKey: z.
|
|
4019
|
-
stageKey: z.
|
|
4020
|
-
|
|
4291
|
+
pipelineKey: z.ZodLiteral<string>;
|
|
4292
|
+
stageKey: z.ZodEnum<{
|
|
4293
|
+
[x: string]: string;
|
|
4294
|
+
}>;
|
|
4295
|
+
stateKey: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
4296
|
+
[x: string]: string;
|
|
4297
|
+
}>>>;
|
|
4021
4298
|
reason: z.ZodOptional<z.ZodString>;
|
|
4022
4299
|
expectedUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
4023
4300
|
}, z.core.$strict>;
|
|
4024
4301
|
TransitionDealStateRequest: z.ZodObject<{
|
|
4025
|
-
stateKey: z.
|
|
4302
|
+
stateKey: z.ZodEnum<{
|
|
4303
|
+
[x: string]: string;
|
|
4304
|
+
}>;
|
|
4026
4305
|
reason: z.ZodOptional<z.ZodString>;
|
|
4027
4306
|
expectedUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
4028
4307
|
}, z.core.$strict>;
|
|
@@ -4101,7 +4380,15 @@ declare const DealSchemas: {
|
|
|
4101
4380
|
title: z.ZodNullable<z.ZodString>;
|
|
4102
4381
|
headline: z.ZodNullable<z.ZodString>;
|
|
4103
4382
|
linkedin_url: z.ZodNullable<z.ZodString>;
|
|
4104
|
-
|
|
4383
|
+
processing_state: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
4384
|
+
status: z.ZodEnum<{
|
|
4385
|
+
error: "error";
|
|
4386
|
+
success: "success";
|
|
4387
|
+
no_result: "no_result";
|
|
4388
|
+
skipped: "skipped";
|
|
4389
|
+
}>;
|
|
4390
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
4391
|
+
}, z.core.$loose>>>;
|
|
4105
4392
|
enrichment_data: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4106
4393
|
company: z.ZodNullable<z.ZodObject<{
|
|
4107
4394
|
id: z.ZodString;
|
|
@@ -4215,7 +4502,15 @@ declare const DealSchemas: {
|
|
|
4215
4502
|
title: z.ZodNullable<z.ZodString>;
|
|
4216
4503
|
headline: z.ZodNullable<z.ZodString>;
|
|
4217
4504
|
linkedin_url: z.ZodNullable<z.ZodString>;
|
|
4218
|
-
|
|
4505
|
+
processing_state: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
4506
|
+
status: z.ZodEnum<{
|
|
4507
|
+
error: "error";
|
|
4508
|
+
success: "success";
|
|
4509
|
+
no_result: "no_result";
|
|
4510
|
+
skipped: "skipped";
|
|
4511
|
+
}>;
|
|
4512
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
4513
|
+
}, z.core.$loose>>>;
|
|
4219
4514
|
enrichment_data: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4220
4515
|
company: z.ZodNullable<z.ZodObject<{
|
|
4221
4516
|
id: z.ZodString;
|
|
@@ -4313,57 +4608,41 @@ declare const PipelineStageSchema: z.ZodObject<{
|
|
|
4313
4608
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
4314
4609
|
order: z.ZodOptional<z.ZodNumber>;
|
|
4315
4610
|
}, z.core.$strip>;
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4611
|
+
declare const BuildPlanSnapshotStepSchema: z.ZodObject<{
|
|
4612
|
+
id: z.ZodString;
|
|
4613
|
+
label: z.ZodString;
|
|
4614
|
+
description: z.ZodOptional<z.ZodString>;
|
|
4615
|
+
primaryEntity: z.ZodEnum<{
|
|
4616
|
+
company: "company";
|
|
4617
|
+
contact: "contact";
|
|
4618
|
+
}>;
|
|
4619
|
+
outputs: z.ZodArray<z.ZodEnum<{
|
|
4620
|
+
company: "company";
|
|
4621
|
+
contact: "contact";
|
|
4622
|
+
export: "export";
|
|
4623
|
+
}>>;
|
|
4624
|
+
stageKey: z.ZodString;
|
|
4625
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4626
|
+
dependencyMode: z.ZodLiteral<"per-record-eligibility">;
|
|
4627
|
+
capabilityKey: z.ZodString;
|
|
4628
|
+
defaultBatchSize: z.ZodNumber;
|
|
4629
|
+
maxBatchSize: z.ZodNumber;
|
|
4630
|
+
}, z.core.$strip>;
|
|
4327
4631
|
type PipelineStage = z.infer<typeof PipelineStageSchema>;
|
|
4328
4632
|
type ProcessingStageStatus = z.infer<typeof ProcessingStageStatusSchema>;
|
|
4329
4633
|
|
|
4330
4634
|
/** Raw database row type for acq_deals table */
|
|
4331
4635
|
type AcqDealRow = Database['public']['Tables']['acq_deals']['Row'];
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
acquired: boolean;
|
|
4337
|
-
enrichment: {
|
|
4338
|
-
[source: string]: {
|
|
4339
|
-
status: 'pending' | 'complete' | 'failed' | 'skipped';
|
|
4340
|
-
completedAt?: string;
|
|
4341
|
-
error?: string;
|
|
4342
|
-
};
|
|
4343
|
-
};
|
|
4344
|
-
}
|
|
4345
|
-
/**
|
|
4346
|
-
* Tracks pipeline status for a contact across all processing stages.
|
|
4347
|
-
*/
|
|
4348
|
-
interface ContactPipelineStatus {
|
|
4349
|
-
enrichment: {
|
|
4350
|
-
[source: string]: {
|
|
4351
|
-
status: 'pending' | 'complete' | 'failed' | 'skipped';
|
|
4352
|
-
completedAt?: string;
|
|
4353
|
-
error?: string;
|
|
4354
|
-
};
|
|
4355
|
-
};
|
|
4356
|
-
personalization: {
|
|
4357
|
-
status: 'pending' | 'complete' | 'failed' | 'skipped';
|
|
4358
|
-
completedAt?: string;
|
|
4359
|
-
};
|
|
4360
|
-
outreach: {
|
|
4361
|
-
status: 'pending' | 'sent' | 'replied' | 'bounced' | 'opted-out';
|
|
4362
|
-
sentAt?: string;
|
|
4363
|
-
channel?: string;
|
|
4364
|
-
campaignId?: string;
|
|
4365
|
-
};
|
|
4636
|
+
type LeadGenStageKey = (typeof LEAD_GEN_STAGE_CATALOG)[keyof typeof LEAD_GEN_STAGE_CATALOG]['key'];
|
|
4637
|
+
interface ProcessingStateEntry {
|
|
4638
|
+
status: ProcessingStageStatus;
|
|
4639
|
+
data?: unknown;
|
|
4366
4640
|
}
|
|
4641
|
+
type ProcessingState = Partial<Record<LeadGenStageKey, ProcessingStateEntry>>;
|
|
4642
|
+
type CompanyProcessingState = ProcessingState;
|
|
4643
|
+
type ContactProcessingState = ProcessingState;
|
|
4644
|
+
/** @deprecated Use `processingState`. Retained only as a compile-time/read-shape bridge for external tenants. */
|
|
4645
|
+
type LegacyPipelineStatus = unknown;
|
|
4367
4646
|
/**
|
|
4368
4647
|
* Enrichment data collected for a company from various sources.
|
|
4369
4648
|
*/
|
|
@@ -4516,7 +4795,9 @@ interface AcqCompany {
|
|
|
4516
4795
|
category: string | null;
|
|
4517
4796
|
categoryPain: string | null;
|
|
4518
4797
|
segment: string | null;
|
|
4519
|
-
|
|
4798
|
+
processingState: CompanyProcessingState | null;
|
|
4799
|
+
/** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
|
|
4800
|
+
pipelineStatus?: LegacyPipelineStatus | null;
|
|
4520
4801
|
enrichmentData: CompanyEnrichmentData | null;
|
|
4521
4802
|
source: string | null;
|
|
4522
4803
|
batchId: string | null;
|
|
@@ -4551,7 +4832,9 @@ interface AcqContact {
|
|
|
4551
4832
|
openingLine: string | null;
|
|
4552
4833
|
source: string | null;
|
|
4553
4834
|
sourceId: string | null;
|
|
4554
|
-
|
|
4835
|
+
processingState: ContactProcessingState | null;
|
|
4836
|
+
/** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
|
|
4837
|
+
pipelineStatus?: LegacyPipelineStatus | null;
|
|
4555
4838
|
enrichmentData: ContactEnrichmentData | null;
|
|
4556
4839
|
/** Attio Person record ID - set when contact responds and is added to CRM */
|
|
4557
4840
|
attioPersonId: string | null;
|
|
@@ -4578,7 +4861,7 @@ interface DealContact {
|
|
|
4578
4861
|
title: string | null;
|
|
4579
4862
|
headline: string | null;
|
|
4580
4863
|
linkedin_url: string | null;
|
|
4581
|
-
|
|
4864
|
+
processing_state: Record<string, unknown> | null;
|
|
4582
4865
|
enrichment_data: Record<string, unknown> | null;
|
|
4583
4866
|
company: {
|
|
4584
4867
|
id: string;
|
|
@@ -4667,6 +4950,8 @@ interface CreateCompanyParams {
|
|
|
4667
4950
|
source?: string;
|
|
4668
4951
|
batchId?: string;
|
|
4669
4952
|
verticalResearch?: string;
|
|
4953
|
+
/** @deprecated Use processingState. Accepted as a no-op compatibility bridge for external tenants. */
|
|
4954
|
+
pipelineStatus?: unknown;
|
|
4670
4955
|
}
|
|
4671
4956
|
interface UpdateCompanyParams {
|
|
4672
4957
|
name?: string;
|
|
@@ -4679,7 +4964,9 @@ interface UpdateCompanyParams {
|
|
|
4679
4964
|
locationState?: string;
|
|
4680
4965
|
category?: string;
|
|
4681
4966
|
segment?: string;
|
|
4682
|
-
|
|
4967
|
+
processingState?: ProcessingState;
|
|
4968
|
+
/** @deprecated Use processingState. Accepted as a no-op compatibility bridge for external tenants. */
|
|
4969
|
+
pipelineStatus?: unknown;
|
|
4683
4970
|
enrichmentData?: Record<string, unknown>;
|
|
4684
4971
|
source?: string;
|
|
4685
4972
|
batchId?: string;
|
|
@@ -4687,7 +4974,7 @@ interface UpdateCompanyParams {
|
|
|
4687
4974
|
verticalResearch?: string | null;
|
|
4688
4975
|
/** Track A: flat qualification score column (null until a scoring rubric is defined) */
|
|
4689
4976
|
qualificationScore?: number | null;
|
|
4690
|
-
/** Track A: flat qualification signals jsonb
|
|
4977
|
+
/** Track A: flat qualification signals jsonb */
|
|
4691
4978
|
qualificationSignals?: Record<string, unknown> | null;
|
|
4692
4979
|
/** Track A: key identifying the rubric used for qualification */
|
|
4693
4980
|
qualificationRubricKey?: string | null;
|
|
@@ -4700,13 +4987,15 @@ interface CompanyFilters {
|
|
|
4700
4987
|
website?: string;
|
|
4701
4988
|
segment?: string;
|
|
4702
4989
|
category?: string;
|
|
4703
|
-
|
|
4704
|
-
/**
|
|
4705
|
-
|
|
4990
|
+
processingState?: ProcessingState;
|
|
4991
|
+
/** @deprecated Use processingState. Accepted as a no-op compatibility bridge for external tenants. */
|
|
4992
|
+
pipelineStatus?: unknown;
|
|
4993
|
+
/** Exclude companies whose processing state contains this value (PostgREST NOT contains) */
|
|
4994
|
+
processingStateNot?: ProcessingState;
|
|
4706
4995
|
batchId?: string;
|
|
4707
4996
|
status?: 'active' | 'invalid';
|
|
4708
4997
|
includeAll?: boolean;
|
|
4709
|
-
excludeColumns?: Array<'enrichmentData' | '
|
|
4998
|
+
excludeColumns?: Array<'enrichmentData' | 'processingState'>;
|
|
4710
4999
|
limit?: number;
|
|
4711
5000
|
}
|
|
4712
5001
|
interface CreateContactParams {
|
|
@@ -4720,6 +5009,8 @@ interface CreateContactParams {
|
|
|
4720
5009
|
source?: string;
|
|
4721
5010
|
sourceId?: string;
|
|
4722
5011
|
batchId?: string;
|
|
5012
|
+
/** @deprecated Use processingState. Accepted as a no-op compatibility bridge for external tenants. */
|
|
5013
|
+
pipelineStatus?: unknown;
|
|
4723
5014
|
}
|
|
4724
5015
|
interface UpdateContactParams {
|
|
4725
5016
|
companyId?: string;
|
|
@@ -4731,7 +5022,9 @@ interface UpdateContactParams {
|
|
|
4731
5022
|
headline?: string;
|
|
4732
5023
|
filterReason?: string;
|
|
4733
5024
|
openingLine?: string;
|
|
4734
|
-
|
|
5025
|
+
processingState?: ProcessingState;
|
|
5026
|
+
/** @deprecated Use processingState. Accepted as a no-op compatibility bridge for external tenants. */
|
|
5027
|
+
pipelineStatus?: unknown;
|
|
4735
5028
|
enrichmentData?: Record<string, unknown>;
|
|
4736
5029
|
status?: 'active' | 'invalid';
|
|
4737
5030
|
}
|
|
@@ -4740,7 +5033,9 @@ interface ContactFilters {
|
|
|
4740
5033
|
listId?: string;
|
|
4741
5034
|
search?: string;
|
|
4742
5035
|
openingLineIsNull?: boolean;
|
|
4743
|
-
|
|
5036
|
+
processingState?: ProcessingState;
|
|
5037
|
+
/** @deprecated Use processingState. Accepted as a no-op compatibility bridge for external tenants. */
|
|
5038
|
+
pipelineStatus?: unknown;
|
|
4744
5039
|
batchId?: string;
|
|
4745
5040
|
contactStatus?: 'active' | 'invalid';
|
|
4746
5041
|
}
|
|
@@ -4998,6 +5293,18 @@ interface UpdateContactStageParams {
|
|
|
4998
5293
|
status?: ProcessingStageStatus;
|
|
4999
5294
|
executionId?: string;
|
|
5000
5295
|
}
|
|
5296
|
+
interface ListPendingCompanyIdsParams {
|
|
5297
|
+
organizationId: string;
|
|
5298
|
+
listId: string;
|
|
5299
|
+
stageKey: string;
|
|
5300
|
+
limit?: number;
|
|
5301
|
+
}
|
|
5302
|
+
interface ListPendingContactIdsParams {
|
|
5303
|
+
organizationId: string;
|
|
5304
|
+
listId: string;
|
|
5305
|
+
stageKey: string;
|
|
5306
|
+
limit?: number;
|
|
5307
|
+
}
|
|
5001
5308
|
interface AddCompaniesToListParams {
|
|
5002
5309
|
organizationId: string;
|
|
5003
5310
|
listId: string;
|
|
@@ -5035,7 +5342,7 @@ interface BulkImportCompanyEntry {
|
|
|
5035
5342
|
category?: string;
|
|
5036
5343
|
source?: string;
|
|
5037
5344
|
enrichmentData?: Record<string, unknown>;
|
|
5038
|
-
|
|
5345
|
+
processingState?: ProcessingState;
|
|
5039
5346
|
}
|
|
5040
5347
|
interface BulkImportCompaniesParams {
|
|
5041
5348
|
organizationId: string;
|
|
@@ -8082,6 +8389,14 @@ type ListToolMap = {
|
|
|
8082
8389
|
params: Omit<UpdateContactStageParams, 'organizationId'>;
|
|
8083
8390
|
result: void;
|
|
8084
8391
|
};
|
|
8392
|
+
listPendingCompanyIds: {
|
|
8393
|
+
params: Omit<ListPendingCompanyIdsParams, 'organizationId'>;
|
|
8394
|
+
result: string[];
|
|
8395
|
+
};
|
|
8396
|
+
listPendingContactIds: {
|
|
8397
|
+
params: Omit<ListPendingContactIdsParams, 'organizationId'>;
|
|
8398
|
+
result: string[];
|
|
8399
|
+
};
|
|
8085
8400
|
};
|
|
8086
8401
|
type PdfToolMap = {
|
|
8087
8402
|
render: {
|
|
@@ -9289,5 +9604,162 @@ declare class ToolingError extends ExecutionError {
|
|
|
9289
9604
|
constructor(errorType: string, message: string, details?: unknown);
|
|
9290
9605
|
}
|
|
9291
9606
|
|
|
9292
|
-
|
|
9293
|
-
|
|
9607
|
+
// ============================================================================
|
|
9608
|
+
// Lead-Gen Stateful Pipeline Definitions (Decision N8, Wave 4)
|
|
9609
|
+
//
|
|
9610
|
+
// Defines the (pipeline_key, stage_key, state_key) vocabulary for the three
|
|
9611
|
+
// entities that carry the Stateful trait via Track B:
|
|
9612
|
+
// - acq_lists (pipeline_key='lead-gen', stage_key='lifecycle')
|
|
9613
|
+
// - acq_list_members (pipeline_key='lead-gen', stages: outreach / prospecting / qualification)
|
|
9614
|
+
// - acq_list_companies (pipeline_key='lead-gen', stages: outreach / prospecting / qualification)
|
|
9615
|
+
//
|
|
9616
|
+
// DB columns (pipeline_key, stage_key, state_key) remain free-form text with no
|
|
9617
|
+
// CHECK constraint — new states can be introduced without a migration (Decision N8).
|
|
9618
|
+
// These definitions are the org-specific source of truth consumed by UI and tooling.
|
|
9619
|
+
//
|
|
9620
|
+
// State vocabularies sourced from the post-restructure sales tree (W3 canonical):
|
|
9621
|
+
// outreach/:
|
|
9622
|
+
// - personalized (instantly-personalization.ts → contacts)
|
|
9623
|
+
// - uploaded (instantly-upload.ts → contacts)
|
|
9624
|
+
// - interested (instantly-reply-handler.ts → contacts, initial reply transition)
|
|
9625
|
+
// prospecting/:
|
|
9626
|
+
// - populated (apify-acquire.ts, apify-scrape.ts → companies)
|
|
9627
|
+
// - extracted (website-extract.ts → companies)
|
|
9628
|
+
// - discovered (email-discovery.ts, anymailfinder-enrich.ts → contacts)
|
|
9629
|
+
// - verified (email-verification.ts → contacts)
|
|
9630
|
+
// qualification/:
|
|
9631
|
+
// - qualified (company-qualification.ts → companies)
|
|
9632
|
+
//
|
|
9633
|
+
// The 'pending' state is the W2 backfill default (coalesce(stage, 'pending')).
|
|
9634
|
+
// It is valid in any stage and represents "not yet processed by a workflow step".
|
|
9635
|
+
// ============================================================================
|
|
9636
|
+
|
|
9637
|
+
/** One state within a stage — minimal shape: key + display label. */
|
|
9638
|
+
interface StatefulStateDefinition {
|
|
9639
|
+
/** Matches state_key values written by workflow steps. */
|
|
9640
|
+
stateKey: string
|
|
9641
|
+
label: string
|
|
9642
|
+
}
|
|
9643
|
+
|
|
9644
|
+
/** One stage within a pipeline — has a stage_key and an ordered list of valid states. */
|
|
9645
|
+
interface StatefulStageDefinition {
|
|
9646
|
+
/** Matches stage_key values written by workflow steps. */
|
|
9647
|
+
stageKey: string
|
|
9648
|
+
label: string
|
|
9649
|
+
/** UI color token. Consumers may map this to their design system. */
|
|
9650
|
+
color?: string
|
|
9651
|
+
states: StatefulStateDefinition[]
|
|
9652
|
+
}
|
|
9653
|
+
|
|
9654
|
+
/**
|
|
9655
|
+
* Pipeline definition for a single entity participating in the Stateful trait.
|
|
9656
|
+
* Parallel to acq_deals' pipeline_key concept but structured for lead-gen entities.
|
|
9657
|
+
*/
|
|
9658
|
+
interface StatefulPipelineDefinition {
|
|
9659
|
+
/** Matches pipeline_key values in the database (e.g. 'lead-gen'). */
|
|
9660
|
+
pipelineKey: string
|
|
9661
|
+
label: string
|
|
9662
|
+
/** Entity this pipeline applies to (e.g. 'acq.list', 'acq.list-member', 'acq.list-company'). */
|
|
9663
|
+
entityKey: string
|
|
9664
|
+
stages: StatefulStageDefinition[]
|
|
9665
|
+
}
|
|
9666
|
+
|
|
9667
|
+
// ============================================================================
|
|
9668
|
+
// CRM Stateful Pipeline Definition
|
|
9669
|
+
//
|
|
9670
|
+
// Defines the (pipeline_key, stage_key, state_key) vocabulary for crm.deal
|
|
9671
|
+
// entities. Stage keys match DEFAULT_ORGANIZATION_MODEL_SALES.pipelines[0].stages.
|
|
9672
|
+
//
|
|
9673
|
+
// State vocabularies sourced from the CRM action/handler tree:
|
|
9674
|
+
// interested/:
|
|
9675
|
+
// - discovery_replied (instantly-reply-handler.ts → first/subsequent reply)
|
|
9676
|
+
// - discovery_link_sent (crm-send-booking-link.ts, crm-rebook.ts → booking link sent)
|
|
9677
|
+
// - discovery_nudging (crm-send-nudge.ts → nudge sent after link)
|
|
9678
|
+
// - discovery_booking_cancelled (booking-revert.ts → Cal cancellation webhook)
|
|
9679
|
+
// - reply_sent (crm-send-reply.ts → operator reply sent)
|
|
9680
|
+
// - followup_1_sent (crm-reply-followup.ts day=3)
|
|
9681
|
+
// - followup_2_sent (crm-reply-followup.ts day=5)
|
|
9682
|
+
// - followup_3_sent (crm-reply-followup.ts day=7)
|
|
9683
|
+
// proposal, closing, closed_won, closed_lost, nurturing: no observed sub-states
|
|
9684
|
+
// ============================================================================
|
|
9685
|
+
|
|
9686
|
+
declare const CRM_DISCOVERY_REPLIED_STATE: StatefulStateDefinition = {
|
|
9687
|
+
stateKey: 'discovery_replied',
|
|
9688
|
+
label: 'Discovery Replied'
|
|
9689
|
+
}
|
|
9690
|
+
declare const CRM_DISCOVERY_LINK_SENT_STATE: StatefulStateDefinition = {
|
|
9691
|
+
stateKey: 'discovery_link_sent',
|
|
9692
|
+
label: 'Discovery Link Sent'
|
|
9693
|
+
}
|
|
9694
|
+
declare const CRM_DISCOVERY_NUDGING_STATE: StatefulStateDefinition = {
|
|
9695
|
+
stateKey: 'discovery_nudging',
|
|
9696
|
+
label: 'Discovery Nudging'
|
|
9697
|
+
}
|
|
9698
|
+
declare const CRM_DISCOVERY_BOOKING_CANCELLED_STATE: StatefulStateDefinition = {
|
|
9699
|
+
stateKey: 'discovery_booking_cancelled',
|
|
9700
|
+
label: 'Discovery Booking Cancelled'
|
|
9701
|
+
}
|
|
9702
|
+
declare const CRM_REPLY_SENT_STATE: StatefulStateDefinition = {
|
|
9703
|
+
stateKey: 'reply_sent',
|
|
9704
|
+
label: 'Reply Sent'
|
|
9705
|
+
}
|
|
9706
|
+
declare const CRM_FOLLOWUP_1_SENT_STATE: StatefulStateDefinition = {
|
|
9707
|
+
stateKey: 'followup_1_sent',
|
|
9708
|
+
label: 'Follow-up 1 Sent'
|
|
9709
|
+
}
|
|
9710
|
+
declare const CRM_FOLLOWUP_2_SENT_STATE: StatefulStateDefinition = {
|
|
9711
|
+
stateKey: 'followup_2_sent',
|
|
9712
|
+
label: 'Follow-up 2 Sent'
|
|
9713
|
+
}
|
|
9714
|
+
declare const CRM_FOLLOWUP_3_SENT_STATE: StatefulStateDefinition = {
|
|
9715
|
+
stateKey: 'followup_3_sent',
|
|
9716
|
+
label: 'Follow-up 3 Sent'
|
|
9717
|
+
}
|
|
9718
|
+
|
|
9719
|
+
declare const CRM_PIPELINE_DEFINITION: StatefulPipelineDefinition = {
|
|
9720
|
+
pipelineKey: 'crm',
|
|
9721
|
+
label: 'CRM',
|
|
9722
|
+
entityKey: 'crm.deal',
|
|
9723
|
+
stages: [
|
|
9724
|
+
{
|
|
9725
|
+
stageKey: 'interested',
|
|
9726
|
+
label: 'Interested',
|
|
9727
|
+
color: 'blue',
|
|
9728
|
+
states: [
|
|
9729
|
+
CRM_DISCOVERY_REPLIED_STATE,
|
|
9730
|
+
CRM_DISCOVERY_LINK_SENT_STATE,
|
|
9731
|
+
CRM_DISCOVERY_NUDGING_STATE,
|
|
9732
|
+
CRM_DISCOVERY_BOOKING_CANCELLED_STATE,
|
|
9733
|
+
CRM_REPLY_SENT_STATE,
|
|
9734
|
+
CRM_FOLLOWUP_1_SENT_STATE,
|
|
9735
|
+
CRM_FOLLOWUP_2_SENT_STATE,
|
|
9736
|
+
CRM_FOLLOWUP_3_SENT_STATE
|
|
9737
|
+
]
|
|
9738
|
+
},
|
|
9739
|
+
{ stageKey: 'proposal', label: 'Proposal', color: 'yellow', states: [] },
|
|
9740
|
+
{ stageKey: 'closing', label: 'Closing', color: 'orange', states: [] },
|
|
9741
|
+
{ stageKey: 'closed_won', label: 'Closed Won', color: 'green', states: [] },
|
|
9742
|
+
{ stageKey: 'closed_lost', label: 'Closed Lost', color: 'red', states: [] },
|
|
9743
|
+
{ stageKey: 'nurturing', label: 'Nurturing', color: 'grape', states: [] }
|
|
9744
|
+
]
|
|
9745
|
+
}
|
|
9746
|
+
|
|
9747
|
+
declare const CrmStageKeySchema = z.enum(crmStageKeys)
|
|
9748
|
+
declare const CrmStateKeySchema = z.enum(crmStateKeys)
|
|
9749
|
+
type CrmStageKey = z.infer<typeof CrmStageKeySchema>
|
|
9750
|
+
type CrmStateKey = z.infer<typeof CrmStateKeySchema>
|
|
9751
|
+
|
|
9752
|
+
/**
|
|
9753
|
+
* @elevasis/sdk - Types and utilities for building Elevasis organization resources
|
|
9754
|
+
*
|
|
9755
|
+
* All types are re-exported from @repo/core and inlined at build time
|
|
9756
|
+
* via rollup-plugin-dts. External consumers never see @repo/core.
|
|
9757
|
+
*/
|
|
9758
|
+
|
|
9759
|
+
declare const ListBuilderStageKeySchema: z.ZodEnum<{
|
|
9760
|
+
[x: string]: string;
|
|
9761
|
+
}>;
|
|
9762
|
+
type ListBuilderStageKey = z.infer<typeof ListBuilderStageKeySchema>;
|
|
9763
|
+
|
|
9764
|
+
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, CRM_PIPELINE_DEFINITION, CrmStageKeySchema, CrmStateKeySchema, DEFAULT_CRM_ACTIONS, EmailSchema, ExecutionError, LEAD_GEN_STAGE_CATALOG, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, deriveActions };
|
|
9765
|
+
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, BuildPlanSnapshotStep, 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, CrmStageKey, CrmStateKey, 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, ListBuilderStageKey, ListBuilderStep, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, PaginatedResult, PaginationParams, PdfToolMap, ProcessingStageStatus, 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 };
|