@fusebase/fusebase-gate-sdk 2.3.11 → 2.3.12
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/PortalsApi.d.ts +13 -1
- package/dist/apis/PortalsApi.js +15 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/portals/portals.d.ts +60 -0
- package/package.json +1 -1
- package/release-notes/2.3.12.md +53 -0
- package/release-notes/latest.md +48 -4
- package/release-notes/2.3.11.md +0 -9
- package/release-notes/2.3.5-sdk.8.md +0 -9
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: portals
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, globalIdInPathRequired, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalContentResponseContract, orgIdInPathRequired, OrgPortalListResponseContract, PortalDetailContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract } from "../types";
|
|
8
|
+
import type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, BulkInviteToPortalRequestContract, BulkInviteToPortalResponseContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, globalIdInPathRequired, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalContentResponseContract, orgIdInPathRequired, OrgPortalListResponseContract, PortalDetailContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract } from "../types";
|
|
9
9
|
export declare class PortalsApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -33,6 +33,18 @@ export declare class PortalsApi {
|
|
|
33
33
|
headers?: Record<string, string>;
|
|
34
34
|
body: AddPortalNoteBlockRequestContract;
|
|
35
35
|
}): Promise<AddPortalNoteBlockResponseContract>;
|
|
36
|
+
/**
|
|
37
|
+
* Invite multiple users to a portal in one call
|
|
38
|
+
* Invites a batch of users to a single portal in one request, replacing N sequential inviteToPortal calls. Portal discovery (listPortals/getPortal) runs once for the whole batch. Invites are processed with bounded concurrency (default 5, max 5); the rest are queued. With background=false (default) the response waits for all invites and returns aggregated per-invitation results (status='completed'). With background=true the response returns immediately (status='processing') and invites run in the background without blocking the caller. Per-invitation orgRole/isFullAccess semantics match inviteToPortal. Invarian — before calling for client invites (orgRole='client' or unspecified): ALWAYS ask the user 'Full access (all pages) or Shared only (public pages)?' and wait for their answer.
|
|
39
|
+
*/
|
|
40
|
+
bulkInviteToPortal(params: {
|
|
41
|
+
path: {
|
|
42
|
+
orgId: orgIdInPathRequired;
|
|
43
|
+
portalId: globalIdInPathRequired;
|
|
44
|
+
};
|
|
45
|
+
headers?: Record<string, string>;
|
|
46
|
+
body: BulkInviteToPortalRequestContract;
|
|
47
|
+
}): Promise<BulkInviteToPortalResponseContract>;
|
|
36
48
|
/**
|
|
37
49
|
* Create a new portal
|
|
38
50
|
* Creates a new portal under the given org and workspace. Optionally pass accessMode to set the initial access mode at creation: 'open' (anyone), 'invite-only' (invited users only), 'email' (visitor enters an email, no verification), or 'email-verified' (email with confirmation); when omitted the portal keeps the template's default access. Returns portal details and one-time admin credentials for the portal customizer. Requires org.write and org access.
|
package/dist/apis/PortalsApi.js
CHANGED
|
@@ -41,6 +41,21 @@ class PortalsApi {
|
|
|
41
41
|
expectedContentType: "application/json",
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Invite multiple users to a portal in one call
|
|
46
|
+
* Invites a batch of users to a single portal in one request, replacing N sequential inviteToPortal calls. Portal discovery (listPortals/getPortal) runs once for the whole batch. Invites are processed with bounded concurrency (default 5, max 5); the rest are queued. With background=false (default) the response waits for all invites and returns aggregated per-invitation results (status='completed'). With background=true the response returns immediately (status='processing') and invites run in the background without blocking the caller. Per-invitation orgRole/isFullAccess semantics match inviteToPortal. Invarian — before calling for client invites (orgRole='client' or unspecified): ALWAYS ask the user 'Full access (all pages) or Shared only (public pages)?' and wait for their answer.
|
|
47
|
+
*/
|
|
48
|
+
async bulkInviteToPortal(params) {
|
|
49
|
+
return this.client.request({
|
|
50
|
+
method: "POST",
|
|
51
|
+
path: "/:orgId/portals/:portalId/invite/bulk",
|
|
52
|
+
pathParams: params.path,
|
|
53
|
+
headers: params.headers,
|
|
54
|
+
body: params.body,
|
|
55
|
+
opId: "bulkInviteToPortal",
|
|
56
|
+
expectedContentType: "application/json",
|
|
57
|
+
});
|
|
58
|
+
}
|
|
44
59
|
/**
|
|
45
60
|
* Create a new portal
|
|
46
61
|
* Creates a new portal under the given org and workspace. Optionally pass accessMode to set the initial access mode at creation: 'open' (anyone), 'invite-only' (invited users only), 'email' (visitor enters an email, no verification), or 'email-verified' (email with confirmation); when omitted the portal keeps the template's default access. Returns portal details and one-time admin credentials for the portal customizer. Requires org.write and org access.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export * from "./org-group/org-group";
|
|
|
20
20
|
export type { CreateWorkspaceRequestContract, OrgInviteContract, OrgMagicLinkContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserListResponseContract, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract } from "./org-user/org-user";
|
|
21
21
|
export * from "./orgs/orgs";
|
|
22
22
|
export type { VerifyPortalFeatureContextTokenRequestContract, VerifyPortalFeatureContextTokenResponseContract } from "./portal-feature-context/portal-feature-context";
|
|
23
|
-
export type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalContentResponseContract, PortalContentItemContract, PortalDetailContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract, globalIdInPathRequired } from "./portals/portals";
|
|
23
|
+
export type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, BulkInviteResultItemContract, BulkInviteToPortalRequestContract, BulkInviteToPortalResponseContract, BulkPortalInvitationContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalContentResponseContract, PortalContentItemContract, PortalDetailContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract, globalIdInPathRequired } from "./portals/portals";
|
|
24
24
|
export * from "./shared/common";
|
|
25
25
|
export * from "./shared/enums";
|
|
26
26
|
export type { GetHealth200ResponseContract } from "./shared/health";
|
|
@@ -266,6 +266,66 @@ export interface InviteToPortalResponseContract {
|
|
|
266
266
|
/** User ID in the system. */
|
|
267
267
|
userId: number;
|
|
268
268
|
}
|
|
269
|
+
/** A single invitee in a bulk portal invite request. */
|
|
270
|
+
export interface BulkPortalInvitationContract {
|
|
271
|
+
email: string;
|
|
272
|
+
fullName?: string;
|
|
273
|
+
/** Org role for the invitee (default: "client"). */
|
|
274
|
+
orgRole?: "client" | "member" | "manager";
|
|
275
|
+
/** Workspace role (default: "editor"). */
|
|
276
|
+
workspaceRole?: "reader" | "editor";
|
|
277
|
+
/**
|
|
278
|
+
* Only relevant when orgRole="client".
|
|
279
|
+
* true = Full access (all pages, default). false = Shared only (public pages).
|
|
280
|
+
* Always full access for "member"/"manager".
|
|
281
|
+
*/
|
|
282
|
+
isFullAccess?: boolean;
|
|
283
|
+
}
|
|
284
|
+
export interface BulkInviteToPortalRequestContract {
|
|
285
|
+
/** Users to invite to the portal in a single call. */
|
|
286
|
+
invitations: BulkPortalInvitationContract[];
|
|
287
|
+
/**
|
|
288
|
+
* Max number of invites processed in parallel.
|
|
289
|
+
* Default 5, clamped to the 1..5 range; the rest are queued.
|
|
290
|
+
*/
|
|
291
|
+
concurrency?: number;
|
|
292
|
+
/**
|
|
293
|
+
* When true, respond immediately ("processing") and run the invites in the
|
|
294
|
+
* background without blocking the caller. Default false: wait for all invites
|
|
295
|
+
* and return aggregated per-invitation results ("completed").
|
|
296
|
+
*/
|
|
297
|
+
background?: boolean;
|
|
298
|
+
}
|
|
299
|
+
/** Per-invitation outcome in a completed bulk invite. */
|
|
300
|
+
export interface BulkInviteResultItemContract {
|
|
301
|
+
email: string;
|
|
302
|
+
status: "success" | "error";
|
|
303
|
+
/** Present on success. Magic link for direct portal access. */
|
|
304
|
+
magicLink?: string;
|
|
305
|
+
/** Present on success. Portal URL. */
|
|
306
|
+
url?: string;
|
|
307
|
+
/** Present on success. User ID in the system. */
|
|
308
|
+
userId?: number;
|
|
309
|
+
/** Present on error. Failure reason. */
|
|
310
|
+
error?: string;
|
|
311
|
+
}
|
|
312
|
+
export interface BulkInviteToPortalResponseContract {
|
|
313
|
+
/** Total number of invitations received. */
|
|
314
|
+
total: number;
|
|
315
|
+
/**
|
|
316
|
+
* "completed" — invites finished synchronously, `results` is populated.
|
|
317
|
+
* "processing" — invites accepted and running in the background.
|
|
318
|
+
*/
|
|
319
|
+
status: "completed" | "processing";
|
|
320
|
+
/** Background mode only: number of invitations accepted for processing. */
|
|
321
|
+
accepted?: number;
|
|
322
|
+
/** Completed mode only: count of successful invites. */
|
|
323
|
+
succeeded?: number;
|
|
324
|
+
/** Completed mode only: count of failed invites. */
|
|
325
|
+
failed?: number;
|
|
326
|
+
/** Completed mode only: per-invitation results, in request order. */
|
|
327
|
+
results?: BulkInviteResultItemContract[];
|
|
328
|
+
}
|
|
269
329
|
export interface InvitePortalManagerRequestContract {
|
|
270
330
|
/** Email of the user to invite as a portal manager. */
|
|
271
331
|
email: string;
|
package/package.json
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Release Notes 2.3.12
|
|
2
|
+
|
|
3
|
+
- Current ref: `HEAD`
|
|
4
|
+
- Previous tag: `v2.3.12`
|
|
5
|
+
- Generated at: 2026-06-29T08:59:27.274Z
|
|
6
|
+
|
|
7
|
+
## Included Drafts
|
|
8
|
+
|
|
9
|
+
- `docs/release-notes/2026-06-16-bulk-invite-to-portal.md` - Bulk invite users to a portal
|
|
10
|
+
|
|
11
|
+
## Summary
|
|
12
|
+
|
|
13
|
+
### Bulk invite users to a portal
|
|
14
|
+
|
|
15
|
+
Gate exposes `POST /:orgId/portals/:portalId/invite/bulk` (`bulkInviteToPortal`) to invite many users to a single portal in one request, replacing N sequential `inviteToPortal` calls. Invites run with bounded concurrency (default 5, max 5); the rest are queued. Portal discovery (`listPortals`/`getPortal`) runs once for the whole batch. An optional `background` mode returns immediately without blocking the caller.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## API / SDK Changes
|
|
19
|
+
|
|
20
|
+
### Bulk invite users to a portal
|
|
21
|
+
|
|
22
|
+
- Added `bulkInviteToPortal` operation and `PortalsApi.bulkInviteToPortal` SDK client method.
|
|
23
|
+
- Request: `invitations[]` (each item matches `inviteToPortal`: `email` required; optional `fullName`, `orgRole`, `workspaceRole`, `isFullAccess`), optional `concurrency` (1..5, default 5), optional `background` (default false).
|
|
24
|
+
- Response: `total`, `status` (`completed` | `processing`). For `completed`: `succeeded`, `failed`, `results[]` (`{ email, status, magicLink?, url?, userId?, error? }`). For `processing`: `accepted`.
|
|
25
|
+
- Per-invitation `orgRole`/`isFullAccess` semantics are identical to `inviteToPortal` (shared `invitePortalUser` helper).
|
|
26
|
+
- Permission: `portals.manage` with org-scoped authz (same as `inviteToPortal`).
|
|
27
|
+
- MCP: `bulkInviteToPortal` is MCP-visible under the `portals` prompt group; the prompt now documents batching, concurrency, background mode, and the client access-clarification rule.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Consumer Impact
|
|
31
|
+
|
|
32
|
+
### Bulk invite users to a portal
|
|
33
|
+
|
|
34
|
+
- App agents inviting several clients can issue one call instead of N blocking sequential requests.
|
|
35
|
+
- Single `inviteToPortal` is unchanged; behavior and response shape are preserved.
|
|
36
|
+
- Failures are isolated per invitee in `completed` mode — a single bad invite does not fail the batch.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Verification
|
|
40
|
+
|
|
41
|
+
### Bulk invite users to a portal
|
|
42
|
+
|
|
43
|
+
- `npm test -- tests/unit/portals-bulk-invite-controller.test.ts tests/unit/concurrency.test.ts tests/unit/portals-controller.test.ts`
|
|
44
|
+
- `npm run build`
|
|
45
|
+
- `npm run build:sdk`
|
|
46
|
+
- `npm run mcp:skills:generate` (validate blocked locally: `skills-ref` Python module unavailable in this environment)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Follow-ups
|
|
50
|
+
|
|
51
|
+
### Bulk invite users to a portal
|
|
52
|
+
|
|
53
|
+
- Background mode is fire-and-forget within the request pod; if durable retry/observability is later required, move bulk processing to a worker/queue.
|
package/release-notes/latest.md
CHANGED
|
@@ -1,9 +1,53 @@
|
|
|
1
|
-
# Release Notes 2.3.
|
|
1
|
+
# Release Notes 2.3.12
|
|
2
2
|
|
|
3
3
|
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.3.
|
|
5
|
-
- Generated at: 2026-06-
|
|
4
|
+
- Previous tag: `v2.3.12`
|
|
5
|
+
- Generated at: 2026-06-29T08:59:27.274Z
|
|
6
6
|
|
|
7
7
|
## Included Drafts
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- `docs/release-notes/2026-06-16-bulk-invite-to-portal.md` - Bulk invite users to a portal
|
|
10
|
+
|
|
11
|
+
## Summary
|
|
12
|
+
|
|
13
|
+
### Bulk invite users to a portal
|
|
14
|
+
|
|
15
|
+
Gate exposes `POST /:orgId/portals/:portalId/invite/bulk` (`bulkInviteToPortal`) to invite many users to a single portal in one request, replacing N sequential `inviteToPortal` calls. Invites run with bounded concurrency (default 5, max 5); the rest are queued. Portal discovery (`listPortals`/`getPortal`) runs once for the whole batch. An optional `background` mode returns immediately without blocking the caller.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## API / SDK Changes
|
|
19
|
+
|
|
20
|
+
### Bulk invite users to a portal
|
|
21
|
+
|
|
22
|
+
- Added `bulkInviteToPortal` operation and `PortalsApi.bulkInviteToPortal` SDK client method.
|
|
23
|
+
- Request: `invitations[]` (each item matches `inviteToPortal`: `email` required; optional `fullName`, `orgRole`, `workspaceRole`, `isFullAccess`), optional `concurrency` (1..5, default 5), optional `background` (default false).
|
|
24
|
+
- Response: `total`, `status` (`completed` | `processing`). For `completed`: `succeeded`, `failed`, `results[]` (`{ email, status, magicLink?, url?, userId?, error? }`). For `processing`: `accepted`.
|
|
25
|
+
- Per-invitation `orgRole`/`isFullAccess` semantics are identical to `inviteToPortal` (shared `invitePortalUser` helper).
|
|
26
|
+
- Permission: `portals.manage` with org-scoped authz (same as `inviteToPortal`).
|
|
27
|
+
- MCP: `bulkInviteToPortal` is MCP-visible under the `portals` prompt group; the prompt now documents batching, concurrency, background mode, and the client access-clarification rule.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Consumer Impact
|
|
31
|
+
|
|
32
|
+
### Bulk invite users to a portal
|
|
33
|
+
|
|
34
|
+
- App agents inviting several clients can issue one call instead of N blocking sequential requests.
|
|
35
|
+
- Single `inviteToPortal` is unchanged; behavior and response shape are preserved.
|
|
36
|
+
- Failures are isolated per invitee in `completed` mode — a single bad invite does not fail the batch.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Verification
|
|
40
|
+
|
|
41
|
+
### Bulk invite users to a portal
|
|
42
|
+
|
|
43
|
+
- `npm test -- tests/unit/portals-bulk-invite-controller.test.ts tests/unit/concurrency.test.ts tests/unit/portals-controller.test.ts`
|
|
44
|
+
- `npm run build`
|
|
45
|
+
- `npm run build:sdk`
|
|
46
|
+
- `npm run mcp:skills:generate` (validate blocked locally: `skills-ref` Python module unavailable in this environment)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Follow-ups
|
|
50
|
+
|
|
51
|
+
### Bulk invite users to a portal
|
|
52
|
+
|
|
53
|
+
- Background mode is fire-and-forget within the request pod; if durable retry/observability is later required, move bulk processing to a worker/queue.
|
package/release-notes/2.3.11.md
DELETED