@elevasis/sdk 1.27.1 → 1.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +586 -3
- package/dist/index.d.ts +55 -7
- package/dist/index.js +704 -129
- package/dist/node/index.d.ts +12 -0
- package/dist/test-utils/index.d.ts +12 -0
- package/dist/test-utils/index.js +605 -4
- package/package.json +2 -2
- package/reference/claude-config/sync-notes/2026-05-24-system-interface-readiness.md +43 -0
- package/reference/concepts.mdx +1 -1
- package/reference/resources/patterns.mdx +1 -1
- package/reference/runtime.mdx +8 -9
- package/reference/scaffold/recipes/customize-crm-actions.md +6 -2
- package/reference/scaffold/recipes/extend-crm.md +5 -3
- package/reference/scaffold/recipes/extend-lead-gen.md +9 -6
- package/reference/scaffold/reference/contracts.md +44 -0
- package/reference/troubleshooting.mdx +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -6656,6 +6656,17 @@ type ResolvedOntologyRecord<TRecord> = TRecord & {
|
|
|
6656
6656
|
origin: OntologyRecordOrigin;
|
|
6657
6657
|
};
|
|
6658
6658
|
|
|
6659
|
+
declare const SystemApiInterfaceSchema: z.ZodObject<{
|
|
6660
|
+
lifecycle: z.ZodDefault<z.ZodEnum<{
|
|
6661
|
+
active: "active";
|
|
6662
|
+
deprecated: "deprecated";
|
|
6663
|
+
draft: "draft";
|
|
6664
|
+
archived: "archived";
|
|
6665
|
+
disabled: "disabled";
|
|
6666
|
+
}>>;
|
|
6667
|
+
readinessProfile: z.ZodOptional<z.ZodString>;
|
|
6668
|
+
resourceIds: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
6669
|
+
}, z.core.$strict>;
|
|
6659
6670
|
type JsonPrimitive = string | number | boolean | null;
|
|
6660
6671
|
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
6661
6672
|
[key: string]: JsonValue;
|
|
@@ -6684,6 +6695,7 @@ interface SystemEntry {
|
|
|
6684
6695
|
}[];
|
|
6685
6696
|
policies?: string[];
|
|
6686
6697
|
drivesGoals?: string[];
|
|
6698
|
+
apiInterface?: z.infer<typeof SystemApiInterfaceSchema>;
|
|
6687
6699
|
/** @deprecated Use lifecycle. Accepted for one publish cycle. */
|
|
6688
6700
|
status?: 'active' | 'deprecated' | 'archived';
|
|
6689
6701
|
path?: string;
|
|
@@ -7680,12 +7692,26 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
|
|
|
7680
7692
|
|
|
7681
7693
|
type OrganizationModel$1 = z.infer<typeof OrganizationModelSchema$1>;
|
|
7682
7694
|
|
|
7683
|
-
type
|
|
7695
|
+
type BusinessOntologyValidationIndexBase = {
|
|
7684
7696
|
ontology: ResolvedOntologyIndex;
|
|
7685
|
-
crmPipelineCatalog: OntologyCatalogType;
|
|
7686
|
-
leadGenStageCatalog: OntologyCatalogType;
|
|
7687
7697
|
actionTypesByLegacyId: Record<string, OntologyActionType>;
|
|
7688
7698
|
};
|
|
7699
|
+
type LeadGenApiOntologyValidationIndex = BusinessOntologyValidationIndexBase & {
|
|
7700
|
+
leadGenStageCatalog: OntologyCatalogType;
|
|
7701
|
+
};
|
|
7702
|
+
type CrmApiOntologyValidationIndex = BusinessOntologyValidationIndexBase & {
|
|
7703
|
+
crmPipelineCatalog: OntologyCatalogType;
|
|
7704
|
+
};
|
|
7705
|
+
type BusinessOntologyValidationIndex = LeadGenApiOntologyValidationIndex & CrmApiOntologyValidationIndex;
|
|
7706
|
+
type SystemInterfaceReadinessIssueFamily = 'SYSTEM_INTERFACE_MISSING' | 'SYSTEM_INTERFACE_DISABLED' | 'SYSTEM_INTERFACE_INVALID' | 'SYSTEM_INTERFACE_NOT_READY' | 'SYSTEM_BRIDGE_NOT_READY';
|
|
7707
|
+
/**
|
|
7708
|
+
* Legacy mixed acquisition index.
|
|
7709
|
+
*
|
|
7710
|
+
* Kept for existing API consumers until Wave 3 wires explicit route/service
|
|
7711
|
+
* contract requirements. New base lead-gen paths should call
|
|
7712
|
+
* `compileLeadGenApiOntologyValidationIndex()`; CRM-aware paths should call the
|
|
7713
|
+
* CRM or bridge helpers above.
|
|
7714
|
+
*/
|
|
7689
7715
|
declare function compileBusinessOntologyValidationIndex(model: OrganizationModel$1): BusinessOntologyValidationIndex;
|
|
7690
7716
|
/**
|
|
7691
7717
|
* Lead-gen stage validators bound to a specific resolved validation index.
|
|
@@ -7693,7 +7719,7 @@ declare function compileBusinessOntologyValidationIndex(model: OrganizationModel
|
|
|
7693
7719
|
* The lead-gen stage catalog is tenant-model-dependent (it derives from the
|
|
7694
7720
|
* organization model's `sales.lead-gen` stage records). Hosts that own a
|
|
7695
7721
|
* populated tenant model (e.g. `apps/api` with the Elevasis canonical model)
|
|
7696
|
-
* MUST build their own index via `
|
|
7722
|
+
* MUST build their own index via `compileLeadGenApiOntologyValidationIndex(model)`
|
|
7697
7723
|
* and call `createLeadGenStageValidators(index)`. The core package stays generic;
|
|
7698
7724
|
* it must never import a tenant model.
|
|
7699
7725
|
*/
|
|
@@ -7705,7 +7731,7 @@ type LeadGenStageValidators = {
|
|
|
7705
7731
|
isLeadGenRecordStageValidForEntity(stageKey: string, entity: 'company' | 'contact'): boolean;
|
|
7706
7732
|
resolveLeadGenRecordStageKey(stageKey: string, entity: 'company' | 'contact'): string;
|
|
7707
7733
|
};
|
|
7708
|
-
declare function createLeadGenStageValidators(index:
|
|
7734
|
+
declare function createLeadGenStageValidators(index: LeadGenApiOntologyValidationIndex): LeadGenStageValidators;
|
|
7709
7735
|
|
|
7710
7736
|
/**
|
|
7711
7737
|
* A single CRM activity entry (note, stage change, or deal creation).
|
|
@@ -11804,7 +11830,7 @@ declare class RegistryValidationError extends Error {
|
|
|
11804
11830
|
constructor(orgName: string, resourceId: string | null, field: string | null, message: string);
|
|
11805
11831
|
}
|
|
11806
11832
|
type ResourceValidatorMode = 'strict' | 'warn-only';
|
|
11807
|
-
type ResourceGovernanceValidationIssueType = 'missing-code-resource' | 'missing-om-resource' | 'type-mismatch' | 'system-mismatch' | 'missing-om-system' | 'raw-resource-id' | 'descriptor-mismatch' | 'missing-ontology-actions' | 'ontology-reference-missing' | 'primary-action-mismatch' | 'topology-reference-missing';
|
|
11833
|
+
type ResourceGovernanceValidationIssueType = 'missing-code-resource' | 'missing-om-resource' | 'type-mismatch' | 'system-mismatch' | 'missing-om-system' | 'raw-resource-id' | 'descriptor-mismatch' | 'missing-ontology-actions' | 'ontology-reference-missing' | 'ontology-topology-grant-missing' | 'primary-action-mismatch' | 'topology-reference-missing';
|
|
11808
11834
|
interface ResourceGovernanceModel {
|
|
11809
11835
|
systems?: Record<string, SystemEntry>;
|
|
11810
11836
|
resources?: Record<string, ResourceEntry$1>;
|
|
@@ -11830,6 +11856,20 @@ interface ResourceGovernanceValidationOptions {
|
|
|
11830
11856
|
mode?: ResourceValidatorMode;
|
|
11831
11857
|
onWarning?: (issue: ResourceGovernanceValidationIssue) => void;
|
|
11832
11858
|
}
|
|
11859
|
+
interface SystemInterfaceReadinessValidationIssue {
|
|
11860
|
+
type: SystemInterfaceReadinessIssueFamily;
|
|
11861
|
+
orgName: string;
|
|
11862
|
+
systemPath: string;
|
|
11863
|
+
interfaceKey: string;
|
|
11864
|
+
code: string;
|
|
11865
|
+
path?: string;
|
|
11866
|
+
ref?: string;
|
|
11867
|
+
message: string;
|
|
11868
|
+
}
|
|
11869
|
+
interface SystemInterfaceReadinessValidationResult {
|
|
11870
|
+
valid: boolean;
|
|
11871
|
+
issues: SystemInterfaceReadinessValidationIssue[];
|
|
11872
|
+
}
|
|
11833
11873
|
/**
|
|
11834
11874
|
* Validates runtime resource definitions against OM Resources and Systems.
|
|
11835
11875
|
*
|
|
@@ -11843,6 +11883,14 @@ interface ResourceGovernanceValidationOptions {
|
|
|
11843
11883
|
* permanent emergency escape hatch unless an explicit mode is passed.
|
|
11844
11884
|
*/
|
|
11845
11885
|
declare function validateResourceGovernance(orgName: string, deployment: DeploymentSpec, organizationModel?: ResourceGovernanceModel | undefined, options?: ResourceGovernanceValidationOptions): ResourceGovernanceValidationResult;
|
|
11886
|
+
/**
|
|
11887
|
+
* Validates every explicitly declared API System Interface by deriving
|
|
11888
|
+
* readiness from its scoped resources and ontology bindings.
|
|
11889
|
+
*
|
|
11890
|
+
* Contract-absent models remain valid until they opt in with
|
|
11891
|
+
* `systems.*.apiInterface`.
|
|
11892
|
+
*/
|
|
11893
|
+
declare function validateDeclaredSystemInterfaceReadiness(orgName: string, organizationModel: ResourceGovernanceModel | undefined): SystemInterfaceReadinessValidationResult;
|
|
11846
11894
|
|
|
11847
11895
|
/**
|
|
11848
11896
|
* LLM Platform Tool Adapter
|
|
@@ -12279,5 +12327,5 @@ declare function projectDeploymentSpec(options: ProjectDeploymentSpecOptions): D
|
|
|
12279
12327
|
declare const ListBuilderStageKeySchema: z.ZodString;
|
|
12280
12328
|
type ListBuilderStageKey = z.infer<typeof ListBuilderStageKeySchema>;
|
|
12281
12329
|
|
|
12282
|
-
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, ContractRefResolutionError, CrmStageKeySchema, CrmStateKeySchema, EmailSchema, ExecutionError, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, bindResourceDescriptor, compileBusinessOntologyValidationIndex, concurrentPool, createLeadGenStageValidators, defineContract, defineResource, defineResourceOntology, defineResources, defineStep, defineTopology, defineTopologyRelationship, defineWorkflow, deriveActions, diagnosticOutput, integrationInput, isZodType, parseTopologyNodeRef, projectDeploymentSpec, projectTopologyRelationships, resolveContractRef, runDiagnostic, splitName, toSdkResourceDescriptor, topologyRef, topologyRelationship, validateResourceGovernance, withPlatformIntegrationResourceDescriptor, withPlatformIntegrationResourceDescriptors, withPlatformResourceDescriptor, withPlatformResourceDescriptors };
|
|
12330
|
+
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, ContractRefResolutionError, CrmStageKeySchema, CrmStateKeySchema, EmailSchema, ExecutionError, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, bindResourceDescriptor, compileBusinessOntologyValidationIndex, concurrentPool, createLeadGenStageValidators, defineContract, defineResource, defineResourceOntology, defineResources, defineStep, defineTopology, defineTopologyRelationship, defineWorkflow, deriveActions, diagnosticOutput, integrationInput, isZodType, parseTopologyNodeRef, projectDeploymentSpec, projectTopologyRelationships, resolveContractRef, runDiagnostic, splitName, toSdkResourceDescriptor, topologyRef, topologyRelationship, validateDeclaredSystemInterfaceReadiness, validateResourceGovernance, withPlatformIntegrationResourceDescriptor, withPlatformIntegrationResourceDescriptors, withPlatformResourceDescriptor, withPlatformResourceDescriptors };
|
|
12283
12331
|
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, BusinessOntologyValidationIndex, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, ClickUpToolMap, CompanyFilters, ConcurrentPoolOptions, ConcurrentPoolResult, ConditionalNext, ContactFilters, Contract, ContractRefResolutionErrorCode, ContractRegistry, 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, DiagnosticOutput, 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, IntegrationResourceDescriptorResolver, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadGenStageValidators, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListBuilderStageKey, ListBuilderStep, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, OrganizationModelIntegrationResourceEntry, OrganizationModelResourceEntry, OrganizationModelResourceOntologyBinding, OrganizationModelTopology, OrganizationModelTopologyNodeRef, OrganizationModelTopologyRelationship, OrganizationModelWorkflowResourceEntry, PaginatedResult, PaginationParams, PdfToolMap, ProcessingStageStatus, ProjectDeploymentSpecOptions, ProjectsToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResolvedContractRef, ResourceCategory, ResourceDefinition, ResourceLink, ResourceMetricsConfig, ResourceOntologyBindingResolver, 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, WorkflowLogger, WorkflowResourceDescriptorResolver, WorkflowStep, WriteSheetParams, WriteSheetResult };
|