@fusebase/fusebase-gate-sdk 2.2.21-sdk.5 → 2.2.21-sdk.8

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.
@@ -73,6 +73,19 @@ export declare class IsolatedStoresApi {
73
73
  headers?: Record<string, string>;
74
74
  body: IsolatedStoreSqlCountRequestContract;
75
75
  }): Promise<IsolatedStoreSqlCountResponseContract>;
76
+ /**
77
+ * Count rows with RLS bypass
78
+ * Counts rows in a postgres table through the explicit audited RLS-bypass read path. Intended for Studio/admin data explorer views only; normal runtime reads must use countIsolatedStoreSqlRows.
79
+ */
80
+ countIsolatedStoreSqlRowsRlsBypass(params: {
81
+ path: {
82
+ orgId: orgIdInPathRequired;
83
+ storeId: IsolatedStoreIdInPathRequired;
84
+ stage: IsolatedStoreStageInPathRequired;
85
+ };
86
+ headers?: Record<string, string>;
87
+ body: IsolatedStoreSqlCountRequestContract;
88
+ }): Promise<IsolatedStoreSqlCountResponseContract>;
76
89
  /**
77
90
  * Create isolated store
78
91
  * Registers a low-level store and binds it to the organization scope plus an isolated source scope such as app.
@@ -379,6 +392,19 @@ export declare class IsolatedStoresApi {
379
392
  headers?: Record<string, string>;
380
393
  body: IsolatedStoreSqlSelectRequestContract;
381
394
  }): Promise<IsolatedStoreSqlSelectResponseContract>;
395
+ /**
396
+ * Select rows with RLS bypass
397
+ * Reads rows through the explicit audited RLS-bypass read path. Intended for Studio/admin data explorer views only; normal runtime reads must use selectIsolatedStoreSqlRows.
398
+ */
399
+ selectIsolatedStoreSqlRowsRlsBypass(params: {
400
+ path: {
401
+ orgId: orgIdInPathRequired;
402
+ storeId: IsolatedStoreIdInPathRequired;
403
+ stage: IsolatedStoreStageInPathRequired;
404
+ };
405
+ headers?: Record<string, string>;
406
+ body: IsolatedStoreSqlSelectRequestContract;
407
+ }): Promise<IsolatedStoreSqlSelectResponseContract>;
382
408
  /**
383
409
  * Update rows
384
410
  * Updates rows in a postgres table using structured filters. Filterless updates are blocked unless allowAll=true is explicitly set.
@@ -86,6 +86,21 @@ class IsolatedStoresApi {
86
86
  expectedContentType: "application/json",
87
87
  });
88
88
  }
89
+ /**
90
+ * Count rows with RLS bypass
91
+ * Counts rows in a postgres table through the explicit audited RLS-bypass read path. Intended for Studio/admin data explorer views only; normal runtime reads must use countIsolatedStoreSqlRows.
92
+ */
93
+ async countIsolatedStoreSqlRowsRlsBypass(params) {
94
+ return this.client.request({
95
+ method: "POST",
96
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/count/rls-bypass",
97
+ pathParams: params.path,
98
+ headers: params.headers,
99
+ body: params.body,
100
+ opId: "countIsolatedStoreSqlRowsRlsBypass",
101
+ expectedContentType: "application/json",
102
+ });
103
+ }
89
104
  /**
90
105
  * Create isolated store
91
106
  * Registers a low-level store and binds it to the organization scope plus an isolated source scope such as app.
@@ -438,6 +453,21 @@ class IsolatedStoresApi {
438
453
  expectedContentType: "application/json",
439
454
  });
440
455
  }
456
+ /**
457
+ * Select rows with RLS bypass
458
+ * Reads rows through the explicit audited RLS-bypass read path. Intended for Studio/admin data explorer views only; normal runtime reads must use selectIsolatedStoreSqlRows.
459
+ */
460
+ async selectIsolatedStoreSqlRowsRlsBypass(params) {
461
+ return this.client.request({
462
+ method: "POST",
463
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/select/rls-bypass",
464
+ pathParams: params.path,
465
+ headers: params.headers,
466
+ body: params.body,
467
+ opId: "selectIsolatedStoreSqlRowsRlsBypass",
468
+ expectedContentType: "application/json",
469
+ });
470
+ }
441
471
  /**
442
472
  * Update rows
443
473
  * Updates rows in a postgres table using structured filters. Filterless updates are blocked unless allowAll=true is explicitly set.
@@ -45,7 +45,7 @@ export declare class PortalsApi {
45
45
  }): Promise<PortalDetailContract>;
46
46
  /**
47
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.
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. Invarian — 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
49
  */
50
50
  inviteToPortal(params: {
51
51
  path: {
@@ -57,7 +57,7 @@ class PortalsApi {
57
57
  }
58
58
  /**
59
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.
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. Invarian — 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
61
  */
62
62
  async inviteToPortal(params) {
63
63
  return this.client.request({
@@ -5,10 +5,21 @@
5
5
  * Domain: workspaces
6
6
  */
7
7
  import type { Client } from "../runtime/transport";
8
- import type { orgIdInPathRequired, OrgWorkspaceListResponseContract } from "../types";
8
+ import type { CreateWorkspaceRequestContract, orgIdInPathRequired, OrgWorkspaceContract, OrgWorkspaceListResponseContract } from "../types";
9
9
  export declare class WorkspacesApi {
10
10
  private client;
11
11
  constructor(client: Client);
12
+ /**
13
+ * Create a new workspace
14
+ * Creates a new workspace in the organization. Returns the created workspace details. Requires org.write and org access.
15
+ */
16
+ createWorkspace(params: {
17
+ path: {
18
+ orgId: orgIdInPathRequired;
19
+ };
20
+ headers?: Record<string, string>;
21
+ body: CreateWorkspaceRequestContract;
22
+ }): Promise<OrgWorkspaceContract>;
12
23
  /**
13
24
  * List organization workspaces
14
25
  * Returns workspaces visible for the caller in the organization and marks the default workspace. Requires org.read and org access.
@@ -11,6 +11,21 @@ class WorkspacesApi {
11
11
  constructor(client) {
12
12
  this.client = client;
13
13
  }
14
+ /**
15
+ * Create a new workspace
16
+ * Creates a new workspace in the organization. Returns the created workspace details. Requires org.write and org access.
17
+ */
18
+ async createWorkspace(params) {
19
+ return this.client.request({
20
+ method: "POST",
21
+ path: "/:orgId/workspaces",
22
+ pathParams: params.path,
23
+ headers: params.headers,
24
+ body: params.body,
25
+ opId: "createWorkspace",
26
+ expectedContentType: "application/json",
27
+ });
28
+ }
14
29
  /**
15
30
  * List organization workspaces
16
31
  * Returns workspaces visible for the caller in the organization and marks the default workspace. Requires org.read and org access.
@@ -16,7 +16,7 @@ export * from "./mcp-manager/mcp-manager";
16
16
  export type { MeAuthContract, MeOrgGroupContract, MeResponseContract, MeScopeContract, MeUserContract } from "./me/me";
17
17
  export * from "./note/note";
18
18
  export * from "./org-group/org-group";
19
- export type { OrgInviteContract, OrgMagicLinkContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserListResponseContract, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract } from "./org-user/org-user";
19
+ export type { CreateWorkspaceRequestContract, OrgInviteContract, OrgMagicLinkContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserListResponseContract, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract } from "./org-user/org-user";
20
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";
@@ -69,6 +69,10 @@ export interface OrgWorkspaceContract {
69
69
  export interface OrgWorkspaceListResponseContract {
70
70
  workspaces: OrgWorkspaceContract[];
71
71
  }
72
+ export interface CreateWorkspaceRequestContract {
73
+ /** Display name for the new workspace. Required. */
74
+ title: string;
75
+ }
72
76
  export interface OrgPortalContract {
73
77
  id: string;
74
78
  orgId: string;
@@ -1,6 +1,6 @@
1
1
  export type OrgRoleContract = "owner" | "manager" | "member" | "client" | "guest" | "visitor";
2
2
  export type PermissionContract = string & {
3
- __pattern: "^[^.]+\\.(?:[^.]+\\.)?(read|write|delete|execute)$";
3
+ __pattern: "^[^.]+\\.(?:[^.]+\\.)?(read|write|delete|execute|create|manage)$";
4
4
  };
5
5
  export type RootEntityContract = "custom" | "portal" | "workspace" | "org" | "user" | "client" | "form" | "form-response" | "tracker" | "tracker-result" | "meeting";
6
6
  export type ScopeTypeContract = "org" | "workspace" | "portal" | "user" | "client" | "block" | "tracker" | "parent_row" | "parent_table";
@@ -37,7 +37,7 @@ exports.ScopeTypeContract = {
37
37
  exports.ScopeTypeOrgContract = {
38
38
  Org: "org"
39
39
  };
40
- const PERMISSION_RE = /^[^.]+\.(?:[^.]+\.)?(read|write|delete|execute)$/;
40
+ const PERMISSION_RE = /^[^.]+\.(?:[^.]+\.)?(read|write|delete|execute|create|manage)$/;
41
41
  function asPermission(value) {
42
42
  if (!PERMISSION_RE.test(value)) {
43
43
  throw new Error(`Invalid permission: ${value}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.2.21-sdk.5",
3
+ "version": "2.2.21-sdk.8",
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.8
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.2.21-sdk.8`
5
+ - Generated at: 2026-06-04T14:59:09.554Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -1,8 +1,8 @@
1
- # Release Notes 2.2.21-sdk.5
1
+ # Release Notes 2.2.21-sdk.8
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.2.21-sdk.5`
5
- - Generated at: 2026-06-04T12:26:04.829Z
4
+ - Previous tag: `v2.2.21-sdk.8`
5
+ - Generated at: 2026-06-04T14:59:09.554Z
6
6
 
7
7
  ## Included Drafts
8
8
 
@@ -1,9 +0,0 @@
1
- # Release Notes 2.2.21-sdk.5
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.2.21-sdk.5`
5
- - Generated at: 2026-06-04T12:26:04.829Z
6
-
7
- ## Included Drafts
8
-
9
- - None