@pam-ai/pam-ordo-contracts 3.19.0 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -1
- package/dist/generated.d.ts +160 -0
- package/dist/generated.d.ts.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/fixtures/conversation-detail-attention-history.json +208 -0
- package/fixtures/dismiss-notifications-command-continuation.json +5 -0
- package/fixtures/dismiss-notifications-command-invalid-null-cursor.json +5 -0
- package/fixtures/dismiss-notifications-command-invalid-unknown-field.json +5 -0
- package/fixtures/dismiss-notifications-command.json +4 -0
- package/fixtures/dismiss-notifications-result-complete.json +11 -0
- package/fixtures/dismiss-notifications-result.json +11 -0
- package/fixtures/manifest.json +6 -0
- package/fixtures/notification-list.json +22 -1
- package/fixtures/producer-attention-category-observed-assessment-command-v1.json +33 -0
- package/openapi/openapi.json +567 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Pin consumers to an exact npm version:
|
|
|
9
9
|
```json
|
|
10
10
|
{
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@pam-ai/pam-ordo-contracts": "3.
|
|
12
|
+
"@pam-ai/pam-ordo-contracts": "3.20.0"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
```
|
|
@@ -18,13 +18,34 @@ Pin consumers to an exact npm version:
|
|
|
18
18
|
import type {
|
|
19
19
|
ConversationDetailResponse,
|
|
20
20
|
InboxListResponse,
|
|
21
|
+
NotificationDisplayContext,
|
|
21
22
|
NotificationListResponse,
|
|
23
|
+
DismissNotificationsCommand,
|
|
24
|
+
DismissNotificationsResult,
|
|
22
25
|
CommandResult,
|
|
23
26
|
ErrorEnvelope,
|
|
24
27
|
paths,
|
|
25
28
|
} from '@pam-ai/pam-ordo-contracts';
|
|
26
29
|
```
|
|
27
30
|
|
|
31
|
+
Notification reads may include the optional `InboxNotification.displayContext`.
|
|
32
|
+
When present, `NotificationDisplayContext` always contains `customerName`,
|
|
33
|
+
`actorName`, `repairOrderNumber`, `commentExcerpt`, and `context`; the latter
|
|
34
|
+
four values are either an authorized `HydratedText` or `null` when that context
|
|
35
|
+
is not applicable. A relevant but unavailable or withheld source is represented
|
|
36
|
+
by `HydratedText.availability`, not by `null`. Consumers should render
|
|
37
|
+
availability and use the existing `title`/`body` fallback when the context
|
|
38
|
+
object is absent.
|
|
39
|
+
|
|
40
|
+
`POST /v1/inbox/commands/dismiss-notifications` implements Clear all for the
|
|
41
|
+
authenticated recipient. The initial `DismissNotificationsCommand` omits
|
|
42
|
+
`cursor`; the server fixes the action boundary and returns a stable informational
|
|
43
|
+
`cutoff`. Each `nextCursor` continuation uses a new operation ID, and repeating
|
|
44
|
+
the same request replays its `DismissNotificationsResult`. Cursors are opaque,
|
|
45
|
+
recipient/rooftop-bound, and `nextCursor: null` means the fixed snapshot is
|
|
46
|
+
complete. The response counts are for that page only; notifications created
|
|
47
|
+
after the cutoff remain eligible for a later read.
|
|
48
|
+
|
|
28
49
|
FIFO producers also import `ProducerCommandV1` plus the deterministic
|
|
29
50
|
`producerMessageGroupId`, `producerMessageDeduplicationId`, and
|
|
30
51
|
`producerMessageAttributes` helpers. The helpers keep every producer aligned
|
package/dist/generated.d.ts
CHANGED
|
@@ -501,6 +501,27 @@ export interface paths {
|
|
|
501
501
|
patch?: never;
|
|
502
502
|
trace?: never;
|
|
503
503
|
};
|
|
504
|
+
"/v1/inbox/commands/dismiss-notifications": {
|
|
505
|
+
parameters: {
|
|
506
|
+
query?: never;
|
|
507
|
+
header?: never;
|
|
508
|
+
path?: never;
|
|
509
|
+
cookie?: never;
|
|
510
|
+
};
|
|
511
|
+
get?: never;
|
|
512
|
+
put?: never;
|
|
513
|
+
/**
|
|
514
|
+
* Dismiss visible recipient-owned notifications through a fixed snapshot
|
|
515
|
+
* @description Dismisses the authenticated recipient's visible notifications for the selected rooftop and marks unread notifications read. The first request omits `cursor`; the server establishes the action boundary and returns its informational RFC3339 `cutoff`. A continuation submits the opaque `nextCursor` from the preceding response with a new `operationId`.
|
|
516
|
+
* Continuation cursors are bound to the root operation, authenticated recipient, selected rooftop, and server cutoff. Clients must not decode, construct, or reuse a cursor outside the exact operation chain. Each page is independently idempotent: repeating the same request with the same operation ID replays that page's receipt, while reusing an operation ID with a different request is a conflict. `dismissedCount` and `readCount` describe state transitions in this page only. `nextCursor: null` means the fixed snapshot is complete; notifications created after the cutoff are not consumed by this operation.
|
|
517
|
+
*/
|
|
518
|
+
post: operations["dismissInboxNotifications"];
|
|
519
|
+
delete?: never;
|
|
520
|
+
options?: never;
|
|
521
|
+
head?: never;
|
|
522
|
+
patch?: never;
|
|
523
|
+
trace?: never;
|
|
524
|
+
};
|
|
504
525
|
}
|
|
505
526
|
export type webhooks = Record<string, never>;
|
|
506
527
|
export interface components {
|
|
@@ -522,6 +543,62 @@ export interface components {
|
|
|
522
543
|
value?: string | null;
|
|
523
544
|
availability: components["schemas"]["Availability"];
|
|
524
545
|
};
|
|
546
|
+
/** @description A validated current-source Conversation AI assessment. This is separate from the cumulative Conversation snapshot: a null model result is omitted, meaning that this source did not provide qualifying evidence. The category remains the outer category-observed payload field so consumers cannot mistake provenance for a category. */
|
|
547
|
+
ConversationAiAssessmentV1: {
|
|
548
|
+
reason: string;
|
|
549
|
+
/** Format: date-time */
|
|
550
|
+
detectedAt: string;
|
|
551
|
+
model: string;
|
|
552
|
+
promptVersion: string;
|
|
553
|
+
confidence: number;
|
|
554
|
+
};
|
|
555
|
+
/** @description Current actionable Attention evidence exposed by a read. The source category pairs this assessment with its reason even when an AttentionCycle contains legacy evidence from another category. The reason is HydratedText so a source or enrichment outage is explicit; detectedAt is model provenance and is not the AttentionCycle lifecycle time or the source interaction occurredAt. This object never represents cumulative snapshot categories and never reopens an AttentionCycle by itself. */
|
|
556
|
+
AttentionAssessmentV1: {
|
|
557
|
+
category: string;
|
|
558
|
+
reason: components["schemas"]["HydratedText"];
|
|
559
|
+
/** Format: date-time */
|
|
560
|
+
detectedAt: string;
|
|
561
|
+
model: string;
|
|
562
|
+
promptVersion: string;
|
|
563
|
+
confidence: number;
|
|
564
|
+
};
|
|
565
|
+
/** @description A materially notified manager proven by a durable SQL notification row. notifiedAt is the SQL handoff/materialization time, not provider delivery, handset receipt, or a seen timestamp. User identity and display name are presentation data, not an authorization grant; authorization is evaluated by the service for the requesting user. */
|
|
566
|
+
AttentionNotifiedManagerV1: {
|
|
567
|
+
userId: string;
|
|
568
|
+
displayName: components["schemas"]["HydratedText"];
|
|
569
|
+
/** Format: date-time */
|
|
570
|
+
notifiedAt: string;
|
|
571
|
+
};
|
|
572
|
+
/** @description A hydrated User actor for an Attention history event. Null actor is used for source or system events without a User identity. Actor identity is provenance only and does not authorize the viewer. */
|
|
573
|
+
AttentionHistoryActorV1: {
|
|
574
|
+
userId: string;
|
|
575
|
+
displayName: components["schemas"]["HydratedText"];
|
|
576
|
+
};
|
|
577
|
+
/** @description One bounded, append-only AttentionCycle history event selected for a Conversation detail read. actorType deliberately distinguishes an explicit User resolution from the canonical WorkCycle-close resolution; work_cycle_close is not manager handling. occurredAt is the authoritative event business time. */
|
|
578
|
+
AttentionHistoryEventV1: {
|
|
579
|
+
/** Format: uuid */
|
|
580
|
+
id: string;
|
|
581
|
+
/** Format: uuid */
|
|
582
|
+
attentionCycleId: string;
|
|
583
|
+
/** Format: uuid */
|
|
584
|
+
workCycleId: string;
|
|
585
|
+
category: string;
|
|
586
|
+
/** @enum {string} */
|
|
587
|
+
eventType: "opened" | "evidence_added" | "recipients_resolved" | "acknowledged" | "resolution_prompted" | "resolved" | "corrected";
|
|
588
|
+
/** @enum {string} */
|
|
589
|
+
actorType: "user" | "system" | "source" | "work_cycle_close";
|
|
590
|
+
/** Format: date-time */
|
|
591
|
+
occurredAt: string;
|
|
592
|
+
actor: components["schemas"]["AttentionHistoryActorV1"] | null;
|
|
593
|
+
} & (unknown & unknown);
|
|
594
|
+
/** @description Recipient-specific metadata for a needs_attention notification. ACTIONABLE is the configured manager alert; INFORMATIONAL identifies a current owner notice and does not add that owner to attention_cycle_recipients. This context is presentation metadata only: purpose, category, reason, and manager rows never grant authorization or claim provider delivery. */
|
|
595
|
+
AttentionNotificationContextV1: {
|
|
596
|
+
/** @enum {string} */
|
|
597
|
+
purpose: "ACTIONABLE" | "INFORMATIONAL";
|
|
598
|
+
category?: string;
|
|
599
|
+
reason?: components["schemas"]["HydratedText"];
|
|
600
|
+
notifiedManagers?: components["schemas"]["AttentionNotifiedManagerV1"][];
|
|
601
|
+
} & unknown;
|
|
525
602
|
HydratedStringList: {
|
|
526
603
|
value: string[] | null;
|
|
527
604
|
availability: components["schemas"]["Availability"];
|
|
@@ -550,6 +627,10 @@ export interface components {
|
|
|
550
627
|
/** Format: date-time */
|
|
551
628
|
openedAt: string;
|
|
552
629
|
version: number;
|
|
630
|
+
/** @description Optional current-source evidence for this actionable cycle. This is deliberately separate from cumulative Conversation AI categories and does not reopen a cycle. */
|
|
631
|
+
assessment?: components["schemas"]["AttentionAssessmentV1"];
|
|
632
|
+
/** @description Manager identities with a durable SQL notification row for this cycle. This list is not provider-delivery or seen-state evidence and does not grant authorization. */
|
|
633
|
+
notifiedManagers?: components["schemas"]["AttentionNotifiedManagerV1"][];
|
|
553
634
|
};
|
|
554
635
|
/** @description Derived read-time Overdue presentation. It is never a mutable lifecycle flag. */
|
|
555
636
|
OverdueSummary: {
|
|
@@ -1061,6 +1142,8 @@ export interface components {
|
|
|
1061
1142
|
owner: components["schemas"]["Owner"] | null;
|
|
1062
1143
|
reminder: components["schemas"]["Reminder"] | null;
|
|
1063
1144
|
attention: components["schemas"]["AttentionSummary"] | null;
|
|
1145
|
+
/** @description Optional bounded, selected-cycle Attention history. Events preserve actorType so an explicit User resolution is not confused with canonical work-cycle closure. */
|
|
1146
|
+
attentionEvents?: components["schemas"]["AttentionHistoryEventV1"][];
|
|
1064
1147
|
overdue: components["schemas"]["OverdueSummary"];
|
|
1065
1148
|
/** @description Optional so this addition stays a minor version. An absent field means this deployment does not resolve the messaging authority at all, which a consumer should treat the same way it treats `UNKNOWN` — draw no control rather than an inert one. */
|
|
1066
1149
|
pamAutoReply?: components["schemas"]["PamAutoReplyV1"];
|
|
@@ -1126,6 +1209,18 @@ export interface components {
|
|
|
1126
1209
|
createdAt: string;
|
|
1127
1210
|
/** Format: date-time */
|
|
1128
1211
|
readAt: string | null;
|
|
1212
|
+
/** @description Optional authorized context for panel and banner presentation. Its absence is compatible with older producers; it must not be rebuilt from untrusted notification copy or realtime payloads. */
|
|
1213
|
+
displayContext?: components["schemas"]["NotificationDisplayContext"];
|
|
1214
|
+
/** @description Optional recipient-specific needs_attention metadata. Purpose is presentation context only; it never grants authorization or claims provider delivery. */
|
|
1215
|
+
attentionContext?: components["schemas"]["AttentionNotificationContextV1"];
|
|
1216
|
+
} & unknown;
|
|
1217
|
+
/** @description Authorized, bounded presentation context for one recipient notification. Every key is present when the object is returned. A `null` value means that context is not applicable to this notification. When a relevant source is unavailable or withholds a value, return a HydratedText with its availability state instead; neither form is an authorization grant. `customerName` remains a HydratedText object so its availability state is explicit. */
|
|
1218
|
+
NotificationDisplayContext: {
|
|
1219
|
+
customerName: components["schemas"]["HydratedText"];
|
|
1220
|
+
actorName: components["schemas"]["HydratedText"] | null;
|
|
1221
|
+
repairOrderNumber: components["schemas"]["HydratedText"] | null;
|
|
1222
|
+
commentExcerpt: components["schemas"]["HydratedText"] | null;
|
|
1223
|
+
context: components["schemas"]["HydratedText"] | null;
|
|
1129
1224
|
};
|
|
1130
1225
|
NotificationListResponse: {
|
|
1131
1226
|
data: {
|
|
@@ -1352,6 +1447,8 @@ export interface components {
|
|
|
1352
1447
|
ProducerAttentionCategoryObservedPayloadV1: {
|
|
1353
1448
|
category: string;
|
|
1354
1449
|
sourceInteraction: components["schemas"]["ProducerSourceInteractionIdentityV1"];
|
|
1450
|
+
/** @description Optional same-call current-source assessment. It is omitted when the model abstains; consumers must not derive fresh Attention from cumulative snapshot categories. */
|
|
1451
|
+
assessment?: components["schemas"]["ConversationAiAssessmentV1"];
|
|
1355
1452
|
};
|
|
1356
1453
|
ProducerReminderFirePayloadV1: {
|
|
1357
1454
|
/** Format: uuid */
|
|
@@ -1534,6 +1631,13 @@ export interface components {
|
|
|
1534
1631
|
/** Format: uuid */
|
|
1535
1632
|
notificationId: string;
|
|
1536
1633
|
};
|
|
1634
|
+
/** @description Recipient-only bulk dismissal. Omit `cursor` on the first page so the server can establish the fixed action boundary. For later pages, pass the exact opaque cursor returned by the preceding response and a fresh operation ID. `clientOrgId` must match the selected rooftop header after normal authorization; neither value grants access. */
|
|
1635
|
+
DismissNotificationsCommand: {
|
|
1636
|
+
operationId: string;
|
|
1637
|
+
clientOrgId: string;
|
|
1638
|
+
/** @description Opaque continuation cursor from the immediately preceding page. */
|
|
1639
|
+
cursor?: string;
|
|
1640
|
+
};
|
|
1537
1641
|
/**
|
|
1538
1642
|
* @description Mark the caller's outstanding Mentions on one WorkCycle dealt with.
|
|
1539
1643
|
* CONVERSATION-WIDE, NOT PER-MENTION, and the shape is the point. A recipient does not think in Mentions; they think "I have handled this thread". Two colleagues naming the same person in one exchange raises two Mentions, and clearing one of them would leave the row on the Mentions list with nothing on screen to explain why.
|
|
@@ -1831,6 +1935,25 @@ export interface components {
|
|
|
1831
1935
|
dismissedAt: string | null;
|
|
1832
1936
|
};
|
|
1833
1937
|
};
|
|
1938
|
+
/** @description Applied or idempotently replayed page of a recipient-only bulk dismissal. Counts cover this page, while `cutoff` and the cursor chain cover the fixed root snapshot. */
|
|
1939
|
+
DismissNotificationsResult: {
|
|
1940
|
+
data: {
|
|
1941
|
+
operationId: string;
|
|
1942
|
+
applied: boolean;
|
|
1943
|
+
replayed: boolean;
|
|
1944
|
+
/** @description Notifications transitioned to dismissed in this page. */
|
|
1945
|
+
dismissedCount: number;
|
|
1946
|
+
/** @description Previously unread notifications transitioned to read in this page. */
|
|
1947
|
+
readCount: number;
|
|
1948
|
+
/**
|
|
1949
|
+
* Format: date-time
|
|
1950
|
+
* @description Informational RFC3339 action boundary established by the initial request.
|
|
1951
|
+
*/
|
|
1952
|
+
cutoff: string;
|
|
1953
|
+
/** @description Opaque continuation cursor, or null when the fixed snapshot is complete. */
|
|
1954
|
+
nextCursor: string | null;
|
|
1955
|
+
};
|
|
1956
|
+
};
|
|
1834
1957
|
ErrorEnvelope: {
|
|
1835
1958
|
error: {
|
|
1836
1959
|
code: string;
|
|
@@ -1903,6 +2026,16 @@ export interface components {
|
|
|
1903
2026
|
"application/json": components["schemas"]["NotificationCommandResult"];
|
|
1904
2027
|
};
|
|
1905
2028
|
};
|
|
2029
|
+
/** @description Applied or idempotently replayed page of a fixed-snapshot notification dismissal. */
|
|
2030
|
+
DismissNotificationsApplied: {
|
|
2031
|
+
headers: {
|
|
2032
|
+
"x-correlation-id": components["headers"]["CorrelationId"];
|
|
2033
|
+
[name: string]: unknown;
|
|
2034
|
+
};
|
|
2035
|
+
content: {
|
|
2036
|
+
"application/json": components["schemas"]["DismissNotificationsResult"];
|
|
2037
|
+
};
|
|
2038
|
+
};
|
|
1906
2039
|
/** @description Created or idempotently replayed canonical Customer result. */
|
|
1907
2040
|
InboxCustomerCreated: {
|
|
1908
2041
|
headers: {
|
|
@@ -2072,6 +2205,11 @@ export interface components {
|
|
|
2072
2205
|
"application/json": components["schemas"]["NotificationCommand"];
|
|
2073
2206
|
};
|
|
2074
2207
|
};
|
|
2208
|
+
DismissNotificationsCommand: {
|
|
2209
|
+
content: {
|
|
2210
|
+
"application/json": components["schemas"]["DismissNotificationsCommand"];
|
|
2211
|
+
};
|
|
2212
|
+
};
|
|
2075
2213
|
CreateInboxCustomerCommand: {
|
|
2076
2214
|
content: {
|
|
2077
2215
|
"application/json": components["schemas"]["CreateInboxCustomerCommand"];
|
|
@@ -2839,5 +2977,27 @@ export interface operations {
|
|
|
2839
2977
|
503: components["responses"]["ServiceUnavailable"];
|
|
2840
2978
|
};
|
|
2841
2979
|
};
|
|
2980
|
+
dismissInboxNotifications: {
|
|
2981
|
+
parameters: {
|
|
2982
|
+
query?: never;
|
|
2983
|
+
header: {
|
|
2984
|
+
/** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
|
|
2985
|
+
"x-client-org-id": components["parameters"]["ClientOrgId"];
|
|
2986
|
+
};
|
|
2987
|
+
path?: never;
|
|
2988
|
+
cookie?: never;
|
|
2989
|
+
};
|
|
2990
|
+
requestBody: components["requestBodies"]["DismissNotificationsCommand"];
|
|
2991
|
+
responses: {
|
|
2992
|
+
200: components["responses"]["DismissNotificationsApplied"];
|
|
2993
|
+
400: components["responses"]["BadRequest"];
|
|
2994
|
+
401: components["responses"]["Unauthorized"];
|
|
2995
|
+
403: components["responses"]["Forbidden"];
|
|
2996
|
+
404: components["responses"]["NotFound"];
|
|
2997
|
+
409: components["responses"]["Conflict"];
|
|
2998
|
+
500: components["responses"]["InternalError"];
|
|
2999
|
+
503: components["responses"]["ServiceUnavailable"];
|
|
3000
|
+
};
|
|
3001
|
+
};
|
|
2842
3002
|
}
|
|
2843
3003
|
//# sourceMappingURL=generated.d.ts.map
|