@hyperscale0/udl 1.0.0-beta.1 → 1.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 +78 -25
- package/README.md +37 -99
- package/conformance/README.md +44 -41
- package/conformance/evolution/action-contract.expected.json +10 -0
- package/conformance/evolution/action-contract.live.udl +44 -0
- package/conformance/evolution/action-contract.next.udl +45 -0
- package/conformance/evolution/product-identity.expected.json +10 -0
- package/conformance/evolution/product-identity.live.udl +55 -0
- package/conformance/evolution/product-identity.next.udl +55 -0
- package/conformance/evolution/version-required.expected.json +10 -0
- package/conformance/evolution/version-required.live.udl +55 -0
- package/conformance/evolution/version-required.next.udl +58 -0
- package/conformance/invalid/action-without-transition.expected.json +10 -0
- package/conformance/invalid/{verb-without-transition.udl → action-without-transition.udl} +7 -2
- package/conformance/invalid/agent-description-too-long.expected.json +10 -0
- package/conformance/invalid/agent-description-too-long.udl +57 -0
- package/conformance/invalid/blank-title.expected.json +1 -1
- package/conformance/invalid/blank-title.udl +6 -2
- package/conformance/invalid/composition-dial-duplicate-key.expected.json +10 -0
- package/conformance/invalid/composition-dial-duplicate-key.udl +73 -0
- package/conformance/invalid/depth-budget.expected.json +1 -1
- package/conformance/invalid/duplicate-subject.expected.json +10 -0
- package/conformance/invalid/duplicate-subject.udl +230 -0
- package/conformance/invalid/forged-effects.expected.json +10 -0
- package/conformance/invalid/forged-effects.udl +76 -0
- package/conformance/invalid/format-version.expected.json +1 -1
- package/conformance/invalid/format-version.udl +6 -2
- package/conformance/invalid/instrument-id-not-snake-case.expected.json +10 -0
- package/conformance/invalid/{noun-id-not-snake-case.udl → instrument-id-not-snake-case.udl} +6 -2
- package/conformance/invalid/invalid-aggregate-gate-shape.expected.json +10 -0
- package/conformance/invalid/invalid-aggregate-gate-shape.udl +1819 -0
- package/conformance/invalid/invalid-check-duration.expected.json +10 -0
- package/conformance/invalid/invalid-check-duration.udl +219 -0
- package/conformance/invalid/invalid-dial-anchor.expected.json +10 -0
- package/conformance/invalid/invalid-dial-anchor.udl +219 -0
- package/conformance/invalid/invalid-exception-parent-ref.expected.json +10 -0
- package/conformance/invalid/invalid-exception-parent-ref.udl +2487 -0
- package/conformance/invalid/invalid-exposure-shape.expected.json +10 -0
- package/conformance/invalid/invalid-exposure-shape.udl +1819 -0
- package/conformance/invalid/invalid-remainder.expected.json +10 -0
- package/conformance/invalid/invalid-remainder.udl +220 -0
- package/conformance/invalid/invalid-schema-keyword.expected.json +10 -0
- package/conformance/invalid/invalid-schema-keyword.udl +220 -0
- package/conformance/invalid/invalid-utf8.expected.json +1 -1
- package/conformance/invalid/malformed-json.expected.json +1 -1
- package/conformance/invalid/missing-create-action.expected.json +10 -0
- package/conformance/invalid/{missing-create-verb.udl → missing-create-action.udl} +5 -2
- package/conformance/invalid/missing-exception-amount-field.expected.json +10 -0
- package/conformance/invalid/missing-exception-amount-field.udl +2487 -0
- package/conformance/invalid/missing-exception-contract.expected.json +14 -0
- package/conformance/invalid/missing-exception-contract.udl +2523 -0
- package/conformance/invalid/missing-exception-reason-field.expected.json +10 -0
- package/conformance/invalid/missing-exception-reason-field.udl +2487 -0
- package/conformance/invalid/not-an-object.expected.json +1 -1
- package/conformance/invalid/payout-reconcile-not-a-bank-debit.expected.json +10 -0
- package/conformance/invalid/payout-reconcile-not-a-bank-debit.udl +259 -0
- package/conformance/invalid/quote-freeze-set-incomplete.expected.json +10 -0
- package/conformance/invalid/quote-freeze-set-incomplete.udl +261 -0
- package/conformance/invalid/quote-named-reference-gate.expected.json +10 -0
- package/conformance/invalid/quote-named-reference-gate.udl +50 -0
- package/conformance/invalid/reconcile-named-reference-gate.expected.json +10 -0
- package/conformance/invalid/reconcile-named-reference-gate.udl +50 -0
- package/conformance/invalid/unknown-key.expected.json +1 -1
- package/conformance/invalid/unknown-key.udl +6 -2
- package/conformance/invalid/unknown-reference-gate-field.expected.json +10 -0
- package/conformance/invalid/unknown-reference-gate-field.udl +1819 -0
- package/conformance/invalid/unknown-required-field.expected.json +10 -0
- package/conformance/invalid/unknown-required-field.udl +220 -0
- package/conformance/invalid/unreachable-state.expected.json +2 -2
- package/conformance/invalid/unreachable-state.udl +6 -2
- package/conformance/invalid/wrong-exception-amount-field.expected.json +10 -0
- package/conformance/invalid/wrong-exception-amount-field.udl +2487 -0
- package/conformance/invalid/wrong-exception-reason-field.expected.json +10 -0
- package/conformance/invalid/wrong-exception-reason-field.udl +2487 -0
- package/conformance/valid/agent-description.expected.json +6 -0
- package/conformance/valid/agent-description.udl +66 -0
- package/conformance/valid/cards.expected.json +1 -0
- package/conformance/valid/cards.udl +843 -356
- package/conformance/valid/commerce-escrow.expected.json +1 -0
- package/conformance/valid/commerce-escrow.udl +792 -291
- package/conformance/valid/compiled-crowdfunding.expected.json +6 -0
- package/conformance/valid/compiled-crowdfunding.udl +1843 -0
- package/conformance/valid/compiled-watch-club.expected.json +6 -0
- package/conformance/valid/compiled-watch-club.udl +2486 -0
- package/conformance/valid/complete-contract.expected.json +6 -0
- package/conformance/valid/complete-contract.udl +218 -0
- package/conformance/valid/effect-signatures.expected.json +6 -0
- package/conformance/valid/effect-signatures.udl +75 -0
- package/conformance/valid/hand-edited.expected.json +1 -0
- package/conformance/valid/hand-edited.udl +1 -1
- package/conformance/valid/insured-car-marketplace.expected.json +1 -0
- package/conformance/valid/insured-car-marketplace.udl +534 -315
- package/conformance/valid/insured-travel.expected.json +2 -1
- package/conformance/valid/insured-travel.udl +1489 -641
- package/conformance/valid/minimal.expected.json +1 -0
- package/conformance/valid/minimal.udl +18 -14
- package/conformance/valid/protection.expected.json +1 -0
- package/conformance/valid/protection.udl +719 -304
- package/conformance/valid/string-escaping.expected.json +6 -0
- package/conformance/valid/string-escaping.udl +54 -0
- package/dist/canonical.d.ts +2 -0
- package/dist/canonical.d.ts.map +1 -1
- package/dist/canonical.js +7 -0
- package/dist/canonical.js.map +1 -1
- package/dist/check-profiles.d.ts +57 -0
- package/dist/check-profiles.d.ts.map +1 -0
- package/dist/check-profiles.js +62 -0
- package/dist/check-profiles.js.map +1 -0
- package/dist/cli.js +48 -4
- package/dist/cli.js.map +1 -1
- package/dist/diagnostics.d.ts +168 -0
- package/dist/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics.js +164 -0
- package/dist/diagnostics.js.map +1 -0
- package/dist/effects.d.ts +41 -0
- package/dist/effects.d.ts.map +1 -0
- package/dist/effects.js +110 -0
- package/dist/effects.js.map +1 -0
- package/dist/evolution.d.ts +51 -18
- package/dist/evolution.d.ts.map +1 -1
- package/dist/evolution.js +244 -102
- package/dist/evolution.js.map +1 -1
- package/dist/finance.d.ts +17 -13
- package/dist/finance.d.ts.map +1 -1
- package/dist/finance.js +165 -109
- package/dist/finance.js.map +1 -1
- package/dist/index.d.ts +12 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +2 -2
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +4 -3
- package/dist/limits.js.map +1 -1
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +6 -16
- package/dist/parser.js.map +1 -1
- package/dist/schema.d.ts +2059 -135
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +759 -73
- package/dist/schema.js.map +1 -1
- package/dist/validation.d.ts +22 -9
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +1463 -457
- package/dist/validation.js.map +1 -1
- package/docs/README.md +14 -0
- package/docs/guide/01-a-document.md +37 -0
- package/docs/guide/02-money-steps.md +23 -0
- package/docs/guide/03-laws.md +18 -0
- package/docs/guide/04-fees-and-remainder.md +15 -0
- package/docs/guide/05-checks-updates-dials.md +7 -0
- package/docs/guide/06-effects.md +11 -0
- package/docs/guide/07-evolution.md +11 -0
- package/docs/guide/08-implementing.md +13 -0
- package/docs/llms-full.txt +1241 -0
- package/docs/llms.txt +14 -0
- package/docs/reference/canonical.md +16 -0
- package/docs/reference/clauses.md +986 -0
- package/docs/reference/cli.md +22 -0
- package/docs/reference/diagnostics.md +32 -0
- package/package.json +6 -2
- package/skills/udl/SKILL.md +28 -0
- package/spec/README.md +82 -51
- package/spec/udl.schema.json +1191 -119
- package/src/canonical.ts +11 -0
- package/src/check-profiles.ts +80 -0
- package/src/cli.ts +49 -3
- package/src/diagnostics.ts +221 -0
- package/src/effects.ts +163 -0
- package/src/evolution.ts +375 -125
- package/src/finance.ts +255 -160
- package/src/index.ts +50 -14
- package/src/limits.ts +4 -3
- package/src/parser.ts +15 -18
- package/src/schema.ts +855 -81
- package/src/validation.ts +2666 -560
- package/conformance/invalid/missing-create-verb.expected.json +0 -10
- package/conformance/invalid/noun-id-not-snake-case.expected.json +0 -10
- package/conformance/invalid/verb-without-transition.expected.json +0 -10
|
@@ -1,140 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"instruments": [
|
|
3
3
|
{
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"description": "ISO 4217 currency code",
|
|
13
|
-
"maxLength": 3,
|
|
14
|
-
"minLength": 3,
|
|
15
|
-
"pattern": "^[A-Z]{3}$",
|
|
16
|
-
"type": "string"
|
|
17
|
-
},
|
|
18
|
-
"description": {
|
|
19
|
-
"maxLength": 2000,
|
|
20
|
-
"minLength": 1,
|
|
21
|
-
"type": "string"
|
|
22
|
-
},
|
|
23
|
-
"escrowOrderId": {
|
|
24
|
-
"description": "Escrow order whose held funds reserve this listing",
|
|
25
|
-
"pattern": "^eord_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
26
|
-
"type": "string"
|
|
27
|
-
},
|
|
28
|
-
"expiresAt": {
|
|
29
|
-
"format": "hyperscale-date-time",
|
|
30
|
-
"type": "string"
|
|
31
|
-
},
|
|
32
|
-
"headline": {
|
|
33
|
-
"maxLength": 120,
|
|
34
|
-
"minLength": 1,
|
|
35
|
-
"type": "string"
|
|
36
|
-
},
|
|
37
|
-
"imageUrl": {
|
|
38
|
-
"format": "hyperscale-uri",
|
|
39
|
-
"maxLength": 2000,
|
|
40
|
-
"type": "string"
|
|
41
|
-
},
|
|
42
|
-
"sellerAccountId": {
|
|
43
|
-
"description": "Hyperscale account ID",
|
|
44
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
45
|
-
"type": "string",
|
|
46
|
-
"x-hyperscale-reference-filter": {
|
|
47
|
-
"column": "role",
|
|
48
|
-
"values": [
|
|
49
|
-
"customer_balance"
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"id": "listing",
|
|
55
|
-
"idPrefix": "lst",
|
|
56
|
-
"lifecycle": {
|
|
57
|
-
"initial": "draft",
|
|
58
|
-
"states": [
|
|
59
|
-
"draft",
|
|
60
|
-
"active",
|
|
61
|
-
"reserved",
|
|
62
|
-
"sold",
|
|
63
|
-
"withdrawn"
|
|
64
|
-
],
|
|
65
|
-
"transitions": {
|
|
66
|
-
"expire": {
|
|
67
|
-
"from": [
|
|
68
|
-
"active"
|
|
69
|
-
],
|
|
70
|
-
"to": "withdrawn"
|
|
71
|
-
},
|
|
72
|
-
"publish": {
|
|
73
|
-
"from": [
|
|
74
|
-
"draft"
|
|
75
|
-
],
|
|
76
|
-
"to": "active"
|
|
77
|
-
},
|
|
78
|
-
"reopen": {
|
|
79
|
-
"from": [
|
|
80
|
-
"reserved"
|
|
81
|
-
],
|
|
82
|
-
"to": "active"
|
|
83
|
-
},
|
|
84
|
-
"reserve": {
|
|
85
|
-
"from": [
|
|
86
|
-
"active"
|
|
87
|
-
],
|
|
88
|
-
"to": "reserved"
|
|
89
|
-
},
|
|
90
|
-
"sell": {
|
|
91
|
-
"from": [
|
|
92
|
-
"reserved"
|
|
93
|
-
],
|
|
94
|
-
"to": "sold"
|
|
95
|
-
},
|
|
96
|
-
"withdraw": {
|
|
97
|
-
"from": [
|
|
98
|
-
"draft",
|
|
99
|
-
"active"
|
|
100
|
-
],
|
|
101
|
-
"to": "withdrawn"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"parties": {
|
|
106
|
-
"subjectHolder": "sellerAccountId"
|
|
107
|
-
},
|
|
108
|
-
"required": [
|
|
109
|
-
"sellerAccountId",
|
|
110
|
-
"headline",
|
|
111
|
-
"askingPrice",
|
|
112
|
-
"currency"
|
|
4
|
+
"actionOrder": [
|
|
5
|
+
"create",
|
|
6
|
+
"publish",
|
|
7
|
+
"reserve",
|
|
8
|
+
"reopen",
|
|
9
|
+
"sell",
|
|
10
|
+
"withdraw",
|
|
11
|
+
"expire"
|
|
113
12
|
],
|
|
114
|
-
"
|
|
115
|
-
"kinds": [
|
|
116
|
-
"vehicle",
|
|
117
|
-
"merchandise"
|
|
118
|
-
]
|
|
119
|
-
},
|
|
120
|
-
"summary": "Subject-backed offer published by a seller.",
|
|
121
|
-
"title": "Listing",
|
|
122
|
-
"update": {
|
|
123
|
-
"fields": [
|
|
124
|
-
"headline",
|
|
125
|
-
"description",
|
|
126
|
-
"askingPrice",
|
|
127
|
-
"imageUrl",
|
|
128
|
-
"escrowOrderId",
|
|
129
|
-
"expiresAt"
|
|
130
|
-
],
|
|
131
|
-
"states": [
|
|
132
|
-
"draft",
|
|
133
|
-
"active"
|
|
134
|
-
]
|
|
135
|
-
},
|
|
136
|
-
"verbs": {
|
|
13
|
+
"actions": {
|
|
137
14
|
"create": {
|
|
15
|
+
"agentDescription": "Draft a private offer against one vehicle or merchandise subject at an asking price. The offer is not buyable yet. Publishing is a separate call. Headline, asking price, currency, and the seller's customer balance account are required.",
|
|
138
16
|
"description": "Creates a private offer against one subject. Publishing is a separate, explicit decision.",
|
|
139
17
|
"examples": [
|
|
140
18
|
{
|
|
@@ -145,8 +23,10 @@
|
|
|
145
23
|
"expiresAt": "2026-08-31T21:00:00.000Z",
|
|
146
24
|
"headline": "2021 Toyota Land Cruiser GXR",
|
|
147
25
|
"imageUrl": "https://cdn.sandbox.example/listings/landcruiser-2021.jpg",
|
|
26
|
+
"productId": "prd_sandbox_marketplace01",
|
|
148
27
|
"sellerAccountId": "acct_sandbox_seller0001",
|
|
149
|
-
"subject": "sbj_sandbox_landcruiser1"
|
|
28
|
+
"subject": "sbj_sandbox_landcruiser1",
|
|
29
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
150
30
|
},
|
|
151
31
|
"name": "draft_vehicle_offer"
|
|
152
32
|
}
|
|
@@ -160,24 +40,69 @@
|
|
|
160
40
|
"due": {
|
|
161
41
|
"field": "expiresAt"
|
|
162
42
|
},
|
|
43
|
+
"effects": {
|
|
44
|
+
"schedules": [
|
|
45
|
+
{
|
|
46
|
+
"signature": "schedules.due",
|
|
47
|
+
"source": "due"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"examples": [
|
|
52
|
+
{
|
|
53
|
+
"input": {
|
|
54
|
+
"listingId": "lst_sandbox_landcruiser1",
|
|
55
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
56
|
+
},
|
|
57
|
+
"name": "expire_stale_offer"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
163
60
|
"moves": [],
|
|
164
61
|
"steps": [],
|
|
165
62
|
"summary": "Expire a listing"
|
|
166
63
|
},
|
|
167
64
|
"publish": {
|
|
65
|
+
"agentDescription": "Make a draft offer visible and buyable. Only a draft publishes and no money moves. Set expiresAt through listing.update first if the offer should withdraw itself at a deadline, since expiry only fires when that field is set.",
|
|
168
66
|
"description": "Makes the draft visible and buyable.",
|
|
67
|
+
"examples": [
|
|
68
|
+
{
|
|
69
|
+
"input": {
|
|
70
|
+
"listingId": "lst_sandbox_landcruiser1",
|
|
71
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
72
|
+
},
|
|
73
|
+
"name": "publish_vehicle_offer"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
169
76
|
"moves": [],
|
|
170
77
|
"steps": [],
|
|
171
78
|
"summary": "Publish a listing"
|
|
172
79
|
},
|
|
173
80
|
"reopen": {
|
|
81
|
+
"agentDescription": "Put a reserved offer back on the market after its escrow closed without paying the seller. The escrow order must be refunded, penalty_collected, canceled, or expired. Use sell instead when the escrow released the money to the seller.",
|
|
174
82
|
"description": "Returns the offer to the market after escrow closes without releasing money to the seller.",
|
|
83
|
+
"effects": {
|
|
84
|
+
"reads": [
|
|
85
|
+
{
|
|
86
|
+
"signature": "reads.requires_refs",
|
|
87
|
+
"source": "requiresRefs"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"examples": [
|
|
92
|
+
{
|
|
93
|
+
"input": {
|
|
94
|
+
"listingId": "lst_sandbox_landcruiser1",
|
|
95
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
96
|
+
},
|
|
97
|
+
"name": "reopen_refunded_offer"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
175
100
|
"moves": [],
|
|
176
101
|
"requiresRefs": [
|
|
177
102
|
{
|
|
178
103
|
"field": "escrowOrderId",
|
|
179
104
|
"match": {
|
|
180
|
-
"
|
|
105
|
+
"instrumentInstanceId": "fields.listingId"
|
|
181
106
|
},
|
|
182
107
|
"statuses": [
|
|
183
108
|
"refunded",
|
|
@@ -191,7 +116,40 @@
|
|
|
191
116
|
"summary": "Reopen a listing"
|
|
192
117
|
},
|
|
193
118
|
"reserve": {
|
|
119
|
+
"agentDescription": "Take an active offer off the market for one buyer. The named escrow order must be funded, opened against this same listing, and match its asking price, currency, and seller exactly. No money moves here because the escrow already holds it.",
|
|
194
120
|
"description": "Takes the offer off the market only while its referenced escrow order holds the buyer's funds for this exact listing at its exact economics.",
|
|
121
|
+
"effects": {
|
|
122
|
+
"reads": [
|
|
123
|
+
{
|
|
124
|
+
"signature": "reads.requires_refs",
|
|
125
|
+
"source": "requiresRefs"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"examples": [
|
|
130
|
+
{
|
|
131
|
+
"input": {
|
|
132
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
133
|
+
"listingId": "lst_sandbox_landcruiser1",
|
|
134
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
135
|
+
},
|
|
136
|
+
"name": "reserve_funded_offer"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"input": {
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"properties": {
|
|
142
|
+
"escrowOrderId": {
|
|
143
|
+
"description": "Escrow order whose held funds reserve this listing",
|
|
144
|
+
"pattern": "^eord_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
145
|
+
"type": "string"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"required": [
|
|
149
|
+
"escrowOrderId"
|
|
150
|
+
],
|
|
151
|
+
"type": "object"
|
|
152
|
+
},
|
|
195
153
|
"moves": [],
|
|
196
154
|
"requiresRefs": [
|
|
197
155
|
{
|
|
@@ -200,7 +158,7 @@
|
|
|
200
158
|
"fields.askingPrice": "fields.amount",
|
|
201
159
|
"fields.currency": "fields.currency",
|
|
202
160
|
"fields.sellerAccountId": "fields.sellerAccountId",
|
|
203
|
-
"
|
|
161
|
+
"instrumentInstanceId": "fields.listingId"
|
|
204
162
|
},
|
|
205
163
|
"statuses": [
|
|
206
164
|
"funded"
|
|
@@ -208,11 +166,32 @@
|
|
|
208
166
|
}
|
|
209
167
|
],
|
|
210
168
|
"steps": [],
|
|
211
|
-
"summary": "Reserve a listing"
|
|
169
|
+
"summary": "Reserve a listing",
|
|
170
|
+
"updates": [
|
|
171
|
+
"escrowOrderId"
|
|
172
|
+
]
|
|
212
173
|
},
|
|
213
174
|
"sell": {
|
|
175
|
+
"agentDescription": "Close the offer as sold. The listing must be reserved, and the escrow order opened against this exact listing must already have released the full asking price to this seller. Call it after the money landed, never before. No money moves here.",
|
|
214
176
|
"description": "Marks the subject sold only after the escrow opened against this exact listing has released the full asking price to this seller.",
|
|
177
|
+
"effects": {
|
|
178
|
+
"reads": [
|
|
179
|
+
{
|
|
180
|
+
"signature": "reads.requires_refs",
|
|
181
|
+
"source": "requiresRefs"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
215
185
|
"eventName": "listing.sold",
|
|
186
|
+
"examples": [
|
|
187
|
+
{
|
|
188
|
+
"input": {
|
|
189
|
+
"listingId": "lst_sandbox_landcruiser1",
|
|
190
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
191
|
+
},
|
|
192
|
+
"name": "sell_released_offer"
|
|
193
|
+
}
|
|
194
|
+
],
|
|
216
195
|
"moves": [],
|
|
217
196
|
"requiresRefs": [
|
|
218
197
|
{
|
|
@@ -221,7 +200,7 @@
|
|
|
221
200
|
"fields.askingPrice": "fields.amount",
|
|
222
201
|
"fields.currency": "fields.currency",
|
|
223
202
|
"fields.sellerAccountId": "fields.sellerAccountId",
|
|
224
|
-
"
|
|
203
|
+
"instrumentInstanceId": "fields.listingId"
|
|
225
204
|
},
|
|
226
205
|
"statuses": [
|
|
227
206
|
"released"
|
|
@@ -232,37 +211,46 @@
|
|
|
232
211
|
"summary": "Sell a listing"
|
|
233
212
|
},
|
|
234
213
|
"withdraw": {
|
|
214
|
+
"agentDescription": "Pull a draft or active offer off the market for good. It only works before any escrow reserves the listing, so a reserved offer has to reopen first. No money moves and the listing does not come back.",
|
|
235
215
|
"description": "Closes a draft or active offer before any escrow reservation exists.",
|
|
236
216
|
"eventName": "listing.withdrawn",
|
|
217
|
+
"examples": [
|
|
218
|
+
{
|
|
219
|
+
"input": {
|
|
220
|
+
"listingId": "lst_sandbox_landcruiser1",
|
|
221
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
222
|
+
},
|
|
223
|
+
"name": "withdraw_unreserved_offer"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
237
226
|
"moves": [],
|
|
238
227
|
"steps": [],
|
|
239
228
|
"summary": "Withdraw a listing"
|
|
240
229
|
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
230
|
+
},
|
|
231
|
+
"agentDescription": "Reach for listing when the caller offers one vehicle or merchandise subject for sale, or moves that offer between draft, active, reserved, and closed. A listing never moves money itself. The buyer's cash sits in an escrow_order and the buy-side agreement is an order.",
|
|
232
|
+
"callerParkedStates": {
|
|
233
|
+
"active": "expire fires only when expiresAt is set; an open-ended listing waits on buyer or seller action",
|
|
234
|
+
"draft": "publishing is the seller's authoring decision",
|
|
235
|
+
"reserved": "a reservation resolves by sale or reopening, both party actions"
|
|
236
|
+
},
|
|
237
|
+
"description": "A listing starts as a private draft, becomes buyable when published, stays unavailable while funded escrow reserves it, and ends sold, withdrawn, or expired without ever moving money itself.",
|
|
238
|
+
"dials": [
|
|
239
|
+
{
|
|
240
|
+
"field": "expiresAt",
|
|
241
|
+
"key": "listing_window",
|
|
242
|
+
"kind": "window",
|
|
243
|
+
"maxOffset": "P90D",
|
|
244
|
+
"summary": "Grace beyond the expiry timestamp before an active listing withdraws.",
|
|
245
|
+
"title": "Listing window"
|
|
246
|
+
}
|
|
247
|
+
],
|
|
245
248
|
"fields": {
|
|
246
|
-
"
|
|
249
|
+
"askingPrice": {
|
|
247
250
|
"description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
|
|
248
251
|
"pattern": "^[1-9][0-9]{0,17}$",
|
|
249
252
|
"type": "string"
|
|
250
253
|
},
|
|
251
|
-
"buyerAccountId": {
|
|
252
|
-
"description": "Hyperscale account ID",
|
|
253
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
254
|
-
"type": "string",
|
|
255
|
-
"x-hyperscale-reference-filter": {
|
|
256
|
-
"column": "role",
|
|
257
|
-
"values": [
|
|
258
|
-
"customer_balance"
|
|
259
|
-
]
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
"confirmBy": {
|
|
263
|
-
"format": "hyperscale-date-time",
|
|
264
|
-
"type": "string"
|
|
265
|
-
},
|
|
266
254
|
"currency": {
|
|
267
255
|
"description": "ISO 4217 currency code",
|
|
268
256
|
"maxLength": 3,
|
|
@@ -270,21 +258,30 @@
|
|
|
270
258
|
"pattern": "^[A-Z]{3}$",
|
|
271
259
|
"type": "string"
|
|
272
260
|
},
|
|
261
|
+
"description": {
|
|
262
|
+
"maxLength": 2000,
|
|
263
|
+
"minLength": 1,
|
|
264
|
+
"type": "string"
|
|
265
|
+
},
|
|
273
266
|
"escrowOrderId": {
|
|
274
|
-
"description": "Escrow order
|
|
267
|
+
"description": "Escrow order whose held funds reserve this listing",
|
|
275
268
|
"pattern": "^eord_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
276
269
|
"type": "string"
|
|
277
270
|
},
|
|
278
|
-
"
|
|
279
|
-
"
|
|
280
|
-
"pattern": "^lst_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
271
|
+
"expiresAt": {
|
|
272
|
+
"format": "hyperscale-date-time",
|
|
281
273
|
"type": "string"
|
|
282
274
|
},
|
|
283
|
-
"
|
|
284
|
-
"maxLength":
|
|
275
|
+
"headline": {
|
|
276
|
+
"maxLength": 120,
|
|
285
277
|
"minLength": 1,
|
|
286
278
|
"type": "string"
|
|
287
279
|
},
|
|
280
|
+
"imageUrl": {
|
|
281
|
+
"format": "hyperscale-uri",
|
|
282
|
+
"maxLength": 2000,
|
|
283
|
+
"type": "string"
|
|
284
|
+
},
|
|
288
285
|
"sellerAccountId": {
|
|
289
286
|
"description": "Hyperscale account ID",
|
|
290
287
|
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
@@ -297,55 +294,68 @@
|
|
|
297
294
|
}
|
|
298
295
|
}
|
|
299
296
|
},
|
|
300
|
-
"id": "
|
|
301
|
-
"idPrefix": "
|
|
297
|
+
"id": "listing",
|
|
298
|
+
"idPrefix": "lst",
|
|
302
299
|
"lifecycle": {
|
|
303
|
-
"initial": "
|
|
300
|
+
"initial": "draft",
|
|
304
301
|
"states": [
|
|
305
|
-
"
|
|
306
|
-
"
|
|
307
|
-
"
|
|
308
|
-
"
|
|
309
|
-
"
|
|
302
|
+
"draft",
|
|
303
|
+
"active",
|
|
304
|
+
"reserved",
|
|
305
|
+
"sold",
|
|
306
|
+
"withdrawn"
|
|
310
307
|
],
|
|
311
308
|
"transitions": {
|
|
312
|
-
"
|
|
309
|
+
"expire": {
|
|
313
310
|
"from": [
|
|
314
|
-
"
|
|
315
|
-
"confirmed"
|
|
311
|
+
"active"
|
|
316
312
|
],
|
|
317
|
-
"to": "
|
|
313
|
+
"to": "withdrawn"
|
|
318
314
|
},
|
|
319
|
-
"
|
|
315
|
+
"publish": {
|
|
320
316
|
"from": [
|
|
321
|
-
"
|
|
317
|
+
"draft"
|
|
322
318
|
],
|
|
323
|
-
"to": "
|
|
319
|
+
"to": "active"
|
|
324
320
|
},
|
|
325
|
-
"
|
|
321
|
+
"reopen": {
|
|
326
322
|
"from": [
|
|
327
|
-
"
|
|
323
|
+
"reserved"
|
|
328
324
|
],
|
|
329
|
-
"to": "
|
|
325
|
+
"to": "active"
|
|
330
326
|
},
|
|
331
|
-
"
|
|
327
|
+
"reserve": {
|
|
332
328
|
"from": [
|
|
333
|
-
"
|
|
329
|
+
"active"
|
|
334
330
|
],
|
|
335
|
-
"to": "
|
|
331
|
+
"to": "reserved"
|
|
332
|
+
},
|
|
333
|
+
"sell": {
|
|
334
|
+
"from": [
|
|
335
|
+
"reserved"
|
|
336
|
+
],
|
|
337
|
+
"to": "sold"
|
|
338
|
+
},
|
|
339
|
+
"withdraw": {
|
|
340
|
+
"from": [
|
|
341
|
+
"draft",
|
|
342
|
+
"active"
|
|
343
|
+
],
|
|
344
|
+
"to": "withdrawn"
|
|
336
345
|
}
|
|
337
346
|
}
|
|
338
347
|
},
|
|
348
|
+
"nav": [
|
|
349
|
+
"Blueprints",
|
|
350
|
+
"Listings"
|
|
351
|
+
],
|
|
339
352
|
"parties": {
|
|
340
|
-
"
|
|
341
|
-
"payer": "buyerAccountId"
|
|
353
|
+
"subjectHolder": "sellerAccountId"
|
|
342
354
|
},
|
|
343
355
|
"required": [
|
|
344
|
-
"buyerAccountId",
|
|
345
356
|
"sellerAccountId",
|
|
346
|
-
"
|
|
347
|
-
"
|
|
348
|
-
"amount",
|
|
357
|
+
"headline",
|
|
358
|
+
"askingPrice",
|
|
349
359
|
"currency"
|
|
350
360
|
],
|
|
351
361
|
"subject": {
|
|
@@ -354,20 +364,64 @@
|
|
|
354
364
|
"merchandise"
|
|
355
365
|
]
|
|
356
366
|
},
|
|
357
|
-
"summary": "
|
|
358
|
-
"
|
|
367
|
+
"summary": "Subject-backed offer published by a seller.",
|
|
368
|
+
"templateId": "marketplace",
|
|
369
|
+
"title": "Listing",
|
|
359
370
|
"update": {
|
|
371
|
+
"examples": [
|
|
372
|
+
{
|
|
373
|
+
"input": {
|
|
374
|
+
"askingPrice": "240000",
|
|
375
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
376
|
+
"listingId": "lst_sandbox_landcruiser1",
|
|
377
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
378
|
+
},
|
|
379
|
+
"name": "attach_funded_escrow"
|
|
380
|
+
}
|
|
381
|
+
],
|
|
360
382
|
"fields": [
|
|
361
|
-
"
|
|
362
|
-
"
|
|
383
|
+
"headline",
|
|
384
|
+
"description",
|
|
385
|
+
"askingPrice",
|
|
386
|
+
"imageUrl",
|
|
387
|
+
"escrowOrderId",
|
|
388
|
+
"expiresAt"
|
|
363
389
|
],
|
|
364
390
|
"states": [
|
|
365
|
-
"
|
|
391
|
+
"draft",
|
|
392
|
+
"active"
|
|
366
393
|
]
|
|
367
|
-
}
|
|
368
|
-
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"actionOrder": [
|
|
398
|
+
"create",
|
|
399
|
+
"confirm",
|
|
400
|
+
"fulfill",
|
|
401
|
+
"cancel",
|
|
402
|
+
"expire"
|
|
403
|
+
],
|
|
404
|
+
"actions": {
|
|
369
405
|
"cancel": {
|
|
406
|
+
"agentDescription": "Abandon the agreement. It is allowed only while the escrow order is still created, or after it fully retreated into refunded, penalty_collected, canceled, or expired. A funded escrow blocks the cancellation until it unwinds first. No money moves here.",
|
|
370
407
|
"description": "Closes the agreement only while escrow is still empty or after every held unit has safely returned to the buyer.",
|
|
408
|
+
"effects": {
|
|
409
|
+
"reads": [
|
|
410
|
+
{
|
|
411
|
+
"signature": "reads.requires_refs",
|
|
412
|
+
"source": "requiresRefs"
|
|
413
|
+
}
|
|
414
|
+
]
|
|
415
|
+
},
|
|
416
|
+
"examples": [
|
|
417
|
+
{
|
|
418
|
+
"input": {
|
|
419
|
+
"orderId": "ord_sandbox_landcruiser01",
|
|
420
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
421
|
+
},
|
|
422
|
+
"name": "cancel_safely_retired_purchase"
|
|
423
|
+
}
|
|
424
|
+
],
|
|
371
425
|
"moves": [],
|
|
372
426
|
"requiresRefs": [
|
|
373
427
|
{
|
|
@@ -385,7 +439,25 @@
|
|
|
385
439
|
"summary": "Cancel an order"
|
|
386
440
|
},
|
|
387
441
|
"confirm": {
|
|
442
|
+
"agentDescription": "Lock the agreement's terms. The listing must still be active at the agreed price with the same seller, and the escrow order must be funded for the full amount with matching buyer, seller, currency, and listing. No money moves. The escrow already holds it.",
|
|
388
443
|
"description": "Makes the agreement final only while the listing is active at the agreed price and escrow holds the full purchase amount for that same listing.",
|
|
444
|
+
"effects": {
|
|
445
|
+
"reads": [
|
|
446
|
+
{
|
|
447
|
+
"signature": "reads.requires_refs",
|
|
448
|
+
"source": "requiresRefs"
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
"examples": [
|
|
453
|
+
{
|
|
454
|
+
"input": {
|
|
455
|
+
"orderId": "ord_sandbox_landcruiser01",
|
|
456
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
457
|
+
},
|
|
458
|
+
"name": "confirm_funded_purchase"
|
|
459
|
+
}
|
|
460
|
+
],
|
|
389
461
|
"moves": [],
|
|
390
462
|
"requiresRefs": [
|
|
391
463
|
{
|
|
@@ -417,7 +489,16 @@
|
|
|
417
489
|
"summary": "Confirm an order"
|
|
418
490
|
},
|
|
419
491
|
"create": {
|
|
492
|
+
"agentDescription": "Record the proposed agreement between one buyer and seller against a listing and its escrow order. The escrow must be created or funded, must protect the same listing, and supplies the parties, amount, and currency. No money moves. Set confirmBy if an unconfirmed order should expire on its own.",
|
|
420
493
|
"description": "Records the proposed buyer and seller agreement against one listing and one escrow order. The escrow must still hold or await the money, must protect the same listing, and supplies the parties and the amount. No money moves.",
|
|
494
|
+
"effects": {
|
|
495
|
+
"reads": [
|
|
496
|
+
{
|
|
497
|
+
"signature": "reads.requires_refs",
|
|
498
|
+
"source": "requiresRefs"
|
|
499
|
+
}
|
|
500
|
+
]
|
|
501
|
+
},
|
|
421
502
|
"examples": [
|
|
422
503
|
{
|
|
423
504
|
"input": {
|
|
@@ -425,7 +506,9 @@
|
|
|
425
506
|
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
426
507
|
"listingId": "lst_sandbox_landcruiser1",
|
|
427
508
|
"memo": "Purchase subject to funded escrow.",
|
|
428
|
-
"
|
|
509
|
+
"productId": "prd_sandbox_marketplace01",
|
|
510
|
+
"subject": "sbj_sandbox_landcruiser1",
|
|
511
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
429
512
|
},
|
|
430
513
|
"name": "create_vehicle_purchase_order"
|
|
431
514
|
}
|
|
@@ -457,13 +540,48 @@
|
|
|
457
540
|
"due": {
|
|
458
541
|
"field": "confirmBy"
|
|
459
542
|
},
|
|
543
|
+
"effects": {
|
|
544
|
+
"schedules": [
|
|
545
|
+
{
|
|
546
|
+
"signature": "schedules.due",
|
|
547
|
+
"source": "due"
|
|
548
|
+
}
|
|
549
|
+
]
|
|
550
|
+
},
|
|
551
|
+
"examples": [
|
|
552
|
+
{
|
|
553
|
+
"input": {
|
|
554
|
+
"orderId": "ord_sandbox_landcruiser01",
|
|
555
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
556
|
+
},
|
|
557
|
+
"name": "expire_unconfirmed_purchase"
|
|
558
|
+
}
|
|
559
|
+
],
|
|
460
560
|
"moves": [],
|
|
461
561
|
"steps": [],
|
|
462
562
|
"summary": "Expire an order"
|
|
463
563
|
},
|
|
464
564
|
"fulfill": {
|
|
565
|
+
"agentDescription": "Close the agreement as delivered. The order must be confirmed and its escrow order must already be released to the seller, so call this after the money landed. No money moves here.",
|
|
465
566
|
"description": "Closes the agreement after escrow has released the full purchase amount to the seller.",
|
|
567
|
+
"effects": {
|
|
568
|
+
"reads": [
|
|
569
|
+
{
|
|
570
|
+
"signature": "reads.requires_refs",
|
|
571
|
+
"source": "requiresRefs"
|
|
572
|
+
}
|
|
573
|
+
]
|
|
574
|
+
},
|
|
466
575
|
"eventName": "order.fulfilled",
|
|
576
|
+
"examples": [
|
|
577
|
+
{
|
|
578
|
+
"input": {
|
|
579
|
+
"orderId": "ord_sandbox_landcruiser01",
|
|
580
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
581
|
+
},
|
|
582
|
+
"name": "fulfill_released_purchase"
|
|
583
|
+
}
|
|
584
|
+
],
|
|
467
585
|
"moves": [],
|
|
468
586
|
"requiresRefs": [
|
|
469
587
|
{
|
|
@@ -476,10 +594,23 @@
|
|
|
476
594
|
"steps": [],
|
|
477
595
|
"summary": "Fulfill an order"
|
|
478
596
|
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
597
|
+
},
|
|
598
|
+
"agentDescription": "Reach for order when the caller records and drives the buy-side agreement for one listing, naming the buyer, the amount, and the escrow order behind it. An order never moves money. The listing carries the offer and the escrow order holds and releases the purchase money.",
|
|
599
|
+
"callerParkedStates": {
|
|
600
|
+
"confirmed": "fulfillment or cancellation is the merchant's operational act",
|
|
601
|
+
"created": "expire fires only when confirmBy is set; without a confirmation deadline the order waits on the merchant"
|
|
602
|
+
},
|
|
603
|
+
"description": "An order records the buyer and seller agreement for one listing. Confirmation requires the listing to remain active and its escrow to hold the purchase money; fulfillment requires that escrow to release, while cancellation is allowed only before funding or after escrow safely retreats.",
|
|
604
|
+
"dials": [
|
|
605
|
+
{
|
|
606
|
+
"field": "confirmBy",
|
|
607
|
+
"key": "confirmation_window",
|
|
608
|
+
"kind": "window",
|
|
609
|
+
"maxOffset": "P30D",
|
|
610
|
+
"summary": "Grace beyond the confirmBy timestamp before an unconfirmed order expires.",
|
|
611
|
+
"title": "Confirmation window"
|
|
612
|
+
}
|
|
613
|
+
],
|
|
483
614
|
"fields": {
|
|
484
615
|
"amount": {
|
|
485
616
|
"description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
|
|
@@ -497,6 +628,10 @@
|
|
|
497
628
|
]
|
|
498
629
|
}
|
|
499
630
|
},
|
|
631
|
+
"confirmBy": {
|
|
632
|
+
"format": "hyperscale-date-time",
|
|
633
|
+
"type": "string"
|
|
634
|
+
},
|
|
500
635
|
"currency": {
|
|
501
636
|
"description": "ISO 4217 currency code",
|
|
502
637
|
"maxLength": 3,
|
|
@@ -504,12 +639,13 @@
|
|
|
504
639
|
"pattern": "^[A-Z]{3}$",
|
|
505
640
|
"type": "string"
|
|
506
641
|
},
|
|
507
|
-
"
|
|
508
|
-
"
|
|
642
|
+
"escrowOrderId": {
|
|
643
|
+
"description": "Escrow order holding this order's purchase money",
|
|
644
|
+
"pattern": "^eord_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
509
645
|
"type": "string"
|
|
510
646
|
},
|
|
511
647
|
"listingId": {
|
|
512
|
-
"description": "Listing whose subject
|
|
648
|
+
"description": "Listing whose subject the buyer agreed to purchase",
|
|
513
649
|
"pattern": "^lst_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
514
650
|
"type": "string"
|
|
515
651
|
},
|
|
@@ -530,39 +666,30 @@
|
|
|
530
666
|
}
|
|
531
667
|
}
|
|
532
668
|
},
|
|
533
|
-
"id": "
|
|
534
|
-
"idPrefix": "
|
|
669
|
+
"id": "order",
|
|
670
|
+
"idPrefix": "ord",
|
|
535
671
|
"lifecycle": {
|
|
536
672
|
"initial": "created",
|
|
537
673
|
"states": [
|
|
538
674
|
"created",
|
|
539
|
-
"
|
|
540
|
-
"
|
|
541
|
-
"refund_quoted",
|
|
542
|
-
"released",
|
|
543
|
-
"refunded",
|
|
544
|
-
"penalty_collected",
|
|
675
|
+
"confirmed",
|
|
676
|
+
"fulfilled",
|
|
545
677
|
"canceled",
|
|
546
678
|
"expired"
|
|
547
679
|
],
|
|
548
680
|
"transitions": {
|
|
549
681
|
"cancel": {
|
|
550
682
|
"from": [
|
|
551
|
-
"created"
|
|
683
|
+
"created",
|
|
684
|
+
"confirmed"
|
|
552
685
|
],
|
|
553
686
|
"to": "canceled"
|
|
554
687
|
},
|
|
555
|
-
"
|
|
556
|
-
"from": [
|
|
557
|
-
"refunded"
|
|
558
|
-
],
|
|
559
|
-
"to": "penalty_collected"
|
|
560
|
-
},
|
|
561
|
-
"dispute": {
|
|
688
|
+
"confirm": {
|
|
562
689
|
"from": [
|
|
563
|
-
"
|
|
690
|
+
"created"
|
|
564
691
|
],
|
|
565
|
-
"to": "
|
|
692
|
+
"to": "confirmed"
|
|
566
693
|
},
|
|
567
694
|
"expire": {
|
|
568
695
|
"from": [
|
|
@@ -570,38 +697,18 @@
|
|
|
570
697
|
],
|
|
571
698
|
"to": "expired"
|
|
572
699
|
},
|
|
573
|
-
"
|
|
574
|
-
"from": [
|
|
575
|
-
"created"
|
|
576
|
-
],
|
|
577
|
-
"to": "funded"
|
|
578
|
-
},
|
|
579
|
-
"quote": {
|
|
580
|
-
"from": [
|
|
581
|
-
"disputed"
|
|
582
|
-
],
|
|
583
|
-
"to": "refund_quoted"
|
|
584
|
-
},
|
|
585
|
-
"refund": {
|
|
586
|
-
"from": [
|
|
587
|
-
"refund_quoted"
|
|
588
|
-
],
|
|
589
|
-
"to": "refunded"
|
|
590
|
-
},
|
|
591
|
-
"release": {
|
|
592
|
-
"from": [
|
|
593
|
-
"funded"
|
|
594
|
-
],
|
|
595
|
-
"to": "released"
|
|
596
|
-
},
|
|
597
|
-
"resume": {
|
|
700
|
+
"fulfill": {
|
|
598
701
|
"from": [
|
|
599
|
-
"
|
|
702
|
+
"confirmed"
|
|
600
703
|
],
|
|
601
|
-
"to": "
|
|
704
|
+
"to": "fulfilled"
|
|
602
705
|
}
|
|
603
706
|
}
|
|
604
707
|
},
|
|
708
|
+
"nav": [
|
|
709
|
+
"Blueprints",
|
|
710
|
+
"Orders"
|
|
711
|
+
],
|
|
605
712
|
"parties": {
|
|
606
713
|
"beneficiary": "sellerAccountId",
|
|
607
714
|
"payer": "buyerAccountId"
|
|
@@ -610,6 +717,7 @@
|
|
|
610
717
|
"buyerAccountId",
|
|
611
718
|
"sellerAccountId",
|
|
612
719
|
"listingId",
|
|
720
|
+
"escrowOrderId",
|
|
613
721
|
"amount",
|
|
614
722
|
"currency"
|
|
615
723
|
],
|
|
@@ -619,31 +727,56 @@
|
|
|
619
727
|
"merchandise"
|
|
620
728
|
]
|
|
621
729
|
},
|
|
622
|
-
"summary": "
|
|
623
|
-
"
|
|
624
|
-
"
|
|
625
|
-
|
|
626
|
-
"
|
|
730
|
+
"summary": "Agreement to buy one listed subject at an accepted amount.",
|
|
731
|
+
"templateId": "marketplace",
|
|
732
|
+
"title": "Order",
|
|
733
|
+
"update": {
|
|
734
|
+
"examples": [
|
|
627
735
|
{
|
|
628
|
-
"
|
|
736
|
+
"input": {
|
|
737
|
+
"confirmBy": "2026-08-01T20:00:00.000Z",
|
|
738
|
+
"memo": "Buyer confirms after inspection.",
|
|
739
|
+
"orderId": "ord_sandbox_landcruiser01",
|
|
740
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
741
|
+
},
|
|
742
|
+
"name": "annotate_unconfirmed_order"
|
|
629
743
|
}
|
|
630
744
|
],
|
|
631
|
-
"quote": "quote",
|
|
632
|
-
"refundDestinationField": "buyerAccountId",
|
|
633
|
-
"refundableField": "amount"
|
|
634
|
-
},
|
|
635
|
-
"update": {
|
|
636
745
|
"fields": [
|
|
637
|
-
"
|
|
746
|
+
"confirmBy",
|
|
638
747
|
"memo"
|
|
639
748
|
],
|
|
640
749
|
"states": [
|
|
641
750
|
"created"
|
|
642
751
|
]
|
|
643
|
-
}
|
|
644
|
-
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"actionOrder": [
|
|
756
|
+
"create",
|
|
757
|
+
"fund",
|
|
758
|
+
"dispute",
|
|
759
|
+
"resume",
|
|
760
|
+
"release",
|
|
761
|
+
"quote",
|
|
762
|
+
"refund",
|
|
763
|
+
"collect_penalty",
|
|
764
|
+
"cancel",
|
|
765
|
+
"expire"
|
|
766
|
+
],
|
|
767
|
+
"actions": {
|
|
645
768
|
"cancel": {
|
|
769
|
+
"agentDescription": "Close an escrow nobody funded. No money has moved and the escrow account must be empty, so this is a lifecycle transition only. A funded escrow refuses. Quote and refund the buyer instead.",
|
|
646
770
|
"description": "Closes an unfunded escrow. Because no money moved, no unwind quote is required.",
|
|
771
|
+
"examples": [
|
|
772
|
+
{
|
|
773
|
+
"input": {
|
|
774
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
775
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
776
|
+
},
|
|
777
|
+
"name": "cancel_unfunded_escrow"
|
|
778
|
+
}
|
|
779
|
+
],
|
|
647
780
|
"moves": [],
|
|
648
781
|
"requiresDrainedAccount": {
|
|
649
782
|
"path": "refs.escrowAccountId"
|
|
@@ -652,8 +785,26 @@
|
|
|
652
785
|
"summary": "Cancel an escrow order"
|
|
653
786
|
},
|
|
654
787
|
"collect_penalty": {
|
|
788
|
+
"agentDescription": "Pay the penalty the refund retained out of escrow to the seller. This moves money. Run it only after refund, and only when refund reported a positive unwind penalty. Under the default zero-penalty schedule there is nothing to collect.",
|
|
655
789
|
"description": "Pays the computed retained penalty to the seller after a penalized refund. Invoke only when refund returns a positive refs.unwindPenalty.",
|
|
790
|
+
"effects": {
|
|
791
|
+
"moves": [
|
|
792
|
+
{
|
|
793
|
+
"signature": "moves.transfer.internal",
|
|
794
|
+
"source": "moves[0]"
|
|
795
|
+
}
|
|
796
|
+
]
|
|
797
|
+
},
|
|
656
798
|
"eventName": "escrow_order.penalty_collected",
|
|
799
|
+
"examples": [
|
|
800
|
+
{
|
|
801
|
+
"input": {
|
|
802
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
803
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
804
|
+
},
|
|
805
|
+
"name": "collect_disputed_refund_penalty"
|
|
806
|
+
}
|
|
807
|
+
],
|
|
657
808
|
"moves": [
|
|
658
809
|
{
|
|
659
810
|
"bind": {
|
|
@@ -669,13 +820,13 @@
|
|
|
669
820
|
"from": "instance",
|
|
670
821
|
"path": "fields.sellerAccountId"
|
|
671
822
|
},
|
|
672
|
-
"
|
|
823
|
+
"productId": {
|
|
673
824
|
"from": "instance",
|
|
674
|
-
"path": "
|
|
825
|
+
"path": "productId"
|
|
675
826
|
},
|
|
676
|
-
"
|
|
827
|
+
"sourceAccountId": {
|
|
677
828
|
"from": "instance",
|
|
678
|
-
"path": "
|
|
829
|
+
"path": "refs.escrowAccountId"
|
|
679
830
|
}
|
|
680
831
|
},
|
|
681
832
|
"capture": {
|
|
@@ -689,7 +840,16 @@
|
|
|
689
840
|
"summary": "Collect an escrow refund penalty"
|
|
690
841
|
},
|
|
691
842
|
"create": {
|
|
692
|
-
"
|
|
843
|
+
"agentDescription": "Open escrow against an active listing and provision its dedicated escrow account. No money moves yet. The listing must be active, and its asking price, currency, and seller account are copied onto the escrow, so passing an amount is neither needed nor allowed.",
|
|
844
|
+
"description": "Opens escrow against an active listing and provisions its dedicated product escrow account. The held amount is always the listing's askingPrice and is not caller supplied. For a security deposit use the standard library module security_deposit, and for a rental or booking fee use cancellable_booking. Both live under open/hsx/std/settlements.",
|
|
845
|
+
"effects": {
|
|
846
|
+
"reads": [
|
|
847
|
+
{
|
|
848
|
+
"signature": "reads.requires_refs",
|
|
849
|
+
"source": "requiresRefs"
|
|
850
|
+
}
|
|
851
|
+
]
|
|
852
|
+
},
|
|
693
853
|
"examples": [
|
|
694
854
|
{
|
|
695
855
|
"input": {
|
|
@@ -697,7 +857,9 @@
|
|
|
697
857
|
"fundBy": "2026-08-01T21:00:00.000Z",
|
|
698
858
|
"listingId": "lst_sandbox_landcruiser1",
|
|
699
859
|
"memo": "Release after the vehicle is handed over.",
|
|
700
|
-
"
|
|
860
|
+
"productId": "prd_sandbox_marketplace01",
|
|
861
|
+
"subject": "sbj_sandbox_landcruiser1",
|
|
862
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
701
863
|
},
|
|
702
864
|
"name": "open_vehicle_escrow"
|
|
703
865
|
}
|
|
@@ -725,19 +887,19 @@
|
|
|
725
887
|
},
|
|
726
888
|
"owner.id": {
|
|
727
889
|
"from": "instance",
|
|
728
|
-
"path": "
|
|
890
|
+
"path": "productId"
|
|
729
891
|
},
|
|
730
892
|
"owner.type": {
|
|
731
893
|
"from": "const",
|
|
732
|
-
"value": "
|
|
894
|
+
"value": "product"
|
|
895
|
+
},
|
|
896
|
+
"productId": {
|
|
897
|
+
"from": "instance",
|
|
898
|
+
"path": "productId"
|
|
733
899
|
},
|
|
734
900
|
"role": {
|
|
735
901
|
"from": "const",
|
|
736
|
-
"value": "
|
|
737
|
-
},
|
|
738
|
-
"workspaceId": {
|
|
739
|
-
"from": "instance",
|
|
740
|
-
"path": "workspaceId"
|
|
902
|
+
"value": "product_escrow"
|
|
741
903
|
}
|
|
742
904
|
},
|
|
743
905
|
"capture": {
|
|
@@ -749,7 +911,17 @@
|
|
|
749
911
|
"summary": "Create an escrow order"
|
|
750
912
|
},
|
|
751
913
|
"dispute": {
|
|
914
|
+
"agentDescription": "Freeze a funded escrow so neither release nor refund can run until the parties settle the disagreement. No money moves and the whole balance stays put. Only a funded escrow disputes.",
|
|
752
915
|
"description": "Freezes the fully funded escrow before either milestone releases, preserving the entire balance while the parties decide what happens next.",
|
|
916
|
+
"examples": [
|
|
917
|
+
{
|
|
918
|
+
"input": {
|
|
919
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
920
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
921
|
+
},
|
|
922
|
+
"name": "hold_funds_for_dispute"
|
|
923
|
+
}
|
|
924
|
+
],
|
|
753
925
|
"moves": [],
|
|
754
926
|
"steps": [],
|
|
755
927
|
"summary": "Dispute an escrow order"
|
|
@@ -759,6 +931,23 @@
|
|
|
759
931
|
"due": {
|
|
760
932
|
"field": "fundBy"
|
|
761
933
|
},
|
|
934
|
+
"effects": {
|
|
935
|
+
"schedules": [
|
|
936
|
+
{
|
|
937
|
+
"signature": "schedules.due",
|
|
938
|
+
"source": "due"
|
|
939
|
+
}
|
|
940
|
+
]
|
|
941
|
+
},
|
|
942
|
+
"examples": [
|
|
943
|
+
{
|
|
944
|
+
"input": {
|
|
945
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
946
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
947
|
+
},
|
|
948
|
+
"name": "expire_unfunded_escrow"
|
|
949
|
+
}
|
|
950
|
+
],
|
|
762
951
|
"moves": [],
|
|
763
952
|
"requiresDrainedAccount": {
|
|
764
953
|
"path": "refs.escrowAccountId"
|
|
@@ -767,7 +956,31 @@
|
|
|
767
956
|
"summary": "Expire an escrow order"
|
|
768
957
|
},
|
|
769
958
|
"fund": {
|
|
959
|
+
"agentDescription": "Move the full purchase amount from the buyer's account into the escrow account. This moves money and the buyer cannot spend it again until the escrow resolves. Only a created escrow funds, and the listing must still be active.",
|
|
770
960
|
"description": "Moves the full purchase amount from the buyer account into the dedicated escrow account while the listing remains active.",
|
|
961
|
+
"effects": {
|
|
962
|
+
"moves": [
|
|
963
|
+
{
|
|
964
|
+
"signature": "moves.collection.pay_in",
|
|
965
|
+
"source": "moves[0]"
|
|
966
|
+
}
|
|
967
|
+
],
|
|
968
|
+
"reads": [
|
|
969
|
+
{
|
|
970
|
+
"signature": "reads.requires_refs",
|
|
971
|
+
"source": "requiresRefs"
|
|
972
|
+
}
|
|
973
|
+
]
|
|
974
|
+
},
|
|
975
|
+
"examples": [
|
|
976
|
+
{
|
|
977
|
+
"input": {
|
|
978
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
979
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
980
|
+
},
|
|
981
|
+
"name": "fund_purchase_escrow"
|
|
982
|
+
}
|
|
983
|
+
],
|
|
771
984
|
"moves": [
|
|
772
985
|
{
|
|
773
986
|
"bind": {
|
|
@@ -783,13 +996,13 @@
|
|
|
783
996
|
"from": "instance",
|
|
784
997
|
"path": "refs.escrowAccountId"
|
|
785
998
|
},
|
|
786
|
-
"
|
|
999
|
+
"productId": {
|
|
787
1000
|
"from": "instance",
|
|
788
|
-
"path": "
|
|
1001
|
+
"path": "productId"
|
|
789
1002
|
},
|
|
790
|
-
"
|
|
1003
|
+
"sourceAccountId": {
|
|
791
1004
|
"from": "instance",
|
|
792
|
-
"path": "
|
|
1005
|
+
"path": "fields.buyerAccountId"
|
|
793
1006
|
}
|
|
794
1007
|
},
|
|
795
1008
|
"capture": {
|
|
@@ -807,17 +1020,79 @@
|
|
|
807
1020
|
]
|
|
808
1021
|
}
|
|
809
1022
|
],
|
|
1023
|
+
"sandboxFailurePoint": "funding",
|
|
810
1024
|
"steps": [],
|
|
811
1025
|
"summary": "Fund an escrow order"
|
|
812
1026
|
},
|
|
813
1027
|
"quote": {
|
|
1028
|
+
"agentDescription": "Price the buyer's refund under the penalty schedule and park the escrow for an explicit confirmation. No money moves at quote time. Only a disputed escrow quotes, and the money only leaves when refund runs.",
|
|
814
1029
|
"description": "Calculates the full buyer refund while disputed and parks the escrow for explicit confirmation. No money moves at quote time.",
|
|
1030
|
+
"effects": {
|
|
1031
|
+
"holds": [
|
|
1032
|
+
{
|
|
1033
|
+
"signature": "holds.quote",
|
|
1034
|
+
"source": "quote"
|
|
1035
|
+
}
|
|
1036
|
+
],
|
|
1037
|
+
"schedules": [
|
|
1038
|
+
{
|
|
1039
|
+
"signature": "schedules.expiry",
|
|
1040
|
+
"source": "quote"
|
|
1041
|
+
}
|
|
1042
|
+
]
|
|
1043
|
+
},
|
|
1044
|
+
"examples": [
|
|
1045
|
+
{
|
|
1046
|
+
"input": {
|
|
1047
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
1048
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
1049
|
+
},
|
|
1050
|
+
"name": "quote_disputed_refund"
|
|
1051
|
+
}
|
|
1052
|
+
],
|
|
815
1053
|
"moves": [],
|
|
1054
|
+
"quote": {
|
|
1055
|
+
"baseField": "amount",
|
|
1056
|
+
"chargeRef": "unwindPenalty",
|
|
1057
|
+
"charges": [
|
|
1058
|
+
{
|
|
1059
|
+
"bps": 0
|
|
1060
|
+
}
|
|
1061
|
+
],
|
|
1062
|
+
"expires": {
|
|
1063
|
+
"offset": "PT15M"
|
|
1064
|
+
},
|
|
1065
|
+
"fixes": [
|
|
1066
|
+
"amount",
|
|
1067
|
+
"buyerAccountId"
|
|
1068
|
+
],
|
|
1069
|
+
"netDestinationField": "buyerAccountId",
|
|
1070
|
+
"netRef": "unwindRefund"
|
|
1071
|
+
},
|
|
816
1072
|
"steps": [],
|
|
817
1073
|
"summary": "Quote an escrow refund"
|
|
818
1074
|
},
|
|
819
1075
|
"refund": {
|
|
1076
|
+
"agentDescription": "Confirm the quoted retreat and send the refunded amount from escrow back to the buyer. This moves money and does not reverse. Only an escrow already parked by quote refunds. Any retained penalty stays in escrow for collect_penalty.",
|
|
1077
|
+
"commit": "quote",
|
|
820
1078
|
"description": "Confirms the quoted retreat and returns the full held amount from escrow to the buyer.",
|
|
1079
|
+
"effects": {
|
|
1080
|
+
"moves": [
|
|
1081
|
+
{
|
|
1082
|
+
"signature": "moves.transfer.internal",
|
|
1083
|
+
"source": "moves[0]"
|
|
1084
|
+
}
|
|
1085
|
+
]
|
|
1086
|
+
},
|
|
1087
|
+
"examples": [
|
|
1088
|
+
{
|
|
1089
|
+
"input": {
|
|
1090
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
1091
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
1092
|
+
},
|
|
1093
|
+
"name": "confirm_disputed_refund"
|
|
1094
|
+
}
|
|
1095
|
+
],
|
|
821
1096
|
"moves": [
|
|
822
1097
|
{
|
|
823
1098
|
"bind": {
|
|
@@ -833,13 +1108,13 @@
|
|
|
833
1108
|
"from": "instance",
|
|
834
1109
|
"path": "fields.buyerAccountId"
|
|
835
1110
|
},
|
|
836
|
-
"
|
|
1111
|
+
"productId": {
|
|
837
1112
|
"from": "instance",
|
|
838
|
-
"path": "
|
|
1113
|
+
"path": "productId"
|
|
839
1114
|
},
|
|
840
|
-
"
|
|
1115
|
+
"sourceAccountId": {
|
|
841
1116
|
"from": "instance",
|
|
842
|
-
"path": "
|
|
1117
|
+
"path": "refs.escrowAccountId"
|
|
843
1118
|
}
|
|
844
1119
|
},
|
|
845
1120
|
"capture": {
|
|
@@ -853,8 +1128,32 @@
|
|
|
853
1128
|
"summary": "Refund an escrow order"
|
|
854
1129
|
},
|
|
855
1130
|
"release": {
|
|
1131
|
+
"agentDescription": "Pay the seller the full escrow balance and close the order. This moves money and does not reverse. Only a funded escrow releases, and the listing must be reserved and name this escrow back, so an escrow that lost its listing can never pay out.",
|
|
856
1132
|
"description": "Pays the seller the full escrow amount once and closes escrow with no balance remaining. Only the escrow that reserved the listing can release: the listing must name this escrow back.",
|
|
857
1133
|
"earnable": true,
|
|
1134
|
+
"effects": {
|
|
1135
|
+
"moves": [
|
|
1136
|
+
{
|
|
1137
|
+
"signature": "moves.transfer.internal",
|
|
1138
|
+
"source": "moves[0]"
|
|
1139
|
+
}
|
|
1140
|
+
],
|
|
1141
|
+
"reads": [
|
|
1142
|
+
{
|
|
1143
|
+
"signature": "reads.requires_refs",
|
|
1144
|
+
"source": "requiresRefs"
|
|
1145
|
+
}
|
|
1146
|
+
]
|
|
1147
|
+
},
|
|
1148
|
+
"examples": [
|
|
1149
|
+
{
|
|
1150
|
+
"input": {
|
|
1151
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
1152
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
1153
|
+
},
|
|
1154
|
+
"name": "release_escrow"
|
|
1155
|
+
}
|
|
1156
|
+
],
|
|
858
1157
|
"moves": [
|
|
859
1158
|
{
|
|
860
1159
|
"bind": {
|
|
@@ -870,13 +1169,13 @@
|
|
|
870
1169
|
"from": "instance",
|
|
871
1170
|
"path": "fields.sellerAccountId"
|
|
872
1171
|
},
|
|
873
|
-
"
|
|
1172
|
+
"productId": {
|
|
874
1173
|
"from": "instance",
|
|
875
|
-
"path": "
|
|
1174
|
+
"path": "productId"
|
|
876
1175
|
},
|
|
877
|
-
"
|
|
1176
|
+
"sourceAccountId": {
|
|
878
1177
|
"from": "instance",
|
|
879
|
-
"path": "
|
|
1178
|
+
"path": "refs.escrowAccountId"
|
|
880
1179
|
}
|
|
881
1180
|
},
|
|
882
1181
|
"capture": {
|
|
@@ -890,22 +1189,224 @@
|
|
|
890
1189
|
{
|
|
891
1190
|
"field": "listingId",
|
|
892
1191
|
"match": {
|
|
893
|
-
"
|
|
1192
|
+
"instrumentInstanceId": "fields.escrowOrderId"
|
|
894
1193
|
},
|
|
895
1194
|
"statuses": [
|
|
896
1195
|
"reserved"
|
|
897
1196
|
]
|
|
898
1197
|
}
|
|
899
1198
|
],
|
|
1199
|
+
"sandboxFailurePoint": "release",
|
|
900
1200
|
"steps": [],
|
|
901
1201
|
"summary": "Release an escrow order"
|
|
902
1202
|
},
|
|
903
1203
|
"resume": {
|
|
1204
|
+
"agentDescription": "Lift the dispute hold and put the escrow back where it was, funded and ready to release. No money moves and the balance was never touched. Only a disputed escrow resumes. Use this when the parties settled without a refund.",
|
|
904
1205
|
"description": "Ends the dispute hold without moving money and returns the fully funded escrow to its first milestone.",
|
|
1206
|
+
"examples": [
|
|
1207
|
+
{
|
|
1208
|
+
"input": {
|
|
1209
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
1210
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
1211
|
+
},
|
|
1212
|
+
"name": "resume_after_resolution"
|
|
1213
|
+
}
|
|
1214
|
+
],
|
|
905
1215
|
"moves": [],
|
|
906
1216
|
"steps": [],
|
|
907
1217
|
"summary": "Resume an escrow order"
|
|
908
1218
|
}
|
|
1219
|
+
},
|
|
1220
|
+
"agentDescription": "Reach for escrow_order when a buyer's money must sit against an active listing until the seller earns it. The amount, currency, and seller come from the locked listing, never from the caller, so you open one by naming a listing. Release pays the seller once and closes. A dispute freezes the balance until the parties resume or confirm a quoted refund.",
|
|
1221
|
+
"callerParkedStates": {
|
|
1222
|
+
"created": "expire fires only when fundBy is set; without a funding deadline the escrow waits on the buyer to fund or cancel",
|
|
1223
|
+
"disputed": "dispute resolution is a human judgment; the parties resume the escrow or quote a refund",
|
|
1224
|
+
"funded": "releasing or disputing held value is a party decision; escrow deliberately holds until the parties act",
|
|
1225
|
+
"refund_quoted": "a quoted refund moves money only when the caller confirms it",
|
|
1226
|
+
"refunded": "the residual penalty is collected by the operator as a deliberate follow-up transfer"
|
|
1227
|
+
},
|
|
1228
|
+
"description": "An escrow order holds the full purchase amount and releases it to the seller exactly once. Before release, a dispute freezes the full balance until work resumes or a quoted refund is confirmed.",
|
|
1229
|
+
"dials": [
|
|
1230
|
+
{
|
|
1231
|
+
"field": "fundBy",
|
|
1232
|
+
"key": "funding_window",
|
|
1233
|
+
"kind": "window",
|
|
1234
|
+
"maxOffset": "P30D",
|
|
1235
|
+
"summary": "Grace beyond the fundBy timestamp before an unfunded escrow expires.",
|
|
1236
|
+
"title": "Funding window"
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
"key": "refund_penalty",
|
|
1240
|
+
"kind": "unwind_penalty",
|
|
1241
|
+
"summary": "Replaces the zero-penalty schedule refunds are quoted against, e.g. a restocking fee tier.",
|
|
1242
|
+
"title": "Refund penalty schedule"
|
|
1243
|
+
}
|
|
1244
|
+
],
|
|
1245
|
+
"fields": {
|
|
1246
|
+
"amount": {
|
|
1247
|
+
"description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
|
|
1248
|
+
"pattern": "^[1-9][0-9]{0,17}$",
|
|
1249
|
+
"type": "string"
|
|
1250
|
+
},
|
|
1251
|
+
"buyerAccountId": {
|
|
1252
|
+
"description": "Hyperscale account ID",
|
|
1253
|
+
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
1254
|
+
"type": "string",
|
|
1255
|
+
"x-hyperscale-reference-filter": {
|
|
1256
|
+
"column": "role",
|
|
1257
|
+
"values": [
|
|
1258
|
+
"customer_balance"
|
|
1259
|
+
]
|
|
1260
|
+
}
|
|
1261
|
+
},
|
|
1262
|
+
"currency": {
|
|
1263
|
+
"description": "ISO 4217 currency code",
|
|
1264
|
+
"maxLength": 3,
|
|
1265
|
+
"minLength": 3,
|
|
1266
|
+
"pattern": "^[A-Z]{3}$",
|
|
1267
|
+
"type": "string"
|
|
1268
|
+
},
|
|
1269
|
+
"fundBy": {
|
|
1270
|
+
"format": "hyperscale-date-time",
|
|
1271
|
+
"type": "string"
|
|
1272
|
+
},
|
|
1273
|
+
"listingId": {
|
|
1274
|
+
"description": "Listing whose subject and availability this escrow protects",
|
|
1275
|
+
"pattern": "^lst_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
1276
|
+
"type": "string"
|
|
1277
|
+
},
|
|
1278
|
+
"memo": {
|
|
1279
|
+
"maxLength": 180,
|
|
1280
|
+
"minLength": 1,
|
|
1281
|
+
"type": "string"
|
|
1282
|
+
},
|
|
1283
|
+
"sellerAccountId": {
|
|
1284
|
+
"description": "Hyperscale account ID",
|
|
1285
|
+
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
1286
|
+
"type": "string",
|
|
1287
|
+
"x-hyperscale-reference-filter": {
|
|
1288
|
+
"column": "role",
|
|
1289
|
+
"values": [
|
|
1290
|
+
"customer_balance"
|
|
1291
|
+
]
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
"id": "escrow_order",
|
|
1296
|
+
"idPrefix": "eord",
|
|
1297
|
+
"lifecycle": {
|
|
1298
|
+
"initial": "created",
|
|
1299
|
+
"states": [
|
|
1300
|
+
"created",
|
|
1301
|
+
"funded",
|
|
1302
|
+
"disputed",
|
|
1303
|
+
"refund_quoted",
|
|
1304
|
+
"released",
|
|
1305
|
+
"refunded",
|
|
1306
|
+
"penalty_collected",
|
|
1307
|
+
"canceled",
|
|
1308
|
+
"expired"
|
|
1309
|
+
],
|
|
1310
|
+
"transitions": {
|
|
1311
|
+
"cancel": {
|
|
1312
|
+
"from": [
|
|
1313
|
+
"created"
|
|
1314
|
+
],
|
|
1315
|
+
"to": "canceled"
|
|
1316
|
+
},
|
|
1317
|
+
"collect_penalty": {
|
|
1318
|
+
"from": [
|
|
1319
|
+
"refunded"
|
|
1320
|
+
],
|
|
1321
|
+
"to": "penalty_collected"
|
|
1322
|
+
},
|
|
1323
|
+
"dispute": {
|
|
1324
|
+
"from": [
|
|
1325
|
+
"funded"
|
|
1326
|
+
],
|
|
1327
|
+
"to": "disputed"
|
|
1328
|
+
},
|
|
1329
|
+
"expire": {
|
|
1330
|
+
"from": [
|
|
1331
|
+
"created"
|
|
1332
|
+
],
|
|
1333
|
+
"to": "expired"
|
|
1334
|
+
},
|
|
1335
|
+
"fund": {
|
|
1336
|
+
"from": [
|
|
1337
|
+
"created"
|
|
1338
|
+
],
|
|
1339
|
+
"to": "funded"
|
|
1340
|
+
},
|
|
1341
|
+
"quote": {
|
|
1342
|
+
"from": [
|
|
1343
|
+
"disputed"
|
|
1344
|
+
],
|
|
1345
|
+
"to": "refund_quoted"
|
|
1346
|
+
},
|
|
1347
|
+
"refund": {
|
|
1348
|
+
"from": [
|
|
1349
|
+
"refund_quoted"
|
|
1350
|
+
],
|
|
1351
|
+
"to": "refunded"
|
|
1352
|
+
},
|
|
1353
|
+
"release": {
|
|
1354
|
+
"from": [
|
|
1355
|
+
"funded"
|
|
1356
|
+
],
|
|
1357
|
+
"to": "released"
|
|
1358
|
+
},
|
|
1359
|
+
"resume": {
|
|
1360
|
+
"from": [
|
|
1361
|
+
"disputed"
|
|
1362
|
+
],
|
|
1363
|
+
"to": "funded"
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
},
|
|
1367
|
+
"nav": [
|
|
1368
|
+
"Blueprints",
|
|
1369
|
+
"Escrow Orders"
|
|
1370
|
+
],
|
|
1371
|
+
"parties": {
|
|
1372
|
+
"beneficiary": "sellerAccountId",
|
|
1373
|
+
"payer": "buyerAccountId"
|
|
1374
|
+
},
|
|
1375
|
+
"required": [
|
|
1376
|
+
"buyerAccountId",
|
|
1377
|
+
"sellerAccountId",
|
|
1378
|
+
"listingId",
|
|
1379
|
+
"amount",
|
|
1380
|
+
"currency"
|
|
1381
|
+
],
|
|
1382
|
+
"subject": {
|
|
1383
|
+
"kinds": [
|
|
1384
|
+
"vehicle",
|
|
1385
|
+
"merchandise"
|
|
1386
|
+
]
|
|
1387
|
+
},
|
|
1388
|
+
"summary": "Purchase money held between buyer and seller.",
|
|
1389
|
+
"templateId": "escrow",
|
|
1390
|
+
"title": "Escrow order",
|
|
1391
|
+
"update": {
|
|
1392
|
+
"examples": [
|
|
1393
|
+
{
|
|
1394
|
+
"input": {
|
|
1395
|
+
"escrowOrderId": "eord_sandbox_buyerorder01",
|
|
1396
|
+
"fundBy": "2026-08-01T21:00:00.000Z",
|
|
1397
|
+
"memo": "Buyer funds after inspection booking.",
|
|
1398
|
+
"tenantId": "ten_sandbox_riyadhresale01"
|
|
1399
|
+
},
|
|
1400
|
+
"name": "annotate_unfunded_escrow"
|
|
1401
|
+
}
|
|
1402
|
+
],
|
|
1403
|
+
"fields": [
|
|
1404
|
+
"fundBy",
|
|
1405
|
+
"memo"
|
|
1406
|
+
],
|
|
1407
|
+
"states": [
|
|
1408
|
+
"created"
|
|
1409
|
+
]
|
|
909
1410
|
}
|
|
910
1411
|
}
|
|
911
1412
|
],
|