@fusebase/fusebase-gate-sdk 2.3.34-sdk.1 → 2.3.34-sdk.10
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/AppMagicLinksApi.d.ts +25 -1
- package/dist/apis/AppMagicLinksApi.js +30 -0
- package/dist/apis/FusebaseAuthApi.d.ts +13 -2
- package/dist/apis/FusebaseAuthApi.js +16 -1
- package/dist/apis/NotesApi.d.ts +15 -2
- package/dist/apis/NotesApi.js +16 -1
- package/dist/apis/OrgUsersApi.d.ts +8 -4
- package/dist/apis/OrgUsersApi.js +4 -3
- package/dist/apis/PortalsApi.d.ts +80 -2
- package/dist/apis/PortalsApi.js +90 -1
- package/dist/types/app-access-principal/app-access-principal.d.ts +28 -0
- package/dist/types/app-access-principal/app-access-principal.js +2 -0
- package/dist/types/app-api/app-api.d.ts +7 -0
- package/dist/types/app-magic-link/app-magic-link.d.ts +66 -1
- package/dist/types/email/email.d.ts +5 -10
- package/dist/types/fusebase-auth/fusebase-auth.d.ts +45 -1
- package/dist/types/index.d.ts +4 -3
- package/dist/types/note/note.d.ts +27 -0
- 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 +177 -3
- package/package.json +1 -1
- package/release-notes/2.3.34-sdk.10.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.3.34-sdk.1.md +0 -9
|
@@ -11,7 +11,7 @@ export declare class AppApisApi {
|
|
|
11
11
|
constructor(client: Client);
|
|
12
12
|
/**
|
|
13
13
|
* Call app API operation
|
|
14
|
-
* Invokes a published app API operation through the owner app runtime using a runtime app token minted for the current authenticated caller context.
|
|
14
|
+
* Invokes a published app API operation through the owner app runtime using a runtime app token minted for the current authenticated caller context. Pass `onBehalfOfUserToken` (a platform app token, i.e. the user's `fbsfeaturetoken`) to run the call on behalf of an end user: Gate verifies it fail-closed and forwards the resolved user to the runtime as `X-Fusebase-Verified-User-Id` / `X-Fusebase-Verified-User-Source: obo`, so apps no longer need to hand-roll dual-token forwarding. The operation's `allowedCallers` / `requiredPermissions` are still evaluated against the calling identity, not the on-behalf-of user.
|
|
15
15
|
*/
|
|
16
16
|
callAppApi(params: {
|
|
17
17
|
path: {
|
package/dist/apis/AppApisApi.js
CHANGED
|
@@ -13,7 +13,7 @@ class AppApisApi {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Call app API operation
|
|
16
|
-
* Invokes a published app API operation through the owner app runtime using a runtime app token minted for the current authenticated caller context.
|
|
16
|
+
* Invokes a published app API operation through the owner app runtime using a runtime app token minted for the current authenticated caller context. Pass `onBehalfOfUserToken` (a platform app token, i.e. the user's `fbsfeaturetoken`) to run the call on behalf of an end user: Gate verifies it fail-closed and forwards the resolved user to the runtime as `X-Fusebase-Verified-User-Id` / `X-Fusebase-Verified-User-Source: obo`, so apps no longer need to hand-roll dual-token forwarding. The operation's `allowedCallers` / `requiredPermissions` are still evaluated against the calling identity, not the on-behalf-of user.
|
|
17
17
|
*/
|
|
18
18
|
async callAppApi(params) {
|
|
19
19
|
return this.client.request({
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: app-magic-links
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { ActivateAppMagicLinkResponseContract, BulkCreateAppMagicLinksRequestContract, BulkCreateAppMagicLinksResponseContract, CreateAppMagicLinkRequestContract, CreateAppMagicLinkResponseContract, ListAppMagicLinksResponseContract, orgIdInPathRequired, RequestAppMagicLinkRequestContract, RequestAppMagicLinkResponseContract, RevokeAppMagicLinkResponseContract } from "../types";
|
|
8
|
+
import type { ActivateAppMagicLinkResponseContract, BulkCreateAppMagicLinksRequestContract, BulkCreateAppMagicLinksResponseContract, CreateAppMagicLinkRequestContract, CreateAppMagicLinkResponseContract, ListAppMagicLinksResponseContract, orgIdInPathRequired, RemoveAppAccessPrincipalRequestContract, RemoveAppAccessPrincipalResponseContract, RequestAppMagicLinkRequestContract, RequestAppMagicLinkResponseContract, RevokeAppMagicLinkResponseContract } from "../types";
|
|
9
9
|
export declare class AppMagicLinksApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -57,6 +57,18 @@ export declare class AppMagicLinksApi {
|
|
|
57
57
|
};
|
|
58
58
|
headers?: Record<string, string>;
|
|
59
59
|
}): Promise<ListAppMagicLinksResponseContract>;
|
|
60
|
+
/**
|
|
61
|
+
* Remove an app access principal
|
|
62
|
+
* Owner/admin flow. Removes an access principal from every feature (App) of the product — the symmetric inverse of the invite grant that appends a principal to every feature. appId is the Product id. Idempotent: removing a principal that is not present returns removed=false. Returns 404 when the product has no apps. Requires app_magic_link.write and org access.
|
|
63
|
+
*/
|
|
64
|
+
removeAppAccessPrincipal(params: {
|
|
65
|
+
path: {
|
|
66
|
+
orgId: orgIdInPathRequired;
|
|
67
|
+
appId: string;
|
|
68
|
+
};
|
|
69
|
+
headers?: Record<string, string>;
|
|
70
|
+
body: RemoveAppAccessPrincipalRequestContract;
|
|
71
|
+
}): Promise<RemoveAppAccessPrincipalResponseContract>;
|
|
60
72
|
/**
|
|
61
73
|
* Request an app magic link (visitor self-service flow)
|
|
62
74
|
* Unauthenticated visitor flow. The link is dispatched only when the email already has access to the app under its current accessPrincipals; otherwise the call is a no-op. Always returns 200 with `{ ok: true }` so the response cannot be used to enumerate emails or access. Apply per-IP rate limiting upstream of this call.
|
|
@@ -68,6 +80,18 @@ export declare class AppMagicLinksApi {
|
|
|
68
80
|
headers?: Record<string, string>;
|
|
69
81
|
body: RequestAppMagicLinkRequestContract;
|
|
70
82
|
}): Promise<RequestAppMagicLinkResponseContract>;
|
|
83
|
+
/**
|
|
84
|
+
* Create an app magic link without sending the platform email
|
|
85
|
+
* No-email sibling of createAppMagicLink. Same input/output and side effects (user provisioning, principal + org-member grants), but the platform does NOT send the magic_link_app email — the response carries magicLinkUrl so a white-label app can deliver its own branded email. Requires app_magic_link.write and org access. appId is the Product id.
|
|
86
|
+
*/
|
|
87
|
+
requestAppMagicLinkURL(params: {
|
|
88
|
+
path: {
|
|
89
|
+
orgId: orgIdInPathRequired;
|
|
90
|
+
appId: string;
|
|
91
|
+
};
|
|
92
|
+
headers?: Record<string, string>;
|
|
93
|
+
body: CreateAppMagicLinkRequestContract;
|
|
94
|
+
}): Promise<CreateAppMagicLinkResponseContract>;
|
|
71
95
|
/**
|
|
72
96
|
* Revoke an app magic link
|
|
73
97
|
* Owner/admin revoke flow. Soft-deletes the magic link identified by globalId so it can no longer be activated (activation then returns 404) and the recipient email can be invited again — the fix for orphaned invites that block re-invites for 24h. Returns 404 when the link does not exist under the org/app on the path or is already revoked. Requires app_magic_link.write and org access. appId is the Product id.
|
|
@@ -70,6 +70,21 @@ class AppMagicLinksApi {
|
|
|
70
70
|
expectedContentType: "application/json",
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Remove an app access principal
|
|
75
|
+
* Owner/admin flow. Removes an access principal from every feature (App) of the product — the symmetric inverse of the invite grant that appends a principal to every feature. appId is the Product id. Idempotent: removing a principal that is not present returns removed=false. Returns 404 when the product has no apps. Requires app_magic_link.write and org access.
|
|
76
|
+
*/
|
|
77
|
+
async removeAppAccessPrincipal(params) {
|
|
78
|
+
return this.client.request({
|
|
79
|
+
method: "POST",
|
|
80
|
+
path: "/:orgId/apps/:appId/access-principals/remove",
|
|
81
|
+
pathParams: params.path,
|
|
82
|
+
headers: params.headers,
|
|
83
|
+
body: params.body,
|
|
84
|
+
opId: "removeAppAccessPrincipal",
|
|
85
|
+
expectedContentType: "application/json",
|
|
86
|
+
});
|
|
87
|
+
}
|
|
73
88
|
/**
|
|
74
89
|
* Request an app magic link (visitor self-service flow)
|
|
75
90
|
* Unauthenticated visitor flow. The link is dispatched only when the email already has access to the app under its current accessPrincipals; otherwise the call is a no-op. Always returns 200 with `{ ok: true }` so the response cannot be used to enumerate emails or access. Apply per-IP rate limiting upstream of this call.
|
|
@@ -85,6 +100,21 @@ class AppMagicLinksApi {
|
|
|
85
100
|
expectedContentType: "application/json",
|
|
86
101
|
});
|
|
87
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Create an app magic link without sending the platform email
|
|
105
|
+
* No-email sibling of createAppMagicLink. Same input/output and side effects (user provisioning, principal + org-member grants), but the platform does NOT send the magic_link_app email — the response carries magicLinkUrl so a white-label app can deliver its own branded email. Requires app_magic_link.write and org access. appId is the Product id.
|
|
106
|
+
*/
|
|
107
|
+
async requestAppMagicLinkURL(params) {
|
|
108
|
+
return this.client.request({
|
|
109
|
+
method: "POST",
|
|
110
|
+
path: "/:orgId/apps/:appId/magic-link-url",
|
|
111
|
+
pathParams: params.path,
|
|
112
|
+
headers: params.headers,
|
|
113
|
+
body: params.body,
|
|
114
|
+
opId: "requestAppMagicLinkURL",
|
|
115
|
+
expectedContentType: "application/json",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
88
118
|
/**
|
|
89
119
|
* Revoke an app magic link
|
|
90
120
|
* Owner/admin revoke flow. Soft-deletes the magic link identified by globalId so it can no longer be activated (activation then returns 404) and the recipient email can be invited again — the fix for orphaned invites that block re-invites for 24h. Returns 404 when the link does not exist under the org/app on the path or is already revoked. Requires app_magic_link.write and org access. appId is the Product id.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: fusebase-auth
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { FusebaseAuthChallengeRequestContract, FusebaseAuthChallengeResponseContract, FusebaseAuthLoginRequestContract, FusebaseAuthLoginResponseContract, FusebaseAuthLogoutResponseContract, FusebaseAuthPasswordResetRequestContract, FusebaseAuthPasswordResetResponseContract, FusebaseAuthPasswordRestoreKeyResponseContract, FusebaseAuthPasswordRestoreRequestContract, FusebaseAuthPasswordRestoreResponseContract, FusebaseAuthRegisterMemberRequestContract, FusebaseAuthRegisterMemberResponseContract, FusebaseAuthRegisterRequestContract, FusebaseAuthRegisterResponseContract, orgIdInPathRequired } from "../types";
|
|
8
|
+
import type { FusebaseAuthChallengeRequestContract, FusebaseAuthChallengeResponseContract, FusebaseAuthLoginRequestContract, FusebaseAuthLoginResponseContract, FusebaseAuthLogoutResponseContract, FusebaseAuthPasswordResetRequestContract, FusebaseAuthPasswordResetResponseContract, FusebaseAuthPasswordRestoreKeyResponseContract, FusebaseAuthPasswordRestoreRequestContract, FusebaseAuthPasswordRestoreResponseContract, FusebaseAuthRegisterMemberRequestContract, FusebaseAuthRegisterMemberResponseContract, FusebaseAuthRegisterRequestContract, FusebaseAuthRegisterResponseContract, FusebaseAuthRestoreKeyRequestContract, FusebaseAuthRestoreKeyResponseContract, orgIdInPathRequired } from "../types";
|
|
9
9
|
export declare class FusebaseAuthApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -63,12 +63,23 @@ export declare class FusebaseAuthApi {
|
|
|
63
63
|
}): Promise<FusebaseAuthRegisterResponseContract>;
|
|
64
64
|
/**
|
|
65
65
|
* Request Fusebase password restore
|
|
66
|
-
* Visitor-safe password restore request. Forwards to auth-form `/auth/api/remind` and always returns a generic success shape so the route does not enumerate accounts.
|
|
66
|
+
* Visitor-safe password restore request. Forwards to auth-form `/auth/api/remind` and always returns a generic success shape so the route does not enumerate accounts. The email and its reset link are rendered by the platform mail template; the link is not part of this contract. Set BOTH `portalId` and `workspaceId` for portal white-label branding. To control the reset URL yourself, use `requestFusebaseRestoreKey` and send your own email.
|
|
67
67
|
*/
|
|
68
68
|
requestFusebasePasswordRestore(params: {
|
|
69
69
|
headers?: Record<string, string>;
|
|
70
70
|
body: FusebaseAuthPasswordRestoreRequestContract;
|
|
71
71
|
}): Promise<FusebaseAuthPasswordRestoreResponseContract>;
|
|
72
|
+
/**
|
|
73
|
+
* Mint a Fusebase password-restore key (no email)
|
|
74
|
+
* Mints a password-restore key without sending the platform email, so an app backend can send its own branded reset mail. The key works with `checkFusebasePasswordRestoreKey` / `resetFusebasePassword` at the same TTL and one-time-use as the email flow, and is not bound to any URL — build whatever reset link you want around it, or use the returned `platformResetUrl` if the app has no reset page of its own. Requires `auth.restore_key.write` and an app service token scoped to the path `orgId`; user, visitor and anonymous callers get 403, as does a token scoped to another org. Backend only — the app-wrapper `fbsfeaturetoken` cookie also resolves as a token subject, so the calling credential must never be reachable from frontend code. A key resets the target's GLOBAL FuseBase password, so it is minted only when the path `orgId` is the user's ONLY org; any footprint elsewhere is an independent account and 404s, as do unknown emails. NOT visitor-safe — it exposes the key.
|
|
75
|
+
*/
|
|
76
|
+
requestFusebaseRestoreKey(params: {
|
|
77
|
+
path: {
|
|
78
|
+
orgId: orgIdInPathRequired;
|
|
79
|
+
};
|
|
80
|
+
headers?: Record<string, string>;
|
|
81
|
+
body: FusebaseAuthRestoreKeyRequestContract;
|
|
82
|
+
}): Promise<FusebaseAuthRestoreKeyResponseContract>;
|
|
72
83
|
/**
|
|
73
84
|
* Reset Fusebase password
|
|
74
85
|
* Completes a password restore session by setting a new password through user-service.
|
|
@@ -97,7 +97,7 @@ class FusebaseAuthApi {
|
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Request Fusebase password restore
|
|
100
|
-
* Visitor-safe password restore request. Forwards to auth-form `/auth/api/remind` and always returns a generic success shape so the route does not enumerate accounts.
|
|
100
|
+
* Visitor-safe password restore request. Forwards to auth-form `/auth/api/remind` and always returns a generic success shape so the route does not enumerate accounts. The email and its reset link are rendered by the platform mail template; the link is not part of this contract. Set BOTH `portalId` and `workspaceId` for portal white-label branding. To control the reset URL yourself, use `requestFusebaseRestoreKey` and send your own email.
|
|
101
101
|
*/
|
|
102
102
|
async requestFusebasePasswordRestore(params) {
|
|
103
103
|
return this.client.request({
|
|
@@ -109,6 +109,21 @@ class FusebaseAuthApi {
|
|
|
109
109
|
expectedContentType: "application/json",
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Mint a Fusebase password-restore key (no email)
|
|
114
|
+
* Mints a password-restore key without sending the platform email, so an app backend can send its own branded reset mail. The key works with `checkFusebasePasswordRestoreKey` / `resetFusebasePassword` at the same TTL and one-time-use as the email flow, and is not bound to any URL — build whatever reset link you want around it, or use the returned `platformResetUrl` if the app has no reset page of its own. Requires `auth.restore_key.write` and an app service token scoped to the path `orgId`; user, visitor and anonymous callers get 403, as does a token scoped to another org. Backend only — the app-wrapper `fbsfeaturetoken` cookie also resolves as a token subject, so the calling credential must never be reachable from frontend code. A key resets the target's GLOBAL FuseBase password, so it is minted only when the path `orgId` is the user's ONLY org; any footprint elsewhere is an independent account and 404s, as do unknown emails. NOT visitor-safe — it exposes the key.
|
|
115
|
+
*/
|
|
116
|
+
async requestFusebaseRestoreKey(params) {
|
|
117
|
+
return this.client.request({
|
|
118
|
+
method: "POST",
|
|
119
|
+
path: "/:orgId/auth/fusebase/restore-key",
|
|
120
|
+
pathParams: params.path,
|
|
121
|
+
headers: params.headers,
|
|
122
|
+
body: params.body,
|
|
123
|
+
opId: "requestFusebaseRestoreKey",
|
|
124
|
+
expectedContentType: "application/json",
|
|
125
|
+
});
|
|
126
|
+
}
|
|
112
127
|
/**
|
|
113
128
|
* Reset Fusebase password
|
|
114
129
|
* Completes a password restore session by setting a new password through user-service.
|
package/dist/apis/NotesApi.d.ts
CHANGED
|
@@ -5,12 +5,25 @@
|
|
|
5
5
|
* Domain: notes
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { AddWorkspaceNoteAttachmentRequestContract, AddWorkspaceNoteAttachmentResponseContract, AppendWorkspaceMarkdownNoteContentRequestContract, AppendWorkspaceNoteContentRequestContract, CreateWorkspaceMarkdownNoteRequestContract, CreateWorkspaceNoteFolderRequestContract, CreateWorkspaceNoteFolderResponseContract, CreateWorkspaceNoteRequestContract, CreateWorkspaceNoteResponseContract, orgIdInPathRequired, UpdateWorkspaceMarkdownNoteContentRequestContract, WorkspaceIdInPathRequired, WorkspaceMarkdownNoteResponseContract, WorkspaceNoteContentResponseContract, WorkspaceNoteFolderListResponseContract, WorkspaceNoteIdInPathRequired, WorkspaceNoteListResponseContract, WorkspaceNoteParentIdInQueryOptional } from "../types";
|
|
8
|
+
import type { AddWorkspaceMarkdownNoteAttachmentRequestContract, AddWorkspaceMarkdownNoteAttachmentResponseContract, AddWorkspaceNoteAttachmentRequestContract, AddWorkspaceNoteAttachmentResponseContract, AppendWorkspaceMarkdownNoteContentRequestContract, AppendWorkspaceNoteContentRequestContract, CreateWorkspaceMarkdownNoteRequestContract, CreateWorkspaceNoteFolderRequestContract, CreateWorkspaceNoteFolderResponseContract, CreateWorkspaceNoteRequestContract, CreateWorkspaceNoteResponseContract, orgIdInPathRequired, UpdateWorkspaceMarkdownNoteContentRequestContract, WorkspaceIdInPathRequired, WorkspaceMarkdownNoteResponseContract, WorkspaceNoteContentResponseContract, WorkspaceNoteFolderListResponseContract, WorkspaceNoteIdInPathRequired, WorkspaceNoteListResponseContract, WorkspaceNoteParentIdInQueryOptional } from "../types";
|
|
9
9
|
export declare class NotesApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
12
12
|
/**
|
|
13
|
-
* Add
|
|
13
|
+
* Add markdown (v3) note attachment
|
|
14
|
+
* Attaches a stored-file UUID from the files upload flow to a v3 markdown note and appends the matching markdown to the note body: an image for image attachments, a link for every other type. Never touches the v2 editor document — use this op for notes whose `contentVersion` is `markdown_v3` and `addWorkspaceNoteAttachment` for v2 notes. The response carries the canonical attachment `url` and the appended `markdown` snippet, so clients do not have to build the link format themselves.
|
|
15
|
+
*/
|
|
16
|
+
addWorkspaceMarkdownNoteAttachment(params: {
|
|
17
|
+
path: {
|
|
18
|
+
orgId: orgIdInPathRequired;
|
|
19
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
20
|
+
noteId: WorkspaceNoteIdInPathRequired;
|
|
21
|
+
};
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
body: AddWorkspaceMarkdownNoteAttachmentRequestContract;
|
|
24
|
+
}): Promise<AddWorkspaceMarkdownNoteAttachmentResponseContract>;
|
|
25
|
+
/**
|
|
26
|
+
* Add workspace note attachment (v2 notes)
|
|
14
27
|
* Attaches a stored-file UUID from the files upload flow to a workspace note, then appends an image blot for image attachments or a file blot for all other attachment types. Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace before calling note-service and editor-server.
|
|
15
28
|
*/
|
|
16
29
|
addWorkspaceNoteAttachment(params: {
|
package/dist/apis/NotesApi.js
CHANGED
|
@@ -12,7 +12,22 @@ class NotesApi {
|
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Add
|
|
15
|
+
* Add markdown (v3) note attachment
|
|
16
|
+
* Attaches a stored-file UUID from the files upload flow to a v3 markdown note and appends the matching markdown to the note body: an image for image attachments, a link for every other type. Never touches the v2 editor document — use this op for notes whose `contentVersion` is `markdown_v3` and `addWorkspaceNoteAttachment` for v2 notes. The response carries the canonical attachment `url` and the appended `markdown` snippet, so clients do not have to build the link format themselves.
|
|
17
|
+
*/
|
|
18
|
+
async addWorkspaceMarkdownNoteAttachment(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/:orgId/workspaces/:workspaceId/markdown-notes/:noteId/attachments",
|
|
22
|
+
pathParams: params.path,
|
|
23
|
+
headers: params.headers,
|
|
24
|
+
body: params.body,
|
|
25
|
+
opId: "addWorkspaceMarkdownNoteAttachment",
|
|
26
|
+
expectedContentType: "application/json",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Add workspace note attachment (v2 notes)
|
|
16
31
|
* Attaches a stored-file UUID from the files upload flow to a workspace note, then appends an image blot for image attachments or a file blot for all other attachment types. Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace before calling note-service and editor-server.
|
|
17
32
|
*/
|
|
18
33
|
async addWorkspaceNoteAttachment(params) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: org-users
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { ClientAccountScheduledDeletionRequestContract, ClientAccountScheduledDeletionResponseContract, orgIdInPathRequired, OrgMemberRemoveResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserIdInPathRequired, OrgUserListResponseContract, OrgUserWorkspaceIdInPathRequired, OrgWorkspaceMemberListResponseContract, WorkspaceMemberRemoveResponseContract } from "../types";
|
|
8
|
+
import type { ClientAccountScheduledDeletionRequestContract, ClientAccountScheduledDeletionResponseContract, orgIdInPathRequired, OrgMemberExpectedJoinedAfterInQueryOptional, OrgMemberExpectedRoleInQueryOptional, OrgMemberRemoveResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserIdInPathRequired, OrgUserListResponseContract, OrgUserWorkspaceIdInPathRequired, OrgWorkspaceMemberListResponseContract, WorkspaceMemberRemoveResponseContract } from "../types";
|
|
9
9
|
export declare class OrgUsersApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -32,7 +32,7 @@ export declare class OrgUsersApi {
|
|
|
32
32
|
}): Promise<OrgUserListResponseContract>;
|
|
33
33
|
/**
|
|
34
34
|
* List portal members
|
|
35
|
-
* Returns the members of a portal by its underlying workspaceId. Portal membership is currently represented by workspace membership (same semantics as removePortalMember), so Gate validates the workspace belongs to `orgId` and returns its members, each including the workspaceMember `id` (globalId). Requires org.members.read and org access.
|
|
35
|
+
* Returns the members of a portal by its underlying workspaceId. Portal membership is currently represented by workspace membership (same semantics as removePortalMember), so Gate validates the workspace belongs to `orgId` and returns its members, each including the workspaceMember `id` (globalId). Each member is enriched from org membership (joined by `userId`) with `orgRole` (guest|client|member|manager|owner), `email`, `firstname`, `lastname`, and `isPortalManager`. `isPortalManager` is the official flag for a portal manager (org role `manager`, what invitePortalManager grants, or `owner`); use it — plus `orgRole === 'client'` for clients — to answer 'client vs portal manager' and to build a 'Chat with <name | email>' channel name in one call, without a separate listOrgUsers roundtrip. Requires org.members.read and org access.
|
|
36
36
|
*/
|
|
37
37
|
listPortalMembers(params: {
|
|
38
38
|
path: {
|
|
@@ -43,7 +43,7 @@ export declare class OrgUsersApi {
|
|
|
43
43
|
}): Promise<OrgWorkspaceMemberListResponseContract>;
|
|
44
44
|
/**
|
|
45
45
|
* List workspace members
|
|
46
|
-
* Returns the members of a single workspace scoped to the organization. Gate validates that the workspace belongs to `orgId`, then calls org-service. Each member includes the workspaceMember `id` (globalId) needed by removeWorkspaceMember. Requires org.members.read and org access.
|
|
46
|
+
* Returns the members of a single workspace scoped to the organization. Gate validates that the workspace belongs to `orgId`, then calls org-service. Each member includes the workspaceMember `id` (globalId) needed by removeWorkspaceMember. Each member is enriched from org membership (joined by `userId`) with `orgRole` (guest|client|member|manager|owner), `email`, `firstname`, `lastname`, and `isPortalManager` — the official flag for a portal manager (org role `manager`, what invitePortalManager grants, or `owner`); prefer it over re-deriving the formula. Requires org.members.read and org access.
|
|
47
47
|
*/
|
|
48
48
|
listWorkspaceMembers(params: {
|
|
49
49
|
path: {
|
|
@@ -54,13 +54,17 @@ export declare class OrgUsersApi {
|
|
|
54
54
|
}): Promise<OrgWorkspaceMemberListResponseContract>;
|
|
55
55
|
/**
|
|
56
56
|
* Remove organization member
|
|
57
|
-
* Removes an organization member by numeric userId. Gate resolves the internal orgMember.globalId before calling org-service, and org-service cleans up workspace/group memberships for that org. Requires org.members.write and org access.
|
|
57
|
+
* Removes an organization member by numeric userId. Gate resolves the internal orgMember.globalId before calling org-service, and org-service cleans up workspace/group memberships for that org. Optional query preconditions make the removal conditional instead of unconditional: `expectedRole` requires the member to still hold that org role, and `expectedJoinedAfter` (unix seconds) requires the membership to have been created at or after that moment — use it when cancelling an invite so a pre-existing member is never dropped. Either mismatch fails with 409 and removes nothing; a precondition sent with an empty or unparsable value fails with 400 rather than degrading into an unconditional removal. Requires org.members.write and org access.
|
|
58
58
|
*/
|
|
59
59
|
removeOrgMember(params: {
|
|
60
60
|
path: {
|
|
61
61
|
orgId: orgIdInPathRequired;
|
|
62
62
|
userId: OrgUserIdInPathRequired;
|
|
63
63
|
};
|
|
64
|
+
query?: {
|
|
65
|
+
expectedRole?: OrgMemberExpectedRoleInQueryOptional;
|
|
66
|
+
expectedJoinedAfter?: OrgMemberExpectedJoinedAfterInQueryOptional;
|
|
67
|
+
};
|
|
64
68
|
headers?: Record<string, string>;
|
|
65
69
|
}): Promise<OrgMemberRemoveResponseContract>;
|
|
66
70
|
/**
|
package/dist/apis/OrgUsersApi.js
CHANGED
|
@@ -42,7 +42,7 @@ class OrgUsersApi {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* List portal members
|
|
45
|
-
* Returns the members of a portal by its underlying workspaceId. Portal membership is currently represented by workspace membership (same semantics as removePortalMember), so Gate validates the workspace belongs to `orgId` and returns its members, each including the workspaceMember `id` (globalId). Requires org.members.read and org access.
|
|
45
|
+
* Returns the members of a portal by its underlying workspaceId. Portal membership is currently represented by workspace membership (same semantics as removePortalMember), so Gate validates the workspace belongs to `orgId` and returns its members, each including the workspaceMember `id` (globalId). Each member is enriched from org membership (joined by `userId`) with `orgRole` (guest|client|member|manager|owner), `email`, `firstname`, `lastname`, and `isPortalManager`. `isPortalManager` is the official flag for a portal manager (org role `manager`, what invitePortalManager grants, or `owner`); use it — plus `orgRole === 'client'` for clients — to answer 'client vs portal manager' and to build a 'Chat with <name | email>' channel name in one call, without a separate listOrgUsers roundtrip. Requires org.members.read and org access.
|
|
46
46
|
*/
|
|
47
47
|
async listPortalMembers(params) {
|
|
48
48
|
return this.client.request({
|
|
@@ -56,7 +56,7 @@ class OrgUsersApi {
|
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* List workspace members
|
|
59
|
-
* Returns the members of a single workspace scoped to the organization. Gate validates that the workspace belongs to `orgId`, then calls org-service. Each member includes the workspaceMember `id` (globalId) needed by removeWorkspaceMember. Requires org.members.read and org access.
|
|
59
|
+
* Returns the members of a single workspace scoped to the organization. Gate validates that the workspace belongs to `orgId`, then calls org-service. Each member includes the workspaceMember `id` (globalId) needed by removeWorkspaceMember. Each member is enriched from org membership (joined by `userId`) with `orgRole` (guest|client|member|manager|owner), `email`, `firstname`, `lastname`, and `isPortalManager` — the official flag for a portal manager (org role `manager`, what invitePortalManager grants, or `owner`); prefer it over re-deriving the formula. Requires org.members.read and org access.
|
|
60
60
|
*/
|
|
61
61
|
async listWorkspaceMembers(params) {
|
|
62
62
|
return this.client.request({
|
|
@@ -70,13 +70,14 @@ class OrgUsersApi {
|
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* Remove organization member
|
|
73
|
-
* Removes an organization member by numeric userId. Gate resolves the internal orgMember.globalId before calling org-service, and org-service cleans up workspace/group memberships for that org. Requires org.members.write and org access.
|
|
73
|
+
* Removes an organization member by numeric userId. Gate resolves the internal orgMember.globalId before calling org-service, and org-service cleans up workspace/group memberships for that org. Optional query preconditions make the removal conditional instead of unconditional: `expectedRole` requires the member to still hold that org role, and `expectedJoinedAfter` (unix seconds) requires the membership to have been created at or after that moment — use it when cancelling an invite so a pre-existing member is never dropped. Either mismatch fails with 409 and removes nothing; a precondition sent with an empty or unparsable value fails with 400 rather than degrading into an unconditional removal. Requires org.members.write and org access.
|
|
74
74
|
*/
|
|
75
75
|
async removeOrgMember(params) {
|
|
76
76
|
return this.client.request({
|
|
77
77
|
method: "DELETE",
|
|
78
78
|
path: "/:orgId/users/:userId",
|
|
79
79
|
pathParams: params.path,
|
|
80
|
+
query: params.query,
|
|
80
81
|
headers: params.headers,
|
|
81
82
|
opId: "removeOrgMember",
|
|
82
83
|
expectedContentType: "application/json",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: portals
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalBlockRequestContract, AddPortalBlockResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, BulkInviteToPortalRequestContract, BulkInviteToPortalResponseContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, globalIdInPathRequired, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalContentResponseContract, orgIdInPathRequired, OrgPortalListResponseContract, PortalDetailContract, PublishPortalDraftResponseContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract } from "../types";
|
|
8
|
+
import type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalBlankNoteBlockRequestContract, AddPortalBlankNoteBlockResponseContract, AddPortalBlockRequestContract, AddPortalBlockResponseContract, AddPortalChatBlockRequestContract, AddPortalChatBlockResponseContract, AddPortalEmbedBlockRequestContract, AddPortalEmbedBlockResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, BulkInviteToPortalRequestContract, BulkInviteToPortalResponseContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageRequestContract, CreatePortalPageResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, globalIdInPathRequired, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalChatChannelsResponseContract, ListPortalChatUsersResponseContract, ListPortalContentResponseContract, orgIdInPathRequired, OrgPortalListResponseContract, PortalDetailContract, PublishPortalDraftResponseContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract } from "../types";
|
|
9
9
|
export declare class PortalsApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -21,9 +21,22 @@ export declare class PortalsApi {
|
|
|
21
21
|
headers?: Record<string, string>;
|
|
22
22
|
body: AddPortalAppPageRequestContract;
|
|
23
23
|
}): Promise<AddPortalAppPageResponseContract>;
|
|
24
|
+
/**
|
|
25
|
+
* Add an empty Fusebase note as a block to a portal page
|
|
26
|
+
* Creates a new EMPTY Fusebase note, shares it into the portal and adds it as a note block to an existing portal page — the programmatic equivalent of the customizer's "Blank Block" action. No new page and no sidebar menu item is created. For a published page resolve pageId from listPortalContent; for a page created earlier in the active draft use the pageId that operation returned. The block is appended after the last block of the page body and is staged in the portal's customizer draft (not published immediately). Use addPortalNoteBlock when the note already exists and is already shared into the portal, and createPortalPageWithNote when a new sidebar page backed by a note is wanted. Returns the note/block ids and the draft branch/seqs. Requires portals.write access.
|
|
27
|
+
*/
|
|
28
|
+
addPortalBlankNoteBlock(params: {
|
|
29
|
+
path: {
|
|
30
|
+
orgId: orgIdInPathRequired;
|
|
31
|
+
portalId: globalIdInPathRequired;
|
|
32
|
+
pageId: globalIdInPathRequired;
|
|
33
|
+
};
|
|
34
|
+
headers?: Record<string, string>;
|
|
35
|
+
body?: AddPortalBlankNoteBlockRequestContract;
|
|
36
|
+
}): Promise<AddPortalBlankNoteBlockResponseContract>;
|
|
24
37
|
/**
|
|
25
38
|
* Add a block of any palette type to a portal page
|
|
26
|
-
* Stages a single block of any supported type onto an existing portal page — the universal building block behind the customizer's 'Add new block' palette (no new page or sidebar item is created). Pass pageId (the target page node id from listPortalContent) and type. Supported types: note, content,
|
|
39
|
+
* Stages a single block of any supported type onto an existing portal page — the universal building block behind the customizer's 'Add new block' palette (no new page or sidebar item is created). Pass pageId (the target page node id from listPortalContent) and type. Supported types: note, content, info, docs, help, request, meetings, links, task-list, projection, files-dashboard, tasks-dashboard, chats-dashboard, files-recent, files-bucket, flexible. Type-specific fields: note/content require noteId; flexible requires template (e.g. {type:'text'|'image'|'title'|'code'|'form'|'dashboard'|'ai-agent'|'app-feature'|...}) and may carry bricks; info/projection/task-list and others take their fields via the free-form `properties` object (e.g. image/link, sourcePortalId/sourcePageId/sourceBlockId, taskListIds). This op does NOT accept type='embed' or type='chat' — use addPortalEmbedBlock for Embed blocks and addPortalChatBlock for Chat blocks. Use addPortalNoteBlock for the common note case or addPortalAppPage for an app on its own page. Note: a `content` block renames the page to its title, so leave title empty for content blocks. The block is staged in the portal's customizer draft (not published immediately); the owner reviews and publishes it. Returns the block id and the draft branch/seqs. Requires portals.write access.
|
|
27
40
|
*/
|
|
28
41
|
addPortalBlock(params: {
|
|
29
42
|
path: {
|
|
@@ -33,6 +46,32 @@ export declare class PortalsApi {
|
|
|
33
46
|
headers?: Record<string, string>;
|
|
34
47
|
body: AddPortalBlockRequestContract;
|
|
35
48
|
}): Promise<AddPortalBlockResponseContract>;
|
|
49
|
+
/**
|
|
50
|
+
* Add a Chat block to a portal page
|
|
51
|
+
* Stages one Customizer-compatible Chat block on an EXISTING portal page — the programmatic equivalent of the customizer's "Chat" action. Pass exactly one target: { type: 'channel', channelId } (id from listPortalChatChannels) or { type: 'dm', userId } (an active org member's userId). membersOnly is channel-only (default true; a private channel requires true; forbidden for dm). One active Chat block is allowed per page — a second returns 409. Creates one chat widget configuration and stages the block in the customizer draft (not published immediately). This is a Chat WIDGET on a page, distinct from the portal's system chat menu item and the chats-dashboard block. For a published page resolve pageId from listPortalContent; for a page created earlier in the active draft use the pageId that operation returned. Returns the block id and the draft branch/seqs. Requires portals.write access.
|
|
52
|
+
*/
|
|
53
|
+
addPortalChatBlock(params: {
|
|
54
|
+
path: {
|
|
55
|
+
orgId: orgIdInPathRequired;
|
|
56
|
+
portalId: globalIdInPathRequired;
|
|
57
|
+
pageId: globalIdInPathRequired;
|
|
58
|
+
};
|
|
59
|
+
headers?: Record<string, string>;
|
|
60
|
+
body: AddPortalChatBlockRequestContract;
|
|
61
|
+
}): Promise<AddPortalChatBlockResponseContract>;
|
|
62
|
+
/**
|
|
63
|
+
* Add an Embeds & Integrations block to a portal page
|
|
64
|
+
* Stages one Customizer-compatible Embed block on an EXISTING portal page — the programmatic equivalent of the customizer's "Embeds & Integrations" action. No new page and no sidebar menu item is created. embedType is one of the 11 chooser variants (custom, youtube, google-drive, ms-doc, calendly, hubspot, airtable, loom, data-studio, figma, miro). For `custom` pass `content` (URL or embed code) and NOT `url`; for every named variant pass `url` and NOT `content` — the service builds the canonical iframe. hubspot here is an iframe Embed block, not a Flexible Block integration brick. For a published page resolve pageId from listPortalContent; for a page created earlier in the active draft use the pageId that operation returned. The block is staged in the portal's customizer draft (not published immediately). Returns the block id and the draft branch/seqs. Requires portals.write access.
|
|
65
|
+
*/
|
|
66
|
+
addPortalEmbedBlock(params: {
|
|
67
|
+
path: {
|
|
68
|
+
orgId: orgIdInPathRequired;
|
|
69
|
+
portalId: globalIdInPathRequired;
|
|
70
|
+
pageId: globalIdInPathRequired;
|
|
71
|
+
};
|
|
72
|
+
headers?: Record<string, string>;
|
|
73
|
+
body: AddPortalEmbedBlockRequestContract;
|
|
74
|
+
}): Promise<AddPortalEmbedBlockResponseContract>;
|
|
36
75
|
/**
|
|
37
76
|
* Add an existing Fusebase note as a block to a portal page
|
|
38
77
|
* Embeds an existing Fusebase note as a content block on an existing portal page (no new page or sidebar item is created). The note must already exist in the portal's workspace and be shared into the portal (e.g. created via createPortalPageWithNote). Pass pageId (the target page node id, obtained from listPortalContent) and noteId. The block is staged in the portal's customizer draft (not published immediately): the portal owner opens the customizer, reviews the pending block, and publishes it. Returns the created block id and the draft branch/seqs. Requires portals.write access.
|
|
@@ -80,6 +119,18 @@ export declare class PortalsApi {
|
|
|
80
119
|
headers?: Record<string, string>;
|
|
81
120
|
body: CreatePortalFolderRequestContract;
|
|
82
121
|
}): Promise<CreatePortalFolderResponseContract>;
|
|
122
|
+
/**
|
|
123
|
+
* Create an empty portal page
|
|
124
|
+
* Creates a new EMPTY sidebar page in the portal — a page node plus its sidebar menu item, with no Fusebase note and no block. The page is staged in the portal's customizer draft (not published immediately): the portal owner opens the customizer, reviews the pending page, and publishes it. Pass parentId to nest the page under an existing published or active-draft folder. The returned pageId can immediately be passed to semantic block operations to add content before publishing. Use createPortalPageWithNote instead when a page backed by a new Fusebase note is wanted. Returns the page/menu-item ids, the page url, and the draft branch/seqs. Requires portals.write access.
|
|
125
|
+
*/
|
|
126
|
+
createPortalPage(params: {
|
|
127
|
+
path: {
|
|
128
|
+
orgId: orgIdInPathRequired;
|
|
129
|
+
portalId: globalIdInPathRequired;
|
|
130
|
+
};
|
|
131
|
+
headers?: Record<string, string>;
|
|
132
|
+
body: CreatePortalPageRequestContract;
|
|
133
|
+
}): Promise<CreatePortalPageResponseContract>;
|
|
83
134
|
/**
|
|
84
135
|
* Create a portal page backed by a Fusebase note
|
|
85
136
|
* Creates a new sidebar page in the portal backed by a freshly created Fusebase note. The note is created in the portal's workspace and shared into the portal; optional initial text or html can be appended to it. The page (page node + note menu item + note content block) is staged in the portal's customizer draft (not published immediately): the portal owner opens the customizer, reviews the pending page, and publishes it. Pass parentId to nest the page under an existing folder. Returns the note/page/menu-item ids, the page url, and the draft branch/seqs. Requires portals.write access.
|
|
@@ -152,6 +203,33 @@ export declare class PortalsApi {
|
|
|
152
203
|
headers?: Record<string, string>;
|
|
153
204
|
body: InviteToPortalRequestContract;
|
|
154
205
|
}): Promise<InviteToPortalResponseContract>;
|
|
206
|
+
/**
|
|
207
|
+
* List a portal's chat channels for the Chat block picker
|
|
208
|
+
* Lists the real, listable chat channels of a portal so a Chat block can target one by exact id. DMs, group DMs and hidden channels are excluded; the default channel is returned first. ALWAYS call this before addPortalChatBlock with a channel target — never guess a channel id and never assume `general` exists. This is the Chat widget's channel list, distinct from the portal's system chat menu item and the chats-dashboard block. Requires portals.write access.
|
|
209
|
+
*/
|
|
210
|
+
listPortalChatChannels(params: {
|
|
211
|
+
path: {
|
|
212
|
+
orgId: orgIdInPathRequired;
|
|
213
|
+
portalId: globalIdInPathRequired;
|
|
214
|
+
};
|
|
215
|
+
headers?: Record<string, string>;
|
|
216
|
+
}): Promise<ListPortalChatChannelsResponseContract>;
|
|
217
|
+
/**
|
|
218
|
+
* Search or browse a portal's DM target users for the Chat block picker
|
|
219
|
+
* Searches a portal org's active members + owner by name, username or email so a Chat block can target a DM by exact user id. Call this before addPortalChatBlock with a `dm` target — never guess a user id. `query` is optional: omit it to browse the first bounded page. Returns a single page of { id, displayName, username?, email? }, the matching `total`, and an opaque nextCursor when more pages exist. Show one page at a time and ask before fetching the next; never request or aggregate the full org user list. Requires portals.write access.
|
|
220
|
+
*/
|
|
221
|
+
listPortalChatUsers(params: {
|
|
222
|
+
path: {
|
|
223
|
+
orgId: orgIdInPathRequired;
|
|
224
|
+
portalId: globalIdInPathRequired;
|
|
225
|
+
};
|
|
226
|
+
query?: {
|
|
227
|
+
query?: string;
|
|
228
|
+
limit?: number;
|
|
229
|
+
cursor?: string;
|
|
230
|
+
};
|
|
231
|
+
headers?: Record<string, string>;
|
|
232
|
+
}): Promise<ListPortalChatUsersResponseContract>;
|
|
155
233
|
/**
|
|
156
234
|
* List portal content (folders and pages)
|
|
157
235
|
* Returns the menu tree of a portal: folders, note pages, portal pages, and system items. Use this operation to discover existing content before creating new folders or pages. Item types match portal-service values: notesFolder, note, portalPage, home, link, etc. For items of type 'note', the noteId field contains the Fusebase note id. Requires portals.read access.
|
package/dist/apis/PortalsApi.js
CHANGED
|
@@ -26,9 +26,24 @@ class PortalsApi {
|
|
|
26
26
|
expectedContentType: "application/json",
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Add an empty Fusebase note as a block to a portal page
|
|
31
|
+
* Creates a new EMPTY Fusebase note, shares it into the portal and adds it as a note block to an existing portal page — the programmatic equivalent of the customizer's "Blank Block" action. No new page and no sidebar menu item is created. For a published page resolve pageId from listPortalContent; for a page created earlier in the active draft use the pageId that operation returned. The block is appended after the last block of the page body and is staged in the portal's customizer draft (not published immediately). Use addPortalNoteBlock when the note already exists and is already shared into the portal, and createPortalPageWithNote when a new sidebar page backed by a note is wanted. Returns the note/block ids and the draft branch/seqs. Requires portals.write access.
|
|
32
|
+
*/
|
|
33
|
+
async addPortalBlankNoteBlock(params) {
|
|
34
|
+
return this.client.request({
|
|
35
|
+
method: "POST",
|
|
36
|
+
path: "/:orgId/portals/:portalId/pages/:pageId/blocks/blank-note",
|
|
37
|
+
pathParams: params.path,
|
|
38
|
+
headers: params.headers,
|
|
39
|
+
body: params.body,
|
|
40
|
+
opId: "addPortalBlankNoteBlock",
|
|
41
|
+
expectedContentType: "application/json",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
29
44
|
/**
|
|
30
45
|
* Add a block of any palette type to a portal page
|
|
31
|
-
* Stages a single block of any supported type onto an existing portal page — the universal building block behind the customizer's 'Add new block' palette (no new page or sidebar item is created). Pass pageId (the target page node id from listPortalContent) and type. Supported types: note, content,
|
|
46
|
+
* Stages a single block of any supported type onto an existing portal page — the universal building block behind the customizer's 'Add new block' palette (no new page or sidebar item is created). Pass pageId (the target page node id from listPortalContent) and type. Supported types: note, content, info, docs, help, request, meetings, links, task-list, projection, files-dashboard, tasks-dashboard, chats-dashboard, files-recent, files-bucket, flexible. Type-specific fields: note/content require noteId; flexible requires template (e.g. {type:'text'|'image'|'title'|'code'|'form'|'dashboard'|'ai-agent'|'app-feature'|...}) and may carry bricks; info/projection/task-list and others take their fields via the free-form `properties` object (e.g. image/link, sourcePortalId/sourcePageId/sourceBlockId, taskListIds). This op does NOT accept type='embed' or type='chat' — use addPortalEmbedBlock for Embed blocks and addPortalChatBlock for Chat blocks. Use addPortalNoteBlock for the common note case or addPortalAppPage for an app on its own page. Note: a `content` block renames the page to its title, so leave title empty for content blocks. The block is staged in the portal's customizer draft (not published immediately); the owner reviews and publishes it. Returns the block id and the draft branch/seqs. Requires portals.write access.
|
|
32
47
|
*/
|
|
33
48
|
async addPortalBlock(params) {
|
|
34
49
|
return this.client.request({
|
|
@@ -41,6 +56,36 @@ class PortalsApi {
|
|
|
41
56
|
expectedContentType: "application/json",
|
|
42
57
|
});
|
|
43
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Add a Chat block to a portal page
|
|
61
|
+
* Stages one Customizer-compatible Chat block on an EXISTING portal page — the programmatic equivalent of the customizer's "Chat" action. Pass exactly one target: { type: 'channel', channelId } (id from listPortalChatChannels) or { type: 'dm', userId } (an active org member's userId). membersOnly is channel-only (default true; a private channel requires true; forbidden for dm). One active Chat block is allowed per page — a second returns 409. Creates one chat widget configuration and stages the block in the customizer draft (not published immediately). This is a Chat WIDGET on a page, distinct from the portal's system chat menu item and the chats-dashboard block. For a published page resolve pageId from listPortalContent; for a page created earlier in the active draft use the pageId that operation returned. Returns the block id and the draft branch/seqs. Requires portals.write access.
|
|
62
|
+
*/
|
|
63
|
+
async addPortalChatBlock(params) {
|
|
64
|
+
return this.client.request({
|
|
65
|
+
method: "POST",
|
|
66
|
+
path: "/:orgId/portals/:portalId/pages/:pageId/blocks/chat",
|
|
67
|
+
pathParams: params.path,
|
|
68
|
+
headers: params.headers,
|
|
69
|
+
body: params.body,
|
|
70
|
+
opId: "addPortalChatBlock",
|
|
71
|
+
expectedContentType: "application/json",
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Add an Embeds & Integrations block to a portal page
|
|
76
|
+
* Stages one Customizer-compatible Embed block on an EXISTING portal page — the programmatic equivalent of the customizer's "Embeds & Integrations" action. No new page and no sidebar menu item is created. embedType is one of the 11 chooser variants (custom, youtube, google-drive, ms-doc, calendly, hubspot, airtable, loom, data-studio, figma, miro). For `custom` pass `content` (URL or embed code) and NOT `url`; for every named variant pass `url` and NOT `content` — the service builds the canonical iframe. hubspot here is an iframe Embed block, not a Flexible Block integration brick. For a published page resolve pageId from listPortalContent; for a page created earlier in the active draft use the pageId that operation returned. The block is staged in the portal's customizer draft (not published immediately). Returns the block id and the draft branch/seqs. Requires portals.write access.
|
|
77
|
+
*/
|
|
78
|
+
async addPortalEmbedBlock(params) {
|
|
79
|
+
return this.client.request({
|
|
80
|
+
method: "POST",
|
|
81
|
+
path: "/:orgId/portals/:portalId/pages/:pageId/blocks/embed",
|
|
82
|
+
pathParams: params.path,
|
|
83
|
+
headers: params.headers,
|
|
84
|
+
body: params.body,
|
|
85
|
+
opId: "addPortalEmbedBlock",
|
|
86
|
+
expectedContentType: "application/json",
|
|
87
|
+
});
|
|
88
|
+
}
|
|
44
89
|
/**
|
|
45
90
|
* Add an existing Fusebase note as a block to a portal page
|
|
46
91
|
* Embeds an existing Fusebase note as a content block on an existing portal page (no new page or sidebar item is created). The note must already exist in the portal's workspace and be shared into the portal (e.g. created via createPortalPageWithNote). Pass pageId (the target page node id, obtained from listPortalContent) and noteId. The block is staged in the portal's customizer draft (not published immediately): the portal owner opens the customizer, reviews the pending block, and publishes it. Returns the created block id and the draft branch/seqs. Requires portals.write access.
|
|
@@ -101,6 +146,21 @@ class PortalsApi {
|
|
|
101
146
|
expectedContentType: "application/json",
|
|
102
147
|
});
|
|
103
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Create an empty portal page
|
|
151
|
+
* Creates a new EMPTY sidebar page in the portal — a page node plus its sidebar menu item, with no Fusebase note and no block. The page is staged in the portal's customizer draft (not published immediately): the portal owner opens the customizer, reviews the pending page, and publishes it. Pass parentId to nest the page under an existing published or active-draft folder. The returned pageId can immediately be passed to semantic block operations to add content before publishing. Use createPortalPageWithNote instead when a page backed by a new Fusebase note is wanted. Returns the page/menu-item ids, the page url, and the draft branch/seqs. Requires portals.write access.
|
|
152
|
+
*/
|
|
153
|
+
async createPortalPage(params) {
|
|
154
|
+
return this.client.request({
|
|
155
|
+
method: "POST",
|
|
156
|
+
path: "/:orgId/portals/:portalId/pages",
|
|
157
|
+
pathParams: params.path,
|
|
158
|
+
headers: params.headers,
|
|
159
|
+
body: params.body,
|
|
160
|
+
opId: "createPortalPage",
|
|
161
|
+
expectedContentType: "application/json",
|
|
162
|
+
});
|
|
163
|
+
}
|
|
104
164
|
/**
|
|
105
165
|
* Create a portal page backed by a Fusebase note
|
|
106
166
|
* Creates a new sidebar page in the portal backed by a freshly created Fusebase note. The note is created in the portal's workspace and shared into the portal; optional initial text or html can be appended to it. The page (page node + note menu item + note content block) is staged in the portal's customizer draft (not published immediately): the portal owner opens the customizer, reviews the pending page, and publishes it. Pass parentId to nest the page under an existing folder. Returns the note/page/menu-item ids, the page url, and the draft branch/seqs. Requires portals.write access.
|
|
@@ -190,6 +250,35 @@ class PortalsApi {
|
|
|
190
250
|
expectedContentType: "application/json",
|
|
191
251
|
});
|
|
192
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* List a portal's chat channels for the Chat block picker
|
|
255
|
+
* Lists the real, listable chat channels of a portal so a Chat block can target one by exact id. DMs, group DMs and hidden channels are excluded; the default channel is returned first. ALWAYS call this before addPortalChatBlock with a channel target — never guess a channel id and never assume `general` exists. This is the Chat widget's channel list, distinct from the portal's system chat menu item and the chats-dashboard block. Requires portals.write access.
|
|
256
|
+
*/
|
|
257
|
+
async listPortalChatChannels(params) {
|
|
258
|
+
return this.client.request({
|
|
259
|
+
method: "GET",
|
|
260
|
+
path: "/:orgId/portals/:portalId/chat/channels",
|
|
261
|
+
pathParams: params.path,
|
|
262
|
+
headers: params.headers,
|
|
263
|
+
opId: "listPortalChatChannels",
|
|
264
|
+
expectedContentType: "application/json",
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Search or browse a portal's DM target users for the Chat block picker
|
|
269
|
+
* Searches a portal org's active members + owner by name, username or email so a Chat block can target a DM by exact user id. Call this before addPortalChatBlock with a `dm` target — never guess a user id. `query` is optional: omit it to browse the first bounded page. Returns a single page of { id, displayName, username?, email? }, the matching `total`, and an opaque nextCursor when more pages exist. Show one page at a time and ask before fetching the next; never request or aggregate the full org user list. Requires portals.write access.
|
|
270
|
+
*/
|
|
271
|
+
async listPortalChatUsers(params) {
|
|
272
|
+
return this.client.request({
|
|
273
|
+
method: "GET",
|
|
274
|
+
path: "/:orgId/portals/:portalId/chat/users",
|
|
275
|
+
pathParams: params.path,
|
|
276
|
+
query: params.query,
|
|
277
|
+
headers: params.headers,
|
|
278
|
+
opId: "listPortalChatUsers",
|
|
279
|
+
expectedContentType: "application/json",
|
|
280
|
+
});
|
|
281
|
+
}
|
|
193
282
|
/**
|
|
194
283
|
* List portal content (folders and pages)
|
|
195
284
|
* Returns the menu tree of a portal: folders, note pages, portal pages, and system items. Use this operation to discover existing content before creating new folders or pages. Item types match portal-service values: notesFolder, note, portalPage, home, link, etc. For items of type 'note', the noteId field contains the Fusebase note id. Requires portals.read access.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An access principal on an AI App's features. Mirrors nimbus-ai's
|
|
3
|
+
* `AppAccessPrincipal` (`type` + `id`). `id` is required for
|
|
4
|
+
* user/orgRole/orgGroup and optional (ignored) for visitor.
|
|
5
|
+
*/
|
|
6
|
+
export interface AppAccessPrincipalContract {
|
|
7
|
+
type: "user" | "orgRole" | "orgGroup" | "visitor";
|
|
8
|
+
/**
|
|
9
|
+
* Principal id: the user id, org role name, or org group id. Optional for
|
|
10
|
+
* visitor.
|
|
11
|
+
* @nullable true
|
|
12
|
+
*/
|
|
13
|
+
id?: string | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Request body for removeAppAccessPrincipal. The principal to strip from every
|
|
17
|
+
* feature (App) of the product.
|
|
18
|
+
*/
|
|
19
|
+
export type RemoveAppAccessPrincipalRequestContract = AppAccessPrincipalContract;
|
|
20
|
+
/**
|
|
21
|
+
* Response body for removeAppAccessPrincipal.
|
|
22
|
+
*/
|
|
23
|
+
export interface RemoveAppAccessPrincipalResponseContract {
|
|
24
|
+
/** True when the principal was present on at least one App and removed. */
|
|
25
|
+
removed: boolean;
|
|
26
|
+
/** Number of Apps (features) the principal was removed from. */
|
|
27
|
+
appsAffected: number;
|
|
28
|
+
}
|
|
@@ -37,6 +37,13 @@ export interface CallAppApiRequestContract {
|
|
|
37
37
|
path?: Record<string, string>;
|
|
38
38
|
query?: Record<string, string | number | boolean>;
|
|
39
39
|
body?: unknown;
|
|
40
|
+
/**
|
|
41
|
+
* On-behalf-of: a platform app token (`fbsfeaturetoken` / `x-app-feature-token`)
|
|
42
|
+
* identifying the end user this call runs for. Gate verifies it fail-closed and
|
|
43
|
+
* forwards the resolved user to the runtime as `X-Fusebase-Verified-User-*`
|
|
44
|
+
* headers; the calling identity still governs the operation's access policy.
|
|
45
|
+
*/
|
|
46
|
+
onBehalfOfUserToken?: string;
|
|
40
47
|
}
|
|
41
48
|
export interface CallAppApiResponseContract {
|
|
42
49
|
ok: boolean;
|
|
@@ -19,6 +19,34 @@ export interface CreateAppMagicLinkRequestContract {
|
|
|
19
19
|
* When false, the user must already exist or the call rejects with NotFound.
|
|
20
20
|
*/
|
|
21
21
|
addToAccessPrincipals?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Optional link lifetime in seconds. Omit for the 24h (86400) default.
|
|
24
|
+
* A provided value is clamped server-side to the 3600 (1h)..604800 (7d)
|
|
25
|
+
* range rather than rejected, so a slightly out-of-range value still yields
|
|
26
|
+
* a usable link.
|
|
27
|
+
* `0` or a negative value is NOT "no expiry" and does NOT expire the link
|
|
28
|
+
* immediately — it clamps UP to the 3600 (1h) minimum, so 1h is the
|
|
29
|
+
* shortest lifetime you can create.
|
|
30
|
+
* Whole seconds: a fractional value is floored server-side.
|
|
31
|
+
* @TJS-type integer
|
|
32
|
+
*/
|
|
33
|
+
ttlSeconds?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Opaque app payload (not interpreted by the platform) stored on the link and
|
|
36
|
+
* echoed back byte-for-byte at activation. Use it to bind the link to an
|
|
37
|
+
* app-side entity (e.g. an invitation id) instead of overloading redirectPath.
|
|
38
|
+
* @maxLength 4096
|
|
39
|
+
* @nullable true
|
|
40
|
+
*/
|
|
41
|
+
meta?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Optional child App (feature) globalId the link should target, so a
|
|
44
|
+
* multi-app product can route sign-in per app. The email URL and activation
|
|
45
|
+
* tokens are scoped to this App's host. Omit to fall back to the product's
|
|
46
|
+
* first App (no behavior change).
|
|
47
|
+
* @nullable true
|
|
48
|
+
*/
|
|
49
|
+
appFeatureId?: string | null;
|
|
22
50
|
}
|
|
23
51
|
/**
|
|
24
52
|
* Response body for createAppMagicLink.
|
|
@@ -35,7 +63,8 @@ export interface CreateAppMagicLinkResponseContract {
|
|
|
35
63
|
*/
|
|
36
64
|
magicLinkUrl: string;
|
|
37
65
|
/**
|
|
38
|
-
* Unix timestamp (seconds) when the link expires (createdAt +
|
|
66
|
+
* Unix timestamp (seconds) when the link expires (createdAt + ttlSeconds,
|
|
67
|
+
* defaulting to 24h when ttlSeconds is omitted).
|
|
39
68
|
*/
|
|
40
69
|
expiresAt: number;
|
|
41
70
|
}
|
|
@@ -121,6 +150,12 @@ export interface ActivateAppMagicLinkResponseContract {
|
|
|
121
150
|
* globalId of the resolved app feature whose access the tokens are scoped to.
|
|
122
151
|
*/
|
|
123
152
|
appFeatureId: string;
|
|
153
|
+
/**
|
|
154
|
+
* Opaque app payload supplied when the link was created, echoed back
|
|
155
|
+
* byte-for-byte. Null for links created without `meta` (backward compatible).
|
|
156
|
+
* @nullable true
|
|
157
|
+
*/
|
|
158
|
+
meta?: string | null;
|
|
124
159
|
}
|
|
125
160
|
/**
|
|
126
161
|
* Response body for revokeAppMagicLink.
|
|
@@ -174,6 +209,11 @@ export interface AppMagicLinkSummaryContract {
|
|
|
174
209
|
usedAt?: number | null;
|
|
175
210
|
/** Unix timestamp (seconds) when the link was created. */
|
|
176
211
|
createdAt: number;
|
|
212
|
+
/**
|
|
213
|
+
* Opaque app payload stored on the link, or null when none was supplied.
|
|
214
|
+
* @nullable true
|
|
215
|
+
*/
|
|
216
|
+
meta?: string | null;
|
|
177
217
|
}
|
|
178
218
|
/**
|
|
179
219
|
* Response body for listAppMagicLinks (support/debug).
|
|
@@ -201,6 +241,31 @@ export interface BulkAppMagicLinkInvitationContract {
|
|
|
201
241
|
* When false, the user must already exist or the invite fails with NotFound.
|
|
202
242
|
*/
|
|
203
243
|
addToAccessPrincipals?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Optional link lifetime in seconds. Omit for the 24h (86400) default.
|
|
246
|
+
* A provided value is clamped server-side to the 3600 (1h)..604800 (7d)
|
|
247
|
+
* range rather than rejected.
|
|
248
|
+
* `0` or a negative value is NOT "no expiry" and does NOT expire the link
|
|
249
|
+
* immediately — it clamps UP to the 3600 (1h) minimum, so 1h is the
|
|
250
|
+
* shortest lifetime you can create.
|
|
251
|
+
* Whole seconds: a fractional value is floored server-side.
|
|
252
|
+
* @TJS-type integer
|
|
253
|
+
*/
|
|
254
|
+
ttlSeconds?: number;
|
|
255
|
+
/**
|
|
256
|
+
* Opaque app payload (not interpreted by the platform) stored on the link and
|
|
257
|
+
* echoed back byte-for-byte at activation.
|
|
258
|
+
* @maxLength 4096
|
|
259
|
+
* @nullable true
|
|
260
|
+
*/
|
|
261
|
+
meta?: string | null;
|
|
262
|
+
/**
|
|
263
|
+
* Optional child App (feature) globalId the link should target, so a
|
|
264
|
+
* multi-app product can route sign-in per app. Omit to fall back to the
|
|
265
|
+
* product's first App (no behavior change).
|
|
266
|
+
* @nullable true
|
|
267
|
+
*/
|
|
268
|
+
appFeatureId?: string | null;
|
|
204
269
|
}
|
|
205
270
|
export interface BulkCreateAppMagicLinksRequestContract {
|
|
206
271
|
/** Users to invite to the app in a single call. */
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export interface OrgEmailSendRequestContract {
|
|
2
2
|
subject: string;
|
|
3
|
+
/**
|
|
4
|
+
* Email body as HTML or plain text. Bare URLs are auto-linked and the
|
|
5
|
+
* content is sanitized before delivery. Sent through the unbranded app
|
|
6
|
+
* layout with a noreply sender — no FuseBase logo, footer, or branding.
|
|
7
|
+
*/
|
|
3
8
|
body: string;
|
|
4
9
|
/**
|
|
5
10
|
* Recipient user id or email.
|
|
@@ -8,16 +13,6 @@ export interface OrgEmailSendRequestContract {
|
|
|
8
13
|
* The resolved user must already belong to the organization.
|
|
9
14
|
*/
|
|
10
15
|
recipient: string;
|
|
11
|
-
/**
|
|
12
|
-
* Optional variables that the mail rendering layer may use.
|
|
13
|
-
* Currently accepted for forward compatibility and not yet applied during sending.
|
|
14
|
-
*/
|
|
15
|
-
variables?: Record<string, string>;
|
|
16
|
-
/**
|
|
17
|
-
* Optional link variables that the mail rendering layer may use.
|
|
18
|
-
* Currently accepted for forward compatibility and not yet applied during sending.
|
|
19
|
-
*/
|
|
20
|
-
links?: Record<string, string>;
|
|
21
16
|
}
|
|
22
17
|
export interface OrgEmailSendResponseContract {
|
|
23
18
|
requestId: string;
|
|
@@ -68,6 +68,21 @@ export interface FusebaseAuthConflictErrorBodyContract {
|
|
|
68
68
|
upstreamErrorCode?: number;
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Body returned with HTTP 401 when auth-form rejects the supplied credentials
|
|
73
|
+
* or challenge answer. `data.errorCode` says which:
|
|
74
|
+
* `fusebase_auth_invalid_credentials` (wrong email/password — do not retry),
|
|
75
|
+
* `fusebase_auth_challenge_failed` (wrong verification code — re-prompt) or
|
|
76
|
+
* `fusebase_auth_challenge_expired` (restart the sign-in).
|
|
77
|
+
*/
|
|
78
|
+
export interface FusebaseAuthUnauthorizedErrorBodyContract {
|
|
79
|
+
success: false;
|
|
80
|
+
message: string;
|
|
81
|
+
data: {
|
|
82
|
+
code: string;
|
|
83
|
+
errorCode: string;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
71
86
|
export interface FusebaseAuthLoginRequestContract {
|
|
72
87
|
/**
|
|
73
88
|
* User email. Forwarded to auth-form as `login`.
|
|
@@ -101,13 +116,42 @@ export interface FusebaseAuthPasswordRestoreRequestContract {
|
|
|
101
116
|
* @format email
|
|
102
117
|
*/
|
|
103
118
|
email: string;
|
|
104
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Portal white-label branding. When BOTH `portalId` and `workspaceId` are set,
|
|
121
|
+
* user-service switches to portal branding: it resolves the portal domain
|
|
122
|
+
* itself, uses the portal name, and sends the `restore_portal_password`
|
|
123
|
+
* template instead of the default one.
|
|
124
|
+
*/
|
|
105
125
|
portalId?: string;
|
|
106
126
|
workspaceId?: string;
|
|
107
127
|
}
|
|
108
128
|
export interface FusebaseAuthPasswordRestoreResponseContract {
|
|
109
129
|
ok: true;
|
|
110
130
|
}
|
|
131
|
+
export interface FusebaseAuthRestoreKeyRequestContract {
|
|
132
|
+
/**
|
|
133
|
+
* User email whose password-restore key to mint.
|
|
134
|
+
* @format email
|
|
135
|
+
*/
|
|
136
|
+
email: string;
|
|
137
|
+
}
|
|
138
|
+
export interface FusebaseAuthRestoreKeyResponseContract {
|
|
139
|
+
/**
|
|
140
|
+
* Raw restore key. Passes `checkFusebasePasswordRestoreKey` /
|
|
141
|
+
* `resetFusebasePassword`. Not bound to any URL — an app hosting its own reset
|
|
142
|
+
* page puts this key wherever it likes and reads it back from there.
|
|
143
|
+
*/
|
|
144
|
+
key: string;
|
|
145
|
+
/**
|
|
146
|
+
* Reset link on the platform auth-form page,
|
|
147
|
+
* `https://app.<fusebase-host>/auth/?f=resetpass&key=<key>&parentOrigin=`.
|
|
148
|
+
* Use it when the app has no reset page of its own; it saves callers from
|
|
149
|
+
* hardcoding the per-environment host.
|
|
150
|
+
*/
|
|
151
|
+
platformResetUrl: string;
|
|
152
|
+
/** Session expiry as a Unix epoch in milliseconds. */
|
|
153
|
+
expiresAt: number;
|
|
154
|
+
}
|
|
111
155
|
export interface FusebaseAuthPasswordRestoreKeyResponseContract {
|
|
112
156
|
valid: boolean;
|
|
113
157
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,22 +5,23 @@
|
|
|
5
5
|
* Generated by SDK codegen
|
|
6
6
|
*/
|
|
7
7
|
export type { AuthenticatedUserSummaryContract, MyOrgAccessResponseContract } from "./access/access";
|
|
8
|
+
export type { AppAccessPrincipalContract, RemoveAppAccessPrincipalRequestContract, RemoveAppAccessPrincipalResponseContract } from "./app-access-principal/app-access-principal";
|
|
8
9
|
export type { AppApiOperationContract, AppApiOperationListResponseContract, CallAppApiRequestContract, CallAppApiResponseContract, PublishedAppContract, PublishedAppListResponseContract, VerifyAppApiContractsRequestContract, VerifyAppApiContractsResponseContract, VerifyCaseResultContract } from "./app-api/app-api";
|
|
9
10
|
export type { AppPortalEmbedContract, ListAppPortalEmbedsResponseContract } from "./app-embed-targets/app-embed-targets";
|
|
10
11
|
export type { ActivateAppMagicLinkResponseContract, AppMagicLinkSummaryContract, BulkAppMagicLinkInvitationContract, BulkAppMagicLinkResultItemContract, BulkCreateAppMagicLinksRequestContract, BulkCreateAppMagicLinksResponseContract, CreateAppClientInviteRequestContract, CreateAppMagicLinkRequestContract, CreateAppMagicLinkResponseContract, ListAppMagicLinksResponseContract, RequestAppMagicLinkRequestContract, RequestAppMagicLinkResponseContract, RevokeAppMagicLinkResponseContract } from "./app-magic-link/app-magic-link";
|
|
11
12
|
export * from "./billing/billing";
|
|
12
13
|
export type { OrgEmailSendRequestContract, OrgEmailSendResponseContract } from "./email/email";
|
|
13
14
|
export * from "./file/file";
|
|
14
|
-
export type { FusebaseAuthChallengeContract, FusebaseAuthChallengeRequestContract, FusebaseAuthChallengeResponseContract, FusebaseAuthConflictErrorBodyContract, FusebaseAuthLoginRequestContract, FusebaseAuthLoginResponseContract, FusebaseAuthLogoutResponseContract, FusebaseAuthPasswordResetRequestContract, FusebaseAuthPasswordResetResponseContract, FusebaseAuthPasswordRestoreKeyResponseContract, FusebaseAuthPasswordRestoreRequestContract, FusebaseAuthPasswordRestoreResponseContract, FusebaseAuthRegisterMemberRequestContract, FusebaseAuthRegisterMemberResponseContract, FusebaseAuthRegisterRequestContract, FusebaseAuthRegisterResponseContract, FusebaseAuthSessionContract } from "./fusebase-auth/fusebase-auth";
|
|
15
|
+
export type { FusebaseAuthChallengeContract, FusebaseAuthChallengeRequestContract, FusebaseAuthChallengeResponseContract, FusebaseAuthConflictErrorBodyContract, FusebaseAuthLoginRequestContract, FusebaseAuthLoginResponseContract, FusebaseAuthLogoutResponseContract, FusebaseAuthPasswordResetRequestContract, FusebaseAuthPasswordResetResponseContract, FusebaseAuthPasswordRestoreKeyResponseContract, FusebaseAuthPasswordRestoreRequestContract, FusebaseAuthPasswordRestoreResponseContract, FusebaseAuthRegisterMemberRequestContract, FusebaseAuthRegisterMemberResponseContract, FusebaseAuthRegisterRequestContract, FusebaseAuthRegisterResponseContract, FusebaseAuthRestoreKeyRequestContract, FusebaseAuthRestoreKeyResponseContract, FusebaseAuthSessionContract, FusebaseAuthUnauthorizedErrorBodyContract } from "./fusebase-auth/fusebase-auth";
|
|
15
16
|
export * from "./isolated-store/isolated-store";
|
|
16
17
|
export * from "./mcp-manager/mcp-manager";
|
|
17
18
|
export type { MeAuthContract, MeOrgGroupContract, MePreferencesContract, MeResponseContract, MeScopeContract, MeUserContract } from "./me/me";
|
|
18
19
|
export * from "./note/note";
|
|
19
20
|
export * from "./org-group/org-group";
|
|
20
|
-
export type { ClientAccountScheduledDeletionRequestContract, ClientAccountScheduledDeletionResponseContract, CreateWorkspaceRequestContract, OrgInviteContract, OrgMagicLinkContract, OrgMemberRemoveResponseContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserIdInPathRequired, OrgUserListResponseContract, OrgUserWorkspaceIdInPathRequired, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract, OrgWorkspaceMemberListResponseContract, WorkspaceMemberRemoveResponseContract } from "./org-user/org-user";
|
|
21
|
+
export type { ClientAccountScheduledDeletionRequestContract, ClientAccountScheduledDeletionResponseContract, CreateWorkspaceRequestContract, OrgInviteContract, OrgMagicLinkContract, OrgMemberExpectedJoinedAfterInQueryOptional, OrgMemberExpectedRoleInQueryOptional, OrgMemberRemoveResponseContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserIdInPathRequired, OrgUserListResponseContract, OrgUserWorkspaceIdInPathRequired, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract, OrgWorkspaceMemberListResponseContract, WorkspaceMemberRemoveResponseContract } from "./org-user/org-user";
|
|
21
22
|
export * from "./orgs/orgs";
|
|
22
23
|
export type { VerifyPortalFeatureContextTokenRequestContract, VerifyPortalFeatureContextTokenResponseContract } from "./portal-feature-context/portal-feature-context";
|
|
23
|
-
export type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalBlockRequestContract, AddPortalBlockResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, BulkInviteResultItemContract, BulkInviteToPortalRequestContract, BulkInviteToPortalResponseContract, BulkPortalInvitationContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalContentResponseContract, PortalContentItemContract, PortalDetailContract, PublishPortalDraftResponseContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract, globalIdInPathRequired } from "./portals/portals";
|
|
24
|
+
export type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalBlankNoteBlockRequestContract, AddPortalBlankNoteBlockResponseContract, AddPortalBlockRequestContract, AddPortalBlockResponseContract, AddPortalChatBlockRequestContract, AddPortalChatBlockResponseContract, AddPortalEmbedBlockRequestContract, AddPortalEmbedBlockResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, BulkInviteResultItemContract, BulkInviteToPortalRequestContract, BulkInviteToPortalResponseContract, BulkPortalInvitationContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageRequestContract, CreatePortalPageResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalChatChannelsResponseContract, ListPortalChatUsersResponseContract, ListPortalContentResponseContract, PortalChatChannelContract, PortalChatUserContract, PortalContentItemContract, PortalDetailContract, PublishPortalDraftResponseContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract, globalIdInPathRequired } from "./portals/portals";
|
|
24
25
|
export * from "./shared/common";
|
|
25
26
|
export * from "./shared/enums";
|
|
26
27
|
export type { GetHealth200ResponseContract } from "./shared/health";
|
|
@@ -143,6 +143,33 @@ export interface WorkspaceNoteAttachmentContract {
|
|
|
143
143
|
export interface AddWorkspaceNoteAttachmentResponseContract {
|
|
144
144
|
attachment: WorkspaceNoteAttachmentContract;
|
|
145
145
|
}
|
|
146
|
+
export interface AddWorkspaceMarkdownNoteAttachmentRequestContract {
|
|
147
|
+
/**
|
|
148
|
+
* Stored-file UUID returned by completeMultipartFileUpload.
|
|
149
|
+
*/
|
|
150
|
+
storedFileUUID: string;
|
|
151
|
+
/**
|
|
152
|
+
* Alt text for image attachments / link text for other files. Defaults to
|
|
153
|
+
* the attachment display name.
|
|
154
|
+
*/
|
|
155
|
+
alt?: string | null;
|
|
156
|
+
}
|
|
157
|
+
export interface AddWorkspaceMarkdownNoteAttachmentResponseContract {
|
|
158
|
+
attachment: WorkspaceNoteAttachmentContract;
|
|
159
|
+
/**
|
|
160
|
+
* Canonical attachment URL. Use it as-is inside the note markdown.
|
|
161
|
+
*/
|
|
162
|
+
url: string;
|
|
163
|
+
/**
|
|
164
|
+
* Markdown snippet that was appended to the note: an image for image
|
|
165
|
+
* attachments, a link for everything else.
|
|
166
|
+
*/
|
|
167
|
+
markdown: string;
|
|
168
|
+
/**
|
|
169
|
+
* The note after the append, including its new revision.
|
|
170
|
+
*/
|
|
171
|
+
note: WorkspaceMarkdownNoteContract;
|
|
172
|
+
}
|
|
146
173
|
export declare const WorkspaceNoteContentFormatContract: {
|
|
147
174
|
readonly Text: "text";
|
|
148
175
|
readonly Html: "html";
|
|
@@ -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
|
package/package.json
CHANGED
package/release-notes/latest.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Release Notes 2.3.34-sdk.
|
|
1
|
+
# Release Notes 2.3.34-sdk.10
|
|
2
2
|
|
|
3
3
|
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.3.34-sdk.
|
|
5
|
-
- Generated at: 2026-07-
|
|
4
|
+
- Previous tag: `v2.3.34-sdk.10`
|
|
5
|
+
- Generated at: 2026-07-27T04:42:43.276Z
|
|
6
6
|
|
|
7
7
|
## Included Drafts
|
|
8
8
|
|