@fusebase/fusebase-gate-sdk 2.2.1 → 2.2.2-sdk.1

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 OrgUsersApi {
11
11
  constructor(client: Client);
12
12
  /**
13
13
  * Add user to organization
14
- * Invites a user (by email) into the organization, creating an org-service invite (or a member for auto-confirm cases). Requires org.members.write and org access.
14
+ * Invites a user into the organization. Without workspaceId it performs an org invite. With workspaceId it performs a workspace-aware invite and can resolve `default` to the organization's default workspace. Requires org.members.write and org access.
15
15
  */
16
16
  addOrgUser(params: {
17
17
  path: {
@@ -13,7 +13,7 @@ class OrgUsersApi {
13
13
  }
14
14
  /**
15
15
  * Add user to organization
16
- * Invites a user (by email) into the organization, creating an org-service invite (or a member for auto-confirm cases). Requires org.members.write and org access.
16
+ * Invites a user into the organization. Without workspaceId it performs an org invite. With workspaceId it performs a workspace-aware invite and can resolve `default` to the organization's default workspace. Requires org.members.write and org access.
17
17
  */
18
18
  async addOrgUser(params) {
19
19
  return this.client.request({
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Portals API
3
+ *
4
+ * Generated from contract introspection
5
+ * Domain: portals
6
+ */
7
+ import type { Client } from "../runtime/transport";
8
+ import type { orgIdInPathRequired, OrgPortalListResponseContract } from "../types";
9
+ export declare class PortalsApi {
10
+ private client;
11
+ constructor(client: Client);
12
+ /**
13
+ * List organization portals
14
+ * Returns portals visible for the caller in the organization. Requires org.read and org access.
15
+ */
16
+ listPortals(params: {
17
+ path: {
18
+ orgId: orgIdInPathRequired;
19
+ };
20
+ headers?: Record<string, string>;
21
+ }): Promise<OrgPortalListResponseContract>;
22
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * Portals API
4
+ *
5
+ * Generated from contract introspection
6
+ * Domain: portals
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.PortalsApi = void 0;
10
+ class PortalsApi {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ /**
15
+ * List organization portals
16
+ * Returns portals visible for the caller in the organization. Requires org.read and org access.
17
+ */
18
+ async listPortals(params) {
19
+ return this.client.request({
20
+ method: "GET",
21
+ path: "/:orgId/portals",
22
+ pathParams: params.path,
23
+ headers: params.headers,
24
+ opId: "listPortals",
25
+ expectedContentType: "application/json",
26
+ });
27
+ }
28
+ }
29
+ exports.PortalsApi = PortalsApi;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Workspaces API
3
+ *
4
+ * Generated from contract introspection
5
+ * Domain: workspaces
6
+ */
7
+ import type { Client } from "../runtime/transport";
8
+ import type { orgIdInPathRequired, OrgWorkspaceListResponseContract } from "../types";
9
+ export declare class WorkspacesApi {
10
+ private client;
11
+ constructor(client: Client);
12
+ /**
13
+ * List organization workspaces
14
+ * Returns workspaces visible for the caller in the organization and marks the default workspace. Requires org.read and org access.
15
+ */
16
+ listWorkspaces(params: {
17
+ path: {
18
+ orgId: orgIdInPathRequired;
19
+ };
20
+ headers?: Record<string, string>;
21
+ }): Promise<OrgWorkspaceListResponseContract>;
22
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * Workspaces API
4
+ *
5
+ * Generated from contract introspection
6
+ * Domain: workspaces
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.WorkspacesApi = void 0;
10
+ class WorkspacesApi {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ /**
15
+ * List organization workspaces
16
+ * Returns workspaces visible for the caller in the organization and marks the default workspace. Requires org.read and org access.
17
+ */
18
+ async listWorkspaces(params) {
19
+ return this.client.request({
20
+ method: "GET",
21
+ path: "/:orgId/workspaces",
22
+ pathParams: params.path,
23
+ headers: params.headers,
24
+ opId: "listWorkspaces",
25
+ expectedContentType: "application/json",
26
+ });
27
+ }
28
+ }
29
+ exports.WorkspacesApi = WorkspacesApi;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export * from "./types";
8
8
  export { EmailsApi } from "./apis/EmailsApi";
9
9
  export { HealthApi } from "./apis/HealthApi";
10
10
  export { OrgUsersApi } from "./apis/OrgUsersApi";
11
+ export { PortalsApi } from "./apis/PortalsApi";
11
12
  export { SystemApi } from "./apis/SystemApi";
12
13
  export { TokensApi } from "./apis/TokensApi";
14
+ export { WorkspacesApi } from "./apis/WorkspacesApi";
13
15
  export * from "./extras/fetchWithRetry";
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.TokensApi = exports.SystemApi = exports.OrgUsersApi = exports.HealthApi = exports.EmailsApi = void 0;
22
+ exports.WorkspacesApi = exports.TokensApi = exports.SystemApi = exports.PortalsApi = exports.OrgUsersApi = exports.HealthApi = exports.EmailsApi = void 0;
23
23
  __exportStar(require("./runtime"), exports);
24
24
  __exportStar(require("./types"), exports);
25
25
  var EmailsApi_1 = require("./apis/EmailsApi");
@@ -28,8 +28,12 @@ var HealthApi_1 = require("./apis/HealthApi");
28
28
  Object.defineProperty(exports, "HealthApi", { enumerable: true, get: function () { return HealthApi_1.HealthApi; } });
29
29
  var OrgUsersApi_1 = require("./apis/OrgUsersApi");
30
30
  Object.defineProperty(exports, "OrgUsersApi", { enumerable: true, get: function () { return OrgUsersApi_1.OrgUsersApi; } });
31
+ var PortalsApi_1 = require("./apis/PortalsApi");
32
+ Object.defineProperty(exports, "PortalsApi", { enumerable: true, get: function () { return PortalsApi_1.PortalsApi; } });
31
33
  var SystemApi_1 = require("./apis/SystemApi");
32
34
  Object.defineProperty(exports, "SystemApi", { enumerable: true, get: function () { return SystemApi_1.SystemApi; } });
33
35
  var TokensApi_1 = require("./apis/TokensApi");
34
36
  Object.defineProperty(exports, "TokensApi", { enumerable: true, get: function () { return TokensApi_1.TokensApi; } });
37
+ var WorkspacesApi_1 = require("./apis/WorkspacesApi");
38
+ Object.defineProperty(exports, "WorkspacesApi", { enumerable: true, get: function () { return WorkspacesApi_1.WorkspacesApi; } });
35
39
  __exportStar(require("./extras/fetchWithRetry"), exports);
@@ -5,7 +5,7 @@
5
5
  * Generated by SDK codegen
6
6
  */
7
7
  export type { OrgEmailSendRequestContract, OrgEmailSendResponseContract } from "./email/email";
8
- export type { OrgInviteContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserListResponseContract } from "./org-user/org-user";
8
+ export type { OrgInviteContract, OrgMagicLinkContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserListResponseContract, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract } from "./org-user/org-user";
9
9
  export * from "./shared/common";
10
10
  export * from "./shared/enums";
11
11
  export type { GetHealth200ResponseContract } from "./shared/health";
@@ -12,17 +12,36 @@ export interface OrgUserListResponseContract {
12
12
  export interface OrgUserAddRequestContract {
13
13
  /**
14
14
  * Email to invite/create access for.
15
- * org-service `POST /orgs/:org/members` uses an invite flow and expects `email`
16
- * (or `username`) together with `role`.
17
15
  */
18
16
  email: string;
19
17
  /**
20
18
  * Root role in org-service (e.g. owner/manager/member/guest/client).
21
- * If omitted, gate defaults to `member`.
19
+ * Used for org-only invites, or as the org role when a workspace invite
20
+ * needs to create org membership first.
22
21
  */
23
- role?: string | null;
22
+ orgRole?: string | null;
23
+ /**
24
+ * Workspace target. Supports a literal workspace global id or the alias
25
+ * `default`, which gate resolves to the default workspace of `orgId`.
26
+ * When set, `workspaceRole` becomes required and the invite flows through
27
+ * org-service `POST /workspaces/:workspaceId/members`.
28
+ */
29
+ workspaceId?: string | null;
30
+ /**
31
+ * Workspace role for workspace-aware invites (e.g. admin/editor/reader).
32
+ */
33
+ workspaceRole?: string | null;
34
+ /**
35
+ * Optional workspace encryption role.
36
+ */
37
+ encryptRole?: string | null;
24
38
  fullName?: string;
25
39
  memberTTL?: number | null;
40
+ /**
41
+ * Optional portal domain/host. When combined with `workspaceId`,
42
+ * org-service creates a portal magic link instead of a regular invite.
43
+ * Without `workspaceId`, this remains an org invite email hint only.
44
+ */
26
45
  portalUrl?: string;
27
46
  autoConfirmClientInvite?: boolean;
28
47
  }
@@ -34,11 +53,80 @@ export interface OrgInviteContract {
34
53
  used: boolean;
35
54
  url?: string;
36
55
  }
56
+ export interface OrgWorkspaceContract {
57
+ id: string;
58
+ orgId?: string;
59
+ title?: string | null;
60
+ isDefault: boolean;
61
+ color?: string | null;
62
+ role?: string | null;
63
+ }
64
+ export interface OrgWorkspaceListResponseContract {
65
+ workspaces: OrgWorkspaceContract[];
66
+ }
67
+ export interface OrgPortalContract {
68
+ id: string;
69
+ orgId: string;
70
+ workspaceId: string;
71
+ domain: string;
72
+ status: string;
73
+ createdAt: number;
74
+ updatedAt: number;
75
+ lastPublishedAt?: number;
76
+ version: number;
77
+ }
78
+ export interface OrgPortalListResponseContract {
79
+ portals: OrgPortalContract[];
80
+ }
81
+ export interface OrgWorkspaceInviteContract {
82
+ workspaceId: string;
83
+ role: string;
84
+ encryptRole?: string | null;
85
+ addedByUserId: number;
86
+ email: string;
87
+ createdAt: number;
88
+ updatedAt: number;
89
+ used: boolean;
90
+ usedByUserId?: number | null;
91
+ }
92
+ export interface OrgWorkspaceMemberContract {
93
+ id: string;
94
+ workspaceId: string;
95
+ userId: number;
96
+ role: string;
97
+ encryptRole?: string | null;
98
+ addedByUserId: number;
99
+ createdAt: number;
100
+ updatedAt: number;
101
+ type?: string | null;
102
+ privileges?: string[] | null;
103
+ magicLink?: string | null;
104
+ }
105
+ export interface OrgMagicLinkContract {
106
+ id: string;
107
+ type: string;
108
+ userId: number;
109
+ orgId: string;
110
+ workspaceId: string;
111
+ url: string;
112
+ magicLink: string;
113
+ createdAt?: number;
114
+ updatedAt?: number;
115
+ expiresAt?: number;
116
+ }
37
117
  export interface OrgUserAddResponseContract {
38
118
  /**
39
- * org-service returns either an invite (most roles) or a member (autoConfirmClientInvite for `client`).
119
+ * Target flow used by the endpoint.
120
+ */
121
+ target: "org" | "workspace" | "portal";
122
+ /**
123
+ * org-service returns `invite` or `member` for org invites, and
124
+ * `invite`, `member`, or `link` for workspace-aware invites.
40
125
  */
41
- result: "invite" | "member";
42
- invite?: OrgInviteContract;
43
- member?: OrgUserContract;
126
+ result: "invite" | "member" | "link";
127
+ orgInvite?: OrgInviteContract;
128
+ orgMember?: OrgUserContract;
129
+ workspaceInvite?: OrgWorkspaceInviteContract;
130
+ workspaceMember?: OrgWorkspaceMemberContract;
131
+ magicLink?: OrgMagicLinkContract;
44
132
  }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.2.1",
3
+ "version": "2.2.2-sdk.1",
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",
7
7
  "files": [
8
- "dist"
8
+ "dist",
9
+ "release-notes"
9
10
  ],
10
11
  "scripts": {
11
12
  "build": "tsc -p tsconfig.json"
@@ -0,0 +1,9 @@
1
+ # Release Notes 2.2.2-sdk.1
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.2.2-sdk.1`
5
+ - Generated at: 2026-03-27T16:03:26.172Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -0,0 +1,9 @@
1
+ # Release Notes 2.2.2-sdk.1
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.2.2-sdk.1`
5
+ - Generated at: 2026-03-27T16:03:26.172Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None