@fusebase/fusebase-gate-sdk 2.2.21-sdk.2 → 2.2.21-sdk.4

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.
@@ -5,7 +5,7 @@
5
5
  * Domain: portals
6
6
  */
7
7
  import type { Client } from "../runtime/transport";
8
- import type { CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalRequestContract, globalIdInPathRequired, orgIdInPathRequired, OrgPortalListResponseContract, PortalDetailContract } from "../types";
8
+ import type { CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalRequestContract, globalIdInPathRequired, InviteToPortalRequestContract, InviteToPortalResponseContract, orgIdInPathRequired, OrgPortalListResponseContract, PortalDetailContract } from "../types";
9
9
  export declare class PortalsApi {
10
10
  private client;
11
11
  constructor(client: Client);
@@ -43,6 +43,18 @@ export declare class PortalsApi {
43
43
  };
44
44
  headers?: Record<string, string>;
45
45
  }): Promise<PortalDetailContract>;
46
+ /**
47
+ * Invite a user to a portal
48
+ * Invites a user (client, member, or manager) to a portal via a magic link. For orgRole='client' (default): isFullAccess controls access to private pages (default true). For orgRole='member' or 'manager': always full access, isFullAccess is ignored. Returns a magic link for direct portal access without email confirmation. IMPORTANT — before calling this operation for a client invite (orgRole='client' or unspecified): ALWAYS ask the user 'Full access (all pages) or Shared only (public pages)?' and wait for their answer before proceeding. Do NOT silently assume a default.
49
+ */
50
+ inviteToPortal(params: {
51
+ path: {
52
+ orgId: orgIdInPathRequired;
53
+ portalId: globalIdInPathRequired;
54
+ };
55
+ headers?: Record<string, string>;
56
+ body: InviteToPortalRequestContract;
57
+ }): Promise<InviteToPortalResponseContract>;
46
58
  /**
47
59
  * List organization portals
48
60
  * Returns portals visible for the caller in the organization. Requires org.read and org access.
@@ -55,6 +55,21 @@ class PortalsApi {
55
55
  expectedContentType: "application/json",
56
56
  });
57
57
  }
58
+ /**
59
+ * Invite a user to a portal
60
+ * Invites a user (client, member, or manager) to a portal via a magic link. For orgRole='client' (default): isFullAccess controls access to private pages (default true). For orgRole='member' or 'manager': always full access, isFullAccess is ignored. Returns a magic link for direct portal access without email confirmation. IMPORTANT — before calling this operation for a client invite (orgRole='client' or unspecified): ALWAYS ask the user 'Full access (all pages) or Shared only (public pages)?' and wait for their answer before proceeding. Do NOT silently assume a default.
61
+ */
62
+ async inviteToPortal(params) {
63
+ return this.client.request({
64
+ method: "POST",
65
+ path: "/:orgId/portals/:portalId/invite",
66
+ pathParams: params.path,
67
+ headers: params.headers,
68
+ body: params.body,
69
+ opId: "inviteToPortal",
70
+ expectedContentType: "application/json",
71
+ });
72
+ }
58
73
  /**
59
74
  * List organization portals
60
75
  * Returns portals visible for the caller in the organization. Requires org.read and org access.
@@ -11,6 +11,8 @@ export interface AppApiOperationContract {
11
11
  description?: string | null;
12
12
  visibility?: string | null;
13
13
  executionMode?: string | null;
14
+ allowedCallers?: string[];
15
+ requiredPermissions?: string[];
14
16
  tags: string[];
15
17
  manifestVersion?: string | null;
16
18
  publishedAt?: string | null;
@@ -17,7 +17,7 @@ export type { MeAuthContract, MeOrgGroupContract, MeResponseContract, MeScopeCon
17
17
  export * from "./note/note";
18
18
  export * from "./org-group/org-group";
19
19
  export type { OrgInviteContract, OrgMagicLinkContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserListResponseContract, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract } from "./org-user/org-user";
20
- export type { CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalRequestContract, PortalDetailContract, globalIdInPathRequired } from "./portals/portals";
20
+ export type { CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalRequestContract, InviteToPortalRequestContract, InviteToPortalResponseContract, PortalDetailContract, globalIdInPathRequired } from "./portals/portals";
21
21
  export * from "./shared/common";
22
22
  export * from "./shared/enums";
23
23
  export type { GetHealth200ResponseContract } from "./shared/health";
@@ -29,3 +29,29 @@ export interface PortalDetailContract {
29
29
  cnameValue?: string;
30
30
  cnameStatus?: string;
31
31
  }
32
+ export interface InviteToPortalRequestContract {
33
+ email: string;
34
+ fullName?: string;
35
+ /**
36
+ * Org role for the invitee (default: "client").
37
+ * Supported: "client", "member", "manager".
38
+ */
39
+ orgRole?: "client" | "member" | "manager";
40
+ /** Workspace role (default: "editor"). */
41
+ workspaceRole?: "reader" | "editor";
42
+ /**
43
+ * Only relevant when orgRole="client".
44
+ * true = Full access (sees all pages including private) — default.
45
+ * false = Shared only (public/shared pages only).
46
+ * For orgRole "member" and "manager" this is always true and the field is ignored.
47
+ */
48
+ isFullAccess?: boolean;
49
+ }
50
+ export interface InviteToPortalResponseContract {
51
+ /** Magic link for direct portal access (no email confirmation needed). */
52
+ magicLink: string;
53
+ /** Portal URL. */
54
+ url: string;
55
+ /** User ID in the system. */
56
+ userId: number;
57
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.2.21-sdk.2",
3
+ "version": "2.2.21-sdk.4",
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.2.21-sdk.4
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.2.21-sdk.4`
5
+ - Generated at: 2026-06-03T14:01:16.239Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -1,8 +1,8 @@
1
- # Release Notes 2.2.21-sdk.2
1
+ # Release Notes 2.2.21-sdk.4
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.2.21-sdk.2`
5
- - Generated at: 2026-05-29T13:50:03.657Z
4
+ - Previous tag: `v2.2.21-sdk.4`
5
+ - Generated at: 2026-06-03T14:01:16.239Z
6
6
 
7
7
  ## Included Drafts
8
8
 
@@ -1,9 +0,0 @@
1
- # Release Notes 2.2.21-sdk.2
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.2.21-sdk.2`
5
- - Generated at: 2026-05-29T13:50:03.657Z
6
-
7
- ## Included Drafts
8
-
9
- - None