@opencxh/domain 1.152.0 → 1.154.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/ai-budget/types.d.ts +14 -6
- package/dist/entities/playbook/types.d.ts +29 -0
- package/dist/index.cjs +8 -8
- package/dist/index.js +581 -558
- package/dist/platform/presence.d.ts +55 -1
- package/dist/platform/presence.test.d.ts +1 -0
- package/dist/platform/provider.d.ts +14 -0
- package/package.json +1 -1
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
export declare const PRESENCE_ONLINE_WINDOW_MS = 90000;
|
|
10
10
|
/**
|
|
11
11
|
* Effective presence status. `offline` is derived from connectivity (stale
|
|
12
|
-
* `lastSeenAt`) and
|
|
12
|
+
* `lastSeenAt`) and wins over anything you set — except the statuses in
|
|
13
|
+
* {@link PRESENCE_SURVIVES_OFFLINE}; the rest are set by the user or a provider.
|
|
13
14
|
*/
|
|
14
15
|
export type PresenceStatus = "available" | "away" | "busy" | "dnd" | "out_of_office" | "offline";
|
|
15
16
|
/** Statuses a user (or provider) can set — `offline` is derived, not settable. */
|
|
@@ -43,3 +44,56 @@ export interface PresenceStatusInput {
|
|
|
43
44
|
/** Unix ms after which the status auto-clears (falls back to derived). */
|
|
44
45
|
expiresAt?: number;
|
|
45
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* A user's stored availability, as the server persists it. Connectivity is not
|
|
49
|
+
* in here — that stays derived from `lastSeenAt` on an installation.
|
|
50
|
+
*/
|
|
51
|
+
export interface StoredPresenceStatus {
|
|
52
|
+
status?: string;
|
|
53
|
+
message?: string;
|
|
54
|
+
/** Unix ms after which the status no longer applies. */
|
|
55
|
+
expiresAt?: number;
|
|
56
|
+
/** `"manual"` or a providerId (e.g. `"microsoft"`). */
|
|
57
|
+
source?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Statuses that mean "I am not at my desk" rather than "I am here, in this
|
|
61
|
+
* state". Those two behave differently when connectivity goes stale: `busy`
|
|
62
|
+
* describes right now, so a closed laptop makes it meaningless and `offline` is
|
|
63
|
+
* the more honest answer. `out_of_office` is a statement about a period, and it
|
|
64
|
+
* is at its most useful precisely when the person is *not* reachable — so it
|
|
65
|
+
* outlives the connection instead of being overwritten by it.
|
|
66
|
+
*/
|
|
67
|
+
export declare const PRESENCE_SURVIVES_OFFLINE: readonly PresenceStatus[];
|
|
68
|
+
/**
|
|
69
|
+
* The one place that turns "when was this user last seen" plus "what did they
|
|
70
|
+
* set" into an effective presence. Every read (the tenant list, your own row)
|
|
71
|
+
* and every broadcast goes through it, so the dot never depends on which route
|
|
72
|
+
* answered.
|
|
73
|
+
*
|
|
74
|
+
* `online` is connectivity and nothing else — call routing leans on it. The
|
|
75
|
+
* status layers on top: an expired one falls back, and a stale connection turns
|
|
76
|
+
* the rest into `offline` unless it survives (see
|
|
77
|
+
* {@link PRESENCE_SURVIVES_OFFLINE}). The message travels with the status it
|
|
78
|
+
* belongs to, so it disappears together with it.
|
|
79
|
+
*/
|
|
80
|
+
export declare function derivePresence(lastSeenAt: number, stored: StoredPresenceStatus | undefined, now: number): {
|
|
81
|
+
online: boolean;
|
|
82
|
+
status: PresenceStatus;
|
|
83
|
+
message?: string;
|
|
84
|
+
};
|
|
85
|
+
/** The shape a client holds per user; the stored status is already folded in. */
|
|
86
|
+
export interface AgeablePresence {
|
|
87
|
+
lastSeenAt: number;
|
|
88
|
+
online: boolean;
|
|
89
|
+
status: PresenceStatus;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Age a client-held entry: peers who go silent expire without a round-trip.
|
|
93
|
+
*
|
|
94
|
+
* Clients only have the *effective* status, not the stored row, so this is the
|
|
95
|
+
* connectivity half of {@link derivePresence} — same rule about what survives.
|
|
96
|
+
* Returns the entry unchanged when nothing moved, so a re-render only happens
|
|
97
|
+
* on a real transition.
|
|
98
|
+
*/
|
|
99
|
+
export declare function agePresenceEntry<T extends AgeablePresence>(entry: T, now: number): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -181,6 +181,20 @@ export interface ListFilesPayload {
|
|
|
181
181
|
mountId?: string;
|
|
182
182
|
path?: string;
|
|
183
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Kijken over mappen heen in plaats van in één map (`POST storage/file/browse`).
|
|
186
|
+
*
|
|
187
|
+
* Geen `mountId` en geen `path`: de vraag is juist "waar dan ook waar ik mag
|
|
188
|
+
* kijken". De server bepaalt zelf welke mappen dat zijn — zie `readableMounts`.
|
|
189
|
+
*/
|
|
190
|
+
export interface BrowseFilesPayload {
|
|
191
|
+
/** Vrije tekst op de bestandsnaam; hoofdletterongevoelig, deelreeks. */
|
|
192
|
+
name?: string;
|
|
193
|
+
/** `mine` beperkt tot wat je zelf hebt toegevoegd; standaard alles. */
|
|
194
|
+
scope?: "all" | "mine";
|
|
195
|
+
/** Plafond op het aantal rijen; de server kapt hem af op zijn eigen maximum. */
|
|
196
|
+
limit?: number;
|
|
197
|
+
}
|
|
184
198
|
export interface DownloadAttachmentPayload {
|
|
185
199
|
attachmentId: string;
|
|
186
200
|
accountId?: string;
|