@crossworks/client-types 0.232.344 → 0.232.348
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/package.json +1 -1
- package/src/dto/member-apps.ts +28 -1
- package/src/dto/rows.ts +5 -0
- package/src/index.ts +2 -0
package/package.json
CHANGED
package/src/dto/member-apps.ts
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* reads from /api/member/apps and /api/member/home, plus the admin's view of
|
|
4
4
|
* member chats (/api/team-admin/member-chats). A member RUNS apps at team
|
|
5
5
|
* level or lower with a green published build; it never creates, edits or
|
|
6
|
-
* shares one.
|
|
6
|
+
* shares one. A CLIENT login runs apps at client level only (client logins
|
|
7
|
+
* C6, /api/client/apps).
|
|
7
8
|
*/
|
|
8
9
|
import type { AppTint } from '../app-nav';
|
|
9
10
|
import type { AccessLevel } from './access';
|
|
@@ -20,12 +21,38 @@ export type MemberAppCard = {
|
|
|
20
21
|
description: string | null;
|
|
21
22
|
audience: MemberAppLevel;
|
|
22
23
|
updatedAt: string;
|
|
24
|
+
/** The member only reads this app's data (client logins C6): true for a
|
|
25
|
+
* public app, and for an app an admin marked informational. Off, the
|
|
26
|
+
* member runs AND writes it (team and client apps). A write to a read-only
|
|
27
|
+
* app answers 403 `{ ok: false, error, reason: 'read-only' }`. Absent from
|
|
28
|
+
* an older brain: read as `audience !== 'team'`. */
|
|
29
|
+
dataReadOnly?: boolean;
|
|
23
30
|
};
|
|
24
31
|
|
|
25
32
|
/** GET /api/member/apps: the apps a member may run, by title, and the
|
|
26
33
|
* brain's home app when a member may run it (else null). */
|
|
27
34
|
export type MemberAppList = { apps: MemberAppCard[]; homeAppId: string | null };
|
|
28
35
|
|
|
36
|
+
/** One launcher card of a CLIENT login (client logins C6, GET
|
|
37
|
+
* /api/client/apps): an app at client level with a green published build.
|
|
38
|
+
* No level and no author. `dataReadOnly`: the app is informational, and a
|
|
39
|
+
* write answers 403 `{ ok: false, error, reason: 'read-only' }`. */
|
|
40
|
+
export type ClientAppCard = {
|
|
41
|
+
id: string;
|
|
42
|
+
title: string;
|
|
43
|
+
icon: string | null;
|
|
44
|
+
color: AppTint | null;
|
|
45
|
+
description: string | null;
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
dataReadOnly: boolean;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** GET /api/client/apps: the apps a client may run, by title. The run routes
|
|
51
|
+
* are the member routes' twins under `/api/client/apps/:id` (frame-ticket,
|
|
52
|
+
* frame, tool-broker, db-broker), so the sandbox takes that as its API
|
|
53
|
+
* base. */
|
|
54
|
+
export type ClientAppList = { apps: ClientAppCard[] };
|
|
55
|
+
|
|
29
56
|
/** The brain's pinned home app, when a member may run it. */
|
|
30
57
|
export type MemberHomeApp = {
|
|
31
58
|
appId: string;
|
package/src/dto/rows.ts
CHANGED
|
@@ -175,6 +175,11 @@ export type AppRow = {
|
|
|
175
175
|
isHub: boolean;
|
|
176
176
|
/** Access level (admin > team > client > public); the owner UI's badge. */
|
|
177
177
|
audience: AccessLevel;
|
|
178
|
+
/** Informational (client logins C6): members and clients only read the
|
|
179
|
+
* app's data. Off, an app at team or client level is a shared workspace
|
|
180
|
+
* everyone who runs it writes. Set with PATCH /api/apps/:id
|
|
181
|
+
* `{ dataReadOnly }`. Absent from an older brain: read as false. */
|
|
182
|
+
dataReadOnly?: boolean;
|
|
178
183
|
createdAt: string;
|
|
179
184
|
updatedAt: string;
|
|
180
185
|
};
|