@crossworks/client-types 0.232.365 → 0.232.369
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 +33 -3
- package/src/dto/member.ts +14 -1
- package/src/index.ts +1 -0
package/package.json
CHANGED
package/src/dto/member-apps.ts
CHANGED
|
@@ -29,9 +29,35 @@ export type MemberAppCard = {
|
|
|
29
29
|
dataReadOnly?: boolean;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* One folder of the Apps launcher as a member or a client sees it (GET
|
|
34
|
+
* /api/member/apps, /api/client/apps): read only. A folder is listed only
|
|
35
|
+
* when it holds, at any depth, an app of the same answer's `apps`; a folder
|
|
36
|
+
* with nothing the reader may run is absent, name and all. No level, share
|
|
37
|
+
* or system flag.
|
|
38
|
+
*/
|
|
39
|
+
export type AppLauncherFolder = {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
icon: string | null;
|
|
43
|
+
color: AppTint | null;
|
|
44
|
+
/** The folder it sits in (always one of the same list), null at the top
|
|
45
|
+
* level. */
|
|
46
|
+
parentId: string | null;
|
|
47
|
+
/** The apps directly in it, in the order of `apps`. An app no folder
|
|
48
|
+
* names is at the top level. */
|
|
49
|
+
appIds: string[];
|
|
50
|
+
};
|
|
51
|
+
|
|
32
52
|
/** GET /api/member/apps: the apps a member may run, by title, and the
|
|
33
|
-
* brain's home app when a member may run it (else null).
|
|
34
|
-
|
|
53
|
+
* brain's home app when a member may run it (else null). `folders`: where
|
|
54
|
+
* those apps sit, siblings in the admin's order (0.232.368 on; absent from
|
|
55
|
+
* an older brain: show the apps as one flat list). */
|
|
56
|
+
export type MemberAppList = {
|
|
57
|
+
apps: MemberAppCard[];
|
|
58
|
+
homeAppId: string | null;
|
|
59
|
+
folders?: AppLauncherFolder[];
|
|
60
|
+
};
|
|
35
61
|
|
|
36
62
|
/** One launcher card of a CLIENT login (client logins C6, GET
|
|
37
63
|
* /api/client/apps): an app at client level with a green published build.
|
|
@@ -51,7 +77,11 @@ export type ClientAppCard = {
|
|
|
51
77
|
* are the member routes' twins under `/api/client/apps/:id` (frame-ticket,
|
|
52
78
|
* frame, tool-broker, db-broker), so the sandbox takes that as its API
|
|
53
79
|
* base. */
|
|
54
|
-
export type ClientAppList = {
|
|
80
|
+
export type ClientAppList = {
|
|
81
|
+
apps: ClientAppCard[];
|
|
82
|
+
/** Where those apps sit (0.232.368 on; absent from an older brain). */
|
|
83
|
+
folders?: AppLauncherFolder[];
|
|
84
|
+
};
|
|
55
85
|
|
|
56
86
|
/** The brain's pinned home app, when a member may run it. */
|
|
57
87
|
export type MemberHomeApp = {
|
package/src/dto/member.ts
CHANGED
|
@@ -201,7 +201,20 @@ export type MemberSpaceFile = {
|
|
|
201
201
|
* narrows them with `TDoc` / `TTable`.
|
|
202
202
|
*/
|
|
203
203
|
export type MemberSpaceItemBody<TDoc = unknown, TTable = unknown> =
|
|
204
|
-
| {
|
|
204
|
+
| {
|
|
205
|
+
type: 'page';
|
|
206
|
+
page: {
|
|
207
|
+
doc: TDoc;
|
|
208
|
+
draft: TDoc | null;
|
|
209
|
+
draftRev?: number;
|
|
210
|
+
title: string;
|
|
211
|
+
/** The folder the page sits in (folder phase 7): the member's own
|
|
212
|
+
* folder or a brain folder, null at the top level. It is what a
|
|
213
|
+
* Folder index block set to `here` lists, through the reader's own
|
|
214
|
+
* tree route. Absent from a brain before the pages tree. */
|
|
215
|
+
folderId?: string | null;
|
|
216
|
+
};
|
|
217
|
+
}
|
|
205
218
|
| { type: 'note'; note: { content: string; title: string } }
|
|
206
219
|
/** Null for a teammate: their drawing shows from its saved SVG route. */
|
|
207
220
|
| { type: 'draw'; draw: { scene: TDoc; draft: TDoc | null; draftRev?: number } | null }
|