@crossworks/client-types 0.300.5 → 0.300.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/package.json +1 -1
- package/src/dto/member-apps.ts +23 -0
- package/src/dto/rows.ts +6 -6
- package/src/dto/workspaces.ts +25 -1
- package/src/index.ts +2 -0
package/package.json
CHANGED
package/src/dto/member-apps.ts
CHANGED
|
@@ -77,6 +77,29 @@ export type MemberHomeApp = {
|
|
|
77
77
|
export type MemberHomeData<THub = unknown> =
|
|
78
78
|
{ homeApp: MemberHomeApp; hub: THub } | { homeApp: null; hub: null };
|
|
79
79
|
|
|
80
|
+
/**
|
|
81
|
+
* GET /api/home?ws=<id>: the landing page of a workspace, for every login
|
|
82
|
+
* (task d78e7bde). Without `ws` it is "All my workspaces": the Built-in
|
|
83
|
+
* home over every workspace of the login, never a home app.
|
|
84
|
+
*
|
|
85
|
+
* `ws` echoes the workspace asked for (null: all). `homeApp` is the
|
|
86
|
+
* workspace's home app when the workspace still holds it, its published
|
|
87
|
+
* build is green and the login may run it; null means the Built-in home.
|
|
88
|
+
* `hub` is always there: the data of the Built-in home and what a home
|
|
89
|
+
* app's `host.hub.get()` answers, read in the login's scope and kept to
|
|
90
|
+
* what the workspace reads (sections are its newest pages, counts its items
|
|
91
|
+
* per kind, apps the other apps it holds that the login may run). A
|
|
92
|
+
* workspace the login may not name is 404 `{ error, code: 'not_found' }`.
|
|
93
|
+
*
|
|
94
|
+
* `THub` is `HubData` from `@mantle/share-ui/app-bridge-protocol` (see
|
|
95
|
+
* MemberHomeData).
|
|
96
|
+
*/
|
|
97
|
+
export type WorkspaceHomeData<THub = unknown> = {
|
|
98
|
+
ws: string | null;
|
|
99
|
+
homeApp: MemberHomeApp | null;
|
|
100
|
+
hub: THub;
|
|
101
|
+
};
|
|
102
|
+
|
|
80
103
|
// ── Admin: member chats ──────────────────────────────────────────────────
|
|
81
104
|
|
|
82
105
|
/** GET /api/team-admin/member-chats: one member login and its chat. */
|
package/src/dto/rows.ts
CHANGED
|
@@ -184,7 +184,8 @@ export type AppRow = {
|
|
|
184
184
|
* has never been shared / the share is revoked (owner-only).
|
|
185
185
|
*/
|
|
186
186
|
shareMode: ShareMode | null;
|
|
187
|
-
/** Whether this app is the
|
|
187
|
+
/** Whether this app is the home app of a workspace the reader sees (its
|
|
188
|
+
* landing page, set on the workspace screen; task d78e7bde). */
|
|
188
189
|
isHub: boolean;
|
|
189
190
|
/** A live open public link exists (not revoked, not expired): the
|
|
190
191
|
* "Public" pill. Absent from a brain before W5b2. */
|
|
@@ -567,11 +568,10 @@ export type ProfilePreferences = {
|
|
|
567
568
|
* group grant, so the switch can't be bypassed by a manifest change. Flip it
|
|
568
569
|
* from the Team admin surface. */
|
|
569
570
|
teamPrivateReads?: boolean;
|
|
570
|
-
/**
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
* member home is the fallback. No share link is involved. Read via
|
|
571
|
+
/** RETIRED (task d78e7bde, migration 0276): the brain-wide members' home
|
|
572
|
+
* app. 0276 made it the Team workspace's home app
|
|
573
|
+
* (workspaces.landing_app_id); nothing reads it any more. It stays in
|
|
574
|
+
* the stored preferences so a rollback finds it. Read via
|
|
575
575
|
* projectTeamHubAppId, never raw. */
|
|
576
576
|
teamHubAppId?: string;
|
|
577
577
|
/** The email account client sign-in codes are sent from (client logins
|
package/src/dto/workspaces.ts
CHANGED
|
@@ -92,16 +92,38 @@ export type WorkspaceDetailResponse = {
|
|
|
92
92
|
/** The assistant has history (threads or messages): it cannot be swapped
|
|
93
93
|
* or removed, only cloned to use elsewhere. */
|
|
94
94
|
hasHistory: boolean;
|
|
95
|
+
/** The workspace's landing page (task d78e7bde): its home app, or null
|
|
96
|
+
* for the Built-in home. Absent from an older brain. */
|
|
97
|
+
landingApp?: WorkspaceLandingApp | null;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* A workspace's home app, as its screen shows it. `held`: the workspace
|
|
102
|
+
* still holds the app; false is a pointer left from before (the landing
|
|
103
|
+
* page shows the Built-in home), with no id or title: only a clear
|
|
104
|
+
* (`landingAppId: null`) makes sense then. `appId` and `title` are named
|
|
105
|
+
* only to a user of the workspace (an Admin user outside it gets null for
|
|
106
|
+
* both). `ready`: a green published build, so the landing page shows it.
|
|
107
|
+
*/
|
|
108
|
+
export type WorkspaceLandingApp = {
|
|
109
|
+
held: boolean;
|
|
110
|
+
appId: string | null;
|
|
111
|
+
title: string | null;
|
|
112
|
+
ready: boolean;
|
|
95
113
|
};
|
|
96
114
|
|
|
97
115
|
/** PATCH /api/workspaces/:id. Name and description: a Moderator or an Admin
|
|
98
116
|
* user. Contact and assistant: an Admin user (assistant: area
|
|
99
|
-
* 'assistants'). `
|
|
117
|
+
* 'assistants'). The landing page (`landingAppId`): a Moderator of this
|
|
118
|
+
* workspace only, to an app the workspace holds with a green published
|
|
119
|
+
* build (409 `landing_app_not_held` or `landing_app_not_ready`). `null`
|
|
120
|
+
* clears (the Built-in home). Answers the updated Workspace. */
|
|
100
121
|
export type WorkspacePatchBody = {
|
|
101
122
|
name?: string;
|
|
102
123
|
description?: string;
|
|
103
124
|
contactNodeId?: string | null;
|
|
104
125
|
assistantId?: string | null;
|
|
126
|
+
landingAppId?: string | null;
|
|
105
127
|
};
|
|
106
128
|
|
|
107
129
|
/** GET /api/workspaces/:id/archive-preview: what archiving would do.
|
|
@@ -203,6 +225,8 @@ export type WorkspaceErrorCode =
|
|
|
203
225
|
| 'assistant_has_history'
|
|
204
226
|
| 'assistant_in_use'
|
|
205
227
|
| 'resource_exists'
|
|
228
|
+
| 'landing_app_not_held'
|
|
229
|
+
| 'landing_app_not_ready'
|
|
206
230
|
| 'rate_limited';
|
|
207
231
|
|
|
208
232
|
export type WorkspaceError = { error: string; code: WorkspaceErrorCode };
|
package/src/index.ts
CHANGED
|
@@ -94,6 +94,7 @@ export type {
|
|
|
94
94
|
MemberChatsResponse,
|
|
95
95
|
MemberHomeApp,
|
|
96
96
|
MemberHomeData,
|
|
97
|
+
WorkspaceHomeData,
|
|
97
98
|
} from './dto/member-apps';
|
|
98
99
|
export type {
|
|
99
100
|
MemberInviteAccepted,
|
|
@@ -192,6 +193,7 @@ export type {
|
|
|
192
193
|
WorkspaceDetailResponse,
|
|
193
194
|
WorkspaceError,
|
|
194
195
|
WorkspaceErrorCode,
|
|
196
|
+
WorkspaceLandingApp,
|
|
195
197
|
WorkspaceListResponse,
|
|
196
198
|
WorkspacePatchBody,
|
|
197
199
|
WorkspaceResource,
|