@happyvertical/smrt-expenses 0.60.13 → 0.60.15
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.md +15 -2
- package/README.md +8 -0
- package/agents/allocation-test-matrix.md +82 -0
- package/agents/reviewed-allocations.md +138 -0
- package/dist/allocation-internal.d.ts +6 -0
- package/dist/allocation-internal.d.ts.map +1 -0
- package/dist/chunks/{Expense-CimA4lxE.js → Expense-Deq19w2r.js} +28 -3
- package/dist/chunks/Expense-Deq19w2r.js.map +1 -0
- package/dist/chunks/{ExpenseReceiptCollection-CSBrNDzv.js → ExpenseReceiptCollection-D4Na93BF.js} +37 -3
- package/dist/chunks/ExpenseReceiptCollection-D4Na93BF.js.map +1 -0
- package/dist/chunks/{expense-actions-DiIhw0xO.js → expense-actions-DszuHacx.js} +2 -2
- package/dist/chunks/{expense-actions-DiIhw0xO.js.map → expense-actions-DszuHacx.js.map} +1 -1
- package/dist/collections/ExpenseCollection.d.ts +5 -5
- package/dist/collections/ExpenseCollection.d.ts.map +1 -1
- package/dist/expense-allocation.d.ts +133 -0
- package/dist/expense-allocation.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1001 -21
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +2359 -627
- package/dist/models/Expense.d.ts +2 -6
- package/dist/models/Expense.d.ts.map +1 -1
- package/dist/models/ExpenseAllocation.d.ts +117 -0
- package/dist/models/ExpenseAllocation.d.ts.map +1 -0
- package/dist/models/ExpenseReceipt.d.ts +7 -0
- package/dist/models/ExpenseReceipt.d.ts.map +1 -1
- package/dist/permissions.d.ts +5 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/recipes.d.ts +3 -0
- package/dist/recipes.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +746 -108
- package/dist/smrt-knowledge.okf.md +17 -3
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +9 -9
- package/dist/chunks/Expense-CimA4lxE.js.map +0 -1
- package/dist/chunks/ExpenseReceiptCollection-CSBrNDzv.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpenseCollection.d.ts","sourceRoot":"","sources":["../../src/collections/ExpenseCollection.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ExpenseCollection.d.ts","sourceRoot":"","sources":["../../src/collections/ExpenseCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EAEjC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EAErC,MAAM,0BAA0B,CAAC;AAWlC,OAAO,EAAU,cAAc,EAAQ,MAAM,0BAA0B,CAAC;AACxE,OAAO,KAAK,EACV,+BAA+B,EAC/B,gCAAgC,EAChC,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EACV,iCAAiC,EACjC,+BAA+B,EAC/B,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAEnB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EAEjC,KAAK,oBAAoB,EAC1B,MAAM,aAAa,CAAC;AAErB,gFAAgF;AAChF,MAAM,WAAW,sBAAsB;IACrC,iEAAiE;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;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G,aAAa,CACjB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,cAAc,CAAC;IAO1B;;;OAGG;IASG,YAAY,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC;IAOvE;;;OAGG;IASG,mBAAmB,CACvB,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,OAAO,CAAC;IAOnB;;;;;OAKG;IACG,aAAa,CACjB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,EAAE,CAAC;IAOrB;;;;;;;;;;;;;OAaG;IACG,gBAAgB,CACpB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,cAAc,CAAC;IA2B1B,0FAA0F;IACpF,gBAAgB,CACpB,KAAK,EAAE,4BAA4B,EACnC,SAAS,EAAE,0BAA0B,GACpC,OAAO,CAAC,uBAAuB,CAAC;IAInC,8FAA8F;IACxF,kBAAkB,CACtB,KAAK,EAAE,8BAA8B,EACrC,SAAS,EAAE,0BAA0B,GACpC,OAAO,CAAC,+BAA+B,CAAC;IAI3C;;;OAGG;IACG,oBAAoB,CACxB,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,sBAAsB,EAAE,CAAC;IA4CpC;;;;;;;;;;;;;;OAcG;IACG,kBAAkB,CACtB,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAO,GAChC,OAAO,CAAC,kBAAkB,CAAC;CAwE/B"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import './permissions.js';
|
|
2
|
+
import type { DatabaseInterface } from '@happyvertical/smrt-core/migrations';
|
|
3
|
+
import { type ExpenseActionPrincipal } from './actions/principal.js';
|
|
4
|
+
import type { Expense } from './models/Expense.js';
|
|
5
|
+
import { ExpenseAllocationBilling, ExpenseAllocationRevision } from './models/ExpenseAllocation.js';
|
|
6
|
+
import { type ExpensePayer } from './types.js';
|
|
7
|
+
/** Explicit full attribution; no remainder or customer price is inferred. */
|
|
8
|
+
export interface ExpenseAllocationTarget {
|
|
9
|
+
portionKey: string;
|
|
10
|
+
costObjectType: string;
|
|
11
|
+
costObjectId: string;
|
|
12
|
+
costCodeRef: string;
|
|
13
|
+
amountMinor: number;
|
|
14
|
+
}
|
|
15
|
+
/** Current host project authority, called for each old and proposed target. */
|
|
16
|
+
export interface ExpenseAllocationBillingAuthority extends ExpenseAllocationAuthority {
|
|
17
|
+
/** Required when reserving against a host draft before a commerce invoice exists. */
|
|
18
|
+
authorizeDraft?(principal: ExpenseActionPrincipal, target: Readonly<ExpenseAllocationTarget>, draft: {
|
|
19
|
+
type: string;
|
|
20
|
+
id: string;
|
|
21
|
+
}, executor: DatabaseInterface): Promise<void>;
|
|
22
|
+
/** Host must verify current invoice permissions and its project matches the portion target. */
|
|
23
|
+
authorizeInvoice(principal: ExpenseActionPrincipal, target: Readonly<ExpenseAllocationTarget>, invoiceId: string, executor: DatabaseInterface): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
/** Source privacy decision distinguishes complete allocation editing from bounded portion billing. */
|
|
26
|
+
export interface ExpenseAllocationAuthorizationContext {
|
|
27
|
+
action: 'reviewAllocation' | 'reserveAllocation' | 'bindAllocation' | 'releaseAllocation' | 'withdrawAllocation';
|
|
28
|
+
/** Present only for billing; contains the actor-authorized target's bounded facts, never source gross/receipts. */
|
|
29
|
+
portion?: Readonly<ExpenseAllocationTarget> & {
|
|
30
|
+
portionId: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface ExpenseAllocationAuthority {
|
|
34
|
+
/** Mandatory for withdrawal: current authority for the restored original unsplit destination, without a fabricated cost code. */
|
|
35
|
+
authorizeUnsplitTarget?(principal: ExpenseActionPrincipal, target: Readonly<{
|
|
36
|
+
sourceExpenseId: string;
|
|
37
|
+
costObjectType: string;
|
|
38
|
+
costObjectId: string;
|
|
39
|
+
}>, executor: DatabaseInterface): Promise<void>;
|
|
40
|
+
/** Required for full allocation review/history: enforce original-source privacy independently of target grants. */
|
|
41
|
+
authorizeSource(principal: ExpenseActionPrincipal, sourceExpenseId: string, executor: DatabaseInterface, context: ExpenseAllocationAuthorizationContext): Promise<void>;
|
|
42
|
+
authorizeTarget(principal: ExpenseActionPrincipal, target: Readonly<ExpenseAllocationTarget>, executor: DatabaseInterface): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
/** One review of a positive reviewed original. Revision is the loaded source updated_at. */
|
|
45
|
+
export interface ReviewExpenseAllocationInput {
|
|
46
|
+
sourceExpenseId: string;
|
|
47
|
+
expectedSourceRevision: Date | string;
|
|
48
|
+
requestId: string;
|
|
49
|
+
portions: readonly ExpenseAllocationTarget[];
|
|
50
|
+
reviewEvidence: string;
|
|
51
|
+
}
|
|
52
|
+
/** Detached projection safe to expose only after target authorization. No receipt URLs or other portions. */
|
|
53
|
+
export interface ExpenseAllocationIdentity extends ExpenseAllocationTarget {
|
|
54
|
+
portionId: string;
|
|
55
|
+
sourceExpenseId: string;
|
|
56
|
+
revisionId: string;
|
|
57
|
+
sourceFingerprint: string;
|
|
58
|
+
/** Frozen source calendar date; no sibling or private receipt data. */
|
|
59
|
+
incurredOn: string;
|
|
60
|
+
/** Bounded economic facts, without payer identity or original source money. */
|
|
61
|
+
paidBy: ExpensePayer;
|
|
62
|
+
reimbursable: boolean;
|
|
63
|
+
hasSupplierTax: boolean | null;
|
|
64
|
+
hasRefunds: boolean;
|
|
65
|
+
/** Exact only when known original basis equals gross and no refunds exist; never prorated tax. */
|
|
66
|
+
costBasisMinor: number | null;
|
|
67
|
+
currency: string;
|
|
68
|
+
active: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** Snapshot of a committed review; callers must authorize before exposing its complete target list. */
|
|
71
|
+
export interface ExpenseAllocationResult {
|
|
72
|
+
revision: ExpenseAllocationRevision;
|
|
73
|
+
portions: ExpenseAllocationIdentity[];
|
|
74
|
+
}
|
|
75
|
+
/** Atomically review a full allocation or supersede an unreserved revision. Identical retries reauthorize. */
|
|
76
|
+
export declare function reviewExpenseAllocation(db: DatabaseInterface, input: ReviewExpenseAllocationInput, authority: ExpenseAllocationAuthority): Promise<ExpenseAllocationResult>;
|
|
77
|
+
/** An explicit decision to restore the original attribution before correcting unbilled source facts. */
|
|
78
|
+
export interface WithdrawExpenseAllocationInput {
|
|
79
|
+
sourceExpenseId: string;
|
|
80
|
+
expectedActiveRevisionId: string;
|
|
81
|
+
expectedSourceRevision: Date | string;
|
|
82
|
+
requestId: string;
|
|
83
|
+
reviewEvidence: string;
|
|
84
|
+
}
|
|
85
|
+
/** Immutable historical result; callers reload the source for its current state/revision. */
|
|
86
|
+
export interface WithdrawExpenseAllocationResult {
|
|
87
|
+
revision: ExpenseAllocationRevision;
|
|
88
|
+
withdrawnRevisionId: string;
|
|
89
|
+
}
|
|
90
|
+
/** Withdraw only entirely unreserved attribution, preserving source review state and all historical evidence. */
|
|
91
|
+
export declare function withdrawExpenseAllocation(db: DatabaseInterface, input: WithdrawExpenseAllocationInput, authority: ExpenseAllocationAuthority): Promise<WithdrawExpenseAllocationResult>;
|
|
92
|
+
/** Resolve one canonical portion with current project authority, including historical billed revisions. */
|
|
93
|
+
export declare function resolveExpenseAllocationPortion(db: DatabaseInterface, portionId: string, authority: ExpenseAllocationAuthority): Promise<ExpenseAllocationIdentity>;
|
|
94
|
+
/** Internal monetary projection: source rows remain canonical for cash/tax/commitment. */
|
|
95
|
+
export declare function allocationTargetAmount(source: Expense, filter: Record<string, unknown>): Promise<number | null>;
|
|
96
|
+
/** Protected commerce source protocol. Unqualified/ordinary invoice sources retain their old behavior. */
|
|
97
|
+
export declare const EXPENSE_ALLOCATION_INVOICE_SOURCE = "billable:@happyvertical/smrt-expenses:ExpenseAllocationPortion";
|
|
98
|
+
/** Reserve against a host-owned draft first, or bind directly to a prepared commerce line. */
|
|
99
|
+
export interface ReserveExpenseAllocationInput {
|
|
100
|
+
portionId: string;
|
|
101
|
+
requestId: string;
|
|
102
|
+
draftType?: string;
|
|
103
|
+
draftId?: string;
|
|
104
|
+
invoiceId?: string;
|
|
105
|
+
invoiceLineId?: string;
|
|
106
|
+
}
|
|
107
|
+
/** Reserve full exact source capacity once, without implying customer price or creating another expense. */
|
|
108
|
+
export declare function reserveExpenseAllocationPortion(db: DatabaseInterface, input: ReserveExpenseAllocationInput, authority: ExpenseAllocationBillingAuthority): Promise<ExpenseAllocationBilling>;
|
|
109
|
+
/** Transition the existing host draft claim to exactly one commerce line, without reserving twice. */
|
|
110
|
+
export declare function bindExpenseAllocationPortion(db: DatabaseInterface, reservationId: string, input: {
|
|
111
|
+
invoiceId: string;
|
|
112
|
+
invoiceLineId: string;
|
|
113
|
+
requestId: string;
|
|
114
|
+
}, authority: ExpenseAllocationBillingAuthority): Promise<ExpenseAllocationBilling>;
|
|
115
|
+
/** Release an unissued draft claim and its commerce pointer atomically; issued reservations remain consumed. */
|
|
116
|
+
export declare function releaseExpenseAllocationPortion(db: DatabaseInterface, reservationId: string, requestId: string, authority: ExpenseAllocationBillingAuthority): Promise<ExpenseAllocationBilling>;
|
|
117
|
+
/** Bounded target-owned availability; historical/issued claims never become available implicitly. */
|
|
118
|
+
export interface ExpenseAllocationPortionPosition {
|
|
119
|
+
identity: ExpenseAllocationIdentity;
|
|
120
|
+
available: boolean;
|
|
121
|
+
reservation: {
|
|
122
|
+
reservationId: string;
|
|
123
|
+
draftType: string;
|
|
124
|
+
draftId: string;
|
|
125
|
+
invoiceId: string | null;
|
|
126
|
+
invoiceLineId: string | null;
|
|
127
|
+
invoiceStatus: string | null;
|
|
128
|
+
issued: boolean;
|
|
129
|
+
} | null;
|
|
130
|
+
}
|
|
131
|
+
/** Read one portion's current claim without disclosing original receipts, source gross or sibling projects. */
|
|
132
|
+
export declare function getExpenseAllocationPortionPosition(db: DatabaseInterface, portionId: string, authority: ExpenseAllocationAuthority): Promise<ExpenseAllocationPortionPosition>;
|
|
133
|
+
//# sourceMappingURL=expense-allocation.d.ts.map
|
|
@@ -0,0 +1 @@
|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ChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,MAAM,EAAE,OAAO,CAAC;KACjB,GAAG,IAAI,CAAC;CACV;AACD,+GAA+G;AAC/G,wBAAsB,mCAAmC,CACvD,EAAE,EAAE,iBAAiB,EACrB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,0BAA0B,GACpC,OAAO,CAAC,gCAAgC,CAAC,CA8C3C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,8 +43,11 @@ export type { AttachExpenseReceiptActionInput, MarkExpenseReimbursedActionInput,
|
|
|
43
43
|
export { ExpenseActionError, type ExpenseActionPrincipal, } from './actions/principal.js';
|
|
44
44
|
export { ExpenseCollection, type ReviewedExpenseTaxFact, type ReviewedExpenseTaxFactsOptions, } from './collections/ExpenseCollection.js';
|
|
45
45
|
export { ExpenseReceiptCollection } from './collections/ExpenseReceiptCollection.js';
|
|
46
|
+
export { bindExpenseAllocationPortion, EXPENSE_ALLOCATION_INVOICE_SOURCE, type ExpenseAllocationAuthority, type ExpenseAllocationAuthorizationContext, type ExpenseAllocationBillingAuthority, type ExpenseAllocationIdentity, type ExpenseAllocationPortionPosition, type ExpenseAllocationResult, type ExpenseAllocationTarget, getExpenseAllocationPortionPosition, type ReserveExpenseAllocationInput, type ReviewExpenseAllocationInput, releaseExpenseAllocationPortion, reserveExpenseAllocationPortion, resolveExpenseAllocationPortion, reviewExpenseAllocation, type WithdrawExpenseAllocationInput, type WithdrawExpenseAllocationResult, withdrawExpenseAllocation, } from './expense-allocation.js';
|
|
46
47
|
export { Expense } from './models/Expense.js';
|
|
48
|
+
export { ExpenseAllocationBilling, ExpenseAllocationPortion, ExpenseAllocationRevision, } from './models/ExpenseAllocation.js';
|
|
47
49
|
export { ExpenseReceipt } from './models/ExpenseReceipt.js';
|
|
50
|
+
export { EXPENSE_ALLOCATION_PERMISSION_DEFINITIONS } from './permissions.js';
|
|
48
51
|
export { ExpensesRecipe } from './recipes.js';
|
|
49
52
|
export type { CompleteSupplierPayableBasisInput, RecordSupplierPayableEventInput, RecordSupplierPayableInput, SupplierPayableEvent, SupplierPayableEventInput, SupplierPayablePosition, SupplierPayableReview, SupplierPayableSource, SupplierPayableState, } from './supplier-payable.js';
|
|
50
53
|
export { type AttachReceiptInput, type CommitmentPosition, type CurrencyTotal, type CurrencyTotals, DuplicateReceiptError, type DuplicateReceiptGroup, EXPENSE_PAYERS, EXPENSE_REVIEW_STATUSES, type ExpenseCostBasis, ExpenseError, type ExpenseErrorCode, type ExpenseFinancialBreakdown, type ExpenseOptions, type ExpensePayer, type ExpenseReceiptOptions, type ExpenseRefundPosition, type ExpenseRefundRecipient, type ExpenseReimbursementPosition, type ExpenseReviewStatus, type ExpenseTaxComponent, type ExpenseTotalsOptions, type FindDuplicateReceiptsOptions, type MarkDuplicateExpenseInput, type MarkReimbursedInput, type RejectExpenseInput, type ReopenExpenseInput, type ReviewExpenseInput, SUGGESTED_EXPENSE_CATEGORIES, } from './types.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAKH,OAAO,wBAAwB,CAAC;AAEhC,YAAY,EACV,+BAA+B,EAC/B,gCAAgC,EAChC,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,kBAAkB,EAClB,KAAK,sBAAsB,GAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK,8BAA8B,GACpC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,OAAO,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