uapp-communication-sdk 1.0.0-dev.67 → 1.0.0-dev.72

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 (59) hide show
  1. package/README.md +5 -2
  2. package/communication-sdk.cjs +16 -14
  3. package/communication-sdk.js +7900 -7651
  4. package/communication-sdk.standalone.js +162 -160
  5. package/package.json +1 -1
  6. package/types/core/time/viewer-timezone.d.ts +17 -0
  7. package/types/core/time/viewer-timezone.d.ts.map +1 -1
  8. package/types/features/calls/presentation/CallOverlay.d.ts.map +1 -1
  9. package/types/features/calls/presentation/call-pip.d.ts +62 -0
  10. package/types/features/calls/presentation/call-pip.d.ts.map +1 -0
  11. package/types/features/calls/presentation/use-call-pip.d.ts +30 -0
  12. package/types/features/calls/presentation/use-call-pip.d.ts.map +1 -0
  13. package/types/features/chat/presentation/ConversationHeader.d.ts.map +1 -1
  14. package/types/features/chat/presentation/MemberRow.d.ts.map +1 -1
  15. package/types/features/chat/presentation/dm-presence.d.ts +1 -2
  16. package/types/features/chat/presentation/dm-presence.d.ts.map +1 -1
  17. package/types/features/presence/application/index.d.ts +1 -0
  18. package/types/features/presence/application/index.d.ts.map +1 -1
  19. package/types/features/presence/application/use-cases/get-presence-of.d.ts +14 -0
  20. package/types/features/presence/application/use-cases/get-presence-of.d.ts.map +1 -0
  21. package/types/features/presence/domain/index.d.ts +1 -0
  22. package/types/features/presence/domain/index.d.ts.map +1 -1
  23. package/types/features/presence/domain/others-presence.d.ts +18 -0
  24. package/types/features/presence/domain/others-presence.d.ts.map +1 -0
  25. package/types/features/presence/domain/ports/presence-gateway.d.ts +7 -0
  26. package/types/features/presence/domain/ports/presence-gateway.d.ts.map +1 -1
  27. package/types/features/presence/infrastructure/dto/presence-dtos.d.ts +34 -0
  28. package/types/features/presence/infrastructure/dto/presence-dtos.d.ts.map +1 -1
  29. package/types/features/presence/infrastructure/http-presence-gateway.d.ts +2 -1
  30. package/types/features/presence/infrastructure/http-presence-gateway.d.ts.map +1 -1
  31. package/types/features/presence/infrastructure/http-presence-routes.d.ts +2 -0
  32. package/types/features/presence/infrastructure/http-presence-routes.d.ts.map +1 -1
  33. package/types/features/presence/infrastructure/presence-mappers.d.ts +3 -2
  34. package/types/features/presence/infrastructure/presence-mappers.d.ts.map +1 -1
  35. package/types/features/presence/presence-module.d.ts +2 -1
  36. package/types/features/presence/presence-module.d.ts.map +1 -1
  37. package/types/features/presence/presentation/MyPresenceMenu.d.ts.map +1 -1
  38. package/types/features/presence/presentation/PresenceModuleProvider.d.ts.map +1 -1
  39. package/types/features/presence/presentation/ViewerPresenceBadge.d.ts +22 -0
  40. package/types/features/presence/presentation/ViewerPresenceBadge.d.ts.map +1 -0
  41. package/types/features/presence/presentation/index.d.ts +2 -0
  42. package/types/features/presence/presentation/index.d.ts.map +1 -1
  43. package/types/features/presence/presentation/use-live-presence-poll.d.ts +18 -0
  44. package/types/features/presence/presentation/use-live-presence-poll.d.ts.map +1 -0
  45. package/types/features/users/presentation/UserPresenceCell.d.ts.map +1 -1
  46. package/types/sdk/index.d.ts +1 -1
  47. package/types/sdk/index.d.ts.map +1 -1
  48. package/types/sdk/presence/presence-client.d.ts +24 -0
  49. package/types/sdk/presence/presence-client.d.ts.map +1 -1
  50. package/types/shared/presence/PresenceBadge.d.ts +14 -3
  51. package/types/shared/presence/PresenceBadge.d.ts.map +1 -1
  52. package/types/shared/presence/index.d.ts +0 -1
  53. package/types/shared/presence/index.d.ts.map +1 -1
  54. package/types/shared/presence/live-presence-store.d.ts +24 -4
  55. package/types/shared/presence/live-presence-store.d.ts.map +1 -1
  56. package/types/shared/presence/presence-status.d.ts +1 -1
  57. package/types/shared/presence/presence-status.d.ts.map +1 -1
  58. package/types/shared/presence/format-presence-time.d.ts +0 -13
  59. package/types/shared/presence/format-presence-time.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uapp-communication-sdk",
3
- "version": "1.0.0-dev.67",
3
+ "version": "1.0.0-dev.72",
4
4
  "description": "Embeddable Communication Hub widgets (chat, feed, bookings, schedule).",
5
5
  "type": "module",
6
6
  "types": "./types/sdk/index.d.ts",
@@ -20,6 +20,23 @@ export declare class ViewerTimeZone {
20
20
  formatTime(utcIso: string): string;
21
21
  /** `HH:MM – HH:MM` in the display zone; `''` when either bound is missing/unresolved. */
22
22
  formatTimeRange(startUtc: string | null | undefined, endUtc: string | null | undefined): string;
23
+ /**
24
+ * A deadline for a "… until X" label, in the display zone.
25
+ *
26
+ * <p>Bare `HH:MM` says "today" to a reader, so a deadline on another DAY has to say which one or it
27
+ * reads as a time that has already passed — somebody off all Sunday is back when their hours next
28
+ * open, which is Monday, and "Away until 16:00" shown at 16:52 on Sunday is simply false.</p>
29
+ *
30
+ * <p>Beyond a week the weekday alone would be ambiguous (seven days out is the same weekday), so the
31
+ * date joins it.</p>
32
+ */
33
+ formatUntil(utcIso: string, now?: Date): string;
34
+ /**
35
+ * Whole CALENDAR days from one instant to another in the display zone — not elapsed hours divided by
36
+ * 24. 23:30 to 00:30 is the next day however few minutes separate them, and that is what a reader
37
+ * means by "tomorrow".
38
+ */
39
+ private calendarDaysAhead;
23
40
  /** A UTC ISO instant formatted as a date in the display zone (defaults to `"Thu, 25 Jun"`). */
24
41
  formatDate(utcIso: string, options?: Intl.DateTimeFormatOptions): string;
25
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"viewer-timezone.d.ts","sourceRoot":"","sources":["../../../../../src/core/time/viewer-timezone.ts"],"names":[],"mappings":"AAuBA,MAAM,WAAW,mBAAmB;IAClC,4GAA4G;IAC5G,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,wFAAwF;IACxF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,mFAAmF;IACnF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,qBAAa,cAAc;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,GAAG,SAAS,EACnC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,MAAM;IAKT;;;;;;;;;OASG;IACI,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,GAAE,IAAiB,GAAG,MAAM;IAgBlE;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAOzB,+FAA+F;IACxF,UAAU,CACf,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,IAAI,CAAC,qBAIb,GACA,MAAM;CAMV"}
@@ -1 +1 @@
1
- {"version":3,"file":"CallOverlay.d.ts","sourceRoot":"","sources":["../../../../../../src/features/calls/presentation/CallOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAA+C,MAAM,OAAO,CAAC;AAOvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA+IzD,sGAAsG;AACtG,eAAO,MAAM,WAAW,GAAI,cAEzB;IACD,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC,KAAG,YAAY,GAAG,IAsElB,CAAC"}
1
+ {"version":3,"file":"CallOverlay.d.ts","sourceRoot":"","sources":["../../../../../../src/features/calls/presentation/CallOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAA+C,MAAM,OAAO,CAAC;AAQvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAoOzD,sGAAsG;AACtG,eAAO,MAAM,WAAW,GAAI,cAEzB;IACD,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC,KAAG,YAAY,GAAG,IA8ElB,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * The Document Picture-in-Picture seam — the browser half of "the call follows you out of the tab".
3
+ *
4
+ * <p>A PiP window is a REAL, separate document: it inherits no stylesheet, no theme attribute and no
5
+ * font from the page that opened it. Everything the card needs has to be carried across explicitly,
6
+ * which is what most of this file is.</p>
7
+ *
8
+ * <p><b>And it has to be carried into the right SHAPE.</b> In the app the card lives in the document,
9
+ * styled by ordinary `:root` rules. Inside an SDK embed it lives in a shadow root, styled by a sheet
10
+ * whose `:root`/`html`/`body` selectors were rewritten to `:host` at build time
11
+ * (`scripts/sdk-css-transform.cjs`) — copy those into a plain document and every design token silently
12
+ * matches nothing, which is the unstyled-overlay failure the `no-restricted-syntax` portal rule in
13
+ * `eslint.config.ts` exists to warn about. So the pop-out mirrors whatever the card is already in: a
14
+ * shadow root gets a shadow root.</p>
15
+ *
16
+ * <p>Kept apart from React so the rules can be read (and tested) without mounting anything.</p>
17
+ */
18
+ /** Options the API accepts. Narrower than the spec — only what this call surface uses. */
19
+ export interface DocumentPipOptions {
20
+ readonly width?: number;
21
+ readonly height?: number;
22
+ }
23
+ /** Where styles come from, and therefore what shape the pop-out has to reproduce. */
24
+ export type StyleRoot = Document | ShadowRoot;
25
+ /** An open pop-out: the window, and the node to render the card into. */
26
+ export interface PipMount {
27
+ readonly window: Window;
28
+ readonly container: HTMLElement | ShadowRoot;
29
+ }
30
+ /**
31
+ * Chromium 116+ only, at the time of writing. Everywhere else the call card simply stays in the page —
32
+ * a missing pop-out is a smaller failure than a call surface that throws on open.
33
+ */
34
+ export declare const supportsDocumentPip: (host?: Window) => boolean;
35
+ /** The PiP window currently open, if any — the browser allows at most one per document. */
36
+ export declare const currentPipWindow: (host?: Window) => Window | null;
37
+ /**
38
+ * Copies the page's styles into the PiP document.
39
+ *
40
+ * <p>Cloned rule by rule, which also captures Vite's dev-server styles and every CSS custom property
41
+ * the design system defines on `:root`. A cross-origin sheet cannot be read and is re-linked by href
42
+ * instead — the one case where cloning is impossible.</p>
43
+ */
44
+ export declare const adoptStyles: (pip: Window, source?: StyleRoot) => void;
45
+ /**
46
+ * Carries the theme across. The palette hangs off `data-theme` (and the class list) on the root element,
47
+ * so without this the card opens in whichever theme the tokens happen to default to — a white card
48
+ * flashing out of a dark app.
49
+ */
50
+ export declare const adoptTheme: (pip: Window, source?: Document) => void;
51
+ /**
52
+ * Opens the pop-out window, styled and themed, or null when the browser cannot.
53
+ *
54
+ * <p>Answers null rather than throwing: every caller is a UI affordance, and a call that keeps running
55
+ * in the tab is the correct outcome when the pop-out is refused. The refusal is ordinary — the API needs
56
+ * either a user gesture or Chrome's auto-picture-in-picture permission, and neither is guaranteed.</p>
57
+ *
58
+ * @param styleRoot what the card is currently styled by — its `getRootNode()`. A shadow root is
59
+ * reproduced as a shadow root; a document is copied into the pop-out's document.
60
+ */
61
+ export declare const openPipWindow: (options?: DocumentPipOptions, styleRoot?: StyleRoot, host?: Window) => Promise<PipMount | null>;
62
+ //# sourceMappingURL=call-pip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"call-pip.d.ts","sourceRoot":"","sources":["../../../../../../src/features/calls/presentation/call-pip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,0FAA0F;AAC1F,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,qFAAqF;AACrF,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE9C,yEAAyE;AACzE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,WAAW,GAAG,UAAU,CAAC;CAC9C;AAWD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAM,MAAe,KAAG,OACO,CAAC;AAEpE,2FAA2F;AAC3F,eAAO,MAAM,gBAAgB,GAAI,OAAM,MAAe,KAAG,MAAM,GAAG,IACG,CAAC;AAkCtE;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,SAAQ,SAAoB,KAAG,IAcvE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,EAAE,SAAQ,QAAmB,KAAG,IAQrE,CAAC;AAgDF;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,GACxB,UAAS,kBAAuB,EAChC,YAAW,SAAoB,EAC/B,OAAM,MAAe,KACpB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAsBzB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { type RefObject } from 'react';
2
+ import { type PipMount } from './call-pip';
3
+ /**
4
+ * Moves the call card out into a floating window while the tab is in the background, and brings it back
5
+ * when the tab returns — the behaviour WhatsApp Web, Meet and Teams all have.
6
+ *
7
+ * <p><b>Why a Media Session handler and not a `visibilitychange` listener.</b> Opening a
8
+ * Picture-in-Picture window needs either a user gesture or Chrome's auto-picture-in-picture permission,
9
+ * and switching tabs is neither: calling `requestWindow` straight from `visibilitychange` is refused.
10
+ * The supported route is to register an `enterpictureinpicture` Media Session action — Chrome grants
11
+ * that permission to pages currently using the camera or microphone, which during a call we are, and
12
+ * then invokes the handler itself when the tab is hidden. This is the same mechanism the apps above use,
13
+ * so it inherits their behaviour rather than approximating it.</p>
14
+ *
15
+ * <p>Coming back is ours to do: the browser will happily leave the window floating over a tab you are
16
+ * already looking at, which is two copies of the same call.</p>
17
+ *
18
+ * @param live whether a call is on screen — the window opens only for one, and closes with it.
19
+ * @param cardRef the rendered card, read only to find what it is styled by. In the app that is the
20
+ * document; inside an SDK embed it is the widget's shadow root, and the pop-out has to be built to
21
+ * match or the card arrives with no styling at all.
22
+ * @returns the open mount to render into, plus a manual opener for the pop-out control. The opener is
23
+ * the graceful degradation path: a click IS a user gesture, so it works on Chromium even where the
24
+ * automatic permission was never granted.
25
+ */
26
+ export declare const useCallPip: (live: boolean, cardRef: RefObject<HTMLElement | null>) => {
27
+ readonly mount: PipMount | null;
28
+ readonly popOut: () => void;
29
+ };
30
+ //# sourceMappingURL=use-call-pip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-call-pip.d.ts","sourceRoot":"","sources":["../../../../../../src/features/calls/presentation/use-call-pip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AACjF,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,UAAU,GACrB,MAAM,OAAO,EACb,SAAS,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,KACrC;IAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CA+FhE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chat/presentation/ConversationHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAkB1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAEZ,mBAAmB,EACpB,MAAM,WAAW,CAAC;AAKnB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AA0HtD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,kFAAkF;IAClF,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC;IACrC,QAAQ,CAAC,eAAe,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,cAAc,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9D,QAAQ,CAAC,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  } | undefined;
27
27
  /** The last status frame for the peer. Newer than the conversation's snapshot, so it wins. */
28
28
  readonly liveStatus: LiveStatusEntry | undefined;
29
- readonly fallbackSubtitle: string;
30
29
  readonly nowMs: number;
31
30
  }
32
31
  /**
33
32
  * Resolve a DM's online dot + subtitle + badge from live presence, falling back to what the
34
33
  * conversation itself carried when no live frame has arrived yet. Pure.
35
34
  */
36
- export declare const resolveDmPresence: ({ conversation, live, liveStatus, fallbackSubtitle, nowMs, }: DmPresenceInputs) => DmPresence;
35
+ export declare const resolveDmPresence: ({ conversation, live, liveStatus, nowMs, }: DmPresenceInputs) => DmPresence;
37
36
  //# sourceMappingURL=dm-presence.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dm-presence.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chat/presentation/dm-presence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,mGAAmG;AACnG,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,SAAS,CAAC;IAC7F,8FAA8F;IAC9F,QAAQ,CAAC,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,8DAM/B,gBAAgB,KAAG,UASrB,CAAC"}
1
+ {"version":3,"file":"dm-presence.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chat/presentation/dm-presence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,mGAAmG;AACnG,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,EACT;QAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GACjE,SAAS,CAAC;IACd,8FAA8F;IAC9F,QAAQ,CAAC,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,4CAK/B,gBAAgB,KAAG,UAuBrB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './use-cases/my-presence-use-cases';
2
+ export * from './use-cases/get-presence-of';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/application/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/application/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Result } from '@core/result';
2
+ import type { OtherPresence, PresenceError } from '../../domain';
3
+ import type { MyPresenceUseCaseDeps } from './my-presence-use-cases';
4
+ /**
5
+ * Presence for the people currently visible on screen — the freshness contract for everyone ELSE's
6
+ * badge. Clients poll this for their visible ids rather than trusting a snapshot fetched before the
7
+ * socket was up: the snapshot race that once froze a colleague on Offline until reload.
8
+ */
9
+ export declare class GetPresenceOfUseCase {
10
+ private readonly gateway;
11
+ constructor(deps: MyPresenceUseCaseDeps);
12
+ execute(userIds: readonly string[]): Promise<Result<readonly OtherPresence[], PresenceError>>;
13
+ }
14
+ //# sourceMappingURL=get-presence-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-presence-of.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/presence/application/use-cases/get-presence-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAmB,MAAM,cAAc,CAAC;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE;;;;GAIG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;gBAEvB,IAAI,EAAE,qBAAqB;IAIvC,OAAO,CACZ,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,OAAO,CAAC,MAAM,CAAC,SAAS,aAAa,EAAE,EAAE,aAAa,CAAC,CAAC;CAG5D"}
@@ -1,4 +1,5 @@
1
1
  export * from './my-presence';
2
+ export * from './others-presence';
2
3
  export * from './errors/presence-errors';
3
4
  export * from './ports/presence-gateway';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { PresenceStatus } from '@shared/presence';
2
+ /**
3
+ * Somebody ELSE's presence, as a colleague may see it beside their name.
4
+ *
5
+ * <p>Deliberately smaller than {@link MyPresence}: no `source` and no `note`. WHY somebody is busy —
6
+ * their calendar, their own hand — is theirs; what a colleague needs is only whether to interrupt,
7
+ * and until when. The server enforces the same cut, so this type cannot grow the fields by accident.</p>
8
+ *
9
+ * <p>`online` and `status` agree by construction — the server resolves Offline exactly when there is
10
+ * no connection — but both are carried so no consumer has to re-derive one from the other.</p>
11
+ */
12
+ export interface OtherPresence {
13
+ readonly userId: string;
14
+ readonly online: boolean;
15
+ readonly status: PresenceStatus;
16
+ readonly untilUtc: string | null;
17
+ }
18
+ //# sourceMappingURL=others-presence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"others-presence.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/domain/others-presence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC"}
@@ -1,6 +1,7 @@
1
1
  import type { Result } from '@core/result';
2
2
  import type { PresenceError } from '../errors/presence-errors';
3
3
  import type { MyPresence, SetMyPresenceInput } from '../my-presence';
4
+ import type { OtherPresence } from '../others-presence';
4
5
  /**
5
6
  * First-person only, mirroring the server.
6
7
  *
@@ -12,5 +13,11 @@ export interface PresenceGateway {
12
13
  getMine(): Promise<Result<MyPresence, PresenceError>>;
13
14
  setMine(input: SetMyPresenceInput): Promise<Result<MyPresence, PresenceError>>;
14
15
  clearMine(): Promise<Result<MyPresence, PresenceError>>;
16
+ /**
17
+ * The presence of the people a client has ON SCREEN. Read-only, so it does not bend the
18
+ * first-person rule above; the server answers every id (a stranger reads as offline) and refuses a
19
+ * batch larger than a screen's worth.
20
+ */
21
+ getOf(userIds: readonly string[]): Promise<Result<readonly OtherPresence[], PresenceError>>;
15
22
  }
16
23
  //# sourceMappingURL=presence-gateway.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"presence-gateway.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/presence/domain/ports/presence-gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IACtD,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IAC/E,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"presence-gateway.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/presence/domain/ports/presence-gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IACtD,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IAC/E,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IACxD;;;;OAIG;IACH,KAAK,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,aAAa,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC;CAC7F"}
@@ -26,4 +26,38 @@ export interface SetMyPresenceRequestDto {
26
26
  readonly minutes: number;
27
27
  readonly note?: string;
28
28
  }
29
+ /** One row of the visible-people batch. Status is the wire NUMBER, like everywhere else. */
30
+ export declare const UserPresenceDtoSchema: z.ZodObject<{
31
+ userId: z.ZodString;
32
+ online: z.ZodBoolean;
33
+ status: z.ZodNumber;
34
+ untilUtc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ status: number;
37
+ userId: string;
38
+ online: boolean;
39
+ untilUtc?: string | null | undefined;
40
+ }, {
41
+ status: number;
42
+ userId: string;
43
+ online: boolean;
44
+ untilUtc?: string | null | undefined;
45
+ }>;
46
+ export declare const UserPresenceListSchema: z.ZodArray<z.ZodObject<{
47
+ userId: z.ZodString;
48
+ online: z.ZodBoolean;
49
+ status: z.ZodNumber;
50
+ untilUtc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ status: number;
53
+ userId: string;
54
+ online: boolean;
55
+ untilUtc?: string | null | undefined;
56
+ }, {
57
+ status: number;
58
+ userId: string;
59
+ online: boolean;
60
+ untilUtc?: string | null | undefined;
61
+ }>, "many">;
62
+ export type UserPresenceDto = z.infer<typeof UserPresenceDtoSchema>;
29
63
  //# sourceMappingURL=presence-dtos.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"presence-dtos.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/presence/infrastructure/dto/presence-dtos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sGAAsG;AACtG,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,gGAAgG;AAChG,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB"}
1
+ {"version":3,"file":"presence-dtos.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/presence/infrastructure/dto/presence-dtos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sGAAsG;AACtG,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,gGAAgG;AAChG,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAKhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;WAAiC,CAAC;AAErE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { HttpClient } from '@core/http';
2
2
  import type { Logger } from '@core/logger';
3
3
  import { type Result } from '@core/result';
4
- import { type MyPresence, type PresenceError, type PresenceGateway, type SetMyPresenceInput } from '../domain';
4
+ import { type MyPresence, type OtherPresence, type PresenceError, type PresenceGateway, type SetMyPresenceInput } from '../domain';
5
5
  export interface HttpPresenceGatewayDeps {
6
6
  readonly httpClient: HttpClient;
7
7
  readonly logger: Logger;
@@ -13,6 +13,7 @@ export declare class HttpPresenceGateway implements PresenceGateway {
13
13
  constructor(deps: HttpPresenceGatewayDeps);
14
14
  getMine(): Promise<Result<MyPresence, PresenceError>>;
15
15
  setMine(input: SetMyPresenceInput): Promise<Result<MyPresence, PresenceError>>;
16
+ getOf(userIds: readonly string[]): Promise<Result<readonly OtherPresence[], PresenceError>>;
16
17
  clearMine(): Promise<Result<MyPresence, PresenceError>>;
17
18
  /**
18
19
  * One place for the parse-and-map, because all three endpoints answer with the SAME shape: the
@@ -1 +1 @@
1
- {"version":3,"file":"http-presence-gateway.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/infrastructure/http-presence-gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,cAAc,CAAC;AACpD,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAAC;AAKnB,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,+FAA+F;AAC/F,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEb,IAAI,EAAE,uBAAuB;IAKzC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAIrD,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAO9E,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAO9D;;;;OAIG;YACW,OAAO;CAgBtB"}
1
+ {"version":3,"file":"http-presence-gateway.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/infrastructure/http-presence-gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,cAAc,CAAC;AACpD,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAAC;AAKnB,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,+FAA+F;AAC/F,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEb,IAAI,EAAE,uBAAuB;IAKzC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAIrD,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAOxE,KAAK,CAChB,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,OAAO,CAAC,MAAM,CAAC,SAAS,aAAa,EAAE,EAAE,aAAa,CAAC,CAAC;IAqBpD,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAO9D;;;;OAIG;YACW,OAAO;CAgBtB"}
@@ -6,5 +6,7 @@ export declare const PRESENCE_ROUTES: {
6
6
  readonly mine: "/api/app/presence/mine";
7
7
  readonly setMine: "/api/app/presence/set-mine";
8
8
  readonly clearMine: "/api/app/presence/clear-mine";
9
+ /** ABP binds `GetOfAsync(GetPresenceOfInput)` from the query string — one `Ids=` pair per id. */
10
+ readonly of: (userIds: readonly string[]) => string;
9
11
  };
10
12
  //# sourceMappingURL=http-presence-routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-presence-routes.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/infrastructure/http-presence-routes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;CAIlB,CAAC"}
1
+ {"version":3,"file":"http-presence-routes.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/infrastructure/http-presence-routes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;IAI1B,iGAAiG;2BACnF,SAAS,MAAM,EAAE,KAAG,MAAM;CAEhC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { type MyPresence, type SetMyPresenceInput } from '../domain';
2
- import type { MyPresenceDto, SetMyPresenceRequestDto } from './dto/presence-dtos';
1
+ import { type MyPresence, type OtherPresence, type SetMyPresenceInput } from '../domain';
2
+ import type { MyPresenceDto, SetMyPresenceRequestDto, UserPresenceDto } from './dto/presence-dtos';
3
3
  export declare const toMyPresence: (dto: MyPresenceDto) => MyPresence;
4
4
  /**
5
5
  * The domain's status name → the wire's number.
@@ -9,4 +9,5 @@ export declare const toMyPresence: (dto: MyPresenceDto) => MyPresence;
9
9
  * straight through, so nothing type-checked the difference.</p>
10
10
  */
11
11
  export declare const toSetMyPresenceRequest: (input: SetMyPresenceInput) => SetMyPresenceRequestDto;
12
+ export declare const toOtherPresence: (dto: UserPresenceDto) => OtherPresence;
12
13
  //# sourceMappingURL=presence-mappers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"presence-mappers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/infrastructure/presence-mappers.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,UAAU,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/F,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAElF,eAAO,MAAM,YAAY,GAAI,KAAK,aAAa,KAAG,UAMhD,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,kBAAkB,KAAG,uBAIjE,CAAC"}
1
+ {"version":3,"file":"presence-mappers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/infrastructure/presence-mappers.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEnG,eAAO,MAAM,YAAY,GAAI,KAAK,aAAa,KAAG,UAMhD,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,kBAAkB,KAAG,uBAIjE,CAAC;AAEH,eAAO,MAAM,eAAe,GAAI,KAAK,eAAe,KAAG,aAKrD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { HttpClient } from '@core/http';
2
2
  import type { Logger } from '@core/logger';
3
- import { ClearMyPresenceUseCase, GetMyPresenceUseCase, SetMyPresenceUseCase } from './application';
3
+ import { ClearMyPresenceUseCase, GetMyPresenceUseCase, GetPresenceOfUseCase, SetMyPresenceUseCase } from './application';
4
4
  export interface PresenceModuleDeps {
5
5
  readonly logger: Logger;
6
6
  readonly httpClient: HttpClient;
@@ -9,6 +9,7 @@ export interface PresenceModule {
9
9
  readonly getMyPresence: GetMyPresenceUseCase;
10
10
  readonly setMyPresence: SetMyPresenceUseCase;
11
11
  readonly clearMyPresence: ClearMyPresenceUseCase;
12
+ readonly getPresenceOf: GetPresenceOfUseCase;
12
13
  readonly logger: Logger;
13
14
  }
14
15
  /** Composition root for presence — one gateway shared by the three first-person use cases. */
@@ -1 +1 @@
1
- {"version":3,"file":"presence-module.d.ts","sourceRoot":"","sources":["../../../../../src/features/presence/presence-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAC7C,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAC7C,QAAQ,CAAC,eAAe,EAAE,sBAAsB,CAAC;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,GAAI,MAAM,kBAAkB,KAAG,cAa/D,CAAC"}
1
+ {"version":3,"file":"presence-module.d.ts","sourceRoot":"","sources":["../../../../../src/features/presence/presence-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAC7C,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAC7C,QAAQ,CAAC,eAAe,EAAE,sBAAsB,CAAC;IACjD,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,GAAI,MAAM,kBAAkB,KAAG,cAc/D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MyPresenceMenu.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/MyPresenceMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA2C1C;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GAAI,aAAa;IAAE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;CAAE,KAAG,YAoDhF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,QAAO,YAYlC,CAAC"}
1
+ {"version":3,"file":"MyPresenceMenu.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/MyPresenceMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA6C1C;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GAAI,aAAa;IAAE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;CAAE,KAAG,YAqDhF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,QAAO,YAalC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PresenceModuleProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/PresenceModuleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,eAAO,MAAM,sBAAsB,GAAI,uBAGpC;IACD,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B,KAAG,YAEH,CAAC"}
1
+ {"version":3,"file":"PresenceModuleProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/PresenceModuleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAYzD,eAAO,MAAM,sBAAsB,GAAI,uBAGpC;IACD,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B,KAAG,YAKH,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { PresenceStatus } from '@shared/presence';
3
+ export interface ViewerPresenceBadgeProps {
4
+ readonly status: PresenceStatus;
5
+ /** When the status ends, or null when nothing bounds it. */
6
+ readonly untilUtc?: string | null;
7
+ readonly size?: 'sm' | 'md';
8
+ }
9
+ /**
10
+ * A {@link PresenceBadge} already wired to the READER's clock.
11
+ *
12
+ * <p>`PresenceBadge` takes its formatter as a prop because it sits in `shared/` and cannot reach the
13
+ * viewer's preferences. Every caller then wrote the same three lines to hand it
14
+ * `useViewerTimeZone().formatUntil` — chat header, member list, user directory — which is three chances
15
+ * to reach for `formatTime` instead and render a deadline on another day as a bare `HH:MM` that reads
16
+ * as today, and as already past.</p>
17
+ *
18
+ * <p>So the wiring lives here once. Use this anywhere inside the app; reach for `PresenceBadge`
19
+ * directly only where there is genuinely no viewer to have a timezone.</p>
20
+ */
21
+ export declare const ViewerPresenceBadge: ({ status, untilUtc, size, }: ViewerPresenceBadgeProps) => ReactElement;
22
+ //# sourceMappingURL=ViewerPresenceBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewerPresenceBadge.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/ViewerPresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,4DAA4D;IAC5D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAAI,6BAIjC,wBAAwB,KAAG,YAW7B,CAAC"}
@@ -2,4 +2,6 @@ export * from './PresenceModuleProvider';
2
2
  export * from './use-presence-module';
3
3
  export * from './use-my-presence';
4
4
  export * from './MyPresenceMenu';
5
+ export * from './use-live-presence-poll';
6
+ export * from './ViewerPresenceBadge';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The freshness loop for everyone ELSE's badge: every mounted badge registers its person as watched
3
+ * (see `useLiveStatus`), and this hook polls `presence/of` for exactly that set, writing the answers
4
+ * into the shared live store that every badge already reads.
5
+ *
6
+ * <p>This is the poor man's presence subscription — the same visibility-scoped shape Slack's
7
+ * `presence_sub` has, built on a poll instead of a socket. It closes the whole class of snapshot
8
+ * races structurally: a conversation fetched before the socket was up, a StatusChanged event missed
9
+ * during a reconnect, a backend restart that wiped the in-memory presence store — all of them
10
+ * converge within one interval, because the poll asks the server fresh every time.</p>
11
+ *
12
+ * <p>Cost scales with what is on screen, not with the tenant: fifty visible people is one request
13
+ * per interval, answered mostly from the server's cache. The set changing (a page navigation
14
+ * mounting different badges) re-keys the query, so newly visible people resolve immediately rather
15
+ * than waiting out the interval.</p>
16
+ */
17
+ export declare const useLivePresencePoll: () => void;
18
+ //# sourceMappingURL=use-live-presence-poll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-live-presence-poll.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/use-live-presence-poll.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,QAAO,IAwBtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserPresenceCell.d.ts","sourceRoot":"","sources":["../../../../../../src/features/users/presentation/UserPresenceCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGtC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;CAAE,KAAG,YAwBpE,CAAC"}
1
+ {"version":3,"file":"UserPresenceCell.d.ts","sourceRoot":"","sources":["../../../../../../src/features/users/presentation/UserPresenceCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGtC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;CAAE,KAAG,YA0BpE,CAAC"}
@@ -20,7 +20,7 @@ export { createNotificationClient, type NotificationClient, type NotificationCli
20
20
  * The signed-in person's own status, without a widget. The widgets show everyone ELSE's status; this
21
21
  * is how a host's own header lets somebody set theirs.
22
22
  */
23
- export { createPresenceClient, type PresenceClient, type PresenceClientOptions, type SdkPresence, type SdkPresenceSource, type SdkPresenceStatus, type SetSdkPresenceInput, } from './presence/presence-client';
23
+ export { createPresenceClient, type PresenceClient, type PresenceClientOptions, type SdkOtherPresence, type SdkPresence, type SdkPresenceSource, type SdkPresenceStatus, type SetSdkPresenceInput, } from './presence/presence-client';
24
24
  export { WidgetRoot, type WidgetRootProps } from './elements/WidgetRoot';
25
25
  export { registerChatWidget, registerFeedWidget, registerBookingsWidget, registerScheduleWidget, };
26
26
  export { SDK_MODULE_SCOPES, type AuthConfig, type CommsProviderProps, type SdkEvent, type SdkModuleScope, type ThemeConfig, type ThemeDensity, type ThemeMode, } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD;;;GAGG;AACH,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,GACrB,MAAM,qCAAqC,CAAC;AAC7C;;;GAGG;AACH,OAAO,EACL,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC;AAEF,OAAO,EACL,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,IAKvC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD;;;GAGG;AACH,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,GACrB,MAAM,qCAAqC,CAAC;AAC7C;;;GAGG;AACH,OAAO,EACL,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC;AAEF,OAAO,EACL,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,IAKvC,CAAC"}
@@ -18,6 +18,18 @@ export interface SdkPresence {
18
18
  /** True only while a self-set status is in force — the one case `clearMine` applies to. */
19
19
  readonly hasOverride: boolean;
20
20
  }
21
+ /**
22
+ * Somebody ELSE's presence. Deliberately smaller than {@link SdkPresence}: no `source`, no `note` —
23
+ * WHY a person is busy is theirs; what a colleague needs is whether to interrupt, and until when.
24
+ */
25
+ export interface SdkOtherPresence {
26
+ readonly userId: string;
27
+ /** Whether their client is open. Independent of `status`: someone in a meeting is very much online. */
28
+ readonly online: boolean;
29
+ readonly status: SdkPresenceStatus;
30
+ /** ISO 8601 UTC instant the status ends, or null when nothing bounds it. Format it locally. */
31
+ readonly untilUtc: string | null;
32
+ }
21
33
  export interface SetSdkPresenceInput {
22
34
  readonly status: SdkPresenceStatus;
23
35
  /**
@@ -47,6 +59,18 @@ export interface PresenceClient {
47
59
  setMine: (input: SetSdkPresenceInput) => Promise<SdkPresence | null>;
48
60
  /** Ends a self-set status early, falling back to whatever the system infers. */
49
61
  clearMine: () => Promise<SdkPresence | null>;
62
+ /**
63
+ * The presence of OTHER people — for a people-list you render yourself, outside the widgets.
64
+ *
65
+ * <p>Ask only for the ids currently on screen and poll about every 30 seconds: the server resolves
66
+ * fresh behind a cache on the same interval, so asking faster buys nothing, and asking about people
67
+ * nobody is looking at is the cost model this endpoint exists to protect. At most 100 ids per call;
68
+ * more is refused rather than truncated, so a page is never half-fresh.</p>
69
+ *
70
+ * <p>Answers `null` only when the call itself failed. A stranger the server knows nothing about
71
+ * comes back as an offline row, so a returned list always has one entry per requested id.</p>
72
+ */
73
+ getOf: (userIds: readonly string[]) => Promise<readonly SdkOtherPresence[] | null>;
50
74
  }
51
75
  /**
52
76
  * The signed-in person's own status, WITHOUT a widget.
@@ -1 +1 @@
1
- {"version":3,"file":"presence-client.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/presence/presence-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAE/C,wFAAwF;AACxF,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG,U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ACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mGAAmG;IACnG,QAAQ,CAAC,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,OAAO,EAAE,MAAM,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC3C;;;OAGG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACrE,gFAAgF;IAChF,SAAS,EAAE,MAAM,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC7C;;;;;;;;;;OAUG;IACH,KAAK,EAAE,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,SAAS,gBAAgB,EAAE,GAAG,IAAI,CAAC,CAAC;CACpF;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,qBAAqB,KAAG,cAwCrE,CAAC"}
@@ -4,8 +4,19 @@ export interface PresenceBadgeProps {
4
4
  readonly status: PresenceStatus;
5
5
  /** When the status ends. Rendered only when a formatter is supplied — see the note below. */
6
6
  readonly untilUtc?: string | null;
7
- /** Formats an ISO instant in the READER's locale and zone. Omit to show the bare label. */
8
- readonly formatTime?: (iso: string) => string;
7
+ /**
8
+ * Formats the END of the status in the VIEWER'S configured display zone — pass
9
+ * `useViewerTimeZone().formatUntil`. Omit to show the bare label.
10
+ *
11
+ * <p>`formatUntil`, NOT `formatTime`: a deadline on another day rendered as bare `HH:MM` reads as
12
+ * today and can therefore read as already past — somebody away all Sunday is back Monday, and
13
+ * "Away until 16:00" on a Sunday afternoon is simply false. The narrower name is the guard.</p>
14
+ *
15
+ * <p>Injected rather than chosen here: this component cannot reach the viewer's preferences, and
16
+ * quietly formatting in the browser's zone would make presence the one surface that disagrees with
17
+ * every other clock on the page for anyone who has set a personal timezone.</p>
18
+ */
19
+ readonly formatUntil?: (iso: string) => string;
9
20
  readonly size?: 'sm' | 'md';
10
21
  }
11
22
  /**
@@ -19,5 +30,5 @@ export interface PresenceBadgeProps {
19
30
  * <p>One component for every surface. Five places rendering their own version is how the same person
20
31
  * ends up a different colour in the chat header and the directory on the same screen.</p>
21
32
  */
22
- export declare const PresenceBadge: ({ status, untilUtc, formatTime, size, }: PresenceBadgeProps) => ReactElement;
33
+ export declare const PresenceBadge: ({ status, untilUtc, formatUntil, size, }: PresenceBadgeProps) => ReactElement;
23
34
  //# sourceMappingURL=PresenceBadge.d.ts.map