@coworkee/client 0.1.7 → 0.1.8
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/realtime.d.ts +3 -3
- package/dist/realtime.js +2 -2
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/dist/realtime.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type ActorInfo = {
|
|
|
16
16
|
name?: string | null;
|
|
17
17
|
impersonatorId?: string | null;
|
|
18
18
|
};
|
|
19
|
-
/** A transient notification (`INotifier.ToastAsync`), on the user, session,
|
|
19
|
+
/** A transient notification (`INotifier.ToastAsync`), on the user, session, tenant or global topic. */
|
|
20
20
|
export type Toast = {
|
|
21
21
|
title: string;
|
|
22
22
|
body?: string | null;
|
|
@@ -46,7 +46,7 @@ export declare const realtimeTopics: {
|
|
|
46
46
|
readonly presence: "tenant:presence";
|
|
47
47
|
readonly tenantPermissions: "tenant:permissions";
|
|
48
48
|
readonly globalPermissions: "global:permissions";
|
|
49
|
-
/** Events for the whole
|
|
49
|
+
/** Events for the whole tenant (EventTarget.All) and for every tenant (EventTarget.Global). */
|
|
50
50
|
readonly tenantEvents: "tenant:events";
|
|
51
51
|
readonly globalEvents: "global:events";
|
|
52
52
|
readonly session: (sessionId: string) => string;
|
|
@@ -59,7 +59,7 @@ export declare const realtimeEvents: {
|
|
|
59
59
|
readonly chatRead: "chat.read";
|
|
60
60
|
readonly toast: "notification.toast";
|
|
61
61
|
};
|
|
62
|
-
/** The topics an event target of the server (EventTarget) reaches a signed-in user on: his own, the
|
|
62
|
+
/** The topics an event target of the server (EventTarget) reaches a signed-in user on: his own, the tenant's, the global one and his session's. */
|
|
63
63
|
export declare const targetedTopics: (userId: string, sessionId?: string) => string[];
|
|
64
64
|
/**
|
|
65
65
|
* Events of one type (an `[EventName]` of the server, `EntityChanged`, `notification.toast`) on the given topics, like `Realtime.On<T>` in Blazor:
|
package/dist/realtime.js
CHANGED
|
@@ -7,13 +7,13 @@ export const realtimeTopics = {
|
|
|
7
7
|
presence: 'tenant:presence',
|
|
8
8
|
tenantPermissions: 'tenant:permissions',
|
|
9
9
|
globalPermissions: 'global:permissions',
|
|
10
|
-
/** Events for the whole
|
|
10
|
+
/** Events for the whole tenant (EventTarget.All) and for every tenant (EventTarget.Global). */
|
|
11
11
|
tenantEvents: 'tenant:events',
|
|
12
12
|
globalEvents: 'global:events',
|
|
13
13
|
session: (sessionId) => `session:${sessionId}`,
|
|
14
14
|
};
|
|
15
15
|
export const realtimeEvents = { entityChanged: 'EntityChanged', sessionRevoked: 'SessionRevoked', presenceChanged: 'presence.changed', chatMessage: 'chat.message', chatRead: 'chat.read', toast: 'notification.toast' };
|
|
16
|
-
/** The topics an event target of the server (EventTarget) reaches a signed-in user on: his own, the
|
|
16
|
+
/** The topics an event target of the server (EventTarget) reaches a signed-in user on: his own, the tenant's, the global one and his session's. */
|
|
17
17
|
export const targetedTopics = (userId, sessionId) => [realtimeTopics.user(userId), realtimeTopics.tenantEvents, realtimeTopics.globalEvents, ...(sessionId ? [realtimeTopics.session(sessionId)] : [])];
|
|
18
18
|
/**
|
|
19
19
|
* Events of one type (an `[EventName]` of the server, `EntityChanged`, `notification.toast`) on the given topics, like `Realtime.On<T>` in Blazor:
|
package/dist/theme.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare function resolveMode(setting?: string | null, prefersDark?: boole
|
|
|
11
11
|
/** An address for an img: SVG markup becomes a data URL, data URLs and addresses stay as they are. */
|
|
12
12
|
export declare function logoUrl(logo?: string | null): string | undefined;
|
|
13
13
|
export declare function applyTheme(theme: Theme | undefined, mode: ColorMode, root?: HTMLElement): void;
|
|
14
|
-
/** The theme of the signed-in user's
|
|
14
|
+
/** The theme of the signed-in user's tenant, or the default one (anonymous). */
|
|
15
15
|
export declare const getCurrentTheme: (options?: CoworkeeClientOptions) => Promise<{
|
|
16
16
|
id: string;
|
|
17
17
|
name: string;
|
package/dist/theme.js
CHANGED
|
@@ -61,5 +61,5 @@ export function applyTheme(theme, mode, root = document.documentElement) {
|
|
|
61
61
|
root.style.colorScheme = mode;
|
|
62
62
|
root.dataset.cwMode = mode;
|
|
63
63
|
}
|
|
64
|
-
/** The theme of the signed-in user's
|
|
64
|
+
/** The theme of the signed-in user's tenant, or the default one (anonymous). */
|
|
65
65
|
export const getCurrentTheme = (options) => apiRequest('/api/v1/themes/current', {}, options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coworkee/client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Typed client for the API of Coworkee apps: OpenAPI types, BFF session, theme, texts and OData helpers",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://framework.coworkee.de/web/airworks/",
|