@pam-ai/pam-ordo-contracts 3.23.0 → 3.24.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.
@@ -3,6 +3,62 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  export interface paths {
6
+ "/v1/inbox/staff-work-status/self": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /** Read the authenticated staff member's effective work status */
14
+ get: operations["getInboxStaffWorkStatus"];
15
+ /** Set the authenticated staff member's bounded work-status override */
16
+ put: operations["setInboxStaffWorkStatus"];
17
+ post?: never;
18
+ delete?: never;
19
+ options?: never;
20
+ head?: never;
21
+ patch?: never;
22
+ trace?: never;
23
+ };
24
+ "/v1/inbox/staff-schedules/{userId}": {
25
+ parameters: {
26
+ query?: never;
27
+ header?: never;
28
+ path?: never;
29
+ cookie?: never;
30
+ };
31
+ /** Read one rooftop staff schedule */
32
+ get: operations["getInboxStaffSchedule"];
33
+ /** Replace one staff member's weekly rota and dated exceptions */
34
+ put: operations["setInboxStaffSchedule"];
35
+ post?: never;
36
+ delete?: never;
37
+ options?: never;
38
+ head?: never;
39
+ patch?: never;
40
+ trace?: never;
41
+ };
42
+ "/v1/inbox/assignment-candidates": {
43
+ parameters: {
44
+ query?: never;
45
+ header?: never;
46
+ path?: never;
47
+ cookie?: never;
48
+ };
49
+ /**
50
+ * List rooftop staff with authoritative work status for assignment
51
+ * @description Returns the active rooftop roster from Permissions with effective work status. A scheduled shift is display context only and never implies AVAILABLE. Only a current explicit AVAILABLE self status may set assignmentCandidate true. Cursors are opaque and UNKNOWN or stale authority is always excluded.
52
+ */
53
+ get: operations["listInboxAssignmentCandidates"];
54
+ put?: never;
55
+ post?: never;
56
+ delete?: never;
57
+ options?: never;
58
+ head?: never;
59
+ patch?: never;
60
+ trace?: never;
61
+ };
6
62
  "/v1/inbox/realtime-session": {
7
63
  parameters: {
8
64
  query?: never;
@@ -530,6 +586,158 @@ export interface components {
530
586
  InboxScope: "MY_INBOX" | "TEAM_INBOX" | "MENTIONS" | "CUSTOMERS" | "RO";
531
587
  /** @enum {string} */
532
588
  WorkCycleStatus: "OPEN" | "SNOOZED" | "RESOLVED";
589
+ /**
590
+ * @description Effective staff state owned by Permissions. AVAILABLE is reserved for a current explicit self override; being scheduled is not availability.
591
+ * @enum {string}
592
+ */
593
+ StaffWorkStatus: "AVAILABLE" | "ON_BREAK" | "OFF_FOR_DAY" | "OFF_SHIFT" | "UNKNOWN";
594
+ /** @enum {string} */
595
+ StaffWorkStatusSource: "SELF_OVERRIDE" | "DATE_EXCEPTION" | "WEEKLY_ROTA" | "NO_SCHEDULE" | "STALE_SCHEDULE";
596
+ StaffShiftWindow: {
597
+ /** Format: date */
598
+ date: string;
599
+ /** Format: date-time */
600
+ startAt: string;
601
+ /** Format: date-time */
602
+ endAt: string;
603
+ };
604
+ StaffWorkStatusSnapshot: {
605
+ clientOrgId: string;
606
+ userId: string;
607
+ status: components["schemas"]["StaffWorkStatus"];
608
+ source: components["schemas"]["StaffWorkStatusSource"];
609
+ /** Format: date-time */
610
+ observedAt: string;
611
+ /** @description The instant after which this answer must be recomputed. Null is allowed only for UNKNOWN. */
612
+ expiresAt: string | null;
613
+ scheduleVersion: number | null;
614
+ reason: string | null;
615
+ todayShift: components["schemas"]["StaffShiftWindow"] | null;
616
+ };
617
+ StaffAssignmentCandidate: {
618
+ clientOrgId: string;
619
+ userId: string;
620
+ status: components["schemas"]["StaffWorkStatus"];
621
+ source: components["schemas"]["StaffWorkStatusSource"];
622
+ /** Format: date-time */
623
+ observedAt: string;
624
+ expiresAt: string | null;
625
+ scheduleVersion: number | null;
626
+ reason: string | null;
627
+ todayShift: components["schemas"]["StaffShiftWindow"] | null;
628
+ displayName: components["schemas"]["HydratedText"];
629
+ persona: string | null;
630
+ department: ("SERVICE" | "BDC") | null;
631
+ teamIds: string[];
632
+ /** @description Active rooftop/capability eligibility for a deliberate User assignment. */
633
+ manualAssignmentEligible: boolean;
634
+ /** @description True only when manual eligibility and a current explicit AVAILABLE status both hold. */
635
+ automaticAssignmentEligible: boolean;
636
+ exclusionReason: string | null;
637
+ };
638
+ StaffAssignmentCandidatesResponse: {
639
+ data: {
640
+ /** Format: date-time */
641
+ observedAt: string;
642
+ candidates: components["schemas"]["StaffAssignmentCandidate"][];
643
+ nextCursor: string | null;
644
+ };
645
+ };
646
+ StaffWorkStatusSelfCommand: {
647
+ clientOrgId: string;
648
+ /** @enum {string} */
649
+ status: "AVAILABLE" | "ON_BREAK" | "OFF_FOR_DAY";
650
+ /** @enum {integer} */
651
+ breakDurationMinutes?: 15 | 30 | 60;
652
+ expectedVersion: number;
653
+ reason?: string;
654
+ } & unknown;
655
+ StaffWorkStatusSelfResult: {
656
+ data: {
657
+ overrideVersion: number;
658
+ workStatus: components["schemas"]["StaffWorkStatusSnapshot"];
659
+ };
660
+ };
661
+ StaffLocalTimeInterval: {
662
+ start: string;
663
+ end: string;
664
+ };
665
+ StaffWeeklyRota: {
666
+ MONDAY: components["schemas"]["StaffDayIntervals"];
667
+ TUESDAY: components["schemas"]["StaffDayIntervals"];
668
+ WEDNESDAY: components["schemas"]["StaffDayIntervals"];
669
+ THURSDAY: components["schemas"]["StaffDayIntervals"];
670
+ FRIDAY: components["schemas"]["StaffDayIntervals"];
671
+ SATURDAY: components["schemas"]["StaffDayIntervals"];
672
+ SUNDAY: components["schemas"]["StaffDayIntervals"];
673
+ };
674
+ StaffDayIntervals: components["schemas"]["StaffLocalTimeInterval"][];
675
+ StaffScheduleException: {
676
+ /** Format: date */
677
+ date: string;
678
+ /** @enum {string} */
679
+ kind: "WORKING" | "OFF";
680
+ intervals: components["schemas"]["StaffDayIntervals"];
681
+ reason: string | null;
682
+ };
683
+ StaffSchedule: {
684
+ clientOrgId: string;
685
+ userId: string;
686
+ version: number;
687
+ timezone: string;
688
+ /** Format: date */
689
+ effectiveFrom: string;
690
+ /** Format: date-time */
691
+ expiresAt: string;
692
+ weeklyRota: components["schemas"]["StaffWeeklyRota"];
693
+ dateExceptions: components["schemas"]["StaffScheduleException"][];
694
+ /** Format: date-time */
695
+ updatedAt: string;
696
+ };
697
+ StaffScheduleCommand: {
698
+ clientOrgId: string;
699
+ expectedVersion: number;
700
+ timezone: string;
701
+ /** Format: date */
702
+ effectiveFrom: string;
703
+ /** Format: date-time */
704
+ expiresAt: string;
705
+ weeklyRota: components["schemas"]["StaffWeeklyRota"];
706
+ dateExceptions: components["schemas"]["StaffScheduleException"][];
707
+ };
708
+ StaffScheduleResult: {
709
+ data: components["schemas"]["StaffSchedule"];
710
+ };
711
+ StaffRosterCandidateRequestV1: {
712
+ /** @constant */
713
+ schemaVersion: 1;
714
+ /** @constant */
715
+ mode: "ROSTER";
716
+ clientOrgId: string;
717
+ cursor?: string;
718
+ limit: number;
719
+ };
720
+ StaffExactCandidateRequestV1: {
721
+ /** @constant */
722
+ schemaVersion: 1;
723
+ /** @constant */
724
+ mode: "EXACT";
725
+ clientOrgId: string;
726
+ userIds: string[];
727
+ };
728
+ StaffAssignmentCandidateRequestV1: components["schemas"]["StaffRosterCandidateRequestV1"] | components["schemas"]["StaffExactCandidateRequestV1"];
729
+ /** @description For ROSTER requests, results retain the authority's stable roster page order and nextCursor is the opaque continuation cursor or null at completion. For EXACT requests, results are a unique subset of the requested User IDs in request order; an unresolved or ineligible User may be omitted, and nextCursor must be null. */
730
+ StaffAssignmentCandidateResponseV1: {
731
+ /** @constant */
732
+ schemaVersion: 1;
733
+ clientOrgId: string;
734
+ /** Format: date-time */
735
+ observedAt: string;
736
+ /** @description Candidate rows in stable roster order for ROSTER mode, or a unique request-ordered subset for EXACT mode. */
737
+ results: components["schemas"]["StaffAssignmentCandidate"][];
738
+ /** @description Opaque ROSTER continuation cursor; always null for EXACT mode. */
739
+ nextCursor: string | null;
740
+ };
533
741
  /** @enum {string} */
534
742
  AvailabilityState: "available" | "missing" | "stale" | "timeout" | "unauthorized" | "unsupported";
535
743
  Availability: {
@@ -741,6 +949,14 @@ export interface components {
741
949
  notifications: components["schemas"]["InboxPolicyNotificationRuleV1"][];
742
950
  customerMessageNotifications?: components["schemas"]["InboxPolicyCustomerMessageNotificationsV1"];
743
951
  emailDelivery?: components["schemas"]["InboxEmailDeliveryPolicyV1"];
952
+ staffWorkStatus?: components["schemas"]["InboxPolicyStaffWorkStatusV1"];
953
+ };
954
+ /** @description Rooftop activation for authoritative Permissions work status. Missing is normalized as DISPLAY_ONLY. SHADOW records the decision without changing routing; ENFORCED may exclude non-AVAILABLE Users from automatic routing. Manual assignment continues to use manualAssignmentEligible. */
955
+ InboxPolicyStaffWorkStatusV1: {
956
+ /** @enum {string} */
957
+ mode: "DISPLAY_ONLY" | "SHADOW" | "ENFORCED";
958
+ /** Format: date-time */
959
+ activatedAt: string;
744
960
  };
745
961
  /** @description Optional email-only delivery policy, separate from notification creation and recipient selection. Missing policy or enabled=false sends no email. Only notifications created at or after activatedAt are eligible. An empty kinds array opts into nothing. Reading, dismissal, and source resolution do not suppress an otherwise authorized send. Current disablement is a kill switch for unsent work; unknown send outcomes require reconciliation. */
746
962
  InboxEmailDeliveryPolicyV1: {
@@ -2177,6 +2393,7 @@ export interface components {
2177
2393
  /** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
2178
2394
  ClientOrgId: string;
2179
2395
  ConversationId: string;
2396
+ StaffUserId: string;
2180
2397
  };
2181
2398
  requestBodies: {
2182
2399
  BaseCommand: {
@@ -2273,6 +2490,163 @@ export interface components {
2273
2490
  }
2274
2491
  export type $defs = Record<string, never>;
2275
2492
  export interface operations {
2493
+ getInboxStaffWorkStatus: {
2494
+ parameters: {
2495
+ query?: never;
2496
+ header: {
2497
+ /** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
2498
+ "x-client-org-id": components["parameters"]["ClientOrgId"];
2499
+ };
2500
+ path?: never;
2501
+ cookie?: never;
2502
+ };
2503
+ requestBody?: never;
2504
+ responses: {
2505
+ /** @description Current self status and today's authoritative schedule window. */
2506
+ 200: {
2507
+ headers: {
2508
+ [name: string]: unknown;
2509
+ };
2510
+ content: {
2511
+ "application/json": components["schemas"]["StaffWorkStatusSelfResult"];
2512
+ };
2513
+ };
2514
+ 401: components["responses"]["Unauthorized"];
2515
+ 403: components["responses"]["Forbidden"];
2516
+ 500: components["responses"]["InternalError"];
2517
+ 503: components["responses"]["ServiceUnavailable"];
2518
+ };
2519
+ };
2520
+ setInboxStaffWorkStatus: {
2521
+ parameters: {
2522
+ query?: never;
2523
+ header: {
2524
+ /** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
2525
+ "x-client-org-id": components["parameters"]["ClientOrgId"];
2526
+ };
2527
+ path?: never;
2528
+ cookie?: never;
2529
+ };
2530
+ requestBody: {
2531
+ content: {
2532
+ "application/json": components["schemas"]["StaffWorkStatusSelfCommand"];
2533
+ };
2534
+ };
2535
+ responses: {
2536
+ /** @description Applied self status with server-derived expiry. */
2537
+ 200: {
2538
+ headers: {
2539
+ [name: string]: unknown;
2540
+ };
2541
+ content: {
2542
+ "application/json": components["schemas"]["StaffWorkStatusSelfResult"];
2543
+ };
2544
+ };
2545
+ 400: components["responses"]["BadRequest"];
2546
+ 401: components["responses"]["Unauthorized"];
2547
+ 403: components["responses"]["Forbidden"];
2548
+ 409: components["responses"]["Conflict"];
2549
+ 500: components["responses"]["InternalError"];
2550
+ 503: components["responses"]["ServiceUnavailable"];
2551
+ };
2552
+ };
2553
+ getInboxStaffSchedule: {
2554
+ parameters: {
2555
+ query?: never;
2556
+ header: {
2557
+ /** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
2558
+ "x-client-org-id": components["parameters"]["ClientOrgId"];
2559
+ };
2560
+ path: {
2561
+ userId: components["parameters"]["StaffUserId"];
2562
+ };
2563
+ cookie?: never;
2564
+ };
2565
+ requestBody?: never;
2566
+ responses: {
2567
+ /** @description Manager-authorized staff schedule. */
2568
+ 200: {
2569
+ headers: {
2570
+ [name: string]: unknown;
2571
+ };
2572
+ content: {
2573
+ "application/json": components["schemas"]["StaffScheduleResult"];
2574
+ };
2575
+ };
2576
+ 401: components["responses"]["Unauthorized"];
2577
+ 403: components["responses"]["Forbidden"];
2578
+ 404: components["responses"]["NotFound"];
2579
+ 500: components["responses"]["InternalError"];
2580
+ 503: components["responses"]["ServiceUnavailable"];
2581
+ };
2582
+ };
2583
+ setInboxStaffSchedule: {
2584
+ parameters: {
2585
+ query?: never;
2586
+ header: {
2587
+ /** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
2588
+ "x-client-org-id": components["parameters"]["ClientOrgId"];
2589
+ };
2590
+ path: {
2591
+ userId: components["parameters"]["StaffUserId"];
2592
+ };
2593
+ cookie?: never;
2594
+ };
2595
+ requestBody: {
2596
+ content: {
2597
+ "application/json": components["schemas"]["StaffScheduleCommand"];
2598
+ };
2599
+ };
2600
+ responses: {
2601
+ /** @description Applied schedule snapshot. */
2602
+ 200: {
2603
+ headers: {
2604
+ [name: string]: unknown;
2605
+ };
2606
+ content: {
2607
+ "application/json": components["schemas"]["StaffScheduleResult"];
2608
+ };
2609
+ };
2610
+ 400: components["responses"]["BadRequest"];
2611
+ 401: components["responses"]["Unauthorized"];
2612
+ 403: components["responses"]["Forbidden"];
2613
+ 404: components["responses"]["NotFound"];
2614
+ 409: components["responses"]["Conflict"];
2615
+ 500: components["responses"]["InternalError"];
2616
+ 503: components["responses"]["ServiceUnavailable"];
2617
+ };
2618
+ };
2619
+ listInboxAssignmentCandidates: {
2620
+ parameters: {
2621
+ query?: {
2622
+ cursor?: string;
2623
+ limit?: number;
2624
+ };
2625
+ header: {
2626
+ /** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
2627
+ "x-client-org-id": components["parameters"]["ClientOrgId"];
2628
+ };
2629
+ path?: never;
2630
+ cookie?: never;
2631
+ };
2632
+ requestBody?: never;
2633
+ responses: {
2634
+ /** @description Bounded active rooftop staff page and effective work status. */
2635
+ 200: {
2636
+ headers: {
2637
+ [name: string]: unknown;
2638
+ };
2639
+ content: {
2640
+ "application/json": components["schemas"]["StaffAssignmentCandidatesResponse"];
2641
+ };
2642
+ };
2643
+ 400: components["responses"]["BadRequest"];
2644
+ 401: components["responses"]["Unauthorized"];
2645
+ 403: components["responses"]["Forbidden"];
2646
+ 500: components["responses"]["InternalError"];
2647
+ 503: components["responses"]["ServiceUnavailable"];
2648
+ };
2649
+ };
2276
2650
  createInboxRealtimeSession: {
2277
2651
  parameters: {
2278
2652
  query?: never;