@hyperscale0/udl 2.6.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -322
- package/LICENSING.md +1 -2
- package/README.md +3 -114
- package/TRADEMARKS.md +2 -2
- package/dist/diagnostics.d.ts +21 -201
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js +29 -193
- package/dist/diagnostics.js.map +1 -1
- package/dist/evolution.d.ts +3 -132
- package/dist/evolution.d.ts.map +1 -1
- package/dist/evolution.js +29 -633
- package/dist/evolution.js.map +1 -1
- package/dist/finance.d.ts +5 -72
- package/dist/finance.d.ts.map +1 -1
- package/dist/finance.js +233 -737
- package/dist/finance.js.map +1 -1
- package/dist/index.d.ts +7 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -12
- package/dist/index.js.map +1 -1
- package/dist/instrument-references.d.ts.map +1 -1
- package/dist/instrument-references.js +3 -2
- package/dist/instrument-references.js.map +1 -1
- package/dist/schema.d.ts +2079 -4564
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +270 -1609
- package/dist/schema.js.map +1 -1
- package/dist/validation.d.ts +8 -104
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +653 -3271
- package/dist/validation.js.map +1 -1
- package/docs/README.md +147 -14
- package/package.json +7 -11
- package/spec/README.md +151 -164
- package/spec/darb.udl.json +249 -0
- package/spec/udl.schema.json +4104 -3202
- package/src/diagnostics.ts +51 -246
- package/src/evolution.ts +39 -1045
- package/src/finance.ts +287 -1127
- package/src/index.ts +18 -142
- package/src/instrument-references.ts +3 -2
- package/src/schema.ts +285 -1843
- package/src/validation.ts +870 -5611
- package/conformance/README.md +0 -82
- package/conformance/evolution/action-contract.expected.json +0 -10
- package/conformance/evolution/action-contract.live.udl +0 -44
- package/conformance/evolution/action-contract.next.udl +0 -45
- package/conformance/evolution/product-identity.expected.json +0 -10
- package/conformance/evolution/product-identity.live.udl +0 -55
- package/conformance/evolution/product-identity.next.udl +0 -55
- package/conformance/evolution/version-required.expected.json +0 -10
- package/conformance/evolution/version-required.live.udl +0 -55
- package/conformance/evolution/version-required.next.udl +0 -58
- package/conformance/invalid/action-without-transition.expected.json +0 -10
- package/conformance/invalid/action-without-transition.udl +0 -60
- package/conformance/invalid/agent-description-too-long.expected.json +0 -10
- package/conformance/invalid/agent-description-too-long.udl +0 -57
- package/conformance/invalid/blank-title.expected.json +0 -10
- package/conformance/invalid/blank-title.udl +0 -54
- package/conformance/invalid/call-binds-results.expected.json +0 -10
- package/conformance/invalid/call-binds-results.udl +0 -314
- package/conformance/invalid/call-unknown-action.expected.json +0 -10
- package/conformance/invalid/call-unknown-action.udl +0 -314
- package/conformance/invalid/composition-dial-duplicate-key.expected.json +0 -10
- package/conformance/invalid/composition-dial-duplicate-key.udl +0 -73
- package/conformance/invalid/depth-budget.expected.json +0 -10
- package/conformance/invalid/depth-budget.udl +0 -49
- package/conformance/invalid/duplicate-subject.expected.json +0 -10
- package/conformance/invalid/duplicate-subject.udl +0 -230
- package/conformance/invalid/forged-effects.expected.json +0 -10
- package/conformance/invalid/forged-effects.udl +0 -76
- package/conformance/invalid/format-version.expected.json +0 -10
- package/conformance/invalid/format-version.udl +0 -54
- package/conformance/invalid/instrument-id-not-snake-case.expected.json +0 -10
- package/conformance/invalid/instrument-id-not-snake-case.udl +0 -54
- package/conformance/invalid/invalid-aggregate-gate-shape.expected.json +0 -10
- package/conformance/invalid/invalid-aggregate-gate-shape.udl +0 -1819
- package/conformance/invalid/invalid-check-duration.expected.json +0 -10
- package/conformance/invalid/invalid-check-duration.udl +0 -219
- package/conformance/invalid/invalid-dial-anchor.expected.json +0 -10
- package/conformance/invalid/invalid-dial-anchor.udl +0 -219
- package/conformance/invalid/invalid-exception-parent-ref.expected.json +0 -10
- package/conformance/invalid/invalid-exception-parent-ref.udl +0 -2487
- package/conformance/invalid/invalid-exposure-shape.expected.json +0 -10
- package/conformance/invalid/invalid-exposure-shape.udl +0 -1819
- package/conformance/invalid/invalid-journeys.expected.json +0 -10
- package/conformance/invalid/invalid-journeys.udl +0 -77
- package/conformance/invalid/invalid-remainder.expected.json +0 -10
- package/conformance/invalid/invalid-remainder.udl +0 -220
- package/conformance/invalid/invalid-schema-keyword.expected.json +0 -10
- package/conformance/invalid/invalid-schema-keyword.udl +0 -220
- package/conformance/invalid/invalid-utf8.expected.json +0 -10
- package/conformance/invalid/invalid-utf8.udl +0 -1
- package/conformance/invalid/leaf-effect-mismatch.expected.json +0 -10
- package/conformance/invalid/leaf-effect-mismatch.udl +0 -314
- package/conformance/invalid/malformed-json.expected.json +0 -10
- package/conformance/invalid/malformed-json.udl +0 -1
- package/conformance/invalid/missing-create-action.expected.json +0 -10
- package/conformance/invalid/missing-create-action.udl +0 -48
- package/conformance/invalid/missing-exception-amount-field.expected.json +0 -10
- package/conformance/invalid/missing-exception-amount-field.udl +0 -2487
- package/conformance/invalid/missing-exception-contract.expected.json +0 -14
- package/conformance/invalid/missing-exception-contract.udl +0 -2523
- package/conformance/invalid/missing-exception-reason-field.expected.json +0 -10
- package/conformance/invalid/missing-exception-reason-field.udl +0 -2487
- package/conformance/invalid/not-an-object.expected.json +0 -10
- package/conformance/invalid/not-an-object.udl +0 -1
- package/conformance/invalid/payout-reconcile-not-a-bank-debit.expected.json +0 -10
- package/conformance/invalid/payout-reconcile-not-a-bank-debit.udl +0 -259
- package/conformance/invalid/piece-plan-without-partition.expected.json +0 -10
- package/conformance/invalid/piece-plan-without-partition.udl +0 -305
- package/conformance/invalid/private-action-independent-approval.expected.json +0 -10
- package/conformance/invalid/private-action-independent-approval.udl +0 -314
- package/conformance/invalid/quote-freeze-set-incomplete.expected.json +0 -10
- package/conformance/invalid/quote-freeze-set-incomplete.udl +0 -261
- package/conformance/invalid/quote-named-reference-gate.expected.json +0 -10
- package/conformance/invalid/quote-named-reference-gate.udl +0 -50
- package/conformance/invalid/reconcile-named-reference-gate.expected.json +0 -10
- package/conformance/invalid/reconcile-named-reference-gate.udl +0 -50
- package/conformance/invalid/unfund-order-not-reversed.expected.json +0 -10
- package/conformance/invalid/unfund-order-not-reversed.udl +0 -314
- package/conformance/invalid/unknown-key.expected.json +0 -10
- package/conformance/invalid/unknown-key.udl +0 -55
- package/conformance/invalid/unknown-reference-gate-field.expected.json +0 -10
- package/conformance/invalid/unknown-reference-gate-field.udl +0 -1819
- package/conformance/invalid/unknown-required-field.expected.json +0 -10
- package/conformance/invalid/unknown-required-field.udl +0 -220
- package/conformance/invalid/unreachable-state.expected.json +0 -10
- package/conformance/invalid/unreachable-state.udl +0 -55
- package/conformance/invalid/wrong-exception-amount-field.expected.json +0 -10
- package/conformance/invalid/wrong-exception-amount-field.udl +0 -2487
- package/conformance/invalid/wrong-exception-reason-field.expected.json +0 -10
- package/conformance/invalid/wrong-exception-reason-field.udl +0 -2487
- package/conformance/valid/agent-description.expected.json +0 -6
- package/conformance/valid/agent-description.udl +0 -66
- package/conformance/valid/attested.expected.json +0 -6
- package/conformance/valid/attested.udl +0 -251
- package/conformance/valid/cards.expected.json +0 -6
- package/conformance/valid/cards.udl +0 -1579
- package/conformance/valid/commerce-escrow.expected.json +0 -6
- package/conformance/valid/commerce-escrow.udl +0 -1512
- package/conformance/valid/compiled-crowdfunding.expected.json +0 -6
- package/conformance/valid/compiled-crowdfunding.udl +0 -1843
- package/conformance/valid/compiled-watch-club.expected.json +0 -6
- package/conformance/valid/compiled-watch-club.udl +0 -2486
- package/conformance/valid/complete-contract.expected.json +0 -6
- package/conformance/valid/complete-contract.udl +0 -218
- package/conformance/valid/effect-signatures.expected.json +0 -6
- package/conformance/valid/effect-signatures.udl +0 -75
- package/conformance/valid/hand-edited.expected.json +0 -6
- package/conformance/valid/hand-edited.udl +0 -1
- package/conformance/valid/insured-car-marketplace.expected.json +0 -6
- package/conformance/valid/insured-car-marketplace.udl +0 -1050
- package/conformance/valid/insured-travel.expected.json +0 -6
- package/conformance/valid/insured-travel.udl +0 -3469
- package/conformance/valid/minimal.expected.json +0 -6
- package/conformance/valid/minimal.udl +0 -62
- package/conformance/valid/piece-plan-calls.expected.json +0 -6
- package/conformance/valid/piece-plan-calls.udl +0 -314
- package/conformance/valid/protection.expected.json +0 -6
- package/conformance/valid/protection.udl +0 -1551
- package/conformance/valid/string-escaping.expected.json +0 -6
- package/conformance/valid/string-escaping.udl +0 -54
- package/conformance/valid/vocabulary.expected.json +0 -6
- package/conformance/valid/vocabulary.udl +0 -2012
- package/dist/allocation.d.ts +0 -60
- package/dist/allocation.d.ts.map +0 -1
- package/dist/allocation.js +0 -177
- package/dist/allocation.js.map +0 -1
- package/dist/check-profiles.d.ts +0 -57
- package/dist/check-profiles.d.ts.map +0 -1
- package/dist/check-profiles.js +0 -62
- package/dist/check-profiles.js.map +0 -1
- package/dist/distribution.d.ts +0 -15
- package/dist/distribution.d.ts.map +0 -1
- package/dist/distribution.js +0 -49
- package/dist/distribution.js.map +0 -1
- package/dist/effects.d.ts +0 -58
- package/dist/effects.d.ts.map +0 -1
- package/dist/effects.js +0 -1126
- package/dist/effects.js.map +0 -1
- package/dist/reference.d.ts +0 -3
- package/dist/reference.d.ts.map +0 -1
- package/dist/reference.js +0 -28
- package/dist/reference.js.map +0 -1
- package/dist/vocabulary.d.ts +0 -23
- package/dist/vocabulary.d.ts.map +0 -1
- package/dist/vocabulary.js +0 -1052
- package/dist/vocabulary.js.map +0 -1
- package/docs/funding-custody.md +0 -165
- package/docs/guide/01-a-document.md +0 -37
- package/docs/guide/02-money-steps.md +0 -23
- package/docs/guide/03-laws.md +0 -18
- package/docs/guide/04-fees-and-remainder.md +0 -36
- package/docs/guide/05-checks-updates-dials.md +0 -7
- package/docs/guide/06-effects.md +0 -11
- package/docs/guide/07-evolution.md +0 -11
- package/docs/guide/08-implementing.md +0 -13
- package/docs/guide/09-schedules-and-allocation.md +0 -132
- package/docs/llms-full.txt +0 -2008
- package/docs/llms.txt +0 -14
- package/docs/piece-plans.md +0 -148
- package/docs/reference/canonical.md +0 -16
- package/docs/reference/clauses.md +0 -1585
- package/docs/reference/cli.md +0 -24
- package/docs/reference/diagnostics.md +0 -38
- package/skills/udl/SKILL.md +0 -28
- package/src/allocation.ts +0 -259
- package/src/check-profiles.ts +0 -80
- package/src/distribution.ts +0 -61
- package/src/effects.ts +0 -1920
- package/src/reference.ts +0 -31
- package/src/vocabulary.ts +0 -1635
|
@@ -1,1050 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"instruments": [
|
|
3
|
-
{
|
|
4
|
-
"actionOrder": [
|
|
5
|
-
"create",
|
|
6
|
-
"reserve",
|
|
7
|
-
"unreserve",
|
|
8
|
-
"complete",
|
|
9
|
-
"delist"
|
|
10
|
-
],
|
|
11
|
-
"actions": {
|
|
12
|
-
"complete": {
|
|
13
|
-
"agentDescription": "Mark the car sold. Refused unless the referenced escrow has settled, so the seller is already paid before the listing closes. Sold is terminal and does not reverse.",
|
|
14
|
-
"description": "Marks the car sold after the reserving escrow settles to the seller. Pure lifecycle transition over the catalog row.",
|
|
15
|
-
"effects": {
|
|
16
|
-
"reads": [
|
|
17
|
-
{
|
|
18
|
-
"signature": "reads.requires_refs",
|
|
19
|
-
"source": "requiresRefs"
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
"moves": [],
|
|
24
|
-
"requiresRefs": [
|
|
25
|
-
{
|
|
26
|
-
"field": "escrowId",
|
|
27
|
-
"statuses": [
|
|
28
|
-
"settled"
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"steps": [],
|
|
33
|
-
"summary": "Complete a vehicle listing sale"
|
|
34
|
-
},
|
|
35
|
-
"create": {
|
|
36
|
-
"agentDescription": "Publish the car to the marketplace at an asking price. No money moves. The listing stays on the market until a buyer's escrow reserves it or the seller delists it.",
|
|
37
|
-
"description": "Publishes the car to the marketplace at an asking price. No money moves until an escrow is opened against it.",
|
|
38
|
-
"moves": [],
|
|
39
|
-
"steps": [],
|
|
40
|
-
"summary": "Create a vehicle listing"
|
|
41
|
-
},
|
|
42
|
-
"delist": {
|
|
43
|
-
"agentDescription": "Withdraw an unsold car from the marketplace. Only a listing still on the market delists. A reserved one has to unreserve first. No money moves.",
|
|
44
|
-
"description": "Withdraws an unsold car from the marketplace. No money has moved, so this is a pure lifecycle transition.",
|
|
45
|
-
"moves": [],
|
|
46
|
-
"steps": [],
|
|
47
|
-
"summary": "Delist a vehicle listing"
|
|
48
|
-
},
|
|
49
|
-
"reserve": {
|
|
50
|
-
"agentDescription": "Take the listing off the market for a buyer. Refused unless the referenced vehicle escrow is funded, so the buyer's money is already held before the car is held. No money moves.",
|
|
51
|
-
"description": "Takes the listing off the market while a buyer's escrow holds funds. The referenced escrow must currently hold the buyer's funds.",
|
|
52
|
-
"effects": {
|
|
53
|
-
"reads": [
|
|
54
|
-
{
|
|
55
|
-
"signature": "reads.requires_refs",
|
|
56
|
-
"source": "requiresRefs"
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
"moves": [],
|
|
61
|
-
"requiresRefs": [
|
|
62
|
-
{
|
|
63
|
-
"field": "escrowId",
|
|
64
|
-
"statuses": [
|
|
65
|
-
"funded"
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"steps": [],
|
|
70
|
-
"summary": "Reserve a vehicle listing"
|
|
71
|
-
},
|
|
72
|
-
"unreserve": {
|
|
73
|
-
"agentDescription": "Put a reserved car back on the market. Refused unless the referenced escrow is canceled or its penalty collected, so a live escrow can never lose its reservation. No money moves.",
|
|
74
|
-
"description": "Relists the car after the reserving escrow is canceled. No money has moved on the listing itself.",
|
|
75
|
-
"effects": {
|
|
76
|
-
"reads": [
|
|
77
|
-
{
|
|
78
|
-
"signature": "reads.requires_refs",
|
|
79
|
-
"source": "requiresRefs"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
|
-
"moves": [],
|
|
84
|
-
"requiresRefs": [
|
|
85
|
-
{
|
|
86
|
-
"field": "escrowId",
|
|
87
|
-
"statuses": [
|
|
88
|
-
"canceled",
|
|
89
|
-
"penalty_collected"
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
"steps": [],
|
|
94
|
-
"summary": "Return a reserved vehicle listing to the market"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"agentDescription": "Reach for vehicle listing when a seller advertises one car at an asking price and the listing status has to track a buyer's escrow. The listing moves no money at all. The buyer's funds are held by the vehicle escrow it references, and every transition here checks that escrow's status.",
|
|
98
|
-
"callerParkedStates": {
|
|
99
|
-
"listed": "reserving or delisting is a party act on an open listing",
|
|
100
|
-
"reserved": "completing or unreserving a reservation is a party decision"
|
|
101
|
-
},
|
|
102
|
-
"description": "A vehicle listing advertises one car for sale at an asking price. It is reserved while a vehicle escrow holds the buyer's funds, sold when the escrow settles to the seller, returned to the market if the escrow is canceled, or delisted by the seller before sale.",
|
|
103
|
-
"fields": {
|
|
104
|
-
"askingPrice": {
|
|
105
|
-
"description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
|
|
106
|
-
"pattern": "^[1-9][0-9]{0,17}$",
|
|
107
|
-
"type": "string"
|
|
108
|
-
},
|
|
109
|
-
"currency": {
|
|
110
|
-
"description": "ISO 4217 currency code",
|
|
111
|
-
"maxLength": 3,
|
|
112
|
-
"minLength": 3,
|
|
113
|
-
"pattern": "^[A-Z]{3}$",
|
|
114
|
-
"type": "string"
|
|
115
|
-
},
|
|
116
|
-
"description": {
|
|
117
|
-
"maxLength": 2000,
|
|
118
|
-
"minLength": 1,
|
|
119
|
-
"type": "string"
|
|
120
|
-
},
|
|
121
|
-
"escrowId": {
|
|
122
|
-
"description": "Vehicle escrow whose held funds reserve this listing",
|
|
123
|
-
"pattern": "^vesc_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
124
|
-
"type": "string"
|
|
125
|
-
},
|
|
126
|
-
"headline": {
|
|
127
|
-
"maxLength": 120,
|
|
128
|
-
"minLength": 1,
|
|
129
|
-
"type": "string"
|
|
130
|
-
},
|
|
131
|
-
"sellerAccountId": {
|
|
132
|
-
"description": "Hyperscale account ID",
|
|
133
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
134
|
-
"type": "string",
|
|
135
|
-
"x-hyperscale-reference-filter": {
|
|
136
|
-
"column": "role",
|
|
137
|
-
"values": [
|
|
138
|
-
"customer_balance"
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
"id": "vehicle_listing",
|
|
144
|
-
"idPrefix": "vlst",
|
|
145
|
-
"lifecycle": {
|
|
146
|
-
"initial": "listed",
|
|
147
|
-
"states": [
|
|
148
|
-
"listed",
|
|
149
|
-
"reserved",
|
|
150
|
-
"sold",
|
|
151
|
-
"delisted"
|
|
152
|
-
],
|
|
153
|
-
"transitions": {
|
|
154
|
-
"complete": {
|
|
155
|
-
"from": [
|
|
156
|
-
"reserved"
|
|
157
|
-
],
|
|
158
|
-
"to": "sold"
|
|
159
|
-
},
|
|
160
|
-
"delist": {
|
|
161
|
-
"from": [
|
|
162
|
-
"listed"
|
|
163
|
-
],
|
|
164
|
-
"to": "delisted"
|
|
165
|
-
},
|
|
166
|
-
"reserve": {
|
|
167
|
-
"from": [
|
|
168
|
-
"listed"
|
|
169
|
-
],
|
|
170
|
-
"to": "reserved"
|
|
171
|
-
},
|
|
172
|
-
"unreserve": {
|
|
173
|
-
"from": [
|
|
174
|
-
"reserved"
|
|
175
|
-
],
|
|
176
|
-
"to": "listed"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
"nav": [
|
|
181
|
-
"Blueprints",
|
|
182
|
-
"Vehicle Listings"
|
|
183
|
-
],
|
|
184
|
-
"parties": {
|
|
185
|
-
"subjectHolder": "sellerAccountId"
|
|
186
|
-
},
|
|
187
|
-
"required": [
|
|
188
|
-
"sellerAccountId",
|
|
189
|
-
"headline",
|
|
190
|
-
"askingPrice",
|
|
191
|
-
"currency"
|
|
192
|
-
],
|
|
193
|
-
"subject": {
|
|
194
|
-
"kinds": [
|
|
195
|
-
"vehicle"
|
|
196
|
-
]
|
|
197
|
-
},
|
|
198
|
-
"summary": "Marketplace listing for an insured used car offered by a seller.",
|
|
199
|
-
"templateId": "marketplace",
|
|
200
|
-
"title": "Vehicle listing",
|
|
201
|
-
"update": {
|
|
202
|
-
"fields": [
|
|
203
|
-
"headline",
|
|
204
|
-
"description",
|
|
205
|
-
"askingPrice",
|
|
206
|
-
"escrowId"
|
|
207
|
-
],
|
|
208
|
-
"states": [
|
|
209
|
-
"listed"
|
|
210
|
-
]
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"actionOrder": [
|
|
215
|
-
"create",
|
|
216
|
-
"bind",
|
|
217
|
-
"open_claim",
|
|
218
|
-
"settle_claim",
|
|
219
|
-
"deny_claim",
|
|
220
|
-
"expire",
|
|
221
|
-
"cancel"
|
|
222
|
-
],
|
|
223
|
-
"actions": {
|
|
224
|
-
"bind": {
|
|
225
|
-
"agentDescription": "Put a quote in force. An insurance carrier underwrites it under a 15 second deadline and a timeout declines. On acceptance the full premium settles from the policyholder to the insurer. Only a quoted policy binds. This moves the policyholder's money and does not reverse.",
|
|
226
|
-
"decision": {
|
|
227
|
-
"capability": "insurance_carrier",
|
|
228
|
-
"deadlineMs": 15000,
|
|
229
|
-
"onTimeout": "decline"
|
|
230
|
-
},
|
|
231
|
-
"description": "Underwrites the policy through an insurance carrier under a deadline, then settles the premium from the policyholder into the insurer account and puts the policy in force.",
|
|
232
|
-
"earnable": true,
|
|
233
|
-
"effects": {
|
|
234
|
-
"decides": [
|
|
235
|
-
{
|
|
236
|
-
"signature": "decides.insurance_carrier",
|
|
237
|
-
"source": "decision"
|
|
238
|
-
}
|
|
239
|
-
],
|
|
240
|
-
"moves": [
|
|
241
|
-
{
|
|
242
|
-
"signature": "moves.transfer.internal",
|
|
243
|
-
"source": "moves[0]"
|
|
244
|
-
}
|
|
245
|
-
]
|
|
246
|
-
},
|
|
247
|
-
"eventName": "motor_policy.bound",
|
|
248
|
-
"moves": [
|
|
249
|
-
{
|
|
250
|
-
"bind": {
|
|
251
|
-
"amount": {
|
|
252
|
-
"from": "instance",
|
|
253
|
-
"path": "fields.premiumAmount"
|
|
254
|
-
},
|
|
255
|
-
"currency": {
|
|
256
|
-
"from": "instance",
|
|
257
|
-
"path": "fields.currency"
|
|
258
|
-
},
|
|
259
|
-
"destinationAccountId": {
|
|
260
|
-
"from": "instance",
|
|
261
|
-
"path": "fields.insurerAccountId"
|
|
262
|
-
},
|
|
263
|
-
"productId": {
|
|
264
|
-
"from": "instance",
|
|
265
|
-
"path": "productId"
|
|
266
|
-
},
|
|
267
|
-
"sourceAccountId": {
|
|
268
|
-
"from": "instance",
|
|
269
|
-
"path": "fields.policyholderAccountId"
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
"capture": {
|
|
273
|
-
"premiumTransferId": "transferId"
|
|
274
|
-
},
|
|
275
|
-
"key": "transfer",
|
|
276
|
-
"operation": "internal_transfer.create"
|
|
277
|
-
}
|
|
278
|
-
],
|
|
279
|
-
"steps": [],
|
|
280
|
-
"summary": "Bind a motor policy"
|
|
281
|
-
},
|
|
282
|
-
"cancel": {
|
|
283
|
-
"agentDescription": "Close a quote that never bound. Only a quoted policy cancels, no premium has moved, and there is nothing to refund. An in-force policy has no cancellation path here and lapses at its expiry instead.",
|
|
284
|
-
"description": "Closes a quote that never bound. No money has moved, so this is a pure lifecycle transition.",
|
|
285
|
-
"moves": [],
|
|
286
|
-
"steps": [],
|
|
287
|
-
"summary": "Cancel a quoted motor policy"
|
|
288
|
-
},
|
|
289
|
-
"create": {
|
|
290
|
-
"agentDescription": "Open a policy quote against one vehicle subject with its premium and coverage amount. No money moves and the quote is not in force. Binding is a separate call that runs carrier underwriting.",
|
|
291
|
-
"description": "Opens the policy quote against a vehicle subject. No money moves until the policy binds.",
|
|
292
|
-
"moves": [],
|
|
293
|
-
"steps": [],
|
|
294
|
-
"summary": "Quote a motor policy"
|
|
295
|
-
},
|
|
296
|
-
"deny_claim": {
|
|
297
|
-
"agentDescription": "Refuse the open claim and void the pending coverage hold, returning the reserved amount to the insurer. The policy must be in claim_open. No money reaches the policyholder. Denied is a terminal state, so a rejected claim cannot be reopened on this policy.",
|
|
298
|
-
"description": "Denies the claim and voids the pending coverage hold, releasing the reserved amount back to the insurer account.",
|
|
299
|
-
"effects": {
|
|
300
|
-
"moves": [
|
|
301
|
-
{
|
|
302
|
-
"signature": "moves.transfer.internal",
|
|
303
|
-
"source": "moves[0]"
|
|
304
|
-
}
|
|
305
|
-
]
|
|
306
|
-
},
|
|
307
|
-
"moves": [
|
|
308
|
-
{
|
|
309
|
-
"bind": {
|
|
310
|
-
"reason": {
|
|
311
|
-
"from": "const",
|
|
312
|
-
"value": "Motor claim denied"
|
|
313
|
-
},
|
|
314
|
-
"transferId": {
|
|
315
|
-
"from": "instance",
|
|
316
|
-
"path": "refs.claimTransferId"
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
"key": "transfer",
|
|
320
|
-
"operation": "internal_transfer.void"
|
|
321
|
-
}
|
|
322
|
-
],
|
|
323
|
-
"steps": [],
|
|
324
|
-
"summary": "Deny a motor claim"
|
|
325
|
-
},
|
|
326
|
-
"expire": {
|
|
327
|
-
"description": "Ends coverage at term with no open claim. The collected premium stays with the insurer, so this is a pure lifecycle transition fired by the maintenance loop under the expiry due-condition.",
|
|
328
|
-
"due": {
|
|
329
|
-
"field": "expiresAt"
|
|
330
|
-
},
|
|
331
|
-
"effects": {
|
|
332
|
-
"schedules": [
|
|
333
|
-
{
|
|
334
|
-
"signature": "schedules.due",
|
|
335
|
-
"source": "due"
|
|
336
|
-
}
|
|
337
|
-
]
|
|
338
|
-
},
|
|
339
|
-
"moves": [],
|
|
340
|
-
"steps": [],
|
|
341
|
-
"summary": "Expire a motor policy"
|
|
342
|
-
},
|
|
343
|
-
"open_claim": {
|
|
344
|
-
"agentDescription": "Open a claim by reserving the coverage amount from the insurer toward the policyholder as a pending ledger hold. The policy must be active. The insurer account must already hold the coverage amount or the reservation is rejected for insufficient balance. Nothing settles until settle_claim.",
|
|
345
|
-
"description": "Places a pending ledger hold for the coverage amount from the insurer account toward the policyholder. The insurer account must be capitalized to the coverage amount, or the hold is rejected for insufficient balance.",
|
|
346
|
-
"effects": {
|
|
347
|
-
"holds": [
|
|
348
|
-
{
|
|
349
|
-
"signature": "holds.reserve",
|
|
350
|
-
"source": "moves[0]"
|
|
351
|
-
}
|
|
352
|
-
],
|
|
353
|
-
"moves": [
|
|
354
|
-
{
|
|
355
|
-
"signature": "moves.transfer.internal",
|
|
356
|
-
"source": "moves[0]"
|
|
357
|
-
}
|
|
358
|
-
]
|
|
359
|
-
},
|
|
360
|
-
"moves": [
|
|
361
|
-
{
|
|
362
|
-
"bind": {
|
|
363
|
-
"amount": {
|
|
364
|
-
"from": "instance",
|
|
365
|
-
"path": "fields.coverageAmount"
|
|
366
|
-
},
|
|
367
|
-
"currency": {
|
|
368
|
-
"from": "instance",
|
|
369
|
-
"path": "fields.currency"
|
|
370
|
-
},
|
|
371
|
-
"destinationAccountId": {
|
|
372
|
-
"from": "instance",
|
|
373
|
-
"path": "fields.policyholderAccountId"
|
|
374
|
-
},
|
|
375
|
-
"sourceAccountId": {
|
|
376
|
-
"from": "instance",
|
|
377
|
-
"path": "fields.insurerAccountId"
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
"capture": {
|
|
381
|
-
"claimTransferId": "transferId"
|
|
382
|
-
},
|
|
383
|
-
"key": "transfer",
|
|
384
|
-
"operation": "internal_transfer.reserve"
|
|
385
|
-
}
|
|
386
|
-
],
|
|
387
|
-
"steps": [],
|
|
388
|
-
"summary": "Open a motor claim"
|
|
389
|
-
},
|
|
390
|
-
"settle_claim": {
|
|
391
|
-
"agentDescription": "Approve the open claim and post the pending hold, landing the coverage amount in the policyholder's account. The policy must be in claim_open. This releases the insurer's money for real and does not reverse. Use deny_claim to void the hold instead.",
|
|
392
|
-
"description": "Approves the claim and posts the held coverage amount, settling the payout into the policyholder account.",
|
|
393
|
-
"effects": {
|
|
394
|
-
"moves": [
|
|
395
|
-
{
|
|
396
|
-
"signature": "moves.transfer.internal",
|
|
397
|
-
"source": "moves[0]"
|
|
398
|
-
}
|
|
399
|
-
]
|
|
400
|
-
},
|
|
401
|
-
"eventName": "motor_policy.claim_settled",
|
|
402
|
-
"moves": [
|
|
403
|
-
{
|
|
404
|
-
"bind": {
|
|
405
|
-
"transferId": {
|
|
406
|
-
"from": "instance",
|
|
407
|
-
"path": "refs.claimTransferId"
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
"key": "transfer",
|
|
411
|
-
"operation": "internal_transfer.post"
|
|
412
|
-
}
|
|
413
|
-
],
|
|
414
|
-
"steps": [],
|
|
415
|
-
"summary": "Settle a motor claim"
|
|
416
|
-
}
|
|
417
|
-
},
|
|
418
|
-
"agentDescription": "Reach for motor_policy when the caller quotes, binds, or claims on vehicle insurance for one car. The premium settles to the insurer on bind, and a claim reserves the coverage amount from the insurer toward the policyholder until an adjuster settles or denies it. Vehicle escrow orders capped by this policy are their own instrument.",
|
|
419
|
-
"aggregateInvariants": [
|
|
420
|
-
{
|
|
421
|
-
"childField": "price",
|
|
422
|
-
"childInstrumentId": "vehicle_escrow",
|
|
423
|
-
"childRefField": "policyId",
|
|
424
|
-
"childStatuses": [
|
|
425
|
-
"created",
|
|
426
|
-
"funded",
|
|
427
|
-
"cancel_quoted"
|
|
428
|
-
],
|
|
429
|
-
"parentField": "coverageAmount"
|
|
430
|
-
}
|
|
431
|
-
],
|
|
432
|
-
"callerParkedStates": {
|
|
433
|
-
"claim_open": "settling or denying a claim is an adjuster's judgment",
|
|
434
|
-
"quoted": "binding or canceling a quote is the policyholder's decision"
|
|
435
|
-
},
|
|
436
|
-
"description": "A motor policy insures a vehicle subject: the premium settles into the insurer account on bind, and a claim holds the coverage amount as a pending ledger reservation from the insurer toward the policyholder, posted on settlement or voided on denial. Binding is underwritten by an insurance carrier under a deadline; coverage lapses on expiry.",
|
|
437
|
-
"fields": {
|
|
438
|
-
"coverageAmount": {
|
|
439
|
-
"description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
|
|
440
|
-
"pattern": "^[1-9][0-9]{0,17}$",
|
|
441
|
-
"type": "string"
|
|
442
|
-
},
|
|
443
|
-
"coverageDescription": {
|
|
444
|
-
"maxLength": 180,
|
|
445
|
-
"minLength": 1,
|
|
446
|
-
"type": "string"
|
|
447
|
-
},
|
|
448
|
-
"currency": {
|
|
449
|
-
"description": "ISO 4217 currency code",
|
|
450
|
-
"maxLength": 3,
|
|
451
|
-
"minLength": 3,
|
|
452
|
-
"pattern": "^[A-Z]{3}$",
|
|
453
|
-
"type": "string"
|
|
454
|
-
},
|
|
455
|
-
"expiresAt": {
|
|
456
|
-
"format": "hyperscale-date-time",
|
|
457
|
-
"type": "string"
|
|
458
|
-
},
|
|
459
|
-
"insurerAccountId": {
|
|
460
|
-
"description": "Hyperscale account ID",
|
|
461
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
462
|
-
"type": "string",
|
|
463
|
-
"x-hyperscale-reference-filter": {
|
|
464
|
-
"column": "role",
|
|
465
|
-
"values": [
|
|
466
|
-
"customer_balance"
|
|
467
|
-
]
|
|
468
|
-
}
|
|
469
|
-
},
|
|
470
|
-
"policyholderAccountId": {
|
|
471
|
-
"description": "Hyperscale account ID",
|
|
472
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
473
|
-
"type": "string",
|
|
474
|
-
"x-hyperscale-reference-filter": {
|
|
475
|
-
"column": "role",
|
|
476
|
-
"values": [
|
|
477
|
-
"customer_balance"
|
|
478
|
-
]
|
|
479
|
-
}
|
|
480
|
-
},
|
|
481
|
-
"premiumAmount": {
|
|
482
|
-
"description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
|
|
483
|
-
"pattern": "^[1-9][0-9]{0,17}$",
|
|
484
|
-
"type": "string"
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
"id": "motor_policy",
|
|
488
|
-
"idPrefix": "mpol",
|
|
489
|
-
"lifecycle": {
|
|
490
|
-
"initial": "quoted",
|
|
491
|
-
"states": [
|
|
492
|
-
"quoted",
|
|
493
|
-
"active",
|
|
494
|
-
"claim_open",
|
|
495
|
-
"settled",
|
|
496
|
-
"denied",
|
|
497
|
-
"expired",
|
|
498
|
-
"canceled"
|
|
499
|
-
],
|
|
500
|
-
"transitions": {
|
|
501
|
-
"bind": {
|
|
502
|
-
"from": [
|
|
503
|
-
"quoted"
|
|
504
|
-
],
|
|
505
|
-
"to": "active"
|
|
506
|
-
},
|
|
507
|
-
"cancel": {
|
|
508
|
-
"from": [
|
|
509
|
-
"quoted"
|
|
510
|
-
],
|
|
511
|
-
"to": "canceled"
|
|
512
|
-
},
|
|
513
|
-
"deny_claim": {
|
|
514
|
-
"from": [
|
|
515
|
-
"claim_open"
|
|
516
|
-
],
|
|
517
|
-
"to": "denied"
|
|
518
|
-
},
|
|
519
|
-
"expire": {
|
|
520
|
-
"from": [
|
|
521
|
-
"active"
|
|
522
|
-
],
|
|
523
|
-
"to": "expired"
|
|
524
|
-
},
|
|
525
|
-
"open_claim": {
|
|
526
|
-
"from": [
|
|
527
|
-
"active"
|
|
528
|
-
],
|
|
529
|
-
"to": "claim_open"
|
|
530
|
-
},
|
|
531
|
-
"settle_claim": {
|
|
532
|
-
"from": [
|
|
533
|
-
"claim_open"
|
|
534
|
-
],
|
|
535
|
-
"to": "settled"
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
},
|
|
539
|
-
"nav": [
|
|
540
|
-
"Blueprints",
|
|
541
|
-
"Motor Policies"
|
|
542
|
-
],
|
|
543
|
-
"parties": {
|
|
544
|
-
"beneficiary": "insurerAccountId",
|
|
545
|
-
"payer": "policyholderAccountId"
|
|
546
|
-
},
|
|
547
|
-
"required": [
|
|
548
|
-
"policyholderAccountId",
|
|
549
|
-
"insurerAccountId",
|
|
550
|
-
"premiumAmount",
|
|
551
|
-
"coverageAmount",
|
|
552
|
-
"currency",
|
|
553
|
-
"expiresAt"
|
|
554
|
-
],
|
|
555
|
-
"subject": {
|
|
556
|
-
"kinds": [
|
|
557
|
-
"vehicle"
|
|
558
|
-
]
|
|
559
|
-
},
|
|
560
|
-
"summary": "Vehicle insurance policy priced and capped on a declared car value.",
|
|
561
|
-
"templateId": "insurance",
|
|
562
|
-
"title": "Motor policy",
|
|
563
|
-
"update": {
|
|
564
|
-
"fields": [
|
|
565
|
-
"coverageDescription"
|
|
566
|
-
],
|
|
567
|
-
"states": [
|
|
568
|
-
"quoted"
|
|
569
|
-
]
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
"actionOrder": [
|
|
574
|
-
"create",
|
|
575
|
-
"fund",
|
|
576
|
-
"release",
|
|
577
|
-
"quote_cancel",
|
|
578
|
-
"confirm_cancel",
|
|
579
|
-
"collect_penalty"
|
|
580
|
-
],
|
|
581
|
-
"actions": {
|
|
582
|
-
"collect_penalty": {
|
|
583
|
-
"agentDescription": "Pay the retained cancellation penalty from escrow to the seller, which drains the escrow. Call it only when confirm_cancel returned a positive penalty. A cancellation quoted at zero penalty has nothing to collect.",
|
|
584
|
-
"description": "Pays the computed retained cancellation penalty to the seller. Invoke only when confirm_cancel returns a positive refs.unwindPenalty.",
|
|
585
|
-
"effects": {
|
|
586
|
-
"moves": [
|
|
587
|
-
{
|
|
588
|
-
"signature": "moves.transfer.internal",
|
|
589
|
-
"source": "moves[0]"
|
|
590
|
-
}
|
|
591
|
-
]
|
|
592
|
-
},
|
|
593
|
-
"eventName": "vehicle_escrow.penalty_collected",
|
|
594
|
-
"moves": [
|
|
595
|
-
{
|
|
596
|
-
"bind": {
|
|
597
|
-
"amount": {
|
|
598
|
-
"from": "instance",
|
|
599
|
-
"path": "refs.unwindPenalty"
|
|
600
|
-
},
|
|
601
|
-
"currency": {
|
|
602
|
-
"from": "instance",
|
|
603
|
-
"path": "fields.currency"
|
|
604
|
-
},
|
|
605
|
-
"destinationAccountId": {
|
|
606
|
-
"from": "instance",
|
|
607
|
-
"path": "fields.sellerAccountId"
|
|
608
|
-
},
|
|
609
|
-
"productId": {
|
|
610
|
-
"from": "instance",
|
|
611
|
-
"path": "productId"
|
|
612
|
-
},
|
|
613
|
-
"sourceAccountId": {
|
|
614
|
-
"from": "instance",
|
|
615
|
-
"path": "refs.escrowAccountId"
|
|
616
|
-
}
|
|
617
|
-
},
|
|
618
|
-
"capture": {
|
|
619
|
-
"penaltyTransferId": "transferId"
|
|
620
|
-
},
|
|
621
|
-
"key": "transfer",
|
|
622
|
-
"operation": "internal_transfer.create"
|
|
623
|
-
}
|
|
624
|
-
],
|
|
625
|
-
"steps": [],
|
|
626
|
-
"summary": "Collect a vehicle cancellation penalty"
|
|
627
|
-
},
|
|
628
|
-
"confirm_cancel": {
|
|
629
|
-
"agentDescription": "Refund the quoted amount, the price minus the scheduled penalty, from escrow to the buyer. Call quote_cancel first, it seeds the amount. This moves money and does not reverse. Any retained penalty stays in escrow until collect_penalty pays it out.",
|
|
630
|
-
"commit": "quote_cancel",
|
|
631
|
-
"description": "Unwinds the escrow, refunding the price minus the scheduled penalty to the buyer. The quote seeded that amount into refs.unwindRefund; this step moves it from the escrow account back to the buyer.",
|
|
632
|
-
"effects": {
|
|
633
|
-
"moves": [
|
|
634
|
-
{
|
|
635
|
-
"signature": "moves.transfer.internal",
|
|
636
|
-
"source": "moves[0]"
|
|
637
|
-
}
|
|
638
|
-
]
|
|
639
|
-
},
|
|
640
|
-
"moves": [
|
|
641
|
-
{
|
|
642
|
-
"bind": {
|
|
643
|
-
"amount": {
|
|
644
|
-
"from": "instance",
|
|
645
|
-
"path": "refs.unwindRefund"
|
|
646
|
-
},
|
|
647
|
-
"currency": {
|
|
648
|
-
"from": "instance",
|
|
649
|
-
"path": "fields.currency"
|
|
650
|
-
},
|
|
651
|
-
"destinationAccountId": {
|
|
652
|
-
"from": "instance",
|
|
653
|
-
"path": "fields.buyerAccountId"
|
|
654
|
-
},
|
|
655
|
-
"productId": {
|
|
656
|
-
"from": "instance",
|
|
657
|
-
"path": "productId"
|
|
658
|
-
},
|
|
659
|
-
"sourceAccountId": {
|
|
660
|
-
"from": "instance",
|
|
661
|
-
"path": "refs.escrowAccountId"
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
|
-
"capture": {
|
|
665
|
-
"refundTransferId": "transferId"
|
|
666
|
-
},
|
|
667
|
-
"key": "transfer",
|
|
668
|
-
"operation": "internal_transfer.create"
|
|
669
|
-
}
|
|
670
|
-
],
|
|
671
|
-
"steps": [],
|
|
672
|
-
"summary": "Confirm a vehicle escrow cancellation"
|
|
673
|
-
},
|
|
674
|
-
"create": {
|
|
675
|
-
"agentDescription": "Open the escrow and provision its account. No money moves. The price is admitted against the referenced motor policy's coverage cap, so an underinsured car is refused here rather than at funding.",
|
|
676
|
-
"description": "Opens the escrow and provisions its dedicated product escrow account. The price is admitted against the motor policy's coverage cap.",
|
|
677
|
-
"moves": [],
|
|
678
|
-
"steps": [
|
|
679
|
-
{
|
|
680
|
-
"bind": {
|
|
681
|
-
"currency": {
|
|
682
|
-
"from": "instance",
|
|
683
|
-
"path": "fields.currency"
|
|
684
|
-
},
|
|
685
|
-
"owner.id": {
|
|
686
|
-
"from": "instance",
|
|
687
|
-
"path": "productId"
|
|
688
|
-
},
|
|
689
|
-
"owner.type": {
|
|
690
|
-
"from": "const",
|
|
691
|
-
"value": "product"
|
|
692
|
-
},
|
|
693
|
-
"productId": {
|
|
694
|
-
"from": "instance",
|
|
695
|
-
"path": "productId"
|
|
696
|
-
},
|
|
697
|
-
"role": {
|
|
698
|
-
"from": "const",
|
|
699
|
-
"value": "product_escrow"
|
|
700
|
-
}
|
|
701
|
-
},
|
|
702
|
-
"capture": {
|
|
703
|
-
"escrowAccountId": "accountId"
|
|
704
|
-
},
|
|
705
|
-
"operation": "account.escrow.provision"
|
|
706
|
-
}
|
|
707
|
-
],
|
|
708
|
-
"summary": "Create a vehicle escrow"
|
|
709
|
-
},
|
|
710
|
-
"fund": {
|
|
711
|
-
"agentDescription": "Move the full price from the buyer's account into escrow. This is the first money movement on the escrow, so get the buyer's confirmation. Only an escrow in created can fund.",
|
|
712
|
-
"description": "Moves the price from the buyer account into the escrow account.",
|
|
713
|
-
"effects": {
|
|
714
|
-
"moves": [
|
|
715
|
-
{
|
|
716
|
-
"signature": "moves.collection.pay_in",
|
|
717
|
-
"source": "moves[0]"
|
|
718
|
-
}
|
|
719
|
-
]
|
|
720
|
-
},
|
|
721
|
-
"moves": [
|
|
722
|
-
{
|
|
723
|
-
"bind": {
|
|
724
|
-
"amount": {
|
|
725
|
-
"from": "instance",
|
|
726
|
-
"path": "fields.price"
|
|
727
|
-
},
|
|
728
|
-
"currency": {
|
|
729
|
-
"from": "instance",
|
|
730
|
-
"path": "fields.currency"
|
|
731
|
-
},
|
|
732
|
-
"destinationAccountId": {
|
|
733
|
-
"from": "instance",
|
|
734
|
-
"path": "refs.escrowAccountId"
|
|
735
|
-
},
|
|
736
|
-
"productId": {
|
|
737
|
-
"from": "instance",
|
|
738
|
-
"path": "productId"
|
|
739
|
-
},
|
|
740
|
-
"sourceAccountId": {
|
|
741
|
-
"from": "instance",
|
|
742
|
-
"path": "fields.buyerAccountId"
|
|
743
|
-
}
|
|
744
|
-
},
|
|
745
|
-
"capture": {
|
|
746
|
-
"fundTransferId": "transferId"
|
|
747
|
-
},
|
|
748
|
-
"key": "transfer",
|
|
749
|
-
"operation": "internal_transfer.create"
|
|
750
|
-
}
|
|
751
|
-
],
|
|
752
|
-
"sandboxFailurePoint": "funding",
|
|
753
|
-
"steps": [],
|
|
754
|
-
"summary": "Fund a vehicle escrow"
|
|
755
|
-
},
|
|
756
|
-
"quote_cancel": {
|
|
757
|
-
"agentDescription": "Price the cancellation. No money moves. It computes the penalty from the schedule and parks the refund amount on the escrow for confirm_cancel to move. Only a funded escrow can be quoted, and once quoted, release is no longer reachable.",
|
|
758
|
-
"description": "Parks the funded escrow for cancellation and quotes the refund under the penalty schedule. No money moves; the confirm executes the refund.",
|
|
759
|
-
"effects": {
|
|
760
|
-
"holds": [
|
|
761
|
-
{
|
|
762
|
-
"signature": "holds.quote",
|
|
763
|
-
"source": "quote"
|
|
764
|
-
}
|
|
765
|
-
],
|
|
766
|
-
"schedules": [
|
|
767
|
-
{
|
|
768
|
-
"signature": "schedules.expiry",
|
|
769
|
-
"source": "quote"
|
|
770
|
-
}
|
|
771
|
-
]
|
|
772
|
-
},
|
|
773
|
-
"moves": [],
|
|
774
|
-
"quote": {
|
|
775
|
-
"baseField": "price",
|
|
776
|
-
"chargeRef": "unwindPenalty",
|
|
777
|
-
"charges": [
|
|
778
|
-
{
|
|
779
|
-
"bps": 500,
|
|
780
|
-
"withinOffset": "P7D"
|
|
781
|
-
},
|
|
782
|
-
{
|
|
783
|
-
"bps": 1000
|
|
784
|
-
}
|
|
785
|
-
],
|
|
786
|
-
"expires": {
|
|
787
|
-
"offset": "PT15M"
|
|
788
|
-
},
|
|
789
|
-
"fixes": [
|
|
790
|
-
"buyerAccountId",
|
|
791
|
-
"price"
|
|
792
|
-
],
|
|
793
|
-
"netDestinationField": "buyerAccountId",
|
|
794
|
-
"netRef": "unwindRefund"
|
|
795
|
-
},
|
|
796
|
-
"steps": [],
|
|
797
|
-
"summary": "Quote a vehicle escrow cancellation"
|
|
798
|
-
},
|
|
799
|
-
"release": {
|
|
800
|
-
"agentDescription": "Pay the full price from escrow to the seller and close the escrow as settled. Refused unless the motor policy is active at the moment of the call. This does not reverse: there is no clawback window after release.",
|
|
801
|
-
"description": "Clears the full price from the escrow account to the seller while the car's motor policy is active.",
|
|
802
|
-
"earnable": true,
|
|
803
|
-
"effects": {
|
|
804
|
-
"moves": [
|
|
805
|
-
{
|
|
806
|
-
"signature": "moves.transfer.internal",
|
|
807
|
-
"source": "moves[0]"
|
|
808
|
-
}
|
|
809
|
-
],
|
|
810
|
-
"reads": [
|
|
811
|
-
{
|
|
812
|
-
"signature": "reads.requires_refs",
|
|
813
|
-
"source": "requiresRefs"
|
|
814
|
-
}
|
|
815
|
-
]
|
|
816
|
-
},
|
|
817
|
-
"moves": [
|
|
818
|
-
{
|
|
819
|
-
"bind": {
|
|
820
|
-
"amount": {
|
|
821
|
-
"from": "instance",
|
|
822
|
-
"path": "fields.price"
|
|
823
|
-
},
|
|
824
|
-
"currency": {
|
|
825
|
-
"from": "instance",
|
|
826
|
-
"path": "fields.currency"
|
|
827
|
-
},
|
|
828
|
-
"destinationAccountId": {
|
|
829
|
-
"from": "instance",
|
|
830
|
-
"path": "fields.sellerAccountId"
|
|
831
|
-
},
|
|
832
|
-
"productId": {
|
|
833
|
-
"from": "instance",
|
|
834
|
-
"path": "productId"
|
|
835
|
-
},
|
|
836
|
-
"sourceAccountId": {
|
|
837
|
-
"from": "instance",
|
|
838
|
-
"path": "refs.escrowAccountId"
|
|
839
|
-
}
|
|
840
|
-
},
|
|
841
|
-
"capture": {
|
|
842
|
-
"releaseTransferId": "transferId"
|
|
843
|
-
},
|
|
844
|
-
"key": "transfer",
|
|
845
|
-
"operation": "internal_transfer.create"
|
|
846
|
-
}
|
|
847
|
-
],
|
|
848
|
-
"requiresRefs": [
|
|
849
|
-
{
|
|
850
|
-
"field": "policyId",
|
|
851
|
-
"statuses": [
|
|
852
|
-
"active"
|
|
853
|
-
]
|
|
854
|
-
}
|
|
855
|
-
],
|
|
856
|
-
"sandboxFailurePoint": "release",
|
|
857
|
-
"steps": [],
|
|
858
|
-
"summary": "Release a vehicle escrow"
|
|
859
|
-
}
|
|
860
|
-
},
|
|
861
|
-
"agentDescription": "Reach for vehicle escrow when a car buyer's money has to be held until the vehicle's motor policy is confirmed active, then paid to the seller in full. Cancellation runs a quote first and a confirm second, and a penalty comes off the buyer's refund. The listing itself is a separate instrument.",
|
|
862
|
-
"callerParkedStates": {
|
|
863
|
-
"cancel_quoted": "a quoted cancellation moves money only when the caller confirms it",
|
|
864
|
-
"canceled": "the residual penalty is collected by the operator as a deliberate follow-up transfer",
|
|
865
|
-
"created": "funding the escrow is the buyer's act",
|
|
866
|
-
"funded": "releasing or quoting a cancellation over held value is a party decision"
|
|
867
|
-
},
|
|
868
|
-
"description": "A vehicle escrow holds the buyer's funds in a dedicated product escrow account, then releases the full price to the seller while the car's motor policy is active. Before release it can unwind through a quote then a confirm that refunds the price to the buyer under a penalty schedule.",
|
|
869
|
-
"dials": [
|
|
870
|
-
{
|
|
871
|
-
"key": "cancellation_penalty",
|
|
872
|
-
"kind": "unwind_penalty",
|
|
873
|
-
"summary": "Replaces the tiered cancellation penalty schedule quotes price against.",
|
|
874
|
-
"title": "Cancellation penalty schedule"
|
|
875
|
-
}
|
|
876
|
-
],
|
|
877
|
-
"fields": {
|
|
878
|
-
"buyerAccountId": {
|
|
879
|
-
"description": "Hyperscale account ID",
|
|
880
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
881
|
-
"type": "string",
|
|
882
|
-
"x-hyperscale-reference-filter": {
|
|
883
|
-
"column": "role",
|
|
884
|
-
"values": [
|
|
885
|
-
"customer_balance"
|
|
886
|
-
]
|
|
887
|
-
}
|
|
888
|
-
},
|
|
889
|
-
"currency": {
|
|
890
|
-
"description": "ISO 4217 currency code",
|
|
891
|
-
"maxLength": 3,
|
|
892
|
-
"minLength": 3,
|
|
893
|
-
"pattern": "^[A-Z]{3}$",
|
|
894
|
-
"type": "string"
|
|
895
|
-
},
|
|
896
|
-
"memo": {
|
|
897
|
-
"maxLength": 180,
|
|
898
|
-
"minLength": 1,
|
|
899
|
-
"type": "string"
|
|
900
|
-
},
|
|
901
|
-
"policyId": {
|
|
902
|
-
"description": "Motor policy that must be active for the escrow to clear",
|
|
903
|
-
"pattern": "^mpol_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
904
|
-
"type": "string"
|
|
905
|
-
},
|
|
906
|
-
"price": {
|
|
907
|
-
"description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
|
|
908
|
-
"pattern": "^[1-9][0-9]{0,17}$",
|
|
909
|
-
"type": "string"
|
|
910
|
-
},
|
|
911
|
-
"sellerAccountId": {
|
|
912
|
-
"description": "Hyperscale account ID",
|
|
913
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
914
|
-
"type": "string",
|
|
915
|
-
"x-hyperscale-reference-filter": {
|
|
916
|
-
"column": "role",
|
|
917
|
-
"values": [
|
|
918
|
-
"customer_balance"
|
|
919
|
-
]
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
},
|
|
923
|
-
"id": "vehicle_escrow",
|
|
924
|
-
"idPrefix": "vesc",
|
|
925
|
-
"lifecycle": {
|
|
926
|
-
"initial": "created",
|
|
927
|
-
"states": [
|
|
928
|
-
"created",
|
|
929
|
-
"funded",
|
|
930
|
-
"settled",
|
|
931
|
-
"cancel_quoted",
|
|
932
|
-
"canceled",
|
|
933
|
-
"penalty_collected"
|
|
934
|
-
],
|
|
935
|
-
"transitions": {
|
|
936
|
-
"collect_penalty": {
|
|
937
|
-
"from": [
|
|
938
|
-
"canceled"
|
|
939
|
-
],
|
|
940
|
-
"to": "penalty_collected"
|
|
941
|
-
},
|
|
942
|
-
"confirm_cancel": {
|
|
943
|
-
"from": [
|
|
944
|
-
"cancel_quoted"
|
|
945
|
-
],
|
|
946
|
-
"to": "canceled"
|
|
947
|
-
},
|
|
948
|
-
"fund": {
|
|
949
|
-
"from": [
|
|
950
|
-
"created"
|
|
951
|
-
],
|
|
952
|
-
"to": "funded"
|
|
953
|
-
},
|
|
954
|
-
"quote_cancel": {
|
|
955
|
-
"from": [
|
|
956
|
-
"funded"
|
|
957
|
-
],
|
|
958
|
-
"to": "cancel_quoted"
|
|
959
|
-
},
|
|
960
|
-
"release": {
|
|
961
|
-
"from": [
|
|
962
|
-
"funded"
|
|
963
|
-
],
|
|
964
|
-
"to": "settled"
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
},
|
|
968
|
-
"nav": [
|
|
969
|
-
"Blueprints",
|
|
970
|
-
"Vehicle Escrows"
|
|
971
|
-
],
|
|
972
|
-
"parties": {
|
|
973
|
-
"beneficiary": "sellerAccountId",
|
|
974
|
-
"payer": "buyerAccountId"
|
|
975
|
-
},
|
|
976
|
-
"required": [
|
|
977
|
-
"buyerAccountId",
|
|
978
|
-
"sellerAccountId",
|
|
979
|
-
"policyId",
|
|
980
|
-
"price",
|
|
981
|
-
"currency"
|
|
982
|
-
],
|
|
983
|
-
"subject": {
|
|
984
|
-
"kinds": [
|
|
985
|
-
"vehicle"
|
|
986
|
-
]
|
|
987
|
-
},
|
|
988
|
-
"summary": "Insured-car escrow that clears to the seller while coverage is live.",
|
|
989
|
-
"templateId": "escrow",
|
|
990
|
-
"title": "Vehicle escrow",
|
|
991
|
-
"update": {
|
|
992
|
-
"fields": [
|
|
993
|
-
"memo"
|
|
994
|
-
],
|
|
995
|
-
"states": [
|
|
996
|
-
"created"
|
|
997
|
-
]
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
],
|
|
1001
|
-
"product": "insured_car_marketplace",
|
|
1002
|
-
"subjects": [
|
|
1003
|
-
{
|
|
1004
|
-
"declaredValue": "required",
|
|
1005
|
-
"kind": "vehicle",
|
|
1006
|
-
"schema": {
|
|
1007
|
-
"additionalProperties": false,
|
|
1008
|
-
"properties": {
|
|
1009
|
-
"make": {
|
|
1010
|
-
"maxLength": 60,
|
|
1011
|
-
"minLength": 1,
|
|
1012
|
-
"type": "string"
|
|
1013
|
-
},
|
|
1014
|
-
"mileageKm": {
|
|
1015
|
-
"maximum": 9007199254740991,
|
|
1016
|
-
"minimum": 0,
|
|
1017
|
-
"type": "integer"
|
|
1018
|
-
},
|
|
1019
|
-
"model": {
|
|
1020
|
-
"maxLength": 60,
|
|
1021
|
-
"minLength": 1,
|
|
1022
|
-
"type": "string"
|
|
1023
|
-
},
|
|
1024
|
-
"vin": {
|
|
1025
|
-
"maxLength": 17,
|
|
1026
|
-
"minLength": 11,
|
|
1027
|
-
"type": "string"
|
|
1028
|
-
},
|
|
1029
|
-
"year": {
|
|
1030
|
-
"pattern": "^\\d{4}$",
|
|
1031
|
-
"type": "string"
|
|
1032
|
-
}
|
|
1033
|
-
},
|
|
1034
|
-
"required": [
|
|
1035
|
-
"vin",
|
|
1036
|
-
"make",
|
|
1037
|
-
"model",
|
|
1038
|
-
"year",
|
|
1039
|
-
"mileageKm"
|
|
1040
|
-
],
|
|
1041
|
-
"type": "object"
|
|
1042
|
-
},
|
|
1043
|
-
"title": "Vehicle",
|
|
1044
|
-
"version": 1
|
|
1045
|
-
}
|
|
1046
|
-
],
|
|
1047
|
-
"title": "Insured car marketplace",
|
|
1048
|
-
"udl": 1,
|
|
1049
|
-
"version": 1
|
|
1050
|
-
}
|