@happyvertical/smrt-sales 0.57.20 → 0.57.22
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/agents/crm.md +23 -0
- package/dist/agreements.js +1 -1
- package/dist/chunks/{__smrt-register__-JXsLTRj7.js → __smrt-register__-bn1C2AUF.js} +2 -2
- package/dist/chunks/{__smrt-register__-JXsLTRj7.js.map → __smrt-register__-bn1C2AUF.js.map} +1 -1
- package/dist/chunks/{crm-DaUkdNoG.js → crm-BRICSwf2.js} +192 -2
- package/dist/chunks/crm-BRICSwf2.js.map +1 -0
- package/dist/commissions.js +1 -1
- package/dist/crm/index.d.ts +3 -1
- package/dist/crm/index.d.ts.map +1 -1
- package/dist/crm/services/LeadConversionService.d.ts +49 -0
- package/dist/crm/services/LeadConversionService.d.ts.map +1 -0
- package/dist/crm/services/LeadWorkflowService.d.ts +11 -0
- package/dist/crm/services/LeadWorkflowService.d.ts.map +1 -1
- package/dist/crm.js +3 -3
- package/dist/index.js +3 -3
- package/dist/manifest.json +1 -1
- package/dist/referrals.js +1 -1
- package/dist/smrt-knowledge.json +5 -5
- package/package.json +6 -6
- package/dist/chunks/crm-DaUkdNoG.js.map +0 -1
package/dist/commissions.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./chunks/__smrt-register__-
|
|
1
|
+
import "./chunks/__smrt-register__-bn1C2AUF.js";
|
|
2
2
|
import { A as COMMISSION_BASES, B as WATERFALL_POOL_RESIDUAL_RULES, C as WaterfallRecipientResolverRegistry, D as validateWaterfallPlan, E as prepareWaterfallPools, F as EARNER_SOURCE_ATTRIBUTION_STATUSES, G as Commission, H as CommissionPayoutCollection, I as EARNER_STATUSES, J as CommissionAdjustmentCollection, K as CommissionAdjustmentOperationCollection, L as EARNING_EVENT_KINDS, M as COMMISSION_PLAN_STATUSES, N as COMMISSION_STATUSES, O as ADJUSTMENT_SETTLEABLE_COMMISSION_STATUSES, P as EARNER_KINDS, R as PAYOUT_METHODS, S as validateCommissionPlanComponents, T as calculateWaterfallWithPools, U as CommissionPayout, V as WATERFALL_POOL_ZERO_WEIGHT_RULES, W as CommissionCollection, Y as CommissionAdjustment, _ as EarnerCollection, a as CommissionBalanceService, b as CommissionPlanCollection, c as CommissionAdjustmentValidationError, d as centsToAmount, f as roundCents, g as EarnerSourceAttribution, h as EarnerSourceAttributionCollection, i as CommissionCalculationService, j as COMMISSION_PAYOUT_STATUSES, k as COMMISSION_ADJUSTMENT_KINDS, l as amountToCents, m as EarningEvent, n as CommissionSettlementService, o as CommissionAdjustmentReplayConflictError, p as EarningEventCollection, q as CommissionAdjustmentOperation, r as CommissionPayoutService, s as CommissionAdjustmentService, t as EarnerAttributionService, u as calculateCommissionAmountCents, v as Earner, w as calculateWaterfall, x as CommissionPlan, y as validatePayoutDestination, z as PAYOUT_METHODS_REQUIRING_DESTINATION } from "./chunks/commissions-D5x24d4o.js";
|
|
3
3
|
export { ADJUSTMENT_SETTLEABLE_COMMISSION_STATUSES, COMMISSION_ADJUSTMENT_KINDS, COMMISSION_BASES, COMMISSION_PAYOUT_STATUSES, COMMISSION_PLAN_STATUSES, COMMISSION_STATUSES, Commission, CommissionAdjustment, CommissionAdjustmentCollection, CommissionAdjustmentOperation, CommissionAdjustmentOperationCollection, CommissionAdjustmentReplayConflictError, CommissionAdjustmentService, CommissionAdjustmentValidationError, CommissionBalanceService, CommissionCalculationService, CommissionCollection, CommissionPayout, CommissionPayoutCollection, CommissionPayoutService, CommissionPlan, CommissionPlanCollection, CommissionSettlementService, EARNER_KINDS, EARNER_SOURCE_ATTRIBUTION_STATUSES, EARNER_STATUSES, EARNING_EVENT_KINDS, Earner, EarnerAttributionService, EarnerCollection, EarnerSourceAttribution, EarnerSourceAttributionCollection, EarningEvent, EarningEventCollection, PAYOUT_METHODS, PAYOUT_METHODS_REQUIRING_DESTINATION, WATERFALL_POOL_RESIDUAL_RULES, WATERFALL_POOL_ZERO_WEIGHT_RULES, WaterfallRecipientResolverRegistry, amountToCents, calculateCommissionAmountCents, calculateWaterfall, calculateWaterfallWithPools, centsToAmount, prepareWaterfallPools, roundCents, validateCommissionPlanComponents, validatePayoutDestination, validateWaterfallPlan };
|
package/dist/crm/index.d.ts
CHANGED
|
@@ -24,7 +24,9 @@ export { PipelineStage } from './models/PipelineStage.js';
|
|
|
24
24
|
export { SalesActivity } from './models/SalesActivity.js';
|
|
25
25
|
export { SalesRepresentative } from './models/SalesRepresentative.js';
|
|
26
26
|
export { SalesPipelineRecipe } from './recipes.js';
|
|
27
|
-
export type {
|
|
27
|
+
export type { GetLeadConversionInput, LeadConversionReceipt, RecordLeadConversionInput, } from './services/LeadConversionService.js';
|
|
28
|
+
export { LeadConversionService } from './services/LeadConversionService.js';
|
|
29
|
+
export type { AssignLeadInput, AssignLeadResult, CloseOpportunityInput, CloseOpportunityResult, CompleteLeadNextActionInput, CompleteLeadNextActionResult, CreateLeadInput, CreateLeadResult, DisqualifyLeadInput, GetLeadWorkStateInput, LeadDedupePolicy, LeadHumanActivityKind, LeadWorkflowValidationReason, LeadWorkQueueInput, LeadWorkQueueProjection, LeadWorkQueueState, LeadWorkState, MoveOpportunityToStageInput, MoveOpportunityToStageResult, OpportunityConversionInput, QualifyLeadInput, QualifyLeadResult, RecordLeadActivityInput, ScheduleLeadNextActionInput, StartWorkingInput, UpdateLeadContactInput, } from './services/LeadWorkflowService.js';
|
|
28
30
|
export { LEAD_HUMAN_ACTIVITY_KINDS, LeadWorkflowService, LeadWorkflowValidationError, MAX_LEAD_WORKFLOW_TEXT_LENGTH, projectLeadWorkQueue, } from './services/LeadWorkflowService.js';
|
|
29
31
|
export type { LeadInboxItem, LeadInboxOptions, LeadInboxResult, LeadInboxSort, LeadInboxStatusCounts, } from './services/lead-inbox.js';
|
|
30
32
|
export * from './types.js';
|
package/dist/crm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/crm/index.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,aAAa,EACb,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAElC,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { SmrtClassOptions } from '@happyvertical/smrt-core';
|
|
2
|
+
/** Scope of one downstream conversion. Target kinds are host-defined. */
|
|
3
|
+
export interface GetLeadConversionInput {
|
|
4
|
+
tenantId: string;
|
|
5
|
+
leadId: string;
|
|
6
|
+
targetKind: string;
|
|
7
|
+
}
|
|
8
|
+
/** Immutable host-created downstream target and its provenance. */
|
|
9
|
+
export interface LeadConversionReceipt extends GetLeadConversionInput {
|
|
10
|
+
id: string;
|
|
11
|
+
targetId: string;
|
|
12
|
+
actorProfileId: string;
|
|
13
|
+
metadata: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
/** Record a target the host created within the same transaction. */
|
|
16
|
+
export interface RecordLeadConversionInput extends GetLeadConversionInput {
|
|
17
|
+
targetId: string;
|
|
18
|
+
actorProfileId: string;
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Records an early Lead conversion without qualifying or closing a deal.
|
|
23
|
+
* The host must authorize inputs, own the transaction, and serialize writes
|
|
24
|
+
* for the tenant/lead/targetKind scope before creating a target. This service
|
|
25
|
+
* participates in that executor and never opens a nested transaction. Returned
|
|
26
|
+
* receipts are plain data; use them only after the caller commits.
|
|
27
|
+
*/
|
|
28
|
+
export declare class LeadConversionService {
|
|
29
|
+
private readonly leads;
|
|
30
|
+
private readonly activities;
|
|
31
|
+
private readonly callerTransaction;
|
|
32
|
+
private constructor();
|
|
33
|
+
/** Bind read access to any initialized executor; mutations require caller mode. */
|
|
34
|
+
static create(options: SmrtClassOptions & {
|
|
35
|
+
transaction?: 'caller';
|
|
36
|
+
}): Promise<LeadConversionService>;
|
|
37
|
+
/** Read the tenant-local receipt, failing closed for inaccessible Leads. */
|
|
38
|
+
getForLead(input: GetLeadConversionInput): Promise<LeadConversionReceipt | null>;
|
|
39
|
+
/** Resolve originating Leads for a host target without exposing receipt storage. */
|
|
40
|
+
findForTarget(input: {
|
|
41
|
+
tenantId: string;
|
|
42
|
+
targetKind: string;
|
|
43
|
+
targetId: string;
|
|
44
|
+
}): Promise<LeadConversionReceipt[]>;
|
|
45
|
+
/** Exact retries preserve the original actor and receipt; changed intent fails. */
|
|
46
|
+
recordForLead(input: RecordLeadConversionInput): Promise<LeadConversionReceipt>;
|
|
47
|
+
private scope;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=LeadConversionService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeadConversionService.d.ts","sourceRoot":"","sources":["../../../src/crm/services/LeadConversionService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAKjE,yEAAyE;AACzE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AACD,mEAAmE;AACnE,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AACD,oEAAoE;AACpE,MAAM,WAAW,yBAA0B,SAAQ,sBAAsB;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;;;;;GAMG;AACH,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAHpC,OAAO;IAMP,mFAAmF;WACtE,MAAM,CACjB,OAAO,EAAE,gBAAgB,GAAG;QAAE,WAAW,CAAC,EAAE,QAAQ,CAAA;KAAE,GACrD,OAAO,CAAC,qBAAqB,CAAC;IAejC,4EAA4E;IACtE,UAAU,CACd,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;IA2BxC,oFAAoF;IAC9E,aAAa,CAAC,KAAK,EAAE;QACzB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IA8BpC,mFAAmF;IAC7E,aAAa,CACjB,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,qBAAqB,CAAC;YAqCnB,KAAK;CAapB"}
|
|
@@ -144,6 +144,15 @@ export interface AssignLeadResult {
|
|
|
144
144
|
/** `false` when the active representative already owned the Lead. */
|
|
145
145
|
changed: boolean;
|
|
146
146
|
}
|
|
147
|
+
/** Operator-authorized correction; identity and acquisition provenance stay intact. */
|
|
148
|
+
export interface UpdateLeadContactInput {
|
|
149
|
+
leadId: string;
|
|
150
|
+
actorProfileId: string;
|
|
151
|
+
name: string;
|
|
152
|
+
contactName: string;
|
|
153
|
+
email: string;
|
|
154
|
+
now?: Date;
|
|
155
|
+
}
|
|
147
156
|
export interface StartWorkingInput {
|
|
148
157
|
leadId: string;
|
|
149
158
|
actorProfileId: string;
|
|
@@ -214,6 +223,8 @@ export declare class LeadWorkflowService {
|
|
|
214
223
|
closeOpportunity(input: CloseOpportunityInput): Promise<CloseOpportunityResult>;
|
|
215
224
|
/** Assign or reassign an active representative, with one audit row per change. */
|
|
216
225
|
assignLead(input: AssignLeadInput): Promise<AssignLeadResult>;
|
|
226
|
+
/** Correct editable contact fields with one actor-attributed audit and row lock. */
|
|
227
|
+
updateLeadContact(input: UpdateLeadContactInput): Promise<Lead>;
|
|
217
228
|
/** Start a new Lead or reopen a disqualified Lead for active follow-up. */
|
|
218
229
|
startWorking(input: StartWorkingInput): Promise<Lead>;
|
|
219
230
|
/** Disqualify a new or working Lead with a required bounded rationale. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeadWorkflowService.d.ts","sourceRoot":"","sources":["../../../src/crm/services/LeadWorkflowService.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAajE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,oFAAoF;AACpF,eAAO,MAAM,yBAAyB,+CAK5B,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E,gFAAgF;AAChF,eAAO,MAAM,6BAA6B,OAAQ,CAAC;AAKnD,+DAA+D;AAC/D,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;YA6BR,YAAY;YA6CZ,eAAe;YA2Bf,iBAAiB;YA4BjB,kBAAkB;YAWlB,iBAAiB;YAqCjB,QAAQ;YAqBR,eAAe;YAWf,mBAAmB;IAkBjC,OAAO,CAAC,wBAAwB;IAgGhC,OAAO,CAAC,wBAAwB;YASlB,WAAW;YAqBX,uBAAuB;IAarC,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,GAAG;IAIX,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,OAAO;CAMhB;AA4GD,eAAe,mBAAmB,CAAC"}
|
package/dist/crm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./chunks/__smrt-register__-
|
|
2
|
-
import { C as
|
|
3
|
-
export { DEFAULT_PIPELINE_KEY, DEFAULT_PIPELINE_STAGES, LEAD_HUMAN_ACTIVITY_KINDS, LEAD_STATUSES, Lead, LeadCollection, LeadWorkflowService, LeadWorkflowValidationError, MAX_LEAD_WORKFLOW_TEXT_LENGTH, OPPORTUNITY_STATUSES, Opportunity, OpportunityCollection, OpportunityConversion, OpportunityConversionCollection, PIPELINE_STATUSES, PipelineDefinition, PipelineDefinitionCollection, PipelineStage, PipelineStageCollection, SALES_ACTIVITY_KINDS, SALES_ACTIVITY_SUBJECT_KINDS, SALES_REPRESENTATIVE_STATUSES, SalesActivity, SalesActivityCollection, SalesPipelineRecipe, SalesRepresentative, SalesRepresentativeCollection, projectLeadWorkQueue };
|
|
1
|
+
import "./chunks/__smrt-register__-bn1C2AUF.js";
|
|
2
|
+
import { C as LEAD_STATUSES, D as SALES_ACTIVITY_SUBJECT_KINDS, E as SALES_ACTIVITY_KINDS, O as SALES_REPRESENTATIVE_STATUSES, S as DEFAULT_PIPELINE_STAGES, T as PIPELINE_STATUSES, _ as SalesActivity, a as projectLeadWorkQueue, b as Opportunity, c as OpportunityConversionCollection, d as SalesRepresentativeCollection, f as SalesRepresentative, g as SalesActivityCollection, h as OpportunityCollection, i as MAX_LEAD_WORKFLOW_TEXT_LENGTH, k as Lead, l as OpportunityConversion, m as PipelineDefinition, n as LeadWorkflowService, o as LeadConversionService, p as PipelineDefinitionCollection, r as LeadWorkflowValidationError, s as SalesPipelineRecipe, t as LEAD_HUMAN_ACTIVITY_KINDS, u as LeadCollection, v as PipelineStageCollection, w as OPPORTUNITY_STATUSES, x as DEFAULT_PIPELINE_KEY, y as PipelineStage } from "./chunks/crm-BRICSwf2.js";
|
|
3
|
+
export { DEFAULT_PIPELINE_KEY, DEFAULT_PIPELINE_STAGES, LEAD_HUMAN_ACTIVITY_KINDS, LEAD_STATUSES, Lead, LeadCollection, LeadConversionService, LeadWorkflowService, LeadWorkflowValidationError, MAX_LEAD_WORKFLOW_TEXT_LENGTH, OPPORTUNITY_STATUSES, Opportunity, OpportunityCollection, OpportunityConversion, OpportunityConversionCollection, PIPELINE_STATUSES, PipelineDefinition, PipelineDefinitionCollection, PipelineStage, PipelineStageCollection, SALES_ACTIVITY_KINDS, SALES_ACTIVITY_SUBJECT_KINDS, SALES_REPRESENTATIVE_STATUSES, SalesActivity, SalesActivityCollection, SalesPipelineRecipe, SalesRepresentative, SalesRepresentativeCollection, projectLeadWorkQueue };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./chunks/__smrt-register__-
|
|
1
|
+
import "./chunks/__smrt-register__-bn1C2AUF.js";
|
|
2
2
|
import { a as AgreementExecutionEvent, c as AgreementCollection, d as serializeAgreementParty, f as AGREEMENT_EXECUTION_STATUSES, g as sanitizeSignerIntent, h as sanitizeSignerEvidence, i as AgreementExecutionEventCollection, l as Agreement, m as coerceAgreementDate, n as ExecutedAgreementCollection, o as AgreementExecutionCollection, p as AGREEMENT_STATUSES, r as ExecutedAgreement, s as AgreementExecution, t as AgreementExecutionService, u as parseAgreementParty } from "./chunks/agreements-jBiVmttD.js";
|
|
3
3
|
import { A as COMMISSION_BASES, B as WATERFALL_POOL_RESIDUAL_RULES, C as WaterfallRecipientResolverRegistry, D as validateWaterfallPlan, E as prepareWaterfallPools, F as EARNER_SOURCE_ATTRIBUTION_STATUSES, G as Commission, H as CommissionPayoutCollection, I as EARNER_STATUSES, J as CommissionAdjustmentCollection, K as CommissionAdjustmentOperationCollection, L as EARNING_EVENT_KINDS, M as COMMISSION_PLAN_STATUSES, N as COMMISSION_STATUSES, O as ADJUSTMENT_SETTLEABLE_COMMISSION_STATUSES, P as EARNER_KINDS, R as PAYOUT_METHODS, S as validateCommissionPlanComponents, T as calculateWaterfallWithPools, U as CommissionPayout, V as WATERFALL_POOL_ZERO_WEIGHT_RULES, W as CommissionCollection, Y as CommissionAdjustment, _ as EarnerCollection, a as CommissionBalanceService, b as CommissionPlanCollection, c as CommissionAdjustmentValidationError, d as centsToAmount, f as roundCents, g as EarnerSourceAttribution, h as EarnerSourceAttributionCollection, i as CommissionCalculationService, j as COMMISSION_PAYOUT_STATUSES, k as COMMISSION_ADJUSTMENT_KINDS, l as amountToCents, m as EarningEvent, n as CommissionSettlementService, o as CommissionAdjustmentReplayConflictError, p as EarningEventCollection, q as CommissionAdjustmentOperation, r as CommissionPayoutService, s as CommissionAdjustmentService, t as EarnerAttributionService, u as calculateCommissionAmountCents, v as Earner, w as calculateWaterfall, x as CommissionPlan, y as validatePayoutDestination, z as PAYOUT_METHODS_REQUIRING_DESTINATION } from "./chunks/commissions-D5x24d4o.js";
|
|
4
|
-
import { C as
|
|
4
|
+
import { C as LEAD_STATUSES, D as SALES_ACTIVITY_SUBJECT_KINDS, E as SALES_ACTIVITY_KINDS, O as SALES_REPRESENTATIVE_STATUSES, S as DEFAULT_PIPELINE_STAGES, T as PIPELINE_STATUSES, _ as SalesActivity, a as projectLeadWorkQueue, b as Opportunity, c as OpportunityConversionCollection, d as SalesRepresentativeCollection, f as SalesRepresentative, g as SalesActivityCollection, h as OpportunityCollection, i as MAX_LEAD_WORKFLOW_TEXT_LENGTH, k as Lead, l as OpportunityConversion, m as PipelineDefinition, n as LeadWorkflowService, o as LeadConversionService, p as PipelineDefinitionCollection, r as LeadWorkflowValidationError, s as SalesPipelineRecipe, t as LEAD_HUMAN_ACTIVITY_KINDS, u as LeadCollection, v as PipelineStageCollection, w as OPPORTUNITY_STATUSES, x as DEFAULT_PIPELINE_KEY, y as PipelineStage } from "./chunks/crm-BRICSwf2.js";
|
|
5
5
|
import { A as ReferralClickOperation, B as ATTRIBUTION_RESOLUTION_MODES, C as ReferralTouchCollection, D as ReferralCollection, E as assertHttpTargetUrl, F as validateAttributionPolicyTerms, G as REFERRAL_STATUSES, H as REFERRAL_AGREEMENT_STATUSES, I as ATTRIBUTION_CONFLICT_BEHAVIORS, J as AttributionExceptionCollection, K as REFERRAL_TOUCH_KINDS, L as ATTRIBUTION_CREDIT_MODES, M as ReferralAgreement, N as AttributionPolicyCollection, O as Referral, P as AttributionPolicy, R as ATTRIBUTION_EXCEPTION_STATUSES, S as generateReferralCode, T as ReferralLink, U as REFERRAL_LINK_STATUSES, V as REFERRAL_AGREEMENT_APPROVAL_MODES, W as REFERRAL_PROGRAM_STATUSES, Y as AttributionException, _ as REFERRAL_CODE_ALPHABET, a as ReferralAgreementExecutionService, b as ReferralClickValidationError, c as ReferrerCollection, d as ReferralTermSnapshot, f as ReferralProgramCollection, g as MAX_REFERRAL_CLICK_IDEMPOTENCY_KEY_BYTES, h as MAX_CODE_GENERATION_ATTEMPTS, i as REFERRAL_AGREEMENT_SOURCE_KIND, j as ReferralAgreementCollection, k as ReferralClickOperationCollection, l as Referrer, m as DEFAULT_REFERRAL_CLICK_EVIDENCE_MAX_BYTES, n as REFERRAL_TERMS_SNAPSHOT_KIND, o as AttributionService, p as ReferralProgram, q as REFERRER_STATUSES, r as ReferralCommissionService, s as QualifiedReferralOverrideError, t as ReferralQualificationService, u as ReferralTermSnapshotCollection, v as REFERRAL_CODE_LENGTH, w as ReferralTouch, x as ReferralLinkCollection, y as ReferralClickReplayConflictError, z as ATTRIBUTION_POLICY_STATUSES } from "./chunks/referrals-BRdTkEFt.js";
|
|
6
|
-
export { ADJUSTMENT_SETTLEABLE_COMMISSION_STATUSES, AGREEMENT_EXECUTION_STATUSES, AGREEMENT_STATUSES, ATTRIBUTION_CONFLICT_BEHAVIORS, ATTRIBUTION_CREDIT_MODES, ATTRIBUTION_EXCEPTION_STATUSES, ATTRIBUTION_POLICY_STATUSES, ATTRIBUTION_RESOLUTION_MODES, Agreement, AgreementCollection, AgreementExecution, AgreementExecutionCollection, AgreementExecutionEvent, AgreementExecutionEventCollection, AgreementExecutionService, AttributionException, AttributionExceptionCollection, AttributionPolicy, AttributionPolicyCollection, AttributionService, COMMISSION_ADJUSTMENT_KINDS, COMMISSION_BASES, COMMISSION_PAYOUT_STATUSES, COMMISSION_PLAN_STATUSES, COMMISSION_STATUSES, Commission, CommissionAdjustment, CommissionAdjustmentCollection, CommissionAdjustmentOperation, CommissionAdjustmentOperationCollection, CommissionAdjustmentReplayConflictError, CommissionAdjustmentService, CommissionAdjustmentValidationError, CommissionBalanceService, CommissionCalculationService, CommissionCollection, CommissionPayout, CommissionPayoutCollection, CommissionPayoutService, CommissionPlan, CommissionPlanCollection, CommissionSettlementService, DEFAULT_PIPELINE_KEY, DEFAULT_PIPELINE_STAGES, DEFAULT_REFERRAL_CLICK_EVIDENCE_MAX_BYTES, EARNER_KINDS, EARNER_SOURCE_ATTRIBUTION_STATUSES, EARNER_STATUSES, EARNING_EVENT_KINDS, Earner, EarnerAttributionService, EarnerCollection, EarnerSourceAttribution, EarnerSourceAttributionCollection, EarningEvent, EarningEventCollection, ExecutedAgreement, ExecutedAgreementCollection, LEAD_HUMAN_ACTIVITY_KINDS, LEAD_STATUSES, Lead, LeadCollection, LeadWorkflowService, LeadWorkflowValidationError, MAX_CODE_GENERATION_ATTEMPTS, MAX_LEAD_WORKFLOW_TEXT_LENGTH, MAX_REFERRAL_CLICK_IDEMPOTENCY_KEY_BYTES, OPPORTUNITY_STATUSES, Opportunity, OpportunityCollection, OpportunityConversion, OpportunityConversionCollection, PAYOUT_METHODS, PAYOUT_METHODS_REQUIRING_DESTINATION, PIPELINE_STATUSES, PipelineDefinition, PipelineDefinitionCollection, PipelineStage, PipelineStageCollection, QualifiedReferralOverrideError, REFERRAL_AGREEMENT_APPROVAL_MODES, REFERRAL_AGREEMENT_SOURCE_KIND, REFERRAL_AGREEMENT_STATUSES, REFERRAL_CODE_ALPHABET, REFERRAL_CODE_LENGTH, REFERRAL_LINK_STATUSES, REFERRAL_PROGRAM_STATUSES, REFERRAL_STATUSES, REFERRAL_TERMS_SNAPSHOT_KIND, REFERRAL_TOUCH_KINDS, REFERRER_STATUSES, Referral, ReferralAgreement, ReferralAgreementCollection, ReferralAgreementExecutionService, ReferralClickOperation, ReferralClickOperationCollection, ReferralClickReplayConflictError, ReferralClickValidationError, ReferralCollection, ReferralCommissionService, ReferralLink, ReferralLinkCollection, ReferralProgram, ReferralProgramCollection, ReferralQualificationService, ReferralTermSnapshot, ReferralTermSnapshotCollection, ReferralTouch, ReferralTouchCollection, Referrer, ReferrerCollection, SALES_ACTIVITY_KINDS, SALES_ACTIVITY_SUBJECT_KINDS, SALES_REPRESENTATIVE_STATUSES, SalesActivity, SalesActivityCollection, SalesPipelineRecipe, SalesRepresentative, SalesRepresentativeCollection, WATERFALL_POOL_RESIDUAL_RULES, WATERFALL_POOL_ZERO_WEIGHT_RULES, WaterfallRecipientResolverRegistry, amountToCents, assertHttpTargetUrl, calculateCommissionAmountCents, calculateWaterfall, calculateWaterfallWithPools, centsToAmount, coerceAgreementDate, generateReferralCode, parseAgreementParty, prepareWaterfallPools, projectLeadWorkQueue, roundCents, sanitizeSignerEvidence, sanitizeSignerIntent, serializeAgreementParty, validateAttributionPolicyTerms, validateCommissionPlanComponents, validatePayoutDestination, validateWaterfallPlan };
|
|
6
|
+
export { ADJUSTMENT_SETTLEABLE_COMMISSION_STATUSES, AGREEMENT_EXECUTION_STATUSES, AGREEMENT_STATUSES, ATTRIBUTION_CONFLICT_BEHAVIORS, ATTRIBUTION_CREDIT_MODES, ATTRIBUTION_EXCEPTION_STATUSES, ATTRIBUTION_POLICY_STATUSES, ATTRIBUTION_RESOLUTION_MODES, Agreement, AgreementCollection, AgreementExecution, AgreementExecutionCollection, AgreementExecutionEvent, AgreementExecutionEventCollection, AgreementExecutionService, AttributionException, AttributionExceptionCollection, AttributionPolicy, AttributionPolicyCollection, AttributionService, COMMISSION_ADJUSTMENT_KINDS, COMMISSION_BASES, COMMISSION_PAYOUT_STATUSES, COMMISSION_PLAN_STATUSES, COMMISSION_STATUSES, Commission, CommissionAdjustment, CommissionAdjustmentCollection, CommissionAdjustmentOperation, CommissionAdjustmentOperationCollection, CommissionAdjustmentReplayConflictError, CommissionAdjustmentService, CommissionAdjustmentValidationError, CommissionBalanceService, CommissionCalculationService, CommissionCollection, CommissionPayout, CommissionPayoutCollection, CommissionPayoutService, CommissionPlan, CommissionPlanCollection, CommissionSettlementService, DEFAULT_PIPELINE_KEY, DEFAULT_PIPELINE_STAGES, DEFAULT_REFERRAL_CLICK_EVIDENCE_MAX_BYTES, EARNER_KINDS, EARNER_SOURCE_ATTRIBUTION_STATUSES, EARNER_STATUSES, EARNING_EVENT_KINDS, Earner, EarnerAttributionService, EarnerCollection, EarnerSourceAttribution, EarnerSourceAttributionCollection, EarningEvent, EarningEventCollection, ExecutedAgreement, ExecutedAgreementCollection, LEAD_HUMAN_ACTIVITY_KINDS, LEAD_STATUSES, Lead, LeadCollection, LeadConversionService, LeadWorkflowService, LeadWorkflowValidationError, MAX_CODE_GENERATION_ATTEMPTS, MAX_LEAD_WORKFLOW_TEXT_LENGTH, MAX_REFERRAL_CLICK_IDEMPOTENCY_KEY_BYTES, OPPORTUNITY_STATUSES, Opportunity, OpportunityCollection, OpportunityConversion, OpportunityConversionCollection, PAYOUT_METHODS, PAYOUT_METHODS_REQUIRING_DESTINATION, PIPELINE_STATUSES, PipelineDefinition, PipelineDefinitionCollection, PipelineStage, PipelineStageCollection, QualifiedReferralOverrideError, REFERRAL_AGREEMENT_APPROVAL_MODES, REFERRAL_AGREEMENT_SOURCE_KIND, REFERRAL_AGREEMENT_STATUSES, REFERRAL_CODE_ALPHABET, REFERRAL_CODE_LENGTH, REFERRAL_LINK_STATUSES, REFERRAL_PROGRAM_STATUSES, REFERRAL_STATUSES, REFERRAL_TERMS_SNAPSHOT_KIND, REFERRAL_TOUCH_KINDS, REFERRER_STATUSES, Referral, ReferralAgreement, ReferralAgreementCollection, ReferralAgreementExecutionService, ReferralClickOperation, ReferralClickOperationCollection, ReferralClickReplayConflictError, ReferralClickValidationError, ReferralCollection, ReferralCommissionService, ReferralLink, ReferralLinkCollection, ReferralProgram, ReferralProgramCollection, ReferralQualificationService, ReferralTermSnapshot, ReferralTermSnapshotCollection, ReferralTouch, ReferralTouchCollection, Referrer, ReferrerCollection, SALES_ACTIVITY_KINDS, SALES_ACTIVITY_SUBJECT_KINDS, SALES_REPRESENTATIVE_STATUSES, SalesActivity, SalesActivityCollection, SalesPipelineRecipe, SalesRepresentative, SalesRepresentativeCollection, WATERFALL_POOL_RESIDUAL_RULES, WATERFALL_POOL_ZERO_WEIGHT_RULES, WaterfallRecipientResolverRegistry, amountToCents, assertHttpTargetUrl, calculateCommissionAmountCents, calculateWaterfall, calculateWaterfallWithPools, centsToAmount, coerceAgreementDate, generateReferralCode, parseAgreementParty, prepareWaterfallPools, projectLeadWorkQueue, roundCents, sanitizeSignerEvidence, sanitizeSignerIntent, serializeAgreementParty, validateAttributionPolicyTerms, validateCommissionPlanComponents, validatePayoutDestination, validateWaterfallPlan };
|
package/dist/manifest.json
CHANGED
package/dist/referrals.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./chunks/__smrt-register__-
|
|
1
|
+
import "./chunks/__smrt-register__-bn1C2AUF.js";
|
|
2
2
|
import { A as ReferralClickOperation, B as ATTRIBUTION_RESOLUTION_MODES, C as ReferralTouchCollection, D as ReferralCollection, E as assertHttpTargetUrl, F as validateAttributionPolicyTerms, G as REFERRAL_STATUSES, H as REFERRAL_AGREEMENT_STATUSES, I as ATTRIBUTION_CONFLICT_BEHAVIORS, J as AttributionExceptionCollection, K as REFERRAL_TOUCH_KINDS, L as ATTRIBUTION_CREDIT_MODES, M as ReferralAgreement, N as AttributionPolicyCollection, O as Referral, P as AttributionPolicy, R as ATTRIBUTION_EXCEPTION_STATUSES, S as generateReferralCode, T as ReferralLink, U as REFERRAL_LINK_STATUSES, V as REFERRAL_AGREEMENT_APPROVAL_MODES, W as REFERRAL_PROGRAM_STATUSES, Y as AttributionException, _ as REFERRAL_CODE_ALPHABET, a as ReferralAgreementExecutionService, b as ReferralClickValidationError, c as ReferrerCollection, d as ReferralTermSnapshot, f as ReferralProgramCollection, g as MAX_REFERRAL_CLICK_IDEMPOTENCY_KEY_BYTES, h as MAX_CODE_GENERATION_ATTEMPTS, i as REFERRAL_AGREEMENT_SOURCE_KIND, j as ReferralAgreementCollection, k as ReferralClickOperationCollection, l as Referrer, m as DEFAULT_REFERRAL_CLICK_EVIDENCE_MAX_BYTES, n as REFERRAL_TERMS_SNAPSHOT_KIND, o as AttributionService, p as ReferralProgram, q as REFERRER_STATUSES, r as ReferralCommissionService, s as QualifiedReferralOverrideError, t as ReferralQualificationService, u as ReferralTermSnapshotCollection, v as REFERRAL_CODE_LENGTH, w as ReferralTouch, x as ReferralLinkCollection, y as ReferralClickReplayConflictError, z as ATTRIBUTION_POLICY_STATUSES } from "./chunks/referrals-BRdTkEFt.js";
|
|
3
3
|
export { ATTRIBUTION_CONFLICT_BEHAVIORS, ATTRIBUTION_CREDIT_MODES, ATTRIBUTION_EXCEPTION_STATUSES, ATTRIBUTION_POLICY_STATUSES, ATTRIBUTION_RESOLUTION_MODES, AttributionException, AttributionExceptionCollection, AttributionPolicy, AttributionPolicyCollection, AttributionService, DEFAULT_REFERRAL_CLICK_EVIDENCE_MAX_BYTES, MAX_CODE_GENERATION_ATTEMPTS, MAX_REFERRAL_CLICK_IDEMPOTENCY_KEY_BYTES, QualifiedReferralOverrideError, REFERRAL_AGREEMENT_APPROVAL_MODES, REFERRAL_AGREEMENT_SOURCE_KIND, REFERRAL_AGREEMENT_STATUSES, REFERRAL_CODE_ALPHABET, REFERRAL_CODE_LENGTH, REFERRAL_LINK_STATUSES, REFERRAL_PROGRAM_STATUSES, REFERRAL_STATUSES, REFERRAL_TERMS_SNAPSHOT_KIND, REFERRAL_TOUCH_KINDS, REFERRER_STATUSES, Referral, ReferralAgreement, ReferralAgreementCollection, ReferralAgreementExecutionService, ReferralClickOperation, ReferralClickOperationCollection, ReferralClickReplayConflictError, ReferralClickValidationError, ReferralCollection, ReferralCommissionService, ReferralLink, ReferralLinkCollection, ReferralProgram, ReferralProgramCollection, ReferralQualificationService, ReferralTermSnapshot, ReferralTermSnapshotCollection, ReferralTouch, ReferralTouchCollection, Referrer, ReferrerCollection, assertHttpTargetUrl, generateReferralCode, validateAttributionPolicyTerms };
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-sales",
|
|
6
|
-
"packageVersion": "0.57.
|
|
6
|
+
"packageVersion": "0.57.22",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "262ef341d2ccf9cfc44d1efe0146fcac93127d46890d416fcaad065e1ca7fc20",
|
|
11
|
+
"packageJson": "6034ee48ebcac73770864d058372df874c1a0ae98c6c36fca7ac04802b42ff1a",
|
|
12
12
|
"agents": "3100099d7cef116237e4deb4f83e32d836f3cc26e0f68a7dd55f14de942eda11",
|
|
13
13
|
"moduleDoc:agents/agreements.md": "eb6ff147a0f60ee627d3337e8e9394d06fda955b4a4fff228537a9bd2803f886",
|
|
14
14
|
"moduleDoc:agents/commissions.md": "ba06d133f2cbee14ea9a5f18b632f155e3484c4cd721ed5ac993436397198cf8",
|
|
15
|
-
"moduleDoc:agents/crm.md": "
|
|
15
|
+
"moduleDoc:agents/crm.md": "bc93353ca7d549efc7da604c2671f31d33d3619d1ee74e825c2f352ca7d43fa9",
|
|
16
16
|
"moduleDoc:agents/referrals.md": "ef48c88e63155e3d08b9003f4643bc66ebb1942f1fb713252dc042ddcaad38e5",
|
|
17
17
|
"moduleDoc:agents/svelte.md": "819f690b91cf93980f6f79e89da8d9629ca6e5c565494e3fd2ca3be7587ad6de"
|
|
18
18
|
},
|
|
@@ -13617,7 +13617,7 @@
|
|
|
13617
13617
|
{
|
|
13618
13618
|
"path": "agents/crm.md",
|
|
13619
13619
|
"module": "crm",
|
|
13620
|
-
"content": "# smrt-sales/crm\n\nPer-module semantics for `@happyvertical/smrt-sales/crm`. Package orientation, the\ncross-module invariants (currency, tenancy, cross-package refs, roles vs.\nmoney), and the Gotchas that apply before editing anything live in\n[../AGENTS.md](../AGENTS.md) — read that first.\n\n- **SalesRepresentative**: role model (`profileId`, `earnerId`, `status`).\n- **Lead**: identified prospect with owner assignment, generic acquisition source (`sourceKind`/`sourceId`), preserved `acquisitionContext` JSON, and audited merge (`mergedIntoId`; merges preserve activity + acquisition history on both sides).\n- **PipelineDefinition / PipelineStage**: configurable ordered stages with default `new → qualified → discovery → proposal → negotiation → closed_won | closed_lost` (seeded via `ensureDefaultPipeline()`); stages carry `probability` and `isWon`/`isLost` terminal flags.\n- **Opportunity**: qualified engagement — owner, pipeline + stage, `expectedValueCents`, `probability`, `expectedCloseAt`, outcome. Stage movement validated against the pipeline; terminal stages set `won|lost` status.\n- **SalesActivity**: activity/next-action trail for Leads and Opportunities (`subjectKind`/`subjectId`), also the audit trail for assignment, qualification, merges, and stage movement.\n- **LeadWorkflowService**: the required tenant-safe Lead mutation seam. It transactionally locks the affected Lead/Opportunity (and completion task on PostgreSQL), accepts only active same-tenant representatives, writes actor-attributed audits alongside mutations, and returns merge-aware timeline/work-state reads. It owns validated `createLead()` intake, `new | disqualified → working`, `new | working → disqualified`, human follow-up (`note | call | email | meeting`), task scheduling/completion, delegated qualification, nonterminal Opportunity stage movement, and terminal Opportunity closure/conversion. Merging remains a collection lifecycle.\n- **OpportunityConversion**: idempotent conversion links (`targetKind`/`targetId` — client, project, contract, subscription, …) with a composite natural key. CRM never creates downstream records itself and never mutates referral or commission state.\n\nWorkflow calls require ambient tenant context. Mutations require an actor profile\nid except `createLead()`, whose actor is optional for automated intake. Fail\nclosed for foreign/missing Lead, Opportunity, pipeline, representative, and task\nids without revealing their existence. Human metadata is plain JSON-object data;\nframework audit metadata is generated separately. Keep queue projection pure\n(`now`/optional timezone are injected) and do not add assignment, reminder, SLA,\nauthorization, or conversion policy.\n\n`createLead()` requires a name and at least one of email/phone, normalizes email,\nand supports `none | email | email_or_org` tenant-local dedupe. Active duplicates\nreturn the existing Lead and append one `inbound` activity per novel normalized\nintent; terminal matches return `{ created: false, duplicateOf }` without mutation\nso the caller must explicitly retry with `dedupe: 'none'` to create another Lead.\nCaller idempotency keys are persisted through deterministic immutable activity\nids, including when intake resolves to an existing active Lead; reusing a key\nwith changed intent is rejected. PostgreSQL uses transaction advisory/row locks,\nwhile single-connection adapters serialize the entire transaction.\nThe optional `profileId` is a host-authorized cross-package identity link and is\npart of that immutable retry intent; Sales stores it but does not authorize or\nload the referenced Profile.\n\n`qualifyLead()` delegates to `LeadCollection.qualify()` on the same transaction\nexecutor and returns whether the Opportunity was newly created.\n`moveOpportunityToStage()` locks an open Opportunity and atomically moves it to\na nonterminal stage in the same tenant and pipeline. An exact stage/probability\nretry is a no-op; a conflicting same-stage probability is refused. Terminal\nstages remain exclusive to `closeOpportunity()`, which\nresolves the configured won/lost terminal stage, delegates stage movement, and\noptionally records a won conversion in the same transaction. Exact retries add\nno stage activity or conversion. `getLeadWorkState()` includes the canonical\nlinked Opportunity when present. Transaction-bound result models are reloaded\non the service database after commit before being returned.\n\n`LeadCollection.listInbox({ status?, ownerRepId?, unassigned?, overdue?,\nsearch?, sort?, limit, offset, now? })` requires ambient tenancy and returns\n`{ leads, items, total, statusCounts }`. `leads` are hydrated Lead rows; aligned\n`items` add the hydrated owner and earliest open Lead task as `nextAction`\nwithout per-row queries. Search trims and performs case-insensitive literal\nsubstring matching across name, contact name, email, phone, and organization.\nSort values are `created | next_action | name`, all with stable id tie-breaks;\nmissing next actions sort last. `limit` is required from 1–100 and `offset` is\nrequired and nonnegative.\n\n`total` applies every selected filter. `statusCounts` contains `all`, every Lead\nstatus, `unassigned`, and `overdue`; counts retain owner/search scope but ignore\nthe selected status/unassigned/overdue tab. Overdue means the earliest open task\nis due strictly before injected `now` (default current time).\n"
|
|
13620
|
+
"content": "# smrt-sales/crm\n\nPer-module semantics for `@happyvertical/smrt-sales/crm`. Package orientation, the\ncross-module invariants (currency, tenancy, cross-package refs, roles vs.\nmoney), and the Gotchas that apply before editing anything live in\n[../AGENTS.md](../AGENTS.md) — read that first.\n\n- **SalesRepresentative**: role model (`profileId`, `earnerId`, `status`).\n- **Lead**: identified prospect with owner assignment, generic acquisition source (`sourceKind`/`sourceId`), preserved `acquisitionContext` JSON, and audited merge (`mergedIntoId`; merges preserve activity + acquisition history on both sides).\n- **PipelineDefinition / PipelineStage**: configurable ordered stages with default `new → qualified → discovery → proposal → negotiation → closed_won | closed_lost` (seeded via `ensureDefaultPipeline()`); stages carry `probability` and `isWon`/`isLost` terminal flags.\n- **Opportunity**: qualified engagement — owner, pipeline + stage, `expectedValueCents`, `probability`, `expectedCloseAt`, outcome. Stage movement validated against the pipeline; terminal stages set `won|lost` status.\n- **SalesActivity**: activity/next-action trail for Leads and Opportunities (`subjectKind`/`subjectId`), also the audit trail for assignment, qualification, merges, and stage movement.\n- **LeadWorkflowService**: the required tenant-safe Lead mutation seam. It transactionally locks the affected Lead/Opportunity (and completion task on PostgreSQL), accepts only active same-tenant representatives, writes actor-attributed audits alongside mutations, and returns merge-aware timeline/work-state reads. It owns validated `createLead()` intake, `new | disqualified → working`, `new | working → disqualified`, human follow-up (`note | call | email | meeting`), task scheduling/completion, delegated qualification, nonterminal Opportunity stage movement, and terminal Opportunity closure/conversion. Merging remains a collection lifecycle.\n- **OpportunityConversion**: idempotent conversion links (`targetKind`/`targetId` — client, project, contract, subscription, …) with a composite natural key. CRM never creates downstream records itself and never mutates referral or commission state.\n\nWorkflow calls require ambient tenant context. Mutations require an actor profile\nid except `createLead()`, whose actor is optional for automated intake. Fail\nclosed for foreign/missing Lead, Opportunity, pipeline, representative, and task\nids without revealing their existence. Human metadata is plain JSON-object data;\nframework audit metadata is generated separately. Keep queue projection pure\n(`now`/optional timezone are injected) and do not add assignment, reminder, SLA,\nauthorization, or conversion policy.\n\n`createLead()` requires a name and at least one of email/phone, normalizes email,\nand supports `none | email | email_or_org` tenant-local dedupe. Active duplicates\nreturn the existing Lead and append one `inbound` activity per novel normalized\nintent; terminal matches return `{ created: false, duplicateOf }` without mutation\nso the caller must explicitly retry with `dedupe: 'none'` to create another Lead.\nCaller idempotency keys are persisted through deterministic immutable activity\nids, including when intake resolves to an existing active Lead; reusing a key\nwith changed intent is rejected. PostgreSQL uses transaction advisory/row locks,\nwhile single-connection adapters serialize the entire transaction.\nThe optional `profileId` is a host-authorized cross-package identity link and is\npart of that immutable retry intent; Sales stores it but does not authorize or\nload the referenced Profile.\n\n`qualifyLead()` delegates to `LeadCollection.qualify()` on the same transaction\nexecutor and returns whether the Opportunity was newly created.\n`moveOpportunityToStage()` locks an open Opportunity and atomically moves it to\na nonterminal stage in the same tenant and pipeline. An exact stage/probability\nretry is a no-op; a conflicting same-stage probability is refused. Terminal\nstages remain exclusive to `closeOpportunity()`, which\nresolves the configured won/lost terminal stage, delegates stage movement, and\noptionally records a won conversion in the same transaction. Exact retries add\nno stage activity or conversion. `getLeadWorkState()` includes the canonical\nlinked Opportunity when present. Transaction-bound result models are reloaded\non the service database after commit before being returned.\n\n`LeadCollection.listInbox({ status?, ownerRepId?, unassigned?, overdue?,\nsearch?, sort?, limit, offset, now? })` requires ambient tenancy and returns\n`{ leads, items, total, statusCounts }`. `leads` are hydrated Lead rows; aligned\n`items` add the hydrated owner and earliest open Lead task as `nextAction`\nwithout per-row queries. Search trims and performs case-insensitive literal\nsubstring matching across name, contact name, email, phone, and organization.\nSort values are `created | next_action | name`, all with stable id tie-breaks;\nmissing next actions sort last. `limit` is required from 1–100 and `offset` is\nrequired and nonnegative.\n\n`total` applies every selected filter. `statusCounts` contains `all`, every Lead\nstatus, `unassigned`, and `overdue`; counts retain owner/search scope but ignore\nthe selected status/unassigned/overdue tab. Overdue means the earliest open task\nis due strictly before injected `now` (default current time).\n\n`LeadConversionService.create({ db: tx, transaction: 'caller' })` records pending\nconversions before an Opportunity is won, using immutable `lead_conversion`\nSalesActivity receipts (no new table). Hosts authorize inputs and serialize the\nlead conversion scope, create downstream records, and record the receipt within\none caller-owned transaction. `getForLead({ tenantId, leadId, targetKind })` and\n`recordForLead({ ...scope, targetId, actorProfileId, metadata? })` require matching\nambient tenancy and a same-tenant Lead. A tenant/lead/targetKind has one target;\nexact target/metadata replay returns the original receipt and actor, conflicting\nintent is refused. The service never changes Lead/Opportunity state, invites\nusers, or starts a transaction. Only use returned plain receipts after commit.\n\n`findForTarget({ tenantId, targetKind, targetId })` reads canonical originating\nLead receipts for a downstream target in the active tenant, without requiring\nhosts to parse SalesActivity metadata.\n\n`LeadWorkflowService.updateLeadContact({ leadId, actorProfileId, name,\ncontactName, email, now? })` locks a same-tenant, non-merged Lead and corrects\neditable contact fields in its own transaction. Name is required, email is\nnormalized/validated, and at least email or existing phone is required. Exact\nretries are no-ops. Effective changes append one `contact_update` activity with\nbefore/after values and actor; audit failure rolls back the correction. Profile\nidentity, acquisition context/source, CRM status and downstream records stay intact.\n"
|
|
13621
13621
|
},
|
|
13622
13622
|
{
|
|
13623
13623
|
"path": "agents/referrals.md",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-sales",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.22",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Modular sales for the SMRT framework: agreement execution, CRM, referral intake, neutral commissions, and reusable Svelte surfaces",
|
|
6
6
|
"type": "module",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@happyvertical/signatures": "^0.106.0",
|
|
46
|
-
"@happyvertical/smrt-assets": "0.57.
|
|
47
|
-
"@happyvertical/smrt-core": "0.57.
|
|
48
|
-
"@happyvertical/smrt-tenancy": "0.57.
|
|
49
|
-
"@happyvertical/smrt-ui": "0.57.
|
|
46
|
+
"@happyvertical/smrt-assets": "0.57.22",
|
|
47
|
+
"@happyvertical/smrt-core": "0.57.22",
|
|
48
|
+
"@happyvertical/smrt-tenancy": "0.57.22",
|
|
49
|
+
"@happyvertical/smrt-ui": "0.57.22",
|
|
50
50
|
"@happyvertical/sql": "^0.106.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"svelte": "^5.57.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@happyvertical/smrt-vitest": "0.57.
|
|
56
|
+
"@happyvertical/smrt-vitest": "0.57.22",
|
|
57
57
|
"@sveltejs/package": "^2.5.8",
|
|
58
58
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
59
59
|
"@types/node": "24.13.6",
|