@pam-ai/pam-ordo-contracts 3.40.0 → 3.41.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.
@@ -59,6 +59,46 @@ export interface paths {
59
59
  patch?: never;
60
60
  trace?: never;
61
61
  };
62
+ "/v1/inbox/reporting/summary": {
63
+ parameters: {
64
+ query?: never;
65
+ header?: never;
66
+ path?: never;
67
+ cookie?: never;
68
+ };
69
+ /**
70
+ * Team reporting figures for one window
71
+ * @description The Reporting page's figures, computed by the service rather than counted off listed rows. Scope is TEAM_INBOX exactly - the same visibility, the same teamId and departments semantics - so a tile can drill into the TEAM_INBOX list it counts and the two agree. live is the queue right now and ignores the window; owners and messages are bounded by the window. include names the sections to compute, so a comparison read of the previous window can ask for messages alone.
72
+ */
73
+ get: operations["getInboxReportingSummary"];
74
+ put?: never;
75
+ post?: never;
76
+ delete?: never;
77
+ options?: never;
78
+ head?: never;
79
+ patch?: never;
80
+ trace?: never;
81
+ };
82
+ "/v1/inbox/reporting/count-snapshots": {
83
+ parameters: {
84
+ query?: never;
85
+ header?: never;
86
+ path?: never;
87
+ cookie?: never;
88
+ };
89
+ /**
90
+ * The live queue counts as they stood at an earlier moment
91
+ * @description Open, overdue and needs-attention counts from the hourly snapshot taken at or before at, no earlier than two hours before it, summed over the same scope /v1/inbox/reporting/summary uses today. Snapshots are kept per owner, so the scope is applied to the people in it now: the comparison is the same people then and now. data is null when no snapshot falls inside that tolerance - before the first capture, after the 31-day retention, or across a missed hour - and a client then shows no comparison rather than a wrong one.
92
+ */
93
+ get: operations["getInboxReportingCountSnapshot"];
94
+ put?: never;
95
+ post?: never;
96
+ delete?: never;
97
+ options?: never;
98
+ head?: never;
99
+ patch?: never;
100
+ trace?: never;
101
+ };
62
102
  "/v1/inbox/realtime-session": {
63
103
  parameters: {
64
104
  query?: never;
@@ -1498,6 +1538,59 @@ export interface components {
1498
1538
  */
1499
1539
  latestUnrespondedInboundPreview?: string | null;
1500
1540
  };
1541
+ /** @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
+ ReportingQueueCounts: {
1543
+ open: number;
1544
+ overdue: number;
1545
+ needsAttention: number;
1546
+ };
1547
+ /** @description Time to a first reply. The first unanswered customer inbound in a Conversation starts the clock and the next customer-facing outbound stops it; the gap is credited to whoever sent that outbound, Pam included. A gap counts in the window its outbound falls in. Gaps over 720 minutes are not replies and are left out. Mean and median travel together because the gap between them is the finding. */
1548
+ ReportingReplyStats: {
1549
+ meanMinutes: number | null;
1550
+ medianMinutes: number | null;
1551
+ sampleCount: number;
1552
+ };
1553
+ /** @description One person's line in the Reporting table. Listed when they own open work in scope now, or sent customer-facing outbound in the window. Queue fields are right now; outbound and reply are the window's. */
1554
+ ReportingOwnerRollup: {
1555
+ userId: string;
1556
+ open: number;
1557
+ overdue: number;
1558
+ needsAttention: number;
1559
+ /** @description The longest-waiting unanswered inbound across their open work, or null. */
1560
+ oldestUnrespondedAt: string | null;
1561
+ /** @description Customer-facing outbound this person sent in the window. */
1562
+ outbound: number;
1563
+ reply: components["schemas"]["ReportingReplyStats"];
1564
+ };
1565
+ /** @description Customer-facing outbound in the window - calls and texts, never internal notes or system interactions - and reply time across everyone who answered. */
1566
+ ReportingMessageMetrics: {
1567
+ outbound: number;
1568
+ outboundByPam: number;
1569
+ reply: components["schemas"]["ReportingReplyStats"];
1570
+ };
1571
+ ReportingSummary: {
1572
+ clientOrgId: string;
1573
+ /** Format: date-time */
1574
+ observedAt: string;
1575
+ /** Format: date-time */
1576
+ from: string;
1577
+ /** Format: date-time */
1578
+ to: string;
1579
+ live?: components["schemas"]["ReportingQueueCounts"];
1580
+ owners?: components["schemas"]["ReportingOwnerRollup"][];
1581
+ messages?: components["schemas"]["ReportingMessageMetrics"];
1582
+ };
1583
+ ReportingSummaryResponse: {
1584
+ data: components["schemas"]["ReportingSummary"];
1585
+ };
1586
+ ReportingCountSnapshot: {
1587
+ /** Format: date-time */
1588
+ capturedAt: string;
1589
+ counts: components["schemas"]["ReportingQueueCounts"];
1590
+ };
1591
+ ReportingCountSnapshotResponse: {
1592
+ data: components["schemas"]["ReportingCountSnapshot"] | null;
1593
+ };
1501
1594
  InboxCounts: {
1502
1595
  total: number;
1503
1596
  open: number;
@@ -3069,6 +3162,14 @@ export interface components {
3069
3162
  ConversationId: string;
3070
3163
  InteractionId: string;
3071
3164
  AttachmentId: string;
3165
+ /** @description Window start, inclusive. */
3166
+ ReportingFrom: string;
3167
+ /** @description Window end, exclusive. Must be after from. */
3168
+ ReportingTo: string;
3169
+ /** @description Same meaning as teamId on GET /v1/inbox/conversations - the caller's own Team, never another. */
3170
+ ReportingTeamId: string;
3171
+ /** @description Same meaning as departments on GET /v1/inbox/conversations with scope TEAM_INBOX, including the attribution of unassigned work to BDC. A service manager's page sends SERVICE. */
3172
+ ReportingDepartments: ("SERVICE" | "BDC")[];
3072
3173
  StaffUserId: string;
3073
3174
  };
3074
3175
  requestBodies: {
@@ -3358,6 +3459,79 @@ export interface operations {
3358
3459
  503: components["responses"]["ServiceUnavailable"];
3359
3460
  };
3360
3461
  };
3462
+ getInboxReportingSummary: {
3463
+ parameters: {
3464
+ query: {
3465
+ /** @description Window start, inclusive. */
3466
+ from: components["parameters"]["ReportingFrom"];
3467
+ /** @description Window end, exclusive. Must be after from. */
3468
+ to: components["parameters"]["ReportingTo"];
3469
+ /** @description Same meaning as teamId on GET /v1/inbox/conversations - the caller's own Team, never another. */
3470
+ teamId?: components["parameters"]["ReportingTeamId"];
3471
+ /** @description Same meaning as departments on GET /v1/inbox/conversations with scope TEAM_INBOX, including the attribution of unassigned work to BDC. A service manager's page sends SERVICE. */
3472
+ departments?: components["parameters"]["ReportingDepartments"];
3473
+ /** @description Sections to compute. Absent computes all three. */
3474
+ include?: ("LIVE" | "OWNERS" | "MESSAGES")[];
3475
+ };
3476
+ header: {
3477
+ /** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
3478
+ "x-client-org-id": components["parameters"]["ClientOrgId"];
3479
+ };
3480
+ path?: never;
3481
+ cookie?: never;
3482
+ };
3483
+ requestBody?: never;
3484
+ responses: {
3485
+ /** @description The requested sections for the window. */
3486
+ 200: {
3487
+ headers: {
3488
+ [name: string]: unknown;
3489
+ };
3490
+ content: {
3491
+ "application/json": components["schemas"]["ReportingSummaryResponse"];
3492
+ };
3493
+ };
3494
+ 400: components["responses"]["BadRequest"];
3495
+ 401: components["responses"]["Unauthorized"];
3496
+ 403: components["responses"]["Forbidden"];
3497
+ 500: components["responses"]["InternalError"];
3498
+ 503: components["responses"]["ServiceUnavailable"];
3499
+ };
3500
+ };
3501
+ getInboxReportingCountSnapshot: {
3502
+ parameters: {
3503
+ query: {
3504
+ at: string;
3505
+ /** @description Same meaning as teamId on GET /v1/inbox/conversations - the caller's own Team, never another. */
3506
+ teamId?: components["parameters"]["ReportingTeamId"];
3507
+ /** @description Same meaning as departments on GET /v1/inbox/conversations with scope TEAM_INBOX, including the attribution of unassigned work to BDC. A service manager's page sends SERVICE. */
3508
+ departments?: components["parameters"]["ReportingDepartments"];
3509
+ };
3510
+ header: {
3511
+ /** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
3512
+ "x-client-org-id": components["parameters"]["ClientOrgId"];
3513
+ };
3514
+ path?: never;
3515
+ cookie?: never;
3516
+ };
3517
+ requestBody?: never;
3518
+ responses: {
3519
+ /** @description The snapshot nearest at, or null. */
3520
+ 200: {
3521
+ headers: {
3522
+ [name: string]: unknown;
3523
+ };
3524
+ content: {
3525
+ "application/json": components["schemas"]["ReportingCountSnapshotResponse"];
3526
+ };
3527
+ };
3528
+ 400: components["responses"]["BadRequest"];
3529
+ 401: components["responses"]["Unauthorized"];
3530
+ 403: components["responses"]["Forbidden"];
3531
+ 500: components["responses"]["InternalError"];
3532
+ 503: components["responses"]["ServiceUnavailable"];
3533
+ };
3534
+ };
3361
3535
  createInboxRealtimeSession: {
3362
3536
  parameters: {
3363
3537
  query?: never;