@elevasis/sdk 1.18.0 → 1.20.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.
Files changed (58) hide show
  1. package/dist/cli.cjs +1915 -70
  2. package/dist/index.d.ts +825 -16
  3. package/dist/index.js +714 -63
  4. package/dist/node/index.d.ts +1 -0
  5. package/dist/node/index.js +213 -2
  6. package/dist/test-utils/index.d.ts +479 -14
  7. package/dist/test-utils/index.js +660 -54
  8. package/dist/worker/index.js +516 -54
  9. package/package.json +4 -4
  10. package/reference/_navigation.md +2 -1
  11. package/reference/_reference-manifest.json +14 -0
  12. package/reference/claude-config/registries/graph-skills.json +4 -0
  13. package/reference/claude-config/rules/agent-start-here.md +5 -5
  14. package/reference/claude-config/rules/deployment.md +4 -3
  15. package/reference/claude-config/rules/frontend.md +2 -2
  16. package/reference/claude-config/rules/operations.md +17 -13
  17. package/reference/claude-config/rules/organization-model.md +7 -5
  18. package/reference/claude-config/rules/organization-os.md +13 -11
  19. package/reference/claude-config/rules/ui.md +3 -3
  20. package/reference/claude-config/rules/vibe.md +4 -4
  21. package/reference/claude-config/skills/explore/SKILL.md +4 -4
  22. package/reference/claude-config/skills/knowledge/SKILL.md +17 -16
  23. package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +7 -7
  24. package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +13 -13
  25. package/reference/claude-config/skills/knowledge/operations/customers.md +1 -1
  26. package/reference/claude-config/skills/knowledge/operations/goals.md +1 -1
  27. package/reference/claude-config/skills/knowledge/operations/identity.md +1 -1
  28. package/reference/claude-config/skills/knowledge/operations/offerings.md +1 -1
  29. package/reference/claude-config/skills/knowledge/operations/roles.md +1 -1
  30. package/reference/claude-config/skills/knowledge/operations/techStack.md +19 -91
  31. package/reference/claude-config/skills/project/SKILL.md +73 -13
  32. package/reference/claude-config/skills/save/SKILL.md +5 -5
  33. package/reference/claude-config/skills/tutorial/technical.md +11 -14
  34. package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -0
  35. package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -0
  36. package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -0
  37. package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -0
  38. package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -0
  39. package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -0
  40. package/reference/examples/organization-model.ts +17 -5
  41. package/reference/framework/index.mdx +1 -1
  42. package/reference/framework/project-structure.mdx +10 -8
  43. package/reference/packages/core/src/business/README.md +2 -2
  44. package/reference/packages/core/src/organization-model/README.md +10 -3
  45. package/reference/resources/index.mdx +27 -17
  46. package/reference/scaffold/core/organization-model.mdx +33 -14
  47. package/reference/scaffold/operations/workflow-recipes.md +35 -29
  48. package/reference/scaffold/recipes/add-a-feature.md +18 -3
  49. package/reference/scaffold/recipes/add-a-resource.md +50 -10
  50. package/reference/scaffold/recipes/customize-crm-actions.md +12 -6
  51. package/reference/scaffold/recipes/customize-organization-model.md +18 -3
  52. package/reference/scaffold/recipes/extend-crm.md +17 -19
  53. package/reference/scaffold/recipes/extend-lead-gen.md +31 -31
  54. package/reference/scaffold/recipes/index.md +1 -1
  55. package/reference/scaffold/reference/contracts.md +512 -307
  56. package/reference/scaffold/reference/feature-registry.md +1 -1
  57. package/reference/scaffold/reference/glossary.md +8 -3
  58. package/reference/scaffold/ui/recipes.md +21 -6
@@ -4621,6 +4621,7 @@ var ORGANIZATION_MODEL_ICON_TOKENS = [
4621
4621
  "knowledge.reference",
4622
4622
  "feature.dashboard",
4623
4623
  "feature.calendar",
4624
+ "feature.business",
4624
4625
  "feature.sales",
4625
4626
  "feature.crm",
4626
4627
  "feature.finance",
@@ -4742,6 +4743,63 @@ z.object({
4742
4743
  defaultPipelineId: ModelIdSchema,
4743
4744
  pipelines: z.array(SalesPipelineSchema).min(1)
4744
4745
  });
4746
+ var CRM_DISCOVERY_REPLIED_STATE = {
4747
+ stateKey: "discovery_replied",
4748
+ label: "Discovery Replied"
4749
+ };
4750
+ var CRM_DISCOVERY_LINK_SENT_STATE = {
4751
+ stateKey: "discovery_link_sent",
4752
+ label: "Discovery Link Sent"
4753
+ };
4754
+ var CRM_DISCOVERY_NUDGING_STATE = {
4755
+ stateKey: "discovery_nudging",
4756
+ label: "Discovery Nudging"
4757
+ };
4758
+ var CRM_DISCOVERY_BOOKING_CANCELLED_STATE = {
4759
+ stateKey: "discovery_booking_cancelled",
4760
+ label: "Discovery Booking Cancelled"
4761
+ };
4762
+ var CRM_REPLY_SENT_STATE = {
4763
+ stateKey: "reply_sent",
4764
+ label: "Reply Sent"
4765
+ };
4766
+ var CRM_FOLLOWUP_1_SENT_STATE = {
4767
+ stateKey: "followup_1_sent",
4768
+ label: "Follow-up 1 Sent"
4769
+ };
4770
+ var CRM_FOLLOWUP_2_SENT_STATE = {
4771
+ stateKey: "followup_2_sent",
4772
+ label: "Follow-up 2 Sent"
4773
+ };
4774
+ var CRM_FOLLOWUP_3_SENT_STATE = {
4775
+ stateKey: "followup_3_sent",
4776
+ label: "Follow-up 3 Sent"
4777
+ };
4778
+ var CRM_PIPELINE_DEFINITION = {
4779
+ pipelineKey: "crm",
4780
+ stages: [
4781
+ {
4782
+ stageKey: "interested",
4783
+ label: "Interested",
4784
+ color: "blue",
4785
+ states: [
4786
+ CRM_DISCOVERY_REPLIED_STATE,
4787
+ CRM_DISCOVERY_LINK_SENT_STATE,
4788
+ CRM_DISCOVERY_NUDGING_STATE,
4789
+ CRM_DISCOVERY_BOOKING_CANCELLED_STATE,
4790
+ CRM_REPLY_SENT_STATE,
4791
+ CRM_FOLLOWUP_1_SENT_STATE,
4792
+ CRM_FOLLOWUP_2_SENT_STATE,
4793
+ CRM_FOLLOWUP_3_SENT_STATE
4794
+ ]
4795
+ },
4796
+ { stageKey: "proposal", label: "Proposal", color: "yellow", states: [] },
4797
+ { stageKey: "closing", label: "Closing", color: "orange", states: [] },
4798
+ { stageKey: "closed_won", label: "Closed Won", color: "green", states: [] },
4799
+ { stageKey: "closed_lost", label: "Closed Lost", color: "red", states: [] },
4800
+ { stageKey: "nurturing", label: "Nurturing", color: "grape", states: [] }
4801
+ ]
4802
+ };
4745
4803
  var LEAD_GEN_STAGE_CATALOG = {
4746
4804
  // Prospecting — company population
4747
4805
  scraped: {
@@ -4758,6 +4816,13 @@ var LEAD_GEN_STAGE_CATALOG = {
4758
4816
  order: 2,
4759
4817
  entity: "company"
4760
4818
  },
4819
+ crawled: {
4820
+ key: "crawled",
4821
+ label: "Websites crawled",
4822
+ description: "Company websites have been crawled (e.g. via Apify) and raw page content stored for downstream LLM analysis.",
4823
+ order: 2.5,
4824
+ entity: "company"
4825
+ },
4761
4826
  extracted: {
4762
4827
  key: "extracted",
4763
4828
  label: "Websites analyzed",
@@ -4777,7 +4842,9 @@ var LEAD_GEN_STAGE_CATALOG = {
4777
4842
  label: "Decision-makers found",
4778
4843
  description: "Decision-maker contacts discovered and attached to a qualified company.",
4779
4844
  order: 6,
4780
- entity: "company"
4845
+ entity: "company",
4846
+ recordEntity: "contact",
4847
+ recordStageKey: "discovered"
4781
4848
  },
4782
4849
  // Prospecting — contact discovery
4783
4850
  discovered: {
@@ -4815,7 +4882,8 @@ var LEAD_GEN_STAGE_CATALOG = {
4815
4882
  label: "Reviewed and exported",
4816
4883
  description: "Approved records have been reviewed and exported for handoff.",
4817
4884
  order: 10,
4818
- entity: "contact"
4885
+ entity: "company",
4886
+ additionalEntities: ["contact"]
4819
4887
  },
4820
4888
  interested: {
4821
4889
  key: "interested",
@@ -4829,18 +4897,47 @@ var LEAD_GEN_STAGE_CATALOG = {
4829
4897
  // ../core/src/organization-model/domains/prospecting.ts
4830
4898
  var ProspectingLifecycleStageSchema = DisplayMetadataSchema.extend({
4831
4899
  id: ModelIdSchema,
4832
- order: z.number().int().min(0)
4900
+ order: z.number().min(0)
4901
+ });
4902
+ var RecordColumnConfigSchema = z.object({
4903
+ key: ModelIdSchema,
4904
+ label: z.string().trim().min(1).max(120),
4905
+ path: z.string().trim().min(1).max(500),
4906
+ width: z.union([z.number().positive(), z.string().trim().min(1).max(100)]).optional(),
4907
+ renderType: z.enum(["text", "badge", "datetime", "count", "json"]).optional(),
4908
+ badgeColor: z.string().trim().min(1).max(40).optional()
4909
+ });
4910
+ var RecordColumnsConfigSchema = z.object({
4911
+ company: z.array(RecordColumnConfigSchema).optional(),
4912
+ contact: z.array(RecordColumnConfigSchema).optional()
4913
+ }).refine((columns) => Boolean(columns.company?.length || columns.contact?.length), {
4914
+ message: "recordColumns must include at least one entity column set"
4915
+ });
4916
+ var CredentialRequirementSchema = z.object({
4917
+ key: ModelIdSchema,
4918
+ provider: ModelIdSchema,
4919
+ credentialType: z.enum(["api-key", "api-key-secret", "oauth", "webhook-secret"]),
4920
+ label: z.string().trim().min(1).max(120),
4921
+ required: z.boolean(),
4922
+ selectionMode: z.enum(["single", "multiple"]).optional(),
4923
+ inputPath: z.string().trim().min(1).max(500),
4924
+ verifyOnRun: z.boolean().optional()
4833
4925
  });
4834
4926
  var ProspectingBuildTemplateStepSchema = DisplayMetadataSchema.extend({
4835
4927
  id: ModelIdSchema,
4836
4928
  primaryEntity: z.enum(["company", "contact"]),
4837
4929
  outputs: z.array(z.enum(["company", "contact", "export"])).min(1),
4838
4930
  stageKey: ModelIdSchema,
4931
+ recordEntity: z.enum(["company", "contact"]).optional(),
4932
+ recordsStageKey: ModelIdSchema.optional(),
4933
+ recordSourceStageKey: ModelIdSchema.optional(),
4839
4934
  dependsOn: z.array(ModelIdSchema).optional(),
4840
4935
  dependencyMode: z.literal("per-record-eligibility"),
4841
4936
  capabilityKey: ModelIdSchema,
4842
4937
  defaultBatchSize: z.number().int().positive(),
4843
- maxBatchSize: z.number().int().positive()
4938
+ maxBatchSize: z.number().int().positive(),
4939
+ recordColumns: RecordColumnsConfigSchema.optional(),
4940
+ credentialRequirements: z.array(CredentialRequirementSchema).optional()
4844
4941
  }).refine((step) => step.defaultBatchSize <= step.maxBatchSize, {
4845
4942
  message: "defaultBatchSize must be less than or equal to maxBatchSize",
4846
4943
  path: ["defaultBatchSize"]
@@ -4849,20 +4946,148 @@ var ProspectingBuildTemplateSchema = DisplayMetadataSchema.extend({
4849
4946
  id: ModelIdSchema,
4850
4947
  steps: z.array(ProspectingBuildTemplateStepSchema).min(1)
4851
4948
  });
4852
- var CAPABILITY_REGISTRY = {
4853
- "lead-gen.company.source": "lgn-import-workflow",
4854
- "lead-gen.company.apollo-import": "lgn-01c-apollo-import-workflow",
4855
- "lead-gen.contact.discover": "lgn-04-email-discovery-workflow",
4856
- "lead-gen.contact.verify-email": "lgn-05-email-verification-workflow",
4857
- "lead-gen.company.website-extract": "lgn-02-website-extract-workflow",
4858
- "lead-gen.company.qualify": "lgn-03-company-qualification-workflow",
4859
- "lead-gen.company.dtc-subscription-qualify": "lgn-03b-dtc-subscription-score-workflow",
4860
- "lead-gen.contact.apollo-decision-maker-enrich": "lgn-04b-apollo-decision-maker-enrich-workflow",
4861
- "lead-gen.contact.personalize": "ist-personalization-workflow",
4862
- "lead-gen.review.outreach-ready": "ist-upload-contacts-workflow",
4863
- "lead-gen.export.list": "lgn-06-export-list-workflow",
4864
- "lead-gen.company.cleanup": "lgn-company-cleanup-workflow"
4949
+ var DTC_RECORD_COLUMNS = {
4950
+ populated: {
4951
+ company: [
4952
+ { key: "name", label: "Company", path: "company.name" },
4953
+ { key: "domain", label: "Domain", path: "company.domain" },
4954
+ { key: "employee-count", label: "Employees", path: "company.numEmployees", renderType: "count" },
4955
+ { key: "apollo-industry", label: "Apollo industry", path: "company.category" },
4956
+ { key: "location", label: "Location", path: "company.locationState" }
4957
+ ]
4958
+ },
4959
+ crawled: {
4960
+ company: [
4961
+ { key: "name", label: "Company", path: "company.name" },
4962
+ { key: "domain", label: "Domain", path: "company.domain" },
4963
+ { key: "page-count", label: "Pages", path: "company.enrichmentData.websiteCrawl.pageCount", renderType: "count" },
4964
+ { key: "crawl-status", label: "Crawl status", path: "processingState.crawled.status", renderType: "badge" }
4965
+ ]
4966
+ },
4967
+ extracted: {
4968
+ company: [
4969
+ { key: "name", label: "Company", path: "company.name" },
4970
+ { key: "domain", label: "Domain", path: "company.domain" },
4971
+ { key: "description", label: "Description", path: "company.enrichmentData.websiteCrawl.companyDescription" },
4972
+ { key: "services", label: "Services", path: "company.enrichmentData.websiteCrawl.services", renderType: "json" },
4973
+ { key: "automation-gaps", label: "Automation gaps", path: "company.enrichmentData.websiteCrawl.automationGaps", renderType: "json" },
4974
+ { key: "contact-count", label: "Contacts", path: "company.enrichmentData.websiteCrawl.emailCount", renderType: "count" }
4975
+ ]
4976
+ },
4977
+ qualified: {
4978
+ company: [
4979
+ { key: "name", label: "Company", path: "company.name" },
4980
+ { key: "domain", label: "Domain", path: "company.domain" },
4981
+ { key: "score", label: "Score", path: "company.qualificationScore", renderType: "badge", badgeColor: "green" },
4982
+ { key: "signals", label: "Signals", path: "company.qualificationSignals", renderType: "json" },
4983
+ { key: "disqualified-reason", label: "Disqualified reason", path: "processingState.qualified.data.disqualifiedReason" }
4984
+ ]
4985
+ },
4986
+ decisionMakers: {
4987
+ contact: [
4988
+ { key: "name", label: "Name", path: "contact.name" },
4989
+ { key: "title", label: "Title", path: "contact.title" },
4990
+ { key: "email", label: "Email", path: "contact.email" },
4991
+ { key: "linkedin", label: "LinkedIn", path: "contact.linkedinUrl" },
4992
+ { key: "priority-score", label: "Priority", path: "contact.enrichmentData.apollo.priorityScore", renderType: "badge" }
4993
+ ]
4994
+ },
4995
+ uploaded: {
4996
+ company: [
4997
+ { key: "name", label: "Company", path: "company.name" },
4998
+ { key: "domain", label: "Domain", path: "company.domain" },
4999
+ { key: "contacts", label: "Contacts", path: "company.enrichmentData.approvedLeadListExport.contacts", renderType: "json" },
5000
+ { key: "score", label: "Score", path: "company.qualificationScore", renderType: "badge", badgeColor: "green" },
5001
+ { key: "approval", label: "Approval", path: "company.enrichmentData.approvedLeadListExport.approvalStatus", renderType: "badge" }
5002
+ ]
5003
+ }
4865
5004
  };
5005
+ z.object({
5006
+ id: ModelIdSchema,
5007
+ label: z.string(),
5008
+ description: z.string(),
5009
+ resourceId: ModelIdSchema
5010
+ });
5011
+ var CAPABILITY_REGISTRY = [
5012
+ {
5013
+ id: "lead-gen.company.source",
5014
+ label: "Source companies",
5015
+ description: "Import source companies from a list provider.",
5016
+ resourceId: "lgn-import-workflow"
5017
+ },
5018
+ {
5019
+ id: "lead-gen.company.apollo-import",
5020
+ label: "Import from Apollo",
5021
+ description: "Pull companies and seed contact data from an Apollo search or list.",
5022
+ resourceId: "lgn-01c-apollo-import-workflow"
5023
+ },
5024
+ {
5025
+ id: "lead-gen.contact.discover",
5026
+ label: "Discover contact emails",
5027
+ description: "Find email addresses for contacts at qualified companies.",
5028
+ resourceId: "lgn-04-email-discovery-workflow"
5029
+ },
5030
+ {
5031
+ id: "lead-gen.contact.verify-email",
5032
+ label: "Verify emails",
5033
+ description: "Check email deliverability before outreach.",
5034
+ resourceId: "lgn-05-email-verification-workflow"
5035
+ },
5036
+ {
5037
+ id: "lead-gen.company.apify-crawl",
5038
+ label: "Crawl websites",
5039
+ description: "Crawl company websites via Apify and store raw page markdown in enrichmentData.websiteCrawl.pages for downstream LLM analysis.",
5040
+ resourceId: "lgn-02a-apify-website-crawl-workflow"
5041
+ },
5042
+ {
5043
+ id: "lead-gen.company.website-extract",
5044
+ label: "Extract website signals",
5045
+ description: "Scrape and analyze company websites for qualification signals.",
5046
+ resourceId: "lgn-02-website-extract-workflow"
5047
+ },
5048
+ {
5049
+ id: "lead-gen.company.qualify",
5050
+ label: "Qualify companies",
5051
+ description: "Score and filter companies against the ICP rubric.",
5052
+ resourceId: "lgn-03-company-qualification-workflow"
5053
+ },
5054
+ {
5055
+ id: "lead-gen.company.dtc-subscription-qualify",
5056
+ label: "Qualify DTC subscription fit",
5057
+ description: "Classify subscription potential and consumable-product fit for DTC brands.",
5058
+ resourceId: "lgn-03b-dtc-subscription-score-workflow"
5059
+ },
5060
+ {
5061
+ id: "lead-gen.contact.apollo-decision-maker-enrich",
5062
+ label: "Enrich decision-makers",
5063
+ description: "Find and enrich qualified contacts at qualified companies via Apollo.",
5064
+ resourceId: "lgn-04b-apollo-decision-maker-enrich-workflow"
5065
+ },
5066
+ {
5067
+ id: "lead-gen.contact.personalize",
5068
+ label: "Personalize outreach",
5069
+ description: "Generate personalized opening lines for each contact.",
5070
+ resourceId: "ist-personalization-workflow"
5071
+ },
5072
+ {
5073
+ id: "lead-gen.review.outreach-ready",
5074
+ label: "Upload to outreach",
5075
+ description: "Upload approved contacts to the outreach sequence after QC review.",
5076
+ resourceId: "ist-upload-contacts-workflow"
5077
+ },
5078
+ {
5079
+ id: "lead-gen.export.list",
5080
+ label: "Export lead list",
5081
+ description: "Export approved leads as a downloadable lead list.",
5082
+ resourceId: "lgn-06-export-list-workflow"
5083
+ },
5084
+ {
5085
+ id: "lead-gen.company.cleanup",
5086
+ label: "Clean up companies",
5087
+ description: "Remove disqualified or duplicate companies from the list.",
5088
+ resourceId: "lgn-company-cleanup-workflow"
5089
+ }
5090
+ ];
4866
5091
  var PROSPECTING_STEPS = {
4867
5092
  localServices: {
4868
5093
  sourceCompanies: {
@@ -4960,7 +5185,45 @@ var PROSPECTING_STEPS = {
4960
5185
  dependencyMode: "per-record-eligibility",
4961
5186
  capabilityKey: "lead-gen.company.apollo-import",
4962
5187
  defaultBatchSize: 250,
4963
- maxBatchSize: 1e3
5188
+ maxBatchSize: 1e3,
5189
+ recordColumns: DTC_RECORD_COLUMNS.populated,
5190
+ credentialRequirements: [
5191
+ {
5192
+ key: "apollo",
5193
+ provider: "apollo",
5194
+ credentialType: "api-key-secret",
5195
+ label: "Apollo API key",
5196
+ required: true,
5197
+ selectionMode: "single",
5198
+ inputPath: "credential"
5199
+ }
5200
+ ]
5201
+ },
5202
+ apifyCrawl: {
5203
+ id: "apify-crawl",
5204
+ label: "Websites crawled",
5205
+ description: "Crawl company websites via Apify and store raw page markdown in enrichmentData.websiteCrawl.pages for downstream LLM analysis. Overwrites the synthetic seed Apollo Import wrote with real page content.",
5206
+ primaryEntity: "company",
5207
+ outputs: ["company"],
5208
+ stageKey: "crawled",
5209
+ dependsOn: ["import-apollo-search"],
5210
+ dependencyMode: "per-record-eligibility",
5211
+ capabilityKey: "lead-gen.company.apify-crawl",
5212
+ defaultBatchSize: 50,
5213
+ maxBatchSize: 100,
5214
+ recordColumns: DTC_RECORD_COLUMNS.crawled,
5215
+ credentialRequirements: [
5216
+ {
5217
+ key: "apify",
5218
+ provider: "apify",
5219
+ credentialType: "api-key-secret",
5220
+ label: "Apify API token",
5221
+ required: true,
5222
+ selectionMode: "single",
5223
+ inputPath: "credential",
5224
+ verifyOnRun: true
5225
+ }
5226
+ ]
4964
5227
  },
4965
5228
  analyzeWebsites: {
4966
5229
  id: "analyze-websites",
@@ -4969,11 +5232,12 @@ var PROSPECTING_STEPS = {
4969
5232
  primaryEntity: "company",
4970
5233
  outputs: ["company"],
4971
5234
  stageKey: "extracted",
4972
- dependsOn: ["import-apollo-search"],
5235
+ dependsOn: ["apify-crawl"],
4973
5236
  dependencyMode: "per-record-eligibility",
4974
5237
  capabilityKey: "lead-gen.company.website-extract",
4975
5238
  defaultBatchSize: 50,
4976
- maxBatchSize: 100
5239
+ maxBatchSize: 100,
5240
+ recordColumns: DTC_RECORD_COLUMNS.extracted
4977
5241
  },
4978
5242
  scoreDtcFit: {
4979
5243
  id: "score-dtc-fit",
@@ -4986,7 +5250,8 @@ var PROSPECTING_STEPS = {
4986
5250
  dependencyMode: "per-record-eligibility",
4987
5251
  capabilityKey: "lead-gen.company.dtc-subscription-qualify",
4988
5252
  defaultBatchSize: 100,
4989
- maxBatchSize: 250
5253
+ maxBatchSize: 250,
5254
+ recordColumns: DTC_RECORD_COLUMNS.qualified
4990
5255
  },
4991
5256
  enrichDecisionMakers: {
4992
5257
  id: "enrich-decision-makers",
@@ -4995,37 +5260,52 @@ var PROSPECTING_STEPS = {
4995
5260
  primaryEntity: "company",
4996
5261
  outputs: ["contact"],
4997
5262
  stageKey: "decision-makers-enriched",
5263
+ recordEntity: "contact",
4998
5264
  dependsOn: ["score-dtc-fit"],
4999
5265
  dependencyMode: "per-record-eligibility",
5000
5266
  capabilityKey: "lead-gen.contact.apollo-decision-maker-enrich",
5001
5267
  defaultBatchSize: 100,
5002
- maxBatchSize: 250
5003
- },
5004
- verifyEmails: {
5005
- id: "verify-emails",
5006
- label: "Emails verified",
5007
- description: "Verify deliverability before the QC and handoff step.",
5008
- primaryEntity: "contact",
5009
- outputs: ["contact"],
5010
- stageKey: "verified",
5011
- dependsOn: ["enrich-decision-makers"],
5012
- dependencyMode: "per-record-eligibility",
5013
- capabilityKey: "lead-gen.contact.verify-email",
5014
- defaultBatchSize: 250,
5015
- maxBatchSize: 500
5268
+ maxBatchSize: 250,
5269
+ recordColumns: DTC_RECORD_COLUMNS.decisionMakers,
5270
+ credentialRequirements: [
5271
+ {
5272
+ key: "apollo",
5273
+ provider: "apollo",
5274
+ credentialType: "api-key-secret",
5275
+ label: "Apollo API key",
5276
+ required: true,
5277
+ selectionMode: "single",
5278
+ inputPath: "credential"
5279
+ }
5280
+ ]
5016
5281
  },
5017
5282
  reviewAndExport: {
5018
5283
  id: "review-and-export",
5019
5284
  label: "Reviewed and exported",
5020
- description: "Operator QC approves or rejects leads, then approved records are exported as a lead list.",
5285
+ description: "Operator QC approves or rejects qualified companies, then approved records are exported as a lead list with unverified emails.",
5021
5286
  primaryEntity: "company",
5022
5287
  outputs: ["export"],
5023
5288
  stageKey: "uploaded",
5024
- dependsOn: ["verify-emails"],
5289
+ recordsStageKey: "uploaded",
5290
+ recordSourceStageKey: "qualified",
5291
+ dependsOn: ["enrich-decision-makers"],
5025
5292
  dependencyMode: "per-record-eligibility",
5026
5293
  capabilityKey: "lead-gen.export.list",
5027
5294
  defaultBatchSize: 100,
5028
- maxBatchSize: 250
5295
+ maxBatchSize: 250,
5296
+ recordColumns: DTC_RECORD_COLUMNS.uploaded,
5297
+ credentialRequirements: [
5298
+ {
5299
+ key: "clickup",
5300
+ provider: "clickup",
5301
+ credentialType: "api-key-secret",
5302
+ label: "ClickUp API token",
5303
+ required: true,
5304
+ selectionMode: "single",
5305
+ inputPath: "clickupCredential",
5306
+ verifyOnRun: true
5307
+ }
5308
+ ]
5029
5309
  }
5030
5310
  }
5031
5311
  };
@@ -5047,7 +5327,7 @@ function toProspectingLifecycleStage(stage) {
5047
5327
  };
5048
5328
  }
5049
5329
  function leadGenStagesForEntity(entity) {
5050
- return Object.values(LEAD_GEN_STAGE_CATALOG).filter((stage) => stage.entity === entity).sort((a, b) => a.order - b.order).map(toProspectingLifecycleStage);
5330
+ return Object.values(LEAD_GEN_STAGE_CATALOG).filter((stage) => stage.entity === entity || stage.additionalEntities?.includes(entity)).sort((a, b) => a.order - b.order).map(toProspectingLifecycleStage);
5051
5331
  }
5052
5332
  var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
5053
5333
  companyStages: leadGenStagesForEntity("company"),
@@ -5073,10 +5353,10 @@ var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
5073
5353
  description: "Prospecting pipeline for DTC subscription or subscription-ready brands where Apollo is the source and contact-enrichment layer, Elevasis handles company research and fit scoring, and approved leads export as an approved lead list.",
5074
5354
  steps: [
5075
5355
  PROSPECTING_STEPS.dtcApolloClickup.importApolloSearch,
5356
+ PROSPECTING_STEPS.dtcApolloClickup.apifyCrawl,
5076
5357
  PROSPECTING_STEPS.dtcApolloClickup.analyzeWebsites,
5077
5358
  PROSPECTING_STEPS.dtcApolloClickup.scoreDtcFit,
5078
5359
  PROSPECTING_STEPS.dtcApolloClickup.enrichDecisionMakers,
5079
- PROSPECTING_STEPS.dtcApolloClickup.verifyEmails,
5080
5360
  PROSPECTING_STEPS.dtcApolloClickup.reviewAndExport
5081
5361
  ]
5082
5362
  }
@@ -5098,9 +5378,13 @@ var ProcessingStageStatusSchema = z.enum(["success", "no_result", "skipped", "er
5098
5378
  var LeadGenStageKeySchema = z.string().refine((value) => Object.prototype.hasOwnProperty.call(LEAD_GEN_STAGE_CATALOG, value), {
5099
5379
  message: "processing state key must match LEAD_GEN_STAGE_CATALOG"
5100
5380
  });
5101
- var LeadGenCapabilityKeySchema = z.string().refine((value) => Object.prototype.hasOwnProperty.call(CAPABILITY_REGISTRY, value), {
5381
+ var LeadGenCapabilityKeySchema = z.string().refine((value) => CAPABILITY_REGISTRY.some((c) => c.id === value), {
5102
5382
  message: "capabilityKey must match CAPABILITY_REGISTRY"
5103
5383
  });
5384
+ var crmStageKeys = CRM_PIPELINE_DEFINITION.stages.map((stage) => stage.stageKey);
5385
+ var crmStateKeys = CRM_PIPELINE_DEFINITION.stages.flatMap((stage) => stage.states.map((state) => state.stateKey));
5386
+ var CrmStageKeySchema = z.enum(crmStageKeys);
5387
+ var CrmStateKeySchema = z.enum(crmStateKeys);
5104
5388
  var ProcessingStateEntrySchema = z.object({
5105
5389
  status: ProcessingStageStatusSchema,
5106
5390
  data: z.unknown().optional()
@@ -5108,7 +5392,7 @@ var ProcessingStateEntrySchema = z.object({
5108
5392
  var ProcessingStateSchema = z.record(LeadGenStageKeySchema, ProcessingStateEntrySchema);
5109
5393
  var CompanyProcessingStateSchema = ProcessingStateSchema;
5110
5394
  var ContactProcessingStateSchema = ProcessingStateSchema;
5111
- var DealStageSchema = z.enum(["interested", "proposal", "closing", "closed_won", "closed_lost", "nurturing"]);
5395
+ var DealStageSchema = CrmStageKeySchema;
5112
5396
  var AcqDealTaskKindSchema = z.enum(["call", "email", "meeting", "other"]);
5113
5397
  z.object({
5114
5398
  dealId: UuidSchema
@@ -5119,6 +5403,9 @@ z.object({
5119
5403
  });
5120
5404
  z.object({
5121
5405
  stage: DealStageSchema.optional(),
5406
+ list: UuidSchema.optional(),
5407
+ batch: z.string().trim().min(1).max(255).optional(),
5408
+ staleSince: z.string().datetime().optional(),
5122
5409
  search: z.string().optional(),
5123
5410
  limit: z.coerce.number().int().positive().default(50),
5124
5411
  offset: z.coerce.number().int().min(0).default(0)
@@ -5144,12 +5431,19 @@ z.object({
5144
5431
  z.object({
5145
5432
  pipelineKey: z.string().min(1),
5146
5433
  stageKey: z.string().min(1),
5147
- stateKey: z.string().nullable().optional(),
5434
+ stateKey: z.string().min(1).nullable().optional(),
5148
5435
  reason: z.string().optional(),
5149
5436
  expectedUpdatedAt: z.string().datetime().optional()
5150
5437
  }).strict();
5151
5438
  z.object({
5152
- stateKey: z.string().min(1),
5439
+ pipelineKey: z.literal(CRM_PIPELINE_DEFINITION.pipelineKey),
5440
+ stageKey: CrmStageKeySchema,
5441
+ stateKey: CrmStateKeySchema.nullable().optional(),
5442
+ reason: z.string().optional(),
5443
+ expectedUpdatedAt: z.string().datetime().optional()
5444
+ }).strict();
5445
+ z.object({
5446
+ stateKey: CrmStateKeySchema,
5153
5447
  reason: z.string().optional(),
5154
5448
  expectedUpdatedAt: z.string().datetime().optional()
5155
5449
  }).strict();
@@ -5194,6 +5488,7 @@ var DealListItemSchema = z.object({
5194
5488
  // acq_deals columns
5195
5489
  id: z.string(),
5196
5490
  organization_id: z.string(),
5491
+ client_id: z.string().nullable().optional(),
5197
5492
  contact_id: z.string().nullable(),
5198
5493
  contact_email: z.string(),
5199
5494
  pipeline_key: z.string(),
@@ -5274,8 +5569,31 @@ var ConversationMessageSchema = z.object({
5274
5569
  var DealConversationSchema = z.object({
5275
5570
  messages: z.array(ConversationMessageSchema)
5276
5571
  });
5572
+ var DealLineageListRefSchema = z.object({
5573
+ id: z.string(),
5574
+ name: z.string(),
5575
+ status: z.string()
5576
+ });
5577
+ var DealLineageProjectRefSchema = z.object({
5578
+ id: z.string(),
5579
+ name: z.string(),
5580
+ kind: z.string(),
5581
+ status: z.string(),
5582
+ updatedAt: z.string()
5583
+ });
5584
+ var DealLineageClientRefSchema = z.object({
5585
+ id: z.string(),
5586
+ name: z.string(),
5587
+ status: z.string()
5588
+ });
5589
+ var DealLineageSchema = z.object({
5590
+ list: DealLineageListRefSchema.nullable(),
5591
+ projects: z.array(DealLineageProjectRefSchema),
5592
+ client: DealLineageClientRefSchema.nullable()
5593
+ });
5277
5594
  DealListItemSchema.extend({
5278
- conversation: DealConversationSchema
5595
+ conversation: DealConversationSchema,
5596
+ lineage: DealLineageSchema.optional()
5279
5597
  });
5280
5598
  var DealNoteResponseSchema = z.object({
5281
5599
  id: z.string(),
@@ -5336,11 +5654,19 @@ var BuildPlanSnapshotStepSchema = z.object({
5336
5654
  primaryEntity: z.enum(["company", "contact"]),
5337
5655
  outputs: z.array(z.enum(["company", "contact", "export"])).min(1),
5338
5656
  stageKey: LeadGenStageKeySchema,
5657
+ recordEntity: z.enum(["company", "contact"]).optional(),
5658
+ recordsStageKey: LeadGenStageKeySchema.optional(),
5659
+ recordSourceStageKey: LeadGenStageKeySchema.optional(),
5339
5660
  dependsOn: z.array(z.string().trim().min(1).max(100)).optional(),
5340
5661
  dependencyMode: z.literal("per-record-eligibility"),
5341
5662
  capabilityKey: LeadGenCapabilityKeySchema,
5342
5663
  defaultBatchSize: z.number().int().positive(),
5343
- maxBatchSize: z.number().int().positive()
5664
+ maxBatchSize: z.number().int().positive(),
5665
+ recordColumns: z.object({
5666
+ company: z.array(RecordColumnConfigSchema).optional(),
5667
+ contact: z.array(RecordColumnConfigSchema).optional()
5668
+ }).optional(),
5669
+ credentialRequirements: z.array(CredentialRequirementSchema).optional()
5344
5670
  }).refine((step) => step.defaultBatchSize <= step.maxBatchSize, {
5345
5671
  message: "defaultBatchSize must be less than or equal to maxBatchSize",
5346
5672
  path: ["defaultBatchSize"]
@@ -5479,6 +5805,23 @@ var AcqListResponseSchema = z.object({
5479
5805
  });
5480
5806
  z.array(AcqListResponseSchema);
5481
5807
  z.array(ListTelemetrySchema);
5808
+ var QueryBooleanSchema = z.preprocess((value) => {
5809
+ if (value === "true" || value === "1" || value === true) return true;
5810
+ if (value === "false" || value === "0" || value === false) return false;
5811
+ return value;
5812
+ }, z.boolean());
5813
+ z.object({
5814
+ status: ListStatusSchema.optional(),
5815
+ batch: z.string().trim().min(1).max(255).optional(),
5816
+ vertical: z.string().trim().min(1).max(255).optional(),
5817
+ limit: z.coerce.number().int().min(1).max(500).optional(),
5818
+ offset: z.coerce.number().int().min(0).optional()
5819
+ }).strict();
5820
+ z.object({
5821
+ includeDeals: QueryBooleanSchema.default(true),
5822
+ includeProgress: QueryBooleanSchema.default(false),
5823
+ dealLimit: z.coerce.number().int().min(0).max(100).default(25)
5824
+ }).strict();
5482
5825
  var ListStageProgressSchema = z.object({
5483
5826
  total: z.number().int().min(0),
5484
5827
  attempted: z.number().int().min(0),
@@ -5489,12 +5832,48 @@ var ListStageProgressSchema = z.object({
5489
5832
  other: z.number().int().min(0),
5490
5833
  notAttempted: z.number().int().min(0)
5491
5834
  });
5492
- z.object({
5835
+ var ListProgressResponseSchema = z.object({
5493
5836
  totalMembers: z.number().int().min(0),
5494
5837
  totalCompanies: z.number().int().min(0),
5495
5838
  byCompanyStage: z.record(z.string(), ListStageProgressSchema),
5496
5839
  byContactStage: z.record(z.string(), ListStageProgressSchema)
5497
5840
  });
5841
+ var AcqListDealRefSchema = z.object({
5842
+ id: z.string(),
5843
+ contactEmail: z.string(),
5844
+ stageKey: z.string().nullable(),
5845
+ stateKey: z.string().nullable(),
5846
+ sourceType: z.string().nullable(),
5847
+ lastActivityAt: z.string()
5848
+ });
5849
+ var AcqListLineageSchema = z.object({
5850
+ deals: z.object({
5851
+ total: z.number().int().min(0),
5852
+ refs: z.array(AcqListDealRefSchema),
5853
+ truncated: z.boolean()
5854
+ })
5855
+ });
5856
+ AcqListResponseSchema.extend({
5857
+ lineage: AcqListLineageSchema.optional(),
5858
+ progress: ListProgressResponseSchema.optional()
5859
+ });
5860
+ var AcqListStatusListItemSchema = z.object({
5861
+ listId: z.string(),
5862
+ name: z.string(),
5863
+ status: ListStatusSchema,
5864
+ totalCompanies: z.number().int().min(0),
5865
+ totalContacts: z.number().int().min(0),
5866
+ totalDeals: z.number().int().min(0),
5867
+ createdAt: z.string()
5868
+ });
5869
+ z.object({
5870
+ totalLists: z.number().int().min(0),
5871
+ totalCompanies: z.number().int().min(0),
5872
+ totalContacts: z.number().int().min(0),
5873
+ totalDeals: z.number().int().min(0),
5874
+ byStatus: z.record(z.string(), z.number().int().min(0)),
5875
+ lists: z.array(AcqListStatusListItemSchema)
5876
+ });
5498
5877
  var ListExecutionSummarySchema = z.object({
5499
5878
  executionId: z.string(),
5500
5879
  resourceId: z.string(),
@@ -5505,11 +5884,6 @@ var ListExecutionSummarySchema = z.object({
5505
5884
  input: z.unknown().nullable().optional()
5506
5885
  });
5507
5886
  z.array(ListExecutionSummarySchema);
5508
- var QueryBooleanSchema = z.preprocess((value) => {
5509
- if (value === "true" || value === "1" || value === true) return true;
5510
- if (value === "false" || value === "0" || value === false) return false;
5511
- return value;
5512
- }, z.boolean());
5513
5887
  var AcqCompanyStatusSchema = z.enum(["active", "invalid"]);
5514
5888
  var AcqContactStatusSchema = z.enum(["active", "invalid"]);
5515
5889
  var AcqEmailValidSchema = z.enum(["VALID", "INVALID", "RISKY", "UNKNOWN"]);
@@ -5544,6 +5918,7 @@ z.object({
5544
5918
  }).strict();
5545
5919
  z.object({
5546
5920
  name: z.string().trim().min(1).max(255),
5921
+ clientId: UuidSchema.nullable().optional(),
5547
5922
  domain: z.string().trim().min(1).max(255).optional(),
5548
5923
  linkedinUrl: z.string().trim().url().optional(),
5549
5924
  website: z.string().trim().url().optional(),
@@ -5559,6 +5934,7 @@ z.object({
5559
5934
  }).strict();
5560
5935
  z.object({
5561
5936
  name: z.string().trim().min(1).max(255).optional(),
5937
+ clientId: UuidSchema.nullable().optional(),
5562
5938
  domain: z.string().trim().min(1).max(255).optional(),
5563
5939
  linkedinUrl: z.string().trim().url().optional(),
5564
5940
  website: z.string().trim().url().optional(),
@@ -5576,13 +5952,14 @@ z.object({
5576
5952
  status: AcqCompanyStatusSchema.optional(),
5577
5953
  verticalResearch: z.string().trim().min(1).max(5e3).nullable().optional()
5578
5954
  }).strict().refine(
5579
- (data) => data.name !== void 0 || data.domain !== void 0 || data.linkedinUrl !== void 0 || data.website !== void 0 || data.numEmployees !== void 0 || data.foundedYear !== void 0 || data.locationCity !== void 0 || data.locationState !== void 0 || data.category !== void 0 || data.segment !== void 0 || data.processingState !== void 0 || data.pipelineStatus !== void 0 || data.enrichmentData !== void 0 || data.source !== void 0 || data.batchId !== void 0 || data.status !== void 0 || data.verticalResearch !== void 0,
5955
+ (data) => data.name !== void 0 || data.clientId !== void 0 || data.domain !== void 0 || data.linkedinUrl !== void 0 || data.website !== void 0 || data.numEmployees !== void 0 || data.foundedYear !== void 0 || data.locationCity !== void 0 || data.locationState !== void 0 || data.category !== void 0 || data.segment !== void 0 || data.processingState !== void 0 || data.pipelineStatus !== void 0 || data.enrichmentData !== void 0 || data.source !== void 0 || data.batchId !== void 0 || data.status !== void 0 || data.verticalResearch !== void 0,
5580
5956
  {
5581
5957
  message: "At least one field must be provided"
5582
5958
  }
5583
5959
  );
5584
5960
  z.object({
5585
5961
  email: z.string().trim().email(),
5962
+ clientId: UuidSchema.nullable().optional(),
5586
5963
  companyId: UuidSchema.optional(),
5587
5964
  firstName: z.string().trim().min(1).max(255).optional(),
5588
5965
  lastName: z.string().trim().min(1).max(255).optional(),
@@ -5595,6 +5972,7 @@ z.object({
5595
5972
  }).strict();
5596
5973
  z.object({
5597
5974
  companyId: UuidSchema.optional(),
5975
+ clientId: UuidSchema.nullable().optional(),
5598
5976
  emailValid: AcqEmailValidSchema.optional(),
5599
5977
  firstName: z.string().trim().min(1).max(255).optional(),
5600
5978
  lastName: z.string().trim().min(1).max(255).optional(),
@@ -5608,7 +5986,7 @@ z.object({
5608
5986
  enrichmentData: z.record(z.string(), z.unknown()).optional(),
5609
5987
  status: AcqContactStatusSchema.optional()
5610
5988
  }).strict().refine(
5611
- (data) => data.companyId !== void 0 || data.emailValid !== void 0 || data.firstName !== void 0 || data.lastName !== void 0 || data.linkedinUrl !== void 0 || data.title !== void 0 || data.headline !== void 0 || data.filterReason !== void 0 || data.openingLine !== void 0 || data.processingState !== void 0 || data.pipelineStatus !== void 0 || data.enrichmentData !== void 0 || data.status !== void 0,
5989
+ (data) => data.companyId !== void 0 || data.clientId !== void 0 || data.emailValid !== void 0 || data.firstName !== void 0 || data.lastName !== void 0 || data.linkedinUrl !== void 0 || data.title !== void 0 || data.headline !== void 0 || data.filterReason !== void 0 || data.openingLine !== void 0 || data.processingState !== void 0 || data.pipelineStatus !== void 0 || data.enrichmentData !== void 0 || data.status !== void 0,
5612
5990
  {
5613
5991
  message: "At least one field must be provided"
5614
5992
  }
@@ -5616,6 +5994,7 @@ z.object({
5616
5994
  var AcqCompanyResponseSchema = z.object({
5617
5995
  id: z.string(),
5618
5996
  organizationId: z.string(),
5997
+ clientId: z.string().nullable().optional(),
5619
5998
  name: z.string(),
5620
5999
  domain: z.string().nullable(),
5621
6000
  linkedinUrl: z.string().nullable(),
@@ -5662,6 +6041,7 @@ var AcqContactCompanySummarySchema = z.object({
5662
6041
  var AcqContactResponseSchema = z.object({
5663
6042
  id: z.string(),
5664
6043
  organizationId: z.string(),
6044
+ clientId: z.string().nullable().optional(),
5665
6045
  companyId: z.string().nullable(),
5666
6046
  email: z.string(),
5667
6047
  emailValid: AcqEmailValidSchema.nullable(),
@@ -5721,6 +6101,24 @@ z.object({
5721
6101
  limit: z.coerce.number().int().min(1).max(500).default(50),
5722
6102
  offset: z.coerce.number().int().min(0).default(0)
5723
6103
  }).strict();
6104
+ var ListRecordEntitySchema = z.enum(["company", "contact"]);
6105
+ z.object({
6106
+ entity: ListRecordEntitySchema,
6107
+ stage: LeadGenStageKeySchema.optional(),
6108
+ limit: z.coerce.number().int().min(1).max(500).default(50),
6109
+ offset: z.coerce.number().int().min(0).default(0)
6110
+ }).strict().superRefine((query, ctx) => {
6111
+ if (!query.stage) return;
6112
+ const stage = LEAD_GEN_STAGE_CATALOG[query.stage];
6113
+ const validEntity = stage?.entity === query.entity || stage?.additionalEntities?.includes(query.entity) || stage?.recordEntity === query.entity;
6114
+ if (!validEntity) {
6115
+ ctx.addIssue({
6116
+ code: z.ZodIssueCode.custom,
6117
+ message: `stage "${query.stage}" is not valid for ${query.entity} records`,
6118
+ path: ["stage"]
6119
+ });
6120
+ }
6121
+ });
5724
6122
  z.object({
5725
6123
  memberId: UuidSchema
5726
6124
  });
@@ -5749,6 +6147,70 @@ var AcqListMemberResponseSchema = z.object({
5749
6147
  z.object({
5750
6148
  members: z.array(AcqListMemberResponseSchema)
5751
6149
  });
6150
+ var AcqListRecordCompanySummarySchema = z.object({
6151
+ id: z.string(),
6152
+ name: z.string(),
6153
+ domain: z.string().nullable(),
6154
+ website: z.string().nullable(),
6155
+ linkedinUrl: z.string().nullable(),
6156
+ numEmployees: z.number().nullable(),
6157
+ foundedYear: z.number().nullable(),
6158
+ locationCity: z.string().nullable(),
6159
+ locationState: z.string().nullable(),
6160
+ category: z.string().nullable(),
6161
+ segment: z.string().nullable(),
6162
+ status: AcqCompanyStatusSchema,
6163
+ qualificationScore: z.number().nullable(),
6164
+ qualificationSignals: z.record(z.string(), z.unknown()).nullable(),
6165
+ qualificationRubricKey: z.string().nullable()
6166
+ });
6167
+ var AcqListRecordContactSummarySchema = z.object({
6168
+ id: z.string(),
6169
+ email: z.string(),
6170
+ firstName: z.string().nullable(),
6171
+ lastName: z.string().nullable(),
6172
+ title: z.string().nullable(),
6173
+ headline: z.string().nullable(),
6174
+ linkedinUrl: z.string().nullable(),
6175
+ companyId: z.string().nullable(),
6176
+ status: AcqContactStatusSchema,
6177
+ qualificationScore: z.number().nullable(),
6178
+ qualificationSignals: z.record(z.string(), z.unknown()).nullable(),
6179
+ qualificationRubricKey: z.string().nullable()
6180
+ });
6181
+ var ListRecordBaseSchema = z.object({
6182
+ id: z.string(),
6183
+ listId: z.string(),
6184
+ pipelineKey: z.string(),
6185
+ stageKey: z.string(),
6186
+ stateKey: z.string(),
6187
+ activityLog: z.unknown(),
6188
+ addedAt: z.string(),
6189
+ addedBy: z.string().nullable(),
6190
+ sourceExecutionId: z.string().nullable(),
6191
+ processingState: z.record(z.string(), z.unknown()).nullable(),
6192
+ enrichmentData: z.record(z.string(), z.unknown()).nullable()
6193
+ });
6194
+ var AcqListCompanyRecordRowSchema = ListRecordBaseSchema.extend({
6195
+ entity: z.literal("company"),
6196
+ companyId: z.string(),
6197
+ company: AcqListRecordCompanySummarySchema.nullable()
6198
+ });
6199
+ var AcqListContactRecordRowSchema = ListRecordBaseSchema.extend({
6200
+ entity: z.literal("contact"),
6201
+ contactId: z.string(),
6202
+ contact: AcqListRecordContactSummarySchema.nullable()
6203
+ });
6204
+ var ListRecordRowSchema = z.discriminatedUnion("entity", [
6205
+ AcqListCompanyRecordRowSchema,
6206
+ AcqListContactRecordRowSchema
6207
+ ]);
6208
+ z.object({
6209
+ data: z.array(ListRecordRowSchema),
6210
+ total: z.number().int().min(0),
6211
+ limit: z.number().int().min(1),
6212
+ offset: z.number().int().min(0)
6213
+ });
5752
6214
  z.object({
5753
6215
  listCompanyId: UuidSchema
5754
6216
  });