@danceiny/gotry 0.0.1-rc.18 → 0.0.1-rc.19

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 (137) hide show
  1. package/README.md +42 -16
  2. package/README.zh-CN.md +37 -15
  3. package/bin/gotry-bootstrap.js +236 -3
  4. package/bin/gotry-inner.js +66 -20
  5. package/bin/gotry-runtime-resolution.d.ts +1 -1
  6. package/bin/gotry-runtime-resolution.js +7 -8
  7. package/cordis.gotry-patch.yml +15 -5
  8. package/data/stations-12306-verify.json +524 -0
  9. package/dist/capabilities/agent-reach.js +4 -4
  10. package/dist/capabilities/channel-health.js +103 -0
  11. package/dist/capabilities/channel-registry.js +213 -0
  12. package/dist/capabilities/doctor.js +285 -0
  13. package/dist/capabilities/effect.js +178 -5
  14. package/dist/capabilities/flyai.js +13 -0
  15. package/dist/capabilities/session/adapters/ctrip-hotel.js +207 -0
  16. package/dist/capabilities/session/adapters/rail-12306.js +285 -0
  17. package/dist/capabilities/session/extension-bridge.js +14 -1
  18. package/dist/capabilities/session/extension-channel.js +4 -2
  19. package/dist/capabilities/session/extension-distribution.js +1 -1
  20. package/dist/capabilities/session-search.js +311 -0
  21. package/dist/capabilities/visa-policy.js +126 -0
  22. package/dist/scripts/agent-planning-turn-deadline-e2e.js +304 -0
  23. package/dist/scripts/agent-planning-turn-deadline-tests.js +281 -0
  24. package/dist/scripts/benchmark-environment-bridge-e2e.js +5 -10
  25. package/dist/scripts/benchmark-environment-bridge-tests.js +148 -142
  26. package/dist/scripts/booking-copilot-availability-ledger-binding-tests.js +26 -26
  27. package/dist/scripts/{booking-copilot-availability-policy-v2-tests.js → booking-copilot-availability-policy-tests.js} +115 -115
  28. package/dist/scripts/booking-copilot-crossrepo-fixture-server.js +41 -1
  29. package/dist/scripts/booking-copilot-dsh-core-proof-tests.js +75 -120
  30. package/dist/scripts/booking-copilot-dsh-planner-proof-tests.js +370 -61
  31. package/dist/scripts/booking-copilot-dsh-plugin-proof-tests.js +2 -2
  32. package/dist/scripts/booking-copilot-event-sequence-concurrency-proof-tests.js +7 -3
  33. package/dist/scripts/booking-copilot-gap-code-contract-proof-tests.js +15 -9
  34. package/dist/scripts/booking-copilot-operation-ledger-concurrency-proof-tests.js +19 -11
  35. package/dist/scripts/booking-copilot-receipt-ledger-concurrency-proof-tests.js +16 -52
  36. package/dist/scripts/booking-copilot-runtime-proof-tests.js +3953 -155
  37. package/dist/scripts/booking-copilot-server-proof-tests.js +58 -23
  38. package/dist/scripts/booking-copilot-startup-proof-tests.js +10 -119
  39. package/dist/scripts/booking-surface-contract-proof-tests.js +1154 -326
  40. package/dist/scripts/bootstrap-tests.js +87 -2
  41. package/dist/scripts/build-metrics-report.js +339 -0
  42. package/dist/scripts/channel-probe-tests.js +148 -0
  43. package/dist/scripts/channel-probe.js +252 -0
  44. package/dist/scripts/channel-registry-tests.js +262 -0
  45. package/dist/scripts/doctor-tests.js +121 -0
  46. package/dist/scripts/effect-tests.js +274 -1
  47. package/dist/scripts/extension-tests.js +129 -11
  48. package/dist/scripts/fact-gate-tests.js +91 -2
  49. package/dist/scripts/flyai-tests.js +17 -1
  50. package/dist/scripts/hbcli-e2e-tests.js +1 -3
  51. package/dist/scripts/metrics-report-tests.js +288 -0
  52. package/dist/scripts/persona-surface-guard-tests.js +19 -0
  53. package/dist/scripts/session-tests.js +401 -1
  54. package/dist/scripts/smoke.js +100 -83
  55. package/dist/scripts/turn-handoff-collect-tests.js +216 -0
  56. package/dist/scripts/turn-handoff-collect.js +189 -0
  57. package/dist/scripts/turn-policy-tests.js +56 -0
  58. package/dist/scripts/typed-contract-canary.js +261 -0
  59. package/dist/scripts/visa-policy-tests.js +75 -0
  60. package/dist/scripts/wish-channel-gate-tests.js +111 -0
  61. package/dist/src/artifact-gate.js +91 -3
  62. package/dist/src/benchmark-agent-conformance.js +7 -4
  63. package/dist/src/benchmark-environment-bridge.js +68 -7
  64. package/dist/src/bookable-facts.js +62 -3
  65. package/dist/src/booking-surface/{availability-policy-v2.js → availability-policy.js} +89 -89
  66. package/dist/src/booking-surface/canonical-schema.js +8 -22
  67. package/dist/src/booking-surface/contracts.js +70 -19
  68. package/dist/src/booking-surface/dsh-planner.js +310 -177
  69. package/dist/src/booking-surface/dsh-plugin.js +3 -3
  70. package/dist/src/booking-surface/index.js +1 -5
  71. package/dist/src/booking-surface/profile.js +1 -1
  72. package/dist/src/booking-surface/runtime.js +1682 -247
  73. package/dist/src/booking-surface/server.js +371 -185
  74. package/dist/src/booking-surface/startup.js +17 -27
  75. package/dist/src/booking-surface/validation.js +270 -760
  76. package/dist/src/index.js +735 -149
  77. package/dist/src/turn-deadline.js +292 -0
  78. package/dist/src/turn-policy.js +146 -0
  79. package/dist/src/wish-pool.js +5 -0
  80. package/extension/background.js +23 -4
  81. package/extension/content-main.js +47 -9
  82. package/extension/manifest.json +27 -9
  83. package/package.json +6 -26
  84. package/schemas/booking.surface.schema.json +2593 -0
  85. package/ts/capabilities/agent-reach.ts +4 -4
  86. package/ts/capabilities/flyai.ts +21 -3
  87. package/ts/capabilities/session/action-cache.ts +1 -1
  88. package/ts/capabilities/session/adapters/ctrip-hotel.ts +238 -0
  89. package/ts/capabilities/session/adapters/rail-12306.ts +293 -0
  90. package/ts/capabilities/session/extension-bridge.ts +32 -2
  91. package/ts/capabilities/session/extension-channel.ts +9 -8
  92. package/ts/capabilities/session/extension-distribution.ts +3 -1
  93. package/ts/capabilities/session/health-watch.ts +1 -1
  94. package/ts/capabilities/session/read-guard.ts +1 -1
  95. package/ts/capabilities/session/wizard.ts +1 -1
  96. package/ts/capabilities/session-search.ts +323 -1
  97. package/ts/package.json +1 -0
  98. package/ts/scripts/turn-handoff-collect.ts +178 -0
  99. package/ts/src/artifact-gate.ts +82 -2
  100. package/ts/src/benchmark-agent-conformance.ts +14 -6
  101. package/ts/src/benchmark-environment-bridge.ts +29 -10
  102. package/ts/src/bookable-facts.ts +109 -5
  103. package/ts/src/booking-saga.ts +1 -1
  104. package/ts/src/booking-surface/{availability-policy-v2.ts → availability-policy.ts} +124 -125
  105. package/ts/src/booking-surface/canonical-schema.js +8 -22
  106. package/ts/src/booking-surface/contracts.ts +278 -239
  107. package/ts/src/booking-surface/dsh-planner.ts +333 -194
  108. package/ts/src/booking-surface/dsh-plugin.js +3 -3
  109. package/ts/src/booking-surface/index.ts +1 -5
  110. package/ts/src/booking-surface/profile.ts +11 -11
  111. package/ts/src/booking-surface/runtime.ts +1351 -351
  112. package/ts/src/booking-surface/server.ts +282 -175
  113. package/ts/src/booking-surface/startup.ts +36 -48
  114. package/ts/src/booking-surface/validation.ts +194 -442
  115. package/ts/src/contracts.ts +1 -1
  116. package/ts/src/index.ts +489 -171
  117. package/ts/src/loop.ts +1 -1
  118. package/ts/src/state-ledger.ts +1 -1
  119. package/ts/src/turn-deadline.ts +361 -0
  120. package/ts/src/turn-policy.ts +154 -0
  121. package/ts/src/wish-pool.ts +17 -4
  122. package/dist/scripts/agent-planning-budget-e2e.js +0 -227
  123. package/dist/scripts/agent-planning-budget-tests.js +0 -173
  124. package/dist/scripts/booking-copilot-v2-runtime-proof-tests.js +0 -3935
  125. package/dist/scripts/booking-surface-v2-contract-proof-tests.js +0 -1174
  126. package/dist/src/booking-surface/contracts-v2.js +0 -89
  127. package/dist/src/booking-surface/runtime-v2.js +0 -1771
  128. package/dist/src/booking-surface/server-v2.js +0 -334
  129. package/dist/src/booking-surface/validation-v2.js +0 -319
  130. package/dist/src/tool-budget.js +0 -136
  131. package/schemas/booking.surface.v1.schema.json +0 -927
  132. package/schemas/booking.surface.v2.schema.json +0 -61
  133. package/ts/src/booking-surface/contracts-v2.ts +0 -118
  134. package/ts/src/booking-surface/runtime-v2.ts +0 -1466
  135. package/ts/src/booking-surface/server-v2.ts +0 -247
  136. package/ts/src/booking-surface/validation-v2.ts +0 -205
  137. package/ts/src/tool-budget.ts +0 -165
@@ -0,0 +1,2593 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gotry.dev/schemas/booking.surface.schema.json",
4
+ "oneOf": [
5
+ {
6
+ "$ref": "#/$defs/Workspace"
7
+ },
8
+ {
9
+ "$ref": "#/$defs/Action"
10
+ },
11
+ {
12
+ "$ref": "#/$defs/Receipt"
13
+ },
14
+ {
15
+ "$ref": "#/$defs/Ingress"
16
+ },
17
+ {
18
+ "$ref": "#/$defs/UserTurn"
19
+ },
20
+ {
21
+ "$ref": "#/$defs/Continuation"
22
+ },
23
+ {
24
+ "$ref": "#/$defs/Event"
25
+ }
26
+ ],
27
+ "$defs": {
28
+ "Ref": {
29
+ "$ref": "#/$defs/OpaqueRef"
30
+ },
31
+ "Hex64": {
32
+ "type": "string",
33
+ "pattern": "^[0-9a-f]{64}$"
34
+ },
35
+ "Surface": {
36
+ "enum": [
37
+ "tenant",
38
+ "customer_portal",
39
+ "storefront",
40
+ "payment_link"
41
+ ]
42
+ },
43
+ "Kind": {
44
+ "enum": [
45
+ "search.patch",
46
+ "search.run",
47
+ "results.view.patch",
48
+ "hotel.focus",
49
+ "hotel.select",
50
+ "offers.query",
51
+ "offers.view.patch",
52
+ "offers.compare",
53
+ "offer.select",
54
+ "offer.check",
55
+ "checkout.prepare",
56
+ "order.observe"
57
+ ]
58
+ },
59
+ "Codes": {
60
+ "type": "array",
61
+ "minItems": 0,
62
+ "maxItems": 28,
63
+ "uniqueItems": true,
64
+ "items": {
65
+ "enum": [
66
+ "byos_mapped_risk",
67
+ "check_avail_failed",
68
+ "check_avail_unverified",
69
+ "component_executor_unavailable",
70
+ "hotel_not_visible",
71
+ "hotel_rates_failed",
72
+ "offer_facts_changed",
73
+ "offer_not_loaded",
74
+ "offer_unavailable",
75
+ "order_not_found",
76
+ "order_outcome_not_observed",
77
+ "order_state_unknown",
78
+ "order_status_unavailable",
79
+ "requested_offers_not_loaded",
80
+ "search_failed",
81
+ "search_form_invalid",
82
+ "search_session_expired",
83
+ "search_terminal_timeout",
84
+ "stale_revision",
85
+ "surface_adapter_failed",
86
+ "undo_token_not_found",
87
+ "unhandled",
88
+ "unsupported",
89
+ "verified_offer_required",
90
+ "workspace_changed_during_action",
91
+ "criterion_must_not_met",
92
+ "no_hotels_matched",
93
+ "offer_target_not_reached"
94
+ ]
95
+ }
96
+ },
97
+ "LoadedOffer": {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": [
101
+ "offerRef",
102
+ "offerVersionRef",
103
+ "hotelRef",
104
+ "evidenceLevel",
105
+ "factRefs"
106
+ ],
107
+ "properties": {
108
+ "offerRef": {
109
+ "$ref": "#/$defs/Ref"
110
+ },
111
+ "offerVersionRef": {
112
+ "$ref": "#/$defs/Ref"
113
+ },
114
+ "hotelRef": {
115
+ "$ref": "#/$defs/Ref"
116
+ },
117
+ "evidenceLevel": {
118
+ "enum": [
119
+ "listed",
120
+ "rate_loaded",
121
+ "checked"
122
+ ]
123
+ },
124
+ "factRefs": {
125
+ "type": "array",
126
+ "maxItems": 64,
127
+ "uniqueItems": true,
128
+ "items": {
129
+ "$ref": "#/$defs/Ref"
130
+ }
131
+ }
132
+ }
133
+ },
134
+ "VerifiedOffer": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": [
138
+ "offerRef",
139
+ "offerVersionRef",
140
+ "verifiedOfferRef",
141
+ "expiresAt"
142
+ ],
143
+ "properties": {
144
+ "offerRef": {
145
+ "$ref": "#/$defs/Ref"
146
+ },
147
+ "offerVersionRef": {
148
+ "$ref": "#/$defs/Ref"
149
+ },
150
+ "verifiedOfferRef": {
151
+ "$ref": "#/$defs/Ref"
152
+ },
153
+ "expiresAt": {
154
+ "type": "string",
155
+ "pattern": "^\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,9})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$"
156
+ }
157
+ }
158
+ },
159
+ "OfferVersionInput": {
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "required": [
163
+ "offerRef",
164
+ "offerVersionRef"
165
+ ],
166
+ "properties": {
167
+ "offerRef": {
168
+ "$ref": "#/$defs/Ref"
169
+ },
170
+ "offerVersionRef": {
171
+ "$ref": "#/$defs/Ref"
172
+ }
173
+ }
174
+ },
175
+ "CheckoutPrepareVersionInput": {
176
+ "type": "object",
177
+ "additionalProperties": false,
178
+ "required": [
179
+ "offerRef",
180
+ "offerVersionRef",
181
+ "verifiedOfferRef"
182
+ ],
183
+ "properties": {
184
+ "offerRef": {
185
+ "$ref": "#/$defs/Ref"
186
+ },
187
+ "offerVersionRef": {
188
+ "$ref": "#/$defs/Ref"
189
+ },
190
+ "verifiedOfferRef": {
191
+ "$ref": "#/$defs/Ref"
192
+ }
193
+ }
194
+ },
195
+ "Workspace": {
196
+ "type": "object",
197
+ "additionalProperties": false,
198
+ "required": [
199
+ "schemaVersion",
200
+ "contextRef",
201
+ "surface",
202
+ "revision",
203
+ "locale",
204
+ "currency",
205
+ "searchDraft",
206
+ "results",
207
+ "visibleHotels",
208
+ "loadedOffers",
209
+ "shortlistedOfferRefs",
210
+ "capabilities"
211
+ ],
212
+ "properties": {
213
+ "schemaVersion": {
214
+ "const": "booking.surface"
215
+ },
216
+ "contextRef": {
217
+ "$ref": "#/$defs/Ref"
218
+ },
219
+ "surface": {
220
+ "$ref": "#/$defs/Surface"
221
+ },
222
+ "revision": {
223
+ "$ref": "#/$defs/Revision"
224
+ },
225
+ "locale": {
226
+ "$ref": "#/$defs/NonEmptyString"
227
+ },
228
+ "currency": {
229
+ "type": "string",
230
+ "pattern": "^[A-Z]{3}$"
231
+ },
232
+ "searchDraft": {
233
+ "$ref": "#/$defs/SearchDraftSnapshot"
234
+ },
235
+ "results": {
236
+ "$ref": "#/$defs/ResultViewSnapshot"
237
+ },
238
+ "visibleHotels": {
239
+ "type": "array",
240
+ "maxItems": 100,
241
+ "items": {
242
+ "$ref": "#/$defs/VisibleHotelFact"
243
+ }
244
+ },
245
+ "loadedOffers": {
246
+ "type": "array",
247
+ "maxItems": 200,
248
+ "items": {
249
+ "$ref": "#/$defs/LoadedOffer"
250
+ }
251
+ },
252
+ "focusedHotelRef": {
253
+ "$ref": "#/$defs/Ref"
254
+ },
255
+ "shortlistedOfferRefs": {
256
+ "type": "array",
257
+ "maxItems": 100,
258
+ "uniqueItems": true,
259
+ "items": {
260
+ "$ref": "#/$defs/Ref"
261
+ }
262
+ },
263
+ "selectedOfferRef": {
264
+ "$ref": "#/$defs/Ref"
265
+ },
266
+ "verifiedOffer": {
267
+ "$ref": "#/$defs/VerifiedOffer"
268
+ },
269
+ "capabilities": {
270
+ "type": "object",
271
+ "additionalProperties": false,
272
+ "required": [
273
+ "surface",
274
+ "allowedActions"
275
+ ],
276
+ "properties": {
277
+ "surface": {
278
+ "$ref": "#/$defs/Surface"
279
+ },
280
+ "allowedActions": {
281
+ "type": "array",
282
+ "minItems": 1,
283
+ "maxItems": 12,
284
+ "uniqueItems": true,
285
+ "items": {
286
+ "$ref": "#/$defs/Kind"
287
+ }
288
+ }
289
+ }
290
+ }
291
+ }
292
+ },
293
+ "IngressWorkspace": {
294
+ "type": "object",
295
+ "additionalProperties": false,
296
+ "required": [
297
+ "schemaVersion",
298
+ "revision",
299
+ "locale",
300
+ "currency",
301
+ "searchDraft",
302
+ "results",
303
+ "visibleHotels",
304
+ "loadedOffers",
305
+ "shortlistedOfferRefs"
306
+ ],
307
+ "properties": {
308
+ "schemaVersion": {
309
+ "const": "booking.surface"
310
+ },
311
+ "revision": {
312
+ "type": "integer",
313
+ "minimum": 0
314
+ },
315
+ "locale": {
316
+ "type": "string",
317
+ "minLength": 1,
318
+ "maxLength": 64
319
+ },
320
+ "currency": {
321
+ "type": "string",
322
+ "pattern": "^[A-Z]{3}$"
323
+ },
324
+ "searchDraft": {
325
+ "$ref": "#/$defs/SearchDraftSnapshot"
326
+ },
327
+ "results": {
328
+ "$ref": "#/$defs/ResultViewSnapshot"
329
+ },
330
+ "visibleHotels": {
331
+ "type": "array",
332
+ "maxItems": 100,
333
+ "items": {
334
+ "$ref": "#/$defs/VisibleHotelFact"
335
+ }
336
+ },
337
+ "loadedOffers": {
338
+ "type": "array",
339
+ "maxItems": 200,
340
+ "items": {
341
+ "$ref": "#/$defs/LoadedOffer"
342
+ }
343
+ },
344
+ "focusedHotelRef": {
345
+ "$ref": "#/$defs/Ref"
346
+ },
347
+ "shortlistedOfferRefs": {
348
+ "type": "array",
349
+ "maxItems": 100,
350
+ "uniqueItems": true,
351
+ "items": {
352
+ "$ref": "#/$defs/Ref"
353
+ }
354
+ },
355
+ "selectedOfferRef": {
356
+ "$ref": "#/$defs/Ref"
357
+ }
358
+ }
359
+ },
360
+ "PresentationKey": {
361
+ "type": "string",
362
+ "minLength": 1,
363
+ "maxLength": 512
364
+ },
365
+ "RequestKey": {
366
+ "type": "string",
367
+ "minLength": 8,
368
+ "maxLength": 128,
369
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9:._-]{7,127}$"
370
+ },
371
+ "ApprovalRef": {
372
+ "type": "object",
373
+ "additionalProperties": false,
374
+ "required": [
375
+ "approvalId",
376
+ "blockerId",
377
+ "contextRef",
378
+ "sourceTurnId",
379
+ "presentationRequestKey",
380
+ "sourceActionId",
381
+ "targetActionId",
382
+ "sourceRevision",
383
+ "targetActionKind",
384
+ "to",
385
+ "expiresAt",
386
+ "nonce",
387
+ "sourceReceiptDigest",
388
+ "scope",
389
+ "code",
390
+ "criterionPath",
391
+ "valueDigest"
392
+ ],
393
+ "properties": {
394
+ "approvalId": {
395
+ "$ref": "#/$defs/Ref"
396
+ },
397
+ "blockerId": {
398
+ "$ref": "#/$defs/Ref"
399
+ },
400
+ "contextRef": {
401
+ "$ref": "#/$defs/Ref"
402
+ },
403
+ "sourceTurnId": {
404
+ "$ref": "#/$defs/Ref"
405
+ },
406
+ "presentationRequestKey": {
407
+ "$ref": "#/$defs/PresentationKey"
408
+ },
409
+ "sourceActionId": {
410
+ "$ref": "#/$defs/Ref"
411
+ },
412
+ "targetActionId": {
413
+ "$ref": "#/$defs/Ref"
414
+ },
415
+ "sourceRevision": {
416
+ "type": "integer",
417
+ "minimum": 0
418
+ },
419
+ "targetActionKind": {
420
+ "$ref": "#/$defs/Kind"
421
+ },
422
+ "to": {
423
+ "enum": [
424
+ "prefer",
425
+ "drop"
426
+ ]
427
+ },
428
+ "expiresAt": {
429
+ "type": "string",
430
+ "minLength": 1
431
+ },
432
+ "nonce": {
433
+ "$ref": "#/$defs/Ref"
434
+ },
435
+ "sourceReceiptDigest": {
436
+ "$ref": "#/$defs/Hex64"
437
+ },
438
+ "scope": {
439
+ "enum": [
440
+ "search",
441
+ "offer",
442
+ "availability",
443
+ "checkout"
444
+ ]
445
+ },
446
+ "code": {
447
+ "enum": [
448
+ "no_hotels_matched",
449
+ "hotel_not_visible",
450
+ "hotel_rates_failed",
451
+ "criterion_must_not_met",
452
+ "offer_target_not_reached",
453
+ "offer_unavailable"
454
+ ]
455
+ },
456
+ "criterionPath": {
457
+ "type": "string",
458
+ "pattern": "^(searchDraft|results|offers|checkout)(\\.[A-Za-z][A-Za-z0-9_]*){0,3}$",
459
+ "maxLength": 160
460
+ },
461
+ "valueDigest": {
462
+ "$ref": "#/$defs/Hex64"
463
+ }
464
+ }
465
+ },
466
+ "ActionBase": {
467
+ "type": "object",
468
+ "additionalProperties": false,
469
+ "required": [
470
+ "schemaVersion",
471
+ "kind",
472
+ "actionId",
473
+ "contextRef",
474
+ "expectedRevision",
475
+ "reason",
476
+ "factRefs",
477
+ "input"
478
+ ],
479
+ "properties": {
480
+ "schemaVersion": {
481
+ "const": "booking.surface"
482
+ },
483
+ "kind": {
484
+ "$ref": "#/$defs/Kind"
485
+ },
486
+ "actionId": {
487
+ "$ref": "#/$defs/Ref"
488
+ },
489
+ "contextRef": {
490
+ "$ref": "#/$defs/Ref"
491
+ },
492
+ "expectedRevision": {
493
+ "type": "integer",
494
+ "minimum": 0
495
+ },
496
+ "reason": {
497
+ "type": "string",
498
+ "minLength": 1,
499
+ "maxLength": 1000
500
+ },
501
+ "factRefs": {
502
+ "type": "array",
503
+ "maxItems": 64,
504
+ "uniqueItems": true,
505
+ "items": {
506
+ "$ref": "#/$defs/Ref"
507
+ }
508
+ },
509
+ "input": {
510
+ "type": "object"
511
+ },
512
+ "relaxationApprovalRef": {
513
+ "$ref": "#/$defs/ApprovalRef"
514
+ }
515
+ }
516
+ },
517
+ "Action": {
518
+ "oneOf": [
519
+ {
520
+ "allOf": [
521
+ {
522
+ "$ref": "#/$defs/ActionBase"
523
+ },
524
+ {
525
+ "type": "object",
526
+ "properties": {
527
+ "kind": {
528
+ "const": "search.patch"
529
+ },
530
+ "input": {
531
+ "$ref": "#/$defs/SearchPatchInput"
532
+ }
533
+ }
534
+ }
535
+ ]
536
+ },
537
+ {
538
+ "allOf": [
539
+ {
540
+ "$ref": "#/$defs/ActionBase"
541
+ },
542
+ {
543
+ "type": "object",
544
+ "properties": {
545
+ "kind": {
546
+ "const": "search.run"
547
+ },
548
+ "input": {
549
+ "$ref": "#/$defs/SearchRunInput"
550
+ }
551
+ }
552
+ }
553
+ ]
554
+ },
555
+ {
556
+ "allOf": [
557
+ {
558
+ "$ref": "#/$defs/ActionBase"
559
+ },
560
+ {
561
+ "type": "object",
562
+ "properties": {
563
+ "kind": {
564
+ "const": "results.view.patch"
565
+ },
566
+ "input": {
567
+ "$ref": "#/$defs/ResultsViewPatchInput"
568
+ }
569
+ }
570
+ }
571
+ ]
572
+ },
573
+ {
574
+ "allOf": [
575
+ {
576
+ "$ref": "#/$defs/ActionBase"
577
+ },
578
+ {
579
+ "type": "object",
580
+ "properties": {
581
+ "kind": {
582
+ "const": "hotel.focus"
583
+ },
584
+ "input": {
585
+ "$ref": "#/$defs/HotelFocusInput"
586
+ }
587
+ }
588
+ }
589
+ ]
590
+ },
591
+ {
592
+ "allOf": [
593
+ {
594
+ "$ref": "#/$defs/ActionBase"
595
+ },
596
+ {
597
+ "type": "object",
598
+ "properties": {
599
+ "kind": {
600
+ "const": "hotel.select"
601
+ },
602
+ "input": {
603
+ "$ref": "#/$defs/HotelSelectInput"
604
+ }
605
+ }
606
+ }
607
+ ]
608
+ },
609
+ {
610
+ "allOf": [
611
+ {
612
+ "$ref": "#/$defs/ActionBase"
613
+ },
614
+ {
615
+ "type": "object",
616
+ "properties": {
617
+ "kind": {
618
+ "const": "offers.query"
619
+ },
620
+ "input": {
621
+ "$ref": "#/$defs/OffersQueryInput"
622
+ }
623
+ }
624
+ }
625
+ ]
626
+ },
627
+ {
628
+ "allOf": [
629
+ {
630
+ "$ref": "#/$defs/ActionBase"
631
+ },
632
+ {
633
+ "type": "object",
634
+ "properties": {
635
+ "kind": {
636
+ "const": "offers.view.patch"
637
+ },
638
+ "input": {
639
+ "$ref": "#/$defs/OffersViewPatchInput"
640
+ }
641
+ }
642
+ }
643
+ ]
644
+ },
645
+ {
646
+ "allOf": [
647
+ {
648
+ "$ref": "#/$defs/ActionBase"
649
+ },
650
+ {
651
+ "type": "object",
652
+ "properties": {
653
+ "kind": {
654
+ "const": "offers.compare"
655
+ },
656
+ "input": {
657
+ "$ref": "#/$defs/OffersCompareInput"
658
+ }
659
+ }
660
+ }
661
+ ]
662
+ },
663
+ {
664
+ "allOf": [
665
+ {
666
+ "$ref": "#/$defs/ActionBase"
667
+ },
668
+ {
669
+ "type": "object",
670
+ "properties": {
671
+ "kind": {
672
+ "const": "offer.select"
673
+ },
674
+ "input": {
675
+ "$ref": "#/$defs/OfferVersionInput"
676
+ }
677
+ }
678
+ }
679
+ ]
680
+ },
681
+ {
682
+ "allOf": [
683
+ {
684
+ "$ref": "#/$defs/ActionBase"
685
+ },
686
+ {
687
+ "type": "object",
688
+ "properties": {
689
+ "kind": {
690
+ "const": "offer.check"
691
+ },
692
+ "input": {
693
+ "$ref": "#/$defs/OfferVersionInput"
694
+ }
695
+ }
696
+ }
697
+ ]
698
+ },
699
+ {
700
+ "allOf": [
701
+ {
702
+ "$ref": "#/$defs/ActionBase"
703
+ },
704
+ {
705
+ "type": "object",
706
+ "properties": {
707
+ "kind": {
708
+ "const": "checkout.prepare"
709
+ },
710
+ "input": {
711
+ "$ref": "#/$defs/CheckoutPrepareVersionInput"
712
+ }
713
+ }
714
+ }
715
+ ]
716
+ },
717
+ {
718
+ "allOf": [
719
+ {
720
+ "$ref": "#/$defs/ActionBase"
721
+ },
722
+ {
723
+ "type": "object",
724
+ "properties": {
725
+ "kind": {
726
+ "const": "order.observe"
727
+ },
728
+ "input": {
729
+ "$ref": "#/$defs/OrderObserveInput"
730
+ }
731
+ }
732
+ }
733
+ ]
734
+ }
735
+ ]
736
+ },
737
+ "Approval": {
738
+ "type": "object",
739
+ "additionalProperties": false,
740
+ "required": [
741
+ "taskId",
742
+ "contextRef",
743
+ "sourceTurnId",
744
+ "presentationRequestKey",
745
+ "optionDigest",
746
+ "approvalId",
747
+ "deliveryNonce",
748
+ "blockerId",
749
+ "sourceActionId",
750
+ "sourceReceiptDigest",
751
+ "scope",
752
+ "code",
753
+ "criterionPath",
754
+ "valueDigest",
755
+ "from",
756
+ "to",
757
+ "approved"
758
+ ],
759
+ "properties": {
760
+ "taskId": {
761
+ "$ref": "#/$defs/Ref"
762
+ },
763
+ "contextRef": {
764
+ "$ref": "#/$defs/Ref"
765
+ },
766
+ "sourceTurnId": {
767
+ "$ref": "#/$defs/Ref"
768
+ },
769
+ "presentationRequestKey": {
770
+ "$ref": "#/$defs/PresentationKey"
771
+ },
772
+ "optionDigest": {
773
+ "$ref": "#/$defs/Hex64"
774
+ },
775
+ "approvalId": {
776
+ "$ref": "#/$defs/Ref"
777
+ },
778
+ "deliveryNonce": {
779
+ "$ref": "#/$defs/Ref"
780
+ },
781
+ "blockerId": {
782
+ "$ref": "#/$defs/Ref"
783
+ },
784
+ "sourceActionId": {
785
+ "$ref": "#/$defs/Ref"
786
+ },
787
+ "sourceReceiptDigest": {
788
+ "$ref": "#/$defs/Hex64"
789
+ },
790
+ "scope": {
791
+ "enum": [
792
+ "search",
793
+ "offer",
794
+ "availability",
795
+ "checkout"
796
+ ]
797
+ },
798
+ "code": {
799
+ "enum": [
800
+ "no_hotels_matched",
801
+ "hotel_not_visible",
802
+ "hotel_rates_failed",
803
+ "criterion_must_not_met",
804
+ "offer_target_not_reached",
805
+ "offer_unavailable"
806
+ ]
807
+ },
808
+ "criterionPath": {
809
+ "type": "string",
810
+ "pattern": "^(searchDraft|results|offers|checkout)(\\.[A-Za-z][A-Za-z0-9_]*){0,3}$",
811
+ "maxLength": 160
812
+ },
813
+ "valueDigest": {
814
+ "$ref": "#/$defs/Hex64"
815
+ },
816
+ "from": {
817
+ "const": "must"
818
+ },
819
+ "to": {
820
+ "enum": [
821
+ "prefer",
822
+ "drop"
823
+ ]
824
+ },
825
+ "approved": {
826
+ "const": true
827
+ }
828
+ }
829
+ },
830
+ "Blocker": {
831
+ "type": "object",
832
+ "additionalProperties": false,
833
+ "required": [
834
+ "blockerId",
835
+ "sourceActionId",
836
+ "sourceReceiptDigest",
837
+ "scope",
838
+ "code",
839
+ "criterionPath",
840
+ "strength",
841
+ "valueDigest",
842
+ "evidence"
843
+ ],
844
+ "properties": {
845
+ "blockerId": {
846
+ "$ref": "#/$defs/Ref"
847
+ },
848
+ "sourceActionId": {
849
+ "$ref": "#/$defs/Ref"
850
+ },
851
+ "sourceReceiptDigest": {
852
+ "$ref": "#/$defs/Hex64"
853
+ },
854
+ "scope": {
855
+ "enum": [
856
+ "search",
857
+ "offer",
858
+ "availability",
859
+ "checkout"
860
+ ]
861
+ },
862
+ "code": {
863
+ "enum": [
864
+ "no_hotels_matched",
865
+ "hotel_not_visible",
866
+ "hotel_rates_failed",
867
+ "criterion_must_not_met",
868
+ "offer_target_not_reached",
869
+ "offer_unavailable"
870
+ ]
871
+ },
872
+ "criterionPath": {
873
+ "type": "string",
874
+ "pattern": "^(searchDraft|results|offers|checkout)(\\.[A-Za-z][A-Za-z0-9_]*){0,3}$",
875
+ "maxLength": 160
876
+ },
877
+ "strength": {
878
+ "const": "must"
879
+ },
880
+ "valueDigest": {
881
+ "$ref": "#/$defs/Hex64"
882
+ },
883
+ "valueLabel": {
884
+ "type": "string",
885
+ "minLength": 1,
886
+ "maxLength": 120
887
+ },
888
+ "evidence": {
889
+ "type": "object",
890
+ "additionalProperties": false,
891
+ "required": [
892
+ "factRefs",
893
+ "gapCodes"
894
+ ],
895
+ "properties": {
896
+ "factRefs": {
897
+ "type": "array",
898
+ "minItems": 1,
899
+ "maxItems": 32,
900
+ "uniqueItems": true,
901
+ "items": {
902
+ "$ref": "#/$defs/Ref"
903
+ }
904
+ },
905
+ "gapCodes": {
906
+ "$ref": "#/$defs/Codes"
907
+ },
908
+ "requested": {
909
+ "type": "integer",
910
+ "minimum": 0
911
+ },
912
+ "actual": {
913
+ "type": "integer",
914
+ "minimum": 0
915
+ }
916
+ }
917
+ }
918
+ }
919
+ },
920
+ "Result": {
921
+ "type": "object",
922
+ "additionalProperties": false,
923
+ "required": [
924
+ "outcome",
925
+ "hardCriteriaMet",
926
+ "factRefs",
927
+ "gapCodes",
928
+ "blockers",
929
+ "relaxationsApplied"
930
+ ],
931
+ "properties": {
932
+ "outcome": {
933
+ "enum": [
934
+ "complete",
935
+ "partial",
936
+ "empty"
937
+ ]
938
+ },
939
+ "requestedCount": {
940
+ "type": "integer",
941
+ "minimum": 0
942
+ },
943
+ "actualCount": {
944
+ "type": "integer",
945
+ "minimum": 0
946
+ },
947
+ "hardCriteriaMet": {
948
+ "type": "boolean"
949
+ },
950
+ "factRefs": {
951
+ "type": "array",
952
+ "maxItems": 64,
953
+ "uniqueItems": true,
954
+ "items": {
955
+ "$ref": "#/$defs/Ref"
956
+ }
957
+ },
958
+ "gapCodes": {
959
+ "$ref": "#/$defs/Codes"
960
+ },
961
+ "blockers": {
962
+ "type": "array",
963
+ "maxItems": 8,
964
+ "items": {
965
+ "$ref": "#/$defs/Blocker"
966
+ }
967
+ },
968
+ "relaxationsApplied": {
969
+ "type": "array",
970
+ "maxItems": 1,
971
+ "items": {
972
+ "$ref": "#/$defs/Approval"
973
+ }
974
+ }
975
+ }
976
+ },
977
+ "Observation": {
978
+ "oneOf": [
979
+ {
980
+ "type": "object",
981
+ "additionalProperties": false,
982
+ "required": [
983
+ "kind"
984
+ ],
985
+ "properties": {
986
+ "kind": {
987
+ "const": "search.state"
988
+ },
989
+ "searchSessionRef": {
990
+ "$ref": "#/$defs/Ref"
991
+ },
992
+ "resultCount": {
993
+ "type": "integer",
994
+ "minimum": 0
995
+ },
996
+ "gapCodes": {
997
+ "$ref": "#/$defs/Codes"
998
+ }
999
+ }
1000
+ },
1001
+ {
1002
+ "type": "object",
1003
+ "additionalProperties": false,
1004
+ "required": [
1005
+ "kind",
1006
+ "matchedHotelRefs",
1007
+ "visibleCount"
1008
+ ],
1009
+ "properties": {
1010
+ "kind": {
1011
+ "const": "results.state"
1012
+ },
1013
+ "matchedHotelRefs": {
1014
+ "type": "array",
1015
+ "maxItems": 100,
1016
+ "items": {
1017
+ "$ref": "#/$defs/Ref"
1018
+ }
1019
+ },
1020
+ "visibleCount": {
1021
+ "type": "integer",
1022
+ "minimum": 0
1023
+ },
1024
+ "gapCodes": {
1025
+ "$ref": "#/$defs/Codes"
1026
+ }
1027
+ }
1028
+ },
1029
+ {
1030
+ "type": "object",
1031
+ "additionalProperties": false,
1032
+ "required": [
1033
+ "kind",
1034
+ "hotelRef"
1035
+ ],
1036
+ "properties": {
1037
+ "kind": {
1038
+ "enum": [
1039
+ "hotel.focus",
1040
+ "hotel.selection"
1041
+ ]
1042
+ },
1043
+ "hotelRef": {
1044
+ "$ref": "#/$defs/Ref"
1045
+ }
1046
+ }
1047
+ },
1048
+ {
1049
+ "type": "object",
1050
+ "additionalProperties": false,
1051
+ "required": [
1052
+ "kind",
1053
+ "hotelRefs",
1054
+ "offerRefs",
1055
+ "loadedHotelCount"
1056
+ ],
1057
+ "properties": {
1058
+ "kind": {
1059
+ "const": "offers.state"
1060
+ },
1061
+ "hotelRefs": {
1062
+ "type": "array",
1063
+ "maxItems": 100,
1064
+ "items": {
1065
+ "$ref": "#/$defs/Ref"
1066
+ }
1067
+ },
1068
+ "offerRefs": {
1069
+ "type": "array",
1070
+ "maxItems": 200,
1071
+ "items": {
1072
+ "$ref": "#/$defs/Ref"
1073
+ }
1074
+ },
1075
+ "loadedHotelCount": {
1076
+ "type": "integer",
1077
+ "minimum": 0
1078
+ },
1079
+ "gapCodes": {
1080
+ "$ref": "#/$defs/Codes"
1081
+ }
1082
+ }
1083
+ },
1084
+ {
1085
+ "type": "object",
1086
+ "additionalProperties": false,
1087
+ "required": [
1088
+ "kind",
1089
+ "offerRef",
1090
+ "checkedOfferVersionRef",
1091
+ "available",
1092
+ "changedFactRefs"
1093
+ ],
1094
+ "properties": {
1095
+ "kind": {
1096
+ "const": "offer.availability"
1097
+ },
1098
+ "offerRef": {
1099
+ "$ref": "#/$defs/Ref"
1100
+ },
1101
+ "checkedOfferVersionRef": {
1102
+ "$ref": "#/$defs/Ref"
1103
+ },
1104
+ "currentOfferVersionRef": {
1105
+ "$ref": "#/$defs/Ref"
1106
+ },
1107
+ "verifiedOfferRef": {
1108
+ "$ref": "#/$defs/Ref"
1109
+ },
1110
+ "available": {
1111
+ "type": "boolean"
1112
+ },
1113
+ "changedFactRefs": {
1114
+ "type": "array",
1115
+ "maxItems": 64,
1116
+ "items": {
1117
+ "$ref": "#/$defs/Ref"
1118
+ }
1119
+ },
1120
+ "gapCodes": {
1121
+ "$ref": "#/$defs/Codes"
1122
+ }
1123
+ }
1124
+ },
1125
+ {
1126
+ "type": "object",
1127
+ "additionalProperties": false,
1128
+ "required": [
1129
+ "kind",
1130
+ "code",
1131
+ "factRefs"
1132
+ ],
1133
+ "properties": {
1134
+ "kind": {
1135
+ "const": "gap"
1136
+ },
1137
+ "code": {
1138
+ "enum": [
1139
+ "byos_mapped_risk",
1140
+ "check_avail_failed",
1141
+ "check_avail_unverified",
1142
+ "component_executor_unavailable",
1143
+ "hotel_not_visible",
1144
+ "hotel_rates_failed",
1145
+ "offer_facts_changed",
1146
+ "offer_not_loaded",
1147
+ "offer_unavailable",
1148
+ "order_not_found",
1149
+ "order_outcome_not_observed",
1150
+ "order_state_unknown",
1151
+ "order_status_unavailable",
1152
+ "requested_offers_not_loaded",
1153
+ "search_failed",
1154
+ "search_form_invalid",
1155
+ "search_session_expired",
1156
+ "search_terminal_timeout",
1157
+ "stale_revision",
1158
+ "surface_adapter_failed",
1159
+ "undo_token_not_found",
1160
+ "unhandled",
1161
+ "unsupported",
1162
+ "verified_offer_required",
1163
+ "workspace_changed_during_action",
1164
+ "criterion_must_not_met",
1165
+ "no_hotels_matched",
1166
+ "offer_target_not_reached"
1167
+ ]
1168
+ },
1169
+ "factRefs": {
1170
+ "type": "array",
1171
+ "maxItems": 64,
1172
+ "items": {
1173
+ "$ref": "#/$defs/Ref"
1174
+ }
1175
+ }
1176
+ }
1177
+ }
1178
+ ]
1179
+ },
1180
+ "OfferSelectionObservation": {
1181
+ "type": "object",
1182
+ "additionalProperties": false,
1183
+ "required": [
1184
+ "kind",
1185
+ "offerRef",
1186
+ "offerVersionRef"
1187
+ ],
1188
+ "properties": {
1189
+ "kind": {
1190
+ "const": "offer.selection"
1191
+ },
1192
+ "offerRef": {
1193
+ "$ref": "#/$defs/Ref"
1194
+ },
1195
+ "offerVersionRef": {
1196
+ "$ref": "#/$defs/Ref"
1197
+ }
1198
+ }
1199
+ },
1200
+ "HandoffObservation": {
1201
+ "type": "object",
1202
+ "additionalProperties": false,
1203
+ "required": [
1204
+ "kind",
1205
+ "offerRef",
1206
+ "offerVersionRef",
1207
+ "verifiedOfferRef",
1208
+ "handoffRef"
1209
+ ],
1210
+ "properties": {
1211
+ "kind": {
1212
+ "const": "checkout.handoff"
1213
+ },
1214
+ "offerRef": {
1215
+ "$ref": "#/$defs/Ref"
1216
+ },
1217
+ "offerVersionRef": {
1218
+ "$ref": "#/$defs/Ref"
1219
+ },
1220
+ "verifiedOfferRef": {
1221
+ "$ref": "#/$defs/Ref"
1222
+ },
1223
+ "handoffRef": {
1224
+ "$ref": "#/$defs/Ref"
1225
+ }
1226
+ }
1227
+ },
1228
+ "OrderObservation": {
1229
+ "type": "object",
1230
+ "additionalProperties": false,
1231
+ "required": [
1232
+ "kind",
1233
+ "orderRef",
1234
+ "state"
1235
+ ],
1236
+ "properties": {
1237
+ "kind": {
1238
+ "const": "order.state"
1239
+ },
1240
+ "orderRef": {
1241
+ "$ref": "#/$defs/Ref"
1242
+ },
1243
+ "state": {
1244
+ "enum": [
1245
+ "pending",
1246
+ "verified",
1247
+ "failed",
1248
+ "unknown"
1249
+ ]
1250
+ },
1251
+ "gapCodes": {
1252
+ "$ref": "#/$defs/Codes"
1253
+ }
1254
+ }
1255
+ },
1256
+ "ObservationExpanded": {
1257
+ "oneOf": [
1258
+ {
1259
+ "$ref": "#/$defs/Observation"
1260
+ },
1261
+ {
1262
+ "$ref": "#/$defs/OfferSelectionObservation"
1263
+ },
1264
+ {
1265
+ "$ref": "#/$defs/HandoffObservation"
1266
+ },
1267
+ {
1268
+ "$ref": "#/$defs/OrderObservation"
1269
+ }
1270
+ ]
1271
+ },
1272
+ "Receipt": {
1273
+ "type": "object",
1274
+ "additionalProperties": false,
1275
+ "required": [
1276
+ "schemaVersion",
1277
+ "kind",
1278
+ "actionId",
1279
+ "contextRef",
1280
+ "status",
1281
+ "revision",
1282
+ "observation",
1283
+ "resultContract"
1284
+ ],
1285
+ "properties": {
1286
+ "schemaVersion": {
1287
+ "const": "booking.surface"
1288
+ },
1289
+ "kind": {
1290
+ "const": "action.receipt"
1291
+ },
1292
+ "actionId": {
1293
+ "$ref": "#/$defs/Ref"
1294
+ },
1295
+ "contextRef": {
1296
+ "$ref": "#/$defs/Ref"
1297
+ },
1298
+ "status": {
1299
+ "enum": [
1300
+ "applied",
1301
+ "needs_input",
1302
+ "partial",
1303
+ "no_match",
1304
+ "unavailable",
1305
+ "changed",
1306
+ "stale",
1307
+ "unsupported",
1308
+ "failed"
1309
+ ]
1310
+ },
1311
+ "revision": {
1312
+ "type": "integer",
1313
+ "minimum": 0
1314
+ },
1315
+ "observation": {
1316
+ "$ref": "#/$defs/ObservationExpanded"
1317
+ },
1318
+ "resultContract": {
1319
+ "$ref": "#/$defs/Result"
1320
+ },
1321
+ "undoToken": {
1322
+ "$ref": "#/$defs/Ref"
1323
+ }
1324
+ }
1325
+ },
1326
+ "Ingress": {
1327
+ "type": "object",
1328
+ "additionalProperties": false,
1329
+ "required": [
1330
+ "schemaVersion",
1331
+ "kind",
1332
+ "requestKey",
1333
+ "surfaceHint",
1334
+ "workspace",
1335
+ "request"
1336
+ ],
1337
+ "properties": {
1338
+ "schemaVersion": {
1339
+ "const": "booking.surface"
1340
+ },
1341
+ "kind": {
1342
+ "const": "user.turn.ingress"
1343
+ },
1344
+ "requestKey": {
1345
+ "$ref": "#/$defs/RequestKey"
1346
+ },
1347
+ "taskHandle": {
1348
+ "$ref": "#/$defs/Ref"
1349
+ },
1350
+ "surfaceHint": {
1351
+ "$ref": "#/$defs/Surface"
1352
+ },
1353
+ "workspace": {
1354
+ "$ref": "#/$defs/IngressWorkspace"
1355
+ },
1356
+ "request": {
1357
+ "type": "object",
1358
+ "additionalProperties": false,
1359
+ "required": [
1360
+ "text"
1361
+ ],
1362
+ "properties": {
1363
+ "text": {
1364
+ "type": "string",
1365
+ "minLength": 1,
1366
+ "maxLength": 4000
1367
+ },
1368
+ "approval": {
1369
+ "$ref": "#/$defs/Approval"
1370
+ }
1371
+ }
1372
+ }
1373
+ }
1374
+ },
1375
+ "UserTurn": {
1376
+ "type": "object",
1377
+ "additionalProperties": false,
1378
+ "required": [
1379
+ "schemaVersion",
1380
+ "kind",
1381
+ "taskId",
1382
+ "turnId",
1383
+ "workspace",
1384
+ "request"
1385
+ ],
1386
+ "properties": {
1387
+ "schemaVersion": {
1388
+ "const": "booking.surface"
1389
+ },
1390
+ "kind": {
1391
+ "const": "user.turn"
1392
+ },
1393
+ "taskId": {
1394
+ "$ref": "#/$defs/Ref"
1395
+ },
1396
+ "turnId": {
1397
+ "$ref": "#/$defs/Ref"
1398
+ },
1399
+ "workspace": {
1400
+ "$ref": "#/$defs/Workspace"
1401
+ },
1402
+ "request": {
1403
+ "type": "object",
1404
+ "additionalProperties": false,
1405
+ "required": [
1406
+ "text"
1407
+ ],
1408
+ "properties": {
1409
+ "text": {
1410
+ "type": "string",
1411
+ "minLength": 1,
1412
+ "maxLength": 4000
1413
+ },
1414
+ "approval": {
1415
+ "$ref": "#/$defs/Approval"
1416
+ }
1417
+ }
1418
+ }
1419
+ }
1420
+ },
1421
+ "Continuation": {
1422
+ "type": "object",
1423
+ "additionalProperties": false,
1424
+ "required": [
1425
+ "schemaVersion",
1426
+ "kind",
1427
+ "taskId",
1428
+ "workspace",
1429
+ "receipt"
1430
+ ],
1431
+ "properties": {
1432
+ "schemaVersion": {
1433
+ "const": "booking.surface"
1434
+ },
1435
+ "kind": {
1436
+ "const": "action.receipt.continuation"
1437
+ },
1438
+ "taskId": {
1439
+ "$ref": "#/$defs/Ref"
1440
+ },
1441
+ "workspace": {
1442
+ "$ref": "#/$defs/Workspace"
1443
+ },
1444
+ "receipt": {
1445
+ "$ref": "#/$defs/Receipt"
1446
+ }
1447
+ }
1448
+ },
1449
+ "Event": {
1450
+ "oneOf": [
1451
+ {
1452
+ "$ref": "#/$defs/StatusEvent"
1453
+ },
1454
+ {
1455
+ "$ref": "#/$defs/QuestionEvent"
1456
+ },
1457
+ {
1458
+ "$ref": "#/$defs/OperationEvent"
1459
+ },
1460
+ {
1461
+ "$ref": "#/$defs/ExplanationEvent"
1462
+ },
1463
+ {
1464
+ "$ref": "#/$defs/TerminalEvent"
1465
+ },
1466
+ {
1467
+ "$ref": "#/$defs/ErrorEvent"
1468
+ }
1469
+ ]
1470
+ },
1471
+ "EventBase": {
1472
+ "type": "object",
1473
+ "required": [
1474
+ "schemaVersion",
1475
+ "eventId",
1476
+ "taskId",
1477
+ "contextRef",
1478
+ "sequence",
1479
+ "emittedAt",
1480
+ "kind"
1481
+ ],
1482
+ "properties": {
1483
+ "schemaVersion": {
1484
+ "const": "booking.surface"
1485
+ },
1486
+ "eventId": {
1487
+ "$ref": "#/$defs/Ref"
1488
+ },
1489
+ "taskId": {
1490
+ "$ref": "#/$defs/Ref"
1491
+ },
1492
+ "contextRef": {
1493
+ "$ref": "#/$defs/Ref"
1494
+ },
1495
+ "sequence": {
1496
+ "type": "integer",
1497
+ "minimum": 1
1498
+ },
1499
+ "emittedAt": {
1500
+ "type": "string",
1501
+ "minLength": 1
1502
+ },
1503
+ "kind": {
1504
+ "enum": [
1505
+ "status",
1506
+ "question",
1507
+ "operation",
1508
+ "explanation",
1509
+ "terminal",
1510
+ "error"
1511
+ ]
1512
+ }
1513
+ }
1514
+ },
1515
+ "StatusEvent": {
1516
+ "type": "object",
1517
+ "allOf": [
1518
+ {
1519
+ "$ref": "#/$defs/EventBase"
1520
+ },
1521
+ {
1522
+ "type": "object",
1523
+ "required": [
1524
+ "kind",
1525
+ "status"
1526
+ ],
1527
+ "properties": {
1528
+ "kind": {
1529
+ "const": "status"
1530
+ },
1531
+ "status": {
1532
+ "enum": [
1533
+ "submitted",
1534
+ "working",
1535
+ "waiting_receipt",
1536
+ "input_required"
1537
+ ]
1538
+ }
1539
+ }
1540
+ }
1541
+ ],
1542
+ "unevaluatedProperties": false
1543
+ },
1544
+ "QuestionEvent": {
1545
+ "type": "object",
1546
+ "additionalProperties": false,
1547
+ "required": [
1548
+ "schemaVersion",
1549
+ "eventId",
1550
+ "taskId",
1551
+ "contextRef",
1552
+ "sequence",
1553
+ "emittedAt",
1554
+ "kind",
1555
+ "question"
1556
+ ],
1557
+ "properties": {
1558
+ "schemaVersion": {
1559
+ "const": "booking.surface"
1560
+ },
1561
+ "eventId": {
1562
+ "$ref": "#/$defs/Ref"
1563
+ },
1564
+ "taskId": {
1565
+ "$ref": "#/$defs/Ref"
1566
+ },
1567
+ "contextRef": {
1568
+ "$ref": "#/$defs/Ref"
1569
+ },
1570
+ "sequence": {
1571
+ "type": "integer",
1572
+ "minimum": 1
1573
+ },
1574
+ "emittedAt": {
1575
+ "type": "string",
1576
+ "minLength": 1
1577
+ },
1578
+ "kind": {
1579
+ "const": "question"
1580
+ },
1581
+ "question": {
1582
+ "type": "object",
1583
+ "additionalProperties": false,
1584
+ "required": [
1585
+ "questionId",
1586
+ "prompt",
1587
+ "missingFields",
1588
+ "type",
1589
+ "blocker",
1590
+ "approvalOptions"
1591
+ ],
1592
+ "properties": {
1593
+ "questionId": {
1594
+ "$ref": "#/$defs/Ref"
1595
+ },
1596
+ "prompt": {
1597
+ "type": "string",
1598
+ "minLength": 1
1599
+ },
1600
+ "missingFields": {
1601
+ "type": "array",
1602
+ "maxItems": 32,
1603
+ "items": {
1604
+ "type": "string"
1605
+ }
1606
+ },
1607
+ "type": {
1608
+ "const": "relaxation_approval_required"
1609
+ },
1610
+ "blocker": {
1611
+ "$ref": "#/$defs/Blocker"
1612
+ },
1613
+ "approvalOptions": {
1614
+ "type": "array",
1615
+ "minItems": 1,
1616
+ "maxItems": 2,
1617
+ "items": {
1618
+ "type": "object",
1619
+ "additionalProperties": false,
1620
+ "required": [
1621
+ "approval"
1622
+ ],
1623
+ "properties": {
1624
+ "approval": {
1625
+ "$ref": "#/$defs/Approval"
1626
+ }
1627
+ }
1628
+ }
1629
+ }
1630
+ }
1631
+ }
1632
+ }
1633
+ },
1634
+ "OperationEvent": {
1635
+ "type": "object",
1636
+ "allOf": [
1637
+ {
1638
+ "$ref": "#/$defs/EventBase"
1639
+ },
1640
+ {
1641
+ "type": "object",
1642
+ "required": [
1643
+ "kind",
1644
+ "action"
1645
+ ],
1646
+ "properties": {
1647
+ "kind": {
1648
+ "const": "operation"
1649
+ },
1650
+ "action": {
1651
+ "$ref": "#/$defs/Action"
1652
+ }
1653
+ }
1654
+ }
1655
+ ],
1656
+ "unevaluatedProperties": false
1657
+ },
1658
+ "ExplanationEvent": {
1659
+ "type": "object",
1660
+ "allOf": [
1661
+ {
1662
+ "$ref": "#/$defs/EventBase"
1663
+ },
1664
+ {
1665
+ "type": "object",
1666
+ "required": [
1667
+ "kind",
1668
+ "explanation"
1669
+ ],
1670
+ "properties": {
1671
+ "kind": {
1672
+ "const": "explanation"
1673
+ },
1674
+ "explanation": {
1675
+ "type": "object",
1676
+ "additionalProperties": false,
1677
+ "required": [
1678
+ "text",
1679
+ "factRefs"
1680
+ ],
1681
+ "properties": {
1682
+ "text": {
1683
+ "type": "string",
1684
+ "minLength": 1
1685
+ },
1686
+ "factRefs": {
1687
+ "type": "array",
1688
+ "maxItems": 64,
1689
+ "items": {
1690
+ "$ref": "#/$defs/Ref"
1691
+ }
1692
+ }
1693
+ }
1694
+ }
1695
+ }
1696
+ }
1697
+ ],
1698
+ "unevaluatedProperties": false
1699
+ },
1700
+ "TerminalEvent": {
1701
+ "type": "object",
1702
+ "allOf": [
1703
+ {
1704
+ "$ref": "#/$defs/EventBase"
1705
+ },
1706
+ {
1707
+ "type": "object",
1708
+ "required": [
1709
+ "kind",
1710
+ "terminal"
1711
+ ],
1712
+ "properties": {
1713
+ "kind": {
1714
+ "const": "terminal"
1715
+ },
1716
+ "terminal": {
1717
+ "type": "object",
1718
+ "additionalProperties": false,
1719
+ "required": [
1720
+ "status",
1721
+ "summary",
1722
+ "factRefs"
1723
+ ],
1724
+ "properties": {
1725
+ "status": {
1726
+ "enum": [
1727
+ "completed",
1728
+ "stopped"
1729
+ ]
1730
+ },
1731
+ "summary": {
1732
+ "type": "string",
1733
+ "minLength": 1
1734
+ },
1735
+ "factRefs": {
1736
+ "type": "array",
1737
+ "maxItems": 64,
1738
+ "items": {
1739
+ "$ref": "#/$defs/Ref"
1740
+ }
1741
+ }
1742
+ }
1743
+ }
1744
+ }
1745
+ }
1746
+ ],
1747
+ "unevaluatedProperties": false
1748
+ },
1749
+ "ErrorEvent": {
1750
+ "type": "object",
1751
+ "allOf": [
1752
+ {
1753
+ "$ref": "#/$defs/EventBase"
1754
+ },
1755
+ {
1756
+ "type": "object",
1757
+ "required": [
1758
+ "kind",
1759
+ "error"
1760
+ ],
1761
+ "properties": {
1762
+ "kind": {
1763
+ "const": "error"
1764
+ },
1765
+ "error": {
1766
+ "type": "object",
1767
+ "additionalProperties": false,
1768
+ "required": [
1769
+ "code",
1770
+ "message",
1771
+ "retryable"
1772
+ ],
1773
+ "properties": {
1774
+ "code": {
1775
+ "type": "string",
1776
+ "pattern": "^[A-Z][A-Z0-9_.-]*$"
1777
+ },
1778
+ "message": {
1779
+ "type": "string",
1780
+ "minLength": 1
1781
+ },
1782
+ "retryable": {
1783
+ "type": "boolean"
1784
+ }
1785
+ }
1786
+ }
1787
+ }
1788
+ }
1789
+ ],
1790
+ "unevaluatedProperties": false
1791
+ },
1792
+ "BooleanCriterion": {
1793
+ "type": "object",
1794
+ "required": [
1795
+ "strength",
1796
+ "value"
1797
+ ],
1798
+ "properties": {
1799
+ "strength": {
1800
+ "enum": [
1801
+ "must",
1802
+ "prefer"
1803
+ ]
1804
+ },
1805
+ "value": {
1806
+ "type": "boolean"
1807
+ }
1808
+ },
1809
+ "additionalProperties": false
1810
+ },
1811
+ "HotelFocusInput": {
1812
+ "type": "object",
1813
+ "required": [
1814
+ "hotelRef"
1815
+ ],
1816
+ "properties": {
1817
+ "hotelRef": {
1818
+ "$ref": "#/$defs/OpaqueRef"
1819
+ }
1820
+ },
1821
+ "additionalProperties": false
1822
+ },
1823
+ "HotelSelectInput": {
1824
+ "type": "object",
1825
+ "required": [
1826
+ "hotelRef"
1827
+ ],
1828
+ "properties": {
1829
+ "hotelRef": {
1830
+ "$ref": "#/$defs/OpaqueRef"
1831
+ }
1832
+ },
1833
+ "additionalProperties": false
1834
+ },
1835
+ "IntegerCriterion": {
1836
+ "type": "object",
1837
+ "required": [
1838
+ "strength",
1839
+ "value"
1840
+ ],
1841
+ "properties": {
1842
+ "strength": {
1843
+ "enum": [
1844
+ "must",
1845
+ "prefer"
1846
+ ]
1847
+ },
1848
+ "value": {
1849
+ "type": "integer",
1850
+ "minimum": 0
1851
+ }
1852
+ },
1853
+ "additionalProperties": false
1854
+ },
1855
+ "MoneyCriterion": {
1856
+ "type": "object",
1857
+ "required": [
1858
+ "strength",
1859
+ "value"
1860
+ ],
1861
+ "properties": {
1862
+ "strength": {
1863
+ "enum": [
1864
+ "must",
1865
+ "prefer"
1866
+ ]
1867
+ },
1868
+ "value": {
1869
+ "$ref": "#/$defs/Money"
1870
+ }
1871
+ },
1872
+ "additionalProperties": false
1873
+ },
1874
+ "Money": {
1875
+ "type": "object",
1876
+ "required": [
1877
+ "amount",
1878
+ "currency",
1879
+ "sourceFactRef"
1880
+ ],
1881
+ "properties": {
1882
+ "amount": {
1883
+ "type": "string",
1884
+ "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
1885
+ "maxLength": 64
1886
+ },
1887
+ "currency": {
1888
+ "type": "string",
1889
+ "pattern": "^[A-Z]{3}$"
1890
+ },
1891
+ "sourceFactRef": {
1892
+ "$ref": "#/$defs/OpaqueRef"
1893
+ }
1894
+ },
1895
+ "additionalProperties": false
1896
+ },
1897
+ "NonEmptyString": {
1898
+ "type": "string",
1899
+ "minLength": 1,
1900
+ "maxLength": 4096
1901
+ },
1902
+ "OccupancyRoom": {
1903
+ "type": "object",
1904
+ "required": [
1905
+ "adults",
1906
+ "childAges"
1907
+ ],
1908
+ "properties": {
1909
+ "adults": {
1910
+ "type": "integer",
1911
+ "minimum": 1,
1912
+ "maximum": 20
1913
+ },
1914
+ "childAges": {
1915
+ "type": "array",
1916
+ "maxItems": 20,
1917
+ "items": {
1918
+ "type": "integer",
1919
+ "minimum": 0,
1920
+ "maximum": 17
1921
+ }
1922
+ }
1923
+ },
1924
+ "additionalProperties": false
1925
+ },
1926
+ "OfferCriteria": {
1927
+ "type": "object",
1928
+ "properties": {
1929
+ "roomType": {
1930
+ "$ref": "#/$defs/StringArrayCriterion"
1931
+ },
1932
+ "bedType": {
1933
+ "$ref": "#/$defs/StringArrayCriterion"
1934
+ },
1935
+ "meals": {
1936
+ "$ref": "#/$defs/StringArrayCriterion"
1937
+ },
1938
+ "freeCancellation": {
1939
+ "$ref": "#/$defs/BooleanCriterion"
1940
+ },
1941
+ "freeCancellationUntil": {
1942
+ "$ref": "#/$defs/StringCriterion"
1943
+ },
1944
+ "totalPriceMax": {
1945
+ "$ref": "#/$defs/MoneyCriterion"
1946
+ },
1947
+ "roomsAvailableMin": {
1948
+ "$ref": "#/$defs/IntegerCriterion"
1949
+ },
1950
+ "payAtProperty": {
1951
+ "$ref": "#/$defs/BooleanCriterion"
1952
+ },
1953
+ "mobileRate": {
1954
+ "$ref": "#/$defs/BooleanCriterion"
1955
+ },
1956
+ "targetCount": {
1957
+ "type": "integer",
1958
+ "minimum": 1,
1959
+ "maximum": 50
1960
+ },
1961
+ "sort": {
1962
+ "enum": [
1963
+ "best_match",
1964
+ "total_price_asc",
1965
+ "cancellation_latest"
1966
+ ]
1967
+ }
1968
+ },
1969
+ "additionalProperties": false
1970
+ },
1971
+ "OffersCompareInput": {
1972
+ "type": "object",
1973
+ "required": [
1974
+ "offerRefs",
1975
+ "requestedCount"
1976
+ ],
1977
+ "properties": {
1978
+ "offerRefs": {
1979
+ "type": "array",
1980
+ "minItems": 1,
1981
+ "maxItems": 50,
1982
+ "uniqueItems": true,
1983
+ "items": {
1984
+ "$ref": "#/$defs/OpaqueRef"
1985
+ }
1986
+ },
1987
+ "requestedCount": {
1988
+ "type": "integer",
1989
+ "minimum": 1,
1990
+ "maximum": 50
1991
+ }
1992
+ },
1993
+ "additionalProperties": false
1994
+ },
1995
+ "OffersQueryInput": {
1996
+ "type": "object",
1997
+ "required": [
1998
+ "hotelRefs",
1999
+ "criteria"
2000
+ ],
2001
+ "properties": {
2002
+ "hotelRefs": {
2003
+ "type": "array",
2004
+ "minItems": 1,
2005
+ "maxItems": 100,
2006
+ "uniqueItems": true,
2007
+ "items": {
2008
+ "$ref": "#/$defs/OpaqueRef"
2009
+ }
2010
+ },
2011
+ "criteria": {
2012
+ "$ref": "#/$defs/OfferCriteria"
2013
+ }
2014
+ },
2015
+ "additionalProperties": false
2016
+ },
2017
+ "OffersViewPatchInput": {
2018
+ "type": "object",
2019
+ "required": [
2020
+ "hotelRef",
2021
+ "criteria"
2022
+ ],
2023
+ "properties": {
2024
+ "hotelRef": {
2025
+ "$ref": "#/$defs/OpaqueRef"
2026
+ },
2027
+ "criteria": {
2028
+ "$ref": "#/$defs/OfferCriteria"
2029
+ }
2030
+ },
2031
+ "additionalProperties": false
2032
+ },
2033
+ "OpaqueRef": {
2034
+ "type": "string",
2035
+ "minLength": 1,
2036
+ "maxLength": 512
2037
+ },
2038
+ "OrderObserveInput": {
2039
+ "type": "object",
2040
+ "required": [
2041
+ "orderRef"
2042
+ ],
2043
+ "properties": {
2044
+ "orderRef": {
2045
+ "$ref": "#/$defs/OpaqueRef"
2046
+ }
2047
+ },
2048
+ "additionalProperties": false
2049
+ },
2050
+ "ResultViewSnapshot": {
2051
+ "type": "object",
2052
+ "required": [
2053
+ "status"
2054
+ ],
2055
+ "properties": {
2056
+ "status": {
2057
+ "enum": [
2058
+ "idle",
2059
+ "loading",
2060
+ "ready",
2061
+ "partial",
2062
+ "failed"
2063
+ ]
2064
+ },
2065
+ "filters": {
2066
+ "$ref": "#/$defs/ResultsViewPatch"
2067
+ },
2068
+ "sort": {
2069
+ "enum": [
2070
+ "recommended",
2071
+ "price_asc",
2072
+ "price_desc",
2073
+ "rating_desc",
2074
+ "distance_asc"
2075
+ ]
2076
+ },
2077
+ "resultCount": {
2078
+ "type": "integer",
2079
+ "minimum": 0
2080
+ },
2081
+ "searchSessionRef": {
2082
+ "$ref": "#/$defs/OpaqueRef"
2083
+ }
2084
+ },
2085
+ "additionalProperties": false
2086
+ },
2087
+ "ResultsViewPatchInput": {
2088
+ "type": "object",
2089
+ "required": [
2090
+ "patch"
2091
+ ],
2092
+ "properties": {
2093
+ "patch": {
2094
+ "$ref": "#/$defs/ResultsViewPatch"
2095
+ }
2096
+ },
2097
+ "additionalProperties": false
2098
+ },
2099
+ "ResultsViewPatch": {
2100
+ "type": "object",
2101
+ "minProperties": 1,
2102
+ "properties": {
2103
+ "starRating": {
2104
+ "type": [
2105
+ "object",
2106
+ "null"
2107
+ ],
2108
+ "properties": {
2109
+ "min": {
2110
+ "type": "number",
2111
+ "minimum": 0,
2112
+ "maximum": 5
2113
+ },
2114
+ "max": {
2115
+ "type": "number",
2116
+ "minimum": 0,
2117
+ "maximum": 5
2118
+ }
2119
+ },
2120
+ "additionalProperties": false
2121
+ },
2122
+ "guestRatingMin": {
2123
+ "type": [
2124
+ "number",
2125
+ "null"
2126
+ ],
2127
+ "minimum": 0,
2128
+ "maximum": 10
2129
+ },
2130
+ "facilitiesAllOf": {
2131
+ "type": [
2132
+ "array",
2133
+ "null"
2134
+ ],
2135
+ "items": {
2136
+ "$ref": "#/$defs/NonEmptyString"
2137
+ },
2138
+ "uniqueItems": true,
2139
+ "maxItems": 100
2140
+ },
2141
+ "distance": {
2142
+ "type": [
2143
+ "object",
2144
+ "null"
2145
+ ],
2146
+ "required": [
2147
+ "anchorRef",
2148
+ "maxKm"
2149
+ ],
2150
+ "properties": {
2151
+ "anchorRef": {
2152
+ "$ref": "#/$defs/OpaqueRef"
2153
+ },
2154
+ "maxKm": {
2155
+ "type": "number",
2156
+ "exclusiveMinimum": 0,
2157
+ "maximum": 50000
2158
+ }
2159
+ },
2160
+ "additionalProperties": false
2161
+ },
2162
+ "price": {
2163
+ "type": [
2164
+ "object",
2165
+ "null"
2166
+ ],
2167
+ "properties": {
2168
+ "min": {
2169
+ "$ref": "#/$defs/Money"
2170
+ },
2171
+ "max": {
2172
+ "$ref": "#/$defs/Money"
2173
+ }
2174
+ },
2175
+ "additionalProperties": false
2176
+ },
2177
+ "sort": {
2178
+ "enum": [
2179
+ "recommended",
2180
+ "price_asc",
2181
+ "price_desc",
2182
+ "rating_desc",
2183
+ "distance_asc"
2184
+ ]
2185
+ }
2186
+ },
2187
+ "additionalProperties": false
2188
+ },
2189
+ "Revision": {
2190
+ "type": "integer",
2191
+ "minimum": 0
2192
+ },
2193
+ "SearchCriteriaPatch": {
2194
+ "type": "object",
2195
+ "minProperties": 1,
2196
+ "properties": {
2197
+ "destination": {
2198
+ "type": "object",
2199
+ "minProperties": 1,
2200
+ "properties": {
2201
+ "query": {
2202
+ "$ref": "#/$defs/NonEmptyString"
2203
+ },
2204
+ "placeRef": {
2205
+ "$ref": "#/$defs/OpaqueRef"
2206
+ }
2207
+ },
2208
+ "additionalProperties": false
2209
+ },
2210
+ "hotel": {
2211
+ "type": "object",
2212
+ "required": [
2213
+ "strength",
2214
+ "value"
2215
+ ],
2216
+ "properties": {
2217
+ "strength": {
2218
+ "enum": [
2219
+ "must",
2220
+ "prefer"
2221
+ ]
2222
+ },
2223
+ "value": {
2224
+ "type": "object",
2225
+ "minProperties": 1,
2226
+ "properties": {
2227
+ "name": {
2228
+ "$ref": "#/$defs/NonEmptyString"
2229
+ },
2230
+ "hotelRef": {
2231
+ "$ref": "#/$defs/OpaqueRef"
2232
+ }
2233
+ },
2234
+ "additionalProperties": false
2235
+ }
2236
+ },
2237
+ "additionalProperties": false
2238
+ },
2239
+ "stay": {
2240
+ "type": "object",
2241
+ "minProperties": 1,
2242
+ "properties": {
2243
+ "checkIn": {
2244
+ "type": "string",
2245
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
2246
+ },
2247
+ "checkOut": {
2248
+ "type": "string",
2249
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
2250
+ }
2251
+ },
2252
+ "additionalProperties": false
2253
+ },
2254
+ "occupancy": {
2255
+ "type": "object",
2256
+ "required": [
2257
+ "rooms"
2258
+ ],
2259
+ "properties": {
2260
+ "rooms": {
2261
+ "type": "array",
2262
+ "minItems": 1,
2263
+ "maxItems": 20,
2264
+ "items": {
2265
+ "$ref": "#/$defs/OccupancyRoom"
2266
+ }
2267
+ }
2268
+ },
2269
+ "additionalProperties": false
2270
+ },
2271
+ "budget": {
2272
+ "type": "object",
2273
+ "required": [
2274
+ "strength",
2275
+ "value"
2276
+ ],
2277
+ "properties": {
2278
+ "strength": {
2279
+ "enum": [
2280
+ "must",
2281
+ "prefer"
2282
+ ]
2283
+ },
2284
+ "value": {
2285
+ "type": "object",
2286
+ "minProperties": 1,
2287
+ "properties": {
2288
+ "min": {
2289
+ "$ref": "#/$defs/Money"
2290
+ },
2291
+ "max": {
2292
+ "$ref": "#/$defs/Money"
2293
+ }
2294
+ },
2295
+ "additionalProperties": false
2296
+ }
2297
+ },
2298
+ "additionalProperties": false
2299
+ },
2300
+ "starRating": {
2301
+ "type": "object",
2302
+ "required": [
2303
+ "strength",
2304
+ "value"
2305
+ ],
2306
+ "properties": {
2307
+ "strength": {
2308
+ "enum": [
2309
+ "must",
2310
+ "prefer"
2311
+ ]
2312
+ },
2313
+ "value": {
2314
+ "type": "object",
2315
+ "minProperties": 1,
2316
+ "properties": {
2317
+ "min": {
2318
+ "type": "number",
2319
+ "minimum": 0,
2320
+ "maximum": 5
2321
+ },
2322
+ "max": {
2323
+ "type": "number",
2324
+ "minimum": 0,
2325
+ "maximum": 5
2326
+ }
2327
+ },
2328
+ "additionalProperties": false
2329
+ }
2330
+ },
2331
+ "additionalProperties": false
2332
+ },
2333
+ "guestRating": {
2334
+ "type": "object",
2335
+ "required": [
2336
+ "strength",
2337
+ "value"
2338
+ ],
2339
+ "properties": {
2340
+ "strength": {
2341
+ "enum": [
2342
+ "must",
2343
+ "prefer"
2344
+ ]
2345
+ },
2346
+ "value": {
2347
+ "type": "object",
2348
+ "required": [
2349
+ "min"
2350
+ ],
2351
+ "properties": {
2352
+ "min": {
2353
+ "type": "number",
2354
+ "minimum": 0,
2355
+ "maximum": 10
2356
+ }
2357
+ },
2358
+ "additionalProperties": false
2359
+ }
2360
+ },
2361
+ "additionalProperties": false
2362
+ },
2363
+ "facilities": {
2364
+ "type": "object",
2365
+ "required": [
2366
+ "strength",
2367
+ "value"
2368
+ ],
2369
+ "properties": {
2370
+ "strength": {
2371
+ "enum": [
2372
+ "must",
2373
+ "prefer"
2374
+ ]
2375
+ },
2376
+ "value": {
2377
+ "type": "object",
2378
+ "required": [
2379
+ "allOf"
2380
+ ],
2381
+ "properties": {
2382
+ "allOf": {
2383
+ "type": "array",
2384
+ "minItems": 1,
2385
+ "maxItems": 100,
2386
+ "uniqueItems": true,
2387
+ "items": {
2388
+ "$ref": "#/$defs/NonEmptyString"
2389
+ }
2390
+ }
2391
+ },
2392
+ "additionalProperties": false
2393
+ }
2394
+ },
2395
+ "additionalProperties": false
2396
+ },
2397
+ "distance": {
2398
+ "type": "object",
2399
+ "required": [
2400
+ "strength",
2401
+ "value"
2402
+ ],
2403
+ "properties": {
2404
+ "strength": {
2405
+ "enum": [
2406
+ "must",
2407
+ "prefer"
2408
+ ]
2409
+ },
2410
+ "value": {
2411
+ "type": "object",
2412
+ "required": [
2413
+ "maxKm"
2414
+ ],
2415
+ "properties": {
2416
+ "anchorLabel": {
2417
+ "$ref": "#/$defs/NonEmptyString"
2418
+ },
2419
+ "anchorRef": {
2420
+ "$ref": "#/$defs/OpaqueRef"
2421
+ },
2422
+ "maxKm": {
2423
+ "type": "number",
2424
+ "exclusiveMinimum": 0,
2425
+ "maximum": 50000
2426
+ }
2427
+ },
2428
+ "additionalProperties": false
2429
+ }
2430
+ },
2431
+ "additionalProperties": false
2432
+ }
2433
+ },
2434
+ "additionalProperties": false
2435
+ },
2436
+ "SearchDraftSnapshot": {
2437
+ "type": "object",
2438
+ "properties": {
2439
+ "destination": {
2440
+ "type": "object",
2441
+ "properties": {
2442
+ "query": {
2443
+ "$ref": "#/$defs/NonEmptyString"
2444
+ },
2445
+ "placeRef": {
2446
+ "$ref": "#/$defs/OpaqueRef"
2447
+ }
2448
+ },
2449
+ "additionalProperties": false
2450
+ },
2451
+ "stay": {
2452
+ "type": "object",
2453
+ "properties": {
2454
+ "checkIn": {
2455
+ "type": "string",
2456
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
2457
+ },
2458
+ "checkOut": {
2459
+ "type": "string",
2460
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
2461
+ }
2462
+ },
2463
+ "additionalProperties": false
2464
+ },
2465
+ "occupancy": {
2466
+ "type": "object",
2467
+ "required": [
2468
+ "rooms"
2469
+ ],
2470
+ "properties": {
2471
+ "rooms": {
2472
+ "type": "array",
2473
+ "items": {
2474
+ "$ref": "#/$defs/OccupancyRoom"
2475
+ },
2476
+ "maxItems": 20
2477
+ }
2478
+ },
2479
+ "additionalProperties": false
2480
+ },
2481
+ "criteria": {
2482
+ "$ref": "#/$defs/SearchCriteriaPatch"
2483
+ }
2484
+ },
2485
+ "additionalProperties": false
2486
+ },
2487
+ "SearchPatchInput": {
2488
+ "type": "object",
2489
+ "required": [
2490
+ "patch"
2491
+ ],
2492
+ "properties": {
2493
+ "patch": {
2494
+ "$ref": "#/$defs/SearchCriteriaPatch"
2495
+ }
2496
+ },
2497
+ "additionalProperties": false
2498
+ },
2499
+ "SearchRunInput": {
2500
+ "type": "object",
2501
+ "maxProperties": 0,
2502
+ "additionalProperties": false
2503
+ },
2504
+ "StringArrayCriterion": {
2505
+ "type": "object",
2506
+ "required": [
2507
+ "strength",
2508
+ "value"
2509
+ ],
2510
+ "properties": {
2511
+ "strength": {
2512
+ "enum": [
2513
+ "must",
2514
+ "prefer"
2515
+ ]
2516
+ },
2517
+ "value": {
2518
+ "type": "array",
2519
+ "minItems": 1,
2520
+ "maxItems": 100,
2521
+ "uniqueItems": true,
2522
+ "items": {
2523
+ "$ref": "#/$defs/NonEmptyString"
2524
+ }
2525
+ }
2526
+ },
2527
+ "additionalProperties": false
2528
+ },
2529
+ "StringCriterion": {
2530
+ "type": "object",
2531
+ "required": [
2532
+ "strength",
2533
+ "value"
2534
+ ],
2535
+ "properties": {
2536
+ "strength": {
2537
+ "enum": [
2538
+ "must",
2539
+ "prefer"
2540
+ ]
2541
+ },
2542
+ "value": {
2543
+ "$ref": "#/$defs/NonEmptyString"
2544
+ }
2545
+ },
2546
+ "additionalProperties": false
2547
+ },
2548
+ "VisibleHotelFact": {
2549
+ "type": "object",
2550
+ "required": [
2551
+ "hotelRef",
2552
+ "name",
2553
+ "factRefs"
2554
+ ],
2555
+ "properties": {
2556
+ "hotelRef": {
2557
+ "$ref": "#/$defs/OpaqueRef"
2558
+ },
2559
+ "name": {
2560
+ "$ref": "#/$defs/NonEmptyString"
2561
+ },
2562
+ "starRating": {
2563
+ "type": "number",
2564
+ "minimum": 0,
2565
+ "maximum": 5
2566
+ },
2567
+ "guestRating": {
2568
+ "type": "number",
2569
+ "minimum": 0,
2570
+ "maximum": 10
2571
+ },
2572
+ "distanceKm": {
2573
+ "type": "number",
2574
+ "minimum": 0
2575
+ },
2576
+ "facilityCodes": {
2577
+ "type": "array",
2578
+ "uniqueItems": true,
2579
+ "items": {
2580
+ "$ref": "#/$defs/NonEmptyString"
2581
+ }
2582
+ },
2583
+ "factRefs": {
2584
+ "type": "array",
2585
+ "items": {
2586
+ "$ref": "#/$defs/OpaqueRef"
2587
+ }
2588
+ }
2589
+ },
2590
+ "additionalProperties": false
2591
+ }
2592
+ }
2593
+ }