@happyvertical/smrt-commerce 0.40.17 → 0.40.18

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,13 +1,13 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-07-20T11:32:12.253Z",
3
+ "generatedAt": "2026-07-20T17:53:04.247Z",
4
4
  "packageName": "@happyvertical/smrt-commerce",
5
- "packageVersion": "0.40.17",
5
+ "packageVersion": "0.40.18",
6
6
  "sourceManifestPath": "dist/manifest.json",
7
7
  "agentDocPath": "AGENTS.md",
8
8
  "sourceHashes": {
9
- "manifest": "af9739c8f3ca582d80fadc9035a52ee8e802043a0c2eb1075cddee52a45386fd",
10
- "packageJson": "c3f868079d5903ca1ff5be81214f7a2406d4f94f9be2e1ce878b3774fcd38b7b",
9
+ "manifest": "08bf6d3857b6de3616aa41a07afc22e0657d0b01991fe27bf8f80f03647a32e0",
10
+ "packageJson": "673b19111b918e578499c7acfffa89a96aae8eb7f2a4a78343e8ec757b7026f4",
11
11
  "agents": "4cb60c848cfe4e23ba75d5b0008ecf8ea83cd5de2d29d8aa5d8c329bda7523f7"
12
12
  },
13
13
  "exports": [
@@ -46,369 +46,6 @@
46
46
  "tags": [],
47
47
  "risks": [],
48
48
  "objects": [
49
- {
50
- "name": "ContractCollection",
51
- "qualifiedName": "@happyvertical/smrt-commerce:ContractCollection",
52
- "collection": "contracts",
53
- "tableName": "contract_collections",
54
- "packageName": "@happyvertical/smrt-commerce",
55
- "extends": "SmrtCollection",
56
- "fields": [],
57
- "relationships": [],
58
- "methods": [
59
- "findAccepted",
60
- "findByCustomer",
61
- "findByDateRange",
62
- "findByStatus",
63
- "findByTenant",
64
- "findByType",
65
- "findByVendor",
66
- "findDrafts",
67
- "findExpired",
68
- "findGlobal",
69
- "findOverdue",
70
- "findWithGlobals"
71
- ],
72
- "surfaces": [],
73
- "relationshipFeatures": [
74
- "uuidColumns"
75
- ],
76
- "tags": [],
77
- "risks": []
78
- },
79
- {
80
- "name": "ContractLineItemCollection",
81
- "qualifiedName": "@happyvertical/smrt-commerce:ContractLineItemCollection",
82
- "collection": "contractlineitems",
83
- "tableName": "contract_line_item_collections",
84
- "packageName": "@happyvertical/smrt-commerce",
85
- "extends": "SmrtCollection",
86
- "fields": [],
87
- "relationships": [],
88
- "methods": [
89
- "findByContract",
90
- "findByTenant",
91
- "findGlobal",
92
- "findWithGlobals"
93
- ],
94
- "surfaces": [],
95
- "relationshipFeatures": [
96
- "uuidColumns"
97
- ],
98
- "tags": [],
99
- "risks": []
100
- },
101
- {
102
- "name": "CustomerCollection",
103
- "qualifiedName": "@happyvertical/smrt-commerce:CustomerCollection",
104
- "collection": "customers",
105
- "tableName": "customer_collections",
106
- "packageName": "@happyvertical/smrt-commerce",
107
- "extends": "SmrtCollection",
108
- "fields": [],
109
- "relationships": [],
110
- "methods": [
111
- "findActive",
112
- "findByProfile",
113
- "findByStatus",
114
- "findByTenant",
115
- "findGlobal",
116
- "findWithGlobals",
117
- "getOrCreateForProfile"
118
- ],
119
- "surfaces": [],
120
- "relationshipFeatures": [
121
- "uuidColumns"
122
- ],
123
- "tags": [],
124
- "risks": []
125
- },
126
- {
127
- "name": "FulfillmentCollection",
128
- "qualifiedName": "@happyvertical/smrt-commerce:FulfillmentCollection",
129
- "collection": "fulfillments",
130
- "tableName": "fulfillment_collections",
131
- "packageName": "@happyvertical/smrt-commerce",
132
- "extends": "SmrtCollection",
133
- "fields": [],
134
- "relationships": [],
135
- "methods": [
136
- "findByContract",
137
- "findByStatus",
138
- "findByTenant",
139
- "findByTracking",
140
- "findByType",
141
- "findGlobal",
142
- "findInTransit",
143
- "findPending",
144
- "findShippedInRange",
145
- "findWithGlobals"
146
- ],
147
- "surfaces": [],
148
- "relationshipFeatures": [
149
- "uuidColumns"
150
- ],
151
- "tags": [],
152
- "risks": []
153
- },
154
- {
155
- "name": "FulfillmentLineItemCollection",
156
- "qualifiedName": "@happyvertical/smrt-commerce:FulfillmentLineItemCollection",
157
- "collection": "fulfillmentlineitems",
158
- "tableName": "fulfillment_line_item_collections",
159
- "packageName": "@happyvertical/smrt-commerce",
160
- "extends": "SmrtCollection",
161
- "fields": [],
162
- "relationships": [],
163
- "methods": [
164
- "findByContractLineItem",
165
- "findByFulfillment",
166
- "findByTenant",
167
- "findGlobal",
168
- "findWithGlobals",
169
- "getTotalFulfilledForContractLine"
170
- ],
171
- "surfaces": [],
172
- "relationshipFeatures": [
173
- "uuidColumns"
174
- ],
175
- "tags": [],
176
- "risks": []
177
- },
178
- {
179
- "name": "InvoiceCollection",
180
- "qualifiedName": "@happyvertical/smrt-commerce:InvoiceCollection",
181
- "collection": "invoices",
182
- "tableName": "invoice_collections",
183
- "packageName": "@happyvertical/smrt-commerce",
184
- "extends": "SmrtCollection",
185
- "fields": [],
186
- "relationships": [],
187
- "methods": [
188
- "countForYear",
189
- "findByContract",
190
- "findByCustomer",
191
- "findByDateRange",
192
- "findByExternalId",
193
- "findByNumber",
194
- "findByStatus",
195
- "findByTenant",
196
- "findDrafts",
197
- "findGlobal",
198
- "findNeedingSync",
199
- "findOverdue",
200
- "findPaid",
201
- "findPartial",
202
- "findSent",
203
- "findWithGlobals",
204
- "generateInvoiceNumber",
205
- "getTotalOutstandingForCustomer"
206
- ],
207
- "surfaces": [],
208
- "relationshipFeatures": [
209
- "uuidColumns"
210
- ],
211
- "tags": [],
212
- "risks": []
213
- },
214
- {
215
- "name": "InvoiceLineItemCollection",
216
- "qualifiedName": "@happyvertical/smrt-commerce:InvoiceLineItemCollection",
217
- "collection": "invoicelineitems",
218
- "tableName": "invoice_line_item_collections",
219
- "packageName": "@happyvertical/smrt-commerce",
220
- "extends": "SmrtCollection",
221
- "fields": [],
222
- "relationships": [],
223
- "methods": [
224
- "findByInvoice",
225
- "findBySource",
226
- "findBySourceType",
227
- "findByTenant",
228
- "findGlobal",
229
- "findWithGlobals",
230
- "getNextSortOrder",
231
- "getSubtotalForInvoice",
232
- "getTaxForInvoice",
233
- "getTotalForInvoice",
234
- "recalculateAmounts",
235
- "toAccountingLineItems"
236
- ],
237
- "surfaces": [],
238
- "relationshipFeatures": [
239
- "uuidColumns"
240
- ],
241
- "tags": [],
242
- "risks": []
243
- },
244
- {
245
- "name": "PaymentAllocationCollection",
246
- "qualifiedName": "@happyvertical/smrt-commerce:PaymentAllocationCollection",
247
- "collection": "paymentallocations",
248
- "tableName": "payment_allocation_collections",
249
- "packageName": "@happyvertical/smrt-commerce",
250
- "extends": "SmrtCollection",
251
- "fields": [],
252
- "relationships": [],
253
- "methods": [
254
- "findByAllocator",
255
- "findByDateRange",
256
- "findByInvoice",
257
- "findByPayment",
258
- "findByPaymentAndInvoice",
259
- "findByTenant",
260
- "findGlobal",
261
- "findWithGlobals",
262
- "getTotalAllocatedFromPayment",
263
- "getTotalAllocatedToInvoice",
264
- "getUnallocatedFromPayment"
265
- ],
266
- "surfaces": [],
267
- "relationshipFeatures": [
268
- "uuidColumns"
269
- ],
270
- "tags": [],
271
- "risks": []
272
- },
273
- {
274
- "name": "PaymentCollection",
275
- "qualifiedName": "@happyvertical/smrt-commerce:PaymentCollection",
276
- "collection": "payments",
277
- "tableName": "payment_collections",
278
- "packageName": "@happyvertical/smrt-commerce",
279
- "extends": "SmrtCollection",
280
- "fields": [],
281
- "relationships": [],
282
- "methods": [
283
- "findByContract",
284
- "findByCustomer",
285
- "findByDateRange",
286
- "findByJournal",
287
- "findByMethod",
288
- "findByStatus",
289
- "findByTenant",
290
- "findByTransactionId",
291
- "findCompleted",
292
- "findGlobal",
293
- "findPending",
294
- "findWithGlobals",
295
- "getTotalForContract"
296
- ],
297
- "surfaces": [],
298
- "relationshipFeatures": [
299
- "uuidColumns"
300
- ],
301
- "tags": [],
302
- "risks": []
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
- },
330
- {
331
- "name": "PaymentIntentCollection",
332
- "qualifiedName": "@happyvertical/smrt-commerce:PaymentIntentCollection",
333
- "collection": "paymentintents",
334
- "tableName": "payment_intent_collections",
335
- "packageName": "@happyvertical/smrt-commerce",
336
- "extends": "SmrtCollection",
337
- "fields": [],
338
- "relationships": [],
339
- "methods": [
340
- "findByIdempotencyKey",
341
- "findByLicenseeEmail",
342
- "findByOfferingRef",
343
- "findByStatus",
344
- "findByTenant",
345
- "findGlobal",
346
- "findOpen",
347
- "findStale",
348
- "findWithGlobals",
349
- "getOrCreateByIdempotencyKey"
350
- ],
351
- "surfaces": [],
352
- "relationshipFeatures": [
353
- "uuidColumns"
354
- ],
355
- "tags": [],
356
- "risks": []
357
- },
358
- {
359
- "name": "PayoutCollection",
360
- "qualifiedName": "@happyvertical/smrt-commerce:PayoutCollection",
361
- "collection": "payouts",
362
- "tableName": "payout_collections",
363
- "packageName": "@happyvertical/smrt-commerce",
364
- "extends": "SmrtCollection",
365
- "fields": [],
366
- "relationships": [],
367
- "methods": [
368
- "createFromPayment",
369
- "findByBackendTxRef",
370
- "findByPayment",
371
- "findByStatus",
372
- "findByTenant",
373
- "findByVendor",
374
- "findFailed",
375
- "findGlobal",
376
- "findPending",
377
- "findWithGlobals",
378
- "getConfirmedTotalForVendor"
379
- ],
380
- "surfaces": [],
381
- "relationshipFeatures": [
382
- "uuidColumns"
383
- ],
384
- "tags": [],
385
- "risks": []
386
- },
387
- {
388
- "name": "VendorCollection",
389
- "qualifiedName": "@happyvertical/smrt-commerce:VendorCollection",
390
- "collection": "vendors",
391
- "tableName": "vendor_collections",
392
- "packageName": "@happyvertical/smrt-commerce",
393
- "extends": "SmrtCollection",
394
- "fields": [],
395
- "relationships": [],
396
- "methods": [
397
- "findActive",
398
- "findByProfile",
399
- "findByStatus",
400
- "findByTenant",
401
- "findGlobal",
402
- "findWithGlobals",
403
- "getOrCreateForProfile"
404
- ],
405
- "surfaces": [],
406
- "relationshipFeatures": [
407
- "uuidColumns"
408
- ],
409
- "tags": [],
410
- "risks": []
411
- },
412
49
  {
413
50
  "name": "Contract",
414
51
  "qualifiedName": "@happyvertical/smrt-commerce:Contract",
@@ -3657,118 +3294,375 @@
3657
3294
  "columnType": "UUID"
3658
3295
  },
3659
3296
  {
3660
- "name": "sortOrder",
3661
- "type": "integer",
3297
+ "name": "sortOrder",
3298
+ "type": "integer",
3299
+ "required": false,
3300
+ "columnType": "INTEGER"
3301
+ }
3302
+ ],
3303
+ "relationships": [
3304
+ {
3305
+ "name": "invoiceId",
3306
+ "type": "foreignKey",
3307
+ "required": false,
3308
+ "related": "Invoice",
3309
+ "columnType": "UUID"
3310
+ },
3311
+ {
3312
+ "name": "revenueAccountId",
3313
+ "type": "crossPackageRef",
3314
+ "required": false,
3315
+ "related": "@happyvertical/smrt-ledgers:Account",
3316
+ "columnType": "UUID"
3317
+ }
3318
+ ],
3319
+ "methods": [
3320
+ "calculateAmount",
3321
+ "getSubtotal",
3322
+ "getTaxAmount",
3323
+ "hasPeriod",
3324
+ "hasSource",
3325
+ "toAccountingLineItem"
3326
+ ],
3327
+ "surfaces": [
3328
+ {
3329
+ "kind": "api",
3330
+ "name": "invoicelineitems.list",
3331
+ "operation": "list",
3332
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem",
3333
+ "path": "/invoicelineitems",
3334
+ "method": "GET"
3335
+ },
3336
+ {
3337
+ "kind": "api",
3338
+ "name": "invoicelineitems.get",
3339
+ "operation": "get",
3340
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem",
3341
+ "path": "/invoicelineitems/[id]",
3342
+ "method": "GET"
3343
+ },
3344
+ {
3345
+ "kind": "api",
3346
+ "name": "invoicelineitems.create",
3347
+ "operation": "create",
3348
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem",
3349
+ "path": "/invoicelineitems",
3350
+ "method": "POST"
3351
+ },
3352
+ {
3353
+ "kind": "api",
3354
+ "name": "invoicelineitems.update",
3355
+ "operation": "update",
3356
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem",
3357
+ "path": "/invoicelineitems/[id]",
3358
+ "method": "PATCH"
3359
+ },
3360
+ {
3361
+ "kind": "api",
3362
+ "name": "invoicelineitems.delete",
3363
+ "operation": "delete",
3364
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem",
3365
+ "path": "/invoicelineitems/[id]",
3366
+ "method": "DELETE"
3367
+ },
3368
+ {
3369
+ "kind": "cli",
3370
+ "name": "invoicelineitem_list",
3371
+ "operation": "list",
3372
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3373
+ },
3374
+ {
3375
+ "kind": "cli",
3376
+ "name": "invoicelineitem_get",
3377
+ "operation": "get",
3378
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3379
+ },
3380
+ {
3381
+ "kind": "cli",
3382
+ "name": "invoicelineitem_create",
3383
+ "operation": "create",
3384
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3385
+ },
3386
+ {
3387
+ "kind": "cli",
3388
+ "name": "invoicelineitem_update",
3389
+ "operation": "update",
3390
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3391
+ },
3392
+ {
3393
+ "kind": "cli",
3394
+ "name": "invoicelineitem_delete",
3395
+ "operation": "delete",
3396
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3397
+ },
3398
+ {
3399
+ "kind": "mcp",
3400
+ "name": "invoicelineitem_list",
3401
+ "operation": "list",
3402
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3403
+ },
3404
+ {
3405
+ "kind": "mcp",
3406
+ "name": "invoicelineitem_get",
3407
+ "operation": "get",
3408
+ "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3409
+ }
3410
+ ],
3411
+ "relationshipFeatures": [
3412
+ "crossPackageRef",
3413
+ "foreignKey",
3414
+ "uuidColumns"
3415
+ ],
3416
+ "tags": [],
3417
+ "risks": []
3418
+ },
3419
+ {
3420
+ "name": "Payment",
3421
+ "qualifiedName": "@happyvertical/smrt-commerce:Payment",
3422
+ "collection": "payments",
3423
+ "tableName": "payments",
3424
+ "packageName": "@happyvertical/smrt-commerce",
3425
+ "extends": "SmrtObject",
3426
+ "fields": [
3427
+ {
3428
+ "name": "tenantId",
3429
+ "type": "text",
3430
+ "required": false,
3431
+ "columnType": "UUID"
3432
+ },
3433
+ {
3434
+ "name": "contractId",
3435
+ "type": "foreignKey",
3436
+ "required": false,
3437
+ "related": "Contract",
3438
+ "columnType": "UUID"
3439
+ },
3440
+ {
3441
+ "name": "customerId",
3442
+ "type": "foreignKey",
3443
+ "required": false,
3444
+ "related": "Customer",
3445
+ "columnType": "UUID"
3446
+ },
3447
+ {
3448
+ "name": "amount",
3449
+ "type": "decimal",
3450
+ "required": false,
3451
+ "columnType": "REAL"
3452
+ },
3453
+ {
3454
+ "name": "currency",
3455
+ "type": "text",
3456
+ "required": false,
3457
+ "columnType": "TEXT"
3458
+ },
3459
+ {
3460
+ "name": "method",
3461
+ "type": "text",
3462
+ "required": false,
3463
+ "columnType": "TEXT"
3464
+ },
3465
+ {
3466
+ "name": "status",
3467
+ "type": "text",
3468
+ "required": false,
3469
+ "columnType": "TEXT"
3470
+ },
3471
+ {
3472
+ "name": "transactionId",
3473
+ "type": "text",
3474
+ "required": false,
3475
+ "columnType": "TEXT"
3476
+ },
3477
+ {
3478
+ "name": "reference",
3479
+ "type": "text",
3480
+ "required": false,
3481
+ "columnType": "TEXT"
3482
+ },
3483
+ {
3484
+ "name": "journalId",
3485
+ "type": "crossPackageRef",
3486
+ "required": false,
3487
+ "related": "@happyvertical/smrt-ledgers:Journal",
3488
+ "columnType": "UUID"
3489
+ },
3490
+ {
3491
+ "name": "paidAt",
3492
+ "type": "datetime",
3493
+ "required": false,
3494
+ "columnType": "TIMESTAMP"
3495
+ },
3496
+ {
3497
+ "name": "notes",
3498
+ "type": "text",
3499
+ "required": false,
3500
+ "columnType": "TEXT"
3501
+ },
3502
+ {
3503
+ "name": "externalId",
3504
+ "type": "text",
3505
+ "required": false,
3506
+ "columnType": "TEXT"
3507
+ },
3508
+ {
3509
+ "name": "externalProvider",
3510
+ "type": "text",
3511
+ "required": false,
3512
+ "columnType": "TEXT"
3513
+ },
3514
+ {
3515
+ "name": "syncedAt",
3516
+ "type": "datetime",
3517
+ "required": false,
3518
+ "columnType": "TIMESTAMP"
3519
+ },
3520
+ {
3521
+ "name": "backendId",
3522
+ "type": "text",
3523
+ "required": false,
3524
+ "columnType": "TEXT"
3525
+ },
3526
+ {
3527
+ "name": "backendTxRef",
3528
+ "type": "text",
3529
+ "required": false,
3530
+ "columnType": "TEXT"
3531
+ },
3532
+ {
3533
+ "name": "nativeAmount",
3534
+ "type": "decimal",
3535
+ "required": false,
3536
+ "columnType": "REAL"
3537
+ },
3538
+ {
3539
+ "name": "nativeCurrency",
3540
+ "type": "text",
3541
+ "required": false,
3542
+ "columnType": "TEXT"
3543
+ },
3544
+ {
3545
+ "name": "usdAtQuote",
3546
+ "type": "decimal",
3547
+ "required": false,
3548
+ "columnType": "REAL"
3549
+ },
3550
+ {
3551
+ "name": "usdAtConfirmation",
3552
+ "type": "decimal",
3662
3553
  "required": false,
3663
- "columnType": "INTEGER"
3554
+ "columnType": "REAL"
3664
3555
  }
3665
3556
  ],
3666
3557
  "relationships": [
3667
3558
  {
3668
- "name": "invoiceId",
3559
+ "name": "contractId",
3669
3560
  "type": "foreignKey",
3670
3561
  "required": false,
3671
- "related": "Invoice",
3562
+ "related": "Contract",
3672
3563
  "columnType": "UUID"
3673
3564
  },
3674
3565
  {
3675
- "name": "revenueAccountId",
3566
+ "name": "customerId",
3567
+ "type": "foreignKey",
3568
+ "required": false,
3569
+ "related": "Customer",
3570
+ "columnType": "UUID"
3571
+ },
3572
+ {
3573
+ "name": "journalId",
3676
3574
  "type": "crossPackageRef",
3677
3575
  "required": false,
3678
- "related": "@happyvertical/smrt-ledgers:Account",
3576
+ "related": "@happyvertical/smrt-ledgers:Journal",
3679
3577
  "columnType": "UUID"
3680
3578
  }
3681
3579
  ],
3682
3580
  "methods": [
3683
- "calculateAmount",
3684
- "getSubtotal",
3685
- "getTaxAmount",
3686
- "hasPeriod",
3687
- "hasSource",
3688
- "toAccountingLineItem"
3581
+ "cancel",
3582
+ "getJournal",
3583
+ "initialize",
3584
+ "isCompleted",
3585
+ "isPending",
3586
+ "isRefunded",
3587
+ "markFailed",
3588
+ "recordPayment",
3589
+ "save",
3590
+ "usdDrift"
3689
3591
  ],
3690
3592
  "surfaces": [
3691
3593
  {
3692
3594
  "kind": "api",
3693
- "name": "invoicelineitems.list",
3595
+ "name": "payments.list",
3694
3596
  "operation": "list",
3695
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem",
3696
- "path": "/invoicelineitems",
3597
+ "objectName": "@happyvertical/smrt-commerce:Payment",
3598
+ "path": "/payments",
3697
3599
  "method": "GET"
3698
3600
  },
3699
3601
  {
3700
3602
  "kind": "api",
3701
- "name": "invoicelineitems.get",
3603
+ "name": "payments.get",
3702
3604
  "operation": "get",
3703
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem",
3704
- "path": "/invoicelineitems/[id]",
3605
+ "objectName": "@happyvertical/smrt-commerce:Payment",
3606
+ "path": "/payments/[id]",
3705
3607
  "method": "GET"
3706
3608
  },
3707
3609
  {
3708
3610
  "kind": "api",
3709
- "name": "invoicelineitems.create",
3611
+ "name": "payments.create",
3710
3612
  "operation": "create",
3711
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem",
3712
- "path": "/invoicelineitems",
3613
+ "objectName": "@happyvertical/smrt-commerce:Payment",
3614
+ "path": "/payments",
3713
3615
  "method": "POST"
3714
3616
  },
3715
3617
  {
3716
3618
  "kind": "api",
3717
- "name": "invoicelineitems.update",
3619
+ "name": "payments.update",
3718
3620
  "operation": "update",
3719
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem",
3720
- "path": "/invoicelineitems/[id]",
3621
+ "objectName": "@happyvertical/smrt-commerce:Payment",
3622
+ "path": "/payments/[id]",
3721
3623
  "method": "PATCH"
3722
3624
  },
3723
- {
3724
- "kind": "api",
3725
- "name": "invoicelineitems.delete",
3726
- "operation": "delete",
3727
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem",
3728
- "path": "/invoicelineitems/[id]",
3729
- "method": "DELETE"
3730
- },
3731
3625
  {
3732
3626
  "kind": "cli",
3733
- "name": "invoicelineitem_list",
3627
+ "name": "payment_list",
3734
3628
  "operation": "list",
3735
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3629
+ "objectName": "@happyvertical/smrt-commerce:Payment"
3736
3630
  },
3737
3631
  {
3738
3632
  "kind": "cli",
3739
- "name": "invoicelineitem_get",
3633
+ "name": "payment_get",
3740
3634
  "operation": "get",
3741
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3635
+ "objectName": "@happyvertical/smrt-commerce:Payment"
3742
3636
  },
3743
3637
  {
3744
3638
  "kind": "cli",
3745
- "name": "invoicelineitem_create",
3639
+ "name": "payment_create",
3746
3640
  "operation": "create",
3747
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3641
+ "objectName": "@happyvertical/smrt-commerce:Payment"
3748
3642
  },
3749
3643
  {
3750
3644
  "kind": "cli",
3751
- "name": "invoicelineitem_update",
3645
+ "name": "payment_update",
3752
3646
  "operation": "update",
3753
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3647
+ "objectName": "@happyvertical/smrt-commerce:Payment"
3754
3648
  },
3755
3649
  {
3756
3650
  "kind": "cli",
3757
- "name": "invoicelineitem_delete",
3651
+ "name": "payment_delete",
3758
3652
  "operation": "delete",
3759
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3653
+ "objectName": "@happyvertical/smrt-commerce:Payment"
3760
3654
  },
3761
3655
  {
3762
3656
  "kind": "mcp",
3763
- "name": "invoicelineitem_list",
3657
+ "name": "payment_list",
3764
3658
  "operation": "list",
3765
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3659
+ "objectName": "@happyvertical/smrt-commerce:Payment"
3766
3660
  },
3767
3661
  {
3768
3662
  "kind": "mcp",
3769
- "name": "invoicelineitem_get",
3663
+ "name": "payment_get",
3770
3664
  "operation": "get",
3771
- "objectName": "@happyvertical/smrt-commerce:InvoiceLineItem"
3665
+ "objectName": "@happyvertical/smrt-commerce:Payment"
3772
3666
  }
3773
3667
  ],
3774
3668
  "relationshipFeatures": [
@@ -3780,10 +3674,10 @@
3780
3674
  "risks": []
3781
3675
  },
3782
3676
  {
3783
- "name": "Payment",
3784
- "qualifiedName": "@happyvertical/smrt-commerce:Payment",
3785
- "collection": "payments",
3786
- "tableName": "payments",
3677
+ "name": "PaymentAllocation",
3678
+ "qualifiedName": "@happyvertical/smrt-commerce:PaymentAllocation",
3679
+ "collection": "paymentallocations",
3680
+ "tableName": "payment_allocations",
3787
3681
  "packageName": "@happyvertical/smrt-commerce",
3788
3682
  "extends": "SmrtObject",
3789
3683
  "fields": [
@@ -3794,242 +3688,287 @@
3794
3688
  "columnType": "UUID"
3795
3689
  },
3796
3690
  {
3797
- "name": "contractId",
3691
+ "name": "paymentId",
3798
3692
  "type": "foreignKey",
3799
3693
  "required": false,
3800
- "related": "Contract",
3694
+ "related": "Payment",
3801
3695
  "columnType": "UUID"
3802
3696
  },
3803
3697
  {
3804
- "name": "customerId",
3698
+ "name": "invoiceId",
3805
3699
  "type": "foreignKey",
3806
3700
  "required": false,
3807
- "related": "Customer",
3701
+ "related": "Invoice",
3808
3702
  "columnType": "UUID"
3809
3703
  },
3810
3704
  {
3811
3705
  "name": "amount",
3812
- "type": "decimal",
3706
+ "type": "integer",
3813
3707
  "required": false,
3814
- "columnType": "REAL"
3708
+ "columnType": "INTEGER"
3815
3709
  },
3816
3710
  {
3817
- "name": "currency",
3818
- "type": "text",
3711
+ "name": "allocatedAt",
3712
+ "type": "datetime",
3819
3713
  "required": false,
3820
- "columnType": "TEXT"
3714
+ "columnType": "TIMESTAMP"
3821
3715
  },
3822
3716
  {
3823
- "name": "method",
3717
+ "name": "allocatedBy",
3824
3718
  "type": "text",
3825
3719
  "required": false,
3826
3720
  "columnType": "TEXT"
3827
3721
  },
3828
3722
  {
3829
- "name": "status",
3723
+ "name": "notes",
3830
3724
  "type": "text",
3831
3725
  "required": false,
3832
3726
  "columnType": "TEXT"
3833
- },
3727
+ }
3728
+ ],
3729
+ "relationships": [
3834
3730
  {
3835
- "name": "transactionId",
3836
- "type": "text",
3731
+ "name": "paymentId",
3732
+ "type": "foreignKey",
3837
3733
  "required": false,
3838
- "columnType": "TEXT"
3734
+ "related": "Payment",
3735
+ "columnType": "UUID"
3839
3736
  },
3840
3737
  {
3841
- "name": "reference",
3842
- "type": "text",
3738
+ "name": "invoiceId",
3739
+ "type": "foreignKey",
3843
3740
  "required": false,
3844
- "columnType": "TEXT"
3741
+ "related": "Invoice",
3742
+ "columnType": "UUID"
3743
+ }
3744
+ ],
3745
+ "methods": [
3746
+ "save"
3747
+ ],
3748
+ "surfaces": [
3749
+ {
3750
+ "kind": "api",
3751
+ "name": "paymentallocations.list",
3752
+ "operation": "list",
3753
+ "objectName": "@happyvertical/smrt-commerce:PaymentAllocation",
3754
+ "path": "/paymentallocations",
3755
+ "method": "GET"
3845
3756
  },
3846
3757
  {
3847
- "name": "journalId",
3848
- "type": "crossPackageRef",
3758
+ "kind": "api",
3759
+ "name": "paymentallocations.get",
3760
+ "operation": "get",
3761
+ "objectName": "@happyvertical/smrt-commerce:PaymentAllocation",
3762
+ "path": "/paymentallocations/[id]",
3763
+ "method": "GET"
3764
+ },
3765
+ {
3766
+ "kind": "cli",
3767
+ "name": "paymentallocation_list",
3768
+ "operation": "list",
3769
+ "objectName": "@happyvertical/smrt-commerce:PaymentAllocation"
3770
+ },
3771
+ {
3772
+ "kind": "cli",
3773
+ "name": "paymentallocation_get",
3774
+ "operation": "get",
3775
+ "objectName": "@happyvertical/smrt-commerce:PaymentAllocation"
3776
+ },
3777
+ {
3778
+ "kind": "mcp",
3779
+ "name": "paymentallocation_list",
3780
+ "operation": "list",
3781
+ "objectName": "@happyvertical/smrt-commerce:PaymentAllocation"
3782
+ },
3783
+ {
3784
+ "kind": "mcp",
3785
+ "name": "paymentallocation_get",
3786
+ "operation": "get",
3787
+ "objectName": "@happyvertical/smrt-commerce:PaymentAllocation"
3788
+ }
3789
+ ],
3790
+ "relationshipFeatures": [
3791
+ "foreignKey",
3792
+ "uuidColumns"
3793
+ ],
3794
+ "tags": [],
3795
+ "risks": []
3796
+ },
3797
+ {
3798
+ "name": "PaymentInstrument",
3799
+ "qualifiedName": "@happyvertical/smrt-commerce:PaymentInstrument",
3800
+ "collection": "paymentinstruments",
3801
+ "tableName": "payment_instruments",
3802
+ "packageName": "@happyvertical/smrt-commerce",
3803
+ "extends": "SmrtObject",
3804
+ "fields": [
3805
+ {
3806
+ "name": "tenantId",
3807
+ "type": "text",
3849
3808
  "required": false,
3850
- "related": "@happyvertical/smrt-ledgers:Journal",
3851
3809
  "columnType": "UUID"
3852
3810
  },
3853
3811
  {
3854
- "name": "paidAt",
3855
- "type": "datetime",
3812
+ "name": "customerId",
3813
+ "type": "foreignKey",
3856
3814
  "required": false,
3857
- "columnType": "TIMESTAMP"
3815
+ "related": "Customer",
3816
+ "columnType": "UUID"
3858
3817
  },
3859
3818
  {
3860
- "name": "notes",
3819
+ "name": "backendId",
3861
3820
  "type": "text",
3862
3821
  "required": false,
3863
3822
  "columnType": "TEXT"
3864
3823
  },
3865
3824
  {
3866
- "name": "externalId",
3825
+ "name": "providerCustomerId",
3867
3826
  "type": "text",
3868
3827
  "required": false,
3869
3828
  "columnType": "TEXT"
3870
3829
  },
3871
3830
  {
3872
- "name": "externalProvider",
3831
+ "name": "providerPaymentMethodId",
3873
3832
  "type": "text",
3874
3833
  "required": false,
3875
3834
  "columnType": "TEXT"
3876
3835
  },
3877
3836
  {
3878
- "name": "syncedAt",
3879
- "type": "datetime",
3837
+ "name": "type",
3838
+ "type": "text",
3880
3839
  "required": false,
3881
- "columnType": "TIMESTAMP"
3840
+ "columnType": "TEXT"
3882
3841
  },
3883
3842
  {
3884
- "name": "backendId",
3843
+ "name": "brand",
3885
3844
  "type": "text",
3886
3845
  "required": false,
3887
3846
  "columnType": "TEXT"
3888
3847
  },
3889
3848
  {
3890
- "name": "backendTxRef",
3849
+ "name": "last4",
3891
3850
  "type": "text",
3892
3851
  "required": false,
3893
3852
  "columnType": "TEXT"
3894
3853
  },
3895
3854
  {
3896
- "name": "nativeAmount",
3897
- "type": "decimal",
3855
+ "name": "expMonth",
3856
+ "type": "integer",
3898
3857
  "required": false,
3899
- "columnType": "REAL"
3858
+ "columnType": "INTEGER"
3900
3859
  },
3901
3860
  {
3902
- "name": "nativeCurrency",
3903
- "type": "text",
3861
+ "name": "expYear",
3862
+ "type": "integer",
3904
3863
  "required": false,
3905
- "columnType": "TEXT"
3864
+ "columnType": "INTEGER"
3906
3865
  },
3907
3866
  {
3908
- "name": "usdAtQuote",
3909
- "type": "decimal",
3867
+ "name": "isDefault",
3868
+ "type": "boolean",
3910
3869
  "required": false,
3911
- "columnType": "REAL"
3870
+ "columnType": "BOOLEAN"
3912
3871
  },
3913
3872
  {
3914
- "name": "usdAtConfirmation",
3915
- "type": "decimal",
3873
+ "name": "status",
3874
+ "type": "text",
3916
3875
  "required": false,
3917
- "columnType": "REAL"
3876
+ "columnType": "TEXT"
3918
3877
  }
3919
3878
  ],
3920
3879
  "relationships": [
3921
- {
3922
- "name": "contractId",
3923
- "type": "foreignKey",
3924
- "required": false,
3925
- "related": "Contract",
3926
- "columnType": "UUID"
3927
- },
3928
3880
  {
3929
3881
  "name": "customerId",
3930
3882
  "type": "foreignKey",
3931
3883
  "required": false,
3932
3884
  "related": "Customer",
3933
3885
  "columnType": "UUID"
3934
- },
3935
- {
3936
- "name": "journalId",
3937
- "type": "crossPackageRef",
3938
- "required": false,
3939
- "related": "@happyvertical/smrt-ledgers:Journal",
3940
- "columnType": "UUID"
3941
3886
  }
3942
3887
  ],
3943
3888
  "methods": [
3944
- "cancel",
3945
- "getJournal",
3946
- "initialize",
3947
- "isCompleted",
3948
- "isPending",
3949
- "isRefunded",
3950
- "markFailed",
3951
- "recordPayment",
3952
- "save",
3953
- "usdDrift"
3889
+ "isActive",
3890
+ "isExpired",
3891
+ "isRemoved",
3892
+ "markExpired",
3893
+ "markRemoved"
3954
3894
  ],
3955
3895
  "surfaces": [
3956
3896
  {
3957
3897
  "kind": "api",
3958
- "name": "payments.list",
3898
+ "name": "paymentinstruments.list",
3959
3899
  "operation": "list",
3960
- "objectName": "@happyvertical/smrt-commerce:Payment",
3961
- "path": "/payments",
3900
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
3901
+ "path": "/paymentinstruments",
3962
3902
  "method": "GET"
3963
3903
  },
3964
3904
  {
3965
3905
  "kind": "api",
3966
- "name": "payments.get",
3906
+ "name": "paymentinstruments.get",
3967
3907
  "operation": "get",
3968
- "objectName": "@happyvertical/smrt-commerce:Payment",
3969
- "path": "/payments/[id]",
3908
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
3909
+ "path": "/paymentinstruments/[id]",
3970
3910
  "method": "GET"
3971
3911
  },
3972
3912
  {
3973
3913
  "kind": "api",
3974
- "name": "payments.create",
3914
+ "name": "paymentinstruments.create",
3975
3915
  "operation": "create",
3976
- "objectName": "@happyvertical/smrt-commerce:Payment",
3977
- "path": "/payments",
3916
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
3917
+ "path": "/paymentinstruments",
3978
3918
  "method": "POST"
3979
3919
  },
3980
3920
  {
3981
3921
  "kind": "api",
3982
- "name": "payments.update",
3922
+ "name": "paymentinstruments.update",
3983
3923
  "operation": "update",
3984
- "objectName": "@happyvertical/smrt-commerce:Payment",
3985
- "path": "/payments/[id]",
3924
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
3925
+ "path": "/paymentinstruments/[id]",
3986
3926
  "method": "PATCH"
3987
3927
  },
3988
3928
  {
3989
3929
  "kind": "cli",
3990
- "name": "payment_list",
3930
+ "name": "paymentinstrument_list",
3991
3931
  "operation": "list",
3992
- "objectName": "@happyvertical/smrt-commerce:Payment"
3932
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
3993
3933
  },
3994
3934
  {
3995
3935
  "kind": "cli",
3996
- "name": "payment_get",
3936
+ "name": "paymentinstrument_get",
3997
3937
  "operation": "get",
3998
- "objectName": "@happyvertical/smrt-commerce:Payment"
3938
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
3999
3939
  },
4000
3940
  {
4001
3941
  "kind": "cli",
4002
- "name": "payment_create",
3942
+ "name": "paymentinstrument_create",
4003
3943
  "operation": "create",
4004
- "objectName": "@happyvertical/smrt-commerce:Payment"
3944
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4005
3945
  },
4006
3946
  {
4007
3947
  "kind": "cli",
4008
- "name": "payment_update",
3948
+ "name": "paymentinstrument_update",
4009
3949
  "operation": "update",
4010
- "objectName": "@happyvertical/smrt-commerce:Payment"
3950
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4011
3951
  },
4012
3952
  {
4013
3953
  "kind": "cli",
4014
- "name": "payment_delete",
3954
+ "name": "paymentinstrument_delete",
4015
3955
  "operation": "delete",
4016
- "objectName": "@happyvertical/smrt-commerce:Payment"
3956
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4017
3957
  },
4018
3958
  {
4019
3959
  "kind": "mcp",
4020
- "name": "payment_list",
3960
+ "name": "paymentinstrument_list",
4021
3961
  "operation": "list",
4022
- "objectName": "@happyvertical/smrt-commerce:Payment"
3962
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4023
3963
  },
4024
3964
  {
4025
3965
  "kind": "mcp",
4026
- "name": "payment_get",
3966
+ "name": "paymentinstrument_get",
4027
3967
  "operation": "get",
4028
- "objectName": "@happyvertical/smrt-commerce:Payment"
3968
+ "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4029
3969
  }
4030
3970
  ],
4031
3971
  "relationshipFeatures": [
4032
- "crossPackageRef",
4033
3972
  "foreignKey",
4034
3973
  "uuidColumns"
4035
3974
  ],
@@ -4037,10 +3976,10 @@
4037
3976
  "risks": []
4038
3977
  },
4039
3978
  {
4040
- "name": "PaymentAllocation",
4041
- "qualifiedName": "@happyvertical/smrt-commerce:PaymentAllocation",
4042
- "collection": "paymentallocations",
4043
- "tableName": "payment_allocations",
3979
+ "name": "PaymentIntent",
3980
+ "qualifiedName": "@happyvertical/smrt-commerce:PaymentIntent",
3981
+ "collection": "paymentintents",
3982
+ "tableName": "payment_intents",
4044
3983
  "packageName": "@happyvertical/smrt-commerce",
4045
3984
  "extends": "SmrtObject",
4046
3985
  "fields": [
@@ -4051,117 +3990,222 @@
4051
3990
  "columnType": "UUID"
4052
3991
  },
4053
3992
  {
4054
- "name": "paymentId",
4055
- "type": "foreignKey",
3993
+ "name": "skuId",
3994
+ "type": "text",
4056
3995
  "required": false,
4057
- "related": "Payment",
4058
- "columnType": "UUID"
3996
+ "columnType": "TEXT"
4059
3997
  },
4060
3998
  {
4061
- "name": "invoiceId",
4062
- "type": "foreignKey",
3999
+ "name": "offeringRef",
4000
+ "type": "text",
4063
4001
  "required": false,
4064
- "related": "Invoice",
4065
- "columnType": "UUID"
4002
+ "columnType": "TEXT"
4066
4003
  },
4067
4004
  {
4068
- "name": "amount",
4005
+ "name": "licenseeEmail",
4006
+ "type": "text",
4007
+ "required": false,
4008
+ "columnType": "TEXT"
4009
+ },
4010
+ {
4011
+ "name": "customerId",
4012
+ "type": "text",
4013
+ "required": false,
4014
+ "columnType": "TEXT"
4015
+ },
4016
+ {
4017
+ "name": "paymentOptions",
4018
+ "type": "json",
4019
+ "required": false,
4020
+ "columnType": "JSON"
4021
+ },
4022
+ {
4023
+ "name": "usdPriceLocked",
4024
+ "type": "decimal",
4025
+ "required": false,
4026
+ "columnType": "REAL"
4027
+ },
4028
+ {
4029
+ "name": "priceLockWindowMs",
4069
4030
  "type": "integer",
4070
4031
  "required": false,
4071
4032
  "columnType": "INTEGER"
4072
4033
  },
4073
4034
  {
4074
- "name": "allocatedAt",
4035
+ "name": "priceLockExpiresAt",
4075
4036
  "type": "datetime",
4076
4037
  "required": false,
4077
4038
  "columnType": "TIMESTAMP"
4078
4039
  },
4079
4040
  {
4080
- "name": "allocatedBy",
4041
+ "name": "status",
4081
4042
  "type": "text",
4082
4043
  "required": false,
4083
4044
  "columnType": "TEXT"
4084
4045
  },
4085
4046
  {
4086
- "name": "notes",
4047
+ "name": "idempotencyKey",
4087
4048
  "type": "text",
4088
4049
  "required": false,
4089
4050
  "columnType": "TEXT"
4090
- }
4091
- ],
4092
- "relationships": [
4051
+ },
4052
+ {
4053
+ "name": "paidOptionBackendId",
4054
+ "type": "text",
4055
+ "required": false,
4056
+ "columnType": "TEXT"
4057
+ },
4093
4058
  {
4094
4059
  "name": "paymentId",
4095
- "type": "foreignKey",
4060
+ "type": "text",
4096
4061
  "required": false,
4097
- "related": "Payment",
4098
- "columnType": "UUID"
4062
+ "columnType": "TEXT"
4099
4063
  },
4100
4064
  {
4101
- "name": "invoiceId",
4102
- "type": "foreignKey",
4065
+ "name": "paidAt",
4066
+ "type": "datetime",
4103
4067
  "required": false,
4104
- "related": "Invoice",
4105
- "columnType": "UUID"
4068
+ "columnType": "TIMESTAMP"
4069
+ },
4070
+ {
4071
+ "name": "issuedAt",
4072
+ "type": "datetime",
4073
+ "required": false,
4074
+ "columnType": "TIMESTAMP"
4075
+ },
4076
+ {
4077
+ "name": "expiredAt",
4078
+ "type": "datetime",
4079
+ "required": false,
4080
+ "columnType": "TIMESTAMP"
4081
+ },
4082
+ {
4083
+ "name": "cancelledAt",
4084
+ "type": "datetime",
4085
+ "required": false,
4086
+ "columnType": "TIMESTAMP"
4087
+ },
4088
+ {
4089
+ "name": "retiredAt",
4090
+ "type": "datetime",
4091
+ "required": false,
4092
+ "columnType": "TIMESTAMP"
4093
+ },
4094
+ {
4095
+ "name": "notes",
4096
+ "type": "text",
4097
+ "required": false,
4098
+ "columnType": "TEXT"
4106
4099
  }
4107
4100
  ],
4101
+ "relationships": [],
4108
4102
  "methods": [
4109
- "save"
4103
+ "cancel",
4104
+ "expire",
4105
+ "getOption",
4106
+ "getRetiredOptions",
4107
+ "initialize",
4108
+ "isAwaitingPayment",
4109
+ "isCancelled",
4110
+ "isExpired",
4111
+ "isIssued",
4112
+ "isOptionRetired",
4113
+ "isPaid",
4114
+ "isRetired",
4115
+ "isTerminal",
4116
+ "markIssued",
4117
+ "markPaid",
4118
+ "retire",
4119
+ "save",
4120
+ "verifyAndMarkPaid"
4110
4121
  ],
4111
4122
  "surfaces": [
4112
4123
  {
4113
4124
  "kind": "api",
4114
- "name": "paymentallocations.list",
4125
+ "name": "paymentintents.list",
4115
4126
  "operation": "list",
4116
- "objectName": "@happyvertical/smrt-commerce:PaymentAllocation",
4117
- "path": "/paymentallocations",
4127
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent",
4128
+ "path": "/paymentintents",
4118
4129
  "method": "GET"
4119
4130
  },
4120
4131
  {
4121
4132
  "kind": "api",
4122
- "name": "paymentallocations.get",
4133
+ "name": "paymentintents.get",
4123
4134
  "operation": "get",
4124
- "objectName": "@happyvertical/smrt-commerce:PaymentAllocation",
4125
- "path": "/paymentallocations/[id]",
4135
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent",
4136
+ "path": "/paymentintents/[id]",
4126
4137
  "method": "GET"
4127
4138
  },
4139
+ {
4140
+ "kind": "api",
4141
+ "name": "paymentintents.create",
4142
+ "operation": "create",
4143
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent",
4144
+ "path": "/paymentintents",
4145
+ "method": "POST"
4146
+ },
4147
+ {
4148
+ "kind": "api",
4149
+ "name": "paymentintents.update",
4150
+ "operation": "update",
4151
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent",
4152
+ "path": "/paymentintents/[id]",
4153
+ "method": "PATCH"
4154
+ },
4128
4155
  {
4129
4156
  "kind": "cli",
4130
- "name": "paymentallocation_list",
4157
+ "name": "paymentintent_list",
4131
4158
  "operation": "list",
4132
- "objectName": "@happyvertical/smrt-commerce:PaymentAllocation"
4159
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4160
+ },
4161
+ {
4162
+ "kind": "cli",
4163
+ "name": "paymentintent_get",
4164
+ "operation": "get",
4165
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4166
+ },
4167
+ {
4168
+ "kind": "cli",
4169
+ "name": "paymentintent_create",
4170
+ "operation": "create",
4171
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4172
+ },
4173
+ {
4174
+ "kind": "cli",
4175
+ "name": "paymentintent_update",
4176
+ "operation": "update",
4177
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4133
4178
  },
4134
4179
  {
4135
4180
  "kind": "cli",
4136
- "name": "paymentallocation_get",
4137
- "operation": "get",
4138
- "objectName": "@happyvertical/smrt-commerce:PaymentAllocation"
4181
+ "name": "paymentintent_delete",
4182
+ "operation": "delete",
4183
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4139
4184
  },
4140
4185
  {
4141
4186
  "kind": "mcp",
4142
- "name": "paymentallocation_list",
4187
+ "name": "paymentintent_list",
4143
4188
  "operation": "list",
4144
- "objectName": "@happyvertical/smrt-commerce:PaymentAllocation"
4189
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4145
4190
  },
4146
4191
  {
4147
4192
  "kind": "mcp",
4148
- "name": "paymentallocation_get",
4193
+ "name": "paymentintent_get",
4149
4194
  "operation": "get",
4150
- "objectName": "@happyvertical/smrt-commerce:PaymentAllocation"
4195
+ "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4151
4196
  }
4152
4197
  ],
4153
4198
  "relationshipFeatures": [
4154
- "foreignKey",
4155
4199
  "uuidColumns"
4156
4200
  ],
4157
4201
  "tags": [],
4158
4202
  "risks": []
4159
4203
  },
4160
4204
  {
4161
- "name": "PaymentInstrument",
4162
- "qualifiedName": "@happyvertical/smrt-commerce:PaymentInstrument",
4163
- "collection": "paymentinstruments",
4164
- "tableName": "payment_instruments",
4205
+ "name": "Payout",
4206
+ "qualifiedName": "@happyvertical/smrt-commerce:Payout",
4207
+ "collection": "payouts",
4208
+ "tableName": "payouts",
4165
4209
  "packageName": "@happyvertical/smrt-commerce",
4166
4210
  "extends": "SmrtObject",
4167
4211
  "fields": [
@@ -4172,68 +4216,86 @@
4172
4216
  "columnType": "UUID"
4173
4217
  },
4174
4218
  {
4175
- "name": "customerId",
4219
+ "name": "paymentId",
4220
+ "type": "text",
4221
+ "required": false,
4222
+ "columnType": "TEXT"
4223
+ },
4224
+ {
4225
+ "name": "vendorId",
4176
4226
  "type": "foreignKey",
4177
4227
  "required": false,
4178
- "related": "Customer",
4228
+ "related": "Vendor",
4179
4229
  "columnType": "UUID"
4180
4230
  },
4181
4231
  {
4182
- "name": "backendId",
4183
- "type": "text",
4232
+ "name": "grossAmount",
4233
+ "type": "decimal",
4184
4234
  "required": false,
4185
- "columnType": "TEXT"
4235
+ "columnType": "REAL"
4186
4236
  },
4187
4237
  {
4188
- "name": "providerCustomerId",
4189
- "type": "text",
4238
+ "name": "operatorFee",
4239
+ "type": "decimal",
4190
4240
  "required": false,
4191
- "columnType": "TEXT"
4241
+ "columnType": "REAL"
4192
4242
  },
4193
4243
  {
4194
- "name": "providerPaymentMethodId",
4244
+ "name": "supplierNet",
4245
+ "type": "decimal",
4246
+ "required": false,
4247
+ "columnType": "REAL"
4248
+ },
4249
+ {
4250
+ "name": "currency",
4195
4251
  "type": "text",
4196
4252
  "required": false,
4197
4253
  "columnType": "TEXT"
4198
4254
  },
4199
4255
  {
4200
- "name": "type",
4256
+ "name": "backendId",
4201
4257
  "type": "text",
4202
4258
  "required": false,
4203
4259
  "columnType": "TEXT"
4204
4260
  },
4205
4261
  {
4206
- "name": "brand",
4262
+ "name": "backendTxRef",
4207
4263
  "type": "text",
4208
4264
  "required": false,
4209
4265
  "columnType": "TEXT"
4210
4266
  },
4211
4267
  {
4212
- "name": "last4",
4268
+ "name": "status",
4213
4269
  "type": "text",
4214
4270
  "required": false,
4215
4271
  "columnType": "TEXT"
4216
4272
  },
4217
4273
  {
4218
- "name": "expMonth",
4219
- "type": "integer",
4274
+ "name": "sentAt",
4275
+ "type": "datetime",
4220
4276
  "required": false,
4221
- "columnType": "INTEGER"
4277
+ "columnType": "TIMESTAMP"
4222
4278
  },
4223
4279
  {
4224
- "name": "expYear",
4225
- "type": "integer",
4280
+ "name": "confirmedAt",
4281
+ "type": "datetime",
4226
4282
  "required": false,
4227
- "columnType": "INTEGER"
4283
+ "columnType": "TIMESTAMP"
4228
4284
  },
4229
4285
  {
4230
- "name": "isDefault",
4231
- "type": "boolean",
4286
+ "name": "failedAt",
4287
+ "type": "datetime",
4232
4288
  "required": false,
4233
- "columnType": "BOOLEAN"
4289
+ "columnType": "TIMESTAMP"
4234
4290
  },
4235
4291
  {
4236
- "name": "status",
4292
+ "name": "failureReason",
4293
+ "type": "text",
4294
+ "required": false,
4295
+ "columnType": "TEXT"
4296
+ },
4297
+ {
4298
+ "name": "notes",
4237
4299
  "type": "text",
4238
4300
  "required": false,
4239
4301
  "columnType": "TEXT"
@@ -4241,94 +4303,66 @@
4241
4303
  ],
4242
4304
  "relationships": [
4243
4305
  {
4244
- "name": "customerId",
4306
+ "name": "vendorId",
4245
4307
  "type": "foreignKey",
4246
4308
  "required": false,
4247
- "related": "Customer",
4309
+ "related": "Vendor",
4248
4310
  "columnType": "UUID"
4249
4311
  }
4250
4312
  ],
4251
4313
  "methods": [
4252
- "isActive",
4253
- "isExpired",
4254
- "isRemoved",
4255
- "markExpired",
4256
- "markRemoved"
4314
+ "initialize",
4315
+ "isConfirmed",
4316
+ "isFailed",
4317
+ "isPending",
4318
+ "isSent",
4319
+ "markConfirmed",
4320
+ "markFailed",
4321
+ "markSent",
4322
+ "resetFromFailed",
4323
+ "save",
4324
+ "validateAmounts"
4257
4325
  ],
4258
4326
  "surfaces": [
4259
4327
  {
4260
4328
  "kind": "api",
4261
- "name": "paymentinstruments.list",
4329
+ "name": "payouts.list",
4262
4330
  "operation": "list",
4263
- "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
4264
- "path": "/paymentinstruments",
4331
+ "objectName": "@happyvertical/smrt-commerce:Payout",
4332
+ "path": "/payouts",
4265
4333
  "method": "GET"
4266
4334
  },
4267
4335
  {
4268
4336
  "kind": "api",
4269
- "name": "paymentinstruments.get",
4337
+ "name": "payouts.get",
4270
4338
  "operation": "get",
4271
- "objectName": "@happyvertical/smrt-commerce:PaymentInstrument",
4272
- "path": "/paymentinstruments/[id]",
4339
+ "objectName": "@happyvertical/smrt-commerce:Payout",
4340
+ "path": "/payouts/[id]",
4273
4341
  "method": "GET"
4274
4342
  },
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
4343
  {
4292
4344
  "kind": "cli",
4293
- "name": "paymentinstrument_list",
4345
+ "name": "payout_list",
4294
4346
  "operation": "list",
4295
- "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4347
+ "objectName": "@happyvertical/smrt-commerce:Payout"
4296
4348
  },
4297
4349
  {
4298
4350
  "kind": "cli",
4299
- "name": "paymentinstrument_get",
4351
+ "name": "payout_get",
4300
4352
  "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"
4353
+ "objectName": "@happyvertical/smrt-commerce:Payout"
4320
4354
  },
4321
4355
  {
4322
4356
  "kind": "mcp",
4323
- "name": "paymentinstrument_list",
4357
+ "name": "payout_list",
4324
4358
  "operation": "list",
4325
- "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4359
+ "objectName": "@happyvertical/smrt-commerce:Payout"
4326
4360
  },
4327
4361
  {
4328
4362
  "kind": "mcp",
4329
- "name": "paymentinstrument_get",
4363
+ "name": "payout_get",
4330
4364
  "operation": "get",
4331
- "objectName": "@happyvertical/smrt-commerce:PaymentInstrument"
4365
+ "objectName": "@happyvertical/smrt-commerce:Payout"
4332
4366
  }
4333
4367
  ],
4334
4368
  "relationshipFeatures": [
@@ -4339,10 +4373,10 @@
4339
4373
  "risks": []
4340
4374
  },
4341
4375
  {
4342
- "name": "PaymentIntent",
4343
- "qualifiedName": "@happyvertical/smrt-commerce:PaymentIntent",
4344
- "collection": "paymentintents",
4345
- "tableName": "payment_intents",
4376
+ "name": "Vendor",
4377
+ "qualifiedName": "@happyvertical/smrt-commerce:Vendor",
4378
+ "collection": "vendors",
4379
+ "tableName": "vendors",
4346
4380
  "packageName": "@happyvertical/smrt-commerce",
4347
4381
  "extends": "SmrtObject",
4348
4382
  "fields": [
@@ -4353,211 +4387,328 @@
4353
4387
  "columnType": "UUID"
4354
4388
  },
4355
4389
  {
4356
- "name": "skuId",
4357
- "type": "text",
4358
- "required": false,
4359
- "columnType": "TEXT"
4360
- },
4361
- {
4362
- "name": "offeringRef",
4363
- "type": "text",
4364
- "required": false,
4365
- "columnType": "TEXT"
4366
- },
4367
- {
4368
- "name": "licenseeEmail",
4369
- "type": "text",
4370
- "required": false,
4371
- "columnType": "TEXT"
4372
- },
4373
- {
4374
- "name": "customerId",
4375
- "type": "text",
4376
- "required": false,
4377
- "columnType": "TEXT"
4378
- },
4379
- {
4380
- "name": "paymentOptions",
4381
- "type": "json",
4382
- "required": false,
4383
- "columnType": "JSON"
4384
- },
4385
- {
4386
- "name": "usdPriceLocked",
4387
- "type": "decimal",
4390
+ "name": "profileId",
4391
+ "type": "crossPackageRef",
4388
4392
  "required": false,
4389
- "columnType": "REAL"
4393
+ "related": "@happyvertical/smrt-profiles:Profile",
4394
+ "columnType": "UUID"
4390
4395
  },
4391
4396
  {
4392
- "name": "priceLockWindowMs",
4397
+ "name": "leadTimeDays",
4393
4398
  "type": "integer",
4394
4399
  "required": false,
4395
4400
  "columnType": "INTEGER"
4396
4401
  },
4397
4402
  {
4398
- "name": "priceLockExpiresAt",
4399
- "type": "datetime",
4400
- "required": false,
4401
- "columnType": "TIMESTAMP"
4402
- },
4403
- {
4404
- "name": "status",
4405
- "type": "text",
4406
- "required": false,
4407
- "columnType": "TEXT"
4408
- },
4409
- {
4410
- "name": "idempotencyKey",
4411
- "type": "text",
4403
+ "name": "minimumOrderAmount",
4404
+ "type": "decimal",
4412
4405
  "required": false,
4413
- "columnType": "TEXT"
4406
+ "columnType": "REAL"
4414
4407
  },
4415
4408
  {
4416
- "name": "paidOptionBackendId",
4409
+ "name": "paymentTerms",
4417
4410
  "type": "text",
4418
4411
  "required": false,
4419
4412
  "columnType": "TEXT"
4420
4413
  },
4421
4414
  {
4422
- "name": "paymentId",
4415
+ "name": "currency",
4423
4416
  "type": "text",
4424
4417
  "required": false,
4425
4418
  "columnType": "TEXT"
4426
4419
  },
4427
- {
4428
- "name": "paidAt",
4429
- "type": "datetime",
4430
- "required": false,
4431
- "columnType": "TIMESTAMP"
4432
- },
4433
- {
4434
- "name": "issuedAt",
4435
- "type": "datetime",
4436
- "required": false,
4437
- "columnType": "TIMESTAMP"
4438
- },
4439
- {
4440
- "name": "expiredAt",
4441
- "type": "datetime",
4420
+ {
4421
+ "name": "defaultContactEmail",
4422
+ "type": "text",
4442
4423
  "required": false,
4443
- "columnType": "TIMESTAMP"
4424
+ "columnType": "TEXT"
4444
4425
  },
4445
4426
  {
4446
- "name": "cancelledAt",
4447
- "type": "datetime",
4427
+ "name": "defaultContactPhone",
4428
+ "type": "text",
4448
4429
  "required": false,
4449
- "columnType": "TIMESTAMP"
4430
+ "columnType": "TEXT"
4450
4431
  },
4451
4432
  {
4452
- "name": "retiredAt",
4453
- "type": "datetime",
4433
+ "name": "status",
4434
+ "type": "text",
4454
4435
  "required": false,
4455
- "columnType": "TIMESTAMP"
4436
+ "columnType": "TEXT"
4456
4437
  },
4457
4438
  {
4458
4439
  "name": "notes",
4459
4440
  "type": "text",
4460
4441
  "required": false,
4461
4442
  "columnType": "TEXT"
4443
+ },
4444
+ {
4445
+ "name": "payoutAddresses",
4446
+ "type": "json",
4447
+ "required": false,
4448
+ "columnType": "JSON"
4449
+ }
4450
+ ],
4451
+ "relationships": [
4452
+ {
4453
+ "name": "profileId",
4454
+ "type": "crossPackageRef",
4455
+ "required": false,
4456
+ "related": "@happyvertical/smrt-profiles:Profile",
4457
+ "columnType": "UUID"
4462
4458
  }
4463
4459
  ],
4464
- "relationships": [],
4465
4460
  "methods": [
4466
- "cancel",
4467
- "expire",
4468
- "getOption",
4469
- "getRetiredOptions",
4461
+ "clearPayoutAddress",
4462
+ "getPayoutAddress",
4463
+ "getProfileId",
4470
4464
  "initialize",
4471
- "isAwaitingPayment",
4472
- "isCancelled",
4473
- "isExpired",
4474
- "isIssued",
4475
- "isOptionRetired",
4476
- "isPaid",
4477
- "isRetired",
4478
- "isTerminal",
4479
- "markIssued",
4480
- "markPaid",
4481
- "retire",
4465
+ "isActive",
4466
+ "meetsMinimumOrder",
4482
4467
  "save",
4483
- "verifyAndMarkPaid"
4468
+ "setPayoutAddress"
4484
4469
  ],
4485
4470
  "surfaces": [
4486
4471
  {
4487
4472
  "kind": "api",
4488
- "name": "paymentintents.list",
4473
+ "name": "vendors.list",
4489
4474
  "operation": "list",
4490
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent",
4491
- "path": "/paymentintents",
4475
+ "objectName": "@happyvertical/smrt-commerce:Vendor",
4476
+ "path": "/vendors",
4492
4477
  "method": "GET"
4493
4478
  },
4494
4479
  {
4495
4480
  "kind": "api",
4496
- "name": "paymentintents.get",
4481
+ "name": "vendors.get",
4497
4482
  "operation": "get",
4498
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent",
4499
- "path": "/paymentintents/[id]",
4483
+ "objectName": "@happyvertical/smrt-commerce:Vendor",
4484
+ "path": "/vendors/[id]",
4500
4485
  "method": "GET"
4501
4486
  },
4502
4487
  {
4503
4488
  "kind": "api",
4504
- "name": "paymentintents.create",
4489
+ "name": "vendors.create",
4505
4490
  "operation": "create",
4506
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent",
4507
- "path": "/paymentintents",
4491
+ "objectName": "@happyvertical/smrt-commerce:Vendor",
4492
+ "path": "/vendors",
4508
4493
  "method": "POST"
4509
4494
  },
4510
4495
  {
4511
4496
  "kind": "api",
4512
- "name": "paymentintents.update",
4497
+ "name": "vendors.update",
4513
4498
  "operation": "update",
4514
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent",
4515
- "path": "/paymentintents/[id]",
4499
+ "objectName": "@happyvertical/smrt-commerce:Vendor",
4500
+ "path": "/vendors/[id]",
4516
4501
  "method": "PATCH"
4517
4502
  },
4518
4503
  {
4519
4504
  "kind": "cli",
4520
- "name": "paymentintent_list",
4505
+ "name": "vendor_list",
4521
4506
  "operation": "list",
4522
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4507
+ "objectName": "@happyvertical/smrt-commerce:Vendor"
4523
4508
  },
4524
4509
  {
4525
4510
  "kind": "cli",
4526
- "name": "paymentintent_get",
4511
+ "name": "vendor_get",
4527
4512
  "operation": "get",
4528
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4513
+ "objectName": "@happyvertical/smrt-commerce:Vendor"
4529
4514
  },
4530
4515
  {
4531
4516
  "kind": "cli",
4532
- "name": "paymentintent_create",
4517
+ "name": "vendor_create",
4533
4518
  "operation": "create",
4534
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4519
+ "objectName": "@happyvertical/smrt-commerce:Vendor"
4535
4520
  },
4536
4521
  {
4537
4522
  "kind": "cli",
4538
- "name": "paymentintent_update",
4523
+ "name": "vendor_update",
4539
4524
  "operation": "update",
4540
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4525
+ "objectName": "@happyvertical/smrt-commerce:Vendor"
4541
4526
  },
4542
4527
  {
4543
4528
  "kind": "cli",
4544
- "name": "paymentintent_delete",
4529
+ "name": "vendor_delete",
4545
4530
  "operation": "delete",
4546
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4531
+ "objectName": "@happyvertical/smrt-commerce:Vendor"
4547
4532
  },
4548
4533
  {
4549
4534
  "kind": "mcp",
4550
- "name": "paymentintent_list",
4535
+ "name": "vendor_list",
4551
4536
  "operation": "list",
4552
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4537
+ "objectName": "@happyvertical/smrt-commerce:Vendor"
4553
4538
  },
4554
4539
  {
4555
4540
  "kind": "mcp",
4556
- "name": "paymentintent_get",
4541
+ "name": "vendor_get",
4557
4542
  "operation": "get",
4558
- "objectName": "@happyvertical/smrt-commerce:PaymentIntent"
4543
+ "objectName": "@happyvertical/smrt-commerce:Vendor"
4559
4544
  }
4560
4545
  ],
4546
+ "relationshipFeatures": [
4547
+ "crossPackageRef",
4548
+ "uuidColumns"
4549
+ ],
4550
+ "tags": [],
4551
+ "risks": []
4552
+ },
4553
+ {
4554
+ "name": "ContractCollection",
4555
+ "qualifiedName": "@happyvertical/smrt-commerce:ContractCollection",
4556
+ "collection": "contracts",
4557
+ "tableName": "contract_collections",
4558
+ "packageName": "@happyvertical/smrt-commerce",
4559
+ "extends": "SmrtCollection",
4560
+ "fields": [],
4561
+ "relationships": [],
4562
+ "methods": [
4563
+ "findAccepted",
4564
+ "findByCustomer",
4565
+ "findByDateRange",
4566
+ "findByStatus",
4567
+ "findByTenant",
4568
+ "findByType",
4569
+ "findByVendor",
4570
+ "findDrafts",
4571
+ "findExpired",
4572
+ "findGlobal",
4573
+ "findOverdue",
4574
+ "findWithGlobals"
4575
+ ],
4576
+ "surfaces": [],
4577
+ "relationshipFeatures": [
4578
+ "uuidColumns"
4579
+ ],
4580
+ "tags": [],
4581
+ "risks": []
4582
+ },
4583
+ {
4584
+ "name": "ContractLineItemCollection",
4585
+ "qualifiedName": "@happyvertical/smrt-commerce:ContractLineItemCollection",
4586
+ "collection": "contractlineitems",
4587
+ "tableName": "contract_line_item_collections",
4588
+ "packageName": "@happyvertical/smrt-commerce",
4589
+ "extends": "SmrtCollection",
4590
+ "fields": [],
4591
+ "relationships": [],
4592
+ "methods": [
4593
+ "findByContract",
4594
+ "findByTenant",
4595
+ "findGlobal",
4596
+ "findWithGlobals"
4597
+ ],
4598
+ "surfaces": [],
4599
+ "relationshipFeatures": [
4600
+ "uuidColumns"
4601
+ ],
4602
+ "tags": [],
4603
+ "risks": []
4604
+ },
4605
+ {
4606
+ "name": "CustomerCollection",
4607
+ "qualifiedName": "@happyvertical/smrt-commerce:CustomerCollection",
4608
+ "collection": "customers",
4609
+ "tableName": "customer_collections",
4610
+ "packageName": "@happyvertical/smrt-commerce",
4611
+ "extends": "SmrtCollection",
4612
+ "fields": [],
4613
+ "relationships": [],
4614
+ "methods": [
4615
+ "findActive",
4616
+ "findByProfile",
4617
+ "findByStatus",
4618
+ "findByTenant",
4619
+ "findGlobal",
4620
+ "findWithGlobals",
4621
+ "getOrCreateForProfile"
4622
+ ],
4623
+ "surfaces": [],
4624
+ "relationshipFeatures": [
4625
+ "uuidColumns"
4626
+ ],
4627
+ "tags": [],
4628
+ "risks": []
4629
+ },
4630
+ {
4631
+ "name": "FulfillmentCollection",
4632
+ "qualifiedName": "@happyvertical/smrt-commerce:FulfillmentCollection",
4633
+ "collection": "fulfillments",
4634
+ "tableName": "fulfillment_collections",
4635
+ "packageName": "@happyvertical/smrt-commerce",
4636
+ "extends": "SmrtCollection",
4637
+ "fields": [],
4638
+ "relationships": [],
4639
+ "methods": [
4640
+ "findByContract",
4641
+ "findByStatus",
4642
+ "findByTenant",
4643
+ "findByTracking",
4644
+ "findByType",
4645
+ "findGlobal",
4646
+ "findInTransit",
4647
+ "findPending",
4648
+ "findShippedInRange",
4649
+ "findWithGlobals"
4650
+ ],
4651
+ "surfaces": [],
4652
+ "relationshipFeatures": [
4653
+ "uuidColumns"
4654
+ ],
4655
+ "tags": [],
4656
+ "risks": []
4657
+ },
4658
+ {
4659
+ "name": "FulfillmentLineItemCollection",
4660
+ "qualifiedName": "@happyvertical/smrt-commerce:FulfillmentLineItemCollection",
4661
+ "collection": "fulfillmentlineitems",
4662
+ "tableName": "fulfillment_line_item_collections",
4663
+ "packageName": "@happyvertical/smrt-commerce",
4664
+ "extends": "SmrtCollection",
4665
+ "fields": [],
4666
+ "relationships": [],
4667
+ "methods": [
4668
+ "findByContractLineItem",
4669
+ "findByFulfillment",
4670
+ "findByTenant",
4671
+ "findGlobal",
4672
+ "findWithGlobals",
4673
+ "getTotalFulfilledForContractLine"
4674
+ ],
4675
+ "surfaces": [],
4676
+ "relationshipFeatures": [
4677
+ "uuidColumns"
4678
+ ],
4679
+ "tags": [],
4680
+ "risks": []
4681
+ },
4682
+ {
4683
+ "name": "InvoiceCollection",
4684
+ "qualifiedName": "@happyvertical/smrt-commerce:InvoiceCollection",
4685
+ "collection": "invoices",
4686
+ "tableName": "invoice_collections",
4687
+ "packageName": "@happyvertical/smrt-commerce",
4688
+ "extends": "SmrtCollection",
4689
+ "fields": [],
4690
+ "relationships": [],
4691
+ "methods": [
4692
+ "countForYear",
4693
+ "findByContract",
4694
+ "findByCustomer",
4695
+ "findByDateRange",
4696
+ "findByExternalId",
4697
+ "findByNumber",
4698
+ "findByStatus",
4699
+ "findByTenant",
4700
+ "findDrafts",
4701
+ "findGlobal",
4702
+ "findNeedingSync",
4703
+ "findOverdue",
4704
+ "findPaid",
4705
+ "findPartial",
4706
+ "findSent",
4707
+ "findWithGlobals",
4708
+ "generateInvoiceNumber",
4709
+ "getTotalOutstandingForCustomer"
4710
+ ],
4711
+ "surfaces": [],
4561
4712
  "relationshipFeatures": [
4562
4713
  "uuidColumns"
4563
4714
  ],
@@ -4565,349 +4716,198 @@
4565
4716
  "risks": []
4566
4717
  },
4567
4718
  {
4568
- "name": "Payout",
4569
- "qualifiedName": "@happyvertical/smrt-commerce:Payout",
4570
- "collection": "payouts",
4571
- "tableName": "payouts",
4719
+ "name": "InvoiceLineItemCollection",
4720
+ "qualifiedName": "@happyvertical/smrt-commerce:InvoiceLineItemCollection",
4721
+ "collection": "invoicelineitems",
4722
+ "tableName": "invoice_line_item_collections",
4572
4723
  "packageName": "@happyvertical/smrt-commerce",
4573
- "extends": "SmrtObject",
4574
- "fields": [
4575
- {
4576
- "name": "tenantId",
4577
- "type": "text",
4578
- "required": false,
4579
- "columnType": "UUID"
4580
- },
4581
- {
4582
- "name": "paymentId",
4583
- "type": "text",
4584
- "required": false,
4585
- "columnType": "TEXT"
4586
- },
4587
- {
4588
- "name": "vendorId",
4589
- "type": "foreignKey",
4590
- "required": false,
4591
- "related": "Vendor",
4592
- "columnType": "UUID"
4593
- },
4594
- {
4595
- "name": "grossAmount",
4596
- "type": "decimal",
4597
- "required": false,
4598
- "columnType": "REAL"
4599
- },
4600
- {
4601
- "name": "operatorFee",
4602
- "type": "decimal",
4603
- "required": false,
4604
- "columnType": "REAL"
4605
- },
4606
- {
4607
- "name": "supplierNet",
4608
- "type": "decimal",
4609
- "required": false,
4610
- "columnType": "REAL"
4611
- },
4612
- {
4613
- "name": "currency",
4614
- "type": "text",
4615
- "required": false,
4616
- "columnType": "TEXT"
4617
- },
4618
- {
4619
- "name": "backendId",
4620
- "type": "text",
4621
- "required": false,
4622
- "columnType": "TEXT"
4623
- },
4624
- {
4625
- "name": "backendTxRef",
4626
- "type": "text",
4627
- "required": false,
4628
- "columnType": "TEXT"
4629
- },
4630
- {
4631
- "name": "status",
4632
- "type": "text",
4633
- "required": false,
4634
- "columnType": "TEXT"
4635
- },
4636
- {
4637
- "name": "sentAt",
4638
- "type": "datetime",
4639
- "required": false,
4640
- "columnType": "TIMESTAMP"
4641
- },
4642
- {
4643
- "name": "confirmedAt",
4644
- "type": "datetime",
4645
- "required": false,
4646
- "columnType": "TIMESTAMP"
4647
- },
4648
- {
4649
- "name": "failedAt",
4650
- "type": "datetime",
4651
- "required": false,
4652
- "columnType": "TIMESTAMP"
4653
- },
4654
- {
4655
- "name": "failureReason",
4656
- "type": "text",
4657
- "required": false,
4658
- "columnType": "TEXT"
4659
- },
4660
- {
4661
- "name": "notes",
4662
- "type": "text",
4663
- "required": false,
4664
- "columnType": "TEXT"
4665
- }
4724
+ "extends": "SmrtCollection",
4725
+ "fields": [],
4726
+ "relationships": [],
4727
+ "methods": [
4728
+ "findByInvoice",
4729
+ "findBySource",
4730
+ "findBySourceType",
4731
+ "findByTenant",
4732
+ "findGlobal",
4733
+ "findWithGlobals",
4734
+ "getNextSortOrder",
4735
+ "getSubtotalForInvoice",
4736
+ "getTaxForInvoice",
4737
+ "getTotalForInvoice",
4738
+ "recalculateAmounts",
4739
+ "toAccountingLineItems"
4666
4740
  ],
4667
- "relationships": [
4668
- {
4669
- "name": "vendorId",
4670
- "type": "foreignKey",
4671
- "required": false,
4672
- "related": "Vendor",
4673
- "columnType": "UUID"
4674
- }
4741
+ "surfaces": [],
4742
+ "relationshipFeatures": [
4743
+ "uuidColumns"
4675
4744
  ],
4745
+ "tags": [],
4746
+ "risks": []
4747
+ },
4748
+ {
4749
+ "name": "PaymentAllocationCollection",
4750
+ "qualifiedName": "@happyvertical/smrt-commerce:PaymentAllocationCollection",
4751
+ "collection": "paymentallocations",
4752
+ "tableName": "payment_allocation_collections",
4753
+ "packageName": "@happyvertical/smrt-commerce",
4754
+ "extends": "SmrtCollection",
4755
+ "fields": [],
4756
+ "relationships": [],
4676
4757
  "methods": [
4677
- "initialize",
4678
- "isConfirmed",
4679
- "isFailed",
4680
- "isPending",
4681
- "isSent",
4682
- "markConfirmed",
4683
- "markFailed",
4684
- "markSent",
4685
- "resetFromFailed",
4686
- "save",
4687
- "validateAmounts"
4758
+ "findByAllocator",
4759
+ "findByDateRange",
4760
+ "findByInvoice",
4761
+ "findByPayment",
4762
+ "findByPaymentAndInvoice",
4763
+ "findByTenant",
4764
+ "findGlobal",
4765
+ "findWithGlobals",
4766
+ "getTotalAllocatedFromPayment",
4767
+ "getTotalAllocatedToInvoice",
4768
+ "getUnallocatedFromPayment"
4688
4769
  ],
4689
- "surfaces": [
4690
- {
4691
- "kind": "api",
4692
- "name": "payouts.list",
4693
- "operation": "list",
4694
- "objectName": "@happyvertical/smrt-commerce:Payout",
4695
- "path": "/payouts",
4696
- "method": "GET"
4697
- },
4698
- {
4699
- "kind": "api",
4700
- "name": "payouts.get",
4701
- "operation": "get",
4702
- "objectName": "@happyvertical/smrt-commerce:Payout",
4703
- "path": "/payouts/[id]",
4704
- "method": "GET"
4705
- },
4706
- {
4707
- "kind": "cli",
4708
- "name": "payout_list",
4709
- "operation": "list",
4710
- "objectName": "@happyvertical/smrt-commerce:Payout"
4711
- },
4712
- {
4713
- "kind": "cli",
4714
- "name": "payout_get",
4715
- "operation": "get",
4716
- "objectName": "@happyvertical/smrt-commerce:Payout"
4717
- },
4718
- {
4719
- "kind": "mcp",
4720
- "name": "payout_list",
4721
- "operation": "list",
4722
- "objectName": "@happyvertical/smrt-commerce:Payout"
4723
- },
4724
- {
4725
- "kind": "mcp",
4726
- "name": "payout_get",
4727
- "operation": "get",
4728
- "objectName": "@happyvertical/smrt-commerce:Payout"
4729
- }
4770
+ "surfaces": [],
4771
+ "relationshipFeatures": [
4772
+ "uuidColumns"
4773
+ ],
4774
+ "tags": [],
4775
+ "risks": []
4776
+ },
4777
+ {
4778
+ "name": "PaymentCollection",
4779
+ "qualifiedName": "@happyvertical/smrt-commerce:PaymentCollection",
4780
+ "collection": "payments",
4781
+ "tableName": "payment_collections",
4782
+ "packageName": "@happyvertical/smrt-commerce",
4783
+ "extends": "SmrtCollection",
4784
+ "fields": [],
4785
+ "relationships": [],
4786
+ "methods": [
4787
+ "findByContract",
4788
+ "findByCustomer",
4789
+ "findByDateRange",
4790
+ "findByJournal",
4791
+ "findByMethod",
4792
+ "findByStatus",
4793
+ "findByTenant",
4794
+ "findByTransactionId",
4795
+ "findCompleted",
4796
+ "findGlobal",
4797
+ "findPending",
4798
+ "findWithGlobals",
4799
+ "getTotalForContract"
4800
+ ],
4801
+ "surfaces": [],
4802
+ "relationshipFeatures": [
4803
+ "uuidColumns"
4804
+ ],
4805
+ "tags": [],
4806
+ "risks": []
4807
+ },
4808
+ {
4809
+ "name": "PaymentInstrumentCollection",
4810
+ "qualifiedName": "@happyvertical/smrt-commerce:PaymentInstrumentCollection",
4811
+ "collection": "paymentinstruments",
4812
+ "tableName": "payment_instrument_collections",
4813
+ "packageName": "@happyvertical/smrt-commerce",
4814
+ "extends": "SmrtCollection",
4815
+ "fields": [],
4816
+ "relationships": [],
4817
+ "methods": [
4818
+ "findActiveByCustomer",
4819
+ "findByCustomer",
4820
+ "findByProviderPaymentMethodId",
4821
+ "findByTenant",
4822
+ "findDefaultForCustomer",
4823
+ "findGlobal",
4824
+ "findWithGlobals",
4825
+ "setDefaultForCustomer"
4730
4826
  ],
4827
+ "surfaces": [],
4731
4828
  "relationshipFeatures": [
4732
- "foreignKey",
4733
4829
  "uuidColumns"
4734
4830
  ],
4735
4831
  "tags": [],
4736
4832
  "risks": []
4737
4833
  },
4738
4834
  {
4739
- "name": "Vendor",
4740
- "qualifiedName": "@happyvertical/smrt-commerce:Vendor",
4741
- "collection": "vendors",
4742
- "tableName": "vendors",
4835
+ "name": "PaymentIntentCollection",
4836
+ "qualifiedName": "@happyvertical/smrt-commerce:PaymentIntentCollection",
4837
+ "collection": "paymentintents",
4838
+ "tableName": "payment_intent_collections",
4743
4839
  "packageName": "@happyvertical/smrt-commerce",
4744
- "extends": "SmrtObject",
4745
- "fields": [
4746
- {
4747
- "name": "tenantId",
4748
- "type": "text",
4749
- "required": false,
4750
- "columnType": "UUID"
4751
- },
4752
- {
4753
- "name": "profileId",
4754
- "type": "crossPackageRef",
4755
- "required": false,
4756
- "related": "@happyvertical/smrt-profiles:Profile",
4757
- "columnType": "UUID"
4758
- },
4759
- {
4760
- "name": "leadTimeDays",
4761
- "type": "integer",
4762
- "required": false,
4763
- "columnType": "INTEGER"
4764
- },
4765
- {
4766
- "name": "minimumOrderAmount",
4767
- "type": "decimal",
4768
- "required": false,
4769
- "columnType": "REAL"
4770
- },
4771
- {
4772
- "name": "paymentTerms",
4773
- "type": "text",
4774
- "required": false,
4775
- "columnType": "TEXT"
4776
- },
4777
- {
4778
- "name": "currency",
4779
- "type": "text",
4780
- "required": false,
4781
- "columnType": "TEXT"
4782
- },
4783
- {
4784
- "name": "defaultContactEmail",
4785
- "type": "text",
4786
- "required": false,
4787
- "columnType": "TEXT"
4788
- },
4789
- {
4790
- "name": "defaultContactPhone",
4791
- "type": "text",
4792
- "required": false,
4793
- "columnType": "TEXT"
4794
- },
4795
- {
4796
- "name": "status",
4797
- "type": "text",
4798
- "required": false,
4799
- "columnType": "TEXT"
4800
- },
4801
- {
4802
- "name": "notes",
4803
- "type": "text",
4804
- "required": false,
4805
- "columnType": "TEXT"
4806
- },
4807
- {
4808
- "name": "payoutAddresses",
4809
- "type": "json",
4810
- "required": false,
4811
- "columnType": "JSON"
4812
- }
4840
+ "extends": "SmrtCollection",
4841
+ "fields": [],
4842
+ "relationships": [],
4843
+ "methods": [
4844
+ "findByIdempotencyKey",
4845
+ "findByLicenseeEmail",
4846
+ "findByOfferingRef",
4847
+ "findByStatus",
4848
+ "findByTenant",
4849
+ "findGlobal",
4850
+ "findOpen",
4851
+ "findStale",
4852
+ "findWithGlobals",
4853
+ "getOrCreateByIdempotencyKey"
4813
4854
  ],
4814
- "relationships": [
4815
- {
4816
- "name": "profileId",
4817
- "type": "crossPackageRef",
4818
- "required": false,
4819
- "related": "@happyvertical/smrt-profiles:Profile",
4820
- "columnType": "UUID"
4821
- }
4855
+ "surfaces": [],
4856
+ "relationshipFeatures": [
4857
+ "uuidColumns"
4822
4858
  ],
4859
+ "tags": [],
4860
+ "risks": []
4861
+ },
4862
+ {
4863
+ "name": "PayoutCollection",
4864
+ "qualifiedName": "@happyvertical/smrt-commerce:PayoutCollection",
4865
+ "collection": "payouts",
4866
+ "tableName": "payout_collections",
4867
+ "packageName": "@happyvertical/smrt-commerce",
4868
+ "extends": "SmrtCollection",
4869
+ "fields": [],
4870
+ "relationships": [],
4823
4871
  "methods": [
4824
- "clearPayoutAddress",
4825
- "getPayoutAddress",
4826
- "getProfileId",
4827
- "initialize",
4828
- "isActive",
4829
- "meetsMinimumOrder",
4830
- "save",
4831
- "setPayoutAddress"
4872
+ "createFromPayment",
4873
+ "findByBackendTxRef",
4874
+ "findByPayment",
4875
+ "findByStatus",
4876
+ "findByTenant",
4877
+ "findByVendor",
4878
+ "findFailed",
4879
+ "findGlobal",
4880
+ "findPending",
4881
+ "findWithGlobals",
4882
+ "getConfirmedTotalForVendor"
4832
4883
  ],
4833
- "surfaces": [
4834
- {
4835
- "kind": "api",
4836
- "name": "vendors.list",
4837
- "operation": "list",
4838
- "objectName": "@happyvertical/smrt-commerce:Vendor",
4839
- "path": "/vendors",
4840
- "method": "GET"
4841
- },
4842
- {
4843
- "kind": "api",
4844
- "name": "vendors.get",
4845
- "operation": "get",
4846
- "objectName": "@happyvertical/smrt-commerce:Vendor",
4847
- "path": "/vendors/[id]",
4848
- "method": "GET"
4849
- },
4850
- {
4851
- "kind": "api",
4852
- "name": "vendors.create",
4853
- "operation": "create",
4854
- "objectName": "@happyvertical/smrt-commerce:Vendor",
4855
- "path": "/vendors",
4856
- "method": "POST"
4857
- },
4858
- {
4859
- "kind": "api",
4860
- "name": "vendors.update",
4861
- "operation": "update",
4862
- "objectName": "@happyvertical/smrt-commerce:Vendor",
4863
- "path": "/vendors/[id]",
4864
- "method": "PATCH"
4865
- },
4866
- {
4867
- "kind": "cli",
4868
- "name": "vendor_list",
4869
- "operation": "list",
4870
- "objectName": "@happyvertical/smrt-commerce:Vendor"
4871
- },
4872
- {
4873
- "kind": "cli",
4874
- "name": "vendor_get",
4875
- "operation": "get",
4876
- "objectName": "@happyvertical/smrt-commerce:Vendor"
4877
- },
4878
- {
4879
- "kind": "cli",
4880
- "name": "vendor_create",
4881
- "operation": "create",
4882
- "objectName": "@happyvertical/smrt-commerce:Vendor"
4883
- },
4884
- {
4885
- "kind": "cli",
4886
- "name": "vendor_update",
4887
- "operation": "update",
4888
- "objectName": "@happyvertical/smrt-commerce:Vendor"
4889
- },
4890
- {
4891
- "kind": "cli",
4892
- "name": "vendor_delete",
4893
- "operation": "delete",
4894
- "objectName": "@happyvertical/smrt-commerce:Vendor"
4895
- },
4896
- {
4897
- "kind": "mcp",
4898
- "name": "vendor_list",
4899
- "operation": "list",
4900
- "objectName": "@happyvertical/smrt-commerce:Vendor"
4901
- },
4902
- {
4903
- "kind": "mcp",
4904
- "name": "vendor_get",
4905
- "operation": "get",
4906
- "objectName": "@happyvertical/smrt-commerce:Vendor"
4907
- }
4884
+ "surfaces": [],
4885
+ "relationshipFeatures": [
4886
+ "uuidColumns"
4887
+ ],
4888
+ "tags": [],
4889
+ "risks": []
4890
+ },
4891
+ {
4892
+ "name": "VendorCollection",
4893
+ "qualifiedName": "@happyvertical/smrt-commerce:VendorCollection",
4894
+ "collection": "vendors",
4895
+ "tableName": "vendor_collections",
4896
+ "packageName": "@happyvertical/smrt-commerce",
4897
+ "extends": "SmrtCollection",
4898
+ "fields": [],
4899
+ "relationships": [],
4900
+ "methods": [
4901
+ "findActive",
4902
+ "findByProfile",
4903
+ "findByStatus",
4904
+ "findByTenant",
4905
+ "findGlobal",
4906
+ "findWithGlobals",
4907
+ "getOrCreateForProfile"
4908
4908
  ],
4909
+ "surfaces": [],
4909
4910
  "relationshipFeatures": [
4910
- "crossPackageRef",
4911
4911
  "uuidColumns"
4912
4912
  ],
4913
4913
  "tags": [],