@fusebase/fusebase-gate-sdk 2.3.34-sdk.8 → 2.4.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/apis/AppApisApi.d.ts +1 -1
- package/dist/apis/AppApisApi.js +1 -1
- package/dist/apis/FusebaseAuthApi.d.ts +2 -2
- package/dist/apis/FusebaseAuthApi.js +2 -2
- package/dist/apis/OrgUsersApi.d.ts +8 -4
- package/dist/apis/OrgUsersApi.js +4 -3
- package/dist/apis/PortalsApi.d.ts +94 -3
- package/dist/apis/PortalsApi.js +106 -2
- package/dist/types/app-api/app-api.d.ts +14 -0
- package/dist/types/fusebase-auth/fusebase-auth.d.ts +29 -16
- package/dist/types/index.d.ts +3 -3
- package/dist/types/org-user/org-user.d.ts +34 -0
- package/dist/types/portal-feature-context/portal-feature-context.d.ts +10 -0
- package/dist/types/portals/portals.d.ts +233 -4
- package/package.json +1 -1
- package/release-notes/2.3.34-sdk.10.md +1054 -0
- package/release-notes/2.4.0.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.3.34-sdk.8.md +0 -9
|
@@ -112,6 +112,29 @@ export interface OrgWorkspaceMemberContract {
|
|
|
112
112
|
type?: string | null;
|
|
113
113
|
privileges?: string[] | null;
|
|
114
114
|
magicLink?: string | null;
|
|
115
|
+
/**
|
|
116
|
+
* Organization role of this member, joined from org membership by `userId`
|
|
117
|
+
* (one of `guest`|`client`|`member`|`manager`|`owner`). `null` when no org
|
|
118
|
+
* membership record resolves for the user. Lets callers tell portal clients
|
|
119
|
+
* (`client`) from portal managers without a separate listOrgUsers call.
|
|
120
|
+
*/
|
|
121
|
+
orgRole?: string | null;
|
|
122
|
+
/** Member email from the org user profile. `null` when unknown. */
|
|
123
|
+
email?: string | null;
|
|
124
|
+
/** Member first name from the org user profile. `null` when unknown. */
|
|
125
|
+
firstname?: string | null;
|
|
126
|
+
/** Member last name from the org user profile. `null` when unknown. */
|
|
127
|
+
lastname?: string | null;
|
|
128
|
+
/**
|
|
129
|
+
* Whether this member is a portal manager, per the official platform
|
|
130
|
+
* contract: a portal manager is a member whose org role is `manager` (which
|
|
131
|
+
* is exactly what `invitePortalManager` grants) or `owner` (who outranks a
|
|
132
|
+
* manager and has full authority over every portal). Rely on this flag
|
|
133
|
+
* instead of re-deriving the formula in app code, so the check does not
|
|
134
|
+
* silently break if the internal representation of a portal manager ever
|
|
135
|
+
* changes. `false` when the org role cannot be resolved.
|
|
136
|
+
*/
|
|
137
|
+
isPortalManager?: boolean;
|
|
115
138
|
}
|
|
116
139
|
export interface OrgWorkspaceMemberListResponseContract {
|
|
117
140
|
members: OrgWorkspaceMemberContract[];
|
|
@@ -146,6 +169,17 @@ export interface OrgUserAddResponseContract {
|
|
|
146
169
|
workspaceMember?: OrgWorkspaceMemberContract;
|
|
147
170
|
magicLink?: OrgMagicLinkContract;
|
|
148
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Optional CAS guard for removeOrgMember: the membership is only removed when
|
|
174
|
+
* its current org role still equals this value.
|
|
175
|
+
*/
|
|
176
|
+
export type OrgMemberExpectedRoleInQueryOptional = string;
|
|
177
|
+
/**
|
|
178
|
+
* Optional provenance guard for removeOrgMember (unix timestamp in seconds):
|
|
179
|
+
* the membership is only removed when it was created at or after this moment,
|
|
180
|
+
* so cancelling an invite can never drop a pre-existing member.
|
|
181
|
+
*/
|
|
182
|
+
export type OrgMemberExpectedJoinedAfterInQueryOptional = number;
|
|
149
183
|
export interface OrgMemberRemoveResponseContract {
|
|
150
184
|
ok: true;
|
|
151
185
|
userId: number;
|
|
@@ -7,6 +7,12 @@ export interface VerifyPortalFeatureContextTokenRequestContract {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Trusted portal/workspace context extracted from a verified embed token.
|
|
10
|
+
*
|
|
11
|
+
* `userId`/`orgRole` describe WHO is calling and come from the live,
|
|
12
|
+
* user-bound session token that authenticated the request (not from the
|
|
13
|
+
* static per-brick `portalFeatureContextToken`), so one verify yields the
|
|
14
|
+
* trusted "user × portal × app" triple. Absent for unauthenticated/visitor
|
|
15
|
+
* (open/email) portal sessions.
|
|
10
16
|
*/
|
|
11
17
|
export interface VerifyPortalFeatureContextTokenResponseContract {
|
|
12
18
|
portalId: string;
|
|
@@ -15,4 +21,8 @@ export interface VerifyPortalFeatureContextTokenResponseContract {
|
|
|
15
21
|
productId: string;
|
|
16
22
|
/** App (feature) id (legacy payload field `featureId`). */
|
|
17
23
|
appId: string;
|
|
24
|
+
/** Native id of the authenticated caller. Absent for visitor sessions. */
|
|
25
|
+
userId?: number;
|
|
26
|
+
/** Org role of the authenticated caller at verify time. */
|
|
27
|
+
orgRole?: string;
|
|
18
28
|
}
|
|
@@ -84,8 +84,41 @@ export interface PublishPortalDraftResponseContract {
|
|
|
84
84
|
/** Always true: the staged draft is now live on the portal. */
|
|
85
85
|
published: boolean;
|
|
86
86
|
}
|
|
87
|
+
export interface CreatePortalPageRequestContract {
|
|
88
|
+
/**
|
|
89
|
+
* Title for the new empty page (also used as its sidebar item name).
|
|
90
|
+
* @maxLength 100
|
|
91
|
+
*/
|
|
92
|
+
title: string;
|
|
93
|
+
/**
|
|
94
|
+
* Optional id of an existing published or active-draft menu item (e.g. a
|
|
95
|
+
* folder) to nest the page under in the sidebar. When omitted the page is
|
|
96
|
+
* created at the portal root.
|
|
97
|
+
*/
|
|
98
|
+
parentId?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface CreatePortalPageResponseContract {
|
|
101
|
+
/** Id of the created sidebar menu item. */
|
|
102
|
+
menuItemId: string;
|
|
103
|
+
/** Id of the created portal page node. */
|
|
104
|
+
pageId: string;
|
|
105
|
+
/** URL path assigned to the page (e.g. "/welcome"). */
|
|
106
|
+
url: string;
|
|
107
|
+
/** Draft branch the change was staged on. */
|
|
108
|
+
branchId: string;
|
|
109
|
+
/** Sequence numbers assigned to the staged change events (addPage, addMenuItem). */
|
|
110
|
+
seqs: number[];
|
|
111
|
+
/**
|
|
112
|
+
* Always true: the page is staged in the portal's customizer draft, not yet
|
|
113
|
+
* live. The portal owner reviews and publishes it from the customizer.
|
|
114
|
+
*/
|
|
115
|
+
staged: boolean;
|
|
116
|
+
}
|
|
87
117
|
export interface CreatePortalPageWithNoteRequestContract {
|
|
88
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* Title for the new page (also used as the backing Fusebase note title).
|
|
120
|
+
* @maxLength 100
|
|
121
|
+
*/
|
|
89
122
|
title: string;
|
|
90
123
|
/**
|
|
91
124
|
* Optional id of an existing menu item (e.g. a folder) to nest the page under
|
|
@@ -126,6 +159,27 @@ export interface AddPortalNoteBlockRequestContract {
|
|
|
126
159
|
/** Optional block title (defaults to the page's current title). */
|
|
127
160
|
title?: string;
|
|
128
161
|
}
|
|
162
|
+
export interface AddPortalBlankNoteBlockRequestContract {
|
|
163
|
+
/** Optional block title (defaults to "New Document"). */
|
|
164
|
+
title?: string;
|
|
165
|
+
}
|
|
166
|
+
export interface AddPortalBlankNoteBlockResponseContract {
|
|
167
|
+
/** Global id of the newly created Fusebase note backing the block. */
|
|
168
|
+
noteId: string;
|
|
169
|
+
/** Id of the created note block. */
|
|
170
|
+
blockId: string;
|
|
171
|
+
/** Id of the page the block was added to. */
|
|
172
|
+
pageId: string;
|
|
173
|
+
/** Draft branch the change was staged on. */
|
|
174
|
+
branchId: string;
|
|
175
|
+
/** Sequence numbers assigned to the staged change events (addBlock). */
|
|
176
|
+
seqs: number[];
|
|
177
|
+
/**
|
|
178
|
+
* Always true: the block is staged in the portal's customizer draft, not yet
|
|
179
|
+
* live. The portal owner reviews and publishes it from the customizer.
|
|
180
|
+
*/
|
|
181
|
+
staged: boolean;
|
|
182
|
+
}
|
|
129
183
|
export interface AddPortalNoteBlockResponseContract {
|
|
130
184
|
/** Id of the created note content block. */
|
|
131
185
|
blockId: string;
|
|
@@ -141,12 +195,132 @@ export interface AddPortalNoteBlockResponseContract {
|
|
|
141
195
|
*/
|
|
142
196
|
staged: boolean;
|
|
143
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* The 11 Customizer "Embeds & Integrations" chooser variants. The internal
|
|
200
|
+
* legacy `unknown` is intentionally excluded — it is not a create option.
|
|
201
|
+
*/
|
|
202
|
+
export type PortalEmbedType = "custom" | "youtube" | "google-drive" | "ms-doc" | "calendly" | "hubspot" | "airtable" | "loom" | "data-studio" | "figma" | "miro";
|
|
203
|
+
export interface AddPortalEmbedBlockRequestContract {
|
|
204
|
+
/** Required non-empty block title. */
|
|
205
|
+
title: string;
|
|
206
|
+
/** Customizer Embed variant. `unknown` is not accepted. */
|
|
207
|
+
embedType: PortalEmbedType;
|
|
208
|
+
/** Required for named variants, forbidden for `custom`: the URL to embed. */
|
|
209
|
+
url?: string;
|
|
210
|
+
/** Required for `custom`, forbidden for named variants: the embed code/URL. */
|
|
211
|
+
content?: string;
|
|
212
|
+
/** Whether to show the "open in new tab" link on the block. Default: true. */
|
|
213
|
+
showEmbedLink?: boolean;
|
|
214
|
+
/** Block width in grid columns. Default: 3. */
|
|
215
|
+
colspan?: 2 | 3 | 4 | 5 | 6;
|
|
216
|
+
/** Block height in grid rows. Default: 1. */
|
|
217
|
+
rowspan?: 1 | 2 | 3 | 4;
|
|
218
|
+
/** Fixed pixel height, or null to auto-size. Default: null. */
|
|
219
|
+
height?: number | null;
|
|
220
|
+
}
|
|
221
|
+
export interface AddPortalEmbedBlockResponseContract {
|
|
222
|
+
/** Id of the created embed block. */
|
|
223
|
+
blockId: string;
|
|
224
|
+
/** Id of the page the block was added to. */
|
|
225
|
+
pageId: string;
|
|
226
|
+
/** Draft branch the change was staged on. */
|
|
227
|
+
branchId: string;
|
|
228
|
+
/** Sequence numbers assigned to the staged change events (addBlock). */
|
|
229
|
+
seqs: number[];
|
|
230
|
+
/**
|
|
231
|
+
* Always true: the block is staged in the portal's customizer draft, not yet
|
|
232
|
+
* live. The portal owner reviews and publishes it from the customizer.
|
|
233
|
+
*/
|
|
234
|
+
staged: boolean;
|
|
235
|
+
}
|
|
236
|
+
/** Which chat target a Chat block points at. */
|
|
237
|
+
export type PortalChatBlockTargetType = "channel" | "dm";
|
|
238
|
+
/**
|
|
239
|
+
* Exactly one chat target, as a discriminated union (matches the Customizer).
|
|
240
|
+
* A `channel` target carries only `channelId`; a `dm` target only `userId`.
|
|
241
|
+
*/
|
|
242
|
+
export type PortalChatBlockTarget = {
|
|
243
|
+
type: "channel";
|
|
244
|
+
/** A channel id from listPortalChatChannels. */
|
|
245
|
+
channelId: string;
|
|
246
|
+
} | {
|
|
247
|
+
type: "dm";
|
|
248
|
+
/** An active org member/owner user id. */
|
|
249
|
+
userId: number;
|
|
250
|
+
};
|
|
251
|
+
export interface AddPortalChatBlockRequestContract {
|
|
252
|
+
/** Required non-empty block title. */
|
|
253
|
+
title: string;
|
|
254
|
+
/** Exactly one of a `channel` (channelId) or `dm` (userId) target. */
|
|
255
|
+
target: PortalChatBlockTarget;
|
|
256
|
+
/**
|
|
257
|
+
* Channels only: restrict posting to members. Defaults to true; forbidden for
|
|
258
|
+
* a `dm` target; a private channel requires true.
|
|
259
|
+
*/
|
|
260
|
+
membersOnly?: boolean;
|
|
261
|
+
/** Block width in grid columns. Default: 6. */
|
|
262
|
+
colspan?: 3 | 4 | 5 | 6;
|
|
263
|
+
/** Block height in grid rows. Default: 1. */
|
|
264
|
+
rowspan?: 1 | 2 | 3 | 4;
|
|
265
|
+
/** Fixed pixel height, or null to auto-size. Default: null. */
|
|
266
|
+
height?: number | null;
|
|
267
|
+
}
|
|
268
|
+
export interface AddPortalChatBlockResponseContract {
|
|
269
|
+
/** Id of the created chat block. */
|
|
270
|
+
blockId: string;
|
|
271
|
+
/** Id of the page the block was added to. */
|
|
272
|
+
pageId: string;
|
|
273
|
+
/** Draft branch the change was staged on. */
|
|
274
|
+
branchId: string;
|
|
275
|
+
/** Sequence numbers assigned to the staged change events (addBlock). */
|
|
276
|
+
seqs: number[];
|
|
277
|
+
/**
|
|
278
|
+
* Always true: the block is staged in the portal's customizer draft, not yet
|
|
279
|
+
* live. The portal owner reviews and publishes it from the customizer.
|
|
280
|
+
*/
|
|
281
|
+
staged: boolean;
|
|
282
|
+
}
|
|
283
|
+
export interface PortalChatChannelContract {
|
|
284
|
+
/** Channel id to pass to addPortalChatBlock as channelId. */
|
|
285
|
+
id: string;
|
|
286
|
+
/** Human-readable channel name. */
|
|
287
|
+
name: string;
|
|
288
|
+
/** Whether the channel is public (private channels require membersOnly). */
|
|
289
|
+
isPublic: boolean;
|
|
290
|
+
/** Whether this is the portal's default channel (returned first). */
|
|
291
|
+
isDefault: boolean;
|
|
292
|
+
}
|
|
293
|
+
export interface ListPortalChatChannelsResponseContract {
|
|
294
|
+
/** Listable chat channels, default channel first. */
|
|
295
|
+
channels: PortalChatChannelContract[];
|
|
296
|
+
}
|
|
297
|
+
export interface PortalChatUserContract {
|
|
298
|
+
/** User id to pass to addPortalChatBlock as target.userId. */
|
|
299
|
+
id: number;
|
|
300
|
+
/** Effective display name (composed name → username → email → id). */
|
|
301
|
+
displayName: string;
|
|
302
|
+
/** Username, when the user has one. */
|
|
303
|
+
username?: string;
|
|
304
|
+
/** Email, to tell apart users sharing a display name. Always present. */
|
|
305
|
+
email: string;
|
|
306
|
+
}
|
|
307
|
+
export interface ListPortalChatUsersResponseContract {
|
|
308
|
+
/** Matched DM target users (a single bounded page). */
|
|
309
|
+
users: PortalChatUserContract[];
|
|
310
|
+
/**
|
|
311
|
+
* Total number of matching users across all pages.
|
|
312
|
+
* @TJS-type integer
|
|
313
|
+
*/
|
|
314
|
+
total: number;
|
|
315
|
+
/** Opaque cursor for the next page; absent when there are no more results. */
|
|
316
|
+
nextCursor?: string;
|
|
317
|
+
}
|
|
144
318
|
/**
|
|
145
319
|
* Block types the portal-service draft reducer (`blockFromDto`) understands.
|
|
146
320
|
* Any other value is rejected with 400 (the reducer throws on unknown types,
|
|
147
321
|
* which would otherwise fail the whole draft at publish time).
|
|
148
322
|
*/
|
|
149
|
-
export type PortalBlockType = "note" | "content" | "
|
|
323
|
+
export type PortalBlockType = "note" | "content" | "info" | "docs" | "help" | "request" | "meetings" | "links" | "task-list" | "projection" | "files-dashboard" | "tasks-dashboard" | "chats-dashboard" | "files-recent" | "files-bucket" | "flexible";
|
|
150
324
|
export interface AddPortalBlockRequestContract {
|
|
151
325
|
/** Id of the existing portal page node to add the block to. */
|
|
152
326
|
pageId: string;
|
|
@@ -165,7 +339,7 @@ export interface AddPortalBlockRequestContract {
|
|
|
165
339
|
bricks?: unknown[];
|
|
166
340
|
/**
|
|
167
341
|
* Optional type-specific fields for the staged block, e.g. flat strings
|
|
168
|
-
* `
|
|
342
|
+
* `image`/`link` for info,
|
|
169
343
|
* `sourcePortalId`/`sourcePageId`/`sourceBlockId` for projection,
|
|
170
344
|
* `taskListIds` for task-list. Also overrides scaffold defaults (colspan,
|
|
171
345
|
* rowspan, …) when provided. Every field is validated against the block's
|
|
@@ -201,7 +375,18 @@ export interface AddPortalAppPageRequestContract {
|
|
|
201
375
|
* time from these ids — nothing is hard-coded here.
|
|
202
376
|
*/
|
|
203
377
|
appId: string;
|
|
204
|
-
/**
|
|
378
|
+
/**
|
|
379
|
+
* private (default) -> Customizer "Your Products/Apps".
|
|
380
|
+
* managed -> Customizer "Managed Products": the app comes from a product owned
|
|
381
|
+
* by another organization, resolved via findPublishedApps.
|
|
382
|
+
*/
|
|
383
|
+
productType?: "private" | "managed";
|
|
384
|
+
/**
|
|
385
|
+
* Owner organization of the product, as returned by findPublishedApps.
|
|
386
|
+
* Required for managed products; defaults to the path orgId for private ones.
|
|
387
|
+
*/
|
|
388
|
+
productOrgId?: string;
|
|
389
|
+
/** Title for the new page and its sidebar entry (default: "App"; managed: "Managed Products"). */
|
|
205
390
|
title?: string;
|
|
206
391
|
/**
|
|
207
392
|
* Optional id of an existing menu item (e.g. a folder) to nest the page under
|
|
@@ -230,6 +415,50 @@ export interface AddPortalAppPageResponseContract {
|
|
|
230
415
|
*/
|
|
231
416
|
staged: boolean;
|
|
232
417
|
}
|
|
418
|
+
export interface AddPortalAppBlockRequestContract {
|
|
419
|
+
/**
|
|
420
|
+
* Global id of the published Fusebase product that owns the app (the product
|
|
421
|
+
* shown in the apps catalog). Persisted on the portal block as `appId`.
|
|
422
|
+
*/
|
|
423
|
+
productId: string;
|
|
424
|
+
/**
|
|
425
|
+
* Global id of the published app (feature) to embed. Persisted on the portal
|
|
426
|
+
* block as `featureId`. The app's URL is resolved by the portal at render
|
|
427
|
+
* time from these ids — nothing is hard-coded here.
|
|
428
|
+
*/
|
|
429
|
+
appId: string;
|
|
430
|
+
/**
|
|
431
|
+
* private (default) -> Customizer "Your Products/Apps".
|
|
432
|
+
* managed -> Customizer "Managed Products": the app comes from a product owned
|
|
433
|
+
* by another organization, resolved via findPublishedApps.
|
|
434
|
+
*/
|
|
435
|
+
productType?: "private" | "managed";
|
|
436
|
+
/**
|
|
437
|
+
* Owner organization of the product, as returned by findPublishedApps.
|
|
438
|
+
* Required for managed products; defaults to the path orgId for private ones.
|
|
439
|
+
*/
|
|
440
|
+
productOrgId?: string;
|
|
441
|
+
/** Title for the block (default: "App"; managed: "Managed Products"). */
|
|
442
|
+
title?: string;
|
|
443
|
+
}
|
|
444
|
+
export interface AddPortalAppBlockResponseContract {
|
|
445
|
+
/** Id of the created flexible block carrying the app-feature embed. */
|
|
446
|
+
blockId: string;
|
|
447
|
+
/**
|
|
448
|
+
* Page the block was staged on — echoes the requested pageId. Confirms where
|
|
449
|
+
* the block landed and can be chained into further page operations.
|
|
450
|
+
*/
|
|
451
|
+
pageId: string;
|
|
452
|
+
/** Draft branch the change was staged on. */
|
|
453
|
+
branchId: string;
|
|
454
|
+
/** Sequence numbers assigned to the staged change events. */
|
|
455
|
+
seqs: number[];
|
|
456
|
+
/**
|
|
457
|
+
* Always true: the block is staged in the portal's customizer draft, not yet
|
|
458
|
+
* live. The portal owner reviews and publishes it from the customizer.
|
|
459
|
+
*/
|
|
460
|
+
staged: boolean;
|
|
461
|
+
}
|
|
233
462
|
export interface UpdatePortalCustomCodeRequestContract {
|
|
234
463
|
/**
|
|
235
464
|
* Custom CSS applied to every published portal page (portal-service
|
package/package.json
CHANGED