@crossworks/client-types 0.232.315 → 0.232.317

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/dto/rows.ts +36 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossworks/client-types",
3
- "version": "0.232.315",
3
+ "version": "0.232.317",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/dto/rows.ts CHANGED
@@ -559,6 +559,42 @@ export type TeamRequest = {
559
559
  notifiedAt: string | null;
560
560
  };
561
561
 
562
+ /** The newest thing waiting in one "needs you" queue: its title and who it
563
+ * is from, never its content (a notification shows exactly this). */
564
+ export type NeedsYouItem = {
565
+ id: string;
566
+ title: string;
567
+ /** The member's display name (or the email's local part). */
568
+ from: string;
569
+ /** When it started waiting (submitted, or the request was filed). */
570
+ at: string;
571
+ };
572
+
573
+ /**
574
+ * GET /api/team-admin/needs-you: what waits for an admin, as counts from
575
+ * count queries (never a capped list), so every window and device shows the
576
+ * same number. The owner live stream (/api/realtime) sends a change typed
577
+ * `needs_you` whenever one of these counts may have moved; the client
578
+ * refetches this. Admins only: a member login gets 403.
579
+ */
580
+ export type NeedsYou = {
581
+ review: {
582
+ /** Items members submitted (incl. taken items whose admin is gone). */
583
+ submitted: number;
584
+ /** Team-shared items deactivated logins left behind. */
585
+ leftBehind: number;
586
+ /** The newest submitted item, or null. */
587
+ newest: NeedsYouItem | null;
588
+ };
589
+ requests: {
590
+ /** Open (not done) team requests. */
591
+ open: number;
592
+ newest: NeedsYouItem | null;
593
+ };
594
+ /** review.submitted + review.leftBehind + requests.open. */
595
+ total: number;
596
+ };
597
+
562
598
  export type AccountFoldersResult =
563
599
  | {
564
600
  ok: true;