@fusebase/fusebase-gate-sdk 2.3.11 → 2.3.13-sdk.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ export declare class AppEmbedTargetsApi {
11
11
  constructor(client: Client);
12
12
  /**
13
13
  * List an app's portal embeds
14
- * Returns the portal pages in the organization where the given app is embedded (as an app-feature brick). One entry per page, each with the portal name, page title, and a ready-to-use page URL. Org-scoped by design (per spec); workspace-level access enforcement is portal-service's responsibility. Requires portals.read access.
14
+ * Returns the portal pages in the organization where the given app is embedded (as an app-feature brick or via a regular embed/iframe block pointing at the app host). One entry per page, each with the portal name, page title, a ready-to-use page URL, and a `kind` of 'app-feature' or 'iframe' (app-feature wins when a page has both). Org-scoped by design (per spec); workspace-level access enforcement is portal-service's responsibility. Requires portals.read access.
15
15
  */
16
16
  listAppPortalEmbeds(params: {
17
17
  path: {
@@ -13,7 +13,7 @@ class AppEmbedTargetsApi {
13
13
  }
14
14
  /**
15
15
  * List an app's portal embeds
16
- * Returns the portal pages in the organization where the given app is embedded (as an app-feature brick). One entry per page, each with the portal name, page title, and a ready-to-use page URL. Org-scoped by design (per spec); workspace-level access enforcement is portal-service's responsibility. Requires portals.read access.
16
+ * Returns the portal pages in the organization where the given app is embedded (as an app-feature brick or via a regular embed/iframe block pointing at the app host). One entry per page, each with the portal name, page title, a ready-to-use page URL, and a `kind` of 'app-feature' or 'iframe' (app-feature wins when a page has both). Org-scoped by design (per spec); workspace-level access enforcement is portal-service's responsibility. Requires portals.read access.
17
17
  */
18
18
  async listAppPortalEmbeds(params) {
19
19
  return this.client.request({
@@ -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.
@@ -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.
@@ -9,6 +9,12 @@ export interface AppPortalEmbedContract {
9
9
  };
10
10
  /** Ready-to-use URL of the portal page where the app is embedded. */
11
11
  url: string;
12
+ /**
13
+ * How the app is embedded on the page: as a first-class `app-feature` brick or
14
+ * via a regular `embed` (iframe) block whose `contentUrl` points at the app
15
+ * host. When a page matches both, `app-feature` wins (brick precedence).
16
+ */
17
+ kind: "app-feature" | "iframe";
12
18
  }
13
19
  export interface ListAppPortalEmbedsResponseContract {
14
20
  /** One entry per portal page where the app is embedded. */
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.3.11",
3
+ "version": "2.3.13-sdk.0",
4
4
  "description": "TypeScript SDK for Fusebase Gate APIs - Generated from contract introspection",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -0,0 +1,9 @@
1
+ # Release Notes 2.3.13-sdk.0
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.3.13-sdk.0`
5
+ - Generated at: 2026-06-29T09:25:21.413Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -1,8 +1,8 @@
1
- # Release Notes 2.3.11
1
+ # Release Notes 2.3.13-sdk.0
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.3.11`
5
- - Generated at: 2026-06-26T10:53:55.284Z
4
+ - Previous tag: `v2.3.13-sdk.0`
5
+ - Generated at: 2026-06-29T09:25:21.413Z
6
6
 
7
7
  ## Included Drafts
8
8
 
@@ -1,9 +0,0 @@
1
- # Release Notes 2.3.11
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.3.11`
5
- - Generated at: 2026-06-26T10:53:55.284Z
6
-
7
- ## Included Drafts
8
-
9
- - None
@@ -1,9 +0,0 @@
1
- # Release Notes 2.3.5-sdk.8
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.3.5-sdk.7`
5
- - Generated at: 2026-06-24T15:04:43.797Z
6
-
7
- ## Included Drafts
8
-
9
- - None