@happyvertical/smrt-commerce 0.55.6 → 0.55.8

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.
Files changed (47) hide show
  1. package/AGENTS.md +4 -0
  2. package/README.md +34 -0
  3. package/agents/customer-vendor-ui.md +31 -0
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +642 -240
  7. package/dist/index.js.map +1 -1
  8. package/dist/manifest.json +1473 -109
  9. package/dist/models/Contract.d.ts.map +1 -1
  10. package/dist/models/ContractLineItem.d.ts.map +1 -1
  11. package/dist/models/Customer.d.ts.map +1 -1
  12. package/dist/models/Fulfillment.d.ts.map +1 -1
  13. package/dist/models/FulfillmentLineItem.d.ts.map +1 -1
  14. package/dist/models/Invoice.d.ts.map +1 -1
  15. package/dist/models/InvoiceLineItem.d.ts.map +1 -1
  16. package/dist/models/Payment.d.ts.map +1 -1
  17. package/dist/models/PaymentAllocation.d.ts.map +1 -1
  18. package/dist/models/Vendor.d.ts.map +1 -1
  19. package/dist/playground.js +19 -0
  20. package/dist/playground.js.map +1 -1
  21. package/dist/recipes.d.ts +733 -19
  22. package/dist/recipes.d.ts.map +1 -1
  23. package/dist/smrt-knowledge.json +1171 -123
  24. package/dist/svelte/components/CustomerSelect.svelte +53 -0
  25. package/dist/svelte/components/CustomerSelect.svelte.d.ts +47 -0
  26. package/dist/svelte/components/CustomerSelect.svelte.d.ts.map +1 -0
  27. package/dist/svelte/components/PartySelect.svelte +138 -0
  28. package/dist/svelte/components/PartySelect.svelte.d.ts +70 -0
  29. package/dist/svelte/components/PartySelect.svelte.d.ts.map +1 -0
  30. package/dist/svelte/components/VendorSelect.svelte +53 -0
  31. package/dist/svelte/components/VendorSelect.svelte.d.ts +47 -0
  32. package/dist/svelte/components/VendorSelect.svelte.d.ts.map +1 -0
  33. package/dist/svelte/i18n.d.ts +8 -0
  34. package/dist/svelte/i18n.d.ts.map +1 -1
  35. package/dist/svelte/i18n.js +8 -0
  36. package/dist/svelte/index.d.ts +6 -0
  37. package/dist/svelte/index.d.ts.map +1 -1
  38. package/dist/svelte/index.js +6 -0
  39. package/dist/svelte/playground/PartySelectPreview.svelte +108 -0
  40. package/dist/svelte/playground/PartySelectPreview.svelte.d.ts +8 -0
  41. package/dist/svelte/playground/PartySelectPreview.svelte.d.ts.map +1 -0
  42. package/dist/svelte/playground.d.ts.map +1 -1
  43. package/dist/svelte/playground.js +19 -0
  44. package/dist/ui.d.ts.map +1 -1
  45. package/dist/ui.js +20 -0
  46. package/dist/ui.js.map +1 -1
  47. package/package.json +16 -12
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-commerce",
5
- "packageVersion": "0.55.6",
5
+ "packageVersion": "0.55.8",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-commerce:ContractCollection": {
8
8
  "name": "contractcollection",
@@ -3870,6 +3870,7 @@
3870
3870
  "className": "Contract",
3871
3871
  "qualifiedName": "@happyvertical/smrt-commerce:Contract",
3872
3872
  "collection": "contracts",
3873
+ "description": "Contract is the base class for all commercial agreements.",
3873
3874
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
3874
3875
  "packageName": "@happyvertical/smrt-commerce",
3875
3876
  "fields": {
@@ -3902,6 +3903,10 @@
3902
3903
  "contractType": {
3903
3904
  "type": "text",
3904
3905
  "required": false,
3906
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
3907
+ "_meta": {
3908
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
3909
+ },
3905
3910
  "enum": [
3906
3911
  "estimate",
3907
3912
  "order",
@@ -3979,7 +3984,10 @@
3979
3984
  "default": "USD",
3980
3985
  "description": "The currency of the amounts.",
3981
3986
  "_meta": {
3982
- "description": "The currency of the amounts."
3987
+ "description": "The currency of the amounts.",
3988
+ "ui": {
3989
+ "widget": "currency"
3990
+ }
3983
3991
  }
3984
3992
  },
3985
3993
  "issueDate": {
@@ -4021,7 +4029,10 @@
4021
4029
  "default": "",
4022
4030
  "description": "Anything worth remembering about this.",
4023
4031
  "_meta": {
4024
- "description": "Anything worth remembering about this."
4032
+ "description": "Anything worth remembering about this.",
4033
+ "ui": {
4034
+ "widget": "textarea"
4035
+ }
4025
4036
  }
4026
4037
  },
4027
4038
  "terms": {
@@ -4030,7 +4041,10 @@
4030
4041
  "default": "",
4031
4042
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4032
4043
  "_meta": {
4033
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
4044
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4045
+ "ui": {
4046
+ "widget": "textarea"
4047
+ }
4034
4048
  }
4035
4049
  },
4036
4050
  "channelId": {
@@ -4313,6 +4327,7 @@
4313
4327
  "className": "Estimate",
4314
4328
  "qualifiedName": "@happyvertical/smrt-commerce:Estimate",
4315
4329
  "collection": "contracts",
4330
+ "description": "Quote or proposal for a customer",
4316
4331
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
4317
4332
  "packageName": "@happyvertical/smrt-commerce",
4318
4333
  "fields": {
@@ -4345,6 +4360,10 @@
4345
4360
  "contractType": {
4346
4361
  "type": "text",
4347
4362
  "required": false,
4363
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
4364
+ "_meta": {
4365
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
4366
+ },
4348
4367
  "enum": [
4349
4368
  "estimate",
4350
4369
  "order",
@@ -4422,7 +4441,10 @@
4422
4441
  "default": "USD",
4423
4442
  "description": "The currency of the amounts.",
4424
4443
  "_meta": {
4425
- "description": "The currency of the amounts."
4444
+ "description": "The currency of the amounts.",
4445
+ "ui": {
4446
+ "widget": "currency"
4447
+ }
4426
4448
  }
4427
4449
  },
4428
4450
  "issueDate": {
@@ -4464,7 +4486,10 @@
4464
4486
  "default": "",
4465
4487
  "description": "Anything worth remembering about this.",
4466
4488
  "_meta": {
4467
- "description": "Anything worth remembering about this."
4489
+ "description": "Anything worth remembering about this.",
4490
+ "ui": {
4491
+ "widget": "textarea"
4492
+ }
4468
4493
  }
4469
4494
  },
4470
4495
  "terms": {
@@ -4473,7 +4498,10 @@
4473
4498
  "default": "",
4474
4499
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4475
4500
  "_meta": {
4476
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
4501
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4502
+ "ui": {
4503
+ "widget": "textarea"
4504
+ }
4477
4505
  }
4478
4506
  },
4479
4507
  "channelId": {
@@ -4734,6 +4762,7 @@
4734
4762
  "className": "Order",
4735
4763
  "qualifiedName": "@happyvertical/smrt-commerce:Order",
4736
4764
  "collection": "contracts",
4765
+ "description": "Customer purchase order",
4737
4766
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
4738
4767
  "packageName": "@happyvertical/smrt-commerce",
4739
4768
  "fields": {
@@ -4766,6 +4795,10 @@
4766
4795
  "contractType": {
4767
4796
  "type": "text",
4768
4797
  "required": false,
4798
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
4799
+ "_meta": {
4800
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
4801
+ },
4769
4802
  "enum": [
4770
4803
  "estimate",
4771
4804
  "order",
@@ -4843,7 +4876,10 @@
4843
4876
  "default": "USD",
4844
4877
  "description": "The currency of the amounts.",
4845
4878
  "_meta": {
4846
- "description": "The currency of the amounts."
4879
+ "description": "The currency of the amounts.",
4880
+ "ui": {
4881
+ "widget": "currency"
4882
+ }
4847
4883
  }
4848
4884
  },
4849
4885
  "issueDate": {
@@ -4885,7 +4921,10 @@
4885
4921
  "default": "",
4886
4922
  "description": "Anything worth remembering about this.",
4887
4923
  "_meta": {
4888
- "description": "Anything worth remembering about this."
4924
+ "description": "Anything worth remembering about this.",
4925
+ "ui": {
4926
+ "widget": "textarea"
4927
+ }
4889
4928
  }
4890
4929
  },
4891
4930
  "terms": {
@@ -4894,7 +4933,10 @@
4894
4933
  "default": "",
4895
4934
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4896
4935
  "_meta": {
4897
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
4936
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4937
+ "ui": {
4938
+ "widget": "textarea"
4939
+ }
4898
4940
  }
4899
4941
  },
4900
4942
  "channelId": {
@@ -5155,6 +5197,7 @@
5155
5197
  "className": "Lease",
5156
5198
  "qualifiedName": "@happyvertical/smrt-commerce:Lease",
5157
5199
  "collection": "contracts",
5200
+ "description": "Rental or lease agreement",
5158
5201
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
5159
5202
  "packageName": "@happyvertical/smrt-commerce",
5160
5203
  "fields": {
@@ -5187,6 +5230,10 @@
5187
5230
  "contractType": {
5188
5231
  "type": "text",
5189
5232
  "required": false,
5233
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
5234
+ "_meta": {
5235
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
5236
+ },
5190
5237
  "enum": [
5191
5238
  "estimate",
5192
5239
  "order",
@@ -5264,7 +5311,10 @@
5264
5311
  "default": "USD",
5265
5312
  "description": "The currency of the amounts.",
5266
5313
  "_meta": {
5267
- "description": "The currency of the amounts."
5314
+ "description": "The currency of the amounts.",
5315
+ "ui": {
5316
+ "widget": "currency"
5317
+ }
5268
5318
  }
5269
5319
  },
5270
5320
  "issueDate": {
@@ -5306,7 +5356,10 @@
5306
5356
  "default": "",
5307
5357
  "description": "Anything worth remembering about this.",
5308
5358
  "_meta": {
5309
- "description": "Anything worth remembering about this."
5359
+ "description": "Anything worth remembering about this.",
5360
+ "ui": {
5361
+ "widget": "textarea"
5362
+ }
5310
5363
  }
5311
5364
  },
5312
5365
  "terms": {
@@ -5315,7 +5368,10 @@
5315
5368
  "default": "",
5316
5369
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
5317
5370
  "_meta": {
5318
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
5371
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
5372
+ "ui": {
5373
+ "widget": "textarea"
5374
+ }
5319
5375
  }
5320
5376
  },
5321
5377
  "channelId": {
@@ -5576,6 +5632,7 @@
5576
5632
  "className": "Agreement",
5577
5633
  "qualifiedName": "@happyvertical/smrt-commerce:Agreement",
5578
5634
  "collection": "contracts",
5635
+ "description": "Service or maintenance agreement",
5579
5636
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
5580
5637
  "packageName": "@happyvertical/smrt-commerce",
5581
5638
  "fields": {
@@ -5608,6 +5665,10 @@
5608
5665
  "contractType": {
5609
5666
  "type": "text",
5610
5667
  "required": false,
5668
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
5669
+ "_meta": {
5670
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
5671
+ },
5611
5672
  "enum": [
5612
5673
  "estimate",
5613
5674
  "order",
@@ -5685,7 +5746,10 @@
5685
5746
  "default": "USD",
5686
5747
  "description": "The currency of the amounts.",
5687
5748
  "_meta": {
5688
- "description": "The currency of the amounts."
5749
+ "description": "The currency of the amounts.",
5750
+ "ui": {
5751
+ "widget": "currency"
5752
+ }
5689
5753
  }
5690
5754
  },
5691
5755
  "issueDate": {
@@ -5727,7 +5791,10 @@
5727
5791
  "default": "",
5728
5792
  "description": "Anything worth remembering about this.",
5729
5793
  "_meta": {
5730
- "description": "Anything worth remembering about this."
5794
+ "description": "Anything worth remembering about this.",
5795
+ "ui": {
5796
+ "widget": "textarea"
5797
+ }
5731
5798
  }
5732
5799
  },
5733
5800
  "terms": {
@@ -5736,7 +5803,10 @@
5736
5803
  "default": "",
5737
5804
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
5738
5805
  "_meta": {
5739
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
5806
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
5807
+ "ui": {
5808
+ "widget": "textarea"
5809
+ }
5740
5810
  }
5741
5811
  },
5742
5812
  "channelId": {
@@ -5997,6 +6067,7 @@
5997
6067
  "className": "PurchaseOrder",
5998
6068
  "qualifiedName": "@happyvertical/smrt-commerce:PurchaseOrder",
5999
6069
  "collection": "contracts",
6070
+ "description": "Order sent to vendor/supplier",
6000
6071
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
6001
6072
  "packageName": "@happyvertical/smrt-commerce",
6002
6073
  "fields": {
@@ -6029,6 +6100,10 @@
6029
6100
  "contractType": {
6030
6101
  "type": "text",
6031
6102
  "required": false,
6103
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
6104
+ "_meta": {
6105
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
6106
+ },
6032
6107
  "enum": [
6033
6108
  "estimate",
6034
6109
  "order",
@@ -6106,7 +6181,10 @@
6106
6181
  "default": "USD",
6107
6182
  "description": "The currency of the amounts.",
6108
6183
  "_meta": {
6109
- "description": "The currency of the amounts."
6184
+ "description": "The currency of the amounts.",
6185
+ "ui": {
6186
+ "widget": "currency"
6187
+ }
6110
6188
  }
6111
6189
  },
6112
6190
  "issueDate": {
@@ -6148,7 +6226,10 @@
6148
6226
  "default": "",
6149
6227
  "description": "Anything worth remembering about this.",
6150
6228
  "_meta": {
6151
- "description": "Anything worth remembering about this."
6229
+ "description": "Anything worth remembering about this.",
6230
+ "ui": {
6231
+ "widget": "textarea"
6232
+ }
6152
6233
  }
6153
6234
  },
6154
6235
  "terms": {
@@ -6157,7 +6238,10 @@
6157
6238
  "default": "",
6158
6239
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
6159
6240
  "_meta": {
6160
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
6241
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
6242
+ "ui": {
6243
+ "widget": "textarea"
6244
+ }
6161
6245
  }
6162
6246
  },
6163
6247
  "channelId": {
@@ -6418,6 +6502,7 @@
6418
6502
  "className": "WholesaleOrder",
6419
6503
  "qualifiedName": "@happyvertical/smrt-commerce:WholesaleOrder",
6420
6504
  "collection": "contracts",
6505
+ "description": "B2B order placed by a wholesale customer.",
6421
6506
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
6422
6507
  "packageName": "@happyvertical/smrt-commerce",
6423
6508
  "fields": {
@@ -6450,6 +6535,10 @@
6450
6535
  "contractType": {
6451
6536
  "type": "text",
6452
6537
  "required": false,
6538
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
6539
+ "_meta": {
6540
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
6541
+ },
6453
6542
  "enum": [
6454
6543
  "estimate",
6455
6544
  "order",
@@ -6527,7 +6616,10 @@
6527
6616
  "default": "USD",
6528
6617
  "description": "The currency of the amounts.",
6529
6618
  "_meta": {
6530
- "description": "The currency of the amounts."
6619
+ "description": "The currency of the amounts.",
6620
+ "ui": {
6621
+ "widget": "currency"
6622
+ }
6531
6623
  }
6532
6624
  },
6533
6625
  "issueDate": {
@@ -6569,7 +6661,10 @@
6569
6661
  "default": "",
6570
6662
  "description": "Anything worth remembering about this.",
6571
6663
  "_meta": {
6572
- "description": "Anything worth remembering about this."
6664
+ "description": "Anything worth remembering about this.",
6665
+ "ui": {
6666
+ "widget": "textarea"
6667
+ }
6573
6668
  }
6574
6669
  },
6575
6670
  "terms": {
@@ -6578,7 +6673,10 @@
6578
6673
  "default": "",
6579
6674
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
6580
6675
  "_meta": {
6581
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
6676
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
6677
+ "ui": {
6678
+ "widget": "textarea"
6679
+ }
6582
6680
  }
6583
6681
  },
6584
6682
  "channelId": {
@@ -6839,6 +6937,7 @@
6839
6937
  "className": "ProductionOrder",
6840
6938
  "qualifiedName": "@happyvertical/smrt-commerce:ProductionOrder",
6841
6939
  "collection": "contracts",
6940
+ "description": "Instruction to commission goods from an internal or external factory.",
6842
6941
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
6843
6942
  "packageName": "@happyvertical/smrt-commerce",
6844
6943
  "fields": {
@@ -6871,6 +6970,10 @@
6871
6970
  "contractType": {
6872
6971
  "type": "text",
6873
6972
  "required": false,
6973
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
6974
+ "_meta": {
6975
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
6976
+ },
6874
6977
  "enum": [
6875
6978
  "estimate",
6876
6979
  "order",
@@ -6948,7 +7051,10 @@
6948
7051
  "default": "USD",
6949
7052
  "description": "The currency of the amounts.",
6950
7053
  "_meta": {
6951
- "description": "The currency of the amounts."
7054
+ "description": "The currency of the amounts.",
7055
+ "ui": {
7056
+ "widget": "currency"
7057
+ }
6952
7058
  }
6953
7059
  },
6954
7060
  "issueDate": {
@@ -6990,7 +7096,10 @@
6990
7096
  "default": "",
6991
7097
  "description": "Anything worth remembering about this.",
6992
7098
  "_meta": {
6993
- "description": "Anything worth remembering about this."
7099
+ "description": "Anything worth remembering about this.",
7100
+ "ui": {
7101
+ "widget": "textarea"
7102
+ }
6994
7103
  }
6995
7104
  },
6996
7105
  "terms": {
@@ -6999,7 +7108,10 @@
6999
7108
  "default": "",
7000
7109
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7001
7110
  "_meta": {
7002
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
7111
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7112
+ "ui": {
7113
+ "widget": "textarea"
7114
+ }
7003
7115
  }
7004
7116
  },
7005
7117
  "channelId": {
@@ -7276,6 +7388,7 @@
7276
7388
  "className": "Cart",
7277
7389
  "qualifiedName": "@happyvertical/smrt-commerce:Cart",
7278
7390
  "collection": "contracts",
7391
+ "description": "Transient order-in-progress for a shopper.",
7279
7392
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
7280
7393
  "packageName": "@happyvertical/smrt-commerce",
7281
7394
  "fields": {
@@ -7308,6 +7421,10 @@
7308
7421
  "contractType": {
7309
7422
  "type": "text",
7310
7423
  "required": false,
7424
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
7425
+ "_meta": {
7426
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
7427
+ },
7311
7428
  "enum": [
7312
7429
  "estimate",
7313
7430
  "order",
@@ -7385,7 +7502,10 @@
7385
7502
  "default": "USD",
7386
7503
  "description": "The currency of the amounts.",
7387
7504
  "_meta": {
7388
- "description": "The currency of the amounts."
7505
+ "description": "The currency of the amounts.",
7506
+ "ui": {
7507
+ "widget": "currency"
7508
+ }
7389
7509
  }
7390
7510
  },
7391
7511
  "issueDate": {
@@ -7427,7 +7547,10 @@
7427
7547
  "default": "",
7428
7548
  "description": "Anything worth remembering about this.",
7429
7549
  "_meta": {
7430
- "description": "Anything worth remembering about this."
7550
+ "description": "Anything worth remembering about this.",
7551
+ "ui": {
7552
+ "widget": "textarea"
7553
+ }
7431
7554
  }
7432
7555
  },
7433
7556
  "terms": {
@@ -7436,7 +7559,10 @@
7436
7559
  "default": "",
7437
7560
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7438
7561
  "_meta": {
7439
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
7562
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7563
+ "ui": {
7564
+ "widget": "textarea"
7565
+ }
7440
7566
  }
7441
7567
  },
7442
7568
  "channelId": {
@@ -7697,6 +7823,7 @@
7697
7823
  "className": "LicenseSale",
7698
7824
  "qualifiedName": "@happyvertical/smrt-commerce:LicenseSale",
7699
7825
  "collection": "contracts",
7826
+ "description": "Industry-neutral licensing primitive.",
7700
7827
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
7701
7828
  "packageName": "@happyvertical/smrt-commerce",
7702
7829
  "fields": {
@@ -7729,6 +7856,10 @@
7729
7856
  "contractType": {
7730
7857
  "type": "text",
7731
7858
  "required": false,
7859
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
7860
+ "_meta": {
7861
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
7862
+ },
7732
7863
  "enum": [
7733
7864
  "estimate",
7734
7865
  "order",
@@ -7806,7 +7937,10 @@
7806
7937
  "default": "USD",
7807
7938
  "description": "The currency of the amounts.",
7808
7939
  "_meta": {
7809
- "description": "The currency of the amounts."
7940
+ "description": "The currency of the amounts.",
7941
+ "ui": {
7942
+ "widget": "currency"
7943
+ }
7810
7944
  }
7811
7945
  },
7812
7946
  "issueDate": {
@@ -7848,7 +7982,10 @@
7848
7982
  "default": "",
7849
7983
  "description": "Anything worth remembering about this.",
7850
7984
  "_meta": {
7851
- "description": "Anything worth remembering about this."
7985
+ "description": "Anything worth remembering about this.",
7986
+ "ui": {
7987
+ "widget": "textarea"
7988
+ }
7852
7989
  }
7853
7990
  },
7854
7991
  "terms": {
@@ -7857,7 +7994,10 @@
7857
7994
  "default": "",
7858
7995
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7859
7996
  "_meta": {
7860
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
7997
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7998
+ "ui": {
7999
+ "widget": "textarea"
8000
+ }
7861
8001
  }
7862
8002
  },
7863
8003
  "channelId": {
@@ -8254,6 +8394,7 @@
8254
8394
  "className": "ContractLineItem",
8255
8395
  "qualifiedName": "@happyvertical/smrt-commerce:ContractLineItem",
8256
8396
  "collection": "contractlineitems",
8397
+ "description": "ContractLineItem represents a single line item on a contract.",
8257
8398
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/ContractLineItem.ts",
8258
8399
  "packageName": "@happyvertical/smrt-commerce",
8259
8400
  "fields": {
@@ -8286,22 +8427,38 @@
8286
8427
  "contractId": {
8287
8428
  "type": "foreignKey",
8288
8429
  "required": false,
8289
- "related": "Contract"
8430
+ "related": "Contract",
8431
+ "description": "The order, quote or agreement this line belongs to.",
8432
+ "_meta": {
8433
+ "description": "The order, quote or agreement this line belongs to."
8434
+ }
8290
8435
  },
8291
8436
  "description": {
8292
8437
  "type": "text",
8293
8438
  "required": false,
8294
- "default": ""
8439
+ "default": "",
8440
+ "description": "What is being sold or bought on this line.",
8441
+ "_meta": {
8442
+ "description": "What is being sold or bought on this line."
8443
+ }
8295
8444
  },
8296
8445
  "quantity": {
8297
8446
  "type": "decimal",
8298
8447
  "required": false,
8299
- "default": 1
8448
+ "default": 1,
8449
+ "description": "How many.",
8450
+ "_meta": {
8451
+ "description": "How many."
8452
+ }
8300
8453
  },
8301
8454
  "unitPrice": {
8302
8455
  "type": "integer",
8303
8456
  "required": false,
8304
- "default": 0
8457
+ "default": 0,
8458
+ "description": "The price of one, before tax.",
8459
+ "_meta": {
8460
+ "description": "The price of one, before tax."
8461
+ }
8305
8462
  },
8306
8463
  "discount": {
8307
8464
  "type": "integer",
@@ -8311,17 +8468,29 @@
8311
8468
  "taxRate": {
8312
8469
  "type": "decimal",
8313
8470
  "required": false,
8314
- "default": 0
8471
+ "default": 0,
8472
+ "description": "The tax rate for this line, as a percentage (5 means 5%).",
8473
+ "_meta": {
8474
+ "description": "The tax rate for this line, as a percentage (5 means 5%)."
8475
+ }
8315
8476
  },
8316
8477
  "amount": {
8317
8478
  "type": "integer",
8318
8479
  "required": false,
8319
- "default": 0
8480
+ "default": 0,
8481
+ "description": "The line total.",
8482
+ "_meta": {
8483
+ "description": "The line total."
8484
+ }
8320
8485
  },
8321
8486
  "productId": {
8322
8487
  "type": "crossPackageRef",
8323
8488
  "required": false,
8324
- "related": "@happyvertical/smrt-products:Product"
8489
+ "related": "@happyvertical/smrt-products:Product",
8490
+ "description": "The product this line is for, if it is one you list.",
8491
+ "_meta": {
8492
+ "description": "The product this line is for, if it is one you list."
8493
+ }
8325
8494
  },
8326
8495
  "sku": {
8327
8496
  "type": "text",
@@ -8565,6 +8734,7 @@
8565
8734
  "className": "Customer",
8566
8735
  "qualifiedName": "@happyvertical/smrt-commerce:Customer",
8567
8736
  "collection": "customers",
8737
+ "description": "Customer represents the customer role for a Profile.",
8568
8738
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Customer.ts",
8569
8739
  "packageName": "@happyvertical/smrt-commerce",
8570
8740
  "fields": {
@@ -8680,7 +8850,10 @@
8680
8850
  "default": "",
8681
8851
  "description": "Anything worth remembering about this customer.",
8682
8852
  "_meta": {
8683
- "description": "Anything worth remembering about this customer."
8853
+ "description": "Anything worth remembering about this customer.",
8854
+ "ui": {
8855
+ "widget": "textarea"
8856
+ }
8684
8857
  }
8685
8858
  }
8686
8859
  },
@@ -8880,6 +9053,7 @@
8880
9053
  "className": "Fulfillment",
8881
9054
  "qualifiedName": "@happyvertical/smrt-commerce:Fulfillment",
8882
9055
  "collection": "fulfillments",
9056
+ "description": "Fulfillment tracks the delivery or completion of contract items.",
8883
9057
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Fulfillment.ts",
8884
9058
  "packageName": "@happyvertical/smrt-commerce",
8885
9059
  "fields": {
@@ -8904,11 +9078,19 @@
8904
9078
  "contractId": {
8905
9079
  "type": "foreignKey",
8906
9080
  "required": false,
8907
- "related": "Contract"
9081
+ "related": "Contract",
9082
+ "description": "The order being fulfilled.",
9083
+ "_meta": {
9084
+ "description": "The order being fulfilled."
9085
+ }
8908
9086
  },
8909
9087
  "fulfillmentType": {
8910
9088
  "type": "text",
8911
9089
  "required": false,
9090
+ "description": "How it gets to the customer: shipment, delivery, pickup, digital or service.",
9091
+ "_meta": {
9092
+ "description": "How it gets to the customer: shipment, delivery, pickup, digital or service."
9093
+ },
8912
9094
  "enum": [
8913
9095
  "shipment",
8914
9096
  "delivery",
@@ -8920,6 +9102,10 @@
8920
9102
  "status": {
8921
9103
  "type": "text",
8922
9104
  "required": false,
9105
+ "description": "Where it stands: pending, processing, shipped, delivered or cancelled.",
9106
+ "_meta": {
9107
+ "description": "Where it stands: pending, processing, shipped, delivered or cancelled."
9108
+ },
8923
9109
  "enum": [
8924
9110
  "pending",
8925
9111
  "processing",
@@ -8931,12 +9117,20 @@
8931
9117
  "trackingNumber": {
8932
9118
  "type": "text",
8933
9119
  "required": false,
8934
- "default": ""
9120
+ "default": "",
9121
+ "description": "The carrier's tracking number.",
9122
+ "_meta": {
9123
+ "description": "The carrier's tracking number."
9124
+ }
8935
9125
  },
8936
9126
  "carrier": {
8937
9127
  "type": "text",
8938
9128
  "required": false,
8939
- "default": ""
9129
+ "default": "",
9130
+ "description": "The company carrying it.",
9131
+ "_meta": {
9132
+ "description": "The company carrying it."
9133
+ }
8940
9134
  },
8941
9135
  "shippingAddress": {
8942
9136
  "type": "json",
@@ -8944,11 +9138,19 @@
8944
9138
  },
8945
9139
  "shippedAt": {
8946
9140
  "type": "datetime",
8947
- "required": false
9141
+ "required": false,
9142
+ "description": "When it was dispatched.",
9143
+ "_meta": {
9144
+ "description": "When it was dispatched."
9145
+ }
8948
9146
  },
8949
9147
  "deliveredAt": {
8950
9148
  "type": "datetime",
8951
- "required": false
9149
+ "required": false,
9150
+ "description": "When it arrived.",
9151
+ "_meta": {
9152
+ "description": "When it arrived."
9153
+ }
8952
9154
  },
8953
9155
  "estimatedDelivery": {
8954
9156
  "type": "datetime",
@@ -8957,7 +9159,11 @@
8957
9159
  "notes": {
8958
9160
  "type": "text",
8959
9161
  "required": false,
8960
- "default": ""
9162
+ "default": "",
9163
+ "description": "Anything worth remembering about this shipment.",
9164
+ "_meta": {
9165
+ "description": "Anything worth remembering about this shipment."
9166
+ }
8961
9167
  }
8962
9168
  },
8963
9169
  "methods": {
@@ -9197,6 +9403,7 @@
9197
9403
  "className": "FulfillmentLineItem",
9198
9404
  "qualifiedName": "@happyvertical/smrt-commerce:FulfillmentLineItem",
9199
9405
  "collection": "fulfillmentlineitems",
9406
+ "description": "FulfillmentLineItem tracks which contract line items are included in a specific fulfillment and how much was fulfilled.",
9200
9407
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/FulfillmentLineItem.ts",
9201
9408
  "packageName": "@happyvertical/smrt-commerce",
9202
9409
  "fields": {
@@ -9221,17 +9428,29 @@
9221
9428
  "fulfillmentId": {
9222
9429
  "type": "foreignKey",
9223
9430
  "required": false,
9224
- "related": "Fulfillment"
9431
+ "related": "Fulfillment",
9432
+ "description": "The shipment this line belongs to.",
9433
+ "_meta": {
9434
+ "description": "The shipment this line belongs to."
9435
+ }
9225
9436
  },
9226
9437
  "contractLineItemId": {
9227
9438
  "type": "foreignKey",
9228
9439
  "required": false,
9229
- "related": "ContractLineItem"
9440
+ "related": "ContractLineItem",
9441
+ "description": "The order line being sent.",
9442
+ "_meta": {
9443
+ "description": "The order line being sent."
9444
+ }
9230
9445
  },
9231
9446
  "quantityFulfilled": {
9232
9447
  "type": "decimal",
9233
9448
  "required": false,
9234
- "default": 1
9449
+ "default": 1,
9450
+ "description": "How many of that line are in this shipment.",
9451
+ "_meta": {
9452
+ "description": "How many of that line are in this shipment."
9453
+ }
9235
9454
  },
9236
9455
  "notes": {
9237
9456
  "type": "text",
@@ -9390,6 +9609,7 @@
9390
9609
  "className": "Invoice",
9391
9610
  "qualifiedName": "@happyvertical/smrt-commerce:Invoice",
9392
9611
  "collection": "invoices",
9612
+ "description": "Invoice represents a bill sent to a customer for goods or services.",
9393
9613
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Invoice.ts",
9394
9614
  "packageName": "@happyvertical/smrt-commerce",
9395
9615
  "fields": {
@@ -9414,17 +9634,29 @@
9414
9634
  "customerId": {
9415
9635
  "type": "foreignKey",
9416
9636
  "required": false,
9417
- "related": "Customer"
9637
+ "related": "Customer",
9638
+ "description": "The customer being billed.",
9639
+ "_meta": {
9640
+ "description": "The customer being billed."
9641
+ }
9418
9642
  },
9419
9643
  "contractId": {
9420
9644
  "type": "foreignKey",
9421
9645
  "required": false,
9422
- "related": "Contract"
9646
+ "related": "Contract",
9647
+ "description": "The order or agreement this invoice bills for, if any.",
9648
+ "_meta": {
9649
+ "description": "The order or agreement this invoice bills for, if any."
9650
+ }
9423
9651
  },
9424
9652
  "invoiceNumber": {
9425
9653
  "type": "text",
9426
9654
  "required": false,
9427
- "default": ""
9655
+ "default": "",
9656
+ "description": "The number printed on the invoice.",
9657
+ "_meta": {
9658
+ "description": "The number printed on the invoice."
9659
+ }
9428
9660
  },
9429
9661
  "reference": {
9430
9662
  "type": "text",
@@ -9433,25 +9665,45 @@
9433
9665
  },
9434
9666
  "issueDate": {
9435
9667
  "type": "datetime",
9436
- "required": false
9668
+ "required": false,
9669
+ "description": "The date the invoice was issued.",
9670
+ "_meta": {
9671
+ "description": "The date the invoice was issued."
9672
+ }
9437
9673
  },
9438
9674
  "dueDate": {
9439
9675
  "type": "datetime",
9440
- "required": false
9676
+ "required": false,
9677
+ "description": "The date payment is expected.",
9678
+ "_meta": {
9679
+ "description": "The date payment is expected."
9680
+ }
9441
9681
  },
9442
9682
  "paidDate": {
9443
9683
  "type": "datetime",
9444
- "required": false
9684
+ "required": false,
9685
+ "description": "The date it was paid in full.",
9686
+ "_meta": {
9687
+ "description": "The date it was paid in full."
9688
+ }
9445
9689
  },
9446
9690
  "subtotal": {
9447
9691
  "type": "integer",
9448
9692
  "required": false,
9449
- "default": 0
9693
+ "default": 0,
9694
+ "description": "The amount before tax.",
9695
+ "_meta": {
9696
+ "description": "The amount before tax."
9697
+ }
9450
9698
  },
9451
9699
  "taxAmount": {
9452
9700
  "type": "integer",
9453
9701
  "required": false,
9454
- "default": 0
9702
+ "default": 0,
9703
+ "description": "The tax charged.",
9704
+ "_meta": {
9705
+ "description": "The tax charged."
9706
+ }
9455
9707
  },
9456
9708
  "providerTaxAmount": {
9457
9709
  "type": "integer",
@@ -9461,21 +9713,40 @@
9461
9713
  "totalAmount": {
9462
9714
  "type": "integer",
9463
9715
  "required": false,
9464
- "default": 0
9716
+ "default": 0,
9717
+ "description": "What the customer owes in all, tax included.",
9718
+ "_meta": {
9719
+ "description": "What the customer owes in all, tax included."
9720
+ }
9465
9721
  },
9466
9722
  "amountPaid": {
9467
9723
  "type": "integer",
9468
9724
  "required": false,
9469
- "default": 0
9725
+ "default": 0,
9726
+ "description": "How much of the total has been paid so far.",
9727
+ "_meta": {
9728
+ "description": "How much of the total has been paid so far."
9729
+ }
9470
9730
  },
9471
9731
  "currency": {
9472
9732
  "type": "text",
9473
9733
  "required": false,
9474
- "default": "CAD"
9734
+ "default": "CAD",
9735
+ "description": "The currency of the invoice.",
9736
+ "_meta": {
9737
+ "description": "The currency of the invoice.",
9738
+ "ui": {
9739
+ "widget": "currency"
9740
+ }
9741
+ }
9475
9742
  },
9476
9743
  "status": {
9477
9744
  "type": "text",
9478
9745
  "required": false,
9746
+ "description": "Where the invoice stands: draft, sent, viewed, paid, overdue or cancelled.",
9747
+ "_meta": {
9748
+ "description": "Where the invoice stands: draft, sent, viewed, paid, overdue or cancelled."
9749
+ },
9479
9750
  "enum": [
9480
9751
  "draft",
9481
9752
  "sent",
@@ -9546,17 +9817,38 @@
9546
9817
  "notes": {
9547
9818
  "type": "text",
9548
9819
  "required": false,
9549
- "default": ""
9820
+ "default": "",
9821
+ "description": "Private notes, not shown to the customer.",
9822
+ "_meta": {
9823
+ "description": "Private notes, not shown to the customer.",
9824
+ "ui": {
9825
+ "widget": "textarea"
9826
+ }
9827
+ }
9550
9828
  },
9551
9829
  "customerNotes": {
9552
9830
  "type": "text",
9553
9831
  "required": false,
9554
- "default": ""
9832
+ "default": "",
9833
+ "description": "A message shown to the customer on the invoice.",
9834
+ "_meta": {
9835
+ "description": "A message shown to the customer on the invoice.",
9836
+ "ui": {
9837
+ "widget": "textarea"
9838
+ }
9839
+ }
9555
9840
  },
9556
9841
  "terms": {
9557
9842
  "type": "text",
9558
9843
  "required": false,
9559
- "default": ""
9844
+ "default": "",
9845
+ "description": "The payment conditions, such as Net 30.",
9846
+ "_meta": {
9847
+ "description": "The payment conditions, such as Net 30.",
9848
+ "ui": {
9849
+ "widget": "textarea"
9850
+ }
9851
+ }
9560
9852
  }
9561
9853
  },
9562
9854
  "methods": {
@@ -10006,6 +10298,7 @@
10006
10298
  "className": "InvoiceLineItem",
10007
10299
  "qualifiedName": "@happyvertical/smrt-commerce:InvoiceLineItem",
10008
10300
  "collection": "invoicelineitems",
10301
+ "description": "InvoiceLineItem represents a single line item on an invoice.",
10009
10302
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/InvoiceLineItem.ts",
10010
10303
  "packageName": "@happyvertical/smrt-commerce",
10011
10304
  "fields": {
@@ -10030,12 +10323,20 @@
10030
10323
  "invoiceId": {
10031
10324
  "type": "foreignKey",
10032
10325
  "required": false,
10033
- "related": "Invoice"
10326
+ "related": "Invoice",
10327
+ "description": "The invoice this line belongs to.",
10328
+ "_meta": {
10329
+ "description": "The invoice this line belongs to."
10330
+ }
10034
10331
  },
10035
10332
  "description": {
10036
10333
  "type": "text",
10037
10334
  "required": false,
10038
- "default": ""
10335
+ "default": "",
10336
+ "description": "What is being billed on this line.",
10337
+ "_meta": {
10338
+ "description": "What is being billed on this line."
10339
+ }
10039
10340
  },
10040
10341
  "sku": {
10041
10342
  "type": "text",
@@ -10045,7 +10346,11 @@
10045
10346
  "quantity": {
10046
10347
  "type": "decimal",
10047
10348
  "required": false,
10048
- "default": 1
10349
+ "default": 1,
10350
+ "description": "How many.",
10351
+ "_meta": {
10352
+ "description": "How many."
10353
+ }
10049
10354
  },
10050
10355
  "invoiceEditorStateJson": {
10051
10356
  "type": "text",
@@ -10055,7 +10360,11 @@
10055
10360
  "unitPrice": {
10056
10361
  "type": "integer",
10057
10362
  "required": false,
10058
- "default": 0
10363
+ "default": 0,
10364
+ "description": "The price of one, before tax.",
10365
+ "_meta": {
10366
+ "description": "The price of one, before tax."
10367
+ }
10059
10368
  },
10060
10369
  "discount": {
10061
10370
  "type": "integer",
@@ -10065,12 +10374,20 @@
10065
10374
  "taxRate": {
10066
10375
  "type": "decimal",
10067
10376
  "required": false,
10068
- "default": 0
10377
+ "default": 0,
10378
+ "description": "The tax rate for this line, as a percentage (5 means 5%).",
10379
+ "_meta": {
10380
+ "description": "The tax rate for this line, as a percentage (5 means 5%)."
10381
+ }
10069
10382
  },
10070
10383
  "amount": {
10071
10384
  "type": "integer",
10072
10385
  "required": false,
10073
- "default": 0
10386
+ "default": 0,
10387
+ "description": "The line total.",
10388
+ "_meta": {
10389
+ "description": "The line total."
10390
+ }
10074
10391
  },
10075
10392
  "sourceType": {
10076
10393
  "type": "text",
@@ -10399,6 +10716,7 @@
10399
10716
  "className": "Payment",
10400
10717
  "qualifiedName": "@happyvertical/smrt-commerce:Payment",
10401
10718
  "collection": "payments",
10719
+ "description": "Payment represents a financial transaction against a contract.",
10402
10720
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Payment.ts",
10403
10721
  "packageName": "@happyvertical/smrt-commerce",
10404
10722
  "fields": {
@@ -10423,26 +10741,49 @@
10423
10741
  "contractId": {
10424
10742
  "type": "foreignKey",
10425
10743
  "required": false,
10426
- "related": "Contract"
10744
+ "related": "Contract",
10745
+ "description": "The order or agreement this payment is for, if any.",
10746
+ "_meta": {
10747
+ "description": "The order or agreement this payment is for, if any."
10748
+ }
10427
10749
  },
10428
10750
  "customerId": {
10429
10751
  "type": "foreignKey",
10430
10752
  "required": false,
10431
- "related": "Customer"
10753
+ "related": "Customer",
10754
+ "description": "The customer who paid.",
10755
+ "_meta": {
10756
+ "description": "The customer who paid."
10757
+ }
10432
10758
  },
10433
10759
  "amount": {
10434
10760
  "type": "integer",
10435
10761
  "required": false,
10436
- "default": 0
10762
+ "default": 0,
10763
+ "description": "How much was paid.",
10764
+ "_meta": {
10765
+ "description": "How much was paid."
10766
+ }
10437
10767
  },
10438
10768
  "currency": {
10439
10769
  "type": "text",
10440
10770
  "required": false,
10441
- "default": "USD"
10771
+ "default": "USD",
10772
+ "description": "The currency of the payment.",
10773
+ "_meta": {
10774
+ "description": "The currency of the payment.",
10775
+ "ui": {
10776
+ "widget": "currency"
10777
+ }
10778
+ }
10442
10779
  },
10443
10780
  "method": {
10444
10781
  "type": "text",
10445
10782
  "required": false,
10783
+ "description": "How it was paid: cash, check, card, bank transfer or other.",
10784
+ "_meta": {
10785
+ "description": "How it was paid: cash, check, card, bank transfer or other."
10786
+ },
10446
10787
  "enum": [
10447
10788
  "cash",
10448
10789
  "check",
@@ -10455,6 +10796,10 @@
10455
10796
  "status": {
10456
10797
  "type": "text",
10457
10798
  "required": false,
10799
+ "description": "Whether the payment is pending, completed, failed or refunded.",
10800
+ "_meta": {
10801
+ "description": "Whether the payment is pending, completed, failed or refunded."
10802
+ },
10458
10803
  "enum": [
10459
10804
  "pending",
10460
10805
  "completed",
@@ -10471,7 +10816,11 @@
10471
10816
  "reference": {
10472
10817
  "type": "text",
10473
10818
  "required": false,
10474
- "default": ""
10819
+ "default": "",
10820
+ "description": "A reference note, such as a check number.",
10821
+ "_meta": {
10822
+ "description": "A reference note, such as a check number."
10823
+ }
10475
10824
  },
10476
10825
  "journalId": {
10477
10826
  "type": "crossPackageRef",
@@ -10480,12 +10829,23 @@
10480
10829
  },
10481
10830
  "paidAt": {
10482
10831
  "type": "datetime",
10483
- "required": false
10832
+ "required": false,
10833
+ "description": "When the money was received.",
10834
+ "_meta": {
10835
+ "description": "When the money was received."
10836
+ }
10484
10837
  },
10485
10838
  "notes": {
10486
10839
  "type": "text",
10487
10840
  "required": false,
10488
- "default": ""
10841
+ "default": "",
10842
+ "description": "Anything worth remembering about this payment.",
10843
+ "_meta": {
10844
+ "description": "Anything worth remembering about this payment.",
10845
+ "ui": {
10846
+ "widget": "textarea"
10847
+ }
10848
+ }
10489
10849
  },
10490
10850
  "externalId": {
10491
10851
  "type": "text",
@@ -10884,6 +11244,7 @@
10884
11244
  "className": "PaymentAllocation",
10885
11245
  "qualifiedName": "@happyvertical/smrt-commerce:PaymentAllocation",
10886
11246
  "collection": "paymentallocations",
11247
+ "description": "PaymentAllocation tracks how payments are applied to invoices.",
10887
11248
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/PaymentAllocation.ts",
10888
11249
  "packageName": "@happyvertical/smrt-commerce",
10889
11250
  "fields": {
@@ -10908,21 +11269,37 @@
10908
11269
  "paymentId": {
10909
11270
  "type": "foreignKey",
10910
11271
  "required": false,
10911
- "related": "Payment"
11272
+ "related": "Payment",
11273
+ "description": "The payment being applied.",
11274
+ "_meta": {
11275
+ "description": "The payment being applied."
11276
+ }
10912
11277
  },
10913
11278
  "invoiceId": {
10914
11279
  "type": "foreignKey",
10915
11280
  "required": false,
10916
- "related": "Invoice"
11281
+ "related": "Invoice",
11282
+ "description": "The invoice it settles.",
11283
+ "_meta": {
11284
+ "description": "The invoice it settles."
11285
+ }
10917
11286
  },
10918
11287
  "amount": {
10919
11288
  "type": "integer",
10920
11289
  "required": false,
10921
- "default": 0
11290
+ "default": 0,
11291
+ "description": "How much of the payment goes to this invoice.",
11292
+ "_meta": {
11293
+ "description": "How much of the payment goes to this invoice."
11294
+ }
10922
11295
  },
10923
11296
  "allocatedAt": {
10924
11297
  "type": "datetime",
10925
- "required": false
11298
+ "required": false,
11299
+ "description": "When it was applied.",
11300
+ "_meta": {
11301
+ "description": "When it was applied."
11302
+ }
10926
11303
  },
10927
11304
  "allocatedBy": {
10928
11305
  "type": "text",
@@ -10932,7 +11309,11 @@
10932
11309
  "notes": {
10933
11310
  "type": "text",
10934
11311
  "required": false,
10935
- "default": ""
11312
+ "default": "",
11313
+ "description": "Anything worth remembering about this allocation.",
11314
+ "_meta": {
11315
+ "description": "Anything worth remembering about this allocation."
11316
+ }
10936
11317
  }
10937
11318
  },
10938
11319
  "methods": {
@@ -11099,6 +11480,7 @@
11099
11480
  "className": "PaymentInstrument",
11100
11481
  "qualifiedName": "@happyvertical/smrt-commerce:PaymentInstrument",
11101
11482
  "collection": "paymentinstruments",
11483
+ "description": "PaymentInstrument stores a reusable payment method a customer has saved with a payment backend (e.g. a card vaulted by Stripe), so it can be charged later without the customer present.",
11102
11484
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/PaymentInstrument.ts",
11103
11485
  "packageName": "@happyvertical/smrt-commerce",
11104
11486
  "fields": {
@@ -12302,6 +12684,7 @@
12302
12684
  "className": "Vendor",
12303
12685
  "qualifiedName": "@happyvertical/smrt-commerce:Vendor",
12304
12686
  "collection": "vendors",
12687
+ "description": "Vendor represents the vendor/supplier role for a Profile.",
12305
12688
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Vendor.ts",
12306
12689
  "packageName": "@happyvertical/smrt-commerce",
12307
12690
  "fields": {
@@ -12364,7 +12747,10 @@
12364
12747
  "default": "USD",
12365
12748
  "description": "The currency this vendor bills you in.",
12366
12749
  "_meta": {
12367
- "description": "The currency this vendor bills you in."
12750
+ "description": "The currency this vendor bills you in.",
12751
+ "ui": {
12752
+ "widget": "currency"
12753
+ }
12368
12754
  }
12369
12755
  },
12370
12756
  "defaultContactEmail": {
@@ -12373,7 +12759,10 @@
12373
12759
  "default": "",
12374
12760
  "description": "The email address you normally use to reach this vendor.",
12375
12761
  "_meta": {
12376
- "description": "The email address you normally use to reach this vendor."
12762
+ "description": "The email address you normally use to reach this vendor.",
12763
+ "ui": {
12764
+ "widget": "email"
12765
+ }
12377
12766
  }
12378
12767
  },
12379
12768
  "defaultContactPhone": {
@@ -12382,7 +12771,10 @@
12382
12771
  "default": "",
12383
12772
  "description": "The phone number you normally use to reach this vendor.",
12384
12773
  "_meta": {
12385
- "description": "The phone number you normally use to reach this vendor."
12774
+ "description": "The phone number you normally use to reach this vendor.",
12775
+ "ui": {
12776
+ "widget": "phone"
12777
+ }
12386
12778
  }
12387
12779
  },
12388
12780
  "status": {
@@ -12404,7 +12796,10 @@
12404
12796
  "default": "",
12405
12797
  "description": "Anything worth remembering about this vendor.",
12406
12798
  "_meta": {
12407
- "description": "Anything worth remembering about this vendor."
12799
+ "description": "Anything worth remembering about this vendor.",
12800
+ "ui": {
12801
+ "widget": "textarea"
12802
+ }
12408
12803
  }
12409
12804
  },
12410
12805
  "payoutAddresses": {
@@ -12673,6 +13068,7 @@
12673
13068
  "className": "BillingAccount",
12674
13069
  "qualifiedName": "@happyvertical/smrt-commerce:BillingAccount",
12675
13070
  "collection": "billingaccounts",
13071
+ "description": "One payer's account with one seller: the commerce Customer invoices are issued to, the provider customer they are pushed to, and the payer's billing terms.",
12676
13072
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/billing.ts",
12677
13073
  "packageName": "@happyvertical/smrt-commerce",
12678
13074
  "fields": {
@@ -12939,6 +13335,7 @@
12939
13335
  "className": "BillingPeriodClose",
12940
13336
  "qualifiedName": "@happyvertical/smrt-commerce:BillingPeriodClose",
12941
13337
  "collection": "billingperiodcloses",
13338
+ "description": "The idempotency anchor for one payer's invoice in one currency for one period. Its id is derived from that identity, so a retried close always resumes the same row, invoice, and provider invoice.",
12942
13339
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/billing.ts",
12943
13340
  "packageName": "@happyvertical/smrt-commerce",
12944
13341
  "fields": {
@@ -13310,6 +13707,7 @@
13310
13707
  "className": "BillingLineSource",
13311
13708
  "qualifiedName": "@happyvertical/smrt-commerce:BillingLineSource",
13312
13709
  "collection": "billinglinesources",
13710
+ "description": "A claim that one billable source — a charge, an adjustment, or a window of a flat plan — is billed on exactly one period close.",
13313
13711
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/billing.ts",
13314
13712
  "packageName": "@happyvertical/smrt-commerce",
13315
13713
  "fields": {
@@ -13581,6 +13979,7 @@
13581
13979
  "className": "BillingPaymentAttempt",
13582
13980
  "qualifiedName": "@happyvertical/smrt-commerce:BillingPaymentAttempt",
13583
13981
  "collection": "billingpaymentattempts",
13982
+ "description": "One payment attempt on a payment rail (#3138): a short-lived provider checkout (for example a BTCPay invoice) paying a credit purchase or an issued invoice.",
13584
13983
  "filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/billing.ts",
13585
13984
  "packageName": "@happyvertical/smrt-commerce",
13586
13985
  "fields": {
@@ -14981,29 +15380,167 @@
14981
15380
  "moduleType": "smrt",
14982
15381
  "recipes": [
14983
15382
  {
14984
- "id": "commerce.customers",
14985
- "className": "CustomersRecipe",
14986
- "label": "Customers",
14987
- "summary": "Keep a list of the customers you sell to.",
15383
+ "id": "commerce.agreements",
15384
+ "className": "AgreementsRecipe",
15385
+ "label": "General agreements",
15386
+ "summary": "Keep signed agreements with customers, and see every contract in one list.",
14988
15387
  "synonyms": [
14989
- "clients",
14990
- "buyers",
14991
- "accounts"
15388
+ "contracts",
15389
+ "terms",
15390
+ "deals"
14992
15391
  ],
14993
15392
  "models": [
14994
- "@happyvertical/smrt-commerce:Customer"
15393
+ "@happyvertical/smrt-commerce:Agreement",
15394
+ "@happyvertical/smrt-commerce:Contract",
15395
+ "@happyvertical/smrt-commerce:ContractLineItem"
14995
15396
  ],
14996
15397
  "nav": [
14997
15398
  {
14998
- "label": "Customers",
14999
- "model": "@happyvertical/smrt-commerce:Customer"
15399
+ "label": "Agreements",
15400
+ "model": "@happyvertical/smrt-commerce:Agreement",
15401
+ "icon": "fileText",
15402
+ "description": "Signed deals and terms with your customers, in one place."
15403
+ },
15404
+ {
15405
+ "label": "All contracts",
15406
+ "model": "@happyvertical/smrt-commerce:Contract",
15407
+ "icon": "fileText",
15408
+ "description": "Every contract you hold, whoever it is with."
15000
15409
  }
15001
15410
  ],
15002
- "requires": [],
15003
- "help": {
15004
- "markdown": "## Overview\n\nCustomers is your address book for the people and businesses you sell to. Keep\none record for each customer so you can see who they are, how they like to pay\nand what you have agreed with them, then refer back to them whenever you take an\norder.\n\n## Tasks\n\n### Add a new customer\n\n1. Choose the **New** button above the list.\n2. Describe the customer with **{field:customerType}**: a direct shopper, a\n wholesale buyer or a retail customer. Note in **{field:status}** whether you\n are still dealing with them.\n3. Fill in the **{field:defaultShippingAddress}** and\n **{field:defaultBillingAddress}** so you do not have to type them again on\n every order.\n4. Add **{field:paymentTerms}**, for example \"Net 30\", if you give this\n customer time to pay.\n5. Save. The customer is now on your list and ready to use on a sales order.\n\n### Keep track of what a customer can owe\n\n1. Open the customer from the list and choose Edit.\n2. Set **{field:creditLimit}** to the most you are comfortable letting them owe\n you at one time.\n3. If you do not charge them sales tax, turn on **{field:taxExempt}**, and keep\n their tax number on file.\n4. Use **{field:notes}** for anything the next person who deals with this\n customer should know.\n\n### Find a customer\n\nScan the list for the customer you want, or open a record to see everything you\nhave on file. To stop dealing with someone without losing their history, change\ntheir **{field:status}** to inactive instead of deleting them.\n",
15005
- "fieldRefs": [
15006
- "creditLimit",
15411
+ "requires": [
15412
+ "commerce.customers"
15413
+ ],
15414
+ "group": {
15415
+ "id": "agreements",
15416
+ "label": "Agreements",
15417
+ "summary": "Contracts with customers: general agreements, leases and licence sales."
15418
+ },
15419
+ "section": {
15420
+ "id": "agreements",
15421
+ "label": "Agreements",
15422
+ "icon": "fileText",
15423
+ "description": "Contracts, leases and licenses with customers."
15424
+ },
15425
+ "options": {
15426
+ "@happyvertical/smrt-commerce:Agreement": {
15427
+ "fields": {
15428
+ "contractType": {
15429
+ "default": "agreement",
15430
+ "visibility": "hidden",
15431
+ "locked": true
15432
+ },
15433
+ "customerId": {
15434
+ "label": "Customer",
15435
+ "order": 1,
15436
+ "required": true
15437
+ },
15438
+ "vendorId": {
15439
+ "visibility": "hidden"
15440
+ },
15441
+ "subtotal": {
15442
+ "visibility": "hidden"
15443
+ },
15444
+ "taxAmount": {
15445
+ "visibility": "hidden"
15446
+ },
15447
+ "channelId": {
15448
+ "visibility": "hidden"
15449
+ }
15450
+ }
15451
+ },
15452
+ "@happyvertical/smrt-commerce:ContractLineItem": {
15453
+ "fields": {
15454
+ "sku": {
15455
+ "visibility": "hidden"
15456
+ },
15457
+ "startDate": {
15458
+ "visibility": "hidden"
15459
+ },
15460
+ "endDate": {
15461
+ "visibility": "hidden"
15462
+ },
15463
+ "billingPeriod": {
15464
+ "visibility": "hidden"
15465
+ },
15466
+ "sortOrder": {
15467
+ "visibility": "hidden"
15468
+ },
15469
+ "discount": {
15470
+ "visibility": "hidden"
15471
+ },
15472
+ "taxRate": {
15473
+ "help": "Type a percentage: 5 means 5%."
15474
+ }
15475
+ }
15476
+ },
15477
+ "@happyvertical/smrt-commerce:Contract": {
15478
+ "fields": {
15479
+ "channelId": {
15480
+ "visibility": "hidden"
15481
+ }
15482
+ }
15483
+ }
15484
+ },
15485
+ "help": {
15486
+ "markdown": "## Overview\n\nAgreements are contracts you keep with customers. General agreements live here;\nleases and licence sales are separate recipes in the same group.\n**All contracts** lists every kind together, including orders and quotes.\n\n## Tasks\n\n### Record an agreement\n\n1. Create a new agreement.\n2. Pick the **{field:customerId}**.\n3. Set the **{field:issueDate}** and **{field:expiryDate}**.\n4. Put the conditions in **{field:terms}** and save.\n\n### Follow it\n\n1. Update **{field:status}** from draft to accepted to completed.\n2. Check **{field:expiryDate}** to spot agreements about to lapse.\n",
15487
+ "fieldRefs": [
15488
+ "customerId",
15489
+ "expiryDate",
15490
+ "issueDate",
15491
+ "status",
15492
+ "terms"
15493
+ ]
15494
+ },
15495
+ "demo": {
15496
+ "mode": "server",
15497
+ "reasons": [
15498
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
15499
+ ]
15500
+ }
15501
+ },
15502
+ {
15503
+ "id": "commerce.customers",
15504
+ "className": "CustomersRecipe",
15505
+ "label": "Customers",
15506
+ "summary": "Keep a list of the people and companies you sell to.",
15507
+ "synonyms": [
15508
+ "clients",
15509
+ "buyers",
15510
+ "accounts"
15511
+ ],
15512
+ "models": [
15513
+ "@happyvertical/smrt-commerce:Customer"
15514
+ ],
15515
+ "nav": [
15516
+ {
15517
+ "label": "Customers",
15518
+ "model": "@happyvertical/smrt-commerce:Customer",
15519
+ "icon": "users",
15520
+ "description": "The people and companies you sell to, with how to reach them."
15521
+ }
15522
+ ],
15523
+ "requires": [],
15524
+ "section": {
15525
+ "id": "sales",
15526
+ "label": "Sales",
15527
+ "icon": "shoppingBag",
15528
+ "description": "Customers, orders and quotes: everything you sell."
15529
+ },
15530
+ "options": {
15531
+ "@happyvertical/smrt-commerce:Customer": {
15532
+ "fields": {
15533
+ "profileId": {
15534
+ "label": "Name",
15535
+ "order": -1
15536
+ }
15537
+ }
15538
+ }
15539
+ },
15540
+ "help": {
15541
+ "markdown": "## Overview\n\nCustomers is your address book for the people and businesses you sell to. Keep\none record for each customer so you can see who they are, how they like to pay\nand what you have agreed with them, then refer back to them whenever you take an\norder.\n\n## Tasks\n\n### Add a new customer\n\n1. Choose the **New** button above the list.\n2. Describe the customer with **{field:customerType}**: a direct shopper, a\n wholesale buyer or a retail customer. Note in **{field:status}** whether you\n are still dealing with them.\n3. Fill in the **{field:defaultShippingAddress}** and\n **{field:defaultBillingAddress}** so you do not have to type them again on\n every order.\n4. Add **{field:paymentTerms}**, for example \"Net 30\", if you give this\n customer time to pay.\n5. Save. The customer is now on your list and ready to use on a sales order.\n\n### Keep track of what a customer can owe\n\n1. Open the customer from the list and choose Edit.\n2. Set **{field:creditLimit}** to the most you are comfortable letting them owe\n you at one time.\n3. If you do not charge them sales tax, turn on **{field:taxExempt}**, and keep\n their tax number on file.\n4. Use **{field:notes}** for anything the next person who deals with this\n customer should know.\n\n### Find a customer\n\nScan the list for the customer you want, or open a record to see everything you\nhave on file. To stop dealing with someone without losing their history, change\ntheir **{field:status}** to inactive instead of deleting them.\n",
15542
+ "fieldRefs": [
15543
+ "creditLimit",
15007
15544
  "customerType",
15008
15545
  "defaultBillingAddress",
15009
15546
  "defaultShippingAddress",
@@ -15012,30 +15549,621 @@
15012
15549
  "status",
15013
15550
  "taxExempt"
15014
15551
  ]
15552
+ },
15553
+ "demo": {
15554
+ "mode": "server",
15555
+ "reasons": [
15556
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
15557
+ ]
15558
+ }
15559
+ },
15560
+ {
15561
+ "id": "commerce.estimates",
15562
+ "className": "EstimatesRecipe",
15563
+ "label": "Estimates",
15564
+ "summary": "Send customers a price quote before they commit.",
15565
+ "synonyms": [
15566
+ "quotes",
15567
+ "quotations",
15568
+ "proposals",
15569
+ "bids"
15570
+ ],
15571
+ "models": [
15572
+ "@happyvertical/smrt-commerce:Estimate",
15573
+ "@happyvertical/smrt-commerce:ContractLineItem"
15574
+ ],
15575
+ "nav": [
15576
+ {
15577
+ "label": "Estimates",
15578
+ "model": "@happyvertical/smrt-commerce:Estimate",
15579
+ "icon": "fileText",
15580
+ "description": "Price quotes you have sent to customers."
15581
+ }
15582
+ ],
15583
+ "requires": [
15584
+ "commerce.customers"
15585
+ ],
15586
+ "section": {
15587
+ "id": "sales",
15588
+ "label": "Sales",
15589
+ "icon": "shoppingBag",
15590
+ "description": "Customers, orders and quotes: everything you sell."
15591
+ },
15592
+ "options": {
15593
+ "@happyvertical/smrt-commerce:Estimate": {
15594
+ "fields": {
15595
+ "contractType": {
15596
+ "default": "estimate",
15597
+ "visibility": "hidden",
15598
+ "locked": true
15599
+ },
15600
+ "vendorId": {
15601
+ "visibility": "hidden",
15602
+ "locked": true
15603
+ },
15604
+ "customerId": {
15605
+ "label": "Customer",
15606
+ "order": 1,
15607
+ "required": true
15608
+ },
15609
+ "channelId": {
15610
+ "visibility": "hidden"
15611
+ }
15612
+ }
15613
+ },
15614
+ "@happyvertical/smrt-commerce:ContractLineItem": {
15615
+ "fields": {
15616
+ "sku": {
15617
+ "visibility": "hidden"
15618
+ },
15619
+ "startDate": {
15620
+ "visibility": "hidden"
15621
+ },
15622
+ "endDate": {
15623
+ "visibility": "hidden"
15624
+ },
15625
+ "billingPeriod": {
15626
+ "visibility": "hidden"
15627
+ },
15628
+ "sortOrder": {
15629
+ "visibility": "hidden"
15630
+ },
15631
+ "discount": {
15632
+ "visibility": "hidden"
15633
+ },
15634
+ "taxRate": {
15635
+ "help": "Type a percentage: 5 means 5%."
15636
+ }
15637
+ }
15638
+ }
15639
+ },
15640
+ "help": {
15641
+ "markdown": "## Overview\n\nEstimates are price quotes you send before a customer commits. Each one belongs\nto a customer, lists its line items and shows how long the price is good for.\n\n## Tasks\n\n### Write an estimate\n\n1. Create a new estimate.\n2. Pick the **{field:customerId}** the quote is for.\n3. Add the line items, then check the **{field:totalAmount}**.\n4. Set **{field:expiryDate}** to the last day the price is good for.\n5. Put your conditions in **{field:terms}** and save.\n\n### Follow it up\n\n1. Set **{field:status}** to sent once it goes out.\n2. Move it to accepted or declined when the customer answers.\n",
15642
+ "fieldRefs": [
15643
+ "customerId",
15644
+ "expiryDate",
15645
+ "status",
15646
+ "terms",
15647
+ "totalAmount"
15648
+ ]
15649
+ },
15650
+ "demo": {
15651
+ "mode": "server",
15652
+ "reasons": [
15653
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
15654
+ ]
15655
+ }
15656
+ },
15657
+ {
15658
+ "id": "commerce.fulfillment",
15659
+ "className": "FulfillmentRecipe",
15660
+ "label": "Shipping",
15661
+ "summary": "Pack, ship and deliver orders, with tracking.",
15662
+ "synonyms": [
15663
+ "fulfillment",
15664
+ "delivery",
15665
+ "shipments",
15666
+ "tracking"
15667
+ ],
15668
+ "models": [
15669
+ "@happyvertical/smrt-commerce:Fulfillment",
15670
+ "@happyvertical/smrt-commerce:FulfillmentLineItem"
15671
+ ],
15672
+ "nav": [
15673
+ {
15674
+ "label": "Shipments",
15675
+ "model": "@happyvertical/smrt-commerce:Fulfillment",
15676
+ "icon": "truck",
15677
+ "description": "What has gone out the door and where it is now."
15678
+ }
15679
+ ],
15680
+ "requires": [],
15681
+ "requiresAny": [
15682
+ [
15683
+ "commerce.sales",
15684
+ "commerce.wholesale"
15685
+ ]
15686
+ ],
15687
+ "group": {
15688
+ "id": "billing",
15689
+ "label": "Billing & shipping",
15690
+ "summary": "Invoice your customers, record what they pay and ship what they ordered."
15691
+ },
15692
+ "section": {
15693
+ "id": "operations",
15694
+ "label": "Operations",
15695
+ "icon": "wrench",
15696
+ "description": "Fulfillment and the day-to-day work behind an order."
15697
+ },
15698
+ "options": {
15699
+ "@happyvertical/smrt-commerce:Fulfillment": {
15700
+ "fields": {
15701
+ "estimatedDelivery": {
15702
+ "visibility": "hidden"
15703
+ },
15704
+ "shippingAddress": {
15705
+ "visibility": "hidden"
15706
+ }
15707
+ }
15708
+ },
15709
+ "@happyvertical/smrt-commerce:FulfillmentLineItem": {
15710
+ "fields": {
15711
+ "notes": {
15712
+ "visibility": "hidden"
15713
+ }
15714
+ }
15715
+ }
15716
+ },
15717
+ "help": {
15718
+ "markdown": "## Overview\n\nShipping tracks how an order gets to the customer. Each shipment belongs to an\norder and lists which line items are in it, so an order can go out in parts.\n\n## Tasks\n\n### Ship an order\n\n1. Create a new shipment.\n2. Pick the order in **{field:contractId}** and choose the\n **{field:fulfillmentType}**.\n3. Enter the **{field:carrier}** and **{field:trackingNumber}**.\n4. List the items and quantities in the shipment.\n5. Set **{field:status}** to shipped and record **{field:shippedAt}**.\n\n### Confirm delivery\n\n1. Open the shipment and set **{field:status}** to delivered.\n2. Record **{field:deliveredAt}**.\n",
15719
+ "fieldRefs": [
15720
+ "carrier",
15721
+ "contractId",
15722
+ "deliveredAt",
15723
+ "fulfillmentType",
15724
+ "shippedAt",
15725
+ "status",
15726
+ "trackingNumber"
15727
+ ]
15728
+ },
15729
+ "demo": {
15730
+ "mode": "server",
15731
+ "reasons": [
15732
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
15733
+ ]
15734
+ }
15735
+ },
15736
+ {
15737
+ "id": "commerce.invoicing",
15738
+ "className": "InvoicingRecipe",
15739
+ "label": "Invoicing",
15740
+ "summary": "Bill customers and record the payments that come in.",
15741
+ "synonyms": [
15742
+ "invoices",
15743
+ "billing",
15744
+ "payments",
15745
+ "receivables"
15746
+ ],
15747
+ "models": [
15748
+ "@happyvertical/smrt-commerce:Invoice",
15749
+ "@happyvertical/smrt-commerce:InvoiceLineItem",
15750
+ "@happyvertical/smrt-commerce:Payment",
15751
+ "@happyvertical/smrt-commerce:PaymentAllocation"
15752
+ ],
15753
+ "nav": [
15754
+ {
15755
+ "label": "Invoices",
15756
+ "model": "@happyvertical/smrt-commerce:Invoice",
15757
+ "icon": "receipt",
15758
+ "description": "Bills you have sent and which ones are still waiting to be paid."
15759
+ },
15760
+ {
15761
+ "label": "Payments",
15762
+ "model": "@happyvertical/smrt-commerce:Payment",
15763
+ "icon": "creditCard",
15764
+ "description": "Money received, matched to the invoices it paid."
15765
+ }
15766
+ ],
15767
+ "requires": [
15768
+ "commerce.customers"
15769
+ ],
15770
+ "group": {
15771
+ "id": "billing",
15772
+ "label": "Billing & shipping",
15773
+ "summary": "Invoice your customers, record what they pay and ship what they ordered."
15774
+ },
15775
+ "section": {
15776
+ "id": "billing",
15777
+ "label": "Billing",
15778
+ "icon": "receipt",
15779
+ "description": "Invoices and the payments against them."
15780
+ },
15781
+ "options": {
15782
+ "@happyvertical/smrt-commerce:Invoice": {
15783
+ "fields": {
15784
+ "providerTaxAmount": {
15785
+ "visibility": "hidden"
15786
+ },
15787
+ "arJournalId": {
15788
+ "visibility": "hidden"
15789
+ },
15790
+ "revenueJournalId": {
15791
+ "visibility": "hidden"
15792
+ },
15793
+ "externalId": {
15794
+ "visibility": "hidden"
15795
+ },
15796
+ "customerExternalId": {
15797
+ "visibility": "hidden"
15798
+ },
15799
+ "externalProvider": {
15800
+ "visibility": "hidden"
15801
+ },
15802
+ "syncedAt": {
15803
+ "visibility": "hidden"
15804
+ },
15805
+ "collectionMethod": {
15806
+ "visibility": "hidden"
15807
+ },
15808
+ "sentAt": {
15809
+ "visibility": "hidden"
15810
+ },
15811
+ "viewedAt": {
15812
+ "visibility": "hidden"
15813
+ },
15814
+ "remindersSent": {
15815
+ "visibility": "hidden"
15816
+ },
15817
+ "lastReminderAt": {
15818
+ "visibility": "hidden"
15819
+ },
15820
+ "reference": {
15821
+ "visibility": "hidden"
15822
+ },
15823
+ "customerId": {
15824
+ "required": true
15825
+ }
15826
+ }
15827
+ },
15828
+ "@happyvertical/smrt-commerce:InvoiceLineItem": {
15829
+ "fields": {
15830
+ "invoiceEditorStateJson": {
15831
+ "visibility": "hidden"
15832
+ },
15833
+ "sourceType": {
15834
+ "visibility": "hidden"
15835
+ },
15836
+ "sourceId": {
15837
+ "visibility": "hidden"
15838
+ },
15839
+ "periodStart": {
15840
+ "visibility": "hidden"
15841
+ },
15842
+ "periodEnd": {
15843
+ "visibility": "hidden"
15844
+ },
15845
+ "revenueAccountId": {
15846
+ "visibility": "hidden"
15847
+ },
15848
+ "sortOrder": {
15849
+ "visibility": "hidden"
15850
+ },
15851
+ "sku": {
15852
+ "visibility": "hidden"
15853
+ },
15854
+ "discount": {
15855
+ "visibility": "hidden"
15856
+ },
15857
+ "taxRate": {
15858
+ "help": "Type a percentage: 5 means 5%."
15859
+ }
15860
+ }
15861
+ },
15862
+ "@happyvertical/smrt-commerce:Payment": {
15863
+ "fields": {
15864
+ "journalId": {
15865
+ "visibility": "hidden"
15866
+ },
15867
+ "externalId": {
15868
+ "visibility": "hidden"
15869
+ },
15870
+ "externalProvider": {
15871
+ "visibility": "hidden"
15872
+ },
15873
+ "syncedAt": {
15874
+ "visibility": "hidden"
15875
+ },
15876
+ "backendId": {
15877
+ "visibility": "hidden"
15878
+ },
15879
+ "backendTxRef": {
15880
+ "visibility": "hidden"
15881
+ },
15882
+ "nativeAmount": {
15883
+ "visibility": "hidden"
15884
+ },
15885
+ "nativeCurrency": {
15886
+ "visibility": "hidden"
15887
+ },
15888
+ "usdAtQuote": {
15889
+ "visibility": "hidden"
15890
+ },
15891
+ "usdAtConfirmation": {
15892
+ "visibility": "hidden"
15893
+ },
15894
+ "transactionId": {
15895
+ "visibility": "hidden"
15896
+ }
15897
+ }
15898
+ },
15899
+ "@happyvertical/smrt-commerce:PaymentAllocation": {
15900
+ "fields": {
15901
+ "allocatedBy": {
15902
+ "visibility": "hidden"
15903
+ }
15904
+ }
15905
+ }
15906
+ },
15907
+ "help": {
15908
+ "markdown": "## Overview\n\nInvoicing bills your customers and records what they pay. An invoice lists its\nline items; a payment can be spread across one or more invoices.\n\n## Tasks\n\n### Send an invoice\n\n1. Create a new invoice.\n2. Pick the **{field:customerId}** and add the line items.\n3. Check the **{field:totalAmount}** and set the **{field:dueDate}**.\n4. Set **{field:status}** to sent once it goes out.\n\n### Record a payment\n\n1. Create a new payment.\n2. Pick the **{field:customerId}**, then enter the **{field:Payment.amount}** and the\n **{field:method}** used.\n3. Set **{field:Payment.status}** to completed once the money has arrived.\n4. Apply it to the invoices it settles; each one shows what is still owed.\n",
15909
+ "fieldRefs": [
15910
+ "Payment.amount",
15911
+ "Payment.status",
15912
+ "customerId",
15913
+ "dueDate",
15914
+ "method",
15915
+ "status",
15916
+ "totalAmount"
15917
+ ]
15918
+ },
15919
+ "demo": {
15920
+ "mode": "server",
15921
+ "reasons": [
15922
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
15923
+ ]
15924
+ }
15925
+ },
15926
+ {
15927
+ "id": "commerce.leases",
15928
+ "className": "LeasesRecipe",
15929
+ "label": "Leases",
15930
+ "summary": "Rent things out and track the term and the payments due.",
15931
+ "synonyms": [
15932
+ "rentals",
15933
+ "renting",
15934
+ "hire"
15935
+ ],
15936
+ "models": [
15937
+ "@happyvertical/smrt-commerce:Lease",
15938
+ "@happyvertical/smrt-commerce:ContractLineItem"
15939
+ ],
15940
+ "nav": [
15941
+ {
15942
+ "label": "Leases",
15943
+ "model": "@happyvertical/smrt-commerce:Lease",
15944
+ "icon": "home",
15945
+ "description": "Rentals you give or take, with terms and dates."
15946
+ }
15947
+ ],
15948
+ "requires": [
15949
+ "commerce.customers"
15950
+ ],
15951
+ "group": {
15952
+ "id": "agreements",
15953
+ "label": "Agreements",
15954
+ "summary": "Contracts with customers: general agreements, leases and licence sales."
15955
+ },
15956
+ "section": {
15957
+ "id": "agreements",
15958
+ "label": "Agreements",
15959
+ "icon": "fileText",
15960
+ "description": "Contracts, leases and licenses with customers."
15961
+ },
15962
+ "options": {
15963
+ "@happyvertical/smrt-commerce:Lease": {
15964
+ "fields": {
15965
+ "contractType": {
15966
+ "default": "lease",
15967
+ "visibility": "hidden",
15968
+ "locked": true
15969
+ },
15970
+ "customerId": {
15971
+ "label": "Customer",
15972
+ "order": 1,
15973
+ "required": true
15974
+ },
15975
+ "vendorId": {
15976
+ "visibility": "hidden"
15977
+ },
15978
+ "subtotal": {
15979
+ "visibility": "hidden"
15980
+ },
15981
+ "taxAmount": {
15982
+ "visibility": "hidden"
15983
+ },
15984
+ "channelId": {
15985
+ "visibility": "hidden"
15986
+ }
15987
+ }
15988
+ },
15989
+ "@happyvertical/smrt-commerce:ContractLineItem": {
15990
+ "fields": {
15991
+ "sku": {
15992
+ "visibility": "hidden"
15993
+ },
15994
+ "startDate": {
15995
+ "visibility": "hidden"
15996
+ },
15997
+ "endDate": {
15998
+ "visibility": "hidden"
15999
+ },
16000
+ "billingPeriod": {
16001
+ "visibility": "hidden"
16002
+ },
16003
+ "sortOrder": {
16004
+ "visibility": "hidden"
16005
+ },
16006
+ "discount": {
16007
+ "visibility": "hidden"
16008
+ },
16009
+ "taxRate": {
16010
+ "help": "Type a percentage: 5 means 5%."
16011
+ }
16012
+ }
16013
+ }
16014
+ },
16015
+ "help": {
16016
+ "markdown": "## Overview\n\nLeases are agreements where a customer rents something from you for a period.\nEach lease keeps its own line items and dates.\n\n## Tasks\n\n### Record a lease\n\n1. Create a new lease.\n2. Pick the **{field:customerId}** renting from you.\n3. Set the **{field:issueDate}** it starts and the **{field:expiryDate}** it ends.\n4. Add a line item for each thing rented, then save.\n\n### Keep an eye on it\n\n1. Update **{field:status}** as the lease goes from draft to accepted to\n completed.\n2. Check **{field:expiryDate}** to see which leases end soon.\n",
16017
+ "fieldRefs": [
16018
+ "customerId",
16019
+ "expiryDate",
16020
+ "issueDate",
16021
+ "status"
16022
+ ]
16023
+ },
16024
+ "demo": {
16025
+ "mode": "server",
16026
+ "reasons": [
16027
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16028
+ ]
16029
+ }
16030
+ },
16031
+ {
16032
+ "id": "commerce.licenses",
16033
+ "className": "LicensesRecipe",
16034
+ "label": "Licence sales",
16035
+ "summary": "Sell licences to software, content or other rights.",
16036
+ "synonyms": [
16037
+ "licenses",
16038
+ "licensing",
16039
+ "subscriptions"
16040
+ ],
16041
+ "models": [
16042
+ "@happyvertical/smrt-commerce:LicenseSale",
16043
+ "@happyvertical/smrt-commerce:ContractLineItem"
16044
+ ],
16045
+ "nav": [
16046
+ {
16047
+ "label": "Licence sales",
16048
+ "model": "@happyvertical/smrt-commerce:LicenseSale",
16049
+ "icon": "shoppingBag",
16050
+ "description": "Licences you have sold and who holds them."
16051
+ }
16052
+ ],
16053
+ "requires": [
16054
+ "commerce.customers"
16055
+ ],
16056
+ "group": {
16057
+ "id": "agreements",
16058
+ "label": "Agreements",
16059
+ "summary": "Contracts with customers: general agreements, leases and licence sales."
16060
+ },
16061
+ "section": {
16062
+ "id": "agreements",
16063
+ "label": "Agreements",
16064
+ "icon": "fileText",
16065
+ "description": "Contracts, leases and licenses with customers."
16066
+ },
16067
+ "options": {
16068
+ "@happyvertical/smrt-commerce:LicenseSale": {
16069
+ "fields": {
16070
+ "contractType": {
16071
+ "default": "license_sale",
16072
+ "visibility": "hidden",
16073
+ "locked": true
16074
+ },
16075
+ "customerId": {
16076
+ "label": "Customer",
16077
+ "order": 1,
16078
+ "required": true
16079
+ },
16080
+ "vendorId": {
16081
+ "visibility": "hidden"
16082
+ },
16083
+ "subtotal": {
16084
+ "visibility": "hidden"
16085
+ },
16086
+ "taxAmount": {
16087
+ "visibility": "hidden"
16088
+ },
16089
+ "channelId": {
16090
+ "visibility": "hidden"
16091
+ }
16092
+ }
16093
+ },
16094
+ "@happyvertical/smrt-commerce:ContractLineItem": {
16095
+ "fields": {
16096
+ "sku": {
16097
+ "visibility": "hidden"
16098
+ },
16099
+ "startDate": {
16100
+ "visibility": "hidden"
16101
+ },
16102
+ "endDate": {
16103
+ "visibility": "hidden"
16104
+ },
16105
+ "billingPeriod": {
16106
+ "visibility": "hidden"
16107
+ },
16108
+ "sortOrder": {
16109
+ "visibility": "hidden"
16110
+ },
16111
+ "discount": {
16112
+ "visibility": "hidden"
16113
+ },
16114
+ "taxRate": {
16115
+ "help": "Type a percentage: 5 means 5%."
16116
+ }
16117
+ }
16118
+ }
16119
+ },
16120
+ "help": {
16121
+ "markdown": "## Overview\n\nLicence sales record selling the right to use something, such as software or\ncontent, rather than a physical item.\n\n## Tasks\n\n### Record a licence sale\n\n1. Create a new licence sale.\n2. Pick the **{field:customerId}** who bought the licence.\n3. Add a line item for what is licensed and check the **{field:totalAmount}**.\n4. Set the **{field:expiryDate}** if the licence runs out, then save.\n\n### Follow it\n\n1. Update **{field:status}** when the customer accepts or the sale completes.\n",
16122
+ "fieldRefs": [
16123
+ "customerId",
16124
+ "expiryDate",
16125
+ "status",
16126
+ "totalAmount"
16127
+ ]
16128
+ },
16129
+ "demo": {
16130
+ "mode": "server",
16131
+ "reasons": [
16132
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16133
+ ]
15015
16134
  }
15016
16135
  },
15017
16136
  {
15018
16137
  "id": "commerce.purchases",
15019
16138
  "className": "PurchasesRecipe",
15020
16139
  "label": "Purchases",
15021
- "summary": "Place orders with vendors and track them.",
16140
+ "summary": "Order from your vendors and track what you have bought.",
15022
16141
  "synonyms": [
15023
16142
  "purchase orders",
15024
16143
  "buying",
15025
16144
  "procurement"
15026
16145
  ],
15027
16146
  "models": [
15028
- "@happyvertical/smrt-commerce:PurchaseOrder"
16147
+ "@happyvertical/smrt-commerce:PurchaseOrder",
16148
+ "@happyvertical/smrt-commerce:ContractLineItem"
15029
16149
  ],
15030
16150
  "nav": [
15031
16151
  {
15032
- "label": "Purchase Orders",
15033
- "model": "@happyvertical/smrt-commerce:PurchaseOrder"
16152
+ "label": "Purchase orders",
16153
+ "model": "@happyvertical/smrt-commerce:PurchaseOrder",
16154
+ "icon": "truck",
16155
+ "description": "What you have ordered from your suppliers and when it arrives."
15034
16156
  }
15035
16157
  ],
15036
16158
  "requires": [
15037
16159
  "commerce.vendors"
15038
16160
  ],
16161
+ "section": {
16162
+ "id": "purchasing",
16163
+ "label": "Purchasing",
16164
+ "icon": "truck",
16165
+ "description": "Vendors and purchase orders: everything you buy."
16166
+ },
15039
16167
  "options": {
15040
16168
  "@happyvertical/smrt-commerce:PurchaseOrder": {
15041
16169
  "fields": {
@@ -15051,6 +16179,37 @@
15051
16179
  "vendorId": {
15052
16180
  "label": "Vendor",
15053
16181
  "order": 1
16182
+ },
16183
+ "channelId": {
16184
+ "visibility": "hidden"
16185
+ },
16186
+ "expiryDate": {
16187
+ "visibility": "hidden"
16188
+ }
16189
+ }
16190
+ },
16191
+ "@happyvertical/smrt-commerce:ContractLineItem": {
16192
+ "fields": {
16193
+ "sku": {
16194
+ "visibility": "hidden"
16195
+ },
16196
+ "startDate": {
16197
+ "visibility": "hidden"
16198
+ },
16199
+ "endDate": {
16200
+ "visibility": "hidden"
16201
+ },
16202
+ "billingPeriod": {
16203
+ "visibility": "hidden"
16204
+ },
16205
+ "sortOrder": {
16206
+ "visibility": "hidden"
16207
+ },
16208
+ "discount": {
16209
+ "visibility": "hidden"
16210
+ },
16211
+ "taxRate": {
16212
+ "help": "Type a percentage: 5 means 5%."
15054
16213
  }
15055
16214
  }
15056
16215
  }
@@ -15070,6 +16229,12 @@
15070
16229
  "totalAmount",
15071
16230
  "vendorId"
15072
16231
  ]
16232
+ },
16233
+ "demo": {
16234
+ "mode": "server",
16235
+ "reasons": [
16236
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16237
+ ]
15073
16238
  }
15074
16239
  },
15075
16240
  {
@@ -15083,17 +16248,26 @@
15083
16248
  "customer orders"
15084
16249
  ],
15085
16250
  "models": [
15086
- "@happyvertical/smrt-commerce:Order"
16251
+ "@happyvertical/smrt-commerce:Order",
16252
+ "@happyvertical/smrt-commerce:ContractLineItem"
15087
16253
  ],
15088
16254
  "nav": [
15089
16255
  {
15090
- "label": "Sales Orders",
15091
- "model": "@happyvertical/smrt-commerce:Order"
16256
+ "label": "Sales orders",
16257
+ "model": "@happyvertical/smrt-commerce:Order",
16258
+ "icon": "shoppingBag",
16259
+ "description": "Orders from your customers, from placed to delivered."
15092
16260
  }
15093
16261
  ],
15094
16262
  "requires": [
15095
16263
  "commerce.customers"
15096
16264
  ],
16265
+ "section": {
16266
+ "id": "sales",
16267
+ "label": "Sales",
16268
+ "icon": "shoppingBag",
16269
+ "description": "Customers, orders and quotes: everything you sell."
16270
+ },
15097
16271
  "options": {
15098
16272
  "@happyvertical/smrt-commerce:Order": {
15099
16273
  "fields": {
@@ -15108,7 +16282,39 @@
15108
16282
  },
15109
16283
  "customerId": {
15110
16284
  "label": "Customer",
15111
- "order": 1
16285
+ "order": 1,
16286
+ "required": true
16287
+ },
16288
+ "channelId": {
16289
+ "visibility": "hidden"
16290
+ },
16291
+ "expiryDate": {
16292
+ "visibility": "hidden"
16293
+ }
16294
+ }
16295
+ },
16296
+ "@happyvertical/smrt-commerce:ContractLineItem": {
16297
+ "fields": {
16298
+ "sku": {
16299
+ "visibility": "hidden"
16300
+ },
16301
+ "startDate": {
16302
+ "visibility": "hidden"
16303
+ },
16304
+ "endDate": {
16305
+ "visibility": "hidden"
16306
+ },
16307
+ "billingPeriod": {
16308
+ "visibility": "hidden"
16309
+ },
16310
+ "sortOrder": {
16311
+ "visibility": "hidden"
16312
+ },
16313
+ "discount": {
16314
+ "visibility": "hidden"
16315
+ },
16316
+ "taxRate": {
16317
+ "help": "Type a percentage: 5 means 5%."
15112
16318
  }
15113
16319
  }
15114
16320
  }
@@ -15128,13 +16334,19 @@
15128
16334
  "terms",
15129
16335
  "totalAmount"
15130
16336
  ]
16337
+ },
16338
+ "demo": {
16339
+ "mode": "server",
16340
+ "reasons": [
16341
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16342
+ ]
15131
16343
  }
15132
16344
  },
15133
16345
  {
15134
16346
  "id": "commerce.vendors",
15135
16347
  "className": "VendorsRecipe",
15136
16348
  "label": "Vendors",
15137
- "summary": "Keep a list of the vendors and suppliers you buy from.",
16349
+ "summary": "Keep a list of the suppliers you buy from.",
15138
16350
  "synonyms": [
15139
16351
  "suppliers",
15140
16352
  "sellers"
@@ -15145,10 +16357,28 @@
15145
16357
  "nav": [
15146
16358
  {
15147
16359
  "label": "Vendors",
15148
- "model": "@happyvertical/smrt-commerce:Vendor"
16360
+ "model": "@happyvertical/smrt-commerce:Vendor",
16361
+ "icon": "briefcase",
16362
+ "description": "The suppliers you buy from, with terms and contacts."
15149
16363
  }
15150
16364
  ],
15151
16365
  "requires": [],
16366
+ "section": {
16367
+ "id": "purchasing",
16368
+ "label": "Purchasing",
16369
+ "icon": "truck",
16370
+ "description": "Vendors and purchase orders: everything you buy."
16371
+ },
16372
+ "options": {
16373
+ "@happyvertical/smrt-commerce:Vendor": {
16374
+ "fields": {
16375
+ "profileId": {
16376
+ "label": "Name",
16377
+ "order": -1
16378
+ }
16379
+ }
16380
+ }
16381
+ },
15152
16382
  "help": {
15153
16383
  "markdown": "## Overview\n\nVendors is your list of the suppliers you buy from. Each record holds who they\nare, how to reach them and the terms you have agreed, so you can order from them\nquickly and keep track of what you have bought.\n\n## Tasks\n\n### Add a vendor\n\n1. Choose the **New** button above the list.\n2. Enter **{field:defaultContactEmail}** and **{field:defaultContactPhone}** for\n the person you normally deal with.\n3. Set the **{field:currency}** they bill you in and your **{field:paymentTerms}**,\n for example \"Net 30\".\n4. Save. The vendor is now on your list and ready to use on a purchase order.\n\n### Note how a vendor likes to work\n\n1. Open the vendor from the list and choose Edit.\n2. Enter **{field:leadTimeDays}**, the number of days they usually need between\n your order and delivery, so you can plan ahead.\n3. Enter **{field:minimumOrderAmount}** if they will not accept small orders.\n4. Use **{field:notes}** for anything else worth remembering, such as the best\n time to call.\n\n### Keep payment details in one place\n\n1. Open the vendor and choose Edit.\n2. Record where payments to this vendor should be sent, so it is all in one\n place.\n3. Set **{field:status}** to show whether you still buy from them: active,\n inactive or suspended.\n",
15154
16384
  "fieldRefs": [
@@ -15161,9 +16391,127 @@
15161
16391
  "paymentTerms",
15162
16392
  "status"
15163
16393
  ]
16394
+ },
16395
+ "demo": {
16396
+ "mode": "server",
16397
+ "reasons": [
16398
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16399
+ ]
16400
+ }
16401
+ },
16402
+ {
16403
+ "id": "commerce.wholesale",
16404
+ "className": "WholesaleRecipe",
16405
+ "label": "Wholesale orders",
16406
+ "summary": "Take bulk orders from trade customers.",
16407
+ "synonyms": [
16408
+ "bulk orders",
16409
+ "trade orders",
16410
+ "b2b"
16411
+ ],
16412
+ "models": [
16413
+ "@happyvertical/smrt-commerce:WholesaleOrder",
16414
+ "@happyvertical/smrt-commerce:ContractLineItem"
16415
+ ],
16416
+ "nav": [
16417
+ {
16418
+ "label": "Wholesale orders",
16419
+ "model": "@happyvertical/smrt-commerce:WholesaleOrder",
16420
+ "icon": "shoppingBag",
16421
+ "description": "Bulk orders from cafes, shops and other businesses."
16422
+ }
16423
+ ],
16424
+ "requires": [
16425
+ "commerce.customers"
16426
+ ],
16427
+ "section": {
16428
+ "id": "sales",
16429
+ "label": "Sales",
16430
+ "icon": "shoppingBag",
16431
+ "description": "Customers, orders and quotes: everything you sell."
16432
+ },
16433
+ "options": {
16434
+ "@happyvertical/smrt-commerce:WholesaleOrder": {
16435
+ "fields": {
16436
+ "contractType": {
16437
+ "default": "wholesale_order",
16438
+ "visibility": "hidden",
16439
+ "locked": true
16440
+ },
16441
+ "vendorId": {
16442
+ "visibility": "hidden",
16443
+ "locked": true
16444
+ },
16445
+ "customerId": {
16446
+ "label": "Customer",
16447
+ "order": 1
16448
+ },
16449
+ "channelId": {
16450
+ "visibility": "hidden"
16451
+ },
16452
+ "expiryDate": {
16453
+ "visibility": "hidden"
16454
+ }
16455
+ }
16456
+ },
16457
+ "@happyvertical/smrt-commerce:ContractLineItem": {
16458
+ "fields": {
16459
+ "sku": {
16460
+ "visibility": "hidden"
16461
+ },
16462
+ "startDate": {
16463
+ "visibility": "hidden"
16464
+ },
16465
+ "endDate": {
16466
+ "visibility": "hidden"
16467
+ },
16468
+ "billingPeriod": {
16469
+ "visibility": "hidden"
16470
+ },
16471
+ "sortOrder": {
16472
+ "visibility": "hidden"
16473
+ },
16474
+ "discount": {
16475
+ "visibility": "hidden"
16476
+ },
16477
+ "taxRate": {
16478
+ "help": "Type a percentage: 5 means 5%."
16479
+ }
16480
+ }
16481
+ }
16482
+ },
16483
+ "help": {
16484
+ "markdown": "## Overview\n\nWholesale orders are bulk orders from trade customers. They work like sales\norders, with a list of line items, but are kept in their own list so trade and\nretail sales stay apart.\n\n## Tasks\n\n### Take a wholesale order\n\n1. Create a new wholesale order.\n2. Pick the **{field:customerId}** placing the order.\n3. Add the line items and check the **{field:totalAmount}**.\n4. Set the **{field:dueDate}** for payment and save.\n\n### Track it\n\n1. Update **{field:status}** as the order moves from draft to completed.\n2. Use **{field:reference}** for the buyer's own order number.\n",
16485
+ "fieldRefs": [
16486
+ "customerId",
16487
+ "dueDate",
16488
+ "reference",
16489
+ "status",
16490
+ "totalAmount"
16491
+ ]
16492
+ },
16493
+ "demo": {
16494
+ "mode": "server",
16495
+ "reasons": [
16496
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16497
+ ]
15164
16498
  }
15165
16499
  }
15166
16500
  ],
16501
+ "uiSelectors": {
16502
+ "customer-select": {
16503
+ "slotId": "customer-select",
16504
+ "selects": "@happyvertical/smrt-commerce:Customer",
16505
+ "label": "Customer Select",
16506
+ "description": "Searchable customer picker for relation fields; the caller supplies the lookup"
16507
+ },
16508
+ "vendor-select": {
16509
+ "slotId": "vendor-select",
16510
+ "selects": "@happyvertical/smrt-commerce:Vendor",
16511
+ "label": "Vendor Select",
16512
+ "description": "Searchable vendor picker for relation fields; the caller supplies the lookup"
16513
+ }
16514
+ },
15167
16515
  "smrtDependencies": [
15168
16516
  "@happyvertical/smrt-core",
15169
16517
  "@happyvertical/smrt-jobs",
@@ -15171,5 +16519,21 @@
15171
16519
  "@happyvertical/smrt-subscriptions",
15172
16520
  "@happyvertical/smrt-tenancy"
15173
16521
  ],
16522
+ "browser": {
16523
+ "status": "server-only",
16524
+ "issues": [
16525
+ "#3615",
16526
+ "#3624",
16527
+ "#3626",
16528
+ "#3627"
16529
+ ],
16530
+ "reason": "@happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs",
16531
+ "via": [
16532
+ "@happyvertical/smrt-jobs",
16533
+ "@happyvertical/smrt-ledgers",
16534
+ "@happyvertical/smrt-subscriptions",
16535
+ "@happyvertical/smrt-tenancy"
16536
+ ]
16537
+ },
15174
16538
  "stampsConstructors": true
15175
16539
  }