uapp-communication-sdk 1.0.0-dev.65 → 1.0.0-dev.66
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.
- package/README.md +80 -2
- package/communication-sdk.cjs +15 -15
- package/communication-sdk.js +5324 -5021
- package/communication-sdk.standalone.js +160 -160
- package/package.json +1 -1
- package/types/app/App.d.ts.map +1 -1
- package/types/app/di/composition-root.d.ts +2 -0
- package/types/app/di/composition-root.d.ts.map +1 -1
- package/types/app/shell/TopBar.d.ts.map +1 -1
- package/types/features/chat/domain/entities/conversation.d.ts +20 -0
- package/types/features/chat/domain/entities/conversation.d.ts.map +1 -1
- package/types/features/chat/infrastructure/chat-mappers.d.ts.map +1 -1
- package/types/features/chat/infrastructure/chat-realtime-parsers.d.ts +2 -1
- package/types/features/chat/infrastructure/chat-realtime-parsers.d.ts.map +1 -1
- package/types/features/chat/infrastructure/chat-realtime-protocol.d.ts +23 -0
- package/types/features/chat/infrastructure/chat-realtime-protocol.d.ts.map +1 -1
- package/types/features/chat/infrastructure/dto/chat-dtos.d.ts +100 -0
- package/types/features/chat/infrastructure/dto/chat-dtos.d.ts.map +1 -1
- package/types/features/chat/presentation/ConversationHeader.d.ts.map +1 -1
- package/types/features/chat/presentation/MemberRow.d.ts.map +1 -1
- package/types/features/chat/presentation/chat-realtime-handlers.d.ts.map +1 -1
- package/types/features/chat/presentation/dm-presence.d.ts +37 -0
- package/types/features/chat/presentation/dm-presence.d.ts.map +1 -0
- package/types/features/chat/presentation/useChatRealtime.d.ts.map +1 -1
- package/types/features/presence/application/index.d.ts +2 -0
- package/types/features/presence/application/index.d.ts.map +1 -0
- package/types/features/presence/application/use-cases/my-presence-use-cases.d.ts +26 -0
- package/types/features/presence/application/use-cases/my-presence-use-cases.d.ts.map +1 -0
- package/types/features/presence/domain/errors/presence-errors.d.ts +8 -0
- package/types/features/presence/domain/errors/presence-errors.d.ts.map +1 -0
- package/types/features/presence/domain/index.d.ts +4 -0
- package/types/features/presence/domain/index.d.ts.map +1 -0
- package/types/features/presence/domain/my-presence.d.ts +28 -0
- package/types/features/presence/domain/my-presence.d.ts.map +1 -0
- package/types/features/presence/domain/ports/presence-gateway.d.ts +16 -0
- package/types/features/presence/domain/ports/presence-gateway.d.ts.map +1 -0
- package/types/features/presence/index.d.ts +4 -0
- package/types/features/presence/index.d.ts.map +1 -0
- package/types/features/presence/infrastructure/dto/presence-dtos.d.ts +29 -0
- package/types/features/presence/infrastructure/dto/presence-dtos.d.ts.map +1 -0
- package/types/features/presence/infrastructure/http-presence-gateway.d.ts +24 -0
- package/types/features/presence/infrastructure/http-presence-gateway.d.ts.map +1 -0
- package/types/features/presence/infrastructure/http-presence-routes.d.ts +10 -0
- package/types/features/presence/infrastructure/http-presence-routes.d.ts.map +1 -0
- package/types/features/presence/infrastructure/index.d.ts +3 -0
- package/types/features/presence/infrastructure/index.d.ts.map +1 -0
- package/types/features/presence/infrastructure/presence-mappers.d.ts +12 -0
- package/types/features/presence/infrastructure/presence-mappers.d.ts.map +1 -0
- package/types/features/presence/presence-module.d.ts +16 -0
- package/types/features/presence/presence-module.d.ts.map +1 -0
- package/types/features/presence/presentation/MyPresenceMenu.d.ts +23 -0
- package/types/features/presence/presentation/MyPresenceMenu.d.ts.map +1 -0
- package/types/features/presence/presentation/PresenceModuleProvider.d.ts +7 -0
- package/types/features/presence/presentation/PresenceModuleProvider.d.ts.map +1 -0
- package/types/features/presence/presentation/index.d.ts +5 -0
- package/types/features/presence/presentation/index.d.ts.map +1 -0
- package/types/features/presence/presentation/presence-module-context.d.ts +3 -0
- package/types/features/presence/presentation/presence-module-context.d.ts.map +1 -0
- package/types/features/presence/presentation/use-my-presence.d.ts +13 -0
- package/types/features/presence/presentation/use-my-presence.d.ts.map +1 -0
- package/types/features/presence/presentation/use-presence-module.d.ts +3 -0
- package/types/features/presence/presentation/use-presence-module.d.ts.map +1 -0
- package/types/features/users/domain/entities/user.d.ts +13 -0
- package/types/features/users/domain/entities/user.d.ts.map +1 -1
- package/types/features/users/infrastructure/dto/user-dtos.d.ts +16 -0
- package/types/features/users/infrastructure/dto/user-dtos.d.ts.map +1 -1
- package/types/features/users/infrastructure/user-mappers.d.ts.map +1 -1
- package/types/features/users/presentation/UserPresenceCell.d.ts +18 -0
- package/types/features/users/presentation/UserPresenceCell.d.ts.map +1 -0
- package/types/features/users/presentation/UsersPage.d.ts.map +1 -1
- package/types/sdk/SdkProviders.d.ts.map +1 -1
- package/types/sdk/index.d.ts +5 -0
- package/types/sdk/index.d.ts.map +1 -1
- package/types/sdk/notifications/notification-client.d.ts +1 -1
- package/types/sdk/notifications/notification-client.d.ts.map +1 -1
- package/types/sdk/presence/presence-client.d.ts +75 -0
- package/types/sdk/presence/presence-client.d.ts.map +1 -0
- package/types/sdk/runtime/headless-session.d.ts +34 -0
- package/types/sdk/runtime/headless-session.d.ts.map +1 -0
- package/types/sdk/runtime/sdk-composition-root.d.ts +2 -0
- package/types/sdk/runtime/sdk-composition-root.d.ts.map +1 -1
- package/types/shared/presence/PresenceBadge.d.ts +23 -0
- package/types/shared/presence/PresenceBadge.d.ts.map +1 -0
- package/types/shared/presence/format-presence-time.d.ts +13 -0
- package/types/shared/presence/format-presence-time.d.ts.map +1 -0
- package/types/shared/presence/index.d.ts +5 -0
- package/types/shared/presence/index.d.ts.map +1 -0
- package/types/shared/presence/live-presence-store.d.ts +21 -0
- package/types/shared/presence/live-presence-store.d.ts.map +1 -0
- package/types/shared/presence/presence-status.d.ts +41 -0
- package/types/shared/presence/presence-status.d.ts.map +1 -0
- package/types/shared/ui/DropdownMenu/DropdownMenu.d.ts +19 -2
- package/types/shared/ui/DropdownMenu/DropdownMenu.d.ts.map +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { LiveStatusEntry, PresenceStatus } from '@shared/presence';
|
|
2
|
+
import type { Conversation } from '../domain';
|
|
3
|
+
/** Live online state for a DM peer, falling back to the server flag until a live event arrives. */
|
|
4
|
+
export interface DmPresence {
|
|
5
|
+
readonly online: boolean;
|
|
6
|
+
readonly subtitle: string;
|
|
7
|
+
/**
|
|
8
|
+
* The status worth showing beside the name, or null when the dot has already said everything.
|
|
9
|
+
*
|
|
10
|
+
* <p>Offline and Available are deliberately null: the header already reads "Online" or "Last seen
|
|
11
|
+
* …", and a badge repeating it is noise on the one row that has to stay scannable. What earns the
|
|
12
|
+
* space is the case the dot CANNOT express — someone connected but in a meeting.</p>
|
|
13
|
+
*
|
|
14
|
+
* <p>Nulling it whenever the peer is offline is also what keeps a stale projection honest here:
|
|
15
|
+
* live presence outranks the status that rode in with the conversation, without this component
|
|
16
|
+
* having to re-derive the server's ranking.</p>
|
|
17
|
+
*/
|
|
18
|
+
readonly status: PresenceStatus | null;
|
|
19
|
+
}
|
|
20
|
+
export interface DmPresenceInputs {
|
|
21
|
+
readonly conversation: Conversation;
|
|
22
|
+
/** The last presence frame for the peer, or undefined when none has arrived this session. */
|
|
23
|
+
readonly live: {
|
|
24
|
+
readonly online: boolean;
|
|
25
|
+
readonly lastSeenUtc: string | null;
|
|
26
|
+
} | undefined;
|
|
27
|
+
/** The last status frame for the peer. Newer than the conversation's snapshot, so it wins. */
|
|
28
|
+
readonly liveStatus: LiveStatusEntry | undefined;
|
|
29
|
+
readonly fallbackSubtitle: string;
|
|
30
|
+
readonly nowMs: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Resolve a DM's online dot + subtitle + badge from live presence, falling back to what the
|
|
34
|
+
* conversation itself carried when no live frame has arrived yet. Pure.
|
|
35
|
+
*/
|
|
36
|
+
export declare const resolveDmPresence: ({ conversation, live, liveStatus, fallbackSubtitle, nowMs, }: DmPresenceInputs) => DmPresence;
|
|
37
|
+
//# sourceMappingURL=dm-presence.d.ts.map
|
|
@@ -0,0 +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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatRealtime.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chat/presentation/useChatRealtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useChatRealtime.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chat/presentation/useChatRealtime.ts"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,QAAO,IAoD5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/application/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Logger } from '@core/logger';
|
|
2
|
+
import type { Result } from '@core/result';
|
|
3
|
+
import type { MyPresence, PresenceError, PresenceGateway, SetMyPresenceInput } from '../../domain';
|
|
4
|
+
export interface MyPresenceUseCaseDeps {
|
|
5
|
+
readonly presenceGateway: PresenceGateway;
|
|
6
|
+
readonly logger: Logger;
|
|
7
|
+
}
|
|
8
|
+
/** Reads the caller's own presence as everyone else sees it. */
|
|
9
|
+
export declare class GetMyPresenceUseCase {
|
|
10
|
+
private readonly gateway;
|
|
11
|
+
constructor(deps: MyPresenceUseCaseDeps);
|
|
12
|
+
execute(): Promise<Result<MyPresence, PresenceError>>;
|
|
13
|
+
}
|
|
14
|
+
/** Declares a status for a bounded time. The server enforces the 24-hour ceiling. */
|
|
15
|
+
export declare class SetMyPresenceUseCase {
|
|
16
|
+
private readonly gateway;
|
|
17
|
+
constructor(deps: MyPresenceUseCaseDeps);
|
|
18
|
+
execute(input: SetMyPresenceInput): Promise<Result<MyPresence, PresenceError>>;
|
|
19
|
+
}
|
|
20
|
+
/** Ends a self-set status early, falling back to whatever the system infers. */
|
|
21
|
+
export declare class ClearMyPresenceUseCase {
|
|
22
|
+
private readonly gateway;
|
|
23
|
+
constructor(deps: MyPresenceUseCaseDeps);
|
|
24
|
+
execute(): Promise<Result<MyPresence, PresenceError>>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=my-presence-use-cases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"my-presence-use-cases.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/presence/application/use-cases/my-presence-use-cases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,eAAe,EACf,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,gEAAgE;AAChE,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;gBAEvB,IAAI,EAAE,qBAAqB;IAIvC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;CAG7D;AAED,qFAAqF;AACrF,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;gBAEvB,IAAI,EAAE,qBAAqB;IAIvC,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;CAGtF;AAED,gFAAgF;AAChF,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;gBAEvB,IAAI,EAAE,qBAAqB;IAIvC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;CAG7D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AppError } from '@core/errors';
|
|
2
|
+
/** The presence service could not be reached or answered with something unusable. */
|
|
3
|
+
export declare class PresenceUnavailableError extends AppError {
|
|
4
|
+
readonly code = "PRESENCE_UNAVAILABLE";
|
|
5
|
+
constructor(cause?: unknown);
|
|
6
|
+
}
|
|
7
|
+
export type PresenceError = PresenceUnavailableError;
|
|
8
|
+
//# sourceMappingURL=presence-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presence-errors.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/presence/domain/errors/presence-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,qFAAqF;AACrF,qBAAa,wBAAyB,SAAQ,QAAQ;IACpD,SAAgB,IAAI,0BAA0B;gBAE3B,KAAK,CAAC,EAAE,OAAO;CAGnC;AAED,MAAM,MAAM,aAAa,GAAG,wBAAwB,CAAC"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PresenceStatus } from '@shared/presence';
|
|
2
|
+
/** Which source decided the status — mirrors the backend `PresenceSource` by number. */
|
|
3
|
+
export type PresenceSource = 'override' | 'activity' | 'calendar' | 'connection';
|
|
4
|
+
/** Unknown sources read as `connection`: the least surprising claim, and never a false override. */
|
|
5
|
+
export declare const presenceSourceFromNumber: (value: number | null | undefined) => PresenceSource;
|
|
6
|
+
/**
|
|
7
|
+
* The caller's own presence, as everyone else sees it.
|
|
8
|
+
*
|
|
9
|
+
* <p>`source` is what lets the UI say "this comes from your calendar" instead of leaving somebody to
|
|
10
|
+
* wonder why they look busy — and it is the difference between answering a support question and
|
|
11
|
+
* starting an investigation.</p>
|
|
12
|
+
*/
|
|
13
|
+
export interface MyPresence {
|
|
14
|
+
readonly status: PresenceStatus;
|
|
15
|
+
readonly source: PresenceSource;
|
|
16
|
+
readonly untilUtc: string | null;
|
|
17
|
+
readonly note: string | null;
|
|
18
|
+
/** True only while a self-set status is in force — the one case the person can clear. */
|
|
19
|
+
readonly hasOverride: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** A status the person is setting for themselves, for a bounded time. */
|
|
22
|
+
export interface SetMyPresenceInput {
|
|
23
|
+
readonly status: PresenceStatus;
|
|
24
|
+
/** Duration, not an end time: the server resolves it against ITS clock, so a skewed device cannot lie. */
|
|
25
|
+
readonly minutes: number;
|
|
26
|
+
readonly note?: string;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=my-presence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"my-presence.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/domain/my-presence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wFAAwF;AACxF,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC;AASjF,oGAAoG;AACpG,eAAO,MAAM,wBAAwB,GAAI,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,cAC7B,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,yFAAyF;IACzF,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED,yEAAyE;AACzE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,0GAA0G;IAC1G,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Result } from '@core/result';
|
|
2
|
+
import type { PresenceError } from '../errors/presence-errors';
|
|
3
|
+
import type { MyPresence, SetMyPresenceInput } from '../my-presence';
|
|
4
|
+
/**
|
|
5
|
+
* First-person only, mirroring the server.
|
|
6
|
+
*
|
|
7
|
+
* <p>There is deliberately no "set status for user X". Presence is either observed by the system or
|
|
8
|
+
* declared by the person it describes; a third party setting it would make the indicator
|
|
9
|
+
* unfalsifiable, since a colleague could not tell a self-declared "busy" from an imposed one.</p>
|
|
10
|
+
*/
|
|
11
|
+
export interface PresenceGateway {
|
|
12
|
+
getMine(): Promise<Result<MyPresence, PresenceError>>;
|
|
13
|
+
setMine(input: SetMyPresenceInput): Promise<Result<MyPresence, PresenceError>>;
|
|
14
|
+
clearMine(): Promise<Result<MyPresence, PresenceError>>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=presence-gateway.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/presence/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Status and source cross the wire as NUMBERS — the enum names are the contract, not the payload. */
|
|
3
|
+
export declare const MyPresenceDtoSchema: z.ZodObject<{
|
|
4
|
+
status: z.ZodNumber;
|
|
5
|
+
source: z.ZodNumber;
|
|
6
|
+
untilUtc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
hasOverride: z.ZodBoolean;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
status: number;
|
|
11
|
+
source: number;
|
|
12
|
+
hasOverride: boolean;
|
|
13
|
+
note?: string | null | undefined;
|
|
14
|
+
untilUtc?: string | null | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
status: number;
|
|
17
|
+
source: number;
|
|
18
|
+
hasOverride: boolean;
|
|
19
|
+
note?: string | null | undefined;
|
|
20
|
+
untilUtc?: string | null | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export type MyPresenceDto = z.infer<typeof MyPresenceDtoSchema>;
|
|
23
|
+
/** What `set-mine` sends. Status is a number here for the same reason it is one coming back. */
|
|
24
|
+
export interface SetMyPresenceRequestDto {
|
|
25
|
+
readonly status: number;
|
|
26
|
+
readonly minutes: number;
|
|
27
|
+
readonly note?: string;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=presence-dtos.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { HttpClient } from '@core/http';
|
|
2
|
+
import type { Logger } from '@core/logger';
|
|
3
|
+
import { type Result } from '@core/result';
|
|
4
|
+
import { type MyPresence, type PresenceError, type PresenceGateway, type SetMyPresenceInput } from '../domain';
|
|
5
|
+
export interface HttpPresenceGatewayDeps {
|
|
6
|
+
readonly httpClient: HttpClient;
|
|
7
|
+
readonly logger: Logger;
|
|
8
|
+
}
|
|
9
|
+
/** HTTP {@link PresenceGateway}. The server owns the ranking; this only carries the answer. */
|
|
10
|
+
export declare class HttpPresenceGateway implements PresenceGateway {
|
|
11
|
+
private readonly http;
|
|
12
|
+
private readonly logger;
|
|
13
|
+
constructor(deps: HttpPresenceGatewayDeps);
|
|
14
|
+
getMine(): Promise<Result<MyPresence, PresenceError>>;
|
|
15
|
+
setMine(input: SetMyPresenceInput): Promise<Result<MyPresence, PresenceError>>;
|
|
16
|
+
clearMine(): Promise<Result<MyPresence, PresenceError>>;
|
|
17
|
+
/**
|
|
18
|
+
* One place for the parse-and-map, because all three endpoints answer with the SAME shape: the
|
|
19
|
+
* resolved presence AFTER the change. Returning the stored override instead would let the UI show
|
|
20
|
+
* something nobody else sees — a calendar block can outrank what was just set.
|
|
21
|
+
*/
|
|
22
|
+
private request;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=http-presence-gateway.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ABP conventional routing for `PresenceAppService`: `GetMineAsync` → GET the action, and the two
|
|
3
|
+
* mutations carry unrecognised verb prefixes (Set/Clear) so ABP exposes each as a POST.
|
|
4
|
+
*/
|
|
5
|
+
export declare const PRESENCE_ROUTES: {
|
|
6
|
+
readonly mine: "/api/app/presence/mine";
|
|
7
|
+
readonly setMine: "/api/app/presence/set-mine";
|
|
8
|
+
readonly clearMine: "/api/app/presence/clear-mine";
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=http-presence-routes.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/infrastructure/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type MyPresence, type SetMyPresenceInput } from '../domain';
|
|
2
|
+
import type { MyPresenceDto, SetMyPresenceRequestDto } from './dto/presence-dtos';
|
|
3
|
+
export declare const toMyPresence: (dto: MyPresenceDto) => MyPresence;
|
|
4
|
+
/**
|
|
5
|
+
* The domain's status name → the wire's number.
|
|
6
|
+
*
|
|
7
|
+
* <p>Without this the request carries `"busy"`, which the server rejects: its enum binds from the
|
|
8
|
+
* number only. The response half was always mapped; the request half was posting the domain object
|
|
9
|
+
* straight through, so nothing type-checked the difference.</p>
|
|
10
|
+
*/
|
|
11
|
+
export declare const toSetMyPresenceRequest: (input: SetMyPresenceInput) => SetMyPresenceRequestDto;
|
|
12
|
+
//# sourceMappingURL=presence-mappers.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HttpClient } from '@core/http';
|
|
2
|
+
import type { Logger } from '@core/logger';
|
|
3
|
+
import { ClearMyPresenceUseCase, GetMyPresenceUseCase, SetMyPresenceUseCase } from './application';
|
|
4
|
+
export interface PresenceModuleDeps {
|
|
5
|
+
readonly logger: Logger;
|
|
6
|
+
readonly httpClient: HttpClient;
|
|
7
|
+
}
|
|
8
|
+
export interface PresenceModule {
|
|
9
|
+
readonly getMyPresence: GetMyPresenceUseCase;
|
|
10
|
+
readonly setMyPresence: SetMyPresenceUseCase;
|
|
11
|
+
readonly clearMyPresence: ClearMyPresenceUseCase;
|
|
12
|
+
readonly logger: Logger;
|
|
13
|
+
}
|
|
14
|
+
/** Composition root for presence — one gateway shared by the three first-person use cases. */
|
|
15
|
+
export declare const createPresenceModule: (deps: PresenceModuleDeps) => PresenceModule;
|
|
16
|
+
//# sourceMappingURL=presence-module.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The menu a person sets their own status from.
|
|
4
|
+
*
|
|
5
|
+
* <p>Shows what everyone else currently sees, not the stored override: a calendar block can outrank
|
|
6
|
+
* what was set, and a menu that reported the setting back would quietly disagree with every badge on
|
|
7
|
+
* the page.</p>
|
|
8
|
+
*
|
|
9
|
+
* <p>Status first, duration second. Flattening the two into one list is 20 rows of "Busy · 1 hour"
|
|
10
|
+
* that nobody scans; nesting keeps the first choice — what am I — down to five.</p>
|
|
11
|
+
*/
|
|
12
|
+
export declare const MyPresenceMenu: ({ trigger }: {
|
|
13
|
+
readonly trigger: ReactElement;
|
|
14
|
+
}) => ReactElement;
|
|
15
|
+
/**
|
|
16
|
+
* The current status, for placing beside an avatar in a header.
|
|
17
|
+
*
|
|
18
|
+
* <p>Holds a skeleton rather than collapsing while it loads: this badge is also the thing you click
|
|
19
|
+
* to open the status menu, and a control that appears a moment after the page settles is one people
|
|
20
|
+
* click through by accident.</p>
|
|
21
|
+
*/
|
|
22
|
+
export declare const MyPresenceBadge: () => ReactElement;
|
|
23
|
+
//# sourceMappingURL=MyPresenceMenu.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { PresenceModule } from '../presence-module';
|
|
3
|
+
export declare const PresenceModuleProvider: ({ module, children, }: {
|
|
4
|
+
readonly module: PresenceModule;
|
|
5
|
+
readonly children: ReactNode;
|
|
6
|
+
}) => ReactElement;
|
|
7
|
+
//# sourceMappingURL=PresenceModuleProvider.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presence-module-context.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/presence-module-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,eAAO,MAAM,qBAAqB,gDAA6C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useMutation, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { MyPresence, SetMyPresenceInput } from '../domain';
|
|
3
|
+
/**
|
|
4
|
+
* The caller's own presence.
|
|
5
|
+
*
|
|
6
|
+
* <p>Refetched on focus and on a slow interval because a status ENDS on its own: an override expires
|
|
7
|
+
* and a calendar block starts with nothing to announce either. Without that, somebody who set "busy
|
|
8
|
+
* for 30 minutes" would still see it an hour later while everyone else had stopped.</p>
|
|
9
|
+
*/
|
|
10
|
+
export declare const useMyPresence: () => UseQueryResult<MyPresence>;
|
|
11
|
+
export declare const useSetMyPresence: () => ReturnType<typeof useMutation<MyPresence, Error, SetMyPresenceInput>>;
|
|
12
|
+
export declare const useClearMyPresence: () => ReturnType<typeof useMutation<MyPresence, Error, void>>;
|
|
13
|
+
//# sourceMappingURL=use-my-presence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-my-presence.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/use-my-presence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA4B,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEnG,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAKhE;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,QAAO,cAAc,CAAC,UAAU,CAUzD,CAAC;AAaF,eAAO,MAAM,gBAAgB,QAAO,UAAU,CAC5C,OAAO,WAAW,CAAC,UAAU,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAS1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAAO,UAAU,CAAC,OAAO,WAAW,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,CAQ3F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-presence-module.d.ts","sourceRoot":"","sources":["../../../../../../src/features/presence/presentation/use-presence-module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,eAAO,MAAM,iBAAiB,QAAO,cAMpC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PresenceStatus } from '@shared/presence';
|
|
1
2
|
export interface UserProps {
|
|
2
3
|
readonly id: string;
|
|
3
4
|
readonly fullName: string;
|
|
@@ -10,6 +11,16 @@ export interface UserProps {
|
|
|
10
11
|
readonly branchName: string;
|
|
11
12
|
readonly level: number;
|
|
12
13
|
readonly online: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* What they are doing, which is a different question from whether their client is connected — see
|
|
16
|
+
* `PresenceBadge`.
|
|
17
|
+
*
|
|
18
|
+
* <p>Optional because absence is a real state, not an omission: a deployment whose API predates
|
|
19
|
+
* presence sends nothing, and so does every fixture that predates it. Both mean the same thing —
|
|
20
|
+
* nothing is known — and the constructor resolves that to `offline` rather than inventing a status.</p>
|
|
21
|
+
*/
|
|
22
|
+
readonly status?: PresenceStatus;
|
|
23
|
+
readonly statusUntilUtc?: string | null;
|
|
13
24
|
/** Whether the member has a signed-in account; false = directory-only (never onboarded). Defaults true. */
|
|
14
25
|
readonly hasAccount?: boolean | undefined;
|
|
15
26
|
readonly initials: string;
|
|
@@ -33,6 +44,8 @@ export declare class User {
|
|
|
33
44
|
readonly branchName: string;
|
|
34
45
|
readonly level: number;
|
|
35
46
|
readonly online: boolean;
|
|
47
|
+
readonly status: PresenceStatus;
|
|
48
|
+
readonly statusUntilUtc: string | null;
|
|
36
49
|
readonly hasAccount: boolean;
|
|
37
50
|
readonly initials: string;
|
|
38
51
|
readonly color: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/users/domain/entities/user.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,4GAA4G;IAC5G,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC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EAAE,MAAM,CAAC;IAC9B,SAAgB,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvD,SAAgB,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAErC,KAAK,EAAE,SAAS;IAmBnC,+FAA+F;IAC/F,IAAW,QAAQ,IAAI,OAAO,CAE7B;CACF"}
|
|
@@ -13,6 +13,8 @@ export declare const StaffMemberSchema: z.ZodObject<{
|
|
|
13
13
|
branchName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
14
|
level: z.ZodNumber;
|
|
15
15
|
online: z.ZodBoolean;
|
|
16
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17
|
+
statusUntilUtc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
18
|
hasAccount: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
17
19
|
initials: z.ZodString;
|
|
18
20
|
color: z.ZodString;
|
|
@@ -28,8 +30,10 @@ export declare const StaffMemberSchema: z.ZodObject<{
|
|
|
28
30
|
roleName: string;
|
|
29
31
|
department: string;
|
|
30
32
|
level: number;
|
|
33
|
+
status?: number | null | undefined;
|
|
31
34
|
branchKey?: string | null | undefined;
|
|
32
35
|
branchName?: string | null | undefined;
|
|
36
|
+
statusUntilUtc?: string | null | undefined;
|
|
33
37
|
hasAccount?: boolean | null | undefined;
|
|
34
38
|
permissionSetName?: string | null | undefined;
|
|
35
39
|
permissionSetColor?: string | null | undefined;
|
|
@@ -43,8 +47,10 @@ export declare const StaffMemberSchema: z.ZodObject<{
|
|
|
43
47
|
roleName: string;
|
|
44
48
|
department: string;
|
|
45
49
|
level: number;
|
|
50
|
+
status?: number | null | undefined;
|
|
46
51
|
branchKey?: string | null | undefined;
|
|
47
52
|
branchName?: string | null | undefined;
|
|
53
|
+
statusUntilUtc?: string | null | undefined;
|
|
48
54
|
hasAccount?: boolean | null | undefined;
|
|
49
55
|
permissionSetName?: string | null | undefined;
|
|
50
56
|
permissionSetColor?: string | null | undefined;
|
|
@@ -62,6 +68,8 @@ export declare const PagedStaffMemberListSchema: z.ZodObject<{
|
|
|
62
68
|
branchName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
69
|
level: z.ZodNumber;
|
|
64
70
|
online: z.ZodBoolean;
|
|
71
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
72
|
+
statusUntilUtc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
73
|
hasAccount: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
66
74
|
initials: z.ZodString;
|
|
67
75
|
color: z.ZodString;
|
|
@@ -77,8 +85,10 @@ export declare const PagedStaffMemberListSchema: z.ZodObject<{
|
|
|
77
85
|
roleName: string;
|
|
78
86
|
department: string;
|
|
79
87
|
level: number;
|
|
88
|
+
status?: number | null | undefined;
|
|
80
89
|
branchKey?: string | null | undefined;
|
|
81
90
|
branchName?: string | null | undefined;
|
|
91
|
+
statusUntilUtc?: string | null | undefined;
|
|
82
92
|
hasAccount?: boolean | null | undefined;
|
|
83
93
|
permissionSetName?: string | null | undefined;
|
|
84
94
|
permissionSetColor?: string | null | undefined;
|
|
@@ -92,8 +102,10 @@ export declare const PagedStaffMemberListSchema: z.ZodObject<{
|
|
|
92
102
|
roleName: string;
|
|
93
103
|
department: string;
|
|
94
104
|
level: number;
|
|
105
|
+
status?: number | null | undefined;
|
|
95
106
|
branchKey?: string | null | undefined;
|
|
96
107
|
branchName?: string | null | undefined;
|
|
108
|
+
statusUntilUtc?: string | null | undefined;
|
|
97
109
|
hasAccount?: boolean | null | undefined;
|
|
98
110
|
permissionSetName?: string | null | undefined;
|
|
99
111
|
permissionSetColor?: string | null | undefined;
|
|
@@ -109,8 +121,10 @@ export declare const PagedStaffMemberListSchema: z.ZodObject<{
|
|
|
109
121
|
roleName: string;
|
|
110
122
|
department: string;
|
|
111
123
|
level: number;
|
|
124
|
+
status?: number | null | undefined;
|
|
112
125
|
branchKey?: string | null | undefined;
|
|
113
126
|
branchName?: string | null | undefined;
|
|
127
|
+
statusUntilUtc?: string | null | undefined;
|
|
114
128
|
hasAccount?: boolean | null | undefined;
|
|
115
129
|
permissionSetName?: string | null | undefined;
|
|
116
130
|
permissionSetColor?: string | null | undefined;
|
|
@@ -127,8 +141,10 @@ export declare const PagedStaffMemberListSchema: z.ZodObject<{
|
|
|
127
141
|
roleName: string;
|
|
128
142
|
department: string;
|
|
129
143
|
level: number;
|
|
144
|
+
status?: number | null | undefined;
|
|
130
145
|
branchKey?: string | null | undefined;
|
|
131
146
|
branchName?: string | null | undefined;
|
|
147
|
+
statusUntilUtc?: string | null | undefined;
|
|
132
148
|
hasAccount?: boolean | null | undefined;
|
|
133
149
|
permissionSetName?: string | null | undefined;
|
|
134
150
|
permissionSetColor?: string | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-dtos.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/users/infrastructure/dto/user-dtos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"user-dtos.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/users/infrastructure/dto/user-dtos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoB5B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE/D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGrC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-mappers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/users/infrastructure/user-mappers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-mappers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/users/infrastructure/user-mappers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,0EAA0E;AAC1E,eAAO,MAAM,MAAM,GAAI,KAAK,cAAc,KAAG,IAmBzC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { User } from '../domain';
|
|
3
|
+
/**
|
|
4
|
+
* One directory row's presence: the connection line, plus the status badge when it says something the
|
|
5
|
+
* line cannot.
|
|
6
|
+
*
|
|
7
|
+
* <p>Its own component because it reads the live store, and a hook cannot be called from inside the
|
|
8
|
+
* table's `.map`. That is a happy constraint — it keeps the live-versus-snapshot rule in one place
|
|
9
|
+
* instead of inlining it in a cell.</p>
|
|
10
|
+
*
|
|
11
|
+
* <p>An announced status also decides the dot. The server resolves Offline exactly when a person has
|
|
12
|
+
* no connection, so the badge and the dot cannot disagree once an event has arrived — and without
|
|
13
|
+
* this the row would keep the stale "Online" it was fetched with while its badge said otherwise.</p>
|
|
14
|
+
*/
|
|
15
|
+
export declare const UserPresenceCell: ({ user }: {
|
|
16
|
+
readonly user: User;
|
|
17
|
+
}) => ReactElement;
|
|
18
|
+
//# sourceMappingURL=UserPresenceCell.d.ts.map
|
|
@@ -0,0 +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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersPage.d.ts","sourceRoot":"","sources":["../../../../../../src/features/users/presentation/UsersPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"UsersPage.d.ts","sourceRoot":"","sources":["../../../../../../src/features/users/presentation/UsersPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAY,MAAM,OAAO,CAAC;AA2LpD;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAO,YAmF5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkProviders.d.ts","sourceRoot":"","sources":["../../../../src/sdk/SdkProviders.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SdkProviders.d.ts","sourceRoot":"","sources":["../../../../src/sdk/SdkProviders.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAerD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5D;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,GAAI,qCAI1B,iBAAiB,KAAG,YAmDtB,CAAC"}
|
package/types/sdk/index.d.ts
CHANGED
|
@@ -16,6 +16,11 @@ export { CommsProvider } from './CommsProvider';
|
|
|
16
16
|
* where no widget is mounted and `onEvent` therefore never fires — this reaches them anyway.
|
|
17
17
|
*/
|
|
18
18
|
export { createNotificationClient, type NotificationClient, type NotificationClientOptions, type SdkNotification, } from './notifications/notification-client';
|
|
19
|
+
/**
|
|
20
|
+
* The signed-in person's own status, without a widget. The widgets show everyone ELSE's status; this
|
|
21
|
+
* is how a host's own header lets somebody set theirs.
|
|
22
|
+
*/
|
|
23
|
+
export { createPresenceClient, type PresenceClient, type PresenceClientOptions, type SdkPresence, type SdkPresenceSource, type SdkPresenceStatus, type SetSdkPresenceInput, } from './presence/presence-client';
|
|
19
24
|
export { WidgetRoot, type WidgetRootProps } from './elements/WidgetRoot';
|
|
20
25
|
export { registerChatWidget, registerFeedWidget, registerBookingsWidget, registerScheduleWidget, };
|
|
21
26
|
export { SDK_MODULE_SCOPES, type AuthConfig, type CommsProviderProps, type SdkEvent, type SdkModuleScope, type ThemeConfig, type ThemeDensity, type ThemeMode, } from './types';
|
package/types/sdk/index.d.ts.map
CHANGED
|
@@ -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,MAA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B,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/notifications/notification-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/notifications/notification-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGjF,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC,MAAM,WAAW,yBAAyB;IACxC,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,4EAA4E;IAC5E,QAAQ,CAAC,cAAc,EAAE,CAAC,YAAY,EAAE,eAAe,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,yEAAyE;IACzE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,oFAAoF;IACpF,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,6EAA6E;IAC7E,MAAM,EAAE,MAAM,SAAS,eAAe,EAAE,CAAC;CAC1C;AA0CD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,GACnC,SAAS,yBAAyB,KACjC,kBA4DF,CAAC"}
|