@pam-ai/pam-ordo-contracts 3.41.0 → 3.43.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.
@@ -1522,8 +1522,9 @@ export interface components {
1522
1522
  resolvedAt?: string | null;
1523
1523
  version: number;
1524
1524
  /**
1525
- * @description Inbound Customer Interactions on THIS WorkCycle with no outbound Interaction after them. Optional until every producer publishes it; absent means the count is unknown, not zero.
1526
- * It answers a different question from `InteractionSummary`, which sits beside this object rather than inside it: that one is Conversation-wide and totals every Interaction ever exchanged, so it keeps climbing across cycles and never falls when someone replies. A row that says how much is waiting on the reader needs this one. `oldestUnrespondedAt` already names the same set's earliest member.
1525
+ * @description Inbound Customer Interactions in this WorkCycle's pending round: those after the last human advisor reply on the cycle, meaning an outbound Interaction a User sent that is not an automatic message (DASH-379, 3.43.0). Pam's automatic replies and RO status texts do not end the round. Before 3.43.0 any outbound Interaction did. Optional until every producer publishes it; absent means the count is unknown, not zero.
1526
+ * It answers a different question from `InteractionSummary`, which sits beside this object rather than inside it: that one is Conversation-wide and totals every Interaction ever exchanged, so it keeps climbing across cycles and never falls when someone replies. A row that says how much is waiting on the reader needs this one.
1527
+ * NOT the set `oldestUnrespondedAt` measures. That clock drives Overdue and still treats Pam's automatic replies as a response, so after one the clock can be null while this count is still above zero. Never derive either from the other.
1527
1528
  */
1528
1529
  unrespondedInboundCount?: number;
1529
1530
  /** @description The Interactions counted by `unrespondedInboundCount`, split by kind, for the three kinds a Customer arrives by. Other inbound kinds are counted in the total but not here, so the three may sum to less than it; a consumer that needs the split to be complete must check the sum. Optional: absent means the producer does not publish it. Null when there is no WorkCycle to scope it to. */
@@ -1537,6 +1538,38 @@ export interface components {
1537
1538
  * Optional and independently nullable: absent means the producer does not publish it, null means there is nothing waiting or the body is not available. Never reconstruct it from the count, and never treat its absence as an empty message.
1538
1539
  */
1539
1540
  latestUnrespondedInboundPreview?: string | null;
1541
+ /** @description The pending round the counts above describe, as one window shared by row counts, labels, attachments and the AI summary (DASH-379). Optional: absent means the producer does not publish it. Null when the cycle is resolved or nothing is pending; a resolved cycle keeps its history, and its final preview is a separate concern. */
1542
+ pendingRound?: components["schemas"]["PendingRoundV1"] | null;
1543
+ };
1544
+ /** @description Inbound arrivals on one WorkCycle since the last human advisor reply, computed from server state rather than from whatever part of the thread a reader has loaded. Out-of-order delivery is placed by occurrence time, so it lands in the round it belongs to and cannot restore an earlier round's state. */
1545
+ PendingRoundV1: {
1546
+ /**
1547
+ * Format: date-time
1548
+ * @description Occurrence time of the last human advisor reply on the cycle; the round holds arrivals strictly after it. Null when nobody has replied, so the round runs from the start of the cycle.
1549
+ */
1550
+ startsAfter: string | null;
1551
+ /** @description Caller intents of the round's calls, each key once at its first occurrence. Ordered with every `intent` before every `transfer`, oldest first within each group. A consumer that shows fewer must keep this order. Deliberately uncapped and never truncated: a round holds any number of calls, so the list is bounded only by the distinct caller-intent keys, and a cut would silently drop the transfers that sort last. */
1552
+ labels: components["schemas"]["PendingRoundLabelV1"][];
1553
+ /** @description Calls in the round whose post-call analysis has not landed yet, so the labels may still grow. Zero when every call is analyzed. */
1554
+ pendingAnalysis: number;
1555
+ };
1556
+ PendingRoundLabelV1: {
1557
+ key: string;
1558
+ /** @enum {string} */
1559
+ kind: "intent" | "transfer";
1560
+ /**
1561
+ * Format: date-time
1562
+ * @description Occurrence time of the earliest call in the round carrying this key.
1563
+ */
1564
+ firstSeenAt: string;
1565
+ /**
1566
+ * Format: uuid
1567
+ * @description That earliest call, so a consumer can open the call this label came from.
1568
+ */
1569
+ sourceInteractionId: string;
1570
+ requestedPersonName?: string | null;
1571
+ requestedDepartment?: string | null;
1572
+ serviceRequestInvoked?: boolean | null;
1540
1573
  };
1541
1574
  /** @description The three queue counts the Reporting page shows, with the same meaning as the matching InboxCounts fields for TEAM_INBOX in the same scope. */
1542
1575
  ReportingQueueCounts: {
@@ -1658,6 +1691,35 @@ export interface components {
1658
1691
  * @enum {string}
1659
1692
  */
1660
1693
  CallTerminalOutcomeV1: "answered" | "voicemail" | "missed" | "busy" | "no_answer";
1694
+ /** @description One thing the caller wanted, as classified by post-call analysis (pam-postcall `caller_intent`, the source call logs and reporting already use). `key` is the CALLER_INTENT tag, such as SCHEDULE_SERVICE or SPEAK_TO_HUMAN_IN_PARTS; it is an open string because tags are configured outside this contract, so a consumer must render an unknown key gracefully rather than reject it. */
1695
+ CallerIntentV1: {
1696
+ key: string;
1697
+ /**
1698
+ * @description `transfer` when the caller asked for a person or department (the SPEAK_TO_* keys), otherwise `intent`. A call can carry both; consumers show intents before transfers.
1699
+ * @enum {string}
1700
+ */
1701
+ kind: "intent" | "transfer";
1702
+ /** @description The analysis' main reason for the call. At most one entry is primary. */
1703
+ primary: boolean;
1704
+ /** @description Who the caller asked for, on SPEAK_TO_SPECIFIC_HUMAN. Null or absent when the analysis did not name anyone. */
1705
+ requestedPersonName?: string | null;
1706
+ /** @description The department the caller asked for, on a SPEAK_TO_HUMAN_IN_* transfer. */
1707
+ requestedDepartment?: string | null;
1708
+ /** @description Only on SCHEDULE_SERVICE. True when Pam actually called the service-request tool on this call, false when the analysis observed the call's tools and it did not, null when tool calls were not observed. Never derived from `fulfillment`, which is rewritten to service_appointment_request for rooftops without a service integration. */
1709
+ serviceRequestInvoked?: boolean | null;
1710
+ };
1711
+ /** @description The caller intents recorded for one call. `pending` means post-call analysis has not reported yet, which is different from an analyzed call whose only intent is UNCLEAR_INTENT. A pending entry may carry the call summary's primary intent as a provisional item so a reader is not left blank in the seconds before analysis lands. */
1712
+ CallerIntentsV1: {
1713
+ /** @enum {string} */
1714
+ analysis: "pending" | "analyzed";
1715
+ /**
1716
+ * Format: date-time
1717
+ * @description When the analysis that produced `items` ran. Null while pending.
1718
+ */
1719
+ analyzedAt?: string | null;
1720
+ /** @description Producer order with the primary entry first. */
1721
+ items: components["schemas"]["CallerIntentV1"][];
1722
+ };
1661
1723
  InteractionRef: {
1662
1724
  /** Format: uuid */
1663
1725
  id: string;
@@ -1688,6 +1750,8 @@ export interface components {
1688
1750
  * Null for Interactions Ordo itself authored — an internal comment has no external record to point at — and for any source that has not recorded one. Distinct from `sourceLocator`, which is a native partition/sort key and is published only when the source addresses records that way; a source can have one, both, or neither.
1689
1751
  */
1690
1752
  sourceRecordId?: string | null;
1753
+ /** @description What the caller wanted on this call, one entry per intent or transfer request (DASH-378). Present only on an inbound `call` or `voicemail`; absent or null on every other Interaction. Optional so this addition is a minor version. */
1754
+ callerIntents?: components["schemas"]["CallerIntentsV1"] | null;
1691
1755
  /**
1692
1756
  * @description Present only on an Interaction of kind `ro_event`. Before this field a repair-order Interaction arrived with kind `ro_event`, a null body and nothing else, so a reader could tell that SOMETHING had happened to a repair order but neither which one nor whether it had opened or closed.
1693
1757
  * NULL IS POSSIBLE ON AN ro_event, and 3.14.0 wrongly said it was not. There are two reasons for it, and only one of them is historical.
@@ -2209,6 +2273,14 @@ export interface components {
2209
2273
  /** @description Optional same-call current-source assessment. It is omitted when the model abstains; consumers must not derive fresh Attention from cumulative snapshot categories. */
2210
2274
  assessment?: components["schemas"]["ConversationAiAssessmentV1"];
2211
2275
  };
2276
+ /** @description The complete set of caller intents one post-call analysis produced for one call. The consumer replaces the call's previous set when `analyzedAt` is later than the stored one and ignores an equal or earlier analysis, so redelivery and out-of-order delivery cannot restore a stale set. */
2277
+ ProducerCallerIntentsObservedPayloadV1: {
2278
+ /** @description The call, as Ordo already knows it: `pam_call_metadata` and the connection id. The call may not have reached Ordo yet; the consumer keeps the intents until it does. */
2279
+ sourceInteraction: components["schemas"]["ProducerSourceInteractionIdentityV1"];
2280
+ /** Format: date-time */
2281
+ analyzedAt: string;
2282
+ intents: components["schemas"]["CallerIntentV1"][];
2283
+ };
2212
2284
  ProducerReminderFirePayloadV1: {
2213
2285
  /** Format: uuid */
2214
2286
  reminderId: string;
@@ -2296,6 +2368,27 @@ export interface components {
2296
2368
  target: components["schemas"]["ProducerSourceActivityTargetV1"];
2297
2369
  payload: components["schemas"]["ProducerAttentionCategoryObservedPayloadV1"];
2298
2370
  };
2371
+ /** @description Reports the caller intents post-call analysis recorded for one call (DASH-378). Unlike other producer commands it has no target: the producer knows the call, not its Conversation or Customer, and the call's own identity is enough for the consumer to find it. occurredAt is the call's business time. It uses its own FIFO message group per call, so it never delays the call's Conversation. */
2372
+ ProducerCallerIntentsObservedCommandV1: {
2373
+ /** @constant */
2374
+ schemaVersion: 1;
2375
+ operationId: string;
2376
+ /**
2377
+ * @description discriminator enum property added by openapi-typescript
2378
+ * @enum {string}
2379
+ */
2380
+ commandType: "interaction.caller_intents_observed";
2381
+ clientOrgId: string;
2382
+ traceId: string;
2383
+ /** Format: date-time */
2384
+ occurredAt: string;
2385
+ actor: {
2386
+ /** @constant */
2387
+ type: "source";
2388
+ };
2389
+ source: components["schemas"]["ProducerSourceV1"];
2390
+ payload: components["schemas"]["ProducerCallerIntentsObservedPayloadV1"];
2391
+ };
2299
2392
  ProducerReminderFireCommandV1: {
2300
2393
  /** @constant */
2301
2394
  schemaVersion: 1;
@@ -2360,7 +2453,7 @@ export interface components {
2360
2453
  payload: components["schemas"]["ProducerOverdueFirePayloadV1"];
2361
2454
  };
2362
2455
  /** @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. */
2363
- ProducerCommandV1: components["schemas"]["ProducerSourceActivityCommandV1"] | components["schemas"]["ProducerAttentionCommandV1"] | components["schemas"]["ProducerAttentionCategoryObservedCommandV1"] | components["schemas"]["ProducerReminderFireCommandV1"] | components["schemas"]["ProducerSnoozeReturnCommandV1"] | components["schemas"]["ProducerOverdueFireCommandV1"];
2456
+ ProducerCommandV1: components["schemas"]["ProducerSourceActivityCommandV1"] | components["schemas"]["ProducerAttentionCommandV1"] | components["schemas"]["ProducerAttentionCategoryObservedCommandV1"] | components["schemas"]["ProducerCallerIntentsObservedCommandV1"] | components["schemas"]["ProducerReminderFireCommandV1"] | components["schemas"]["ProducerSnoozeReturnCommandV1"] | components["schemas"]["ProducerOverdueFireCommandV1"];
2364
2457
  CommandEnvelope: {
2365
2458
  operationId: string;
2366
2459
  clientOrgId: string;