@happyvertical/smrt-commerce 0.37.10 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-07-03T17:43:18.399Z",
3
+ "generatedAt": "2026-07-03T20:40:50.151Z",
4
4
  "packageName": "@happyvertical/smrt-commerce",
5
- "packageVersion": "0.37.10",
5
+ "packageVersion": "0.38.0",
6
6
  "sourceManifestPath": "dist/manifest.json",
7
7
  "agentDocPath": "AGENTS.md",
8
8
  "sourceHashes": {
9
- "manifest": "4eed04ef4e93db5ffee48841319b4cf9322584d05ae3eca4d848c8a29113695c",
10
- "packageJson": "634a29de2c3dc956cd187c20fab100a861b1be6c3faa62bc025ac2f5f31aeba0",
11
- "agents": "f544ac9cece5c94aaead6013316709fcd044944b993110fc7218c0db7c998a63"
9
+ "manifest": "a6c94d59b0faa10a28ec49f415e9aad7ae49acc92a8503879d173398f4501d59",
10
+ "packageJson": "677acbaf245ab3679765c3348cfc228f01214c9b765c4107706042b30de6bd5e",
11
+ "agents": "4cb60c848cfe4e23ba75d5b0008ecf8ea83cd5de2d29d8aa5d8c329bda7523f7"
12
12
  },
13
13
  "exports": [
14
14
  ".",
@@ -301,6 +301,32 @@
301
301
  "tags": [],
302
302
  "risks": []
303
303
  },
304
+ {
305
+ "name": "PaymentInstrumentCollection",
306
+ "qualifiedName": "@happyvertical/smrt-commerce:PaymentInstrumentCollection",
307
+ "collection": "paymentinstruments",
308
+ "tableName": "payment_instrument_collections",
309
+ "packageName": "@happyvertical/smrt-commerce",
310
+ "extends": "SmrtCollection",
311
+ "fields": [],
312
+ "relationships": [],
313
+ "methods": [
314
+ "findActiveByCustomer",
315
+ "findByCustomer",
316
+ "findByProviderPaymentMethodId",
317
+ "findByTenant",
318
+ "findDefaultForCustomer",
319
+ "findGlobal",
320
+ "findWithGlobals",
321
+ "setDefaultForCustomer"
322
+ ],
323
+ "surfaces": [],
324
+ "relationshipFeatures": [
325
+ "uuidColumns"
326
+ ],
327
+ "tags": [],
328
+ "risks": []
329
+ },
304
330
  {
305
331
  "name": "PaymentIntentCollection",
306
332
  "qualifiedName": "@happyvertical/smrt-commerce:PaymentIntentCollection",
@@ -4131,6 +4157,187 @@
4131
4157
  "tags": [],
4132
4158
  "risks": []
4133
4159
  },
4160
+ {
4161
+ "name": "PaymentInstrument",
4162
+ "qualifiedName": "@happyvertical/smrt-commerce:PaymentInstrument",
4163
+ "collection": "paymentinstruments",
4164
+ "tableName": "payment_instruments",
4165
+ "packageName": "@happyvertical/smrt-commerce",
4166
+ "extends": "SmrtObject",
4167
+ "fields": [
4168
+ {
4169
+ "name": "tenantId",
4170
+ "type": "text",
4171
+ "required": false,
4172
+ "columnType": "UUID"
4173
+ },
4174
+ {
4175
+ "name": "customerId",
4176
+ "type": "foreignKey",
4177
+ "required": false,
4178
+ "related": "Customer",
4179
+ "columnType": "UUID"
4180
+ },
4181
+ {
4182
+ "name": "backendId",
4183
+ "type": "text",
4184
+ "required": false,
4185
+ "columnType": "TEXT"
4186
+ },
4187
+ {
4188
+ "name": "providerCustomerId",
4189
+ "type": "text",
4190
+ "required": false,
4191
+ "columnType": "TEXT"
4192
+ },
4193
+ {
4194
+ "name": "providerPaymentMethodId",
4195
+ "type": "text",
4196
+ "required": false,
4197
+ "columnType": "TEXT"
4198
+ },
4199
+ {
4200
+ "name": "type",
4201
+ "type": "text",
4202
+ "required": false,
4203
+ "columnType": "TEXT"
4204
+ },
4205
+ {
4206
+ "name": "brand",
4207
+ "type": "text",
4208
+ "required": false,
4209
+ "columnType": "TEXT"
4210
+ },
4211
+ {
4212
+ "name": "last4",
4213
+ "type": "text",
4214
+ "required": false,
4215
+ "columnType": "TEXT"
4216
+ },
4217
+ {
4218
+ "name": "expMonth",
4219
+ "type": "integer",
4220
+ "required": false,
4221
+ "columnType": "INTEGER"
4222
+ },
4223
+ {
4224
+ "name": "expYear",
4225
+ "type": "integer",
4226
+ "required": false,
4227
+ "columnType": "INTEGER"
4228
+ },
4229
+ {
4230
+ "name": "isDefault",
4231
+ "type": "boolean",
4232
+ "required": false,
4233
+ "columnType": "BOOLEAN"
4234
+ },
4235
+ {
4236
+ "name": "status",
4237
+ "type": "text",
4238
+ "required": false,
4239
+ "columnType": "TEXT"
4240
+ }
4241
+ ],
4242
+ "relationships": [
4243
+ {
4244
+ "name": "customerId",
4245
+ "type": "foreignKey",
4246
+ "required": false,
4247
+ "related": "Customer",
4248
+ "columnType": "UUID"
4249
+ }
4250
+ ],
4251
+ "methods": [
4252
+ "isActive",
4253
+ "isExpired",
4254
+ "isRemoved",
4255
+ "markExpired",
4256
+ "markRemoved"
4257
+ ],
4258
+ "surfaces": [
4259
+ {
4260
+ "kind": "api",
4261
+ "name": "paymentinstruments.list",
4262
+ "operation": "list",
4263
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
4264
+ "path": "/paymentinstruments",
4265
+ "method": "GET"
4266
+ },
4267
+ {
4268
+ "kind": "api",
4269
+ "name": "paymentinstruments.get",
4270
+ "operation": "get",
4271
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
4272
+ "path": "/paymentinstruments/[id]",
4273
+ "method": "GET"
4274
+ },
4275
+ {
4276
+ "kind": "api",
4277
+ "name": "paymentinstruments.create",
4278
+ "operation": "create",
4279
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
4280
+ "path": "/paymentinstruments",
4281
+ "method": "POST"
4282
+ },
4283
+ {
4284
+ "kind": "api",
4285
+ "name": "paymentinstruments.update",
4286
+ "operation": "update",
4287
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
4288
+ "path": "/paymentinstruments/[id]",
4289
+ "method": "PATCH"
4290
+ },
4291
+ {
4292
+ "kind": "cli",
4293
+ "name": "paymentinstrument_list",
4294
+ "operation": "list",
4295
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4296
+ },
4297
+ {
4298
+ "kind": "cli",
4299
+ "name": "paymentinstrument_get",
4300
+ "operation": "get",
4301
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4302
+ },
4303
+ {
4304
+ "kind": "cli",
4305
+ "name": "paymentinstrument_create",
4306
+ "operation": "create",
4307
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4308
+ },
4309
+ {
4310
+ "kind": "cli",
4311
+ "name": "paymentinstrument_update",
4312
+ "operation": "update",
4313
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4314
+ },
4315
+ {
4316
+ "kind": "cli",
4317
+ "name": "paymentinstrument_delete",
4318
+ "operation": "delete",
4319
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4320
+ },
4321
+ {
4322
+ "kind": "mcp",
4323
+ "name": "paymentinstrument_list",
4324
+ "operation": "list",
4325
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4326
+ },
4327
+ {
4328
+ "kind": "mcp",
4329
+ "name": "paymentinstrument_get",
4330
+ "operation": "get",
4331
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4332
+ }
4333
+ ],
4334
+ "relationshipFeatures": [
4335
+ "foreignKey",
4336
+ "uuidColumns"
4337
+ ],
4338
+ "tags": [],
4339
+ "risks": []
4340
+ },
4134
4341
  {
4135
4342
  "name": "PaymentIntent",
4136
4343
  "qualifiedName": "@happyvertical/smrt-commerce:PaymentIntent",
@@ -5364,6 +5571,80 @@
5364
5571
  "operation": "get",
5365
5572
  "objectName": "@happyvertical/smrt-commerce:PaymentAllocation"
5366
5573
  },
5574
+ {
5575
+ "kind": "api",
5576
+ "name": "paymentinstruments.list",
5577
+ "operation": "list",
5578
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
5579
+ "path": "/paymentinstruments",
5580
+ "method": "GET"
5581
+ },
5582
+ {
5583
+ "kind": "api",
5584
+ "name": "paymentinstruments.get",
5585
+ "operation": "get",
5586
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
5587
+ "path": "/paymentinstruments/[id]",
5588
+ "method": "GET"
5589
+ },
5590
+ {
5591
+ "kind": "api",
5592
+ "name": "paymentinstruments.create",
5593
+ "operation": "create",
5594
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
5595
+ "path": "/paymentinstruments",
5596
+ "method": "POST"
5597
+ },
5598
+ {
5599
+ "kind": "api",
5600
+ "name": "paymentinstruments.update",
5601
+ "operation": "update",
5602
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
5603
+ "path": "/paymentinstruments/[id]",
5604
+ "method": "PATCH"
5605
+ },
5606
+ {
5607
+ "kind": "cli",
5608
+ "name": "paymentinstrument_list",
5609
+ "operation": "list",
5610
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
5611
+ },
5612
+ {
5613
+ "kind": "cli",
5614
+ "name": "paymentinstrument_get",
5615
+ "operation": "get",
5616
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
5617
+ },
5618
+ {
5619
+ "kind": "cli",
5620
+ "name": "paymentinstrument_create",
5621
+ "operation": "create",
5622
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
5623
+ },
5624
+ {
5625
+ "kind": "cli",
5626
+ "name": "paymentinstrument_update",
5627
+ "operation": "update",
5628
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
5629
+ },
5630
+ {
5631
+ "kind": "cli",
5632
+ "name": "paymentinstrument_delete",
5633
+ "operation": "delete",
5634
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
5635
+ },
5636
+ {
5637
+ "kind": "mcp",
5638
+ "name": "paymentinstrument_list",
5639
+ "operation": "list",
5640
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
5641
+ },
5642
+ {
5643
+ "kind": "mcp",
5644
+ "name": "paymentinstrument_get",
5645
+ "operation": "get",
5646
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
5647
+ },
5367
5648
  {
5368
5649
  "kind": "api",
5369
5650
  "name": "paymentintents.list",
@@ -5555,12 +5836,12 @@
5555
5836
  ],
5556
5837
  "prompts": [],
5557
5838
  "relationshipsV2": {
5558
- "foreignKeyFields": 32,
5839
+ "foreignKeyFields": 33,
5559
5840
  "crossPackageRefFields": 7,
5560
5841
  "junctionCollections": 0,
5561
5842
  "hierarchicalObjects": 0,
5562
5843
  "polymorphicAssociations": 0,
5563
- "uuidColumns": 93
5844
+ "uuidColumns": 97
5564
5845
  },
5565
- "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). 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** (STI base → Estimate, Order, Lease, Agreement, PurchaseOrder, WholesaleOrder, ProductionOrder, Cart, LicenseSale): 9 contract types sharing one table. Carries `channelId` (open-ended string — `dtc-web`, `wholesale-b2b`, `pos-store-N`, etc.) so the same model serves DTC checkout, B2B portals, and POS.\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**: line items on invoices.\n- **Payment** / **PaymentAllocation**: tracks payments against invoices. Status controlled by `Invoice.updatePaymentStatus()`, not Payment model. 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- **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 via natural key `(tenant_id, offering_ref, licensee_email, idempotency_key)` and `PaymentIntentCollection.getOrCreateByIdempotencyKey()`.\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` (1¢ rounding tolerance) enforced on save. `PayoutCollection.createFromPayment()` is the typical entry point; it pulls native amount / currency from the source Payment.\n- **Fulfillment** / **FulfillmentLineItem**: shipment/delivery tracking.\n\n## Ledger Integration\n\n`@happyvertical/smrt-ledgers` is a regular dependency, loaded lazily via dynamic `import()` so the coupling stays runtime-only (no hard static import; the package graph stays a DAG — see #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## Cross-Package References\n\n- `customerId` → `@foreignKey('Customer')` (hard reference within package)\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\n## Gotchas\n\n- **Optional tenancy**: all models `@TenantScoped({ mode: 'optional' })` + nullable tenantId\n- **Currency in decimal fields**: price, taxAmount, totalAmount (not integer cents like affiliates)\n- **Invoice controls payment status**: not the Payment model — use `Invoice.updatePaymentStatus()`\n- **Tax rate is external**: no tax rate field on Invoice — rate must be calculated externally\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 `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"
5846
+ "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). 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** (STI base → Estimate, Order, Lease, Agreement, PurchaseOrder, WholesaleOrder, ProductionOrder, Cart, LicenseSale): 9 contract types sharing one table. Carries `channelId` (open-ended string — `dtc-web`, `wholesale-b2b`, `pos-store-N`, etc.) so the same model serves DTC checkout, B2B portals, and POS.\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**: line items on invoices.\n- **Payment** / **PaymentAllocation**: tracks payments against invoices. Status controlled by `Invoice.updatePaymentStatus()`, not Payment model. 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. Use `PaymentInstrumentCollection.setDefaultForCustomer()` to change the default so the single-default-per-customer invariant is enforced; generated create/update routes cannot write `isDefault` directly.\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 via natural key `(tenant_id, offering_ref, licensee_email, idempotency_key)` and `PaymentIntentCollection.getOrCreateByIdempotencyKey()`.\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` (1¢ rounding tolerance) enforced on save. `PayoutCollection.createFromPayment()` is the typical entry point; it pulls native amount / currency from the source Payment.\n- **Fulfillment** / **FulfillmentLineItem**: shipment/delivery tracking.\n\n## Ledger Integration\n\n`@happyvertical/smrt-ledgers` is a regular dependency, loaded lazily via dynamic `import()` so the coupling stays runtime-only (no hard static import; the package graph stays a DAG — see #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## Cross-Package References\n\n- `customerId` → `@foreignKey('Customer')` (hard reference within package)\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\n## Gotchas\n\n- **Optional tenancy**: all models `@TenantScoped({ mode: 'optional' })` + nullable tenantId\n- **Currency in decimal fields**: price, taxAmount, totalAmount (not integer cents like affiliates)\n- **Invoice controls payment status**: not the Payment model — use `Invoice.updatePaymentStatus()`\n- **Tax rate is external**: no tax rate field on Invoice — rate must be calculated externally\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 `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- **PaymentInstrument defaults**: `isDefault` is domain-managed, not API-writable. Call `setDefaultForCustomer(customerId, instrumentId)` so the target is validated and the customer's other instruments are cleared.\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"
5566
5847
  }
@@ -77,6 +77,16 @@ export declare enum PaymentStatus {
77
77
  REFUNDED = "refunded",
78
78
  CANCELLED = "cancelled"
79
79
  }
80
+ /**
81
+ * Lifecycle status for a saved {@link PaymentInstrument} (card on file).
82
+ * `active` while chargeable, `expired` once the card lapses, `removed` when the
83
+ * customer detaches it.
84
+ */
85
+ export declare enum PaymentInstrumentStatus {
86
+ ACTIVE = "active",
87
+ EXPIRED = "expired",
88
+ REMOVED = "removed"
89
+ }
80
90
  /**
81
91
  * Status machine for {@link Payout}.
82
92
  *
@@ -462,6 +472,23 @@ export interface PaymentOptions extends SmrtObjectOptions {
462
472
  usdAtQuote?: number;
463
473
  usdAtConfirmation?: number;
464
474
  }
475
+ /**
476
+ * Constructor options for {@link PaymentInstrument}.
477
+ */
478
+ export interface PaymentInstrumentOptions extends SmrtObjectOptions {
479
+ tenantId?: string | null;
480
+ customerId?: string;
481
+ backendId?: string;
482
+ providerCustomerId?: string;
483
+ providerPaymentMethodId?: string;
484
+ type?: string;
485
+ brand?: string;
486
+ last4?: string;
487
+ expMonth?: number;
488
+ expYear?: number;
489
+ isDefault?: boolean;
490
+ status?: PaymentInstrumentStatus;
491
+ }
465
492
  /**
466
493
  * Constructor options for {@link PaymentAllocation}.
467
494
  */
@@ -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,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,IAAI,SAAS;IACb;;;;;;;OAOG;IACH,YAAY,iBAAiB;CAC9B;AAED,oBAA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B,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.37.10",
3
+ "version": "0.38.0",
4
4
  "description": "Commerce models for the SMRT framework - contracts, fulfillments, payments",
5
5
  "type": "module",
6
6
  "smrtRawPrimitives": "strict",
@@ -49,11 +49,11 @@
49
49
  "access": "public"
50
50
  },
51
51
  "dependencies": {
52
- "@happyvertical/smrt-core": "0.37.10",
53
- "@happyvertical/smrt-ledgers": "0.37.10",
54
- "@happyvertical/smrt-ui": "0.37.10",
55
- "@happyvertical/smrt-types": "0.37.10",
56
- "@happyvertical/smrt-tenancy": "0.37.10"
52
+ "@happyvertical/smrt-core": "0.38.0",
53
+ "@happyvertical/smrt-ledgers": "0.38.0",
54
+ "@happyvertical/smrt-tenancy": "0.38.0",
55
+ "@happyvertical/smrt-types": "0.38.0",
56
+ "@happyvertical/smrt-ui": "0.38.0"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "svelte": "^5.56.4"
@@ -73,7 +73,7 @@
73
73
  "typescript": "^5.9.3",
74
74
  "vite": "^8.1.2",
75
75
  "vitest": "^4.1.9",
76
- "@happyvertical/smrt-vitest": "0.37.10"
76
+ "@happyvertical/smrt-vitest": "0.38.0"
77
77
  },
78
78
  "scripts": {
79
79
  "build": "vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json",
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-B0DwBRVz.js","names":["CustomerStatus","CustomerType","VendorStatus","ContractType","ContractStatus","FulfillmentType","FulfillmentStatus","PaymentMethod","PaymentStatus","PayoutStatus","PaymentIntentStatus","InvoiceStatus"],"sources":["../../src/types/index.ts"],"sourcesContent":["/**\n * Commerce package type definitions\n * @packageDocumentation\n */\n\nimport type { SmrtObjectOptions } from '@happyvertical/smrt-core';\n\n// ============================================================================\n// Customer/Vendor Types\n// ============================================================================\n\nexport enum CustomerStatus {\n ACTIVE = 'active',\n INACTIVE = 'inactive',\n SUSPENDED = 'suspended',\n}\n\n/**\n * Customer classification — drives channel access, pricing tier, and credit terms.\n *\n * - DTC: direct-to-consumer (end shopper). Pays via storefront checkout.\n * - WHOLESALE: B2B buyer with negotiated terms (NET-30, line sheets, etc.).\n * - RETAIL: in-store walk-in / point-of-sale customer.\n */\nexport enum CustomerType {\n DTC = 'dtc',\n WHOLESALE = 'wholesale',\n RETAIL = 'retail',\n}\n\nexport enum VendorStatus {\n ACTIVE = 'active',\n INACTIVE = 'inactive',\n SUSPENDED = 'suspended',\n}\n\n// ============================================================================\n// Contract Types\n// ============================================================================\n\nexport enum ContractType {\n ESTIMATE = 'estimate',\n ORDER = 'order',\n LEASE = 'lease',\n AGREEMENT = 'agreement',\n PURCHASE_ORDER = 'purchase_order',\n WHOLESALE_ORDER = 'wholesale_order',\n PRODUCTION_ORDER = 'production_order',\n CART = 'cart',\n /**\n * Industry-neutral licensing primitive. The `LicenseSale` STI subtype\n * carries an immutable rights snapshot, a licensee email, optional\n * legal-entity / jurisdiction fields, and a signed-PDF reference.\n * Any application that sells rights for a fee (stock media,\n * music licensing, code-asset marketplace, license keys, etc.)\n * uses this subtype.\n */\n LICENSE_SALE = 'license_sale',\n}\n\nexport enum ContractStatus {\n DRAFT = 'draft',\n SENT = 'sent',\n ACCEPTED = 'accepted',\n DECLINED = 'declined',\n COMPLETED = 'completed',\n CANCELLED = 'cancelled',\n}\n\n// ============================================================================\n// Fulfillment Types\n// ============================================================================\n\nexport enum FulfillmentType {\n SHIPMENT = 'shipment',\n DELIVERY = 'delivery',\n PICKUP = 'pickup',\n DIGITAL = 'digital',\n SERVICE = 'service',\n}\n\nexport enum FulfillmentStatus {\n PENDING = 'pending',\n PROCESSING = 'processing',\n SHIPPED = 'shipped',\n DELIVERED = 'delivered',\n CANCELLED = 'cancelled',\n}\n\n// ============================================================================\n// Payment Types\n// ============================================================================\n\nexport enum PaymentMethod {\n CASH = 'cash',\n CHECK = 'check',\n CREDIT_CARD = 'credit_card',\n BANK_TRANSFER = 'bank_transfer',\n CRYPTO = 'crypto',\n OTHER = 'other',\n}\n\nexport enum PaymentStatus {\n PENDING = 'pending',\n COMPLETED = 'completed',\n FAILED = 'failed',\n REFUNDED = 'refunded',\n CANCELLED = 'cancelled',\n}\n\n// ============================================================================\n// Payout Types\n// ============================================================================\n\n/**\n * Status machine for {@link Payout}.\n *\n * `pending → sent → confirmed → failed`. `failed` is terminal but the\n * model exposes a dedicated `resetFromFailed()` so an operator can\n * deliberately requeue a payout after fixing the underlying problem;\n * the reset moves the row back to `pending` and clears the failure\n * metadata.\n *\n * Skipping intermediate states is rejected — a `pending` payout cannot\n * jump straight to `confirmed`, and a `sent` payout cannot regress to\n * `pending` without going through `resetFromFailed()` first.\n */\nexport enum PayoutStatus {\n PENDING = 'pending',\n SENT = 'sent',\n CONFIRMED = 'confirmed',\n FAILED = 'failed',\n}\n\n// ============================================================================\n// PaymentIntent Types\n// ============================================================================\n\n/**\n * Status machine for {@link PaymentIntent}.\n *\n * `awaiting_payment → paid → (issued | retired)`, with `expired` and\n * `cancelled` as alternate terminal states reachable from\n * `awaiting_payment`.\n *\n * - `AWAITING_PAYMENT` — open quote, accepting any of the listed\n * payment options.\n * - `PAID` — one option was satisfied by an incoming payment. The\n * other options are implicitly retired; later inbound funds to a\n * retired option must be flagged for refund by the consumer.\n * - `ISSUED` — downstream rights / contract / fulfillment have been\n * created and linked. Terminal happy-path state.\n * - `RETIRED` — paid but the satisfaction was reversed (refund,\n * chargeback, etc.). Terminal.\n * - `EXPIRED` — the USD-price-lock window passed without payment.\n * Terminal.\n * - `CANCELLED` — the buyer or the system explicitly cancelled the\n * intent before it was paid. Terminal.\n */\nexport enum PaymentIntentStatus {\n AWAITING_PAYMENT = 'awaiting_payment',\n PAID = 'paid',\n ISSUED = 'issued',\n RETIRED = 'retired',\n EXPIRED = 'expired',\n CANCELLED = 'cancelled',\n}\n\n/**\n * One way for a {@link PaymentIntent} to be satisfied. The intent lists\n * an array of these; satisfying any one of them transitions the intent\n * to `PAID` and implicitly retires the rest.\n *\n * Industry-neutral: a marketplace that accepts USDC-on-Base and BTC\n * lists two options; a SaaS billing flow that accepts Stripe and\n * PayPal lists two; a kiosk that accepts only one rail lists one.\n */\nexport interface PaymentOption {\n /**\n * Stable id of the `PaymentBackend` adapter that fulfills this\n * option — must match a `backendId` the consumer's payment-routing\n * layer recognises. Examples: `base-usdc`, `solana-usdc`, `btc`,\n * `stripe`, `paypal`.\n */\n backendId: string;\n /**\n * Payout-rail-qualified currency code, e.g. `USDC-base`, `BTC`,\n * `USD-stripe`. The same convention used by\n * `Vendor.payoutAddresses` and `Payment.nativeCurrency`.\n */\n currency: string;\n /**\n * Optional chain identifier for blockchain-backed options (`base`,\n * `ethereum`, `solana`, ...). Pure-fiat options leave this empty.\n */\n chain?: string;\n /**\n * Destination address / account id the buyer should send funds to\n * for this option (EVM address, BTC address, Stripe payment-intent\n * id, etc.).\n */\n payTo: string;\n /**\n * Amount denominated in `currency`. Stored at decimal precision —\n * a USDC option might be `199.0`, a BTC option `0.00713`.\n */\n nativeAmount: number;\n /**\n * Optional on-chain memo / payment reference (Solana memo, BTC OP_RETURN\n * tag, Stripe metadata key). Some backends use this to disambiguate\n * which intent an inbound payment satisfies.\n */\n memo?: string;\n /**\n * Whether this option supports the x402 HTTP-402 payment-required\n * flow. Consumers that build agent-driven flows use this flag to\n * filter the offered options.\n */\n x402Capable?: boolean;\n /**\n * Optional per-option expiry — when a single rail's quote becomes\n * stale earlier than the intent-wide price-lock window (e.g. a\n * volatile-currency option that re-quotes more aggressively). ISO\n * 8601 string. Empty / missing means \"inherit the intent's\n * `priceLockExpiresAt`\".\n */\n expiresAt?: string;\n}\n\n// ============================================================================\n// Invoice Types\n// ============================================================================\n\nexport enum InvoiceStatus {\n DRAFT = 'draft',\n SENT = 'sent',\n VIEWED = 'viewed',\n PARTIAL = 'partial',\n PAID = 'paid',\n OVERDUE = 'overdue',\n CANCELLED = 'cancelled',\n WRITTEN_OFF = 'written_off',\n}\n\n// ============================================================================\n// Common Interfaces\n// ============================================================================\n\n/**\n * Address structure used for billing and shipping\n */\nexport interface Address {\n street1?: string;\n street2?: string;\n city?: string;\n state?: string;\n postalCode?: string;\n country?: string;\n}\n\n/**\n * Options for recording a payment with ledger integration\n */\nexport interface RecordPaymentOptions {\n /** The ledger to record the journal entry in */\n ledgerId: string;\n /** Account ID for receivables (credit side) */\n receivablesAccountId: string;\n /** Account ID for cash/bank (debit side) */\n cashAccountId: string;\n}\n\n/**\n * Options for recognizing revenue on an invoice\n */\nexport interface RecognizeRevenueOptions {\n /** Account ID for accounts receivable (debit side) */\n arAccountId: string;\n /** Account ID for revenue (credit side) */\n revenueAccountId: string;\n /** Account ID for tax payable (credit side, optional) */\n taxAccountId?: string;\n}\n\n// ============================================================================\n// Accounting-provider sync shapes\n// ============================================================================\n\n/**\n * A single line item in the format expected by `@happyvertical/accounting`\n * providers (QBO, Stripe, …). Mirrors the object built by\n * {@link InvoiceLineItem.toAccountingLineItem}. The SDK isn't a dependency of\n * this package, so the shape is declared locally rather than imported.\n */\nexport interface AccountingLineItemInput {\n description: string;\n sku?: string;\n quantity: number;\n unitPrice: number;\n discount?: number;\n taxRate?: number;\n amount: number;\n periodStart?: Date;\n periodEnd?: Date;\n}\n\n/**\n * An invoice in the format expected by `@happyvertical/accounting` providers.\n * Mirrors the object built by {@link Invoice.toAccountingInput}.\n */\nexport interface AccountingInvoiceInput {\n id: string;\n externalId?: string;\n invoiceNumber: string;\n customerId: string;\n customerExternalId?: string;\n issueDate: Date;\n dueDate: Date;\n lineItems: AccountingLineItemInput[];\n subtotal: number;\n taxAmount: number;\n totalAmount: number;\n currency: string;\n reference?: string;\n memo?: string;\n}\n\n// ============================================================================\n// Model constructor option interfaces\n//\n// Each model's `constructor(options)` accepts a partial bag of its own fields.\n// Declaring a dedicated `XxxOptions extends SmrtObjectOptions` interface keeps\n// the constructors strongly typed (no `any`) while still allowing the\n// framework's base options (db, ai, fs, _className, …) through.\n// ============================================================================\n\n/**\n * Constructor options for {@link Customer}.\n */\nexport interface CustomerOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n profileId?: string;\n creditLimit?: number;\n paymentTerms?: string;\n taxExempt?: boolean;\n taxId?: string;\n defaultShippingAddress?: Address;\n defaultBillingAddress?: Address;\n status?: CustomerStatus;\n customerType?: CustomerType | null;\n notes?: string;\n}\n\n/**\n * Constructor options for {@link Vendor}.\n */\nexport interface VendorOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n profileId?: string;\n leadTimeDays?: number;\n minimumOrderAmount?: number;\n paymentTerms?: string;\n currency?: string;\n defaultContactEmail?: string;\n defaultContactPhone?: string;\n status?: VendorStatus;\n notes?: string;\n payoutAddresses?: Record<string, string> | string | null;\n}\n\n/**\n * Constructor options for {@link Contract} and its STI subtypes.\n */\nexport interface ContractOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n contractType?: ContractType;\n status?: ContractStatus;\n customerId?: string;\n vendorId?: string;\n subtotal?: number;\n taxAmount?: number;\n totalAmount?: number;\n currency?: string;\n issueDate?: Date;\n dueDate?: Date | null;\n expiryDate?: Date | null;\n reference?: string;\n notes?: string;\n terms?: string;\n channelId?: string;\n}\n\n/**\n * Constructor options for {@link LicenseSale} (Contract STI subtype). Extends\n * {@link ContractOptions} with the licensing-specific meta fields.\n */\nexport interface LicenseSaleOptions extends ContractOptions {\n skuId?: string;\n paymentId?: string;\n licenseeEmail?: string;\n licenseeLegalEntity?: string;\n licenseeJurisdiction?: string;\n rightsMedium?: string;\n rightsDistributionScope?: string;\n rightsExclusivity?: string;\n rightsDuration?: string;\n rightsTerritory?: string;\n rightsSublicensing?: boolean;\n rightsDerivatives?: boolean;\n pdfUrl?: string;\n pdfHash?: string;\n onChainHashRegistryRef?: string;\n}\n\n/**\n * Constructor options for {@link ContractLineItem}.\n */\nexport interface ContractLineItemOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n contractId?: string;\n description?: string;\n quantity?: number;\n unitPrice?: number;\n discount?: number;\n taxRate?: number;\n amount?: number;\n productId?: string;\n sku?: string;\n startDate?: Date | null;\n endDate?: Date | null;\n billingPeriod?: string;\n sortOrder?: number;\n}\n\n/**\n * Constructor options for {@link Invoice}.\n */\nexport interface InvoiceOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n customerId?: string;\n contractId?: string;\n invoiceNumber?: string;\n reference?: string;\n issueDate?: Date;\n dueDate?: Date;\n paidDate?: Date | null;\n subtotal?: number;\n taxAmount?: number;\n totalAmount?: number;\n amountPaid?: number;\n currency?: string;\n status?: InvoiceStatus;\n arJournalId?: string;\n revenueJournalId?: string;\n externalId?: string;\n customerExternalId?: string;\n externalProvider?: string;\n syncedAt?: Date | null;\n sentAt?: Date | null;\n viewedAt?: Date | null;\n remindersSent?: number;\n lastReminderAt?: Date | null;\n notes?: string;\n customerNotes?: string;\n terms?: string;\n}\n\n/**\n * Constructor options for {@link InvoiceLineItem}.\n */\nexport interface InvoiceLineItemOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n invoiceId?: string;\n description?: string;\n sku?: string;\n quantity?: number;\n unitPrice?: number;\n discount?: number;\n taxRate?: number;\n amount?: number;\n sourceType?: string;\n sourceId?: string;\n periodStart?: Date | null;\n periodEnd?: Date | null;\n revenueAccountId?: string;\n sortOrder?: number;\n}\n\n/**\n * Constructor options for {@link Fulfillment}.\n */\nexport interface FulfillmentOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n contractId?: string;\n fulfillmentType?: FulfillmentType;\n status?: FulfillmentStatus;\n trackingNumber?: string;\n carrier?: string;\n shippingAddress?: Address;\n shippedAt?: Date | null;\n deliveredAt?: Date | null;\n estimatedDelivery?: Date | null;\n notes?: string;\n}\n\n/**\n * Constructor options for {@link FulfillmentLineItem}.\n */\nexport interface FulfillmentLineItemOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n fulfillmentId?: string;\n contractLineItemId?: string;\n quantityFulfilled?: number;\n notes?: string;\n}\n\n/**\n * Constructor options for {@link Payment}.\n */\nexport interface PaymentOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n contractId?: string;\n customerId?: string;\n amount?: number;\n currency?: string;\n method?: PaymentMethod;\n status?: PaymentStatus;\n transactionId?: string;\n reference?: string;\n journalId?: string;\n paidAt?: Date | null;\n notes?: string;\n externalId?: string;\n externalProvider?: string;\n syncedAt?: Date | null;\n backendId?: string;\n backendTxRef?: string;\n nativeAmount?: number;\n nativeCurrency?: string;\n usdAtQuote?: number;\n usdAtConfirmation?: number;\n}\n\n/**\n * Constructor options for {@link PaymentAllocation}.\n */\nexport interface PaymentAllocationOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n paymentId?: string;\n invoiceId?: string;\n amount?: number;\n allocatedAt?: Date;\n allocatedBy?: string;\n notes?: string;\n}\n\n/**\n * Constructor options for {@link PaymentIntent}.\n */\nexport interface PaymentIntentOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n skuId?: string;\n offeringRef?: string;\n licenseeEmail?: string;\n customerId?: string;\n paymentOptions?: PaymentOption[] | string;\n usdPriceLocked?: number;\n priceLockWindowMs?: number;\n priceLockExpiresAt?: Date | number | string | null;\n status?: PaymentIntentStatus;\n idempotencyKey?: string;\n paidOptionBackendId?: string;\n paymentId?: string;\n paidAt?: Date | number | string | null;\n issuedAt?: Date | number | string | null;\n expiredAt?: Date | number | string | null;\n cancelledAt?: Date | number | string | null;\n retiredAt?: Date | number | string | null;\n notes?: string;\n}\n\n/**\n * Constructor options for {@link Payout}.\n */\nexport interface PayoutOptions extends SmrtObjectOptions {\n tenantId?: string | null;\n paymentId?: string;\n vendorId?: string;\n grossAmount?: number;\n operatorFee?: number;\n supplierNet?: number;\n currency?: string;\n backendId?: string;\n backendTxRef?: string;\n status?: PayoutStatus;\n sentAt?: Date | number | string | null;\n confirmedAt?: Date | number | string | null;\n failedAt?: Date | number | string | null;\n failureReason?: string;\n notes?: string;\n}\n"],"mappings":";AAWO,IAAK,iBAAL,kBAAKA,oBAAL;CACLA,gBAAA,YAAS;CACTA,gBAAA,cAAW;CACXA,gBAAA,eAAY;CAHF,OAAAA;AAAA,EAAA,CAAA,kBAAA,CAAA,CAAA;AAaL,IAAK,eAAL,kBAAKC,kBAAL;CACLA,cAAA,SAAM;CACNA,cAAA,eAAY;CACZA,cAAA,YAAS;CAHC,OAAAA;AAAA,EAAA,CAAA,gBAAA,CAAA,CAAA;AAML,IAAK,eAAL,kBAAKC,kBAAL;CACLA,cAAA,YAAS;CACTA,cAAA,cAAW;CACXA,cAAA,eAAY;CAHF,OAAAA;AAAA,EAAA,CAAA,gBAAA,CAAA,CAAA;AAUL,IAAK,eAAL,kBAAKC,kBAAL;CACLA,cAAA,cAAW;CACXA,cAAA,WAAQ;CACRA,cAAA,WAAQ;CACRA,cAAA,eAAY;CACZA,cAAA,oBAAiB;CACjBA,cAAA,qBAAkB;CAClBA,cAAA,sBAAmB;CACnBA,cAAA,UAAO;CASPA,cAAA,kBAAe;CAjBL,OAAAA;AAAA,EAAA,CAAA,gBAAA,CAAA,CAAA;AAoBL,IAAK,iBAAL,kBAAKC,oBAAL;CACLA,gBAAA,WAAQ;CACR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