@happyvertical/smrt-commerce 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 +10 -0
- package/agents/invoice-source-binding.md +29 -0
- package/dist/chunks/{ContractLineItemCollection-CwGdWgQE.js → ContractLineItemCollection-72DuK6tr.js} +4 -4
- package/dist/chunks/{ContractLineItemCollection-CwGdWgQE.js.map → ContractLineItemCollection-72DuK6tr.js.map} +1 -1
- package/dist/chunks/{DocumentTaxCollection-BfuNqFNm.js → DocumentTaxCollection-DNo_fziv.js} +165 -49
- package/dist/chunks/DocumentTaxCollection-DNo_fziv.js.map +1 -0
- package/dist/chunks/{InvoiceCollection-Cxz6Z1uv.js → InvoiceCollection-oUdTA1s-.js} +9 -9
- package/dist/chunks/{InvoiceCollection-Cxz6Z1uv.js.map → InvoiceCollection-oUdTA1s-.js.map} +1 -1
- package/dist/chunks/{TaxCodeCollection-CKGI5AzL.js → TaxCodeCollection-CrCPUyaW.js} +2 -2
- package/dist/chunks/{TaxCodeCollection-CKGI5AzL.js.map → TaxCodeCollection-CrCPUyaW.js.map} +1 -1
- package/dist/chunks/{TaxComponentCollection-r9ipXMGD.js → TaxComponentCollection-BGXwXDtt.js} +3 -3
- package/dist/chunks/{TaxComponentCollection-r9ipXMGD.js.map → TaxComponentCollection-BGXwXDtt.js.map} +1 -1
- package/dist/chunks/{allocation-integrity-Qge856lI.js → allocation-integrity-CgJqS_6u.js} +6 -6
- package/dist/chunks/{allocation-integrity-Qge856lI.js.map → allocation-integrity-CgJqS_6u.js.map} +1 -1
- package/dist/chunks/{contract-money-ByflBBOV.js → contract-money-B05oKoxQ.js} +6 -6
- package/dist/chunks/{contract-money-ByflBBOV.js.map → contract-money-B05oKoxQ.js.map} +1 -1
- package/dist/chunks/{invoice-posting-DeixlpG-.js → invoice-posting-ECbJBE0g.js} +3 -3
- package/dist/chunks/{invoice-posting-DeixlpG-.js.map → invoice-posting-ECbJBE0g.js.map} +1 -1
- package/dist/chunks/{retention-accounting-DT3N01yc.js → retention-accounting-Dpzjo1Ia.js} +8 -8
- package/dist/chunks/{retention-accounting-DT3N01yc.js.map → retention-accounting-Dpzjo1Ia.js.map} +1 -1
- package/dist/chunks/{tenant-money-barrier-BtMoMg85.js → tenant-money-barrier-M-2l6pxS.js} +3 -3
- package/dist/chunks/{tenant-money-barrier-BtMoMg85.js.map → tenant-money-barrier-M-2l6pxS.js.map} +1 -1
- package/dist/chunks/types-Bbm0Xflc.js.map +1 -1
- package/dist/document-money.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/dist/invoice-source-binding.d.ts +32 -0
- package/dist/invoice-source-binding.d.ts.map +1 -0
- package/dist/invoices.js +1 -1
- package/dist/manifest.json +27 -5
- package/dist/models/InvoiceLineItem.d.ts +2 -0
- package/dist/models/InvoiceLineItem.d.ts.map +1 -1
- package/dist/recipes.d.ts +3 -0
- package/dist/recipes.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +22 -6
- package/dist/smrt-knowledge.okf.md +15 -11
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +13 -13
- package/dist/chunks/DocumentTaxCollection-BfuNqFNm.js.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { DatabaseInterface } from '@happyvertical/smrt-core/migrations';
|
|
2
|
+
import type { Invoice } from './models/Invoice.js';
|
|
3
|
+
import type { InvoiceLineItem } from './models/InvoiceLineItem.js';
|
|
4
|
+
/** A trusted package registers one protected source namespace and verifies its own authoritative reservation. */
|
|
5
|
+
export type InvoiceSourceBindingHandler = (input: {
|
|
6
|
+
executor: DatabaseInterface;
|
|
7
|
+
invoice: Invoice;
|
|
8
|
+
line: InvoiceLineItem;
|
|
9
|
+
reservationId: string;
|
|
10
|
+
phase: 'bind' | 'release' | 'validate';
|
|
11
|
+
}) => Promise<void>;
|
|
12
|
+
/** Register from trusted package code at import time, never from request data. Protected names are qualified. */
|
|
13
|
+
export declare function registerInvoiceSourceBinding(sourceType: string, handler: InvoiceSourceBindingHandler): void;
|
|
14
|
+
/** Enforce old and proposed identity; clearing the namespace never clears a persisted binding. */
|
|
15
|
+
export declare function assertInvoiceLineSource(executor: DatabaseInterface, invoice: Invoice, line: InvoiceLineItem, persisted: InvoiceLineItem | null, issuing?: boolean): Promise<void>;
|
|
16
|
+
/** Guard physical line or cascading invoice deletion independently of caller-mutated fields. */
|
|
17
|
+
export declare function assertInvoiceSourceDelete(lines: readonly InvoiceLineItem[]): void;
|
|
18
|
+
/** Attach an already-authorized owning-package reservation. It must identify exactly this tenant/invoice/line. */
|
|
19
|
+
export declare function bindInvoiceLineSource(input: {
|
|
20
|
+
db: DatabaseInterface;
|
|
21
|
+
tenantId: string;
|
|
22
|
+
lineId: string;
|
|
23
|
+
reservationId: string;
|
|
24
|
+
}): Promise<void>;
|
|
25
|
+
/** Withdraw only after the owning package released its draft claim, in the same caller transaction. */
|
|
26
|
+
export declare function unbindInvoiceLineSource(input: {
|
|
27
|
+
db: DatabaseInterface;
|
|
28
|
+
tenantId: string;
|
|
29
|
+
lineId: string;
|
|
30
|
+
reservationId: string;
|
|
31
|
+
}): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=invoice-source-binding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoice-source-binding.d.ts","sourceRoot":"","sources":["../src/invoice-source-binding.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAI7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGnE,iHAAiH;AACjH,MAAM,MAAM,2BAA2B,GAAG,CAAC,KAAK,EAAE;IAChD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;CACxC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAMpB,iHAAiH;AACjH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,2BAA2B,GACnC,IAAI,CAQN;AAQD,kGAAkG;AAClG,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,eAAe,EACrB,SAAS,EAAE,eAAe,GAAG,IAAI,EACjC,OAAO,UAAQ,GACd,OAAO,CAAC,IAAI,CAAC,CA2Bf;AACD,gGAAgG;AAChG,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,eAAe,EAAE,GAChC,IAAI,CAGN;AACD,kHAAkH;AAClH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE;IACjD,EAAE,EAAE,iBAAiB,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsChB;AACD,uGAAuG;AACvG,wBAAsB,uBAAuB,CAAC,KAAK,EAAE;IACnD,EAAE,EAAE,iBAAiB,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6BhB"}
|
package/dist/invoices.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { S as calculateInvoiceMinorLine, _ as reconcileOrdinaryCreditAccounting, a as reconcileRetainedBaseInvoice, b as syncOrdinaryRefundToAccounting, c as syncRetainedCreditToAccounting, d as toRetainedCreditAccountingInput, f as toRetainedInvoiceAccountingInput, g as reconcileOrdinaryBaseInvoice, h as reconcileOrdinaryAccountingStep, i as reconcileRetainedAccountingStep, l as syncRetainedInvoiceToAccounting, m as readOrdinaryInvoiceAccountingState, n as loadRetainedInvoiceAccountingSnapshot, o as reconcileRetainedCreditAccounting, p as loadOrdinaryCreditAccountingSnapshot, r as readRetainedInvoiceAccountingState, s as releaseRetainedInvoiceToAccounting, t as loadRetainedCreditAccountingSnapshot, u as syncRetainedRefundToAccounting, v as syncOrdinaryCreditToAccounting, x as toOrdinaryCreditAccountingInput, y as syncOrdinaryInvoiceToAccounting } from "./chunks/retention-accounting-
|
|
1
|
+
import { S as calculateInvoiceMinorLine, _ as reconcileOrdinaryCreditAccounting, a as reconcileRetainedBaseInvoice, b as syncOrdinaryRefundToAccounting, c as syncRetainedCreditToAccounting, d as toRetainedCreditAccountingInput, f as toRetainedInvoiceAccountingInput, g as reconcileOrdinaryBaseInvoice, h as reconcileOrdinaryAccountingStep, i as reconcileRetainedAccountingStep, l as syncRetainedInvoiceToAccounting, m as readOrdinaryInvoiceAccountingState, n as loadRetainedInvoiceAccountingSnapshot, o as reconcileRetainedCreditAccounting, p as loadOrdinaryCreditAccountingSnapshot, r as readRetainedInvoiceAccountingState, s as releaseRetainedInvoiceToAccounting, t as loadRetainedCreditAccountingSnapshot, u as syncRetainedRefundToAccounting, v as syncOrdinaryCreditToAccounting, x as toOrdinaryCreditAccountingInput, y as syncOrdinaryInvoiceToAccounting } from "./chunks/retention-accounting-Dpzjo1Ia.js";
|
|
2
2
|
import { MoneyValidationError } from "./money.js";
|
|
3
3
|
export { MoneyValidationError, calculateInvoiceMinorLine, loadOrdinaryCreditAccountingSnapshot, loadRetainedCreditAccountingSnapshot, loadRetainedInvoiceAccountingSnapshot, readOrdinaryInvoiceAccountingState, readRetainedInvoiceAccountingState, reconcileOrdinaryAccountingStep, reconcileOrdinaryBaseInvoice, reconcileOrdinaryCreditAccounting, reconcileRetainedAccountingStep, reconcileRetainedBaseInvoice, reconcileRetainedCreditAccounting, releaseRetainedInvoiceToAccounting, syncOrdinaryCreditToAccounting, syncOrdinaryInvoiceToAccounting, syncOrdinaryRefundToAccounting, syncRetainedCreditToAccounting, syncRetainedInvoiceToAccounting, syncRetainedRefundToAccounting, toOrdinaryCreditAccountingInput, toRetainedCreditAccountingInput, toRetainedInvoiceAccountingInput };
|
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-commerce",
|
|
5
|
-
"packageVersion": "0.60.
|
|
5
|
+
"packageVersion": "0.60.15",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-commerce:ContractCollection": {
|
|
8
8
|
"name": "contractcollection",
|
|
@@ -3361,7 +3361,7 @@
|
|
|
3361
3361
|
],
|
|
3362
3362
|
"schema": {
|
|
3363
3363
|
"tableName": "invoice_line_items",
|
|
3364
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER NOT NULL DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"revenue_account_id\" UUID,\n \"sort_order\" INTEGER DEFAULT 0\n);",
|
|
3364
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER NOT NULL DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"source_reservation_id\" TEXT,\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"revenue_account_id\" UUID,\n \"sort_order\" INTEGER DEFAULT 0\n);",
|
|
3365
3365
|
"columns": {
|
|
3366
3366
|
"_sync_origin_device_id": {
|
|
3367
3367
|
"type": "TEXT"
|
|
@@ -3544,6 +3544,11 @@
|
|
|
3544
3544
|
"unique": false,
|
|
3545
3545
|
"default": ""
|
|
3546
3546
|
},
|
|
3547
|
+
"source_reservation_id": {
|
|
3548
|
+
"type": "TEXT",
|
|
3549
|
+
"notNull": false,
|
|
3550
|
+
"unique": false
|
|
3551
|
+
},
|
|
3547
3552
|
"period_start": {
|
|
3548
3553
|
"type": "TIMESTAMP",
|
|
3549
3554
|
"notNull": false,
|
|
@@ -3616,7 +3621,7 @@
|
|
|
3616
3621
|
]
|
|
3617
3622
|
}
|
|
3618
3623
|
],
|
|
3619
|
-
"version": "
|
|
3624
|
+
"version": "78dcf926"
|
|
3620
3625
|
},
|
|
3621
3626
|
"importPath": "@happyvertical/smrt-commerce"
|
|
3622
3627
|
},
|
|
@@ -20652,6 +20657,15 @@
|
|
|
20652
20657
|
"required": false,
|
|
20653
20658
|
"default": ""
|
|
20654
20659
|
},
|
|
20660
|
+
"sourceReservationId": {
|
|
20661
|
+
"type": "text",
|
|
20662
|
+
"required": false,
|
|
20663
|
+
"_meta": {
|
|
20664
|
+
"nullable": true,
|
|
20665
|
+
"readonly": true
|
|
20666
|
+
},
|
|
20667
|
+
"readonly": true
|
|
20668
|
+
},
|
|
20655
20669
|
"periodStart": {
|
|
20656
20670
|
"type": "datetime",
|
|
20657
20671
|
"required": false
|
|
@@ -20851,7 +20865,7 @@
|
|
|
20851
20865
|
],
|
|
20852
20866
|
"schema": {
|
|
20853
20867
|
"tableName": "invoice_line_items",
|
|
20854
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER NOT NULL DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"revenue_account_id\" UUID,\n \"sort_order\" INTEGER DEFAULT 0\n);",
|
|
20868
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER NOT NULL DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"source_reservation_id\" TEXT,\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"revenue_account_id\" UUID,\n \"sort_order\" INTEGER DEFAULT 0\n);",
|
|
20855
20869
|
"columns": {
|
|
20856
20870
|
"_sync_origin_device_id": {
|
|
20857
20871
|
"type": "TEXT"
|
|
@@ -21034,6 +21048,11 @@
|
|
|
21034
21048
|
"unique": false,
|
|
21035
21049
|
"default": ""
|
|
21036
21050
|
},
|
|
21051
|
+
"source_reservation_id": {
|
|
21052
|
+
"type": "TEXT",
|
|
21053
|
+
"notNull": false,
|
|
21054
|
+
"unique": false
|
|
21055
|
+
},
|
|
21037
21056
|
"period_start": {
|
|
21038
21057
|
"type": "TIMESTAMP",
|
|
21039
21058
|
"notNull": false,
|
|
@@ -21106,7 +21125,7 @@
|
|
|
21106
21125
|
]
|
|
21107
21126
|
}
|
|
21108
21127
|
],
|
|
21109
|
-
"version": "
|
|
21128
|
+
"version": "78dcf926"
|
|
21110
21129
|
},
|
|
21111
21130
|
"importPath": "@happyvertical/smrt-commerce"
|
|
21112
21131
|
},
|
|
@@ -29429,6 +29448,9 @@
|
|
|
29429
29448
|
"sourceId": {
|
|
29430
29449
|
"visibility": "hidden"
|
|
29431
29450
|
},
|
|
29451
|
+
"sourceReservationId": {
|
|
29452
|
+
"visibility": "hidden"
|
|
29453
|
+
},
|
|
29432
29454
|
"periodStart": {
|
|
29433
29455
|
"visibility": "hidden"
|
|
29434
29456
|
},
|
|
@@ -103,6 +103,8 @@ export declare class InvoiceLineItem extends SmrtObject {
|
|
|
103
103
|
* ID of the source (e.g., campaign ID, contract ID)
|
|
104
104
|
*/
|
|
105
105
|
sourceId: string;
|
|
106
|
+
/** Command-owned pointer to the source package's existing reservation. */
|
|
107
|
+
sourceReservationId: string | null;
|
|
106
108
|
/**
|
|
107
109
|
* Service period start (for time-based billing)
|
|
108
110
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvoiceLineItem.d.ts","sourceRoot":"","sources":["../../src/models/InvoiceLineItem.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAIL,UAAU,EACV,KAAK,eAAe,EAErB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAGL,KAAK,iCAAiC,EACtC,KAAK,4BAA4B,EAClC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBA4Ba,eAAgB,SAAQ,UAAU;IAC7C,4EAA4E;IAC5E,eAAe,CACb,UAAU,EAAE,iCAAiC,EAC7C,EAAE,EAAE,iBAAiB,GACpB,IAAI;IAWP;;;OAGG;IAEH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B;;OAEG;IAGH,SAAS,EAAE,MAAM,CAAM;IAGvB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAQ;IAMrC,0BAA0B,SAAM;IAEhC,IAAI,sBAAsB,IAAI,6BAA6B,GAAG,IAAI,CAuBjE;IAED,IAAI,sBAAsB,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI,EAErE;IAED;;OAEG;IAEH,WAAW,EAAE,MAAM,CAAM;IAEzB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAM;IAGjB,S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IAMhB;;OAEG;IACH,SAAS,IAAI,OAAO;IAIpB;;OAEG;IACH,SAAS,IAAI,OAAO;CAGrB;AAED,eAAe,eAAe,CAAC"}
|
package/dist/recipes.d.ts
CHANGED
|
@@ -437,6 +437,9 @@ export declare class InvoicingRecipe extends SmrtRecipe {
|
|
|
437
437
|
readonly sourceId: {
|
|
438
438
|
readonly visibility: "hidden";
|
|
439
439
|
};
|
|
440
|
+
readonly sourceReservationId: {
|
|
441
|
+
readonly visibility: "hidden";
|
|
442
|
+
};
|
|
440
443
|
readonly periodStart: {
|
|
441
444
|
readonly visibility: "hidden";
|
|
442
445
|
};
|
package/dist/recipes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../src/recipes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAEL,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,EACX,KAAK,EACL,aAAa,EACb,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,sEAAsE;AACtE,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,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;;;;;;;;;;;;;MA0BH;CACZ;AAED,uEAAuE;AACvE,qBAAa,YAAa,SAAQ,UAAU;IAC1C,MAAM,CAAC,EAAE,SAAqB;IAC9B,MAAM,CAAC,IAAI,SAAwB;IACnC,MAAM,CAAC,KAAK,SAAY;IACxB,MAAM,CAAC,OAAO,SAA8D;IAC5E,MAAM,CAAC,QAAQ,WAAkC;IACjD,MAAM,CAAC,KAAK;;;;MAKV;IACF,MAAM,CAAC,OAAO;;;;;MAKZ;IACF,MAAM,CAAC,MAAM,6CAA6B;IAC1C,MAAM,CAAC,GAAG;;;;;QAOR;IACF,MAAM,CAAC,QAAQ,WAA0B;IACzC,MAAM,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqBH;CACZ;AAED,yEAAyE;AACzE,qBAAa,cAAe,SAAQ,UAAU;IAC5C,MAAM,CAAC,EAAE,SAAuB;IAChC,MAAM,CAAC,IAAI,SAA0B;IACrC,MAAM,CAAC,KAAK,SAAmB;IAC/B,MAAM,CAAC,OAAO,SAAyD;IACvE,MAAM,CAAC,QAAQ,WAA8C;IAC7D,MAAM,CAAC,KAAK;;;;MAKV;IACF,MAAM,CAAC,OAAO;;;;;MAKZ;IACF,MAAM,CAAC,MAAM,mDAAmC;IAChD,MAAM,CAAC,GAAG;;;;;QAOR;IACF,MAAM,CAAC,QAAQ,WAA0B;IACzC,MAAM,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBH;CACZ"}
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-commerce",
|
|
6
|
-
"packageVersion": "0.60.
|
|
6
|
+
"packageVersion": "0.60.15",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
12
|
-
"agents": "
|
|
10
|
+
"manifest": "62f394f00500b3b480e33d144c337bc240ab5f480d6359ea74fbe5bad149b216",
|
|
11
|
+
"packageJson": "997ac73399a717856d2ad20d57d9c34c943720c44894042324210de854676b62",
|
|
12
|
+
"agents": "ce13a8c83d4f0c81b3de99c0c7ed4fcbab9178dd267ca3f76b992cb0a1309ce4",
|
|
13
13
|
"moduleDoc:agents/customer-vendor-ui.md": "2b22e519411a16d8c493496fc168da77b9acd25f6077ea8fbac00cfee3a3501c",
|
|
14
14
|
"moduleDoc:README.md": "beb2fada61d0babc7aa0528b883a9d47d6c827d876ace1cce04a908338fa01f8",
|
|
15
15
|
"moduleDoc:agents/invoice-quantity.md": "3a5fbb464c8fe63acc021b2259ba36f052bb22c49b29e503639c5316814e2028",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"moduleDoc:agents/customer-funds.md": "417af24b9de9c41c89917e3c6e50e324a1baa70de9e45a61772b3d84c8bfeda0",
|
|
32
32
|
"moduleDoc:agents/observed-purchase-prices.md": "e8e68d733b7b9453b4dbd54e1dcf11e1486b70ee855ac629bb4e6888eb90ca9c",
|
|
33
33
|
"moduleDoc:agents/received-sales-contract-money.md": "675d728c565346e5d808e8299a55f2543a423853be0ce9abc99dc7041af79570",
|
|
34
|
-
"moduleDoc:agents/ordinary-accounting.md": "e013142ab2dffc04402da38a9b12dba1622630d0767a5766f32962a8a5e298e9"
|
|
34
|
+
"moduleDoc:agents/ordinary-accounting.md": "e013142ab2dffc04402da38a9b12dba1622630d0767a5766f32962a8a5e298e9",
|
|
35
|
+
"moduleDoc:agents/invoice-source-binding.md": "4e0546591e5ab63075164c7dfb1b4aae4fcbfe4bd2c73fa7141b8290e2752985"
|
|
35
36
|
},
|
|
36
37
|
"exports": [
|
|
37
38
|
".",
|
|
@@ -13471,6 +13472,13 @@
|
|
|
13471
13472
|
"columnType": "TEXT",
|
|
13472
13473
|
"default": ""
|
|
13473
13474
|
},
|
|
13475
|
+
{
|
|
13476
|
+
"name": "sourceReservationId",
|
|
13477
|
+
"type": "text",
|
|
13478
|
+
"required": false,
|
|
13479
|
+
"columnType": "TEXT",
|
|
13480
|
+
"readonly": true
|
|
13481
|
+
},
|
|
13474
13482
|
{
|
|
13475
13483
|
"name": "periodStart",
|
|
13476
13484
|
"type": "datetime",
|
|
@@ -22323,7 +22331,7 @@
|
|
|
22323
22331
|
"polymorphicAssociations": 0,
|
|
22324
22332
|
"uuidColumns": 276
|
|
22325
22333
|
},
|
|
22326
|
-
"agentDoc": "# @happyvertical/smrt-commerce\n\nE-commerce with Contract STI hierarchy, invoice lifecycle, payment tracking, payout remittance, and optional ledger integration.\n\n## Models\n\n- **Customer** / **Vendor**: linked to Profile via string ID (not FK). `contacts` (JSON) is written via [`savePartyContacts()`](agents/customer-vendor-ui.md#contact-rows-3501). Customer has creditLimit, paymentTerms, customerType (DTC / WHOLESALE / RETAIL). Vendor has leadTimeDays, minimumOrder, and `payoutAddresses: Record<string, string>` — a flat map from payout-rail-qualified currency code (`USDC-base`, `BTC`, `USD-stripe`, ...) to destination string (EVM address, BTC address, Stripe Connect account id, IBAN). Use `getPayoutAddress(currency)` for a `Map.get`-style lookup; missing entries return `undefined` (caller decides skip-vs-error).\n- **Contract**: concrete STI base. Abstract **SalesContract** owns `customerId`; **PurchaseContract** owns `vendorId`. `channelId` is open-ended. Before upgrade, run `preflightCommercePartyLinks(db)` and repair linked base rows, stray parties, and wrong-branch links. See [README](README.md).\n- **WholesaleOrder**: B2B order. Conventional pairing — customer has `customerType: 'wholesale'`, NET-30/60 terms, delivered via wholesale-portal channel.\n- **ProductionOrder**: manufacturing equivalent of a PurchaseOrder — commission your factory to make finished goods. Consumes raw materials per BOM (`@happyvertical/smrt-manufacturing`) and produces SKU stock (`@happyvertical/smrt-inventory`).\n- **Cart**: transient order-in-progress. Same shape as Order; the application promotes the row from `_meta_type: Cart` to `_meta_type: Order` at checkout instead of copying data between tables.\n- **LicenseSale**: industry-neutral licensing primitive. Carries an *immutable* rights snapshot (`rightsMedium`, `rightsDistributionScope`, `rightsExclusivity`, `rightsDuration`, `rightsTerritory`, `rightsSublicensing`, `rightsDerivatives` — typed `Meta<T>` fields), licensee identity (`licenseeEmail`, optional `licenseeLegalEntity` / `licenseeJurisdiction`), and a signed-PDF reference (`pdfUrl`, `pdfHash`, optional `onChainHashRegistryRef`). Once saved at `ContractStatus.ACCEPTED`, the rights snapshot is frozen — mutating any of the seven rights fields and re-saving throws. The only legal transition out of ACCEPTED is `revoke()` (moves to CANCELLED without touching rights). Useful for stock media, music licensing, code-asset marketplaces, license keys, anywhere rights are sold for a fee.\n- **ContractLineItem**: items on contracts.\n- **Invoice**: status machine `DRAFT → SENT → VIEWED → PARTIAL → PAID` (also OVERDUE, CANCELLED, WRITTEN_OFF). `recognizeRevenue()` creates balanced AR journal entry (DR: Accounts Receivable, CR: Revenue, CR: Tax Payable).\n- **InvoiceLineItem**: fractional-quantity line items with safe minor-unit validation/recalculation on save; the existing-column migration is documented in [invoice quantity persistence](agents/invoice-quantity.md).\n- **Payment** / **PaymentAllocation**: tracks payments against invoices (status: see Gotchas). Carries optional backend-adapter fields for PaymentBackend-routed flows: `backendId` (rail adapter id — `base-usdc`, `btc`, `stripe`, distinct from `externalProvider` which names an accounting sync destination), `backendTxRef` (chain tx hash or gateway settlement id), `nativeAmount` / `nativeCurrency` (what actually arrived), `usdAtQuote` / `usdAtConfirmation` (drift accounting for volatile-currency rails). `Payment.usdDrift()` returns the confirmation - quote delta, or `0` when either side is unset.\n- **PaymentInstrument**: reusable saved payment method (\"card on file\"). Stores only provider references and non-sensitive display metadata (`providerCustomerId`, `providerPaymentMethodId`, brand / last4 / expiry), never raw card data. `isDefault` is domain-managed, not API-writable: `PaymentInstrumentCollection.setDefaultForCustomer(customerId, instrumentId)` validates the target and clears the customer's other defaults (one per customer).\n- **PaymentIntent**: short-lived pre-payment commitment with multi-option semantics. Locks a USD price for a fixed window (default 15 minutes) and lists one or more `PaymentOption`s describing different rails (`backendId`, `currency`, `payTo`, `nativeAmount`, optional `chain` / `memo` / `x402Capable` / `expiresAt`). First option to receive payment wins; the others are implicitly retired. State machine `awaiting_payment → paid → (issued | retired)` plus `expired` and `cancelled`. Mutate via dedicated `markPaid` / `markIssued` / `expire` / `cancel` / `retire` helpers — direct status assignment bypasses the invariant checks. Idempotency: see the natural-key Gotcha.\n- **TenantPaymentAccount**: tenant-owned Stripe Connect account; direct charges with an application fee, account→tenant webhook routing, refunds, no platform fallback. Write only through `connected-payments.ts`; see [connected payments](agents/connected-payments.md).\n- **Payout**: operator-to-supplier remittance. Distinct from Payment because direction, status machine, and chain semantics differ. Status machine `pending → sent → confirmed → failed` (failed is terminal but resettable via `resetFromFailed()` after fixing the underlying problem). References source `paymentId` (plain string) and destination `vendorId` (foreign key). Amount invariant `supplierNet === grossAmount - operatorFee` enforced exactly on save (integer minor units, no tolerance — #2401). `PayoutCollection.createFromPayment()` is the typical entry point; it pulls native amount / currency from the source Payment.\n- **Fulfillment** / **FulfillmentLineItem**: shipment/delivery tracking.\n\n## Recipes (#3590)\n\n`src/recipes.ts` declares four minimal `SmrtRecipe`s, emitted into the built\n`manifest.json` and `smrt-knowledge.json` `recipes`: `commerce.customers`\n(Customer), `commerce.vendors` (Vendor), `commerce.sales` (Order, requires\ncustomers), `commerce.purchases` (PurchaseOrder, requires vendors). Headers\nonly; line items, fulfilment, invoices, and payments are later recipes. Each\nhas user-facing help in `src/<name>.recipe.md` (#3591), and the fields those\nrecipes show carry `@field({ description })` text; keep both in plain\nlanguage for end users and update them when a recipe's fields change. See\n[core recipes](../core/agents/recipes.md).\n\nSee [historical issued sales](agents/historical-sales.md) for exact original source\nmoney, immutable source children and combined historical/live customer funds.\nSee [payment allocation integrity](agents/payment-allocations.md) for atomic splits,\nretry identity, parent corrections and supported dialects.\nSee [tax codes](agents/tax-codes.md) for tenant-owned rate components, default codes,\nand the standard codes every tenant gets.\nSee [document money persistence](agents/document-money.md) for the one money\nmodel: tax-code resolution, atomic aggregate writes, issued snapshots, and\nfrozen fields. Every Invoice and Contract money write needs a tenant. Host\nbootstrap is `ensureCommerceTenant(db, tenantId, { cookbook })`, which returns\n`{ tenantId }`. Money data written by an earlier version is refused with\n`COMMERCE_DATA_NEEDS_UPGRADE` until `smrt db:upgrade-commerce-money` converts\nit; see [money data upgrade](agents/money-upgrade.md).\nSee [Contract money persistence](agents/contract-money.md) for the Contract\naggregate and purchase recoverability.\n\n## Ledger Integration\n\n`@happyvertical/smrt-ledgers` is a regular dependency, loaded lazily via dynamic `import()` (never a static import) so the package graph stays a DAG (#1582). Invoice stores `arJournalId` and `revenueJournalId` as string references. `recognizeRevenue()` creates a balanced AR journal entry; `getArJournal()` returns null when no journal has been recognized yet.\n\n## Billing-period close (#3060)\n\n`src/billing/` closes periods from smrt-subscriptions charges; see the README\nfor usage.\n\n- **Port, not provider.** Period close, events, and credit checkout call only\n the `BillingProvider` port (integer minor units). `stripe.ts` adapts\n `@happyvertical/accounting`, which takes currency *major* units; convert with\n `units.ts` and never hand-roll a Stripe call here. `units.ts` exponents are\n an explicit ISO 4217 table matching the SDK's, never `Intl` display digits\n (CLDR differs for IQD, MGA, … and drifts by ICU release). The SDK's\n `*Minor` fields are already ISO minor units. Capabilities a rail may lack\n (`chargeSavedPaymentMethod`, `createSetupCheckout`, `getCheckout`,\n `setDefaultPaymentMethod`, `markInvoiceUncollectible`) are optional port\n methods: detect them by presence, and keep additions optional (#3139).\n `sendAndReconcile` refuses a provider invoice whose subtotal or total\n disagrees with the local invoice.\n- **Replay safety is identity.** Close, invoice, line, payment, allocation,\n and claim ids are `deterministicId()`s; `BillingLineSource` (conflict key\n `source_type, source_id`) is the only double-billing guard, so never bill a\n source without claiming it, and never widen that key. Each close step is\n persisted before the next; `acquireCloseLease()` serializes workers. A\n close that nets to a credit keeps its claims and ends `carried_forward`;\n its subtotal is a `credit_carry_forward` source for the payer's next billed\n close, which marks the carried close `completed`.\n- **Cycles and flat-plan coverage (#3116).** `cycles.ts` is the schedule\n (pure; `BillingAccount.billingAnchorAt`, null = calendar months). A close\n with no period closes each payer's `lastEndedBillingPeriod()`. Flat-plan\n claims are the exception to \"id from the source\": their `sourceId` is\n `<subscriptionId>:seq:<chainSequence>` and their `periodStart/End` is the\n exact time they bill. `claimFlatWindow()` reads the last number, then the\n coverage (claims ending after the window start), claims one gap as number\n n + 1, and retries on conflict; reading in that order is what makes it\n safe. That numbering, not the period, stops overlaps when schedules or\n payers change — never claim a flat plan outside it, and keep both reads\n bounded (no whole-history scans). Each numbered claim is its own invoice\n line keyed `lineKey|periodStart` (a function of the claim alone, so a\n resumed close rebuilds the same line ids). Proration is\n `prorateMinorUnits()` (half up, BigInt) against the period's full cycle.\n- **System tables.** `BillingAccount`, `BillingPeriodClose`, and\n `BillingLineSource` are not tenant-scoped and have no generated surface.\n Collections stay unexported; models are root exports (#3082). Invoices,\n payments, and journals are written in the seller's tenant; payer-owned\n subscriptions and credit grants in a system context, only after\n verification.\n- **Events** use smrt-jobs' delivery inbox under provider\n `<name>-billing:<sellerTenantId>` and a provider-filtered\n `ForgeProjectionRuntime`, so a runtime never claims another seller's\n events; any other runtime sharing the inbox must pass `providers` too. Only\n events this package acts on are stored: foreign checkouts are `ignored`,\n and only `smrt_*` checkout metadata is kept; it is\n HMAC-signed with the webhook secret at creation (empty values are omitted:\n Stripe drops them), so another integration on the same account cannot forge\n a credit purchase or a card setup; credit is granted only when the\n collected total equals it plus provider tax. Checkout amounts come from the\n re-read session (`getCheckout()`), never the Stripe event, whose amounts are\n in Stripe's unit. Rotating the webhook secret strands in-flight checkouts\n (up to 24 h). `observe()` re-reads provider state, so ordering never depends\n on delivery order; the only provider writes in `observe()` are idempotent\n (making a saved card the default). The standing hook runs inside the event\n transaction and must be idempotent.\n- **Card on file and top-ups (#3139).** A saved card is the payer customer's\n default `PaymentInstrument` (seller tenant, id from the provider method).\n `autoChargeInvoices` bills such payers `charge_automatically`, decided once\n and saved as `Invoice.collectionMethod` before the first push, which every\n retry reuses (never recompute it: a lost push response would record a\n method the provider was not asked for, #3190); activation follows `paid`, never send. An auto top-up attempt\n is a `PENDING` `Payment` (`reference` `auto-top-up:<policyId>`, id from the\n policy and `count()` of its attempts) inserted before the charge, so racing\n evaluations derive one id and one charge; the charge key is derived from\n that id. `applyAutoTopUpOutcome()` must run in a transaction and starts with\n a conditional `UPDATE … WHERE status = 'pending'` row lock, so the hook and\n the `payment` webhook settle once; the grant is keyed by the charge key.\n Never settle an attempt outside that function. Taxed accounts are charged\n with provider tax by default (#3194): the attempt row holds the credit\n (the charge subtotal), the tax is journaled to tax payable at settlement,\n and the attempt's tax decision is recorded in its `notes` so a re-drive\n repeats the same charge request (the provider refuses a key reused with\n different tax). `claimAttempt()` is the only place that decides a\n skip and reports it (`onAutoTopUpSkipped`); `cardOnFile()` and period close\n use `defaultCardInstrument()` — never copy that predicate. A provider write-off moves the local invoice to\n `WRITTEN_OFF` (a later payment, by card or on a rail (#3188), is recorded\n and reinstates the payer; the status stays, so \"paid in full\" for a\n written-off invoice is read from its allocations).\n- **Billing invoices are money-model invoices.** The provider taxes them\n (`providerTaxAmount`, server-managed, not API-writable, added to line tax),\n so every billing line is an explicit `taxMode: 'override'` to the seller's\n `out-of-scope` code. Charges are written before credits so the running\n subtotal never goes negative, and provider tax is written in the save that\n issues the invoice. Revenue posting is idempotent. `ledger.bookCurrency` is\n required (ISO 4217, validated by `BillingRuntime`) and must equal the\n billing currency. `toAccountingInput({ mapping })` emits major units.\n- **Payment rails (#3138).** A runtime has one issuing `provider` and any\n number of `paymentProviders` (unique names, one inbox namespace each; a\n provider with `capabilities.issuesInvoices === false` can never issue).\n `observe()` resolves the provider from the delivery namespace, never the\n payload. Crypto rails implement the port over `@happyvertical/payments`'\n `CryptoCheckoutGateway`; never call BTCPay (or any gateway) from here.\n Settlement is decided by the pure `decideAttempt()` from gateway state and\n `paymentPolicy` — the gateway's `settled` is authoritative and nothing here\n counts confirmations. A `BillingPaymentAttempt` (`(provider, checkout_id)`\n deterministic id) records every state and settles once; grants and payments\n are keyed by checkout id. Invoice payments close the issuer's invoice out of\n band in `observe()` (idempotent) before `project()` records the payment, and\n `settlePaidInvoice` skips (records nothing for) a `paidOutOfBand` invoice\n the rail latched with `outOfBandRequestedAt`; other out-of-band closes are\n recorded as `OTHER` payments. Rails never save cards or charge tax: a taxed\n credit purchase on a rail needs an explicit `automaticTax: false`. Exceptions are flags for operators;\n nothing reverses or refunds automatically.\n- **Known limits**: write-offs post no bad-debt journal (AR stays until paid\n or journaled by an operator); discounts still reach Stripe as negative lines (the SDK's\n line `discount` would change the lines a replayed push reconciles, so it\n needs its own migration); `RetailCharge` has no adjustment ledger. Flat\n plans are monthly, in arrears; plan changes are not prorated (#3119).\n\n## Cross-Package References\n\n- `customerId` → `@foreignKey('Customer')` (hard reference within package)\n- `vendorId` → `@foreignKey('Vendor')` on PurchaseContract only\n- `profileId` → plain string to smrt-profiles\n- `arJournalId`, `revenueJournalId` → plain string to smrt-ledgers\n- `skuId` (on `PaymentIntent`, `LicenseSale`) → plain string to smrt-products\n- `paymentId` (on `PaymentIntent`, `Payout`, `LicenseSale`) → plain string to `Payment` (same package, but kept as plain string for cross-model consistency)\n- `vendorId` on `Payout` → `@foreignKey(Vendor)` (hard reference within package)\n- Billing records reference tenants with `@crossPackageRef('@happyvertical/smrt-users:Tenant')` and charges, plan periods, and adjustments by plain `sourceId`\n\n## Gotchas\n\n- **Optional tenancy**: all models `@TenantScoped({ mode: 'optional' })` + nullable tenantId\n- **Money units and arithmetic**: money fields use signed integer minor units; rates and quantities remain decimal where their contracts require them. Exact rounding, tax-code resolution, safe-integer validation, and journal units are defined in the [commercial money model](agents/money-model.md) and [money calculator](agents/money-calculator.md). Do not reintroduce floating-point tolerances on money paths.\n- **Money documents need a tenant**: models are optionally tenant-scoped, but every Invoice and Contract money write requires one (`MoneyValidationError` `INVALID_MONEY_INPUT`, `Commerce money documents require a tenant`).\n- **Earlier-version money data is refused**: never add a read or conversion path for it. Detection and the one-shot upgrade are in [money data upgrade](agents/money-upgrade.md).\n- **Book currency is required**: `recognizeRevenue()` and `cancelWithRevenueReversal()` take a required `bookCurrency`, which must equal the invoice currency.\n- **Asset-native amounts stay outside line rescales**: `Payment.nativeAmount` and `PaymentIntent.paymentOptions[].nativeAmount` are per-asset values identified by `nativeCurrency`; normalize each asset to its own minor unit before any type conversion, and never apply the commerce ×100 line-money rescale to them.\n- **Invoice controls payment status**: not the Payment model — use `Invoice.updatePaymentStatus()`\n- **Tax comes from tax codes**: the server resolves each line's code and computes line tax and header totals; client totals and a line's stored `taxRate` are never inputs\n- **Profile linking**: separate `ProfileCollection.create()` needed to fetch actual Profile object\n- **PaymentIntent natural key**: `conflictColumns: ['tenant_id', 'offering_ref', 'licensee_email', 'idempotency_key']` — a retried `create` with the same tuple upserts the existing row. Use `PaymentIntentCollection.getOrCreateByIdempotencyKey()` to branch on `{ intent, created }`. Empty natural-key inputs (e.g. blank `idempotencyKey`) disable dedup by design.\n- **Payout state-machine guards**: `markSent` requires a non-empty `backendTxRef`; `markConfirmed` only valid from `SENT`; `markFailed` only valid from `PENDING` / `SENT` (a confirmed payout can't fail — that path is a refund). `resetFromFailed()` is the dedicated escape hatch from `FAILED` back to `PENDING` after an operator fixes the underlying problem; it clears `backendTxRef` so the next attempt picks up a fresh one.\n- **LicenseSale immutability**: rights snapshot freezes on save-with-status-ACCEPTED. The captured snapshot lives in a module-scoped `WeakMap<LicenseSale, string>` so it doesn't interact with the schema or round-trip through `_meta_data`. Drafts (status != ACCEPTED) remain mutable. To \"change\" an issued license: `revoke()` it, then issue a new `LicenseSale` row.\n- **Vendor.payoutAddresses normalization**: the constructor accepts either a `Record<string, string>` or a pre-serialized JSON string. `initialize()` re-normalizes after the framework's option-override pass; `save()` re-normalizes defensively against direct field assignment. Non-string values inside the input map are silently dropped to preserve the typed invariant downstream.\n\n## Commercial UI\n\n`CustomerSelect`/`VendorSelect` are the registered selectors for Customer and\nVendor (`selects` in `src/ui.ts`); models carry `ui.widget` / `ui.format` hints. See\n[customer/vendor UI](agents/customer-vendor-ui.md#selectors-3602).\n\nSee [commercial UI composition](agents/commercial-ui.md) for native form recovery, amount compatibility and backend ownership. Package-owned guides under `agents/` ship with the package.\n\n## Quote and estimate UI\n\n`src/svelte/quote-types.ts` separates unparsed draft strings from explicit\nminor-unit revision DTOs. Native row submitters, caller-owned retry identity and\nextension conventions are documented in [agents/quote-ui.md](agents/quote-ui.md).\n\n## Purchasing UI\n\n`PurchaseOrderEditor` preserves allocation IDs and explicit zeroes, including\nretained reduction rows; the server validates review fingerprints before recording.\nSee [agents/purchasing-ui.md](agents/purchasing-ui.md) for caller responsibilities.\n\n## Exact cost billing\n\nPure signed cost billing and explicit tax rounding are available through the\nindependent `cost-billing` subpath; see [contract](agents/cost-billing.md).\n\nSee [contract billing schedules](agents/contract-billing-schedules.md) for exact\napproved milestone capacity, immutable amendments and atomic canonical invoice issue.\n\nSee [estimate conversion](agents/estimate-conversion.md) for turning an accepted\nEstimate into an idempotent Order with copied lines and lineage.\n\n## Customer funds (#4079)\n\nSee [customer advances](agents/customer-funds.md) for explicitly configured\nunapplied-AR/deposit-liability receipts, conserved application/refund capacity,\nreal liability reclassification, final-invoice attestation and mutation guards.\nUse the public commands; `Payment.customerFundsJson` is command-owned.\n\nSee [observed purchase prices](agents/observed-purchase-prices.md) for incomplete\noriginal supplier prices, explicit unknown totals and reviewed completion.\nSee [received sales agreement money](agents/received-sales-contract-money.md) for\nexact complete source Order/Agreement evidence without synthetic lines or tax recognition.\n\nSee [ordinary invoice accounting adjustments](agents/ordinary-accounting.md) for\nnon-retained provider credit applications, recorded refunds and durable recovery.\n",
|
|
22334
|
+
"agentDoc": "# @happyvertical/smrt-commerce\n\nE-commerce with Contract STI hierarchy, invoice lifecycle, payment tracking, payout remittance, and optional ledger integration.\n\n## Models\n\n- **Customer** / **Vendor**: linked to Profile via string ID (not FK). `contacts` (JSON) is written via [`savePartyContacts()`](agents/customer-vendor-ui.md#contact-rows-3501). Customer has creditLimit, paymentTerms, customerType (DTC / WHOLESALE / RETAIL). Vendor has leadTimeDays, minimumOrder, and `payoutAddresses: Record<string, string>` — a flat map from payout-rail-qualified currency code (`USDC-base`, `BTC`, `USD-stripe`, ...) to destination string (EVM address, BTC address, Stripe Connect account id, IBAN). Use `getPayoutAddress(currency)` for a `Map.get`-style lookup; missing entries return `undefined` (caller decides skip-vs-error).\n- **Contract**: concrete STI base. Abstract **SalesContract** owns `customerId`; **PurchaseContract** owns `vendorId`. `channelId` is open-ended. Before upgrade, run `preflightCommercePartyLinks(db)` and repair linked base rows, stray parties, and wrong-branch links. See [README](README.md).\n- **WholesaleOrder**: B2B order. Conventional pairing — customer has `customerType: 'wholesale'`, NET-30/60 terms, delivered via wholesale-portal channel.\n- **ProductionOrder**: manufacturing equivalent of a PurchaseOrder — commission your factory to make finished goods. Consumes raw materials per BOM (`@happyvertical/smrt-manufacturing`) and produces SKU stock (`@happyvertical/smrt-inventory`).\n- **Cart**: transient order-in-progress. Same shape as Order; the application promotes the row from `_meta_type: Cart` to `_meta_type: Order` at checkout instead of copying data between tables.\n- **LicenseSale**: industry-neutral licensing primitive. Carries an *immutable* rights snapshot (`rightsMedium`, `rightsDistributionScope`, `rightsExclusivity`, `rightsDuration`, `rightsTerritory`, `rightsSublicensing`, `rightsDerivatives` — typed `Meta<T>` fields), licensee identity (`licenseeEmail`, optional `licenseeLegalEntity` / `licenseeJurisdiction`), and a signed-PDF reference (`pdfUrl`, `pdfHash`, optional `onChainHashRegistryRef`). Once saved at `ContractStatus.ACCEPTED`, the rights snapshot is frozen — mutating any of the seven rights fields and re-saving throws. The only legal transition out of ACCEPTED is `revoke()` (moves to CANCELLED without touching rights). Useful for stock media, music licensing, code-asset marketplaces, license keys, anywhere rights are sold for a fee.\n- **ContractLineItem**: items on contracts.\n- **Invoice**: status machine `DRAFT → SENT → VIEWED → PARTIAL → PAID` (also OVERDUE, CANCELLED, WRITTEN_OFF). `recognizeRevenue()` creates balanced AR journal entry (DR: Accounts Receivable, CR: Revenue, CR: Tax Payable).\n- **InvoiceLineItem**: fractional-quantity line items with safe minor-unit validation/recalculation on save; the existing-column migration is documented in [invoice quantity persistence](agents/invoice-quantity.md).\n- **Payment** / **PaymentAllocation**: tracks payments against invoices (status: see Gotchas). Carries optional backend-adapter fields for PaymentBackend-routed flows: `backendId` (rail adapter id — `base-usdc`, `btc`, `stripe`, distinct from `externalProvider` which names an accounting sync destination), `backendTxRef` (chain tx hash or gateway settlement id), `nativeAmount` / `nativeCurrency` (what actually arrived), `usdAtQuote` / `usdAtConfirmation` (drift accounting for volatile-currency rails). `Payment.usdDrift()` returns the confirmation - quote delta, or `0` when either side is unset.\n- **PaymentInstrument**: reusable saved payment method (\"card on file\"). Stores only provider references and non-sensitive display metadata (`providerCustomerId`, `providerPaymentMethodId`, brand / last4 / expiry), never raw card data. `isDefault` is domain-managed, not API-writable: `PaymentInstrumentCollection.setDefaultForCustomer(customerId, instrumentId)` validates the target and clears the customer's other defaults (one per customer).\n- **PaymentIntent**: short-lived pre-payment commitment with multi-option semantics. Locks a USD price for a fixed window (default 15 minutes) and lists one or more `PaymentOption`s describing different rails (`backendId`, `currency`, `payTo`, `nativeAmount`, optional `chain` / `memo` / `x402Capable` / `expiresAt`). First option to receive payment wins; the others are implicitly retired. State machine `awaiting_payment → paid → (issued | retired)` plus `expired` and `cancelled`. Mutate via dedicated `markPaid` / `markIssued` / `expire` / `cancel` / `retire` helpers — direct status assignment bypasses the invariant checks. Idempotency: see the natural-key Gotcha.\n- **TenantPaymentAccount**: tenant-owned Stripe Connect account; direct charges with an application fee, account→tenant webhook routing, refunds, no platform fallback. Write only through `connected-payments.ts`; see [connected payments](agents/connected-payments.md).\n- **Payout**: operator-to-supplier remittance. Distinct from Payment because direction, status machine, and chain semantics differ. Status machine `pending → sent → confirmed → failed` (failed is terminal but resettable via `resetFromFailed()` after fixing the underlying problem). References source `paymentId` (plain string) and destination `vendorId` (foreign key). Amount invariant `supplierNet === grossAmount - operatorFee` enforced exactly on save (integer minor units, no tolerance — #2401). `PayoutCollection.createFromPayment()` is the typical entry point; it pulls native amount / currency from the source Payment.\n- **Fulfillment** / **FulfillmentLineItem**: shipment/delivery tracking.\n\n## Recipes (#3590)\n\n`src/recipes.ts` declares four minimal `SmrtRecipe`s, emitted into the built\n`manifest.json` and `smrt-knowledge.json` `recipes`: `commerce.customers`\n(Customer), `commerce.vendors` (Vendor), `commerce.sales` (Order, requires\ncustomers), `commerce.purchases` (PurchaseOrder, requires vendors). Headers\nonly; line items, fulfilment, invoices, and payments are later recipes. Each\nhas user-facing help in `src/<name>.recipe.md` (#3591), and the fields those\nrecipes show carry `@field({ description })` text; keep both in plain\nlanguage for end users and update them when a recipe's fields change. See\n[core recipes](../core/agents/recipes.md).\n\nSee [historical issued sales](agents/historical-sales.md) for exact original source\nmoney, immutable source children and combined historical/live customer funds.\nSee [payment allocation integrity](agents/payment-allocations.md) for atomic splits,\nretry identity, parent corrections and supported dialects.\nSee [tax codes](agents/tax-codes.md) for tenant-owned rate components, default codes,\nand the standard codes every tenant gets.\nSee [document money persistence](agents/document-money.md) for the one money\nmodel: tax-code resolution, atomic aggregate writes, issued snapshots, and\nfrozen fields. Every Invoice and Contract money write needs a tenant. Host\nbootstrap is `ensureCommerceTenant(db, tenantId, { cookbook })`, which returns\n`{ tenantId }`. Money data written by an earlier version is refused with\n`COMMERCE_DATA_NEEDS_UPGRADE` until `smrt db:upgrade-commerce-money` converts\nit; see [money data upgrade](agents/money-upgrade.md).\nSee [Contract money persistence](agents/contract-money.md) for the Contract\naggregate and purchase recoverability.\n\n## Ledger Integration\n\n`@happyvertical/smrt-ledgers` is a regular dependency, loaded lazily via dynamic `import()` (never a static import) so the package graph stays a DAG (#1582). Invoice stores `arJournalId` and `revenueJournalId` as string references. `recognizeRevenue()` creates a balanced AR journal entry; `getArJournal()` returns null when no journal has been recognized yet.\n\n## Billing-period close (#3060)\n\n`src/billing/` closes periods from smrt-subscriptions charges; see the README\nfor usage.\n\n- **Port, not provider.** Period close, events, and credit checkout call only\n the `BillingProvider` port (integer minor units). `stripe.ts` adapts\n `@happyvertical/accounting`, which takes currency *major* units; convert with\n `units.ts` and never hand-roll a Stripe call here. `units.ts` exponents are\n an explicit ISO 4217 table matching the SDK's, never `Intl` display digits\n (CLDR differs for IQD, MGA, … and drifts by ICU release). The SDK's\n `*Minor` fields are already ISO minor units. Capabilities a rail may lack\n (`chargeSavedPaymentMethod`, `createSetupCheckout`, `getCheckout`,\n `setDefaultPaymentMethod`, `markInvoiceUncollectible`) are optional port\n methods: detect them by presence, and keep additions optional (#3139).\n `sendAndReconcile` refuses a provider invoice whose subtotal or total\n disagrees with the local invoice.\n- **Replay safety is identity.** Close, invoice, line, payment, allocation,\n and claim ids are `deterministicId()`s; `BillingLineSource` (conflict key\n `source_type, source_id`) is the only double-billing guard, so never bill a\n source without claiming it, and never widen that key. Each close step is\n persisted before the next; `acquireCloseLease()` serializes workers. A\n close that nets to a credit keeps its claims and ends `carried_forward`;\n its subtotal is a `credit_carry_forward` source for the payer's next billed\n close, which marks the carried close `completed`.\n- **Cycles and flat-plan coverage (#3116).** `cycles.ts` is the schedule\n (pure; `BillingAccount.billingAnchorAt`, null = calendar months). A close\n with no period closes each payer's `lastEndedBillingPeriod()`. Flat-plan\n claims are the exception to \"id from the source\": their `sourceId` is\n `<subscriptionId>:seq:<chainSequence>` and their `periodStart/End` is the\n exact time they bill. `claimFlatWindow()` reads the last number, then the\n coverage (claims ending after the window start), claims one gap as number\n n + 1, and retries on conflict; reading in that order is what makes it\n safe. That numbering, not the period, stops overlaps when schedules or\n payers change — never claim a flat plan outside it, and keep both reads\n bounded (no whole-history scans). Each numbered claim is its own invoice\n line keyed `lineKey|periodStart` (a function of the claim alone, so a\n resumed close rebuilds the same line ids). Proration is\n `prorateMinorUnits()` (half up, BigInt) against the period's full cycle.\n- **System tables.** `BillingAccount`, `BillingPeriodClose`, and\n `BillingLineSource` are not tenant-scoped and have no generated surface.\n Collections stay unexported; models are root exports (#3082). Invoices,\n payments, and journals are written in the seller's tenant; payer-owned\n subscriptions and credit grants in a system context, only after\n verification.\n- **Events** use smrt-jobs' delivery inbox under provider\n `<name>-billing:<sellerTenantId>` and a provider-filtered\n `ForgeProjectionRuntime`, so a runtime never claims another seller's\n events; any other runtime sharing the inbox must pass `providers` too. Only\n events this package acts on are stored: foreign checkouts are `ignored`,\n and only `smrt_*` checkout metadata is kept; it is\n HMAC-signed with the webhook secret at creation (empty values are omitted:\n Stripe drops them), so another integration on the same account cannot forge\n a credit purchase or a card setup; credit is granted only when the\n collected total equals it plus provider tax. Checkout amounts come from the\n re-read session (`getCheckout()`), never the Stripe event, whose amounts are\n in Stripe's unit. Rotating the webhook secret strands in-flight checkouts\n (up to 24 h). `observe()` re-reads provider state, so ordering never depends\n on delivery order; the only provider writes in `observe()` are idempotent\n (making a saved card the default). The standing hook runs inside the event\n transaction and must be idempotent.\n- **Card on file and top-ups (#3139).** A saved card is the payer customer's\n default `PaymentInstrument` (seller tenant, id from the provider method).\n `autoChargeInvoices` bills such payers `charge_automatically`, decided once\n and saved as `Invoice.collectionMethod` before the first push, which every\n retry reuses (never recompute it: a lost push response would record a\n method the provider was not asked for, #3190); activation follows `paid`, never send. An auto top-up attempt\n is a `PENDING` `Payment` (`reference` `auto-top-up:<policyId>`, id from the\n policy and `count()` of its attempts) inserted before the charge, so racing\n evaluations derive one id and one charge; the charge key is derived from\n that id. `applyAutoTopUpOutcome()` must run in a transaction and starts with\n a conditional `UPDATE … WHERE status = 'pending'` row lock, so the hook and\n the `payment` webhook settle once; the grant is keyed by the charge key.\n Never settle an attempt outside that function. Taxed accounts are charged\n with provider tax by default (#3194): the attempt row holds the credit\n (the charge subtotal), the tax is journaled to tax payable at settlement,\n and the attempt's tax decision is recorded in its `notes` so a re-drive\n repeats the same charge request (the provider refuses a key reused with\n different tax). `claimAttempt()` is the only place that decides a\n skip and reports it (`onAutoTopUpSkipped`); `cardOnFile()` and period close\n use `defaultCardInstrument()` — never copy that predicate. A provider write-off moves the local invoice to\n `WRITTEN_OFF` (a later payment, by card or on a rail (#3188), is recorded\n and reinstates the payer; the status stays, so \"paid in full\" for a\n written-off invoice is read from its allocations).\n- **Billing invoices are money-model invoices.** The provider taxes them\n (`providerTaxAmount`, server-managed, not API-writable, added to line tax),\n so every billing line is an explicit `taxMode: 'override'` to the seller's\n `out-of-scope` code. Charges are written before credits so the running\n subtotal never goes negative, and provider tax is written in the save that\n issues the invoice. Revenue posting is idempotent. `ledger.bookCurrency` is\n required (ISO 4217, validated by `BillingRuntime`) and must equal the\n billing currency. `toAccountingInput({ mapping })` emits major units.\n- **Payment rails (#3138).** A runtime has one issuing `provider` and any\n number of `paymentProviders` (unique names, one inbox namespace each; a\n provider with `capabilities.issuesInvoices === false` can never issue).\n `observe()` resolves the provider from the delivery namespace, never the\n payload. Crypto rails implement the port over `@happyvertical/payments`'\n `CryptoCheckoutGateway`; never call BTCPay (or any gateway) from here.\n Settlement is decided by the pure `decideAttempt()` from gateway state and\n `paymentPolicy` — the gateway's `settled` is authoritative and nothing here\n counts confirmations. A `BillingPaymentAttempt` (`(provider, checkout_id)`\n deterministic id) records every state and settles once; grants and payments\n are keyed by checkout id. Invoice payments close the issuer's invoice out of\n band in `observe()` (idempotent) before `project()` records the payment, and\n `settlePaidInvoice` skips (records nothing for) a `paidOutOfBand` invoice\n the rail latched with `outOfBandRequestedAt`; other out-of-band closes are\n recorded as `OTHER` payments. Rails never save cards or charge tax: a taxed\n credit purchase on a rail needs an explicit `automaticTax: false`. Exceptions are flags for operators;\n nothing reverses or refunds automatically.\n- **Known limits**: write-offs post no bad-debt journal (AR stays until paid\n or journaled by an operator); discounts still reach Stripe as negative lines (the SDK's\n line `discount` would change the lines a replayed push reconciles, so it\n needs its own migration); `RetailCharge` has no adjustment ledger. Flat\n plans are monthly, in arrears; plan changes are not prorated (#3119).\n\n## Cross-Package References\n\n- `customerId` → `@foreignKey('Customer')` (hard reference within package)\n- `vendorId` → `@foreignKey('Vendor')` on PurchaseContract only\n- `profileId` → plain string to smrt-profiles\n- `arJournalId`, `revenueJournalId` → plain string to smrt-ledgers\n- `skuId` (on `PaymentIntent`, `LicenseSale`) → plain string to smrt-products\n- `paymentId` (on `PaymentIntent`, `Payout`, `LicenseSale`) → plain string to `Payment` (same package, but kept as plain string for cross-model consistency)\n- `vendorId` on `Payout` → `@foreignKey(Vendor)` (hard reference within package)\n- Billing records reference tenants with `@crossPackageRef('@happyvertical/smrt-users:Tenant')` and charges, plan periods, and adjustments by plain `sourceId`\n\n## Gotchas\n\n- **Optional tenancy**: all models `@TenantScoped({ mode: 'optional' })` + nullable tenantId\n- **Money units and arithmetic**: money fields use signed integer minor units; rates and quantities remain decimal where their contracts require them. Exact rounding, tax-code resolution, safe-integer validation, and journal units are defined in the [commercial money model](agents/money-model.md) and [money calculator](agents/money-calculator.md). Do not reintroduce floating-point tolerances on money paths.\n- **Money documents need a tenant**: models are optionally tenant-scoped, but every Invoice and Contract money write requires one (`MoneyValidationError` `INVALID_MONEY_INPUT`, `Commerce money documents require a tenant`).\n- **Earlier-version money data is refused**: never add a read or conversion path for it. Detection and the one-shot upgrade are in [money data upgrade](agents/money-upgrade.md).\n- **Book currency is required**: `recognizeRevenue()` and `cancelWithRevenueReversal()` take a required `bookCurrency`, which must equal the invoice currency.\n- **Asset-native amounts stay outside line rescales**: `Payment.nativeAmount` and `PaymentIntent.paymentOptions[].nativeAmount` are per-asset values identified by `nativeCurrency`; normalize each asset to its own minor unit before any type conversion, and never apply the commerce ×100 line-money rescale to them.\n- **Invoice controls payment status**: not the Payment model — use `Invoice.updatePaymentStatus()`\n- **Tax comes from tax codes**: the server resolves each line's code and computes line tax and header totals; client totals and a line's stored `taxRate` are never inputs\n- **Profile linking**: separate `ProfileCollection.create()` needed to fetch actual Profile object\n- **PaymentIntent natural key**: `conflictColumns: ['tenant_id', 'offering_ref', 'licensee_email', 'idempotency_key']` — a retried `create` with the same tuple upserts the existing row. Use `PaymentIntentCollection.getOrCreateByIdempotencyKey()` to branch on `{ intent, created }`. Empty natural-key inputs (e.g. blank `idempotencyKey`) disable dedup by design.\n- **Payout state-machine guards**: `markSent` requires a non-empty `backendTxRef`; `markConfirmed` only valid from `SENT`; `markFailed` only valid from `PENDING` / `SENT` (a confirmed payout can't fail — that path is a refund). `resetFromFailed()` is the dedicated escape hatch from `FAILED` back to `PENDING` after an operator fixes the underlying problem; it clears `backendTxRef` so the next attempt picks up a fresh one.\n- **LicenseSale immutability**: rights snapshot freezes on save-with-status-ACCEPTED. The captured snapshot lives in a module-scoped `WeakMap<LicenseSale, string>` so it doesn't interact with the schema or round-trip through `_meta_data`. Drafts (status != ACCEPTED) remain mutable. To \"change\" an issued license: `revoke()` it, then issue a new `LicenseSale` row.\n- **Vendor.payoutAddresses normalization**: the constructor accepts either a `Record<string, string>` or a pre-serialized JSON string. `initialize()` re-normalizes after the framework's option-override pass; `save()` re-normalizes defensively against direct field assignment. Non-string values inside the input map are silently dropped to preserve the typed invariant downstream.\n\n## Commercial UI\n\n`CustomerSelect`/`VendorSelect` are the registered selectors for Customer and\nVendor (`selects` in `src/ui.ts`); models carry `ui.widget` / `ui.format` hints. See\n[customer/vendor UI](agents/customer-vendor-ui.md#selectors-3602).\n\nSee [commercial UI composition](agents/commercial-ui.md) for native form recovery, amount compatibility and backend ownership. Package-owned guides under `agents/` ship with the package.\n\n## Quote and estimate UI\n\n`src/svelte/quote-types.ts` separates unparsed draft strings from explicit\nminor-unit revision DTOs. Native row submitters, caller-owned retry identity and\nextension conventions are documented in [agents/quote-ui.md](agents/quote-ui.md).\n\n## Purchasing UI\n\n`PurchaseOrderEditor` preserves allocation IDs and explicit zeroes, including\nretained reduction rows; the server validates review fingerprints before recording.\nSee [agents/purchasing-ui.md](agents/purchasing-ui.md) for caller responsibilities.\n\n## Exact cost billing\n\nPure signed cost billing and explicit tax rounding are available through the\nindependent `cost-billing` subpath; see [contract](agents/cost-billing.md).\n\nSee [contract billing schedules](agents/contract-billing-schedules.md) for exact\napproved milestone capacity, immutable amendments and atomic canonical invoice issue.\n\nSee [estimate conversion](agents/estimate-conversion.md) for turning an accepted\nEstimate into an idempotent Order with copied lines and lineage.\n\n## Customer funds (#4079)\n\nSee [customer advances](agents/customer-funds.md) for explicitly configured\nunapplied-AR/deposit-liability receipts, conserved application/refund capacity,\nreal liability reclassification, final-invoice attestation and mutation guards.\nUse the public commands; `Payment.customerFundsJson` is command-owned.\n\nSee [observed purchase prices](agents/observed-purchase-prices.md) for incomplete\noriginal supplier prices, explicit unknown totals and reviewed completion.\nSee [received sales agreement money](agents/received-sales-contract-money.md) for\nexact complete source Order/Agreement evidence without synthetic lines or tax recognition.\n\nSee [ordinary invoice accounting adjustments](agents/ordinary-accounting.md) for\nnon-retained provider credit applications, recorded refunds and durable recovery.\n\n## Protected billable sources (#4746)\n\n`invoice-source-binding.ts` is the generic pointer/guard contract for an owning\npackage's existing capacity reservation. It creates no capacity ledger. Trusted\npackages register qualified `billable:` source handlers; missing handlers and\nunbound protected lines fail closed at issue. `InvoiceLineItem.sourceReservationId`\nis command-owned; line save/delete, collection deletion, invoice cascade deletion\nand issue validate persisted identities. Release/unbind must share the owning\nreservation transaction. See [source binding](agents/invoice-source-binding.md).\n",
|
|
22327
22335
|
"moduleDocs": [
|
|
22328
22336
|
{
|
|
22329
22337
|
"path": "agents/customer-vendor-ui.md",
|
|
@@ -22434,6 +22442,11 @@
|
|
|
22434
22442
|
"path": "agents/ordinary-accounting.md",
|
|
22435
22443
|
"module": "ordinary-accounting",
|
|
22436
22444
|
"content": "# Ordinary invoice accounting adjustments (#4118)\n\nOrdinary issued invoices use the same frozen money exporter as other canonical\nCommerce invoices. Their provider credit applications and already-settled refund\nrecordings need durable ownership too; they do not have a retention agreement.\n\nUse `syncOrdinaryInvoiceToAccounting` with the active tenant, canonical issued\ninvoice ID, provider, stable request ID, evidence reference, reviewed SDK\n`QuickBooksOrdinaryReceivableMapping` (`kind: 'ordinary'`) and exact\n`QuickBooksFrozenInvoiceMapping` (`invoiceMapping`). It saves both mappings before\ncalling `syncFrozenInvoiceToAccounting`. It does not fabricate quantities, tax,\nretention accounts or an original provider invoice for historical imported facts.\nThe mapping supports explicit accrual/invoice-tax-point, verified home currency,\nAR and optional bank accounts. The SDK validates real provider account/customer\nmetadata; ordinary mapping cannot withhold or release retention.\n\n`readOrdinaryInvoiceAccountingState(invoice)` returns the immutable source and\nreviewed mappings, nullable original external ID, pending/ready status, credits,\nrefunds and individual remote steps. On a lost original export response, retain\nthat state and use the existing `readFrozenAccountingSyncState` request/attempt\nidentity plus `reconcileOrdinaryBaseInvoice` and exact verified provider outcome.\nRetry the original sync command afterwards. A fresh process can reconstruct the\nrequest from the public state; it must not guess a mapping or query private JSON.\n\nFor an issued same-source credit, `loadOrdinaryCreditAccountingSnapshot` and\n`toOrdinaryCreditAccountingInput` provide read-only exact review. Then call\n`syncOrdinaryCreditToAccounting` with the credit ID/mapping, request/evidence and\nexplicit effective date. The command reserves the actual local applied amount,\nexports the frozen CreditMemo and applies only that amount to the original remote\nInvoice. Zero application leaves unapplied credit capacity; it creates no fake\nzero payment. Once reserved, later same-date credits, UUID ordering and balance\nrefreshes cannot move the provider application. Generic direct credit export is\nblocked for managed sources; the owning read helpers do not permit a write bypass.\n\n`syncOrdinaryRefundToAccounting` requires an already-completed local refund\nPayment, actual cash journal, one exact full allocation to a reconciled provider\ncredit, and effectiveOn equal to the local settlement date. It reserves remaining\nunapplied credit capacity before recording the provider cash-refund journal and\nits noncash CreditMemo application. These are accounting records of an existing\nsettlement, never a bank transfer. The Payment and its allocations cannot be\nchanged/deleted after reservation, including while an outcome is unknown.\n\nEvery remote write uses the shared recoverable step engine also used by retained\naccounting. `reconcileOrdinaryAccountingStep` requires exact observed request and\nattempt identity, authoritative readback/absence evidence and proof an interrupted\nowner stopped. `reconcileOrdinaryCreditAccounting` resolves the frozen CreditMemo\nexport. Never reset unknown state on timeout or assume a request hash alone proves\nremote idempotency. Resume the original operation after reconciliation; changed\nrequest facts fail. Network operations reject caller-owned money transactions;\nlocal reservations use the same tenant/source money locks and rollback boundary.\n\nOrdinary state and refund bindings are command-owned fields on Invoice and Payment.\nRun normal schema migration for these additive fields before using the capability.\nExisting rows remain unbound; no automatic conversion of earlier app-only posted\nhistory is performed. Retained APIs still require a real positive retention\nagreement. No live provider certification is implied by controlled SDK fixtures.\n\nFocused proof: `pnpm --filter @happyvertical/smrt-commerce exec vitest run\nsrc/__tests__/ordinary-accounting.test.ts src/__tests__/retention-accounting.test.ts`.\nThe corresponding `ordinary-accounting.optional.test.ts` and retained suite run\nthrough the standard managed PostgreSQL wrapper. The shared helper covers base,\ncredit and both refund-step lost responses; same-day ordering; changed retry;\nsource/tenant checks; reservation rollback; concurrent refund attempts; and direct\npayment/allocation mutation refusal. The retained suite protects shared-engine\ncompatibility.\n\nAn existing generic frozen export can enter ordinary coordination only when the\nreviewed mapping reconstructs its exact original creation request. This check\nruns under the reservation lock, including unresolved exports; a mismatch leaves\nordinary state absent. Once ordinary authority is reserved, base export uses the\nowning command so a competing generic export cannot replace that mapping between\nreservation and provider I/O. Read-only frozen projections remain available.\n"
|
|
22445
|
+
},
|
|
22446
|
+
{
|
|
22447
|
+
"path": "agents/invoice-source-binding.md",
|
|
22448
|
+
"module": "invoice-source-binding",
|
|
22449
|
+
"content": "# Invoice source binding\n\n`registerInvoiceSourceBinding('billable:@scope/package:Source', handler)` is a\ntrusted package-registration API. The handler validates that package's existing\nreservation against the exact active tenant, invoice, line and canonical source.\nIt receives the bound database executor and a bind/release/validate phase. It\nmust fail closed for missing ownership, stale capacity or mismatched identities.\nClient strings never invoke arbitrary model methods. A missing handler, including\nan unavailable owning package, blocks protected source mutations/issue.\n\n`bindInvoiceLineSource({db,tenantId,lineId,reservationId})` attaches an already\nauthorized owning reservation; it cannot manufacture source availability. The\nowner must assign its reservation atomically with binding and enforce that one\nreservation cannot identify two lines. `unbindInvoiceLineSource` requires the\nowning handler to confirm release and a still-unissued draft. Keep both changes\nin the same caller transaction so failure rolls them back together.\n\nThe nullable `sourceReservationId` is command-owned, guarded against both stored\nand proposed source identities. A bound line cannot clear its pointer, switch\nnamespace/source, or be deleted through model/collection/invoice cascade paths.\nDraft pricing may still change: source capacity and customer price are separate.\nIssue validates every protected line; ordinary invoices with null pointers keep\ntheir existing behavior. Issued money/source identity remains frozen through the\nexisting commerce snapshot machinery. Migrate this nullable column before use;\nlegacy protected lines without a valid reservation are refused at issue.\n\nThe owning `smrt-expenses` integration suite exercises real immutable reservations,\nconcurrent assignments, pointer/namespace/deletion/duplicate bypasses, withdrawal\nand issued preservation against SQLite and the migrated PostgreSQL lane.\n"
|
|
22437
22450
|
}
|
|
22438
22451
|
],
|
|
22439
22452
|
"recipes": [
|
|
@@ -22885,6 +22898,9 @@
|
|
|
22885
22898
|
"sourceId": {
|
|
22886
22899
|
"visibility": "hidden"
|
|
22887
22900
|
},
|
|
22901
|
+
"sourceReservationId": {
|
|
22902
|
+
"visibility": "hidden"
|
|
22903
|
+
},
|
|
22888
22904
|
"periodStart": {
|
|
22889
22905
|
"visibility": "hidden"
|
|
22890
22906
|
},
|
|
@@ -5,10 +5,10 @@ description: "Commerce models for the SMRT framework - contracts, fulfillments,
|
|
|
5
5
|
status: "stable"
|
|
6
6
|
generated:
|
|
7
7
|
by: "smrt/scripts/generate-knowledge-okf.ts"
|
|
8
|
-
at: "2026-11-
|
|
8
|
+
at: "2026-11-08T01:15:12Z"
|
|
9
9
|
audience: "internal"
|
|
10
10
|
evidence_level: "source-inspected"
|
|
11
|
-
source_revision: "sha256:
|
|
11
|
+
source_revision: "sha256:d70e91243dd5976391d17d2011d6c2f45418f85e3db36b0f8ed3a2a00c5787cd"
|
|
12
12
|
sources:
|
|
13
13
|
- id: "manifest"
|
|
14
14
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/package.json"
|
|
@@ -53,33 +53,36 @@ sources:
|
|
|
53
53
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/invoice-quantity.md"
|
|
54
54
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/invoice-quantity.md"
|
|
55
55
|
- id: "agents-14"
|
|
56
|
+
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/invoice-source-binding.md"
|
|
57
|
+
title: "@happyvertical/smrt-commerce packages/commerce/agents/invoice-source-binding.md"
|
|
58
|
+
- id: "agents-15"
|
|
56
59
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/money-calculator.md"
|
|
57
60
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/money-calculator.md"
|
|
58
|
-
- id: "agents-
|
|
61
|
+
- id: "agents-16"
|
|
59
62
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/money-model.md"
|
|
60
63
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/money-model.md"
|
|
61
|
-
- id: "agents-
|
|
64
|
+
- id: "agents-17"
|
|
62
65
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/money-upgrade.md"
|
|
63
66
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/money-upgrade.md"
|
|
64
|
-
- id: "agents-
|
|
67
|
+
- id: "agents-18"
|
|
65
68
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/observed-purchase-prices.md"
|
|
66
69
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/observed-purchase-prices.md"
|
|
67
|
-
- id: "agents-
|
|
70
|
+
- id: "agents-19"
|
|
68
71
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/ordinary-accounting.md"
|
|
69
72
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/ordinary-accounting.md"
|
|
70
|
-
- id: "agents-
|
|
73
|
+
- id: "agents-20"
|
|
71
74
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/payment-allocations.md"
|
|
72
75
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/payment-allocations.md"
|
|
73
|
-
- id: "agents-
|
|
76
|
+
- id: "agents-21"
|
|
74
77
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/purchasing-ui.md"
|
|
75
78
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/purchasing-ui.md"
|
|
76
|
-
- id: "agents-
|
|
79
|
+
- id: "agents-22"
|
|
77
80
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/quote-ui.md"
|
|
78
81
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/quote-ui.md"
|
|
79
|
-
- id: "agents-
|
|
82
|
+
- id: "agents-23"
|
|
80
83
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/received-sales-contract-money.md"
|
|
81
84
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/received-sales-contract-money.md"
|
|
82
|
-
- id: "agents-
|
|
85
|
+
- id: "agents-24"
|
|
83
86
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/commerce/agents/tax-codes.md"
|
|
84
87
|
title: "@happyvertical/smrt-commerce packages/commerce/agents/tax-codes.md"
|
|
85
88
|
---
|
|
@@ -108,6 +111,7 @@ sources:
|
|
|
108
111
|
- `packages/commerce/agents/estimate-conversion.md`
|
|
109
112
|
- `packages/commerce/agents/historical-sales.md`
|
|
110
113
|
- `packages/commerce/agents/invoice-quantity.md`
|
|
114
|
+
- `packages/commerce/agents/invoice-source-binding.md`
|
|
111
115
|
- `packages/commerce/agents/money-calculator.md`
|
|
112
116
|
- `packages/commerce/agents/money-model.md`
|
|
113
117
|
- `packages/commerce/agents/money-upgrade.md`
|
package/dist/types/index.d.ts
CHANGED
|
@@ -612,6 +612,8 @@ export interface InvoiceLineItemOptions extends SmrtObjectOptions {
|
|
|
612
612
|
amount?: number;
|
|
613
613
|
sourceType?: string;
|
|
614
614
|
sourceId?: string;
|
|
615
|
+
/** Hydration only; use bindInvoiceLineSource. */
|
|
616
|
+
sourceReservationId?: string | null;
|
|
615
617
|
periodStart?: Date | null;
|
|
616
618
|
periodEnd?: Date | null;
|
|
617
619
|
revenueAccountId?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAMlE,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED;;;;;;GAMG;AACH,oBAAY,YAAY;IACtB,GAAG,QAAQ;IACX,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAED,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAMD,oBAAY,YAAY;IACtB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,IAAI,SAAS;IACb;;;;;;;OAOG;IACH,YAAY,iBAAiB;CAC9B;AAED,oBAAY,cAAc;IACxB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,SAAS,cAAc;CACxB;AAMD,oBAAY,eAAe;IACzB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,SAAS,cAAc;CACxB;AAMD,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,aAAa,kBA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mB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-commerce",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.15",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Commerce models for the SMRT framework - contracts, fulfillments, payments",
|
|
6
6
|
"type": "module",
|
|
@@ -65,17 +65,17 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@happyvertical/accounting": "^0.111.6",
|
|
67
67
|
"@happyvertical/payments": "^0.111.6",
|
|
68
|
-
"@happyvertical/smrt-agents": "0.60.
|
|
69
|
-
"@happyvertical/smrt-core": "0.60.
|
|
70
|
-
"@happyvertical/smrt-jobs": "0.60.
|
|
71
|
-
"@happyvertical/smrt-ledgers": "0.60.
|
|
72
|
-
"@happyvertical/smrt-products": "0.60.
|
|
73
|
-
"@happyvertical/smrt-reports": "0.60.
|
|
74
|
-
"@happyvertical/smrt-subscriptions": "0.60.
|
|
75
|
-
"@happyvertical/smrt-svelte": "0.60.
|
|
76
|
-
"@happyvertical/smrt-tenancy": "0.60.
|
|
77
|
-
"@happyvertical/smrt-types": "0.60.
|
|
78
|
-
"@happyvertical/smrt-ui": "0.60.
|
|
68
|
+
"@happyvertical/smrt-agents": "0.60.15",
|
|
69
|
+
"@happyvertical/smrt-core": "0.60.15",
|
|
70
|
+
"@happyvertical/smrt-jobs": "0.60.15",
|
|
71
|
+
"@happyvertical/smrt-ledgers": "0.60.15",
|
|
72
|
+
"@happyvertical/smrt-products": "0.60.15",
|
|
73
|
+
"@happyvertical/smrt-reports": "0.60.15",
|
|
74
|
+
"@happyvertical/smrt-subscriptions": "0.60.15",
|
|
75
|
+
"@happyvertical/smrt-svelte": "0.60.15",
|
|
76
|
+
"@happyvertical/smrt-tenancy": "0.60.15",
|
|
77
|
+
"@happyvertical/smrt-types": "0.60.15",
|
|
78
|
+
"@happyvertical/smrt-ui": "0.60.15",
|
|
79
79
|
"@happyvertical/sql": "^0.111.6"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@happyvertical/smrt-vitest": "0.60.
|
|
90
|
+
"@happyvertical/smrt-vitest": "0.60.15",
|
|
91
91
|
"@sveltejs/package": "^2.5.8",
|
|
92
92
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
93
93
|
"@testing-library/jest-dom": "^7.0.1",
|