@hyperscale0/hsx 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/examples/serviced.hsx +23 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# HSX 4.1.1
|
|
2
|
+
|
|
3
|
+
`examples/serviced.hsx` is a second worked programme: a financed sale with a late charge, payment reminders, an early payoff rebate and a write-off. The car financing spec compiles it from the file. No grammar or standard library change.
|
|
4
|
+
|
|
1
5
|
# HSX 4.1.0
|
|
2
6
|
|
|
3
7
|
Second-person approval is deleted from the grammar and the standard library. `financing.portfolio_limit` is a top-level instrument, a plan's `funds` hold is optional, and `insurance.cover` and `financing.credit_line` name their provider with `adapter: text` instead of a party. A car financing programme compiles from the standard library and is covered by its own spec.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
program car_financing "Car financing"
|
|
2
|
+
use escrow
|
|
3
|
+
use financing
|
|
4
|
+
use collections
|
|
5
|
+
object car "Car" {
|
|
6
|
+
fields { make: text, model: text, year: integer, vin: text, price: money }
|
|
7
|
+
columns: [make, model, year, vin, price]
|
|
8
|
+
attach sale = escrow.hold { payer: actor, payee: operator, expose fund as purchase }
|
|
9
|
+
attach limits = financing.limits { borrower: actor, per_borrower: 250000 SAR }
|
|
10
|
+
attach ceiling = financing.portfolio_limit { limit: 10000000 SAR }
|
|
11
|
+
attach plan = financing.installments {
|
|
12
|
+
borrower: actor, capital: operator
|
|
13
|
+
months: 36, profit: 8.5%, down_payment: 10%
|
|
14
|
+
apply: fines_profit_principal, payoff_rebate: 100%, write_off_after: 90d
|
|
15
|
+
funds: sale, limits: limits, portfolio: ceiling
|
|
16
|
+
expose create as finance, expose sign as sign_contract, expose payoff as payoff
|
|
17
|
+
}
|
|
18
|
+
attach late = financing.late_charge {
|
|
19
|
+
on: plan, grace: 3d, fine: 50 SAR, cap: 25 SAR
|
|
20
|
+
fines_to: operator, costs_to: operator, borrower: actor
|
|
21
|
+
}
|
|
22
|
+
attach reminders = collections.reminder { on: plan, operator: operator, before_days: 3, overdue_days: 1 }
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperscale0/hsx",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "The strictly typed HSX language: compile total financial programs into canonical UDL.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hsx",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"Amir Ayub",
|
|
90
90
|
"Sara AlBakaawi"
|
|
91
91
|
],
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "42fc8744b74e9b251196ee5743897b3aff3ca9e3"
|
|
93
93
|
}
|