@hyperscale0/hsx 2.3.0 → 2.4.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/dist/src/cli.d.ts +1 -1
  3. package/dist/src/std-bundle.js +1 -1
  4. package/dist/src/std-bundle.js.map +1 -1
  5. package/dist/src/typecheck.d.ts.map +1 -1
  6. package/dist/src/typecheck.js +118 -87
  7. package/dist/src/typecheck.js.map +1 -1
  8. package/dist/src/version.d.ts +1 -1
  9. package/dist/src/version.js +1 -1
  10. package/docs/llms-full.txt +7 -4
  11. package/docs/llms.txt +2 -2
  12. package/docs/reference/cli.md +2 -2
  13. package/docs/reference/diagnostics.md +1 -1
  14. package/docs/reference/grammar.md +2 -2
  15. package/docs/reference/std/advance.md +1 -1
  16. package/docs/reference/std/cancellable_booking.md +5 -2
  17. package/docs/reference/std/captured_payment.md +1 -1
  18. package/docs/reference/std/conditional_disbursement.md +1 -1
  19. package/docs/reference/std/credit_facility.md +1 -1
  20. package/docs/reference/std/held_payment.md +1 -1
  21. package/docs/reference/std/instant_transfer.md +1 -1
  22. package/docs/reference/std/metered.md +1 -1
  23. package/docs/reference/std/pooled_split.md +1 -1
  24. package/docs/reference/std/premium_forward.md +1 -1
  25. package/docs/reference/std/reconciled_payout.md +1 -1
  26. package/docs/reference/std/rotating_pool.md +1 -1
  27. package/docs/reference/std/scheduled.md +1 -1
  28. package/docs/reference/std/security_deposit.md +1 -1
  29. package/docs/reference/std/settlement_batch.md +1 -1
  30. package/docs/reference/std/swap.md +1 -1
  31. package/docs/reference/std/threshold_pool.md +1 -1
  32. package/docs/reference/std/weighted_distribution.md +1 -1
  33. package/docs/reference/types.md +1 -1
  34. package/docs/reference/udl-output.md +1 -1
  35. package/examples/cancellable_booking/cancellable_booking.udl +1 -0
  36. package/examples/cost-table.json +36 -4
  37. package/package.json +3 -3
  38. package/src/std-bundle.ts +1 -1
  39. package/src/typecheck.ts +225 -89
  40. package/src/version.ts +1 -1
  41. package/std/money_flows/cancellable_booking.hsx +3 -1
package/src/version.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Package version reported by the command line. */
2
- export const HSX_VERSION = "2.3.0";
2
+ export const HSX_VERSION = "2.4.1";
3
3
 
4
4
  /** Canonical UDL contract version emitted by this compiler. */
5
5
  export const HSX_TARGET_UDL_VERSION = 1;
@@ -53,6 +53,7 @@ module std.money_flows.cancellable_booking
53
53
  // the deposit. balance_before and confirmation_window are positive fixed durations
54
54
  // relative to departure. tax_bps applies to margin after the supplier share.
55
55
  // authority_type and supplier_role bind release to a consumed confirmation decision.
56
+ // collects optionally cascades named actions to linked instruments on deposit.
56
57
  // acceptance optionally supplies an aggregate gate. All actions are private until
57
58
  // expose selects them. Ordered band starts and deadlines prevent a late sweep from
58
59
  // extending an earlier band's cancellation rights. Full timeout refund returns price.
@@ -74,7 +75,7 @@ export instrument cancellable_booking<C>(
74
75
  balance_before: optional<text>, confirmation_window: optional<text>, unpaid_band: optional<integer>,
75
76
  acceptance: optional<block>, deposit_bps: optional<integer>, tax_bps: optional<integer>,
76
77
  authority_type: optional<text>, supplier_role: optional<text>,
77
-
78
+ collects: optional<json>,
78
79
  ) {
79
80
  when_not(cancel_bands) {
80
81
  let(guest_account_field): camel(concat(guest, "_account_id"));
@@ -312,6 +313,7 @@ export instrument cancellable_booking<C>(
312
313
  action deposit {
313
314
  public: none;
314
315
  agent_description: "Collect the derived deposit after the acceptance requirements pass.";
316
+ when(collects) { cascade: collects; }
315
317
  when(acceptance) { requires aggregate: acceptance; }
316
318
  deadline: { field: balanceDueAt; }; port: { allowedParties: [payer]; };
317
319
  moves: { key: deposit; operation: "internal_transfer.create"; bind: { amount: { from: instance; path: concat("fields.", "depositAmount"); }; currency: { from: instance; path: fields.currency; }; productId: { from: instance; path: productId; }; sourceAccountId: { from: instance; path: "fields.customerAccountId"; }; destinationAccountId: { from: instance; path: "refs.heldAccountId"; }; }; };