@hyperscale0/udl 1.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/AUTHORS +8 -0
  2. package/CHANGELOG.md +36 -0
  3. package/LICENSE +661 -0
  4. package/LICENSING.md +51 -0
  5. package/README.md +163 -0
  6. package/SECURITY.md +42 -0
  7. package/TRADEMARKS.md +35 -0
  8. package/conformance/README.md +79 -0
  9. package/conformance/invalid/blank-title.expected.json +10 -0
  10. package/conformance/invalid/blank-title.udl +50 -0
  11. package/conformance/invalid/depth-budget.expected.json +10 -0
  12. package/conformance/invalid/depth-budget.udl +49 -0
  13. package/conformance/invalid/format-version.expected.json +10 -0
  14. package/conformance/invalid/format-version.udl +50 -0
  15. package/conformance/invalid/invalid-utf8.expected.json +10 -0
  16. package/conformance/invalid/invalid-utf8.udl +1 -0
  17. package/conformance/invalid/malformed-json.expected.json +10 -0
  18. package/conformance/invalid/malformed-json.udl +1 -0
  19. package/conformance/invalid/missing-create-verb.expected.json +10 -0
  20. package/conformance/invalid/missing-create-verb.udl +45 -0
  21. package/conformance/invalid/not-an-object.expected.json +10 -0
  22. package/conformance/invalid/not-an-object.udl +1 -0
  23. package/conformance/invalid/noun-id-not-snake-case.expected.json +10 -0
  24. package/conformance/invalid/noun-id-not-snake-case.udl +50 -0
  25. package/conformance/invalid/unknown-key.expected.json +10 -0
  26. package/conformance/invalid/unknown-key.udl +51 -0
  27. package/conformance/invalid/unreachable-state.expected.json +10 -0
  28. package/conformance/invalid/unreachable-state.udl +51 -0
  29. package/conformance/invalid/verb-without-transition.expected.json +10 -0
  30. package/conformance/invalid/verb-without-transition.udl +55 -0
  31. package/conformance/valid/cards.expected.json +5 -0
  32. package/conformance/valid/cards.udl +1092 -0
  33. package/conformance/valid/commerce-escrow.expected.json +5 -0
  34. package/conformance/valid/commerce-escrow.udl +1011 -0
  35. package/conformance/valid/hand-edited.expected.json +5 -0
  36. package/conformance/valid/hand-edited.udl +1 -0
  37. package/conformance/valid/insured-car-marketplace.expected.json +5 -0
  38. package/conformance/valid/insured-car-marketplace.udl +831 -0
  39. package/conformance/valid/insured-travel.expected.json +5 -0
  40. package/conformance/valid/insured-travel.udl +2621 -0
  41. package/conformance/valid/minimal.expected.json +5 -0
  42. package/conformance/valid/minimal.udl +50 -0
  43. package/conformance/valid/protection.expected.json +5 -0
  44. package/conformance/valid/protection.udl +1136 -0
  45. package/dist/canonical.d.ts +2 -0
  46. package/dist/canonical.d.ts.map +1 -0
  47. package/dist/canonical.js +35 -0
  48. package/dist/canonical.js.map +1 -0
  49. package/dist/cli.d.ts +3 -0
  50. package/dist/cli.d.ts.map +1 -0
  51. package/dist/cli.js +138 -0
  52. package/dist/cli.js.map +1 -0
  53. package/dist/duration.d.ts +3 -0
  54. package/dist/duration.d.ts.map +1 -0
  55. package/dist/duration.js +23 -0
  56. package/dist/duration.js.map +1 -0
  57. package/dist/evolution.d.ts +63 -0
  58. package/dist/evolution.d.ts.map +1 -0
  59. package/dist/evolution.js +345 -0
  60. package/dist/evolution.js.map +1 -0
  61. package/dist/finance.d.ts +53 -0
  62. package/dist/finance.d.ts.map +1 -0
  63. package/dist/finance.js +511 -0
  64. package/dist/finance.js.map +1 -0
  65. package/dist/index.d.ts +11 -0
  66. package/dist/index.d.ts.map +1 -0
  67. package/dist/index.js +8 -0
  68. package/dist/index.js.map +1 -0
  69. package/dist/limits.d.ts +33 -0
  70. package/dist/limits.d.ts.map +1 -0
  71. package/dist/limits.js +33 -0
  72. package/dist/limits.js.map +1 -0
  73. package/dist/parser.d.ts +4 -0
  74. package/dist/parser.d.ts.map +1 -0
  75. package/dist/parser.js +54 -0
  76. package/dist/parser.js.map +1 -0
  77. package/dist/schema.d.ts +757 -0
  78. package/dist/schema.d.ts.map +1 -0
  79. package/dist/schema.js +281 -0
  80. package/dist/schema.js.map +1 -0
  81. package/dist/validation.d.ts +64 -0
  82. package/dist/validation.d.ts.map +1 -0
  83. package/dist/validation.js +1323 -0
  84. package/dist/validation.js.map +1 -0
  85. package/package.json +84 -0
  86. package/spec/README.md +137 -0
  87. package/spec/udl.schema.json +1019 -0
  88. package/src/canonical.ts +41 -0
  89. package/src/cli.ts +148 -0
  90. package/src/duration.ts +26 -0
  91. package/src/evolution.ts +587 -0
  92. package/src/finance.ts +775 -0
  93. package/src/index.ts +59 -0
  94. package/src/limits.ts +32 -0
  95. package/src/parser.ts +61 -0
  96. package/src/schema.ts +339 -0
  97. package/src/validation.ts +2053 -0
@@ -0,0 +1,1136 @@
1
+ {
2
+ "nouns": [
3
+ {
4
+ "aggregateInvariants": [
5
+ {
6
+ "childField": "claimAmount",
7
+ "childNounId": "claim",
8
+ "childRefField": "policyId",
9
+ "childStatuses": [
10
+ "filed",
11
+ "assessed",
12
+ "approved",
13
+ "paid"
14
+ ],
15
+ "parentField": "coverageLimit"
16
+ }
17
+ ],
18
+ "description": "A policy quotes protection over one subject, binds after a carrier decision, activates at its declared start, and expires at term. Premium remains refundable while bound but not active; activation pays the insurer and opens the policy to claims.",
19
+ "fields": {
20
+ "coverageLimit": {
21
+ "description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
22
+ "pattern": "^[1-9][0-9]{0,17}$",
23
+ "type": "string"
24
+ },
25
+ "currency": {
26
+ "description": "ISO 4217 currency code",
27
+ "maxLength": 3,
28
+ "minLength": 3,
29
+ "pattern": "^[A-Z]{3}$",
30
+ "type": "string"
31
+ },
32
+ "expiresAt": {
33
+ "format": "hyperscale-date-time",
34
+ "type": "string"
35
+ },
36
+ "insurerAccountId": {
37
+ "description": "Hyperscale account ID",
38
+ "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
39
+ "type": "string",
40
+ "x-hyperscale-reference-filter": {
41
+ "column": "role",
42
+ "values": [
43
+ "customer_balance"
44
+ ]
45
+ }
46
+ },
47
+ "perilSchedule": {
48
+ "items": {
49
+ "additionalProperties": false,
50
+ "properties": {
51
+ "deductibleBps": {
52
+ "maximum": 10000,
53
+ "minimum": 0,
54
+ "type": "integer"
55
+ },
56
+ "limitAmount": {
57
+ "description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
58
+ "pattern": "^[1-9][0-9]{0,17}$",
59
+ "type": "string"
60
+ },
61
+ "peril": {
62
+ "pattern": "^[a-z][a-z0-9_]{1,79}$",
63
+ "type": "string"
64
+ },
65
+ "waitingPeriodDays": {
66
+ "maximum": 3650,
67
+ "minimum": 0,
68
+ "type": "integer"
69
+ }
70
+ },
71
+ "required": [
72
+ "peril",
73
+ "limitAmount",
74
+ "deductibleBps",
75
+ "waitingPeriodDays"
76
+ ],
77
+ "type": "object"
78
+ },
79
+ "maxItems": 24,
80
+ "minItems": 1,
81
+ "type": "array"
82
+ },
83
+ "policyholderAccountId": {
84
+ "description": "Hyperscale account ID",
85
+ "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
86
+ "type": "string",
87
+ "x-hyperscale-reference-filter": {
88
+ "column": "role",
89
+ "values": [
90
+ "customer_balance"
91
+ ]
92
+ }
93
+ },
94
+ "premiumAmount": {
95
+ "description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
96
+ "pattern": "^[1-9][0-9]{0,17}$",
97
+ "type": "string"
98
+ },
99
+ "renewalOfPolicyId": {
100
+ "description": "Prior policy this quote renews; the prior term must be active or already expired",
101
+ "pattern": "^pol_(sandbox|live)_[a-z0-9]{8,64}$",
102
+ "type": "string"
103
+ },
104
+ "startsAt": {
105
+ "format": "hyperscale-date-time",
106
+ "type": "string"
107
+ },
108
+ "termsSummary": {
109
+ "maxLength": 1000,
110
+ "minLength": 1,
111
+ "type": "string"
112
+ }
113
+ },
114
+ "id": "policy",
115
+ "idPrefix": "pol",
116
+ "lifecycle": {
117
+ "initial": "quoted",
118
+ "states": [
119
+ "quoted",
120
+ "bound",
121
+ "active",
122
+ "cancel_quoted",
123
+ "canceled",
124
+ "expired"
125
+ ],
126
+ "transitions": {
127
+ "activate": {
128
+ "from": [
129
+ "bound"
130
+ ],
131
+ "to": "active"
132
+ },
133
+ "bind": {
134
+ "from": [
135
+ "quoted"
136
+ ],
137
+ "to": "bound"
138
+ },
139
+ "cancel": {
140
+ "from": [
141
+ "cancel_quoted"
142
+ ],
143
+ "to": "canceled"
144
+ },
145
+ "endorse": {
146
+ "from": [
147
+ "active"
148
+ ],
149
+ "to": "active"
150
+ },
151
+ "expire": {
152
+ "from": [
153
+ "active"
154
+ ],
155
+ "to": "expired"
156
+ },
157
+ "preview": {
158
+ "from": [
159
+ "bound"
160
+ ],
161
+ "to": "cancel_quoted"
162
+ },
163
+ "withdraw": {
164
+ "from": [
165
+ "quoted"
166
+ ],
167
+ "to": "canceled"
168
+ }
169
+ }
170
+ },
171
+ "parties": {
172
+ "beneficiary": "insurerAccountId",
173
+ "payer": "policyholderAccountId"
174
+ },
175
+ "required": [
176
+ "policyholderAccountId",
177
+ "insurerAccountId",
178
+ "premiumAmount",
179
+ "coverageLimit",
180
+ "currency",
181
+ "startsAt",
182
+ "expiresAt",
183
+ "perilSchedule"
184
+ ],
185
+ "subject": {
186
+ "kinds": [
187
+ "policy_risk",
188
+ "flight_itinerary",
189
+ "lodging_stay",
190
+ "vehicle",
191
+ "pet",
192
+ "traveler_party",
193
+ "employee_census"
194
+ ]
195
+ },
196
+ "summary": "Carrier-backed protection over one declared-value subject.",
197
+ "title": "Policy",
198
+ "unwind": {
199
+ "confirm": "cancel",
200
+ "penalty": [
201
+ {
202
+ "bps": 0
203
+ }
204
+ ],
205
+ "quote": "preview",
206
+ "refundDestinationField": "policyholderAccountId",
207
+ "refundableField": "premiumAmount"
208
+ },
209
+ "update": {
210
+ "fields": [
211
+ "startsAt",
212
+ "expiresAt",
213
+ "perilSchedule",
214
+ "termsSummary"
215
+ ],
216
+ "states": [
217
+ "quoted"
218
+ ]
219
+ },
220
+ "verbs": {
221
+ "activate": {
222
+ "description": "Starts cover at the declared time and pays the held premium to the insurer under the machine principal.",
223
+ "due": {
224
+ "field": "startsAt"
225
+ },
226
+ "earnable": true,
227
+ "moves": [
228
+ {
229
+ "bind": {
230
+ "amount": {
231
+ "from": "instance",
232
+ "path": "fields.premiumAmount"
233
+ },
234
+ "currency": {
235
+ "from": "instance",
236
+ "path": "fields.currency"
237
+ },
238
+ "destinationAccountId": {
239
+ "from": "instance",
240
+ "path": "fields.insurerAccountId"
241
+ },
242
+ "sourceAccountId": {
243
+ "from": "instance",
244
+ "path": "refs.premiumReserveAccountId"
245
+ },
246
+ "workspaceId": {
247
+ "from": "instance",
248
+ "path": "workspaceId"
249
+ }
250
+ },
251
+ "capture": {
252
+ "premiumTransferId": "transferId"
253
+ },
254
+ "key": "transfer",
255
+ "operation": "internal_transfer.create"
256
+ }
257
+ ],
258
+ "steps": [],
259
+ "summary": "Activate a policy"
260
+ },
261
+ "bind": {
262
+ "decision": {
263
+ "capability": "insurance_carrier",
264
+ "deadlineMs": 15000,
265
+ "onTimeout": "decline"
266
+ },
267
+ "description": "Asks the carrier to accept the risk, then moves the premium into its dedicated reserve until cover starts.",
268
+ "eventName": "policy.bound",
269
+ "moves": [
270
+ {
271
+ "bind": {
272
+ "amount": {
273
+ "from": "instance",
274
+ "path": "fields.premiumAmount"
275
+ },
276
+ "currency": {
277
+ "from": "instance",
278
+ "path": "fields.currency"
279
+ },
280
+ "destinationAccountId": {
281
+ "from": "instance",
282
+ "path": "refs.premiumReserveAccountId"
283
+ },
284
+ "sourceAccountId": {
285
+ "from": "instance",
286
+ "path": "fields.policyholderAccountId"
287
+ },
288
+ "workspaceId": {
289
+ "from": "instance",
290
+ "path": "workspaceId"
291
+ }
292
+ },
293
+ "capture": {
294
+ "premiumFundingTransferId": "transferId"
295
+ },
296
+ "key": "transfer",
297
+ "operation": "internal_transfer.create"
298
+ }
299
+ ],
300
+ "steps": [],
301
+ "summary": "Bind a policy"
302
+ },
303
+ "cancel": {
304
+ "description": "Confirms the previewed cancellation and returns the entire reserved premium to the policyholder before cover starts.",
305
+ "moves": [
306
+ {
307
+ "bind": {
308
+ "amount": {
309
+ "from": "instance",
310
+ "path": "refs.unwindRefund"
311
+ },
312
+ "currency": {
313
+ "from": "instance",
314
+ "path": "fields.currency"
315
+ },
316
+ "destinationAccountId": {
317
+ "from": "instance",
318
+ "path": "fields.policyholderAccountId"
319
+ },
320
+ "sourceAccountId": {
321
+ "from": "instance",
322
+ "path": "refs.premiumReserveAccountId"
323
+ },
324
+ "workspaceId": {
325
+ "from": "instance",
326
+ "path": "workspaceId"
327
+ }
328
+ },
329
+ "capture": {
330
+ "premiumRefundTransferId": "transferId"
331
+ },
332
+ "key": "transfer",
333
+ "operation": "internal_transfer.create"
334
+ }
335
+ ],
336
+ "steps": [],
337
+ "summary": "Cancel a policy"
338
+ },
339
+ "create": {
340
+ "description": "Creates a quote against one declared-value risk and provisions the premium reserve. No premium moves until the carrier binds.",
341
+ "eventName": "policy.quoted",
342
+ "examples": [
343
+ {
344
+ "input": {
345
+ "coverageLimit": "200000",
346
+ "currency": "SAR",
347
+ "expiresAt": "2027-08-01T00:00:00.000Z",
348
+ "insurerAccountId": "acct_sandbox_insurer0001",
349
+ "perilSchedule": [
350
+ {
351
+ "deductibleBps": 500,
352
+ "limitAmount": "200000",
353
+ "peril": "accidental_damage",
354
+ "waitingPeriodDays": 0
355
+ },
356
+ {
357
+ "deductibleBps": 250,
358
+ "limitAmount": "200000",
359
+ "peril": "theft",
360
+ "waitingPeriodDays": 7
361
+ }
362
+ ],
363
+ "policyholderAccountId": "acct_sandbox_holder00001",
364
+ "premiumAmount": "12500",
365
+ "startsAt": "2026-08-01T00:00:00.000Z",
366
+ "subject": "sbj_sandbox_protection001",
367
+ "termsSummary": "Annual cover for accidental damage and theft."
368
+ },
369
+ "name": "quote_asset_protection"
370
+ }
371
+ ],
372
+ "moves": [],
373
+ "requiresRefs": [
374
+ {
375
+ "field": "renewalOfPolicyId",
376
+ "optional": true,
377
+ "statuses": [
378
+ "active",
379
+ "expired"
380
+ ]
381
+ }
382
+ ],
383
+ "steps": [
384
+ {
385
+ "bind": {
386
+ "currency": {
387
+ "from": "instance",
388
+ "path": "fields.currency"
389
+ },
390
+ "owner.id": {
391
+ "from": "instance",
392
+ "path": "workspaceId"
393
+ },
394
+ "owner.type": {
395
+ "from": "const",
396
+ "value": "workspace"
397
+ },
398
+ "role": {
399
+ "from": "const",
400
+ "value": "workspace_escrow"
401
+ },
402
+ "workspaceId": {
403
+ "from": "instance",
404
+ "path": "workspaceId"
405
+ }
406
+ },
407
+ "capture": {
408
+ "premiumReserveAccountId": "accountId"
409
+ },
410
+ "operation": "account.escrow.provision"
411
+ }
412
+ ],
413
+ "summary": "Quote a policy"
414
+ },
415
+ "endorse": {
416
+ "decision": {
417
+ "capability": "insurance_carrier",
418
+ "deadlineMs": 15000,
419
+ "onTimeout": "decline"
420
+ },
421
+ "description": "Applies a carrier-approved mid-term change to active cover: the peril schedule, terms summary, or expiry may be rewritten. No premium moves; mid-term premium adjustment is not modeled.",
422
+ "examples": [
423
+ {
424
+ "input": {
425
+ "expiresAt": "2027-11-01T00:00:00.000Z",
426
+ "termsSummary": "Extended cover incl. water damage."
427
+ },
428
+ "name": "endorse_extend_active_cover"
429
+ }
430
+ ],
431
+ "input": {
432
+ "additionalProperties": false,
433
+ "properties": {
434
+ "expiresAt": {
435
+ "format": "hyperscale-date-time",
436
+ "type": "string"
437
+ },
438
+ "perilSchedule": {
439
+ "items": {
440
+ "additionalProperties": false,
441
+ "properties": {
442
+ "deductibleBps": {
443
+ "maximum": 10000,
444
+ "minimum": 0,
445
+ "type": "integer"
446
+ },
447
+ "limitAmount": {
448
+ "description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
449
+ "pattern": "^[1-9][0-9]{0,17}$",
450
+ "type": "string"
451
+ },
452
+ "peril": {
453
+ "pattern": "^[a-z][a-z0-9_]{1,79}$",
454
+ "type": "string"
455
+ },
456
+ "waitingPeriodDays": {
457
+ "maximum": 3650,
458
+ "minimum": 0,
459
+ "type": "integer"
460
+ }
461
+ },
462
+ "required": [
463
+ "peril",
464
+ "limitAmount",
465
+ "deductibleBps",
466
+ "waitingPeriodDays"
467
+ ],
468
+ "type": "object"
469
+ },
470
+ "maxItems": 24,
471
+ "minItems": 1,
472
+ "type": "array"
473
+ },
474
+ "termsSummary": {
475
+ "maxLength": 1000,
476
+ "minLength": 1,
477
+ "type": "string"
478
+ }
479
+ },
480
+ "type": "object"
481
+ },
482
+ "moves": [],
483
+ "steps": [],
484
+ "summary": "Endorse a policy"
485
+ },
486
+ "expire": {
487
+ "description": "Ends active cover at term under the machine principal. Earned premium remains with the insurer.",
488
+ "due": {
489
+ "field": "expiresAt"
490
+ },
491
+ "moves": [],
492
+ "requiresDrainedAccount": {
493
+ "path": "refs.premiumReserveAccountId"
494
+ },
495
+ "steps": [],
496
+ "summary": "Expire a policy"
497
+ },
498
+ "preview": {
499
+ "description": "Quotes the full premium refund while cover is bound but not active. No money moves until cancellation is confirmed.",
500
+ "moves": [],
501
+ "steps": [],
502
+ "summary": "Preview policy cancellation"
503
+ },
504
+ "withdraw": {
505
+ "description": "Closes an unbound quote. No premium moved, so no cancellation preview is required.",
506
+ "eventName": "policy.withdrawn",
507
+ "moves": [],
508
+ "requiresDrainedAccount": {
509
+ "path": "refs.premiumReserveAccountId"
510
+ },
511
+ "steps": [],
512
+ "summary": "Withdraw a policy quote"
513
+ }
514
+ }
515
+ },
516
+ {
517
+ "description": "A claim is filed against an active policy, assessed, approved or denied, and paid from the insurer account through a held transfer. Approval can be reversed before payment, releasing the insurer's hold without moving settled money.",
518
+ "fields": {
519
+ "claimAmount": {
520
+ "description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
521
+ "pattern": "^[1-9][0-9]{0,17}$",
522
+ "type": "string"
523
+ },
524
+ "claimantAccountId": {
525
+ "description": "Hyperscale account ID",
526
+ "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
527
+ "type": "string",
528
+ "x-hyperscale-reference-filter": {
529
+ "column": "role",
530
+ "values": [
531
+ "customer_balance"
532
+ ]
533
+ }
534
+ },
535
+ "currency": {
536
+ "description": "ISO 4217 currency code",
537
+ "maxLength": 3,
538
+ "minLength": 3,
539
+ "pattern": "^[A-Z]{3}$",
540
+ "type": "string"
541
+ },
542
+ "evidenceSummary": {
543
+ "maxLength": 2000,
544
+ "minLength": 1,
545
+ "type": "string"
546
+ },
547
+ "insurerAccountId": {
548
+ "description": "Hyperscale account ID",
549
+ "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
550
+ "type": "string",
551
+ "x-hyperscale-reference-filter": {
552
+ "column": "role",
553
+ "values": [
554
+ "customer_balance"
555
+ ]
556
+ }
557
+ },
558
+ "occurredAt": {
559
+ "format": "hyperscale-date-time",
560
+ "type": "string"
561
+ },
562
+ "peril": {
563
+ "pattern": "^[a-z][a-z0-9_]{1,79}$",
564
+ "type": "string"
565
+ },
566
+ "policyId": {
567
+ "description": "Active policy this claim is made against",
568
+ "pattern": "^pol_(sandbox|live)_[a-z0-9]{8,64}$",
569
+ "type": "string"
570
+ }
571
+ },
572
+ "id": "claim",
573
+ "idPrefix": "clm",
574
+ "lifecycle": {
575
+ "initial": "filed",
576
+ "states": [
577
+ "filed",
578
+ "assessed",
579
+ "approved",
580
+ "paid",
581
+ "denied"
582
+ ],
583
+ "transitions": {
584
+ "approve": {
585
+ "from": [
586
+ "assessed"
587
+ ],
588
+ "to": "approved"
589
+ },
590
+ "assess": {
591
+ "from": [
592
+ "filed"
593
+ ],
594
+ "to": "assessed"
595
+ },
596
+ "attest": {
597
+ "from": [
598
+ "assessed"
599
+ ],
600
+ "to": "approved"
601
+ },
602
+ "deny": {
603
+ "from": [
604
+ "filed",
605
+ "assessed"
606
+ ],
607
+ "to": "denied"
608
+ },
609
+ "pay": {
610
+ "from": [
611
+ "approved"
612
+ ],
613
+ "to": "paid"
614
+ },
615
+ "reverse": {
616
+ "from": [
617
+ "approved"
618
+ ],
619
+ "to": "denied"
620
+ }
621
+ }
622
+ },
623
+ "parties": {
624
+ "beneficiary": "claimantAccountId",
625
+ "payer": "insurerAccountId"
626
+ },
627
+ "required": [
628
+ "policyId",
629
+ "claimantAccountId",
630
+ "insurerAccountId",
631
+ "claimAmount",
632
+ "currency",
633
+ "peril",
634
+ "occurredAt"
635
+ ],
636
+ "subject": {
637
+ "kinds": [
638
+ "policy_risk",
639
+ "flight_itinerary",
640
+ "lodging_stay",
641
+ "vehicle",
642
+ "pet",
643
+ "traveler_party",
644
+ "employee_census"
645
+ ]
646
+ },
647
+ "summary": "Demand against active protection for one covered peril.",
648
+ "title": "Claim",
649
+ "update": {
650
+ "fields": [
651
+ "evidenceSummary"
652
+ ],
653
+ "states": [
654
+ "filed",
655
+ "assessed"
656
+ ]
657
+ },
658
+ "verbs": {
659
+ "approve": {
660
+ "decision": {
661
+ "capability": "insurance_claims_adjuster",
662
+ "deadlineMs": 15000,
663
+ "onTimeout": "decline"
664
+ },
665
+ "description": "Asks the claims adjuster to approve the assessed demand, then holds the immutable claim amount from the insurer for the claimant. For a carrier that exposes an adjudication API: the verdict is the provider's, taken just in time under a deadline.",
666
+ "moves": [
667
+ {
668
+ "bind": {
669
+ "amount": {
670
+ "from": "instance",
671
+ "path": "fields.claimAmount"
672
+ },
673
+ "currency": {
674
+ "from": "instance",
675
+ "path": "fields.currency"
676
+ },
677
+ "destinationAccountId": {
678
+ "from": "instance",
679
+ "path": "fields.claimantAccountId"
680
+ },
681
+ "sourceAccountId": {
682
+ "from": "instance",
683
+ "path": "fields.insurerAccountId"
684
+ }
685
+ },
686
+ "capture": {
687
+ "claimTransferId": "transferId"
688
+ },
689
+ "key": "transfer",
690
+ "operation": "internal_transfer.reserve"
691
+ }
692
+ ],
693
+ "steps": [],
694
+ "summary": "Approve a claim"
695
+ },
696
+ "assess": {
697
+ "description": "Marks filed evidence ready for an approval decision. A claim validly filed during cover continues even if the policy term later expires.",
698
+ "moves": [],
699
+ "steps": [],
700
+ "summary": "Assess a claim"
701
+ },
702
+ "attest": {
703
+ "description": "Records the insurer's own approval of the assessed demand, taken outside the platform, and holds the immutable claim amount from the insurer for the claimant. The insurer must be asserted as the acting party. Use this where the carrier exposes no adjudication API; where one exists, approve calls it instead.",
704
+ "moves": [
705
+ {
706
+ "bind": {
707
+ "amount": {
708
+ "from": "instance",
709
+ "path": "fields.claimAmount"
710
+ },
711
+ "currency": {
712
+ "from": "instance",
713
+ "path": "fields.currency"
714
+ },
715
+ "destinationAccountId": {
716
+ "from": "instance",
717
+ "path": "fields.claimantAccountId"
718
+ },
719
+ "sourceAccountId": {
720
+ "from": "instance",
721
+ "path": "fields.insurerAccountId"
722
+ }
723
+ },
724
+ "capture": {
725
+ "claimTransferId": "transferId"
726
+ },
727
+ "key": "transfer",
728
+ "operation": "internal_transfer.reserve"
729
+ }
730
+ ],
731
+ "port": {
732
+ "allowedParties": [
733
+ "payer"
734
+ ]
735
+ },
736
+ "steps": [],
737
+ "summary": "Attest an out-of-band claim approval"
738
+ },
739
+ "create": {
740
+ "description": "Records a demand against an active policy and reserves its filed amount against the policy's aggregate coverage limit.",
741
+ "eventName": "claim.filed",
742
+ "examples": [
743
+ {
744
+ "input": {
745
+ "claimAmount": "75000",
746
+ "claimantAccountId": "acct_sandbox_holder00001",
747
+ "currency": "SAR",
748
+ "evidenceSummary": "Covered equipment was damaged in an accidental fall.",
749
+ "insurerAccountId": "acct_sandbox_insurer0001",
750
+ "occurredAt": "2026-10-14T11:30:00.000Z",
751
+ "peril": "accidental_damage",
752
+ "policyId": "pol_sandbox_protection001",
753
+ "subject": "sbj_sandbox_protection001"
754
+ },
755
+ "name": "file_accidental_damage_claim"
756
+ }
757
+ ],
758
+ "moves": [],
759
+ "requiresRefs": [
760
+ {
761
+ "field": "policyId",
762
+ "statuses": [
763
+ "active"
764
+ ]
765
+ }
766
+ ],
767
+ "steps": [],
768
+ "summary": "File a claim"
769
+ },
770
+ "deny": {
771
+ "description": "Closes a filed or assessed demand before any payout hold exists.",
772
+ "eventName": "claim.denied",
773
+ "moves": [],
774
+ "steps": [],
775
+ "summary": "Deny a claim"
776
+ },
777
+ "pay": {
778
+ "description": "Posts the approved hold and settles the claim amount into the claimant account.",
779
+ "eventName": "claim.paid",
780
+ "moves": [
781
+ {
782
+ "bind": {
783
+ "transferId": {
784
+ "from": "instance",
785
+ "path": "refs.claimTransferId"
786
+ }
787
+ },
788
+ "key": "transfer",
789
+ "operation": "internal_transfer.post"
790
+ }
791
+ ],
792
+ "steps": [],
793
+ "summary": "Pay a claim"
794
+ },
795
+ "reverse": {
796
+ "description": "Voids an approved payout hold before payment and closes the claim denied. No settled money is reversed.",
797
+ "moves": [
798
+ {
799
+ "bind": {
800
+ "reason": {
801
+ "from": "const",
802
+ "value": "Claim approval reversed"
803
+ },
804
+ "transferId": {
805
+ "from": "instance",
806
+ "path": "refs.claimTransferId"
807
+ }
808
+ },
809
+ "key": "transfer",
810
+ "operation": "internal_transfer.void"
811
+ }
812
+ ],
813
+ "steps": [],
814
+ "summary": "Reverse claim approval"
815
+ }
816
+ }
817
+ }
818
+ ],
819
+ "product": "protection",
820
+ "subjects": [
821
+ {
822
+ "declaredValue": "required",
823
+ "kind": "vehicle",
824
+ "schema": {
825
+ "additionalProperties": false,
826
+ "properties": {
827
+ "make": {
828
+ "maxLength": 60,
829
+ "minLength": 1,
830
+ "type": "string"
831
+ },
832
+ "mileageKm": {
833
+ "maximum": 9007199254740991,
834
+ "minimum": 0,
835
+ "type": "integer"
836
+ },
837
+ "model": {
838
+ "maxLength": 60,
839
+ "minLength": 1,
840
+ "type": "string"
841
+ },
842
+ "vin": {
843
+ "maxLength": 17,
844
+ "minLength": 11,
845
+ "type": "string"
846
+ },
847
+ "year": {
848
+ "pattern": "^\\d{4}$",
849
+ "type": "string"
850
+ }
851
+ },
852
+ "required": [
853
+ "vin",
854
+ "make",
855
+ "model",
856
+ "year",
857
+ "mileageKm"
858
+ ],
859
+ "type": "object"
860
+ },
861
+ "title": "Vehicle",
862
+ "version": 1
863
+ },
864
+ {
865
+ "declaredValue": "required",
866
+ "kind": "policy_risk",
867
+ "schema": {
868
+ "additionalProperties": false,
869
+ "properties": {
870
+ "category": {
871
+ "pattern": "^[a-z][a-z0-9_]{1,79}$",
872
+ "type": "string"
873
+ },
874
+ "description": {
875
+ "maxLength": 500,
876
+ "minLength": 1,
877
+ "type": "string"
878
+ },
879
+ "jurisdiction": {
880
+ "maxLength": 80,
881
+ "minLength": 2,
882
+ "type": "string"
883
+ },
884
+ "reference": {
885
+ "maxLength": 120,
886
+ "minLength": 1,
887
+ "type": "string"
888
+ }
889
+ },
890
+ "required": [
891
+ "category",
892
+ "description",
893
+ "jurisdiction"
894
+ ],
895
+ "type": "object"
896
+ },
897
+ "title": "Policy risk",
898
+ "version": 1
899
+ },
900
+ {
901
+ "declaredValue": "required",
902
+ "kind": "flight_itinerary",
903
+ "schema": {
904
+ "additionalProperties": false,
905
+ "properties": {
906
+ "cabin": {
907
+ "enum": [
908
+ "economy",
909
+ "premium_economy",
910
+ "business",
911
+ "first"
912
+ ],
913
+ "type": "string"
914
+ },
915
+ "carrierName": {
916
+ "maxLength": 80,
917
+ "minLength": 1,
918
+ "type": "string"
919
+ },
920
+ "destination": {
921
+ "pattern": "^[A-Z]{3}$",
922
+ "type": "string"
923
+ },
924
+ "flightNumber": {
925
+ "maxLength": 8,
926
+ "minLength": 2,
927
+ "type": "string"
928
+ },
929
+ "origin": {
930
+ "pattern": "^[A-Z]{3}$",
931
+ "type": "string"
932
+ }
933
+ },
934
+ "required": [
935
+ "carrierName",
936
+ "flightNumber",
937
+ "origin",
938
+ "destination",
939
+ "cabin"
940
+ ],
941
+ "type": "object"
942
+ },
943
+ "title": "Flight itinerary",
944
+ "version": 1
945
+ },
946
+ {
947
+ "declaredValue": "required",
948
+ "kind": "lodging_stay",
949
+ "schema": {
950
+ "additionalProperties": false,
951
+ "properties": {
952
+ "city": {
953
+ "maxLength": 80,
954
+ "minLength": 1,
955
+ "type": "string"
956
+ },
957
+ "propertyName": {
958
+ "maxLength": 120,
959
+ "minLength": 1,
960
+ "type": "string"
961
+ },
962
+ "roomType": {
963
+ "maxLength": 60,
964
+ "minLength": 1,
965
+ "type": "string"
966
+ }
967
+ },
968
+ "required": [
969
+ "propertyName",
970
+ "city",
971
+ "roomType"
972
+ ],
973
+ "type": "object"
974
+ },
975
+ "title": "Lodging stay",
976
+ "version": 1
977
+ },
978
+ {
979
+ "declaredValue": "required",
980
+ "kind": "pet",
981
+ "schema": {
982
+ "additionalProperties": false,
983
+ "properties": {
984
+ "ageYears": {
985
+ "maximum": 30,
986
+ "minimum": 0,
987
+ "type": "integer"
988
+ },
989
+ "breed": {
990
+ "maxLength": 80,
991
+ "minLength": 1,
992
+ "type": "string"
993
+ },
994
+ "gender": {
995
+ "enum": [
996
+ "female",
997
+ "male"
998
+ ],
999
+ "type": "string"
1000
+ },
1001
+ "lastCheckupAt": {
1002
+ "format": "hyperscale-date",
1003
+ "type": "string"
1004
+ },
1005
+ "microchipNumber": {
1006
+ "maxLength": 40,
1007
+ "minLength": 1,
1008
+ "type": "string"
1009
+ },
1010
+ "name": {
1011
+ "maxLength": 80,
1012
+ "minLength": 1,
1013
+ "type": "string"
1014
+ },
1015
+ "neutered": {
1016
+ "type": "boolean"
1017
+ },
1018
+ "species": {
1019
+ "enum": [
1020
+ "cat",
1021
+ "dog"
1022
+ ],
1023
+ "type": "string"
1024
+ }
1025
+ },
1026
+ "required": [
1027
+ "species",
1028
+ "breed",
1029
+ "ageYears",
1030
+ "gender"
1031
+ ],
1032
+ "type": "object"
1033
+ },
1034
+ "title": "Pet",
1035
+ "version": 1
1036
+ },
1037
+ {
1038
+ "declaredValue": "required",
1039
+ "kind": "traveler_party",
1040
+ "schema": {
1041
+ "additionalProperties": false,
1042
+ "properties": {
1043
+ "destinationRegion": {
1044
+ "maxLength": 80,
1045
+ "minLength": 2,
1046
+ "type": "string"
1047
+ },
1048
+ "originCountry": {
1049
+ "pattern": "^[A-Z]{2}$",
1050
+ "type": "string"
1051
+ },
1052
+ "travelers": {
1053
+ "items": {
1054
+ "additionalProperties": false,
1055
+ "properties": {
1056
+ "role": {
1057
+ "enum": [
1058
+ "self",
1059
+ "spouse",
1060
+ "child"
1061
+ ],
1062
+ "type": "string"
1063
+ },
1064
+ "yearOfBirth": {
1065
+ "maximum": 2030,
1066
+ "minimum": 1900,
1067
+ "type": "integer"
1068
+ }
1069
+ },
1070
+ "required": [
1071
+ "role",
1072
+ "yearOfBirth"
1073
+ ],
1074
+ "type": "object"
1075
+ },
1076
+ "maxItems": 20,
1077
+ "minItems": 1,
1078
+ "type": "array"
1079
+ }
1080
+ },
1081
+ "required": [
1082
+ "travelers",
1083
+ "destinationRegion"
1084
+ ],
1085
+ "type": "object"
1086
+ },
1087
+ "title": "Traveler party",
1088
+ "version": 1
1089
+ },
1090
+ {
1091
+ "declaredValue": "required",
1092
+ "kind": "employee_census",
1093
+ "schema": {
1094
+ "additionalProperties": false,
1095
+ "properties": {
1096
+ "dependentCount": {
1097
+ "maximum": 50000,
1098
+ "minimum": 0,
1099
+ "type": "integer"
1100
+ },
1101
+ "entityReference": {
1102
+ "maxLength": 120,
1103
+ "minLength": 1,
1104
+ "type": "string"
1105
+ },
1106
+ "insuranceClasses": {
1107
+ "items": {
1108
+ "maxLength": 60,
1109
+ "minLength": 1,
1110
+ "type": "string"
1111
+ },
1112
+ "maxItems": 12,
1113
+ "minItems": 1,
1114
+ "type": "array"
1115
+ },
1116
+ "primaryCount": {
1117
+ "maximum": 10000,
1118
+ "minimum": 1,
1119
+ "type": "integer"
1120
+ }
1121
+ },
1122
+ "required": [
1123
+ "entityReference",
1124
+ "primaryCount",
1125
+ "dependentCount"
1126
+ ],
1127
+ "type": "object"
1128
+ },
1129
+ "title": "Employee census",
1130
+ "version": 1
1131
+ }
1132
+ ],
1133
+ "title": "Protection",
1134
+ "udl": 1,
1135
+ "version": 1
1136
+ }