@fusebase/fusebase-gate-sdk 2.2.1 → 2.2.2-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 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
+ * 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
@@ -10,4 +10,5 @@ export { HealthApi } from "./apis/HealthApi";
10
10
  export { OrgUsersApi } from "./apis/OrgUsersApi";
11
11
  export { SystemApi } from "./apis/SystemApi";
12
12
  export { TokensApi } from "./apis/TokensApi";
13
+ export { WorkspacesApi } from "./apis/WorkspacesApi";
13
14
  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.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");
@@ -32,4 +32,6 @@ var SystemApi_1 = require("./apis/SystemApi");
32
32
  Object.defineProperty(exports, "SystemApi", { enumerable: true, get: function () { return SystemApi_1.SystemApi; } });
33
33
  var TokensApi_1 = require("./apis/TokensApi");
34
34
  Object.defineProperty(exports, "TokensApi", { enumerable: true, get: function () { return TokensApi_1.TokensApi; } });
35
+ var WorkspacesApi_1 = require("./apis/WorkspacesApi");
36
+ Object.defineProperty(exports, "WorkspacesApi", { enumerable: true, get: function () { return WorkspacesApi_1.WorkspacesApi; } });
35
37
  __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, 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,15 +12,29 @@ 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;
26
40
  portalUrl?: string;
@@ -34,11 +48,66 @@ export interface OrgInviteContract {
34
48
  used: boolean;
35
49
  url?: string;
36
50
  }
51
+ export interface OrgWorkspaceContract {
52
+ id: string;
53
+ orgId?: string;
54
+ title?: string | null;
55
+ isDefault: boolean;
56
+ color?: string | null;
57
+ role?: string | null;
58
+ }
59
+ export interface OrgWorkspaceListResponseContract {
60
+ workspaces: OrgWorkspaceContract[];
61
+ }
62
+ export interface OrgWorkspaceInviteContract {
63
+ workspaceId: string;
64
+ role: string;
65
+ encryptRole?: string | null;
66
+ addedByUserId: number;
67
+ email: string;
68
+ createdAt: number;
69
+ updatedAt: number;
70
+ used: boolean;
71
+ usedByUserId?: number | null;
72
+ }
73
+ export interface OrgWorkspaceMemberContract {
74
+ id: string;
75
+ workspaceId: string;
76
+ userId: number;
77
+ role: string;
78
+ encryptRole?: string | null;
79
+ addedByUserId: number;
80
+ createdAt: number;
81
+ updatedAt: number;
82
+ type?: string | null;
83
+ privileges?: string[] | null;
84
+ magicLink?: string | null;
85
+ }
86
+ export interface OrgMagicLinkContract {
87
+ id: string;
88
+ type: string;
89
+ userId: number;
90
+ orgId: string;
91
+ workspaceId: string;
92
+ url: string;
93
+ magicLink: string;
94
+ createdAt?: number;
95
+ updatedAt?: number;
96
+ expiresAt?: number;
97
+ }
37
98
  export interface OrgUserAddResponseContract {
38
99
  /**
39
- * org-service returns either an invite (most roles) or a member (autoConfirmClientInvite for `client`).
100
+ * Target flow used by the endpoint.
101
+ */
102
+ target: "org" | "workspace";
103
+ /**
104
+ * org-service returns `invite` or `member` for org invites, and
105
+ * `invite`, `member`, or `link` for workspace-aware invites.
40
106
  */
41
- result: "invite" | "member";
42
- invite?: OrgInviteContract;
43
- member?: OrgUserContract;
107
+ result: "invite" | "member" | "link";
108
+ orgInvite?: OrgInviteContract;
109
+ orgMember?: OrgUserContract;
110
+ workspaceInvite?: OrgWorkspaceInviteContract;
111
+ workspaceMember?: OrgWorkspaceMemberContract;
112
+ magicLink?: OrgMagicLinkContract;
44
113
  }
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.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",
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.0
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.2.2-sdk.0`
5
+ - Generated at: 2026-03-27T15:41:03.322Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -0,0 +1,9 @@
1
+ # Release Notes 2.2.2-sdk.0
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.2.2-sdk.0`
5
+ - Generated at: 2026-03-27T15:41:03.322Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None