@elevasis/sdk 1.19.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 (56) hide show
  1. package/dist/cli.cjs +1712 -72
  2. package/dist/index.d.ts +659 -5
  3. package/dist/index.js +565 -42
  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 +459 -4
  7. package/dist/test-utils/index.js +509 -37
  8. package/dist/worker/index.js +365 -37
  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/rules/agent-start-here.md +5 -5
  13. package/reference/claude-config/rules/deployment.md +4 -3
  14. package/reference/claude-config/rules/frontend.md +2 -2
  15. package/reference/claude-config/rules/operations.md +17 -13
  16. package/reference/claude-config/rules/organization-model.md +7 -5
  17. package/reference/claude-config/rules/organization-os.md +13 -11
  18. package/reference/claude-config/rules/ui.md +3 -3
  19. package/reference/claude-config/rules/vibe.md +4 -4
  20. package/reference/claude-config/skills/explore/SKILL.md +4 -4
  21. package/reference/claude-config/skills/knowledge/SKILL.md +8 -8
  22. package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +7 -7
  23. package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +13 -13
  24. package/reference/claude-config/skills/knowledge/operations/customers.md +1 -1
  25. package/reference/claude-config/skills/knowledge/operations/goals.md +1 -1
  26. package/reference/claude-config/skills/knowledge/operations/identity.md +1 -1
  27. package/reference/claude-config/skills/knowledge/operations/offerings.md +1 -1
  28. package/reference/claude-config/skills/knowledge/operations/roles.md +1 -1
  29. package/reference/claude-config/skills/knowledge/operations/techStack.md +19 -91
  30. package/reference/claude-config/skills/project/SKILL.md +73 -13
  31. package/reference/claude-config/skills/save/SKILL.md +5 -5
  32. package/reference/claude-config/skills/tutorial/technical.md +5 -6
  33. package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -0
  34. package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -0
  35. package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -0
  36. package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -0
  37. package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -0
  38. package/reference/examples/organization-model.ts +17 -5
  39. package/reference/framework/index.mdx +1 -1
  40. package/reference/framework/project-structure.mdx +10 -8
  41. package/reference/packages/core/src/business/README.md +2 -2
  42. package/reference/packages/core/src/organization-model/README.md +10 -3
  43. package/reference/resources/index.mdx +27 -17
  44. package/reference/scaffold/core/organization-model.mdx +33 -14
  45. package/reference/scaffold/operations/workflow-recipes.md +35 -29
  46. package/reference/scaffold/recipes/add-a-feature.md +18 -3
  47. package/reference/scaffold/recipes/add-a-resource.md +50 -10
  48. package/reference/scaffold/recipes/customize-crm-actions.md +12 -6
  49. package/reference/scaffold/recipes/customize-organization-model.md +18 -3
  50. package/reference/scaffold/recipes/extend-crm.md +17 -19
  51. package/reference/scaffold/recipes/extend-lead-gen.md +31 -31
  52. package/reference/scaffold/recipes/index.md +1 -1
  53. package/reference/scaffold/reference/contracts.md +501 -303
  54. package/reference/scaffold/reference/feature-registry.md +1 -1
  55. package/reference/scaffold/reference/glossary.md +8 -3
  56. 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",
@@ -4815,6 +4816,13 @@ var LEAD_GEN_STAGE_CATALOG = {
4815
4816
  order: 2,
4816
4817
  entity: "company"
4817
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
+ },
4818
4826
  extracted: {
4819
4827
  key: "extracted",
4820
4828
  label: "Websites analyzed",
@@ -4834,7 +4842,9 @@ var LEAD_GEN_STAGE_CATALOG = {
4834
4842
  label: "Decision-makers found",
4835
4843
  description: "Decision-maker contacts discovered and attached to a qualified company.",
4836
4844
  order: 6,
4837
- entity: "company"
4845
+ entity: "company",
4846
+ recordEntity: "contact",
4847
+ recordStageKey: "discovered"
4838
4848
  },
4839
4849
  // Prospecting — contact discovery
4840
4850
  discovered: {
@@ -4872,7 +4882,8 @@ var LEAD_GEN_STAGE_CATALOG = {
4872
4882
  label: "Reviewed and exported",
4873
4883
  description: "Approved records have been reviewed and exported for handoff.",
4874
4884
  order: 10,
4875
- entity: "contact"
4885
+ entity: "company",
4886
+ additionalEntities: ["contact"]
4876
4887
  },
4877
4888
  interested: {
4878
4889
  key: "interested",
@@ -4886,18 +4897,47 @@ var LEAD_GEN_STAGE_CATALOG = {
4886
4897
  // ../core/src/organization-model/domains/prospecting.ts
4887
4898
  var ProspectingLifecycleStageSchema = DisplayMetadataSchema.extend({
4888
4899
  id: ModelIdSchema,
4889
- 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()
4890
4925
  });
4891
4926
  var ProspectingBuildTemplateStepSchema = DisplayMetadataSchema.extend({
4892
4927
  id: ModelIdSchema,
4893
4928
  primaryEntity: z.enum(["company", "contact"]),
4894
4929
  outputs: z.array(z.enum(["company", "contact", "export"])).min(1),
4895
4930
  stageKey: ModelIdSchema,
4931
+ recordEntity: z.enum(["company", "contact"]).optional(),
4932
+ recordsStageKey: ModelIdSchema.optional(),
4933
+ recordSourceStageKey: ModelIdSchema.optional(),
4896
4934
  dependsOn: z.array(ModelIdSchema).optional(),
4897
4935
  dependencyMode: z.literal("per-record-eligibility"),
4898
4936
  capabilityKey: ModelIdSchema,
4899
4937
  defaultBatchSize: z.number().int().positive(),
4900
- maxBatchSize: z.number().int().positive()
4938
+ maxBatchSize: z.number().int().positive(),
4939
+ recordColumns: RecordColumnsConfigSchema.optional(),
4940
+ credentialRequirements: z.array(CredentialRequirementSchema).optional()
4901
4941
  }).refine((step) => step.defaultBatchSize <= step.maxBatchSize, {
4902
4942
  message: "defaultBatchSize must be less than or equal to maxBatchSize",
4903
4943
  path: ["defaultBatchSize"]
@@ -4906,6 +4946,62 @@ var ProspectingBuildTemplateSchema = DisplayMetadataSchema.extend({
4906
4946
  id: ModelIdSchema,
4907
4947
  steps: z.array(ProspectingBuildTemplateStepSchema).min(1)
4908
4948
  });
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
+ }
5004
+ };
4909
5005
  z.object({
4910
5006
  id: ModelIdSchema,
4911
5007
  label: z.string(),
@@ -4937,6 +5033,12 @@ var CAPABILITY_REGISTRY = [
4937
5033
  description: "Check email deliverability before outreach.",
4938
5034
  resourceId: "lgn-05-email-verification-workflow"
4939
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
+ },
4940
5042
  {
4941
5043
  id: "lead-gen.company.website-extract",
4942
5044
  label: "Extract website signals",
@@ -5083,7 +5185,45 @@ var PROSPECTING_STEPS = {
5083
5185
  dependencyMode: "per-record-eligibility",
5084
5186
  capabilityKey: "lead-gen.company.apollo-import",
5085
5187
  defaultBatchSize: 250,
5086
- 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
+ ]
5087
5227
  },
5088
5228
  analyzeWebsites: {
5089
5229
  id: "analyze-websites",
@@ -5092,11 +5232,12 @@ var PROSPECTING_STEPS = {
5092
5232
  primaryEntity: "company",
5093
5233
  outputs: ["company"],
5094
5234
  stageKey: "extracted",
5095
- dependsOn: ["import-apollo-search"],
5235
+ dependsOn: ["apify-crawl"],
5096
5236
  dependencyMode: "per-record-eligibility",
5097
5237
  capabilityKey: "lead-gen.company.website-extract",
5098
5238
  defaultBatchSize: 50,
5099
- maxBatchSize: 100
5239
+ maxBatchSize: 100,
5240
+ recordColumns: DTC_RECORD_COLUMNS.extracted
5100
5241
  },
5101
5242
  scoreDtcFit: {
5102
5243
  id: "score-dtc-fit",
@@ -5109,7 +5250,8 @@ var PROSPECTING_STEPS = {
5109
5250
  dependencyMode: "per-record-eligibility",
5110
5251
  capabilityKey: "lead-gen.company.dtc-subscription-qualify",
5111
5252
  defaultBatchSize: 100,
5112
- maxBatchSize: 250
5253
+ maxBatchSize: 250,
5254
+ recordColumns: DTC_RECORD_COLUMNS.qualified
5113
5255
  },
5114
5256
  enrichDecisionMakers: {
5115
5257
  id: "enrich-decision-makers",
@@ -5118,37 +5260,52 @@ var PROSPECTING_STEPS = {
5118
5260
  primaryEntity: "company",
5119
5261
  outputs: ["contact"],
5120
5262
  stageKey: "decision-makers-enriched",
5263
+ recordEntity: "contact",
5121
5264
  dependsOn: ["score-dtc-fit"],
5122
5265
  dependencyMode: "per-record-eligibility",
5123
5266
  capabilityKey: "lead-gen.contact.apollo-decision-maker-enrich",
5124
5267
  defaultBatchSize: 100,
5125
- maxBatchSize: 250
5126
- },
5127
- verifyEmails: {
5128
- id: "verify-emails",
5129
- label: "Emails verified",
5130
- description: "Verify deliverability before the QC and handoff step.",
5131
- primaryEntity: "contact",
5132
- outputs: ["contact"],
5133
- stageKey: "verified",
5134
- dependsOn: ["enrich-decision-makers"],
5135
- dependencyMode: "per-record-eligibility",
5136
- capabilityKey: "lead-gen.contact.verify-email",
5137
- defaultBatchSize: 250,
5138
- 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
+ ]
5139
5281
  },
5140
5282
  reviewAndExport: {
5141
5283
  id: "review-and-export",
5142
5284
  label: "Reviewed and exported",
5143
- 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.",
5144
5286
  primaryEntity: "company",
5145
5287
  outputs: ["export"],
5146
5288
  stageKey: "uploaded",
5147
- dependsOn: ["verify-emails"],
5289
+ recordsStageKey: "uploaded",
5290
+ recordSourceStageKey: "qualified",
5291
+ dependsOn: ["enrich-decision-makers"],
5148
5292
  dependencyMode: "per-record-eligibility",
5149
5293
  capabilityKey: "lead-gen.export.list",
5150
5294
  defaultBatchSize: 100,
5151
- 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
+ ]
5152
5309
  }
5153
5310
  }
5154
5311
  };
@@ -5170,7 +5327,7 @@ function toProspectingLifecycleStage(stage) {
5170
5327
  };
5171
5328
  }
5172
5329
  function leadGenStagesForEntity(entity) {
5173
- 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);
5174
5331
  }
5175
5332
  var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
5176
5333
  companyStages: leadGenStagesForEntity("company"),
@@ -5196,10 +5353,10 @@ var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
5196
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.",
5197
5354
  steps: [
5198
5355
  PROSPECTING_STEPS.dtcApolloClickup.importApolloSearch,
5356
+ PROSPECTING_STEPS.dtcApolloClickup.apifyCrawl,
5199
5357
  PROSPECTING_STEPS.dtcApolloClickup.analyzeWebsites,
5200
5358
  PROSPECTING_STEPS.dtcApolloClickup.scoreDtcFit,
5201
5359
  PROSPECTING_STEPS.dtcApolloClickup.enrichDecisionMakers,
5202
- PROSPECTING_STEPS.dtcApolloClickup.verifyEmails,
5203
5360
  PROSPECTING_STEPS.dtcApolloClickup.reviewAndExport
5204
5361
  ]
5205
5362
  }
@@ -5246,6 +5403,9 @@ z.object({
5246
5403
  });
5247
5404
  z.object({
5248
5405
  stage: DealStageSchema.optional(),
5406
+ list: UuidSchema.optional(),
5407
+ batch: z.string().trim().min(1).max(255).optional(),
5408
+ staleSince: z.string().datetime().optional(),
5249
5409
  search: z.string().optional(),
5250
5410
  limit: z.coerce.number().int().positive().default(50),
5251
5411
  offset: z.coerce.number().int().min(0).default(0)
@@ -5328,6 +5488,7 @@ var DealListItemSchema = z.object({
5328
5488
  // acq_deals columns
5329
5489
  id: z.string(),
5330
5490
  organization_id: z.string(),
5491
+ client_id: z.string().nullable().optional(),
5331
5492
  contact_id: z.string().nullable(),
5332
5493
  contact_email: z.string(),
5333
5494
  pipeline_key: z.string(),
@@ -5408,8 +5569,31 @@ var ConversationMessageSchema = z.object({
5408
5569
  var DealConversationSchema = z.object({
5409
5570
  messages: z.array(ConversationMessageSchema)
5410
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
+ });
5411
5594
  DealListItemSchema.extend({
5412
- conversation: DealConversationSchema
5595
+ conversation: DealConversationSchema,
5596
+ lineage: DealLineageSchema.optional()
5413
5597
  });
5414
5598
  var DealNoteResponseSchema = z.object({
5415
5599
  id: z.string(),
@@ -5470,11 +5654,19 @@ var BuildPlanSnapshotStepSchema = z.object({
5470
5654
  primaryEntity: z.enum(["company", "contact"]),
5471
5655
  outputs: z.array(z.enum(["company", "contact", "export"])).min(1),
5472
5656
  stageKey: LeadGenStageKeySchema,
5657
+ recordEntity: z.enum(["company", "contact"]).optional(),
5658
+ recordsStageKey: LeadGenStageKeySchema.optional(),
5659
+ recordSourceStageKey: LeadGenStageKeySchema.optional(),
5473
5660
  dependsOn: z.array(z.string().trim().min(1).max(100)).optional(),
5474
5661
  dependencyMode: z.literal("per-record-eligibility"),
5475
5662
  capabilityKey: LeadGenCapabilityKeySchema,
5476
5663
  defaultBatchSize: z.number().int().positive(),
5477
- 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()
5478
5670
  }).refine((step) => step.defaultBatchSize <= step.maxBatchSize, {
5479
5671
  message: "defaultBatchSize must be less than or equal to maxBatchSize",
5480
5672
  path: ["defaultBatchSize"]
@@ -5613,6 +5805,23 @@ var AcqListResponseSchema = z.object({
5613
5805
  });
5614
5806
  z.array(AcqListResponseSchema);
5615
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();
5616
5825
  var ListStageProgressSchema = z.object({
5617
5826
  total: z.number().int().min(0),
5618
5827
  attempted: z.number().int().min(0),
@@ -5623,12 +5832,48 @@ var ListStageProgressSchema = z.object({
5623
5832
  other: z.number().int().min(0),
5624
5833
  notAttempted: z.number().int().min(0)
5625
5834
  });
5626
- z.object({
5835
+ var ListProgressResponseSchema = z.object({
5627
5836
  totalMembers: z.number().int().min(0),
5628
5837
  totalCompanies: z.number().int().min(0),
5629
5838
  byCompanyStage: z.record(z.string(), ListStageProgressSchema),
5630
5839
  byContactStage: z.record(z.string(), ListStageProgressSchema)
5631
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
+ });
5632
5877
  var ListExecutionSummarySchema = z.object({
5633
5878
  executionId: z.string(),
5634
5879
  resourceId: z.string(),
@@ -5639,11 +5884,6 @@ var ListExecutionSummarySchema = z.object({
5639
5884
  input: z.unknown().nullable().optional()
5640
5885
  });
5641
5886
  z.array(ListExecutionSummarySchema);
5642
- var QueryBooleanSchema = z.preprocess((value) => {
5643
- if (value === "true" || value === "1" || value === true) return true;
5644
- if (value === "false" || value === "0" || value === false) return false;
5645
- return value;
5646
- }, z.boolean());
5647
5887
  var AcqCompanyStatusSchema = z.enum(["active", "invalid"]);
5648
5888
  var AcqContactStatusSchema = z.enum(["active", "invalid"]);
5649
5889
  var AcqEmailValidSchema = z.enum(["VALID", "INVALID", "RISKY", "UNKNOWN"]);
@@ -5678,6 +5918,7 @@ z.object({
5678
5918
  }).strict();
5679
5919
  z.object({
5680
5920
  name: z.string().trim().min(1).max(255),
5921
+ clientId: UuidSchema.nullable().optional(),
5681
5922
  domain: z.string().trim().min(1).max(255).optional(),
5682
5923
  linkedinUrl: z.string().trim().url().optional(),
5683
5924
  website: z.string().trim().url().optional(),
@@ -5693,6 +5934,7 @@ z.object({
5693
5934
  }).strict();
5694
5935
  z.object({
5695
5936
  name: z.string().trim().min(1).max(255).optional(),
5937
+ clientId: UuidSchema.nullable().optional(),
5696
5938
  domain: z.string().trim().min(1).max(255).optional(),
5697
5939
  linkedinUrl: z.string().trim().url().optional(),
5698
5940
  website: z.string().trim().url().optional(),
@@ -5710,13 +5952,14 @@ z.object({
5710
5952
  status: AcqCompanyStatusSchema.optional(),
5711
5953
  verticalResearch: z.string().trim().min(1).max(5e3).nullable().optional()
5712
5954
  }).strict().refine(
5713
- (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,
5714
5956
  {
5715
5957
  message: "At least one field must be provided"
5716
5958
  }
5717
5959
  );
5718
5960
  z.object({
5719
5961
  email: z.string().trim().email(),
5962
+ clientId: UuidSchema.nullable().optional(),
5720
5963
  companyId: UuidSchema.optional(),
5721
5964
  firstName: z.string().trim().min(1).max(255).optional(),
5722
5965
  lastName: z.string().trim().min(1).max(255).optional(),
@@ -5729,6 +5972,7 @@ z.object({
5729
5972
  }).strict();
5730
5973
  z.object({
5731
5974
  companyId: UuidSchema.optional(),
5975
+ clientId: UuidSchema.nullable().optional(),
5732
5976
  emailValid: AcqEmailValidSchema.optional(),
5733
5977
  firstName: z.string().trim().min(1).max(255).optional(),
5734
5978
  lastName: z.string().trim().min(1).max(255).optional(),
@@ -5742,7 +5986,7 @@ z.object({
5742
5986
  enrichmentData: z.record(z.string(), z.unknown()).optional(),
5743
5987
  status: AcqContactStatusSchema.optional()
5744
5988
  }).strict().refine(
5745
- (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,
5746
5990
  {
5747
5991
  message: "At least one field must be provided"
5748
5992
  }
@@ -5750,6 +5994,7 @@ z.object({
5750
5994
  var AcqCompanyResponseSchema = z.object({
5751
5995
  id: z.string(),
5752
5996
  organizationId: z.string(),
5997
+ clientId: z.string().nullable().optional(),
5753
5998
  name: z.string(),
5754
5999
  domain: z.string().nullable(),
5755
6000
  linkedinUrl: z.string().nullable(),
@@ -5796,6 +6041,7 @@ var AcqContactCompanySummarySchema = z.object({
5796
6041
  var AcqContactResponseSchema = z.object({
5797
6042
  id: z.string(),
5798
6043
  organizationId: z.string(),
6044
+ clientId: z.string().nullable().optional(),
5799
6045
  companyId: z.string().nullable(),
5800
6046
  email: z.string(),
5801
6047
  emailValid: AcqEmailValidSchema.nullable(),
@@ -5855,6 +6101,24 @@ z.object({
5855
6101
  limit: z.coerce.number().int().min(1).max(500).default(50),
5856
6102
  offset: z.coerce.number().int().min(0).default(0)
5857
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
+ });
5858
6122
  z.object({
5859
6123
  memberId: UuidSchema
5860
6124
  });
@@ -5883,6 +6147,70 @@ var AcqListMemberResponseSchema = z.object({
5883
6147
  z.object({
5884
6148
  members: z.array(AcqListMemberResponseSchema)
5885
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
+ });
5886
6214
  z.object({
5887
6215
  listCompanyId: UuidSchema
5888
6216
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -57,9 +57,9 @@
57
57
  "tsup": "^8.0.0",
58
58
  "typescript": "5.9.2",
59
59
  "zod": "^4.1.0",
60
- "@repo/core": "0.20.0",
61
- "@repo/eslint-config": "0.0.0",
62
- "@repo/typescript-config": "0.0.0"
60
+ "@repo/core": "0.22.0",
61
+ "@repo/typescript-config": "0.0.0",
62
+ "@repo/eslint-config": "0.0.0"
63
63
  },
64
64
  "scripts": {
65
65
  "lint": "eslint src --max-warnings 0",
@@ -2,7 +2,7 @@
2
2
 
3
3
  Auto-generated from the package reference manifests.
4
4
 
5
- Package entries indexed: 54.
5
+ Package entries indexed: 55.
6
6
 
7
7
  ## @elevasis/core / Core
8
8
 
@@ -90,6 +90,7 @@ Package entries indexed: 54.
90
90
  | Features SEO | `packages/ui/src/features/README.md` | Published SEO feature surface for downstream shells. | (not specified) |
91
91
  | Features Settings | `packages/ui/src/features/README.md` | Published settings feature surface for downstream shells. | (not specified) |
92
92
  | Features Knowledge | `packages/ui/src/features/README.md` | Published knowledge feature manifest for downstream shells. | (not specified) |
93
+ | Features Clients | `packages/ui/src/features/README.md` | Published clients feature surface for downstream shells. | (not specified) |
93
94
 
94
95
  ## @elevasis/ui / Foundation
95
96