@pam-ai/pam-ordo-contracts 3.4.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.
Files changed (59) hide show
  1. package/README.md +72 -0
  2. package/dist/generated.d.ts +1848 -0
  3. package/dist/generated.d.ts.map +1 -0
  4. package/dist/generated.js +6 -0
  5. package/dist/generated.js.map +1 -0
  6. package/dist/inbox-policy.d.ts +9 -0
  7. package/dist/inbox-policy.d.ts.map +1 -0
  8. package/dist/inbox-policy.js +27 -0
  9. package/dist/inbox-policy.js.map +1 -0
  10. package/dist/index.d.ts +35 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +4 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/ordo-capability.d.ts +27 -0
  15. package/dist/ordo-capability.d.ts.map +1 -0
  16. package/dist/ordo-capability.js +37 -0
  17. package/dist/ordo-capability.js.map +1 -0
  18. package/dist/producer-command.d.ts +18 -0
  19. package/dist/producer-command.d.ts.map +1 -0
  20. package/dist/producer-command.js +38 -0
  21. package/dist/producer-command.js.map +1 -0
  22. package/fixtures/acknowledge-attention-command.json +8 -0
  23. package/fixtures/add-customer-note-command.json +6 -0
  24. package/fixtures/add-internal-comment-command.json +9 -0
  25. package/fixtures/advance-read-cursor-command.json +6 -0
  26. package/fixtures/assign-command.json +11 -0
  27. package/fixtures/assign-team-routing-command.json +11 -0
  28. package/fixtures/command-result.json +10 -0
  29. package/fixtures/contact-search.json +111 -0
  30. package/fixtures/conversation-detail-missing-body.json +133 -0
  31. package/fixtures/customer-note-command-result.json +10 -0
  32. package/fixtures/customer-notes-page.json +17 -0
  33. package/fixtures/delete-customer-note-command.json +7 -0
  34. package/fixtures/inbox-list-customer-no-work.json +93 -0
  35. package/fixtures/inbox-list-partial-hydration.json +175 -0
  36. package/fixtures/inbox-policy-v1.json +33 -0
  37. package/fixtures/inbox-target-resolution-request-v1.json +8 -0
  38. package/fixtures/inbox-target-resolution-response-v1.json +23 -0
  39. package/fixtures/internal-comment-result.json +13 -0
  40. package/fixtures/manifest.json +32 -0
  41. package/fixtures/notification-command-result.json +10 -0
  42. package/fixtures/notification-command.json +5 -0
  43. package/fixtures/notification-list.json +25 -0
  44. package/fixtures/permissions-unavailable.json +7 -0
  45. package/fixtures/producer-attention-command-v1.json +28 -0
  46. package/fixtures/producer-invalid-actor-command-v1.json +17 -0
  47. package/fixtures/producer-invalid-customer-identity-v1.json +15 -0
  48. package/fixtures/producer-invalid-missing-source-version-v1.json +16 -0
  49. package/fixtures/producer-invalid-oversized-v1.json +15 -0
  50. package/fixtures/producer-invalid-unknown-field-v1.json +17 -0
  51. package/fixtures/producer-overdue-fire-command-v1.json +21 -0
  52. package/fixtures/producer-reminder-fire-command-v1.json +20 -0
  53. package/fixtures/producer-snooze-return-command-v1.json +20 -0
  54. package/fixtures/producer-source-activity-command-v1.json +34 -0
  55. package/fixtures/read-cursor-result.json +10 -0
  56. package/fixtures/resolve-attention-command.json +9 -0
  57. package/fixtures/version-conflict.json +11 -0
  58. package/openapi/openapi.json +4577 -0
  59. package/package.json +67 -0
@@ -0,0 +1,4577 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "PAM Unified Inbox API",
5
+ "version": "3.4.0",
6
+ "description": "Versioned contract for canonical Ordo reads, commands, and recipient notifications.",
7
+ "license": {
8
+ "name": "Proprietary",
9
+ "identifier": "LicenseRef-Proprietary"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "https://{apiId}.execute-api.us-east-1.amazonaws.com",
15
+ "variables": {
16
+ "apiId": {
17
+ "default": "example"
18
+ }
19
+ }
20
+ }
21
+ ],
22
+ "security": [
23
+ {
24
+ "dashboardIdentity": []
25
+ }
26
+ ],
27
+ "tags": [
28
+ {
29
+ "name": "Inbox reads",
30
+ "description": "Canonical paginated Inbox and Conversation detail reads."
31
+ },
32
+ {
33
+ "name": "Inbox commands",
34
+ "description": "Versioned idempotent synchronous commands."
35
+ }
36
+ ],
37
+ "paths": {
38
+ "/v1/inbox/conversations": {
39
+ "get": {
40
+ "summary": "List canonical Inbox Conversations",
41
+ "operationId": "listInboxConversations",
42
+ "tags": [
43
+ "Inbox reads"
44
+ ],
45
+ "parameters": [
46
+ {
47
+ "$ref": "#/components/parameters/ClientOrgId"
48
+ },
49
+ {
50
+ "name": "scope",
51
+ "in": "query",
52
+ "required": true,
53
+ "schema": {
54
+ "$ref": "#/components/schemas/InboxScope"
55
+ }
56
+ },
57
+ {
58
+ "name": "teamId",
59
+ "in": "query",
60
+ "schema": {
61
+ "type": "string",
62
+ "minLength": 1
63
+ }
64
+ },
65
+ {
66
+ "name": "tab",
67
+ "in": "query",
68
+ "schema": {
69
+ "type": "string",
70
+ "enum": [
71
+ "OPEN",
72
+ "SNOOZED",
73
+ "OVERDUE",
74
+ "NEEDS_ATTENTION",
75
+ "RESOLVED"
76
+ ]
77
+ }
78
+ },
79
+ {
80
+ "name": "labels",
81
+ "in": "query",
82
+ "schema": {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "string"
86
+ },
87
+ "maxItems": 20
88
+ },
89
+ "style": "form",
90
+ "explode": true
91
+ },
92
+ {
93
+ "name": "from",
94
+ "in": "query",
95
+ "schema": {
96
+ "type": "string",
97
+ "format": "date-time"
98
+ }
99
+ },
100
+ {
101
+ "name": "to",
102
+ "in": "query",
103
+ "schema": {
104
+ "type": "string",
105
+ "format": "date-time"
106
+ }
107
+ },
108
+ {
109
+ "name": "query",
110
+ "in": "query",
111
+ "schema": {
112
+ "type": "string",
113
+ "maxLength": 256
114
+ }
115
+ },
116
+ {
117
+ "name": "sort",
118
+ "in": "query",
119
+ "schema": {
120
+ "type": "string",
121
+ "enum": [
122
+ "OPERATIONAL_URGENCY",
123
+ "LATEST_ACTIVITY"
124
+ ],
125
+ "default": "OPERATIONAL_URGENCY"
126
+ }
127
+ },
128
+ {
129
+ "name": "cursor",
130
+ "in": "query",
131
+ "description": "Opaque keyset cursor. Clients must not decode it.",
132
+ "schema": {
133
+ "type": "string",
134
+ "minLength": 1,
135
+ "maxLength": 2048
136
+ }
137
+ },
138
+ {
139
+ "name": "limit",
140
+ "in": "query",
141
+ "schema": {
142
+ "type": "integer",
143
+ "minimum": 1,
144
+ "maximum": 100,
145
+ "default": 25
146
+ }
147
+ }
148
+ ],
149
+ "responses": {
150
+ "200": {
151
+ "description": "Canonical Inbox page. Optional hydration failures never remove a row.",
152
+ "headers": {
153
+ "x-correlation-id": {
154
+ "$ref": "#/components/headers/CorrelationId"
155
+ }
156
+ },
157
+ "content": {
158
+ "application/json": {
159
+ "schema": {
160
+ "$ref": "#/components/schemas/InboxListResponse"
161
+ }
162
+ }
163
+ }
164
+ },
165
+ "400": {
166
+ "$ref": "#/components/responses/BadRequest"
167
+ },
168
+ "401": {
169
+ "$ref": "#/components/responses/Unauthorized"
170
+ },
171
+ "403": {
172
+ "$ref": "#/components/responses/Forbidden"
173
+ },
174
+ "500": {
175
+ "$ref": "#/components/responses/InternalError"
176
+ },
177
+ "501": {
178
+ "$ref": "#/components/responses/NotImplemented"
179
+ },
180
+ "503": {
181
+ "$ref": "#/components/responses/ServiceUnavailable"
182
+ }
183
+ }
184
+ }
185
+ },
186
+ "/v1/inbox/conversations/{conversationId}": {
187
+ "get": {
188
+ "summary": "Get an authorized Conversation detail",
189
+ "operationId": "getInboxConversation",
190
+ "tags": [
191
+ "Inbox reads"
192
+ ],
193
+ "parameters": [
194
+ {
195
+ "$ref": "#/components/parameters/ClientOrgId"
196
+ },
197
+ {
198
+ "$ref": "#/components/parameters/ConversationId"
199
+ },
200
+ {
201
+ "name": "cycleId",
202
+ "in": "query",
203
+ "schema": {
204
+ "type": "string",
205
+ "format": "uuid"
206
+ }
207
+ }
208
+ ],
209
+ "responses": {
210
+ "200": {
211
+ "description": "Authorized Conversation detail.",
212
+ "headers": {
213
+ "x-correlation-id": {
214
+ "$ref": "#/components/headers/CorrelationId"
215
+ }
216
+ },
217
+ "content": {
218
+ "application/json": {
219
+ "schema": {
220
+ "$ref": "#/components/schemas/ConversationDetailResponse"
221
+ }
222
+ }
223
+ }
224
+ },
225
+ "401": {
226
+ "$ref": "#/components/responses/Unauthorized"
227
+ },
228
+ "403": {
229
+ "$ref": "#/components/responses/Forbidden"
230
+ },
231
+ "404": {
232
+ "$ref": "#/components/responses/NotFound"
233
+ },
234
+ "500": {
235
+ "$ref": "#/components/responses/InternalError"
236
+ },
237
+ "501": {
238
+ "$ref": "#/components/responses/NotImplemented"
239
+ },
240
+ "503": {
241
+ "$ref": "#/components/responses/ServiceUnavailable"
242
+ }
243
+ }
244
+ }
245
+ },
246
+ "/v1/inbox/conversations/{conversationId}/customer-notes": {
247
+ "get": {
248
+ "summary": "List active Customer notes through an authorized Conversation",
249
+ "operationId": "listInboxCustomerNotes",
250
+ "tags": [
251
+ "Inbox reads"
252
+ ],
253
+ "parameters": [
254
+ {
255
+ "$ref": "#/components/parameters/ClientOrgId"
256
+ },
257
+ {
258
+ "$ref": "#/components/parameters/ConversationId"
259
+ },
260
+ {
261
+ "name": "cursor",
262
+ "in": "query",
263
+ "description": "Opaque newest-first keyset cursor. Clients must not decode it.",
264
+ "schema": {
265
+ "type": "string",
266
+ "minLength": 1,
267
+ "maxLength": 2048
268
+ }
269
+ },
270
+ {
271
+ "name": "limit",
272
+ "in": "query",
273
+ "schema": {
274
+ "type": "integer",
275
+ "minimum": 1,
276
+ "maximum": 100,
277
+ "default": 25
278
+ }
279
+ }
280
+ ],
281
+ "responses": {
282
+ "200": {
283
+ "description": "Newest-first page of non-deleted notes for the Conversation Customer.",
284
+ "headers": {
285
+ "x-correlation-id": {
286
+ "$ref": "#/components/headers/CorrelationId"
287
+ }
288
+ },
289
+ "content": {
290
+ "application/json": {
291
+ "schema": {
292
+ "$ref": "#/components/schemas/CustomerNoteListResponse"
293
+ }
294
+ }
295
+ }
296
+ },
297
+ "400": {
298
+ "$ref": "#/components/responses/BadRequest"
299
+ },
300
+ "401": {
301
+ "$ref": "#/components/responses/Unauthorized"
302
+ },
303
+ "403": {
304
+ "$ref": "#/components/responses/Forbidden"
305
+ },
306
+ "404": {
307
+ "$ref": "#/components/responses/NotFound"
308
+ },
309
+ "500": {
310
+ "$ref": "#/components/responses/InternalError"
311
+ },
312
+ "501": {
313
+ "$ref": "#/components/responses/NotImplemented"
314
+ },
315
+ "503": {
316
+ "$ref": "#/components/responses/ServiceUnavailable"
317
+ }
318
+ }
319
+ }
320
+ },
321
+ "/v1/inbox/contacts": {
322
+ "get": {
323
+ "summary": "Search the rooftop's Customers to start an outbound Conversation",
324
+ "description": "The outbound half of the Inbox. The Inbox itself is incoming-only, so a Conversation an advisor needs to START cannot be found in it: the Customer may have no thread at all, only an open repair order, or a thread another advisor owns. This searches the whole rooftop's Customers rather than the reader's own Conversations, and reports how each one already relates to them so the picker can say what opening it will do. Requires VIEW_CUSTOMER_DIRECTORY, which is a stronger grant than VIEW_OWN_INBOX: it exposes Customers the reader has never messaged. Contact detail is hydrated from the system that masters it, so a hydration gap degrades a field and never removes a Customer.",
325
+ "operationId": "searchInboxContacts",
326
+ "tags": [
327
+ "Inbox reads"
328
+ ],
329
+ "parameters": [
330
+ {
331
+ "$ref": "#/components/parameters/ClientOrgId"
332
+ },
333
+ {
334
+ "name": "query",
335
+ "in": "query",
336
+ "required": true,
337
+ "description": "A name fragment, or a telephone number in any format.",
338
+ "schema": {
339
+ "type": "string",
340
+ "minLength": 1,
341
+ "maxLength": 256
342
+ }
343
+ },
344
+ {
345
+ "name": "relationship",
346
+ "in": "query",
347
+ "description": "Which side of the directory to read. MINE returns only Customers whose Conversation the reader owns; EVERYONE returns the rest. One set is always in the way of the other, so this is a switch rather than a filter.",
348
+ "schema": {
349
+ "type": "string",
350
+ "enum": [
351
+ "MINE",
352
+ "EVERYONE"
353
+ ],
354
+ "default": "MINE"
355
+ }
356
+ },
357
+ {
358
+ "name": "limit",
359
+ "in": "query",
360
+ "schema": {
361
+ "type": "integer",
362
+ "minimum": 1,
363
+ "maximum": 50,
364
+ "default": 25
365
+ }
366
+ }
367
+ ],
368
+ "responses": {
369
+ "200": {
370
+ "description": "Matching Customers. A hydration gap degrades a field, never a row.",
371
+ "headers": {
372
+ "x-correlation-id": {
373
+ "$ref": "#/components/headers/CorrelationId"
374
+ }
375
+ },
376
+ "content": {
377
+ "application/json": {
378
+ "schema": {
379
+ "$ref": "#/components/schemas/ContactSearchResponse"
380
+ }
381
+ }
382
+ }
383
+ },
384
+ "400": {
385
+ "$ref": "#/components/responses/BadRequest"
386
+ },
387
+ "401": {
388
+ "$ref": "#/components/responses/Unauthorized"
389
+ },
390
+ "403": {
391
+ "$ref": "#/components/responses/Forbidden"
392
+ },
393
+ "500": {
394
+ "$ref": "#/components/responses/InternalError"
395
+ },
396
+ "501": {
397
+ "$ref": "#/components/responses/NotImplemented"
398
+ },
399
+ "503": {
400
+ "$ref": "#/components/responses/ServiceUnavailable"
401
+ }
402
+ }
403
+ }
404
+ },
405
+ "/v1/inbox/notifications": {
406
+ "get": {
407
+ "summary": "List the authenticated User's visible active notifications",
408
+ "operationId": "listInboxNotifications",
409
+ "tags": [
410
+ "Inbox reads"
411
+ ],
412
+ "parameters": [
413
+ {
414
+ "$ref": "#/components/parameters/ClientOrgId"
415
+ },
416
+ {
417
+ "name": "cursor",
418
+ "in": "query",
419
+ "description": "Opaque newest-first snapshot cursor. Clients must not decode it.",
420
+ "schema": {
421
+ "type": "string",
422
+ "minLength": 1,
423
+ "maxLength": 2048
424
+ }
425
+ },
426
+ {
427
+ "name": "limit",
428
+ "in": "query",
429
+ "schema": {
430
+ "type": "integer",
431
+ "minimum": 1,
432
+ "maximum": 100,
433
+ "default": 25
434
+ }
435
+ }
436
+ ],
437
+ "responses": {
438
+ "200": {
439
+ "description": "Newest-first page of visible, undismissed recipient notifications.",
440
+ "headers": {
441
+ "x-correlation-id": {
442
+ "$ref": "#/components/headers/CorrelationId"
443
+ }
444
+ },
445
+ "content": {
446
+ "application/json": {
447
+ "schema": {
448
+ "$ref": "#/components/schemas/NotificationListResponse"
449
+ }
450
+ }
451
+ }
452
+ },
453
+ "400": {
454
+ "$ref": "#/components/responses/BadRequest"
455
+ },
456
+ "401": {
457
+ "$ref": "#/components/responses/Unauthorized"
458
+ },
459
+ "403": {
460
+ "$ref": "#/components/responses/Forbidden"
461
+ },
462
+ "500": {
463
+ "$ref": "#/components/responses/InternalError"
464
+ },
465
+ "503": {
466
+ "$ref": "#/components/responses/ServiceUnavailable"
467
+ }
468
+ }
469
+ }
470
+ },
471
+ "/v1/inbox/commands/assign": {
472
+ "post": {
473
+ "summary": "Assign the active WorkCycle",
474
+ "operationId": "assignConversation",
475
+ "tags": [
476
+ "Inbox commands"
477
+ ],
478
+ "parameters": [
479
+ {
480
+ "$ref": "#/components/parameters/ClientOrgId"
481
+ }
482
+ ],
483
+ "requestBody": {
484
+ "$ref": "#/components/requestBodies/AssignCommand"
485
+ },
486
+ "responses": {
487
+ "200": {
488
+ "$ref": "#/components/responses/CommandApplied"
489
+ },
490
+ "400": {
491
+ "$ref": "#/components/responses/BadRequest"
492
+ },
493
+ "401": {
494
+ "$ref": "#/components/responses/Unauthorized"
495
+ },
496
+ "403": {
497
+ "$ref": "#/components/responses/Forbidden"
498
+ },
499
+ "404": {
500
+ "$ref": "#/components/responses/NotFound"
501
+ },
502
+ "409": {
503
+ "$ref": "#/components/responses/Conflict"
504
+ },
505
+ "500": {
506
+ "$ref": "#/components/responses/InternalError"
507
+ },
508
+ "501": {
509
+ "$ref": "#/components/responses/NotImplemented"
510
+ },
511
+ "503": {
512
+ "$ref": "#/components/responses/ServiceUnavailable"
513
+ }
514
+ }
515
+ }
516
+ },
517
+ "/v1/inbox/commands/snooze": {
518
+ "post": {
519
+ "summary": "Snooze the active WorkCycle",
520
+ "operationId": "snoozeConversation",
521
+ "tags": [
522
+ "Inbox commands"
523
+ ],
524
+ "parameters": [
525
+ {
526
+ "$ref": "#/components/parameters/ClientOrgId"
527
+ }
528
+ ],
529
+ "requestBody": {
530
+ "$ref": "#/components/requestBodies/SnoozeCommand"
531
+ },
532
+ "responses": {
533
+ "200": {
534
+ "$ref": "#/components/responses/CommandApplied"
535
+ },
536
+ "400": {
537
+ "$ref": "#/components/responses/BadRequest"
538
+ },
539
+ "401": {
540
+ "$ref": "#/components/responses/Unauthorized"
541
+ },
542
+ "403": {
543
+ "$ref": "#/components/responses/Forbidden"
544
+ },
545
+ "404": {
546
+ "$ref": "#/components/responses/NotFound"
547
+ },
548
+ "409": {
549
+ "$ref": "#/components/responses/Conflict"
550
+ },
551
+ "500": {
552
+ "$ref": "#/components/responses/InternalError"
553
+ },
554
+ "501": {
555
+ "$ref": "#/components/responses/NotImplemented"
556
+ },
557
+ "503": {
558
+ "$ref": "#/components/responses/ServiceUnavailable"
559
+ }
560
+ }
561
+ }
562
+ },
563
+ "/v1/inbox/commands/unsnooze": {
564
+ "post": {
565
+ "summary": "Unsnooze the active WorkCycle",
566
+ "operationId": "unsnoozeConversation",
567
+ "tags": [
568
+ "Inbox commands"
569
+ ],
570
+ "parameters": [
571
+ {
572
+ "$ref": "#/components/parameters/ClientOrgId"
573
+ }
574
+ ],
575
+ "requestBody": {
576
+ "$ref": "#/components/requestBodies/BaseCommand"
577
+ },
578
+ "responses": {
579
+ "200": {
580
+ "$ref": "#/components/responses/CommandApplied"
581
+ },
582
+ "400": {
583
+ "$ref": "#/components/responses/BadRequest"
584
+ },
585
+ "401": {
586
+ "$ref": "#/components/responses/Unauthorized"
587
+ },
588
+ "403": {
589
+ "$ref": "#/components/responses/Forbidden"
590
+ },
591
+ "404": {
592
+ "$ref": "#/components/responses/NotFound"
593
+ },
594
+ "409": {
595
+ "$ref": "#/components/responses/Conflict"
596
+ },
597
+ "500": {
598
+ "$ref": "#/components/responses/InternalError"
599
+ },
600
+ "501": {
601
+ "$ref": "#/components/responses/NotImplemented"
602
+ },
603
+ "503": {
604
+ "$ref": "#/components/responses/ServiceUnavailable"
605
+ }
606
+ }
607
+ }
608
+ },
609
+ "/v1/inbox/commands/set-reminder": {
610
+ "post": {
611
+ "summary": "Set the owner Reminder",
612
+ "operationId": "setConversationReminder",
613
+ "tags": [
614
+ "Inbox commands"
615
+ ],
616
+ "parameters": [
617
+ {
618
+ "$ref": "#/components/parameters/ClientOrgId"
619
+ }
620
+ ],
621
+ "requestBody": {
622
+ "$ref": "#/components/requestBodies/SetReminderCommand"
623
+ },
624
+ "responses": {
625
+ "200": {
626
+ "$ref": "#/components/responses/CommandApplied"
627
+ },
628
+ "400": {
629
+ "$ref": "#/components/responses/BadRequest"
630
+ },
631
+ "401": {
632
+ "$ref": "#/components/responses/Unauthorized"
633
+ },
634
+ "403": {
635
+ "$ref": "#/components/responses/Forbidden"
636
+ },
637
+ "404": {
638
+ "$ref": "#/components/responses/NotFound"
639
+ },
640
+ "409": {
641
+ "$ref": "#/components/responses/Conflict"
642
+ },
643
+ "500": {
644
+ "$ref": "#/components/responses/InternalError"
645
+ },
646
+ "501": {
647
+ "$ref": "#/components/responses/NotImplemented"
648
+ },
649
+ "503": {
650
+ "$ref": "#/components/responses/ServiceUnavailable"
651
+ }
652
+ }
653
+ }
654
+ },
655
+ "/v1/inbox/commands/clear-reminder": {
656
+ "post": {
657
+ "summary": "Clear the owner Reminder",
658
+ "operationId": "clearConversationReminder",
659
+ "tags": [
660
+ "Inbox commands"
661
+ ],
662
+ "parameters": [
663
+ {
664
+ "$ref": "#/components/parameters/ClientOrgId"
665
+ }
666
+ ],
667
+ "requestBody": {
668
+ "$ref": "#/components/requestBodies/BaseCommand"
669
+ },
670
+ "responses": {
671
+ "200": {
672
+ "$ref": "#/components/responses/CommandApplied"
673
+ },
674
+ "400": {
675
+ "$ref": "#/components/responses/BadRequest"
676
+ },
677
+ "401": {
678
+ "$ref": "#/components/responses/Unauthorized"
679
+ },
680
+ "403": {
681
+ "$ref": "#/components/responses/Forbidden"
682
+ },
683
+ "404": {
684
+ "$ref": "#/components/responses/NotFound"
685
+ },
686
+ "409": {
687
+ "$ref": "#/components/responses/Conflict"
688
+ },
689
+ "500": {
690
+ "$ref": "#/components/responses/InternalError"
691
+ },
692
+ "501": {
693
+ "$ref": "#/components/responses/NotImplemented"
694
+ },
695
+ "503": {
696
+ "$ref": "#/components/responses/ServiceUnavailable"
697
+ }
698
+ }
699
+ }
700
+ },
701
+ "/v1/inbox/commands/close": {
702
+ "post": {
703
+ "summary": "Close the active WorkCycle",
704
+ "operationId": "closeConversation",
705
+ "tags": [
706
+ "Inbox commands"
707
+ ],
708
+ "parameters": [
709
+ {
710
+ "$ref": "#/components/parameters/ClientOrgId"
711
+ }
712
+ ],
713
+ "requestBody": {
714
+ "$ref": "#/components/requestBodies/CloseCommand"
715
+ },
716
+ "responses": {
717
+ "200": {
718
+ "$ref": "#/components/responses/CommandApplied"
719
+ },
720
+ "400": {
721
+ "$ref": "#/components/responses/BadRequest"
722
+ },
723
+ "401": {
724
+ "$ref": "#/components/responses/Unauthorized"
725
+ },
726
+ "403": {
727
+ "$ref": "#/components/responses/Forbidden"
728
+ },
729
+ "404": {
730
+ "$ref": "#/components/responses/NotFound"
731
+ },
732
+ "409": {
733
+ "$ref": "#/components/responses/Conflict"
734
+ },
735
+ "500": {
736
+ "$ref": "#/components/responses/InternalError"
737
+ },
738
+ "501": {
739
+ "$ref": "#/components/responses/NotImplemented"
740
+ },
741
+ "503": {
742
+ "$ref": "#/components/responses/ServiceUnavailable"
743
+ }
744
+ }
745
+ }
746
+ },
747
+ "/v1/inbox/commands/acknowledge-attention": {
748
+ "post": {
749
+ "summary": "Record an authorized viewer acknowledgement of active Needs Attention",
750
+ "operationId": "acknowledgeInboxAttention",
751
+ "tags": [
752
+ "Inbox commands"
753
+ ],
754
+ "parameters": [
755
+ {
756
+ "$ref": "#/components/parameters/ClientOrgId"
757
+ }
758
+ ],
759
+ "requestBody": {
760
+ "$ref": "#/components/requestBodies/AcknowledgeAttentionCommand"
761
+ },
762
+ "responses": {
763
+ "200": {
764
+ "$ref": "#/components/responses/CommandApplied"
765
+ },
766
+ "400": {
767
+ "$ref": "#/components/responses/BadRequest"
768
+ },
769
+ "401": {
770
+ "$ref": "#/components/responses/Unauthorized"
771
+ },
772
+ "403": {
773
+ "$ref": "#/components/responses/Forbidden"
774
+ },
775
+ "404": {
776
+ "$ref": "#/components/responses/NotFound"
777
+ },
778
+ "409": {
779
+ "$ref": "#/components/responses/Conflict"
780
+ },
781
+ "500": {
782
+ "$ref": "#/components/responses/InternalError"
783
+ },
784
+ "501": {
785
+ "$ref": "#/components/responses/NotImplemented"
786
+ },
787
+ "503": {
788
+ "$ref": "#/components/responses/ServiceUnavailable"
789
+ }
790
+ }
791
+ }
792
+ },
793
+ "/v1/inbox/commands/resolve-attention": {
794
+ "post": {
795
+ "summary": "Resolve active Needs Attention without closing the WorkCycle",
796
+ "operationId": "resolveInboxAttention",
797
+ "tags": [
798
+ "Inbox commands"
799
+ ],
800
+ "parameters": [
801
+ {
802
+ "$ref": "#/components/parameters/ClientOrgId"
803
+ }
804
+ ],
805
+ "requestBody": {
806
+ "$ref": "#/components/requestBodies/ResolveAttentionCommand"
807
+ },
808
+ "responses": {
809
+ "200": {
810
+ "$ref": "#/components/responses/CommandApplied"
811
+ },
812
+ "400": {
813
+ "$ref": "#/components/responses/BadRequest"
814
+ },
815
+ "401": {
816
+ "$ref": "#/components/responses/Unauthorized"
817
+ },
818
+ "403": {
819
+ "$ref": "#/components/responses/Forbidden"
820
+ },
821
+ "404": {
822
+ "$ref": "#/components/responses/NotFound"
823
+ },
824
+ "409": {
825
+ "$ref": "#/components/responses/Conflict"
826
+ },
827
+ "500": {
828
+ "$ref": "#/components/responses/InternalError"
829
+ },
830
+ "501": {
831
+ "$ref": "#/components/responses/NotImplemented"
832
+ },
833
+ "503": {
834
+ "$ref": "#/components/responses/ServiceUnavailable"
835
+ }
836
+ }
837
+ }
838
+ },
839
+ "/v1/inbox/commands/add-internal-comment": {
840
+ "post": {
841
+ "summary": "Add an internal comment and fan out Mentions on the active WorkCycle",
842
+ "operationId": "addInboxInternalComment",
843
+ "tags": [
844
+ "Inbox commands"
845
+ ],
846
+ "parameters": [
847
+ {
848
+ "$ref": "#/components/parameters/ClientOrgId"
849
+ }
850
+ ],
851
+ "requestBody": {
852
+ "$ref": "#/components/requestBodies/AddInternalCommentCommand"
853
+ },
854
+ "responses": {
855
+ "200": {
856
+ "$ref": "#/components/responses/InternalCommentApplied"
857
+ },
858
+ "400": {
859
+ "$ref": "#/components/responses/BadRequest"
860
+ },
861
+ "401": {
862
+ "$ref": "#/components/responses/Unauthorized"
863
+ },
864
+ "403": {
865
+ "$ref": "#/components/responses/Forbidden"
866
+ },
867
+ "404": {
868
+ "$ref": "#/components/responses/NotFound"
869
+ },
870
+ "409": {
871
+ "$ref": "#/components/responses/Conflict"
872
+ },
873
+ "500": {
874
+ "$ref": "#/components/responses/InternalError"
875
+ },
876
+ "501": {
877
+ "$ref": "#/components/responses/NotImplemented"
878
+ },
879
+ "503": {
880
+ "$ref": "#/components/responses/ServiceUnavailable"
881
+ }
882
+ }
883
+ }
884
+ },
885
+ "/v1/inbox/commands/advance-read-cursor": {
886
+ "post": {
887
+ "summary": "Monotonically advance the authenticated viewer's Conversation read cursor",
888
+ "operationId": "advanceInboxReadCursor",
889
+ "tags": [
890
+ "Inbox commands"
891
+ ],
892
+ "parameters": [
893
+ {
894
+ "$ref": "#/components/parameters/ClientOrgId"
895
+ }
896
+ ],
897
+ "requestBody": {
898
+ "$ref": "#/components/requestBodies/AdvanceReadCursorCommand"
899
+ },
900
+ "responses": {
901
+ "200": {
902
+ "$ref": "#/components/responses/ReadCursorAdvanced"
903
+ },
904
+ "400": {
905
+ "$ref": "#/components/responses/BadRequest"
906
+ },
907
+ "401": {
908
+ "$ref": "#/components/responses/Unauthorized"
909
+ },
910
+ "403": {
911
+ "$ref": "#/components/responses/Forbidden"
912
+ },
913
+ "404": {
914
+ "$ref": "#/components/responses/NotFound"
915
+ },
916
+ "409": {
917
+ "$ref": "#/components/responses/Conflict"
918
+ },
919
+ "500": {
920
+ "$ref": "#/components/responses/InternalError"
921
+ },
922
+ "501": {
923
+ "$ref": "#/components/responses/NotImplemented"
924
+ },
925
+ "503": {
926
+ "$ref": "#/components/responses/ServiceUnavailable"
927
+ }
928
+ }
929
+ }
930
+ },
931
+ "/v1/inbox/commands/add-customer-note": {
932
+ "post": {
933
+ "summary": "Add a durable note to the authorized Conversation Customer",
934
+ "description": "Requires the ADD_CUSTOMER_NOTE capability. Adding a note has no ownership dimension -- a note belongs to the Customer rather than to a WorkCycle or an owner -- so there is no OWNED/ANY pair for it.",
935
+ "operationId": "addInboxCustomerNote",
936
+ "tags": [
937
+ "Inbox commands"
938
+ ],
939
+ "parameters": [
940
+ {
941
+ "$ref": "#/components/parameters/ClientOrgId"
942
+ }
943
+ ],
944
+ "requestBody": {
945
+ "$ref": "#/components/requestBodies/AddCustomerNoteCommand"
946
+ },
947
+ "responses": {
948
+ "200": {
949
+ "$ref": "#/components/responses/CustomerNoteCommandApplied"
950
+ },
951
+ "400": {
952
+ "$ref": "#/components/responses/BadRequest"
953
+ },
954
+ "401": {
955
+ "$ref": "#/components/responses/Unauthorized"
956
+ },
957
+ "403": {
958
+ "$ref": "#/components/responses/Forbidden"
959
+ },
960
+ "404": {
961
+ "$ref": "#/components/responses/NotFound"
962
+ },
963
+ "409": {
964
+ "$ref": "#/components/responses/Conflict"
965
+ },
966
+ "500": {
967
+ "$ref": "#/components/responses/InternalError"
968
+ },
969
+ "501": {
970
+ "$ref": "#/components/responses/NotImplemented"
971
+ },
972
+ "503": {
973
+ "$ref": "#/components/responses/ServiceUnavailable"
974
+ }
975
+ }
976
+ }
977
+ },
978
+ "/v1/inbox/commands/delete-customer-note": {
979
+ "post": {
980
+ "summary": "Soft-delete a durable Customer note",
981
+ "description": "Requires the DELETE_ANY_CUSTOMER_NOTE capability. Kept separate from ADD_CUSTOMER_NOTE and deliberately ANY-scoped. A delete removes a durable Customer fact from every future WorkCycle and from the context Pam reads before replying. That is a stronger act than adding one and is not implied by it. A narrower DELETE_OWN_CUSTOMER_NOTE can be added later without changing this operation because CustomerNote carries authorUserId.",
982
+ "operationId": "deleteInboxCustomerNote",
983
+ "tags": [
984
+ "Inbox commands"
985
+ ],
986
+ "parameters": [
987
+ {
988
+ "$ref": "#/components/parameters/ClientOrgId"
989
+ }
990
+ ],
991
+ "requestBody": {
992
+ "$ref": "#/components/requestBodies/DeleteCustomerNoteCommand"
993
+ },
994
+ "responses": {
995
+ "200": {
996
+ "$ref": "#/components/responses/CustomerNoteCommandApplied"
997
+ },
998
+ "400": {
999
+ "$ref": "#/components/responses/BadRequest"
1000
+ },
1001
+ "401": {
1002
+ "$ref": "#/components/responses/Unauthorized"
1003
+ },
1004
+ "403": {
1005
+ "$ref": "#/components/responses/Forbidden"
1006
+ },
1007
+ "404": {
1008
+ "$ref": "#/components/responses/NotFound"
1009
+ },
1010
+ "409": {
1011
+ "$ref": "#/components/responses/Conflict"
1012
+ },
1013
+ "500": {
1014
+ "$ref": "#/components/responses/InternalError"
1015
+ },
1016
+ "501": {
1017
+ "$ref": "#/components/responses/NotImplemented"
1018
+ },
1019
+ "503": {
1020
+ "$ref": "#/components/responses/ServiceUnavailable"
1021
+ }
1022
+ }
1023
+ }
1024
+ },
1025
+ "/v1/inbox/commands/mark-notification-read": {
1026
+ "post": {
1027
+ "summary": "Mark one recipient-owned notification read",
1028
+ "operationId": "markInboxNotificationRead",
1029
+ "tags": [
1030
+ "Inbox commands"
1031
+ ],
1032
+ "parameters": [
1033
+ {
1034
+ "$ref": "#/components/parameters/ClientOrgId"
1035
+ }
1036
+ ],
1037
+ "requestBody": {
1038
+ "$ref": "#/components/requestBodies/NotificationCommand"
1039
+ },
1040
+ "responses": {
1041
+ "200": {
1042
+ "$ref": "#/components/responses/NotificationCommandApplied"
1043
+ },
1044
+ "400": {
1045
+ "$ref": "#/components/responses/BadRequest"
1046
+ },
1047
+ "401": {
1048
+ "$ref": "#/components/responses/Unauthorized"
1049
+ },
1050
+ "403": {
1051
+ "$ref": "#/components/responses/Forbidden"
1052
+ },
1053
+ "404": {
1054
+ "$ref": "#/components/responses/NotFound"
1055
+ },
1056
+ "409": {
1057
+ "$ref": "#/components/responses/Conflict"
1058
+ },
1059
+ "500": {
1060
+ "$ref": "#/components/responses/InternalError"
1061
+ },
1062
+ "503": {
1063
+ "$ref": "#/components/responses/ServiceUnavailable"
1064
+ }
1065
+ }
1066
+ }
1067
+ },
1068
+ "/v1/inbox/commands/dismiss-notification": {
1069
+ "post": {
1070
+ "summary": "Dismiss one recipient-owned notification and mark it read",
1071
+ "operationId": "dismissInboxNotification",
1072
+ "tags": [
1073
+ "Inbox commands"
1074
+ ],
1075
+ "parameters": [
1076
+ {
1077
+ "$ref": "#/components/parameters/ClientOrgId"
1078
+ }
1079
+ ],
1080
+ "requestBody": {
1081
+ "$ref": "#/components/requestBodies/NotificationCommand"
1082
+ },
1083
+ "responses": {
1084
+ "200": {
1085
+ "$ref": "#/components/responses/NotificationCommandApplied"
1086
+ },
1087
+ "400": {
1088
+ "$ref": "#/components/responses/BadRequest"
1089
+ },
1090
+ "401": {
1091
+ "$ref": "#/components/responses/Unauthorized"
1092
+ },
1093
+ "403": {
1094
+ "$ref": "#/components/responses/Forbidden"
1095
+ },
1096
+ "404": {
1097
+ "$ref": "#/components/responses/NotFound"
1098
+ },
1099
+ "409": {
1100
+ "$ref": "#/components/responses/Conflict"
1101
+ },
1102
+ "500": {
1103
+ "$ref": "#/components/responses/InternalError"
1104
+ },
1105
+ "503": {
1106
+ "$ref": "#/components/responses/ServiceUnavailable"
1107
+ }
1108
+ }
1109
+ }
1110
+ }
1111
+ },
1112
+ "components": {
1113
+ "securitySchemes": {
1114
+ "dashboardIdentity": {
1115
+ "type": "http",
1116
+ "scheme": "bearer",
1117
+ "bearerFormat": "JWT",
1118
+ "description": "Existing dashboard identity; DASH-233 owns enforcement."
1119
+ }
1120
+ },
1121
+ "headers": {
1122
+ "CorrelationId": {
1123
+ "description": "Stable request correlation identifier.",
1124
+ "schema": {
1125
+ "type": "string",
1126
+ "minLength": 1
1127
+ }
1128
+ }
1129
+ },
1130
+ "parameters": {
1131
+ "ClientOrgId": {
1132
+ "name": "x-client-org-id",
1133
+ "in": "header",
1134
+ "required": true,
1135
+ "description": "Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution.",
1136
+ "schema": {
1137
+ "type": "string",
1138
+ "minLength": 1
1139
+ }
1140
+ },
1141
+ "ConversationId": {
1142
+ "name": "conversationId",
1143
+ "in": "path",
1144
+ "required": true,
1145
+ "schema": {
1146
+ "type": "string",
1147
+ "format": "uuid"
1148
+ }
1149
+ }
1150
+ },
1151
+ "schemas": {
1152
+ "InboxScope": {
1153
+ "type": "string",
1154
+ "enum": [
1155
+ "MY_INBOX",
1156
+ "TEAM_INBOX",
1157
+ "MENTIONS",
1158
+ "CUSTOMERS",
1159
+ "RO"
1160
+ ]
1161
+ },
1162
+ "WorkCycleStatus": {
1163
+ "type": "string",
1164
+ "enum": [
1165
+ "OPEN",
1166
+ "SNOOZED",
1167
+ "RESOLVED"
1168
+ ]
1169
+ },
1170
+ "AvailabilityState": {
1171
+ "type": "string",
1172
+ "enum": [
1173
+ "available",
1174
+ "missing",
1175
+ "stale",
1176
+ "timeout",
1177
+ "unauthorized",
1178
+ "unsupported"
1179
+ ]
1180
+ },
1181
+ "Availability": {
1182
+ "type": "object",
1183
+ "additionalProperties": false,
1184
+ "required": [
1185
+ "state"
1186
+ ],
1187
+ "properties": {
1188
+ "state": {
1189
+ "$ref": "#/components/schemas/AvailabilityState"
1190
+ },
1191
+ "source": {
1192
+ "type": "string"
1193
+ },
1194
+ "observedAt": {
1195
+ "type": "string",
1196
+ "format": "date-time"
1197
+ },
1198
+ "reason": {
1199
+ "type": "string",
1200
+ "maxLength": 512
1201
+ }
1202
+ }
1203
+ },
1204
+ "HydratedText": {
1205
+ "type": "object",
1206
+ "additionalProperties": false,
1207
+ "required": [
1208
+ "availability"
1209
+ ],
1210
+ "properties": {
1211
+ "value": {
1212
+ "type": [
1213
+ "string",
1214
+ "null"
1215
+ ]
1216
+ },
1217
+ "availability": {
1218
+ "$ref": "#/components/schemas/Availability"
1219
+ }
1220
+ }
1221
+ },
1222
+ "HydratedStringList": {
1223
+ "type": "object",
1224
+ "additionalProperties": false,
1225
+ "required": [
1226
+ "value",
1227
+ "availability"
1228
+ ],
1229
+ "properties": {
1230
+ "value": {
1231
+ "oneOf": [
1232
+ {
1233
+ "type": "array",
1234
+ "items": {
1235
+ "type": "string"
1236
+ },
1237
+ "uniqueItems": true
1238
+ },
1239
+ {
1240
+ "type": "null"
1241
+ }
1242
+ ]
1243
+ },
1244
+ "availability": {
1245
+ "$ref": "#/components/schemas/Availability"
1246
+ }
1247
+ }
1248
+ },
1249
+ "Owner": {
1250
+ "type": "object",
1251
+ "additionalProperties": false,
1252
+ "required": [
1253
+ "userId",
1254
+ "displayName"
1255
+ ],
1256
+ "properties": {
1257
+ "userId": {
1258
+ "type": "string"
1259
+ },
1260
+ "teamId": {
1261
+ "type": [
1262
+ "string",
1263
+ "null"
1264
+ ]
1265
+ },
1266
+ "displayName": {
1267
+ "$ref": "#/components/schemas/HydratedText"
1268
+ }
1269
+ }
1270
+ },
1271
+ "Reminder": {
1272
+ "type": "object",
1273
+ "additionalProperties": false,
1274
+ "required": [
1275
+ "id",
1276
+ "dueAt",
1277
+ "status",
1278
+ "version"
1279
+ ],
1280
+ "properties": {
1281
+ "id": {
1282
+ "type": "string",
1283
+ "format": "uuid"
1284
+ },
1285
+ "dueAt": {
1286
+ "type": "string",
1287
+ "format": "date-time"
1288
+ },
1289
+ "note": {
1290
+ "type": [
1291
+ "string",
1292
+ "null"
1293
+ ],
1294
+ "maxLength": 2000
1295
+ },
1296
+ "status": {
1297
+ "type": "string",
1298
+ "enum": [
1299
+ "PENDING",
1300
+ "FIRED",
1301
+ "CLEARED",
1302
+ "CANCELLED"
1303
+ ]
1304
+ },
1305
+ "version": {
1306
+ "type": "integer",
1307
+ "minimum": 1
1308
+ }
1309
+ }
1310
+ },
1311
+ "AttentionSummary": {
1312
+ "type": "object",
1313
+ "additionalProperties": false,
1314
+ "required": [
1315
+ "id",
1316
+ "category",
1317
+ "status",
1318
+ "openedAt",
1319
+ "version"
1320
+ ],
1321
+ "properties": {
1322
+ "id": {
1323
+ "type": "string",
1324
+ "format": "uuid"
1325
+ },
1326
+ "category": {
1327
+ "type": "string"
1328
+ },
1329
+ "status": {
1330
+ "type": "string",
1331
+ "enum": [
1332
+ "ACTIVE",
1333
+ "RESOLVED"
1334
+ ]
1335
+ },
1336
+ "openedAt": {
1337
+ "type": "string",
1338
+ "format": "date-time"
1339
+ },
1340
+ "version": {
1341
+ "type": "integer",
1342
+ "minimum": 1
1343
+ }
1344
+ }
1345
+ },
1346
+ "OverdueSummary": {
1347
+ "description": "Derived read-time Overdue presentation. It is never a mutable lifecycle flag.",
1348
+ "type": "object",
1349
+ "additionalProperties": false,
1350
+ "required": [
1351
+ "isOverdue",
1352
+ "overdueAt",
1353
+ "presentationSuppressedByReminder"
1354
+ ],
1355
+ "properties": {
1356
+ "isOverdue": {
1357
+ "type": "boolean"
1358
+ },
1359
+ "overdueAt": {
1360
+ "type": [
1361
+ "string",
1362
+ "null"
1363
+ ],
1364
+ "format": "date-time",
1365
+ "description": "Derived threshold timestamp, or null when no waiting anchor or policy applies."
1366
+ },
1367
+ "presentationSuppressedByReminder": {
1368
+ "type": "boolean",
1369
+ "description": "True when a pending owner Reminder suppresses the Overdue badge without erasing waiting history."
1370
+ }
1371
+ }
1372
+ },
1373
+ "OrdoCapability": {
1374
+ "description": "A single Ordo product capability. Capabilities are the only authorization vocabulary for Ordo surfaces. They are not a second half of the dashboard's resource/action permission model and do not divide the work with it. Resource permissions govern legacy dashboard surfaces and nothing else; capabilities govern Ordo surfaces and nothing else; neither is a fallback or an outer gate for the other. A same-named resource is a coincidence of vocabulary rather than a related grant, so REPAIR_ORDERS:READ says nothing about VIEW_OPEN_REPAIR_ORDERS and a User may hold either without the other. Resolved per rooftop by pam-permissions-service from the User's role, and enforced by pam-ordo-service. The distribution across personas is the approved capability contract in section 3.3 of the Ordo Product and Engineering Specification.",
1375
+ "type": "string",
1376
+ "enum": [
1377
+ "VIEW_OWN_INBOX",
1378
+ "VIEW_TEAM_INBOX",
1379
+ "VIEW_CUSTOMER_DIRECTORY",
1380
+ "SWITCH_ROOFTOP",
1381
+ "VIEW_ANY_ROOFTOP_CONVERSATION",
1382
+ "VIEW_OPEN_REPAIR_ORDERS",
1383
+ "VIEW_ALL_OPEN_REPAIR_ORDERS",
1384
+ "ASSIGN_OWNED_WORK",
1385
+ "ASSIGN_ANY_WORK",
1386
+ "CLOSE_OWNED_WORK",
1387
+ "CLOSE_ANY_WORK",
1388
+ "RESOLVE_NEEDS_ATTENTION",
1389
+ "MENTION_USERS",
1390
+ "ADD_CUSTOMER_NOTE",
1391
+ "DELETE_ANY_CUSTOMER_NOTE"
1392
+ ]
1393
+ },
1394
+ "InboxPolicyUserTargetV1": {
1395
+ "description": "A configured target for one stable rooftop User identity.",
1396
+ "type": "object",
1397
+ "additionalProperties": false,
1398
+ "required": [
1399
+ "type",
1400
+ "userId"
1401
+ ],
1402
+ "properties": {
1403
+ "type": {
1404
+ "type": "string",
1405
+ "const": "USER"
1406
+ },
1407
+ "userId": {
1408
+ "type": "string",
1409
+ "minLength": 1,
1410
+ "maxLength": 512
1411
+ }
1412
+ }
1413
+ },
1414
+ "InboxPolicyTeamTargetV1": {
1415
+ "description": "A configured Team target identified by the dashboard user-group ID. The authority resolves this target to concrete eligible Users at use time.",
1416
+ "type": "object",
1417
+ "additionalProperties": false,
1418
+ "required": [
1419
+ "type",
1420
+ "dashboardGroupId"
1421
+ ],
1422
+ "properties": {
1423
+ "type": {
1424
+ "type": "string",
1425
+ "const": "TEAM"
1426
+ },
1427
+ "dashboardGroupId": {
1428
+ "type": "string",
1429
+ "minLength": 1,
1430
+ "maxLength": 512
1431
+ }
1432
+ }
1433
+ },
1434
+ "InboxPolicyUnassignedTargetV1": {
1435
+ "description": "Retain work without an owner while keeping it manager-visible.",
1436
+ "type": "object",
1437
+ "additionalProperties": false,
1438
+ "required": [
1439
+ "type"
1440
+ ],
1441
+ "properties": {
1442
+ "type": {
1443
+ "type": "string",
1444
+ "const": "UNASSIGNED"
1445
+ }
1446
+ }
1447
+ },
1448
+ "InboxPolicyRecipientTargetV1": {
1449
+ "oneOf": [
1450
+ {
1451
+ "$ref": "#/components/schemas/InboxPolicyUserTargetV1"
1452
+ },
1453
+ {
1454
+ "$ref": "#/components/schemas/InboxPolicyTeamTargetV1"
1455
+ }
1456
+ ],
1457
+ "discriminator": {
1458
+ "propertyName": "type",
1459
+ "mapping": {
1460
+ "USER": "#/components/schemas/InboxPolicyUserTargetV1",
1461
+ "TEAM": "#/components/schemas/InboxPolicyTeamTargetV1"
1462
+ }
1463
+ }
1464
+ },
1465
+ "InboxPolicyRoutingTargetV1": {
1466
+ "oneOf": [
1467
+ {
1468
+ "$ref": "#/components/schemas/InboxPolicyUserTargetV1"
1469
+ },
1470
+ {
1471
+ "$ref": "#/components/schemas/InboxPolicyTeamTargetV1"
1472
+ },
1473
+ {
1474
+ "$ref": "#/components/schemas/InboxPolicyUnassignedTargetV1"
1475
+ }
1476
+ ],
1477
+ "discriminator": {
1478
+ "propertyName": "type",
1479
+ "mapping": {
1480
+ "USER": "#/components/schemas/InboxPolicyUserTargetV1",
1481
+ "TEAM": "#/components/schemas/InboxPolicyTeamTargetV1",
1482
+ "UNASSIGNED": "#/components/schemas/InboxPolicyUnassignedTargetV1"
1483
+ }
1484
+ }
1485
+ },
1486
+ "InboxPolicyNeedsAttentionV1": {
1487
+ "type": "object",
1488
+ "additionalProperties": false,
1489
+ "required": [
1490
+ "enabled",
1491
+ "recipients"
1492
+ ],
1493
+ "properties": {
1494
+ "enabled": {
1495
+ "type": "boolean"
1496
+ },
1497
+ "recipients": {
1498
+ "type": "array",
1499
+ "maxItems": 50,
1500
+ "uniqueItems": true,
1501
+ "items": {
1502
+ "$ref": "#/components/schemas/InboxPolicyRecipientTargetV1"
1503
+ }
1504
+ }
1505
+ }
1506
+ },
1507
+ "InboxPolicyCategoryV1": {
1508
+ "description": "Behavior for one producer classification. Legacy escalation tiers are not accepted.",
1509
+ "type": "object",
1510
+ "additionalProperties": false,
1511
+ "required": [
1512
+ "category",
1513
+ "enabled",
1514
+ "createsWorkCycle",
1515
+ "routing",
1516
+ "needsAttention"
1517
+ ],
1518
+ "properties": {
1519
+ "category": {
1520
+ "type": "string",
1521
+ "minLength": 1,
1522
+ "maxLength": 128
1523
+ },
1524
+ "enabled": {
1525
+ "type": "boolean"
1526
+ },
1527
+ "createsWorkCycle": {
1528
+ "type": "boolean"
1529
+ },
1530
+ "routing": {
1531
+ "$ref": "#/components/schemas/InboxPolicyRoutingTargetV1"
1532
+ },
1533
+ "needsAttention": {
1534
+ "$ref": "#/components/schemas/InboxPolicyNeedsAttentionV1"
1535
+ }
1536
+ }
1537
+ },
1538
+ "InboxPolicyOverdueDisabledV1": {
1539
+ "type": "object",
1540
+ "additionalProperties": false,
1541
+ "required": [
1542
+ "enabled"
1543
+ ],
1544
+ "properties": {
1545
+ "enabled": {
1546
+ "type": "boolean",
1547
+ "const": false
1548
+ }
1549
+ }
1550
+ },
1551
+ "InboxPolicyOverdueEnabledV1": {
1552
+ "type": "object",
1553
+ "additionalProperties": false,
1554
+ "required": [
1555
+ "enabled",
1556
+ "thresholdMinutes"
1557
+ ],
1558
+ "properties": {
1559
+ "enabled": {
1560
+ "type": "boolean",
1561
+ "const": true
1562
+ },
1563
+ "thresholdMinutes": {
1564
+ "type": "integer",
1565
+ "minimum": 1,
1566
+ "maximum": 10080
1567
+ }
1568
+ }
1569
+ },
1570
+ "InboxPolicyOverdueV1": {
1571
+ "oneOf": [
1572
+ {
1573
+ "$ref": "#/components/schemas/InboxPolicyOverdueDisabledV1"
1574
+ },
1575
+ {
1576
+ "$ref": "#/components/schemas/InboxPolicyOverdueEnabledV1"
1577
+ }
1578
+ ]
1579
+ },
1580
+ "InboxPolicyNotificationKindV1": {
1581
+ "type": "string",
1582
+ "enum": [
1583
+ "needs_attention",
1584
+ "overdue",
1585
+ "ro_opened",
1586
+ "ro_closed"
1587
+ ]
1588
+ },
1589
+ "InboxPolicyNotificationRuleV1": {
1590
+ "type": "object",
1591
+ "additionalProperties": false,
1592
+ "required": [
1593
+ "kind",
1594
+ "enabled",
1595
+ "recipients"
1596
+ ],
1597
+ "properties": {
1598
+ "kind": {
1599
+ "$ref": "#/components/schemas/InboxPolicyNotificationKindV1"
1600
+ },
1601
+ "enabled": {
1602
+ "type": "boolean"
1603
+ },
1604
+ "recipients": {
1605
+ "type": "array",
1606
+ "maxItems": 50,
1607
+ "uniqueItems": true,
1608
+ "items": {
1609
+ "$ref": "#/components/schemas/InboxPolicyRecipientTargetV1"
1610
+ }
1611
+ }
1612
+ }
1613
+ },
1614
+ "InboxPolicyV1": {
1615
+ "description": "Strict rooftop policy stored at ClientInfo.pamConfig.ordoInbox. policyVersion is derived by consumers from canonical normalized policy content and is not stored inside the policy. Legacy timed escalation configuration is outside this schema and must never be translated implicitly.",
1616
+ "type": "object",
1617
+ "additionalProperties": false,
1618
+ "required": [
1619
+ "schemaVersion",
1620
+ "categories",
1621
+ "overdue",
1622
+ "notifications"
1623
+ ],
1624
+ "properties": {
1625
+ "schemaVersion": {
1626
+ "type": "integer",
1627
+ "const": 1
1628
+ },
1629
+ "categories": {
1630
+ "type": "array",
1631
+ "maxItems": 100,
1632
+ "uniqueItems": true,
1633
+ "items": {
1634
+ "$ref": "#/components/schemas/InboxPolicyCategoryV1"
1635
+ }
1636
+ },
1637
+ "overdue": {
1638
+ "$ref": "#/components/schemas/InboxPolicyOverdueV1"
1639
+ },
1640
+ "notifications": {
1641
+ "type": "array",
1642
+ "maxItems": 20,
1643
+ "uniqueItems": true,
1644
+ "items": {
1645
+ "$ref": "#/components/schemas/InboxPolicyNotificationRuleV1"
1646
+ }
1647
+ }
1648
+ }
1649
+ },
1650
+ "InboxAuthorityPersonaV1": {
1651
+ "type": "string",
1652
+ "enum": [
1653
+ "SERVICE_ADVISOR",
1654
+ "SERVICE_MANAGER",
1655
+ "BDC_REPRESENTATIVE",
1656
+ "BDC_MANAGER"
1657
+ ]
1658
+ },
1659
+ "InboxTargetResolutionUserV1": {
1660
+ "type": "object",
1661
+ "additionalProperties": false,
1662
+ "required": [
1663
+ "userId",
1664
+ "persona",
1665
+ "capabilities"
1666
+ ],
1667
+ "properties": {
1668
+ "userId": {
1669
+ "type": "string",
1670
+ "minLength": 1,
1671
+ "maxLength": 512
1672
+ },
1673
+ "persona": {
1674
+ "$ref": "#/components/schemas/InboxAuthorityPersonaV1"
1675
+ },
1676
+ "capabilities": {
1677
+ "type": "array",
1678
+ "maxItems": 32,
1679
+ "uniqueItems": true,
1680
+ "items": {
1681
+ "$ref": "#/components/schemas/OrdoCapability"
1682
+ }
1683
+ }
1684
+ }
1685
+ },
1686
+ "InboxTargetResolutionStatusV1": {
1687
+ "description": "resolved has at least one eligible User; none has no eligible User; unavailable means the authority could not answer; ambiguous means the Team identity maps to more than one authoritative group.",
1688
+ "type": "string",
1689
+ "enum": [
1690
+ "resolved",
1691
+ "none",
1692
+ "unavailable",
1693
+ "ambiguous"
1694
+ ]
1695
+ },
1696
+ "InboxTargetResolutionResultV1": {
1697
+ "type": "object",
1698
+ "additionalProperties": false,
1699
+ "required": [
1700
+ "target",
1701
+ "status",
1702
+ "userIds"
1703
+ ],
1704
+ "properties": {
1705
+ "target": {
1706
+ "$ref": "#/components/schemas/InboxPolicyRecipientTargetV1"
1707
+ },
1708
+ "status": {
1709
+ "$ref": "#/components/schemas/InboxTargetResolutionStatusV1"
1710
+ },
1711
+ "userIds": {
1712
+ "type": "array",
1713
+ "maxItems": 250,
1714
+ "uniqueItems": true,
1715
+ "items": {
1716
+ "type": "string",
1717
+ "minLength": 1,
1718
+ "maxLength": 512
1719
+ }
1720
+ }
1721
+ }
1722
+ },
1723
+ "InboxTargetResolutionRequestV1": {
1724
+ "type": "object",
1725
+ "additionalProperties": false,
1726
+ "required": [
1727
+ "schemaVersion",
1728
+ "clientOrgId",
1729
+ "targets"
1730
+ ],
1731
+ "properties": {
1732
+ "schemaVersion": {
1733
+ "type": "integer",
1734
+ "const": 1
1735
+ },
1736
+ "clientOrgId": {
1737
+ "type": "string",
1738
+ "minLength": 1,
1739
+ "maxLength": 512
1740
+ },
1741
+ "targets": {
1742
+ "type": "array",
1743
+ "minItems": 1,
1744
+ "maxItems": 100,
1745
+ "uniqueItems": true,
1746
+ "items": {
1747
+ "$ref": "#/components/schemas/InboxPolicyRecipientTargetV1"
1748
+ }
1749
+ }
1750
+ }
1751
+ },
1752
+ "InboxTargetResolutionResponseV1": {
1753
+ "type": "object",
1754
+ "additionalProperties": false,
1755
+ "required": [
1756
+ "schemaVersion",
1757
+ "clientOrgId",
1758
+ "results",
1759
+ "users"
1760
+ ],
1761
+ "properties": {
1762
+ "schemaVersion": {
1763
+ "type": "integer",
1764
+ "const": 1
1765
+ },
1766
+ "clientOrgId": {
1767
+ "type": "string",
1768
+ "minLength": 1,
1769
+ "maxLength": 512
1770
+ },
1771
+ "results": {
1772
+ "type": "array",
1773
+ "minItems": 1,
1774
+ "maxItems": 100,
1775
+ "items": {
1776
+ "$ref": "#/components/schemas/InboxTargetResolutionResultV1"
1777
+ }
1778
+ },
1779
+ "users": {
1780
+ "description": "Concrete eligible Users, deduplicated across every requested target.",
1781
+ "type": "array",
1782
+ "maxItems": 250,
1783
+ "uniqueItems": true,
1784
+ "items": {
1785
+ "$ref": "#/components/schemas/InboxTargetResolutionUserV1"
1786
+ }
1787
+ }
1788
+ }
1789
+ },
1790
+ "ViewerState": {
1791
+ "description": "Read-time state specific to the authenticated viewer.",
1792
+ "type": "object",
1793
+ "additionalProperties": false,
1794
+ "required": [
1795
+ "unreadCount",
1796
+ "isMentionWatcher",
1797
+ "unreadMentionCount"
1798
+ ],
1799
+ "properties": {
1800
+ "unreadCount": {
1801
+ "type": "integer",
1802
+ "minimum": 0
1803
+ },
1804
+ "isMentionWatcher": {
1805
+ "type": "boolean",
1806
+ "description": "Whether the viewer has active Mentions-view membership for the current WorkCycle."
1807
+ },
1808
+ "unreadMentionCount": {
1809
+ "type": "integer",
1810
+ "minimum": 0
1811
+ },
1812
+ "readThroughInteractionId": {
1813
+ "type": [
1814
+ "string",
1815
+ "null"
1816
+ ],
1817
+ "format": "uuid",
1818
+ "description": "Latest Interaction the authenticated viewer has read in this Conversation."
1819
+ },
1820
+ "readThroughSequenceNumber": {
1821
+ "type": [
1822
+ "integer",
1823
+ "null"
1824
+ ],
1825
+ "minimum": 1,
1826
+ "description": "Authoritative Conversation sequence corresponding to readThroughInteractionId."
1827
+ }
1828
+ }
1829
+ },
1830
+ "AiContext": {
1831
+ "description": "Current conversation-wide AI projection; source availability is explicit per field.",
1832
+ "type": "object",
1833
+ "additionalProperties": false,
1834
+ "required": [
1835
+ "summary",
1836
+ "categories",
1837
+ "sentiment",
1838
+ "recommendedNextStep"
1839
+ ],
1840
+ "properties": {
1841
+ "summary": {
1842
+ "$ref": "#/components/schemas/HydratedText"
1843
+ },
1844
+ "categories": {
1845
+ "$ref": "#/components/schemas/HydratedStringList"
1846
+ },
1847
+ "sentiment": {
1848
+ "$ref": "#/components/schemas/HydratedText"
1849
+ },
1850
+ "recommendedNextStep": {
1851
+ "$ref": "#/components/schemas/HydratedText"
1852
+ }
1853
+ }
1854
+ },
1855
+ "InteractionSummary": {
1856
+ "description": "Read-time counts and channel indicators for the visible Conversation context.",
1857
+ "type": "object",
1858
+ "additionalProperties": false,
1859
+ "required": [
1860
+ "totalCount",
1861
+ "inboundCount",
1862
+ "outboundCount",
1863
+ "internalCount",
1864
+ "channels"
1865
+ ],
1866
+ "properties": {
1867
+ "totalCount": {
1868
+ "type": "integer",
1869
+ "minimum": 0
1870
+ },
1871
+ "inboundCount": {
1872
+ "type": "integer",
1873
+ "minimum": 0
1874
+ },
1875
+ "outboundCount": {
1876
+ "type": "integer",
1877
+ "minimum": 0
1878
+ },
1879
+ "internalCount": {
1880
+ "type": "integer",
1881
+ "minimum": 0
1882
+ },
1883
+ "channels": {
1884
+ "type": "array",
1885
+ "items": {
1886
+ "type": "string"
1887
+ },
1888
+ "uniqueItems": true
1889
+ }
1890
+ }
1891
+ },
1892
+ "AvailableAction": {
1893
+ "type": "string",
1894
+ "enum": [
1895
+ "ASSIGN",
1896
+ "SNOOZE",
1897
+ "UNSNOOZE",
1898
+ "SET_REMINDER",
1899
+ "CLEAR_REMINDER",
1900
+ "CLOSE",
1901
+ "RESOLVE_ATTENTION",
1902
+ "ADD_INTERNAL_COMMENT"
1903
+ ]
1904
+ },
1905
+ "InboxRow": {
1906
+ "type": "object",
1907
+ "additionalProperties": false,
1908
+ "required": [
1909
+ "conversationId",
1910
+ "clientOrgId",
1911
+ "customerId",
1912
+ "workCycle",
1913
+ "owner",
1914
+ "reminder",
1915
+ "attention",
1916
+ "overdue",
1917
+ "latestActivityAt",
1918
+ "customerDisplayName",
1919
+ "activeRepairOrders",
1920
+ "aiContext",
1921
+ "viewerState",
1922
+ "interactionSummary",
1923
+ "availableActions",
1924
+ "availability"
1925
+ ],
1926
+ "properties": {
1927
+ "conversationId": {
1928
+ "type": "string",
1929
+ "format": "uuid"
1930
+ },
1931
+ "clientOrgId": {
1932
+ "type": "string"
1933
+ },
1934
+ "customerId": {
1935
+ "type": "string"
1936
+ },
1937
+ "workCycle": {
1938
+ "oneOf": [
1939
+ {
1940
+ "$ref": "#/components/schemas/WorkCycleSummary"
1941
+ },
1942
+ {
1943
+ "type": "null"
1944
+ }
1945
+ ]
1946
+ },
1947
+ "owner": {
1948
+ "oneOf": [
1949
+ {
1950
+ "$ref": "#/components/schemas/Owner"
1951
+ },
1952
+ {
1953
+ "type": "null"
1954
+ }
1955
+ ]
1956
+ },
1957
+ "reminder": {
1958
+ "oneOf": [
1959
+ {
1960
+ "$ref": "#/components/schemas/Reminder"
1961
+ },
1962
+ {
1963
+ "type": "null"
1964
+ }
1965
+ ]
1966
+ },
1967
+ "attention": {
1968
+ "oneOf": [
1969
+ {
1970
+ "$ref": "#/components/schemas/AttentionSummary"
1971
+ },
1972
+ {
1973
+ "type": "null"
1974
+ }
1975
+ ]
1976
+ },
1977
+ "overdue": {
1978
+ "$ref": "#/components/schemas/OverdueSummary"
1979
+ },
1980
+ "latestActivityAt": {
1981
+ "type": "string",
1982
+ "format": "date-time"
1983
+ },
1984
+ "customerDisplayName": {
1985
+ "$ref": "#/components/schemas/HydratedText"
1986
+ },
1987
+ "customerPhone": {
1988
+ "allOf": [
1989
+ {
1990
+ "$ref": "#/components/schemas/HydratedText"
1991
+ }
1992
+ ],
1993
+ "description": "The Customer's contact telephone number, for placing an outbound call. Optional because no producer can supply it yet: Ordo stores a Customer reference and no payload, so this arrives with external Customer hydration. Absent and `{ value: null }` mean different things - absent is a producer that does not publish the field, null with an availability is a source that could not supply it."
1994
+ },
1995
+ "activeRepairOrders": {
1996
+ "type": "array",
1997
+ "description": "Current active RO context only; historical ROs remain customer context.",
1998
+ "items": {
1999
+ "$ref": "#/components/schemas/RepairOrderRef"
2000
+ }
2001
+ },
2002
+ "aiContext": {
2003
+ "$ref": "#/components/schemas/AiContext"
2004
+ },
2005
+ "viewerState": {
2006
+ "$ref": "#/components/schemas/ViewerState"
2007
+ },
2008
+ "interactionSummary": {
2009
+ "$ref": "#/components/schemas/InteractionSummary"
2010
+ },
2011
+ "availableActions": {
2012
+ "type": "array",
2013
+ "items": {
2014
+ "$ref": "#/components/schemas/AvailableAction"
2015
+ },
2016
+ "uniqueItems": true
2017
+ },
2018
+ "availability": {
2019
+ "type": "object",
2020
+ "additionalProperties": {
2021
+ "$ref": "#/components/schemas/Availability"
2022
+ }
2023
+ }
2024
+ }
2025
+ },
2026
+ "WorkCycleSummary": {
2027
+ "type": "object",
2028
+ "additionalProperties": false,
2029
+ "required": [
2030
+ "id",
2031
+ "cycleNumber",
2032
+ "status",
2033
+ "openedAt",
2034
+ "version"
2035
+ ],
2036
+ "properties": {
2037
+ "id": {
2038
+ "type": "string",
2039
+ "format": "uuid"
2040
+ },
2041
+ "cycleNumber": {
2042
+ "type": "integer",
2043
+ "minimum": 1
2044
+ },
2045
+ "status": {
2046
+ "$ref": "#/components/schemas/WorkCycleStatus"
2047
+ },
2048
+ "openedAt": {
2049
+ "type": "string",
2050
+ "format": "date-time"
2051
+ },
2052
+ "oldestUnrespondedAt": {
2053
+ "type": [
2054
+ "string",
2055
+ "null"
2056
+ ],
2057
+ "format": "date-time"
2058
+ },
2059
+ "snoozedAt": {
2060
+ "type": [
2061
+ "string",
2062
+ "null"
2063
+ ],
2064
+ "format": "date-time"
2065
+ },
2066
+ "resolvedAt": {
2067
+ "type": [
2068
+ "string",
2069
+ "null"
2070
+ ],
2071
+ "format": "date-time"
2072
+ },
2073
+ "version": {
2074
+ "type": "integer",
2075
+ "minimum": 1
2076
+ }
2077
+ }
2078
+ },
2079
+ "InboxCounts": {
2080
+ "type": "object",
2081
+ "additionalProperties": false,
2082
+ "required": [
2083
+ "total",
2084
+ "open",
2085
+ "snoozed",
2086
+ "overdue",
2087
+ "needsAttention",
2088
+ "resolved"
2089
+ ],
2090
+ "properties": {
2091
+ "total": {
2092
+ "type": "integer",
2093
+ "minimum": 0
2094
+ },
2095
+ "open": {
2096
+ "type": "integer",
2097
+ "minimum": 0
2098
+ },
2099
+ "snoozed": {
2100
+ "type": "integer",
2101
+ "minimum": 0
2102
+ },
2103
+ "overdue": {
2104
+ "type": "integer",
2105
+ "minimum": 0
2106
+ },
2107
+ "needsAttention": {
2108
+ "type": "integer",
2109
+ "minimum": 0
2110
+ },
2111
+ "resolved": {
2112
+ "type": "integer",
2113
+ "minimum": 0
2114
+ }
2115
+ }
2116
+ },
2117
+ "ContactRelationship": {
2118
+ "description": "How a Customer already relates to the reader, which decides what opening them does. OWN is the reader's own thread. COLLEAGUE is a thread somebody else at the rooftop has been handling — opening it shows their history, which is the point when you are about to ring a Customer another advisor has been working. NONE is a Customer nobody has messaged at all; the thread opens empty. COLLEAGUE and NONE are deliberately distinct: conflating them would let a picker promise an empty thread and then drop the reader into somebody else's conversation mid-sentence.",
2119
+ "type": "string",
2120
+ "enum": [
2121
+ "OWN",
2122
+ "COLLEAGUE",
2123
+ "NONE"
2124
+ ]
2125
+ },
2126
+ "ContactRow": {
2127
+ "type": "object",
2128
+ "additionalProperties": false,
2129
+ "required": [
2130
+ "customerId",
2131
+ "customerSourceSystem",
2132
+ "customerName",
2133
+ "customerPhone",
2134
+ "conversationId",
2135
+ "relationship",
2136
+ "availability"
2137
+ ],
2138
+ "properties": {
2139
+ "customerId": {
2140
+ "type": "string",
2141
+ "minLength": 1
2142
+ },
2143
+ "customerSourceSystem": {
2144
+ "type": "string",
2145
+ "minLength": 1,
2146
+ "description": "The system that issued customerId. Part of the Customer key, carried because an external id alone is not a Customer - two source systems may both issue the same one and mean different people."
2147
+ },
2148
+ "customerName": {
2149
+ "$ref": "#/components/schemas/HydratedText"
2150
+ },
2151
+ "customerPhone": {
2152
+ "$ref": "#/components/schemas/HydratedText"
2153
+ },
2154
+ "vehicleLabel": {
2155
+ "$ref": "#/components/schemas/HydratedText"
2156
+ },
2157
+ "openRepairOrder": {
2158
+ "description": "The Customer's open repair order, when they have one. Open only: a finished one says nothing that changes the call the advisor is about to make, because the car has gone home.",
2159
+ "oneOf": [
2160
+ {
2161
+ "$ref": "#/components/schemas/RepairOrderRef"
2162
+ },
2163
+ {
2164
+ "type": "null"
2165
+ }
2166
+ ]
2167
+ },
2168
+ "conversationId": {
2169
+ "type": [
2170
+ "string",
2171
+ "null"
2172
+ ],
2173
+ "description": "The Customer's most recent Conversation, or null when they have none. Null is a fact about the Customer rather than a hydration gap."
2174
+ },
2175
+ "relationship": {
2176
+ "$ref": "#/components/schemas/ContactRelationship"
2177
+ },
2178
+ "availability": {
2179
+ "$ref": "#/components/schemas/Availability"
2180
+ }
2181
+ }
2182
+ },
2183
+ "ContactSearchResponse": {
2184
+ "type": "object",
2185
+ "additionalProperties": false,
2186
+ "required": [
2187
+ "data"
2188
+ ],
2189
+ "properties": {
2190
+ "data": {
2191
+ "type": "object",
2192
+ "additionalProperties": false,
2193
+ "required": [
2194
+ "contacts"
2195
+ ],
2196
+ "properties": {
2197
+ "contacts": {
2198
+ "type": "array",
2199
+ "items": {
2200
+ "$ref": "#/components/schemas/ContactRow"
2201
+ }
2202
+ }
2203
+ }
2204
+ }
2205
+ }
2206
+ },
2207
+ "InboxListResponse": {
2208
+ "type": "object",
2209
+ "additionalProperties": false,
2210
+ "required": [
2211
+ "data",
2212
+ "meta"
2213
+ ],
2214
+ "properties": {
2215
+ "data": {
2216
+ "type": "object",
2217
+ "additionalProperties": false,
2218
+ "required": [
2219
+ "rows",
2220
+ "counts"
2221
+ ],
2222
+ "properties": {
2223
+ "rows": {
2224
+ "type": "array",
2225
+ "items": {
2226
+ "$ref": "#/components/schemas/InboxRow"
2227
+ }
2228
+ },
2229
+ "counts": {
2230
+ "$ref": "#/components/schemas/InboxCounts"
2231
+ }
2232
+ }
2233
+ },
2234
+ "meta": {
2235
+ "type": "object",
2236
+ "additionalProperties": false,
2237
+ "required": [
2238
+ "nextCursor"
2239
+ ],
2240
+ "properties": {
2241
+ "nextCursor": {
2242
+ "type": [
2243
+ "string",
2244
+ "null"
2245
+ ],
2246
+ "description": "Opaque keyset cursor."
2247
+ }
2248
+ }
2249
+ }
2250
+ }
2251
+ },
2252
+ "InteractionRef": {
2253
+ "type": "object",
2254
+ "additionalProperties": false,
2255
+ "required": [
2256
+ "id",
2257
+ "sequenceNumber",
2258
+ "kind",
2259
+ "direction",
2260
+ "occurredAt",
2261
+ "availability"
2262
+ ],
2263
+ "properties": {
2264
+ "id": {
2265
+ "type": "string",
2266
+ "format": "uuid"
2267
+ },
2268
+ "senderUserId": {
2269
+ "type": [
2270
+ "string",
2271
+ "null"
2272
+ ],
2273
+ "description": "Authenticated User who authored an internal comment; null for non-User senders."
2274
+ },
2275
+ "replyToInteractionId": {
2276
+ "type": [
2277
+ "string",
2278
+ "null"
2279
+ ],
2280
+ "format": "uuid",
2281
+ "description": "Root internal comment referenced by this comment. Replies are flattened to one level."
2282
+ },
2283
+ "mentions": {
2284
+ "type": "array",
2285
+ "maxItems": 50,
2286
+ "description": "Immutable recipient-specific Mention events created by this internal comment.",
2287
+ "items": {
2288
+ "$ref": "#/components/schemas/MentionRef"
2289
+ }
2290
+ },
2291
+ "workCycleId": {
2292
+ "type": [
2293
+ "string",
2294
+ "null"
2295
+ ],
2296
+ "format": "uuid",
2297
+ "description": "WorkCycle that was active when this Interaction was ingested, mirroring conversation_interaction_refs.work_cycle_id. Null is authoritative and means the Interaction belongs to no cycle, which is expected for RO transitions and other non-work events. Optional only to keep this addition a minor version; every producer emits it unconditionally and pam-ordo-service asserts that in its contract tests, so consumers should treat an absent field as a producer defect rather than a supported state. Consumers must never infer cycle membership from interaction timestamps."
2298
+ },
2299
+ "sequenceNumber": {
2300
+ "type": "integer",
2301
+ "minimum": 1
2302
+ },
2303
+ "kind": {
2304
+ "type": "string"
2305
+ },
2306
+ "channel": {
2307
+ "type": [
2308
+ "string",
2309
+ "null"
2310
+ ]
2311
+ },
2312
+ "direction": {
2313
+ "type": "string",
2314
+ "enum": [
2315
+ "INBOUND",
2316
+ "OUTBOUND",
2317
+ "INTERNAL"
2318
+ ]
2319
+ },
2320
+ "occurredAt": {
2321
+ "type": "string",
2322
+ "format": "date-time"
2323
+ },
2324
+ "body": {
2325
+ "oneOf": [
2326
+ {
2327
+ "$ref": "#/components/schemas/HydratedText"
2328
+ },
2329
+ {
2330
+ "type": "null"
2331
+ }
2332
+ ]
2333
+ },
2334
+ "availability": {
2335
+ "$ref": "#/components/schemas/Availability"
2336
+ }
2337
+ }
2338
+ },
2339
+ "MentionRef": {
2340
+ "type": "object",
2341
+ "additionalProperties": false,
2342
+ "required": [
2343
+ "id",
2344
+ "userId",
2345
+ "createdAt"
2346
+ ],
2347
+ "properties": {
2348
+ "id": {
2349
+ "type": "string",
2350
+ "format": "uuid"
2351
+ },
2352
+ "userId": {
2353
+ "type": "string",
2354
+ "minLength": 1
2355
+ },
2356
+ "createdAt": {
2357
+ "type": "string",
2358
+ "format": "date-time"
2359
+ }
2360
+ }
2361
+ },
2362
+ "VehicleRef": {
2363
+ "type": "object",
2364
+ "additionalProperties": false,
2365
+ "required": [
2366
+ "sourceSystem",
2367
+ "externalId",
2368
+ "year",
2369
+ "make",
2370
+ "model",
2371
+ "vin",
2372
+ "availability"
2373
+ ],
2374
+ "properties": {
2375
+ "sourceSystem": {
2376
+ "type": "string"
2377
+ },
2378
+ "externalId": {
2379
+ "type": "string"
2380
+ },
2381
+ "year": {
2382
+ "$ref": "#/components/schemas/HydratedText"
2383
+ },
2384
+ "make": {
2385
+ "$ref": "#/components/schemas/HydratedText"
2386
+ },
2387
+ "model": {
2388
+ "$ref": "#/components/schemas/HydratedText"
2389
+ },
2390
+ "vin": {
2391
+ "$ref": "#/components/schemas/HydratedText"
2392
+ },
2393
+ "availability": {
2394
+ "$ref": "#/components/schemas/Availability"
2395
+ }
2396
+ }
2397
+ },
2398
+ "RepairOrderRef": {
2399
+ "type": "object",
2400
+ "additionalProperties": false,
2401
+ "required": [
2402
+ "sourceSystem",
2403
+ "externalId",
2404
+ "relationship",
2405
+ "displayNumber",
2406
+ "status",
2407
+ "vehicle",
2408
+ "availability"
2409
+ ],
2410
+ "properties": {
2411
+ "sourceSystem": {
2412
+ "type": "string"
2413
+ },
2414
+ "externalId": {
2415
+ "type": "string"
2416
+ },
2417
+ "relationship": {
2418
+ "type": "string"
2419
+ },
2420
+ "displayNumber": {
2421
+ "$ref": "#/components/schemas/HydratedText"
2422
+ },
2423
+ "status": {
2424
+ "$ref": "#/components/schemas/HydratedText"
2425
+ },
2426
+ "vehicle": {
2427
+ "oneOf": [
2428
+ {
2429
+ "$ref": "#/components/schemas/VehicleRef"
2430
+ },
2431
+ {
2432
+ "type": "null"
2433
+ }
2434
+ ]
2435
+ },
2436
+ "availability": {
2437
+ "$ref": "#/components/schemas/Availability"
2438
+ }
2439
+ }
2440
+ },
2441
+ "ConversationDetailResponse": {
2442
+ "type": "object",
2443
+ "additionalProperties": false,
2444
+ "required": [
2445
+ "data"
2446
+ ],
2447
+ "properties": {
2448
+ "data": {
2449
+ "type": "object",
2450
+ "additionalProperties": false,
2451
+ "required": [
2452
+ "conversationId",
2453
+ "clientOrgId",
2454
+ "customerId",
2455
+ "version",
2456
+ "currentCycle",
2457
+ "owner",
2458
+ "reminder",
2459
+ "attention",
2460
+ "overdue",
2461
+ "customerDisplayName",
2462
+ "aiContext",
2463
+ "viewerState",
2464
+ "interactionSummary",
2465
+ "cycles",
2466
+ "interactions",
2467
+ "repairOrders",
2468
+ "availableActions",
2469
+ "availability"
2470
+ ],
2471
+ "properties": {
2472
+ "conversationId": {
2473
+ "type": "string",
2474
+ "format": "uuid"
2475
+ },
2476
+ "clientOrgId": {
2477
+ "type": "string"
2478
+ },
2479
+ "customerId": {
2480
+ "type": "string"
2481
+ },
2482
+ "version": {
2483
+ "type": "integer",
2484
+ "minimum": 1
2485
+ },
2486
+ "currentCycle": {
2487
+ "oneOf": [
2488
+ {
2489
+ "$ref": "#/components/schemas/WorkCycleSummary"
2490
+ },
2491
+ {
2492
+ "type": "null"
2493
+ }
2494
+ ]
2495
+ },
2496
+ "owner": {
2497
+ "oneOf": [
2498
+ {
2499
+ "$ref": "#/components/schemas/Owner"
2500
+ },
2501
+ {
2502
+ "type": "null"
2503
+ }
2504
+ ]
2505
+ },
2506
+ "reminder": {
2507
+ "oneOf": [
2508
+ {
2509
+ "$ref": "#/components/schemas/Reminder"
2510
+ },
2511
+ {
2512
+ "type": "null"
2513
+ }
2514
+ ]
2515
+ },
2516
+ "attention": {
2517
+ "oneOf": [
2518
+ {
2519
+ "$ref": "#/components/schemas/AttentionSummary"
2520
+ },
2521
+ {
2522
+ "type": "null"
2523
+ }
2524
+ ]
2525
+ },
2526
+ "overdue": {
2527
+ "$ref": "#/components/schemas/OverdueSummary"
2528
+ },
2529
+ "customerDisplayName": {
2530
+ "$ref": "#/components/schemas/HydratedText"
2531
+ },
2532
+ "customerPhone": {
2533
+ "allOf": [
2534
+ {
2535
+ "$ref": "#/components/schemas/HydratedText"
2536
+ }
2537
+ ],
2538
+ "description": "The Customer's contact telephone number, for placing an outbound call. Optional because no producer can supply it yet: Ordo stores a Customer reference and no payload, so this arrives with external Customer hydration. Absent and `{ value: null }` mean different things - absent is a producer that does not publish the field, null with an availability is a source that could not supply it."
2539
+ },
2540
+ "aiContext": {
2541
+ "$ref": "#/components/schemas/AiContext"
2542
+ },
2543
+ "viewerState": {
2544
+ "$ref": "#/components/schemas/ViewerState"
2545
+ },
2546
+ "interactionSummary": {
2547
+ "$ref": "#/components/schemas/InteractionSummary"
2548
+ },
2549
+ "cycles": {
2550
+ "type": "array",
2551
+ "items": {
2552
+ "$ref": "#/components/schemas/WorkCycleSummary"
2553
+ }
2554
+ },
2555
+ "interactions": {
2556
+ "type": "array",
2557
+ "items": {
2558
+ "$ref": "#/components/schemas/InteractionRef"
2559
+ }
2560
+ },
2561
+ "repairOrders": {
2562
+ "type": "array",
2563
+ "items": {
2564
+ "$ref": "#/components/schemas/RepairOrderRef"
2565
+ }
2566
+ },
2567
+ "availableActions": {
2568
+ "type": "array",
2569
+ "items": {
2570
+ "$ref": "#/components/schemas/AvailableAction"
2571
+ },
2572
+ "uniqueItems": true
2573
+ },
2574
+ "availability": {
2575
+ "type": "object",
2576
+ "additionalProperties": {
2577
+ "$ref": "#/components/schemas/Availability"
2578
+ }
2579
+ }
2580
+ }
2581
+ }
2582
+ }
2583
+ },
2584
+ "CustomerNote": {
2585
+ "description": "Ordo-owned durable note attached to the Conversation Customer, not to a WorkCycle.",
2586
+ "type": "object",
2587
+ "additionalProperties": false,
2588
+ "required": [
2589
+ "id",
2590
+ "body",
2591
+ "authorUserId",
2592
+ "createdAt",
2593
+ "updatedAt",
2594
+ "version"
2595
+ ],
2596
+ "properties": {
2597
+ "id": {
2598
+ "type": "string",
2599
+ "format": "uuid"
2600
+ },
2601
+ "body": {
2602
+ "type": "string",
2603
+ "minLength": 1,
2604
+ "maxLength": 10000
2605
+ },
2606
+ "authorUserId": {
2607
+ "type": "string",
2608
+ "minLength": 1
2609
+ },
2610
+ "createdAt": {
2611
+ "type": "string",
2612
+ "format": "date-time"
2613
+ },
2614
+ "updatedAt": {
2615
+ "type": "string",
2616
+ "format": "date-time"
2617
+ },
2618
+ "version": {
2619
+ "type": "integer",
2620
+ "minimum": 1
2621
+ }
2622
+ }
2623
+ },
2624
+ "CustomerNoteListResponse": {
2625
+ "type": "object",
2626
+ "additionalProperties": false,
2627
+ "required": [
2628
+ "data",
2629
+ "meta"
2630
+ ],
2631
+ "properties": {
2632
+ "data": {
2633
+ "type": "object",
2634
+ "additionalProperties": false,
2635
+ "required": [
2636
+ "notes"
2637
+ ],
2638
+ "properties": {
2639
+ "notes": {
2640
+ "type": "array",
2641
+ "items": {
2642
+ "$ref": "#/components/schemas/CustomerNote"
2643
+ }
2644
+ }
2645
+ }
2646
+ },
2647
+ "meta": {
2648
+ "type": "object",
2649
+ "additionalProperties": false,
2650
+ "required": [
2651
+ "nextCursor"
2652
+ ],
2653
+ "properties": {
2654
+ "nextCursor": {
2655
+ "type": [
2656
+ "string",
2657
+ "null"
2658
+ ],
2659
+ "description": "Opaque keyset cursor."
2660
+ }
2661
+ }
2662
+ }
2663
+ }
2664
+ },
2665
+ "NotificationKind": {
2666
+ "type": "string",
2667
+ "enum": [
2668
+ "reminder_due",
2669
+ "mention",
2670
+ "internal_comment_reply",
2671
+ "needs_attention",
2672
+ "overdue",
2673
+ "ro_opened",
2674
+ "ro_closed"
2675
+ ]
2676
+ },
2677
+ "InboxNotification": {
2678
+ "description": "Recipient-specific Ordo alert state. Opening or dismissing it never resolves domain work.",
2679
+ "type": "object",
2680
+ "additionalProperties": false,
2681
+ "required": [
2682
+ "id",
2683
+ "kind",
2684
+ "conversationId",
2685
+ "workCycleId",
2686
+ "reminderId",
2687
+ "mentionId",
2688
+ "attentionCycleId",
2689
+ "interactionId",
2690
+ "title",
2691
+ "body",
2692
+ "payloadVersion",
2693
+ "createdAt",
2694
+ "readAt"
2695
+ ],
2696
+ "properties": {
2697
+ "id": {
2698
+ "type": "string",
2699
+ "format": "uuid"
2700
+ },
2701
+ "kind": {
2702
+ "$ref": "#/components/schemas/NotificationKind"
2703
+ },
2704
+ "conversationId": {
2705
+ "type": "string",
2706
+ "format": "uuid"
2707
+ },
2708
+ "workCycleId": {
2709
+ "type": [
2710
+ "string",
2711
+ "null"
2712
+ ],
2713
+ "format": "uuid"
2714
+ },
2715
+ "reminderId": {
2716
+ "type": [
2717
+ "string",
2718
+ "null"
2719
+ ],
2720
+ "format": "uuid"
2721
+ },
2722
+ "mentionId": {
2723
+ "type": [
2724
+ "string",
2725
+ "null"
2726
+ ],
2727
+ "format": "uuid"
2728
+ },
2729
+ "attentionCycleId": {
2730
+ "type": [
2731
+ "string",
2732
+ "null"
2733
+ ],
2734
+ "format": "uuid"
2735
+ },
2736
+ "interactionId": {
2737
+ "type": [
2738
+ "string",
2739
+ "null"
2740
+ ],
2741
+ "format": "uuid"
2742
+ },
2743
+ "title": {
2744
+ "type": "string",
2745
+ "minLength": 1,
2746
+ "maxLength": 200
2747
+ },
2748
+ "body": {
2749
+ "type": "string",
2750
+ "minLength": 1,
2751
+ "maxLength": 2000
2752
+ },
2753
+ "payloadVersion": {
2754
+ "type": "integer",
2755
+ "minimum": 1
2756
+ },
2757
+ "createdAt": {
2758
+ "type": "string",
2759
+ "format": "date-time"
2760
+ },
2761
+ "readAt": {
2762
+ "type": [
2763
+ "string",
2764
+ "null"
2765
+ ],
2766
+ "format": "date-time"
2767
+ }
2768
+ }
2769
+ },
2770
+ "NotificationListResponse": {
2771
+ "type": "object",
2772
+ "additionalProperties": false,
2773
+ "required": [
2774
+ "data",
2775
+ "meta"
2776
+ ],
2777
+ "properties": {
2778
+ "data": {
2779
+ "type": "object",
2780
+ "additionalProperties": false,
2781
+ "required": [
2782
+ "notifications",
2783
+ "unreadCount"
2784
+ ],
2785
+ "properties": {
2786
+ "notifications": {
2787
+ "type": "array",
2788
+ "items": {
2789
+ "$ref": "#/components/schemas/InboxNotification"
2790
+ }
2791
+ },
2792
+ "unreadCount": {
2793
+ "type": "integer",
2794
+ "minimum": 0
2795
+ }
2796
+ }
2797
+ },
2798
+ "meta": {
2799
+ "type": "object",
2800
+ "additionalProperties": false,
2801
+ "required": [
2802
+ "nextCursor"
2803
+ ],
2804
+ "properties": {
2805
+ "nextCursor": {
2806
+ "type": [
2807
+ "string",
2808
+ "null"
2809
+ ],
2810
+ "description": "Opaque keyset cursor."
2811
+ }
2812
+ }
2813
+ }
2814
+ }
2815
+ },
2816
+ "ProducerSourceV1": {
2817
+ "type": "object",
2818
+ "additionalProperties": false,
2819
+ "required": [
2820
+ "system",
2821
+ "eventId",
2822
+ "eventVersion"
2823
+ ],
2824
+ "properties": {
2825
+ "system": {
2826
+ "type": "string",
2827
+ "minLength": 1,
2828
+ "maxLength": 128
2829
+ },
2830
+ "eventId": {
2831
+ "type": "string",
2832
+ "minLength": 1,
2833
+ "maxLength": 512
2834
+ },
2835
+ "eventVersion": {
2836
+ "type": "string",
2837
+ "minLength": 1,
2838
+ "maxLength": 128
2839
+ }
2840
+ }
2841
+ },
2842
+ "ProducerConversationTargetV1": {
2843
+ "type": "object",
2844
+ "additionalProperties": false,
2845
+ "required": [
2846
+ "conversationId"
2847
+ ],
2848
+ "properties": {
2849
+ "conversationId": {
2850
+ "type": "string",
2851
+ "format": "uuid"
2852
+ }
2853
+ }
2854
+ },
2855
+ "ProducerCustomerIdentityV1": {
2856
+ "type": "object",
2857
+ "additionalProperties": false,
2858
+ "required": [
2859
+ "customerSourceSystem",
2860
+ "customerExternalId"
2861
+ ],
2862
+ "properties": {
2863
+ "customerSourceSystem": {
2864
+ "type": "string",
2865
+ "minLength": 1,
2866
+ "maxLength": 128
2867
+ },
2868
+ "customerExternalId": {
2869
+ "type": "string",
2870
+ "minLength": 1,
2871
+ "maxLength": 512
2872
+ }
2873
+ }
2874
+ },
2875
+ "ProducerCustomerTargetV1": {
2876
+ "type": "object",
2877
+ "additionalProperties": false,
2878
+ "required": [
2879
+ "customerIdentity"
2880
+ ],
2881
+ "properties": {
2882
+ "customerIdentity": {
2883
+ "$ref": "#/components/schemas/ProducerCustomerIdentityV1"
2884
+ }
2885
+ }
2886
+ },
2887
+ "ProducerSourceActivityTargetV1": {
2888
+ "oneOf": [
2889
+ {
2890
+ "$ref": "#/components/schemas/ProducerConversationTargetV1"
2891
+ },
2892
+ {
2893
+ "$ref": "#/components/schemas/ProducerCustomerTargetV1"
2894
+ }
2895
+ ]
2896
+ },
2897
+ "ProducerInteractionV1": {
2898
+ "type": "object",
2899
+ "additionalProperties": false,
2900
+ "required": [
2901
+ "kind",
2902
+ "direction",
2903
+ "senderType"
2904
+ ],
2905
+ "properties": {
2906
+ "kind": {
2907
+ "type": "string",
2908
+ "enum": [
2909
+ "sms",
2910
+ "call",
2911
+ "voicemail",
2912
+ "ro_event",
2913
+ "system_event"
2914
+ ]
2915
+ },
2916
+ "channel": {
2917
+ "type": "string",
2918
+ "minLength": 1,
2919
+ "maxLength": 128
2920
+ },
2921
+ "direction": {
2922
+ "type": "string",
2923
+ "enum": [
2924
+ "inbound",
2925
+ "outbound",
2926
+ "internal"
2927
+ ]
2928
+ },
2929
+ "senderType": {
2930
+ "type": "string",
2931
+ "enum": [
2932
+ "customer",
2933
+ "user",
2934
+ "pam",
2935
+ "system"
2936
+ ]
2937
+ },
2938
+ "senderUserExternalId": {
2939
+ "type": "string",
2940
+ "minLength": 1,
2941
+ "maxLength": 512
2942
+ },
2943
+ "lineType": {
2944
+ "type": "string",
2945
+ "enum": [
2946
+ "pam",
2947
+ "rooftop",
2948
+ "advisor"
2949
+ ]
2950
+ },
2951
+ "dynamoLocator": {
2952
+ "type": "object",
2953
+ "additionalProperties": false,
2954
+ "required": [
2955
+ "partitionKey",
2956
+ "sortKey"
2957
+ ],
2958
+ "properties": {
2959
+ "partitionKey": {
2960
+ "type": "string",
2961
+ "minLength": 1,
2962
+ "maxLength": 2048
2963
+ },
2964
+ "sortKey": {
2965
+ "type": "string",
2966
+ "minLength": 1,
2967
+ "maxLength": 2048
2968
+ }
2969
+ }
2970
+ }
2971
+ }
2972
+ },
2973
+ "ProducerRepairOrderTransitionV1": {
2974
+ "type": "object",
2975
+ "additionalProperties": false,
2976
+ "required": [
2977
+ "transition",
2978
+ "sourceSystem",
2979
+ "externalId"
2980
+ ],
2981
+ "properties": {
2982
+ "transition": {
2983
+ "type": "string",
2984
+ "enum": [
2985
+ "RO_OPENED",
2986
+ "RO_CLOSED"
2987
+ ]
2988
+ },
2989
+ "sourceSystem": {
2990
+ "type": "string",
2991
+ "minLength": 1,
2992
+ "maxLength": 128
2993
+ },
2994
+ "externalId": {
2995
+ "type": "string",
2996
+ "minLength": 1,
2997
+ "maxLength": 512
2998
+ }
2999
+ }
3000
+ },
3001
+ "ProducerCustomerActivityPayloadV1": {
3002
+ "type": "object",
3003
+ "additionalProperties": false,
3004
+ "required": [
3005
+ "activityType",
3006
+ "interaction"
3007
+ ],
3008
+ "properties": {
3009
+ "activityType": {
3010
+ "type": "string",
3011
+ "const": "customer_activity"
3012
+ },
3013
+ "interaction": {
3014
+ "$ref": "#/components/schemas/ProducerInteractionV1"
3015
+ }
3016
+ }
3017
+ },
3018
+ "ProducerApprovedResponsePayloadV1": {
3019
+ "type": "object",
3020
+ "additionalProperties": false,
3021
+ "required": [
3022
+ "activityType",
3023
+ "interaction"
3024
+ ],
3025
+ "properties": {
3026
+ "activityType": {
3027
+ "type": "string",
3028
+ "const": "approved_customer_response"
3029
+ },
3030
+ "interaction": {
3031
+ "$ref": "#/components/schemas/ProducerInteractionV1"
3032
+ }
3033
+ }
3034
+ },
3035
+ "ProducerInformationalPayloadV1": {
3036
+ "type": "object",
3037
+ "additionalProperties": false,
3038
+ "required": [
3039
+ "activityType",
3040
+ "interaction"
3041
+ ],
3042
+ "properties": {
3043
+ "activityType": {
3044
+ "type": "string",
3045
+ "const": "informational"
3046
+ },
3047
+ "interaction": {
3048
+ "$ref": "#/components/schemas/ProducerInteractionV1"
3049
+ }
3050
+ }
3051
+ },
3052
+ "ProducerRepairOrderPayloadV1": {
3053
+ "type": "object",
3054
+ "additionalProperties": false,
3055
+ "required": [
3056
+ "activityType",
3057
+ "interaction",
3058
+ "repairOrder"
3059
+ ],
3060
+ "properties": {
3061
+ "activityType": {
3062
+ "type": "string",
3063
+ "const": "repair_order_transition"
3064
+ },
3065
+ "interaction": {
3066
+ "$ref": "#/components/schemas/ProducerInteractionV1"
3067
+ },
3068
+ "repairOrder": {
3069
+ "$ref": "#/components/schemas/ProducerRepairOrderTransitionV1"
3070
+ }
3071
+ }
3072
+ },
3073
+ "ProducerSourceActivityPayloadV1": {
3074
+ "oneOf": [
3075
+ {
3076
+ "$ref": "#/components/schemas/ProducerCustomerActivityPayloadV1"
3077
+ },
3078
+ {
3079
+ "$ref": "#/components/schemas/ProducerApprovedResponsePayloadV1"
3080
+ },
3081
+ {
3082
+ "$ref": "#/components/schemas/ProducerInformationalPayloadV1"
3083
+ },
3084
+ {
3085
+ "$ref": "#/components/schemas/ProducerRepairOrderPayloadV1"
3086
+ }
3087
+ ],
3088
+ "discriminator": {
3089
+ "propertyName": "activityType",
3090
+ "mapping": {
3091
+ "customer_activity": "#/components/schemas/ProducerCustomerActivityPayloadV1",
3092
+ "approved_customer_response": "#/components/schemas/ProducerApprovedResponsePayloadV1",
3093
+ "informational": "#/components/schemas/ProducerInformationalPayloadV1",
3094
+ "repair_order_transition": "#/components/schemas/ProducerRepairOrderPayloadV1"
3095
+ }
3096
+ }
3097
+ },
3098
+ "ProducerAttentionRecipientV1": {
3099
+ "type": "object",
3100
+ "additionalProperties": false,
3101
+ "required": [
3102
+ "recipientUserExternalId",
3103
+ "configuredTargetType",
3104
+ "configuredTargetExternalId"
3105
+ ],
3106
+ "properties": {
3107
+ "recipientUserExternalId": {
3108
+ "type": "string",
3109
+ "minLength": 1,
3110
+ "maxLength": 512
3111
+ },
3112
+ "configuredTargetType": {
3113
+ "type": "string",
3114
+ "enum": [
3115
+ "user",
3116
+ "group",
3117
+ "team"
3118
+ ]
3119
+ },
3120
+ "configuredTargetExternalId": {
3121
+ "type": "string",
3122
+ "minLength": 1,
3123
+ "maxLength": 512
3124
+ },
3125
+ "policyVersion": {
3126
+ "type": "string",
3127
+ "minLength": 1,
3128
+ "maxLength": 128
3129
+ },
3130
+ "routingSnapshot": {
3131
+ "type": "object",
3132
+ "additionalProperties": true
3133
+ }
3134
+ }
3135
+ },
3136
+ "ProducerAttentionPayloadV1": {
3137
+ "type": "object",
3138
+ "additionalProperties": false,
3139
+ "required": [
3140
+ "workCycleId",
3141
+ "category",
3142
+ "policySnapshot",
3143
+ "recipients"
3144
+ ],
3145
+ "properties": {
3146
+ "workCycleId": {
3147
+ "type": "string",
3148
+ "format": "uuid"
3149
+ },
3150
+ "category": {
3151
+ "type": "string",
3152
+ "minLength": 1,
3153
+ "maxLength": 128
3154
+ },
3155
+ "interactionRefId": {
3156
+ "type": "string",
3157
+ "format": "uuid"
3158
+ },
3159
+ "policySnapshot": {
3160
+ "type": "object",
3161
+ "additionalProperties": true
3162
+ },
3163
+ "recipients": {
3164
+ "type": "array",
3165
+ "maxItems": 100,
3166
+ "items": {
3167
+ "$ref": "#/components/schemas/ProducerAttentionRecipientV1"
3168
+ }
3169
+ }
3170
+ }
3171
+ },
3172
+ "ProducerReminderFirePayloadV1": {
3173
+ "type": "object",
3174
+ "additionalProperties": false,
3175
+ "required": [
3176
+ "reminderId",
3177
+ "dueAt",
3178
+ "expectedReminderVersion"
3179
+ ],
3180
+ "properties": {
3181
+ "reminderId": {
3182
+ "type": "string",
3183
+ "format": "uuid"
3184
+ },
3185
+ "dueAt": {
3186
+ "type": "string",
3187
+ "format": "date-time"
3188
+ },
3189
+ "expectedReminderVersion": {
3190
+ "type": "integer",
3191
+ "minimum": 1
3192
+ }
3193
+ }
3194
+ },
3195
+ "ProducerSnoozeReturnPayloadV1": {
3196
+ "type": "object",
3197
+ "additionalProperties": false,
3198
+ "required": [
3199
+ "workCycleId",
3200
+ "scheduledFor",
3201
+ "snoozeOperationId"
3202
+ ],
3203
+ "properties": {
3204
+ "workCycleId": {
3205
+ "type": "string",
3206
+ "format": "uuid"
3207
+ },
3208
+ "scheduledFor": {
3209
+ "type": "string",
3210
+ "format": "date-time"
3211
+ },
3212
+ "snoozeOperationId": {
3213
+ "type": "string",
3214
+ "minLength": 1,
3215
+ "maxLength": 128
3216
+ }
3217
+ }
3218
+ },
3219
+ "ProducerOverdueFirePayloadV1": {
3220
+ "type": "object",
3221
+ "additionalProperties": false,
3222
+ "required": [
3223
+ "workCycleId",
3224
+ "deadline",
3225
+ "oldestUnrespondedAt",
3226
+ "recipientUserExternalId"
3227
+ ],
3228
+ "properties": {
3229
+ "workCycleId": {
3230
+ "type": "string",
3231
+ "format": "uuid"
3232
+ },
3233
+ "deadline": {
3234
+ "type": "string",
3235
+ "format": "date-time"
3236
+ },
3237
+ "oldestUnrespondedAt": {
3238
+ "type": "string",
3239
+ "format": "date-time"
3240
+ },
3241
+ "recipientUserExternalId": {
3242
+ "type": "string",
3243
+ "minLength": 1,
3244
+ "maxLength": 512
3245
+ }
3246
+ }
3247
+ },
3248
+ "ProducerSourceActivityCommandV1": {
3249
+ "type": "object",
3250
+ "additionalProperties": false,
3251
+ "required": [
3252
+ "schemaVersion",
3253
+ "operationId",
3254
+ "commandType",
3255
+ "clientOrgId",
3256
+ "traceId",
3257
+ "occurredAt",
3258
+ "actor",
3259
+ "source",
3260
+ "target",
3261
+ "payload"
3262
+ ],
3263
+ "properties": {
3264
+ "schemaVersion": {
3265
+ "type": "integer",
3266
+ "const": 1
3267
+ },
3268
+ "operationId": {
3269
+ "type": "string",
3270
+ "minLength": 1,
3271
+ "maxLength": 128
3272
+ },
3273
+ "commandType": {
3274
+ "type": "string",
3275
+ "const": "work_cycle.source_activity"
3276
+ },
3277
+ "clientOrgId": {
3278
+ "type": "string",
3279
+ "minLength": 1,
3280
+ "maxLength": 512
3281
+ },
3282
+ "traceId": {
3283
+ "type": "string",
3284
+ "minLength": 1,
3285
+ "maxLength": 256
3286
+ },
3287
+ "occurredAt": {
3288
+ "type": "string",
3289
+ "format": "date-time"
3290
+ },
3291
+ "actor": {
3292
+ "type": "object",
3293
+ "additionalProperties": false,
3294
+ "required": [
3295
+ "type"
3296
+ ],
3297
+ "properties": {
3298
+ "type": {
3299
+ "type": "string",
3300
+ "const": "source"
3301
+ }
3302
+ }
3303
+ },
3304
+ "source": {
3305
+ "$ref": "#/components/schemas/ProducerSourceV1"
3306
+ },
3307
+ "target": {
3308
+ "$ref": "#/components/schemas/ProducerSourceActivityTargetV1"
3309
+ },
3310
+ "payload": {
3311
+ "$ref": "#/components/schemas/ProducerSourceActivityPayloadV1"
3312
+ }
3313
+ }
3314
+ },
3315
+ "ProducerAttentionCommandV1": {
3316
+ "type": "object",
3317
+ "additionalProperties": false,
3318
+ "required": [
3319
+ "schemaVersion",
3320
+ "operationId",
3321
+ "commandType",
3322
+ "clientOrgId",
3323
+ "traceId",
3324
+ "occurredAt",
3325
+ "actor",
3326
+ "source",
3327
+ "target",
3328
+ "payload"
3329
+ ],
3330
+ "properties": {
3331
+ "schemaVersion": {
3332
+ "type": "integer",
3333
+ "const": 1
3334
+ },
3335
+ "operationId": {
3336
+ "type": "string",
3337
+ "minLength": 1,
3338
+ "maxLength": 128
3339
+ },
3340
+ "commandType": {
3341
+ "type": "string",
3342
+ "const": "attention.open_or_add_evidence"
3343
+ },
3344
+ "clientOrgId": {
3345
+ "type": "string",
3346
+ "minLength": 1,
3347
+ "maxLength": 512
3348
+ },
3349
+ "traceId": {
3350
+ "type": "string",
3351
+ "minLength": 1,
3352
+ "maxLength": 256
3353
+ },
3354
+ "occurredAt": {
3355
+ "type": "string",
3356
+ "format": "date-time"
3357
+ },
3358
+ "actor": {
3359
+ "type": "object",
3360
+ "additionalProperties": false,
3361
+ "required": [
3362
+ "type"
3363
+ ],
3364
+ "properties": {
3365
+ "type": {
3366
+ "type": "string",
3367
+ "enum": [
3368
+ "source",
3369
+ "pam"
3370
+ ]
3371
+ }
3372
+ }
3373
+ },
3374
+ "source": {
3375
+ "$ref": "#/components/schemas/ProducerSourceV1"
3376
+ },
3377
+ "target": {
3378
+ "$ref": "#/components/schemas/ProducerConversationTargetV1"
3379
+ },
3380
+ "payload": {
3381
+ "$ref": "#/components/schemas/ProducerAttentionPayloadV1"
3382
+ }
3383
+ }
3384
+ },
3385
+ "ProducerReminderFireCommandV1": {
3386
+ "type": "object",
3387
+ "additionalProperties": false,
3388
+ "required": [
3389
+ "schemaVersion",
3390
+ "operationId",
3391
+ "commandType",
3392
+ "clientOrgId",
3393
+ "traceId",
3394
+ "occurredAt",
3395
+ "actor",
3396
+ "source",
3397
+ "target",
3398
+ "payload"
3399
+ ],
3400
+ "properties": {
3401
+ "schemaVersion": {
3402
+ "type": "integer",
3403
+ "const": 1
3404
+ },
3405
+ "operationId": {
3406
+ "type": "string",
3407
+ "minLength": 1,
3408
+ "maxLength": 128
3409
+ },
3410
+ "commandType": {
3411
+ "type": "string",
3412
+ "const": "reminder.fire"
3413
+ },
3414
+ "clientOrgId": {
3415
+ "type": "string",
3416
+ "minLength": 1,
3417
+ "maxLength": 512
3418
+ },
3419
+ "traceId": {
3420
+ "type": "string",
3421
+ "minLength": 1,
3422
+ "maxLength": 256
3423
+ },
3424
+ "occurredAt": {
3425
+ "type": "string",
3426
+ "format": "date-time"
3427
+ },
3428
+ "actor": {
3429
+ "type": "object",
3430
+ "additionalProperties": false,
3431
+ "required": [
3432
+ "type"
3433
+ ],
3434
+ "properties": {
3435
+ "type": {
3436
+ "type": "string",
3437
+ "const": "system"
3438
+ }
3439
+ }
3440
+ },
3441
+ "source": {
3442
+ "$ref": "#/components/schemas/ProducerSourceV1"
3443
+ },
3444
+ "target": {
3445
+ "$ref": "#/components/schemas/ProducerConversationTargetV1"
3446
+ },
3447
+ "payload": {
3448
+ "$ref": "#/components/schemas/ProducerReminderFirePayloadV1"
3449
+ }
3450
+ }
3451
+ },
3452
+ "ProducerSnoozeReturnCommandV1": {
3453
+ "type": "object",
3454
+ "additionalProperties": false,
3455
+ "required": [
3456
+ "schemaVersion",
3457
+ "operationId",
3458
+ "commandType",
3459
+ "clientOrgId",
3460
+ "traceId",
3461
+ "occurredAt",
3462
+ "actor",
3463
+ "source",
3464
+ "target",
3465
+ "payload"
3466
+ ],
3467
+ "properties": {
3468
+ "schemaVersion": {
3469
+ "type": "integer",
3470
+ "const": 1
3471
+ },
3472
+ "operationId": {
3473
+ "type": "string",
3474
+ "minLength": 1,
3475
+ "maxLength": 128
3476
+ },
3477
+ "commandType": {
3478
+ "type": "string",
3479
+ "const": "snooze.return"
3480
+ },
3481
+ "clientOrgId": {
3482
+ "type": "string",
3483
+ "minLength": 1,
3484
+ "maxLength": 512
3485
+ },
3486
+ "traceId": {
3487
+ "type": "string",
3488
+ "minLength": 1,
3489
+ "maxLength": 256
3490
+ },
3491
+ "occurredAt": {
3492
+ "type": "string",
3493
+ "format": "date-time"
3494
+ },
3495
+ "actor": {
3496
+ "type": "object",
3497
+ "additionalProperties": false,
3498
+ "required": [
3499
+ "type"
3500
+ ],
3501
+ "properties": {
3502
+ "type": {
3503
+ "type": "string",
3504
+ "const": "system"
3505
+ }
3506
+ }
3507
+ },
3508
+ "source": {
3509
+ "$ref": "#/components/schemas/ProducerSourceV1"
3510
+ },
3511
+ "target": {
3512
+ "$ref": "#/components/schemas/ProducerConversationTargetV1"
3513
+ },
3514
+ "payload": {
3515
+ "$ref": "#/components/schemas/ProducerSnoozeReturnPayloadV1"
3516
+ }
3517
+ }
3518
+ },
3519
+ "ProducerOverdueFireCommandV1": {
3520
+ "type": "object",
3521
+ "additionalProperties": false,
3522
+ "required": [
3523
+ "schemaVersion",
3524
+ "operationId",
3525
+ "commandType",
3526
+ "clientOrgId",
3527
+ "traceId",
3528
+ "occurredAt",
3529
+ "actor",
3530
+ "source",
3531
+ "target",
3532
+ "payload"
3533
+ ],
3534
+ "properties": {
3535
+ "schemaVersion": {
3536
+ "type": "integer",
3537
+ "const": 1
3538
+ },
3539
+ "operationId": {
3540
+ "type": "string",
3541
+ "minLength": 1,
3542
+ "maxLength": 128
3543
+ },
3544
+ "commandType": {
3545
+ "type": "string",
3546
+ "const": "overdue.fire"
3547
+ },
3548
+ "clientOrgId": {
3549
+ "type": "string",
3550
+ "minLength": 1,
3551
+ "maxLength": 512
3552
+ },
3553
+ "traceId": {
3554
+ "type": "string",
3555
+ "minLength": 1,
3556
+ "maxLength": 256
3557
+ },
3558
+ "occurredAt": {
3559
+ "type": "string",
3560
+ "format": "date-time"
3561
+ },
3562
+ "actor": {
3563
+ "type": "object",
3564
+ "additionalProperties": false,
3565
+ "required": [
3566
+ "type"
3567
+ ],
3568
+ "properties": {
3569
+ "type": {
3570
+ "type": "string",
3571
+ "const": "system"
3572
+ }
3573
+ }
3574
+ },
3575
+ "source": {
3576
+ "$ref": "#/components/schemas/ProducerSourceV1"
3577
+ },
3578
+ "target": {
3579
+ "$ref": "#/components/schemas/ProducerConversationTargetV1"
3580
+ },
3581
+ "payload": {
3582
+ "$ref": "#/components/schemas/ProducerOverdueFirePayloadV1"
3583
+ }
3584
+ }
3585
+ },
3586
+ "ProducerCommandV1": {
3587
+ "description": "Versioned internal FIFO producer command. Serialized SQS bodies are limited to 64 KiB by producers and consumers even though JSON Schema cannot express a byte-size limit.",
3588
+ "oneOf": [
3589
+ {
3590
+ "$ref": "#/components/schemas/ProducerSourceActivityCommandV1"
3591
+ },
3592
+ {
3593
+ "$ref": "#/components/schemas/ProducerAttentionCommandV1"
3594
+ },
3595
+ {
3596
+ "$ref": "#/components/schemas/ProducerReminderFireCommandV1"
3597
+ },
3598
+ {
3599
+ "$ref": "#/components/schemas/ProducerSnoozeReturnCommandV1"
3600
+ },
3601
+ {
3602
+ "$ref": "#/components/schemas/ProducerOverdueFireCommandV1"
3603
+ }
3604
+ ],
3605
+ "discriminator": {
3606
+ "propertyName": "commandType",
3607
+ "mapping": {
3608
+ "work_cycle.source_activity": "#/components/schemas/ProducerSourceActivityCommandV1",
3609
+ "attention.open_or_add_evidence": "#/components/schemas/ProducerAttentionCommandV1",
3610
+ "reminder.fire": "#/components/schemas/ProducerReminderFireCommandV1",
3611
+ "snooze.return": "#/components/schemas/ProducerSnoozeReturnCommandV1",
3612
+ "overdue.fire": "#/components/schemas/ProducerOverdueFireCommandV1"
3613
+ }
3614
+ }
3615
+ },
3616
+ "CommandEnvelope": {
3617
+ "type": "object",
3618
+ "required": [
3619
+ "operationId",
3620
+ "clientOrgId",
3621
+ "conversationId",
3622
+ "workCycleId",
3623
+ "expectedVersion"
3624
+ ],
3625
+ "properties": {
3626
+ "operationId": {
3627
+ "type": "string",
3628
+ "minLength": 1,
3629
+ "maxLength": 128
3630
+ },
3631
+ "clientOrgId": {
3632
+ "type": "string",
3633
+ "minLength": 1
3634
+ },
3635
+ "conversationId": {
3636
+ "type": "string",
3637
+ "format": "uuid"
3638
+ },
3639
+ "workCycleId": {
3640
+ "type": "string",
3641
+ "format": "uuid"
3642
+ },
3643
+ "expectedVersion": {
3644
+ "type": "integer",
3645
+ "minimum": 1
3646
+ }
3647
+ }
3648
+ },
3649
+ "ActiveWorkCycleAppendEnvelope": {
3650
+ "type": "object",
3651
+ "required": [
3652
+ "operationId",
3653
+ "clientOrgId",
3654
+ "conversationId",
3655
+ "workCycleId"
3656
+ ],
3657
+ "properties": {
3658
+ "operationId": {
3659
+ "type": "string",
3660
+ "minLength": 1,
3661
+ "maxLength": 128
3662
+ },
3663
+ "clientOrgId": {
3664
+ "type": "string",
3665
+ "minLength": 1
3666
+ },
3667
+ "conversationId": {
3668
+ "type": "string",
3669
+ "format": "uuid"
3670
+ },
3671
+ "workCycleId": {
3672
+ "type": "string",
3673
+ "format": "uuid"
3674
+ }
3675
+ }
3676
+ },
3677
+ "ConversationOperationEnvelope": {
3678
+ "type": "object",
3679
+ "required": [
3680
+ "operationId",
3681
+ "clientOrgId",
3682
+ "conversationId"
3683
+ ],
3684
+ "properties": {
3685
+ "operationId": {
3686
+ "type": "string",
3687
+ "minLength": 1,
3688
+ "maxLength": 128
3689
+ },
3690
+ "clientOrgId": {
3691
+ "type": "string",
3692
+ "minLength": 1
3693
+ },
3694
+ "conversationId": {
3695
+ "type": "string",
3696
+ "format": "uuid"
3697
+ }
3698
+ }
3699
+ },
3700
+ "NotificationCommand": {
3701
+ "type": "object",
3702
+ "additionalProperties": false,
3703
+ "required": [
3704
+ "operationId",
3705
+ "clientOrgId",
3706
+ "notificationId"
3707
+ ],
3708
+ "properties": {
3709
+ "operationId": {
3710
+ "type": "string",
3711
+ "minLength": 1,
3712
+ "maxLength": 128
3713
+ },
3714
+ "clientOrgId": {
3715
+ "type": "string",
3716
+ "minLength": 1
3717
+ },
3718
+ "notificationId": {
3719
+ "type": "string",
3720
+ "format": "uuid"
3721
+ }
3722
+ }
3723
+ },
3724
+ "BaseCommand": {
3725
+ "allOf": [
3726
+ {
3727
+ "$ref": "#/components/schemas/CommandEnvelope"
3728
+ }
3729
+ ],
3730
+ "unevaluatedProperties": false
3731
+ },
3732
+ "UserAssignmentTarget": {
3733
+ "type": "object",
3734
+ "additionalProperties": false,
3735
+ "required": [
3736
+ "type",
3737
+ "userId"
3738
+ ],
3739
+ "properties": {
3740
+ "type": {
3741
+ "type": "string",
3742
+ "const": "USER"
3743
+ },
3744
+ "userId": {
3745
+ "type": "string",
3746
+ "minLength": 1
3747
+ }
3748
+ }
3749
+ },
3750
+ "TeamRoutingAssignmentTarget": {
3751
+ "description": "Selects configured Team routing; the resulting owner remains an individual User.",
3752
+ "type": "object",
3753
+ "additionalProperties": false,
3754
+ "required": [
3755
+ "type",
3756
+ "teamId"
3757
+ ],
3758
+ "properties": {
3759
+ "type": {
3760
+ "type": "string",
3761
+ "const": "TEAM_ROUTING"
3762
+ },
3763
+ "teamId": {
3764
+ "type": "string",
3765
+ "minLength": 1
3766
+ }
3767
+ }
3768
+ },
3769
+ "AssignmentTarget": {
3770
+ "oneOf": [
3771
+ {
3772
+ "$ref": "#/components/schemas/UserAssignmentTarget"
3773
+ },
3774
+ {
3775
+ "$ref": "#/components/schemas/TeamRoutingAssignmentTarget"
3776
+ }
3777
+ ],
3778
+ "discriminator": {
3779
+ "propertyName": "type",
3780
+ "mapping": {
3781
+ "USER": "#/components/schemas/UserAssignmentTarget",
3782
+ "TEAM_ROUTING": "#/components/schemas/TeamRoutingAssignmentTarget"
3783
+ }
3784
+ }
3785
+ },
3786
+ "AssignCommand": {
3787
+ "unevaluatedProperties": false,
3788
+ "allOf": [
3789
+ {
3790
+ "$ref": "#/components/schemas/CommandEnvelope"
3791
+ },
3792
+ {
3793
+ "type": "object",
3794
+ "required": [
3795
+ "target"
3796
+ ],
3797
+ "properties": {
3798
+ "target": {
3799
+ "$ref": "#/components/schemas/AssignmentTarget"
3800
+ }
3801
+ }
3802
+ }
3803
+ ]
3804
+ },
3805
+ "SnoozeCommand": {
3806
+ "unevaluatedProperties": false,
3807
+ "allOf": [
3808
+ {
3809
+ "$ref": "#/components/schemas/CommandEnvelope"
3810
+ },
3811
+ {
3812
+ "type": "object",
3813
+ "required": [
3814
+ "until"
3815
+ ],
3816
+ "properties": {
3817
+ "until": {
3818
+ "type": "string",
3819
+ "format": "date-time"
3820
+ },
3821
+ "reason": {
3822
+ "type": "string",
3823
+ "maxLength": 1000
3824
+ }
3825
+ }
3826
+ }
3827
+ ]
3828
+ },
3829
+ "SetReminderCommand": {
3830
+ "unevaluatedProperties": false,
3831
+ "allOf": [
3832
+ {
3833
+ "$ref": "#/components/schemas/CommandEnvelope"
3834
+ },
3835
+ {
3836
+ "type": "object",
3837
+ "required": [
3838
+ "dueAt"
3839
+ ],
3840
+ "properties": {
3841
+ "dueAt": {
3842
+ "type": "string",
3843
+ "format": "date-time"
3844
+ },
3845
+ "note": {
3846
+ "type": "string",
3847
+ "maxLength": 2000
3848
+ }
3849
+ }
3850
+ }
3851
+ ]
3852
+ },
3853
+ "CloseCommand": {
3854
+ "unevaluatedProperties": false,
3855
+ "allOf": [
3856
+ {
3857
+ "$ref": "#/components/schemas/CommandEnvelope"
3858
+ },
3859
+ {
3860
+ "type": "object",
3861
+ "properties": {
3862
+ "resolutionKey": {
3863
+ "type": "string",
3864
+ "minLength": 1,
3865
+ "default": "completed",
3866
+ "description": "Optional one-click resolution key. The service uses completed when omitted; other requires a non-blank reason."
3867
+ },
3868
+ "reason": {
3869
+ "type": "string",
3870
+ "maxLength": 2000
3871
+ }
3872
+ }
3873
+ }
3874
+ ]
3875
+ },
3876
+ "AcknowledgeAttentionCommand": {
3877
+ "unevaluatedProperties": false,
3878
+ "allOf": [
3879
+ {
3880
+ "$ref": "#/components/schemas/CommandEnvelope"
3881
+ },
3882
+ {
3883
+ "type": "object",
3884
+ "required": [
3885
+ "attentionCycleId"
3886
+ ],
3887
+ "properties": {
3888
+ "attentionCycleId": {
3889
+ "type": "string",
3890
+ "format": "uuid"
3891
+ }
3892
+ }
3893
+ }
3894
+ ]
3895
+ },
3896
+ "ResolveAttentionCommand": {
3897
+ "unevaluatedProperties": false,
3898
+ "allOf": [
3899
+ {
3900
+ "$ref": "#/components/schemas/CommandEnvelope"
3901
+ },
3902
+ {
3903
+ "type": "object",
3904
+ "required": [
3905
+ "attentionCycleId"
3906
+ ],
3907
+ "properties": {
3908
+ "attentionCycleId": {
3909
+ "type": "string",
3910
+ "format": "uuid"
3911
+ },
3912
+ "reason": {
3913
+ "type": "string",
3914
+ "maxLength": 2000
3915
+ }
3916
+ }
3917
+ }
3918
+ ]
3919
+ },
3920
+ "AddInternalCommentCommand": {
3921
+ "unevaluatedProperties": false,
3922
+ "allOf": [
3923
+ {
3924
+ "$ref": "#/components/schemas/ActiveWorkCycleAppendEnvelope"
3925
+ },
3926
+ {
3927
+ "type": "object",
3928
+ "required": [
3929
+ "body",
3930
+ "mentionedUserIds"
3931
+ ],
3932
+ "properties": {
3933
+ "body": {
3934
+ "type": "string",
3935
+ "minLength": 1,
3936
+ "maxLength": 10000,
3937
+ "pattern": ".*\\S.*"
3938
+ },
3939
+ "mentionedUserIds": {
3940
+ "type": "array",
3941
+ "minItems": 0,
3942
+ "maxItems": 50,
3943
+ "uniqueItems": true,
3944
+ "items": {
3945
+ "type": "string",
3946
+ "minLength": 1
3947
+ }
3948
+ },
3949
+ "replyToInteractionRefId": {
3950
+ "type": "string",
3951
+ "format": "uuid"
3952
+ }
3953
+ }
3954
+ }
3955
+ ]
3956
+ },
3957
+ "AdvanceReadCursorCommand": {
3958
+ "unevaluatedProperties": false,
3959
+ "allOf": [
3960
+ {
3961
+ "$ref": "#/components/schemas/ConversationOperationEnvelope"
3962
+ },
3963
+ {
3964
+ "type": "object",
3965
+ "required": [
3966
+ "throughInteractionRefId"
3967
+ ],
3968
+ "properties": {
3969
+ "throughInteractionRefId": {
3970
+ "type": "string",
3971
+ "format": "uuid"
3972
+ }
3973
+ }
3974
+ }
3975
+ ]
3976
+ },
3977
+ "AddCustomerNoteCommand": {
3978
+ "unevaluatedProperties": false,
3979
+ "allOf": [
3980
+ {
3981
+ "$ref": "#/components/schemas/ConversationOperationEnvelope"
3982
+ },
3983
+ {
3984
+ "type": "object",
3985
+ "required": [
3986
+ "body"
3987
+ ],
3988
+ "properties": {
3989
+ "body": {
3990
+ "type": "string",
3991
+ "minLength": 1,
3992
+ "maxLength": 10000,
3993
+ "pattern": ".*\\S.*"
3994
+ }
3995
+ }
3996
+ }
3997
+ ]
3998
+ },
3999
+ "DeleteCustomerNoteCommand": {
4000
+ "unevaluatedProperties": false,
4001
+ "allOf": [
4002
+ {
4003
+ "$ref": "#/components/schemas/ConversationOperationEnvelope"
4004
+ },
4005
+ {
4006
+ "type": "object",
4007
+ "required": [
4008
+ "noteId",
4009
+ "expectedNoteVersion"
4010
+ ],
4011
+ "properties": {
4012
+ "noteId": {
4013
+ "type": "string",
4014
+ "format": "uuid"
4015
+ },
4016
+ "expectedNoteVersion": {
4017
+ "type": "integer",
4018
+ "minimum": 1
4019
+ }
4020
+ }
4021
+ }
4022
+ ]
4023
+ },
4024
+ "CommandResult": {
4025
+ "type": "object",
4026
+ "additionalProperties": false,
4027
+ "required": [
4028
+ "data"
4029
+ ],
4030
+ "properties": {
4031
+ "data": {
4032
+ "type": "object",
4033
+ "additionalProperties": false,
4034
+ "required": [
4035
+ "operationId",
4036
+ "applied",
4037
+ "replayed",
4038
+ "conversationId",
4039
+ "workCycleId",
4040
+ "resultingVersion"
4041
+ ],
4042
+ "properties": {
4043
+ "operationId": {
4044
+ "type": "string"
4045
+ },
4046
+ "applied": {
4047
+ "type": "boolean"
4048
+ },
4049
+ "replayed": {
4050
+ "type": "boolean"
4051
+ },
4052
+ "conversationId": {
4053
+ "type": "string",
4054
+ "format": "uuid"
4055
+ },
4056
+ "workCycleId": {
4057
+ "type": "string",
4058
+ "format": "uuid"
4059
+ },
4060
+ "resultingVersion": {
4061
+ "type": "integer",
4062
+ "minimum": 1
4063
+ }
4064
+ }
4065
+ }
4066
+ }
4067
+ },
4068
+ "InternalCommentResult": {
4069
+ "type": "object",
4070
+ "additionalProperties": false,
4071
+ "required": [
4072
+ "data"
4073
+ ],
4074
+ "properties": {
4075
+ "data": {
4076
+ "type": "object",
4077
+ "additionalProperties": false,
4078
+ "required": [
4079
+ "operationId",
4080
+ "applied",
4081
+ "replayed",
4082
+ "conversationId",
4083
+ "workCycleId",
4084
+ "resultingVersion",
4085
+ "interactionRefId",
4086
+ "sequenceNumber",
4087
+ "mentionCount"
4088
+ ],
4089
+ "properties": {
4090
+ "operationId": {
4091
+ "type": "string"
4092
+ },
4093
+ "applied": {
4094
+ "type": "boolean"
4095
+ },
4096
+ "replayed": {
4097
+ "type": "boolean"
4098
+ },
4099
+ "conversationId": {
4100
+ "type": "string",
4101
+ "format": "uuid"
4102
+ },
4103
+ "workCycleId": {
4104
+ "type": "string",
4105
+ "format": "uuid"
4106
+ },
4107
+ "resultingVersion": {
4108
+ "type": "integer",
4109
+ "minimum": 1
4110
+ },
4111
+ "interactionRefId": {
4112
+ "type": "string",
4113
+ "format": "uuid"
4114
+ },
4115
+ "sequenceNumber": {
4116
+ "type": "integer",
4117
+ "minimum": 1
4118
+ },
4119
+ "mentionCount": {
4120
+ "type": "integer",
4121
+ "minimum": 0,
4122
+ "maximum": 50
4123
+ }
4124
+ }
4125
+ }
4126
+ }
4127
+ },
4128
+ "ReadCursorResult": {
4129
+ "type": "object",
4130
+ "additionalProperties": false,
4131
+ "required": [
4132
+ "data"
4133
+ ],
4134
+ "properties": {
4135
+ "data": {
4136
+ "type": "object",
4137
+ "additionalProperties": false,
4138
+ "required": [
4139
+ "operationId",
4140
+ "applied",
4141
+ "replayed",
4142
+ "conversationId",
4143
+ "lastReadInteractionRefId",
4144
+ "lastReadSequenceNumber"
4145
+ ],
4146
+ "properties": {
4147
+ "operationId": {
4148
+ "type": "string"
4149
+ },
4150
+ "applied": {
4151
+ "type": "boolean"
4152
+ },
4153
+ "replayed": {
4154
+ "type": "boolean"
4155
+ },
4156
+ "conversationId": {
4157
+ "type": "string",
4158
+ "format": "uuid"
4159
+ },
4160
+ "lastReadInteractionRefId": {
4161
+ "type": "string",
4162
+ "format": "uuid"
4163
+ },
4164
+ "lastReadSequenceNumber": {
4165
+ "type": "integer",
4166
+ "minimum": 1
4167
+ }
4168
+ }
4169
+ }
4170
+ }
4171
+ },
4172
+ "CustomerNoteCommandResult": {
4173
+ "type": "object",
4174
+ "additionalProperties": false,
4175
+ "required": [
4176
+ "data"
4177
+ ],
4178
+ "properties": {
4179
+ "data": {
4180
+ "type": "object",
4181
+ "additionalProperties": false,
4182
+ "required": [
4183
+ "operationId",
4184
+ "applied",
4185
+ "replayed",
4186
+ "conversationId",
4187
+ "noteId",
4188
+ "resultingNoteVersion"
4189
+ ],
4190
+ "properties": {
4191
+ "operationId": {
4192
+ "type": "string"
4193
+ },
4194
+ "applied": {
4195
+ "type": "boolean"
4196
+ },
4197
+ "replayed": {
4198
+ "type": "boolean"
4199
+ },
4200
+ "conversationId": {
4201
+ "type": "string",
4202
+ "format": "uuid"
4203
+ },
4204
+ "noteId": {
4205
+ "type": "string",
4206
+ "format": "uuid"
4207
+ },
4208
+ "resultingNoteVersion": {
4209
+ "type": "integer",
4210
+ "minimum": 1
4211
+ }
4212
+ }
4213
+ }
4214
+ }
4215
+ },
4216
+ "NotificationCommandResult": {
4217
+ "type": "object",
4218
+ "additionalProperties": false,
4219
+ "required": [
4220
+ "data"
4221
+ ],
4222
+ "properties": {
4223
+ "data": {
4224
+ "type": "object",
4225
+ "additionalProperties": false,
4226
+ "required": [
4227
+ "operationId",
4228
+ "applied",
4229
+ "replayed",
4230
+ "notificationId",
4231
+ "readAt",
4232
+ "dismissedAt"
4233
+ ],
4234
+ "properties": {
4235
+ "operationId": {
4236
+ "type": "string"
4237
+ },
4238
+ "applied": {
4239
+ "type": "boolean"
4240
+ },
4241
+ "replayed": {
4242
+ "type": "boolean"
4243
+ },
4244
+ "notificationId": {
4245
+ "type": "string",
4246
+ "format": "uuid"
4247
+ },
4248
+ "readAt": {
4249
+ "type": "string",
4250
+ "format": "date-time"
4251
+ },
4252
+ "dismissedAt": {
4253
+ "type": [
4254
+ "string",
4255
+ "null"
4256
+ ],
4257
+ "format": "date-time"
4258
+ }
4259
+ }
4260
+ }
4261
+ }
4262
+ },
4263
+ "ErrorEnvelope": {
4264
+ "type": "object",
4265
+ "additionalProperties": false,
4266
+ "required": [
4267
+ "error"
4268
+ ],
4269
+ "properties": {
4270
+ "error": {
4271
+ "type": "object",
4272
+ "additionalProperties": false,
4273
+ "required": [
4274
+ "code",
4275
+ "message",
4276
+ "correlationId"
4277
+ ],
4278
+ "properties": {
4279
+ "code": {
4280
+ "type": "string"
4281
+ },
4282
+ "message": {
4283
+ "type": "string"
4284
+ },
4285
+ "correlationId": {
4286
+ "type": "string"
4287
+ },
4288
+ "details": {
4289
+ "type": "object",
4290
+ "additionalProperties": true
4291
+ }
4292
+ }
4293
+ }
4294
+ }
4295
+ }
4296
+ },
4297
+ "requestBodies": {
4298
+ "BaseCommand": {
4299
+ "required": true,
4300
+ "content": {
4301
+ "application/json": {
4302
+ "schema": {
4303
+ "$ref": "#/components/schemas/BaseCommand"
4304
+ }
4305
+ }
4306
+ }
4307
+ },
4308
+ "AssignCommand": {
4309
+ "required": true,
4310
+ "content": {
4311
+ "application/json": {
4312
+ "schema": {
4313
+ "$ref": "#/components/schemas/AssignCommand"
4314
+ }
4315
+ }
4316
+ }
4317
+ },
4318
+ "SnoozeCommand": {
4319
+ "required": true,
4320
+ "content": {
4321
+ "application/json": {
4322
+ "schema": {
4323
+ "$ref": "#/components/schemas/SnoozeCommand"
4324
+ }
4325
+ }
4326
+ }
4327
+ },
4328
+ "SetReminderCommand": {
4329
+ "required": true,
4330
+ "content": {
4331
+ "application/json": {
4332
+ "schema": {
4333
+ "$ref": "#/components/schemas/SetReminderCommand"
4334
+ }
4335
+ }
4336
+ }
4337
+ },
4338
+ "CloseCommand": {
4339
+ "required": true,
4340
+ "content": {
4341
+ "application/json": {
4342
+ "schema": {
4343
+ "$ref": "#/components/schemas/CloseCommand"
4344
+ }
4345
+ }
4346
+ }
4347
+ },
4348
+ "AcknowledgeAttentionCommand": {
4349
+ "required": true,
4350
+ "content": {
4351
+ "application/json": {
4352
+ "schema": {
4353
+ "$ref": "#/components/schemas/AcknowledgeAttentionCommand"
4354
+ }
4355
+ }
4356
+ }
4357
+ },
4358
+ "ResolveAttentionCommand": {
4359
+ "required": true,
4360
+ "content": {
4361
+ "application/json": {
4362
+ "schema": {
4363
+ "$ref": "#/components/schemas/ResolveAttentionCommand"
4364
+ }
4365
+ }
4366
+ }
4367
+ },
4368
+ "AddInternalCommentCommand": {
4369
+ "required": true,
4370
+ "content": {
4371
+ "application/json": {
4372
+ "schema": {
4373
+ "$ref": "#/components/schemas/AddInternalCommentCommand"
4374
+ }
4375
+ }
4376
+ }
4377
+ },
4378
+ "AdvanceReadCursorCommand": {
4379
+ "required": true,
4380
+ "content": {
4381
+ "application/json": {
4382
+ "schema": {
4383
+ "$ref": "#/components/schemas/AdvanceReadCursorCommand"
4384
+ }
4385
+ }
4386
+ }
4387
+ },
4388
+ "AddCustomerNoteCommand": {
4389
+ "required": true,
4390
+ "content": {
4391
+ "application/json": {
4392
+ "schema": {
4393
+ "$ref": "#/components/schemas/AddCustomerNoteCommand"
4394
+ }
4395
+ }
4396
+ }
4397
+ },
4398
+ "DeleteCustomerNoteCommand": {
4399
+ "required": true,
4400
+ "content": {
4401
+ "application/json": {
4402
+ "schema": {
4403
+ "$ref": "#/components/schemas/DeleteCustomerNoteCommand"
4404
+ }
4405
+ }
4406
+ }
4407
+ },
4408
+ "NotificationCommand": {
4409
+ "required": true,
4410
+ "content": {
4411
+ "application/json": {
4412
+ "schema": {
4413
+ "$ref": "#/components/schemas/NotificationCommand"
4414
+ }
4415
+ }
4416
+ }
4417
+ }
4418
+ },
4419
+ "responses": {
4420
+ "CommandApplied": {
4421
+ "description": "Applied or idempotently replayed command result.",
4422
+ "headers": {
4423
+ "x-correlation-id": {
4424
+ "$ref": "#/components/headers/CorrelationId"
4425
+ }
4426
+ },
4427
+ "content": {
4428
+ "application/json": {
4429
+ "schema": {
4430
+ "$ref": "#/components/schemas/CommandResult"
4431
+ }
4432
+ }
4433
+ }
4434
+ },
4435
+ "InternalCommentApplied": {
4436
+ "description": "Applied or idempotently replayed internal-comment result.",
4437
+ "headers": {
4438
+ "x-correlation-id": {
4439
+ "$ref": "#/components/headers/CorrelationId"
4440
+ }
4441
+ },
4442
+ "content": {
4443
+ "application/json": {
4444
+ "schema": {
4445
+ "$ref": "#/components/schemas/InternalCommentResult"
4446
+ }
4447
+ }
4448
+ }
4449
+ },
4450
+ "ReadCursorAdvanced": {
4451
+ "description": "Applied, replayed, or monotonic no-op read-cursor result.",
4452
+ "headers": {
4453
+ "x-correlation-id": {
4454
+ "$ref": "#/components/headers/CorrelationId"
4455
+ }
4456
+ },
4457
+ "content": {
4458
+ "application/json": {
4459
+ "schema": {
4460
+ "$ref": "#/components/schemas/ReadCursorResult"
4461
+ }
4462
+ }
4463
+ }
4464
+ },
4465
+ "CustomerNoteCommandApplied": {
4466
+ "description": "Applied or idempotently replayed Customer-note mutation result.",
4467
+ "headers": {
4468
+ "x-correlation-id": {
4469
+ "$ref": "#/components/headers/CorrelationId"
4470
+ }
4471
+ },
4472
+ "content": {
4473
+ "application/json": {
4474
+ "schema": {
4475
+ "$ref": "#/components/schemas/CustomerNoteCommandResult"
4476
+ }
4477
+ }
4478
+ }
4479
+ },
4480
+ "NotificationCommandApplied": {
4481
+ "description": "Applied, replayed, or monotonic no-op notification state result.",
4482
+ "headers": {
4483
+ "x-correlation-id": {
4484
+ "$ref": "#/components/headers/CorrelationId"
4485
+ }
4486
+ },
4487
+ "content": {
4488
+ "application/json": {
4489
+ "schema": {
4490
+ "$ref": "#/components/schemas/NotificationCommandResult"
4491
+ }
4492
+ }
4493
+ }
4494
+ },
4495
+ "BadRequest": {
4496
+ "description": "Invalid input.",
4497
+ "content": {
4498
+ "application/json": {
4499
+ "schema": {
4500
+ "$ref": "#/components/schemas/ErrorEnvelope"
4501
+ }
4502
+ }
4503
+ }
4504
+ },
4505
+ "Unauthorized": {
4506
+ "description": "Missing or invalid dashboard identity.",
4507
+ "content": {
4508
+ "application/json": {
4509
+ "schema": {
4510
+ "$ref": "#/components/schemas/ErrorEnvelope"
4511
+ }
4512
+ }
4513
+ }
4514
+ },
4515
+ "Forbidden": {
4516
+ "description": "Authenticated but not authorized for rooftop or capability.",
4517
+ "content": {
4518
+ "application/json": {
4519
+ "schema": {
4520
+ "$ref": "#/components/schemas/ErrorEnvelope"
4521
+ }
4522
+ }
4523
+ }
4524
+ },
4525
+ "NotFound": {
4526
+ "description": "Not found without disclosing unauthorized record existence.",
4527
+ "content": {
4528
+ "application/json": {
4529
+ "schema": {
4530
+ "$ref": "#/components/schemas/ErrorEnvelope"
4531
+ }
4532
+ }
4533
+ }
4534
+ },
4535
+ "Conflict": {
4536
+ "description": "Stale expectedVersion or command conflict; refresh and retry deliberately.",
4537
+ "content": {
4538
+ "application/json": {
4539
+ "schema": {
4540
+ "$ref": "#/components/schemas/ErrorEnvelope"
4541
+ }
4542
+ }
4543
+ }
4544
+ },
4545
+ "InternalError": {
4546
+ "description": "Unexpected service error.",
4547
+ "content": {
4548
+ "application/json": {
4549
+ "schema": {
4550
+ "$ref": "#/components/schemas/ErrorEnvelope"
4551
+ }
4552
+ }
4553
+ }
4554
+ },
4555
+ "ServiceUnavailable": {
4556
+ "description": "A required upstream authority is temporarily unavailable.",
4557
+ "content": {
4558
+ "application/json": {
4559
+ "schema": {
4560
+ "$ref": "#/components/schemas/ErrorEnvelope"
4561
+ }
4562
+ }
4563
+ }
4564
+ },
4565
+ "NotImplemented": {
4566
+ "description": "Contract route is published but behavior is pending DASH-235 through DASH-237.",
4567
+ "content": {
4568
+ "application/json": {
4569
+ "schema": {
4570
+ "$ref": "#/components/schemas/ErrorEnvelope"
4571
+ }
4572
+ }
4573
+ }
4574
+ }
4575
+ }
4576
+ }
4577
+ }