@fusebase/fusebase-gate-sdk 2.2.2-sdk.4 → 2.2.2-sdk.40

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.
Files changed (35) hide show
  1. package/dist/apis/BillingApi.d.ts +111 -0
  2. package/dist/apis/BillingApi.js +150 -0
  3. package/dist/apis/IsolatedStoresApi.d.ts +449 -0
  4. package/dist/apis/IsolatedStoresApi.js +514 -0
  5. package/dist/apis/NotesApi.d.ts +3 -3
  6. package/dist/apis/NotesApi.js +3 -3
  7. package/dist/apis/OrgGroupsApi.d.ts +199 -0
  8. package/dist/apis/OrgGroupsApi.js +246 -0
  9. package/dist/apis/OrgUsersApi.d.ts +1 -1
  10. package/dist/apis/OrgUsersApi.js +1 -1
  11. package/dist/apis/SystemApi.d.ts +8 -1
  12. package/dist/apis/SystemApi.js +13 -0
  13. package/dist/extras/fetchWithRetry.js +6 -1
  14. package/dist/extras/sqlMigrationBundle.d.ts +13 -0
  15. package/dist/extras/sqlMigrationBundle.js +69 -0
  16. package/dist/index.d.ts +4 -0
  17. package/dist/index.js +8 -1
  18. package/dist/types/billing/billing.d.ts +129 -0
  19. package/dist/types/billing/billing.js +13 -0
  20. package/dist/types/index.d.ts +4 -1
  21. package/dist/types/index.js +3 -0
  22. package/dist/types/isolated-store/isolated-store.d.ts +591 -0
  23. package/dist/types/isolated-store/isolated-store.js +91 -0
  24. package/dist/types/note/note.d.ts +3 -3
  25. package/dist/types/org-group/org-group.d.ts +128 -0
  26. package/dist/types/org-group/org-group.js +7 -0
  27. package/dist/types/org-user/org-user.d.ts +7 -0
  28. package/dist/types/shared/enums.d.ts +1 -1
  29. package/dist/types/shared/enums.js +1 -1
  30. package/dist/types/system/system.d.ts +8 -0
  31. package/dist/types/token/token.d.ts +11 -0
  32. package/package.json +1 -1
  33. package/release-notes/2.2.2-sdk.40.md +9 -0
  34. package/release-notes/latest.md +3 -3
  35. package/release-notes/2.2.2-sdk.4.md +0 -9
@@ -6,7 +6,7 @@ export interface WorkspaceNoteSummaryContract {
6
6
  parentId?: string | null;
7
7
  }
8
8
  export interface WorkspaceNoteContentContract extends WorkspaceNoteSummaryContract {
9
- html: string;
9
+ md: string;
10
10
  }
11
11
  export interface WorkspaceNoteFolderListResponseContract {
12
12
  folders: WorkspaceNoteSummaryContract[];
@@ -21,14 +21,14 @@ export type WorkspaceNoteParentIdInQueryOptional = string | null;
21
21
  export type WorkspaceNoteContentFormatContract = "text" | "html";
22
22
  export interface WorkspaceNoteListQueryContract {
23
23
  /**
24
- * Folder global id to list notes from. When omitted, gate defaults to `root`.
24
+ * Folder global id to list notes from. When omitted, gate defaults to `default`.
25
25
  */
26
26
  parentId?: WorkspaceNoteParentIdInQueryOptional;
27
27
  }
28
28
  export interface CreateWorkspaceNoteFolderRequestContract {
29
29
  title: string;
30
30
  /**
31
- * Parent folder global id. Defaults to `root`.
31
+ * Parent folder global id. Defaults to `default`.
32
32
  */
33
33
  parentId?: string | null;
34
34
  }
@@ -0,0 +1,128 @@
1
+ export type OrgGroupIdInPathRequired = string;
2
+ export type OrgGroupUserIdInPathRequired = number;
3
+ export type OrgGroupWorkspaceIdInPathRequired = string;
4
+ export type OrgGroupIncludeWorkspaceInQueryOptional = boolean | null;
5
+ export type OrgWorkspaceGroupsIncludeGroupsInQueryOptional = boolean | null;
6
+ export type OrgGroupWorkspaceAssignmentTypeContract = "full" | "partial";
7
+ export interface OrgGroupContract {
8
+ id: string;
9
+ orgId: string;
10
+ name: string;
11
+ description?: string | null;
12
+ userId?: number;
13
+ createdAt: number;
14
+ updatedAt: number;
15
+ memberCount?: number;
16
+ workspaceCount?: number;
17
+ }
18
+ export interface OrgGroupListResponseContract {
19
+ groups: OrgGroupContract[];
20
+ }
21
+ export interface OrgGroupResponseContract {
22
+ group: OrgGroupContract;
23
+ }
24
+ export interface OrgGroupMemberContract {
25
+ groupId: string;
26
+ orgId: string;
27
+ userId: number;
28
+ addedByUserId: number;
29
+ createdAt: number;
30
+ updatedAt: number;
31
+ }
32
+ export interface OrgGroupMemberListResponseContract {
33
+ members: OrgGroupMemberContract[];
34
+ }
35
+ export interface OrgGroupWorkspaceRoleContract {
36
+ workspaceId: string;
37
+ role: string;
38
+ }
39
+ export interface OrgGroupWorkspaceDetailsContract {
40
+ id?: string;
41
+ orgId?: string;
42
+ userId?: number;
43
+ createdAt?: number;
44
+ updatedAt?: number;
45
+ title?: string | null;
46
+ isDefault?: boolean;
47
+ defaultEncryptionKeyId?: string | null;
48
+ isNotesLimited?: boolean;
49
+ color?: string | null;
50
+ brandingProfileId?: string | null;
51
+ webClientBrandingProfileId?: string | null;
52
+ orgSubscriptionType?: string;
53
+ orgSubscriptionPrivileges?: string[];
54
+ }
55
+ export interface OrgWorkspaceGroupContract {
56
+ addedByUserId: number;
57
+ groupId: string;
58
+ createdAt: number;
59
+ updatedAt: number;
60
+ type: OrgGroupWorkspaceAssignmentTypeContract;
61
+ workspaceId: string;
62
+ role: string;
63
+ orgId: string;
64
+ workspace?: OrgGroupWorkspaceDetailsContract;
65
+ }
66
+ export interface OrgWorkspaceGroupListResponseContract {
67
+ workspaceGroups: OrgWorkspaceGroupContract[];
68
+ }
69
+ export interface OrgWorkspaceGroupCountResponseContract {
70
+ count: number;
71
+ }
72
+ export interface OrgGroupCreateRequestContract {
73
+ name: string;
74
+ description?: string | null;
75
+ workspaces?: OrgGroupWorkspaceRoleContract[] | null;
76
+ }
77
+ export interface OrgGroupUpdateRequestContract {
78
+ name?: string;
79
+ description?: string | null;
80
+ workspaces?: OrgGroupWorkspaceRoleContract[] | null;
81
+ }
82
+ export interface AddMembersToOrgGroupRequestContract {
83
+ userIds: number[];
84
+ }
85
+ export interface AddMembersToOrgGroupResponseContract {
86
+ members: OrgGroupMemberContract[];
87
+ }
88
+ export interface RemoveOrgGroupMemberResponseContract {
89
+ removed: boolean;
90
+ groupId: string;
91
+ userId: number;
92
+ }
93
+ export interface AddGroupToWorkspaceRequestContract {
94
+ groupId: string;
95
+ role: string;
96
+ type?: OrgGroupWorkspaceAssignmentTypeContract | null;
97
+ }
98
+ export interface UpdateWorkspaceGroupRequestContract {
99
+ role: string;
100
+ }
101
+ export interface OrgWorkspaceGroupResponseContract {
102
+ workspaceGroup: OrgWorkspaceGroupContract;
103
+ }
104
+ export interface DeleteOrgGroupResponseContract {
105
+ deleted: boolean;
106
+ groupId: string;
107
+ }
108
+ export interface DeleteWorkspaceGroupResponseContract {
109
+ deleted: boolean;
110
+ workspaceId: string;
111
+ groupId: string;
112
+ }
113
+ export interface OrgGroupWorkspacesQueryContract {
114
+ /**
115
+ * Include workspace details in each workspace-group record.
116
+ */
117
+ workspace?: OrgGroupIncludeWorkspaceInQueryOptional;
118
+ }
119
+ export interface WorkspaceGroupsQueryContract {
120
+ /**
121
+ * Forward the org-service `groups` flag for workspace group listings.
122
+ */
123
+ groups?: OrgWorkspaceGroupsIncludeGroupsInQueryOptional;
124
+ }
125
+ export declare const OrgGroupWorkspaceAssignmentTypeContract: {
126
+ readonly Full: "full";
127
+ readonly Partial: "partial";
128
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrgGroupWorkspaceAssignmentTypeContract = void 0;
4
+ exports.OrgGroupWorkspaceAssignmentTypeContract = {
5
+ Full: "full",
6
+ Partial: "partial"
7
+ };
@@ -43,6 +43,11 @@ export interface OrgUserAddRequestContract {
43
43
  * Without `workspaceId`, this remains an org invite email hint only.
44
44
  */
45
45
  portalUrl?: string;
46
+ /**
47
+ * Org-only shortcut for instant client onboarding without invite
48
+ * confirmation. Valid only when `orgRole` is `client` and `workspaceId`
49
+ * is omitted.
50
+ */
46
51
  autoConfirmClientInvite?: boolean;
47
52
  }
48
53
  export interface OrgInviteContract {
@@ -122,6 +127,8 @@ export interface OrgUserAddResponseContract {
122
127
  /**
123
128
  * org-service returns `invite` or `member` for org invites, and
124
129
  * `invite`, `member`, or `link` for workspace-aware invites.
130
+ * `invite` means an invite exists; it is not proof that org access is
131
+ * already active for the current session.
125
132
  */
126
133
  result: "invite" | "member" | "link";
127
134
  orgInvite?: OrgInviteContract;
@@ -1,6 +1,6 @@
1
1
  export type OrgRoleContract = "owner" | "manager" | "member" | "client" | "guest" | "visitor";
2
2
  export type PermissionContract = string & {
3
- __pattern: "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)*\\.(read|write|delete|execute)$";
3
+ __pattern: "^[^.]+\\.(?:[^.]+\\.)?(read|write|delete|execute)$";
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 = /^[a-z][a-z0-9_]*(\.[a-z0-9_]+)*\.(read|write|delete|execute)$/;
40
+ const PERMISSION_RE = /^[^.]+\.(?:[^.]+\.)?(read|write|delete|execute)$/;
41
41
  function asPermission(value) {
42
42
  if (!PERMISSION_RE.test(value)) {
43
43
  throw new Error(`Invalid permission: ${value}`);
@@ -2,6 +2,14 @@ import type { PermissionContract } from "../shared/enums";
2
2
  export interface ResolveOperationPermissionsRequestContract {
3
3
  operations: string[];
4
4
  }
5
+ export interface ListPermissionCatalogResultContract {
6
+ permissions: PermissionContract[];
7
+ }
8
+ export interface ListPermissionCatalogResponseContract {
9
+ success: boolean;
10
+ message?: string | null;
11
+ data: ListPermissionCatalogResultContract;
12
+ }
5
13
  export type OperationPermissionMatchTypeContract = "operation_id" | "mcp_tool_name";
6
14
  export interface ResolvedOperationPermissionContract {
7
15
  requested: string;
@@ -6,6 +6,7 @@ export interface CreateTokenRequestContract {
6
6
  resource_scope: ResourceScopeContract;
7
7
  name?: string | null;
8
8
  expires_at?: Date | null;
9
+ meta?: TokenMetaContract;
9
10
  }
10
11
  export interface CreateTokenResponseContract {
11
12
  success: boolean;
@@ -16,6 +17,7 @@ export interface CreateTokenResponseContract {
16
17
  name?: string | null;
17
18
  permissions: string[];
18
19
  expires_at?: Date | null;
20
+ meta?: TokenMetaContract;
19
21
  created_at: Date;
20
22
  };
21
23
  }
@@ -27,6 +29,13 @@ export interface ResourceScopeRuleContract {
27
29
  resource_type: string;
28
30
  ids: string[];
29
31
  }
32
+ export interface TokenMetaIssuerContract {
33
+ kind: string;
34
+ id: string;
35
+ }
36
+ export interface TokenMetaContract {
37
+ issuer?: TokenMetaIssuerContract;
38
+ }
30
39
  export interface RevokeTokenResponseContract {
31
40
  success: boolean;
32
41
  message: string;
@@ -36,6 +45,7 @@ export interface TokenContract {
36
45
  name?: string | null;
37
46
  permissions: PermissionContract[];
38
47
  scopes?: ScopeContract[];
48
+ meta?: TokenMetaContract;
39
49
  expires_at?: Date | null;
40
50
  last_used_at?: Date | null;
41
51
  created_at: Date;
@@ -54,4 +64,5 @@ export interface UpdateTokenRequestContract {
54
64
  name?: string | null;
55
65
  permissions?: PermissionContract[];
56
66
  expires_at?: Date | null;
67
+ meta?: TokenMetaContract;
57
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.2.2-sdk.4",
3
+ "version": "2.2.2-sdk.40",
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.2-sdk.40
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.2.2-sdk.40`
5
+ - Generated at: 2026-04-12T04:14:15.899Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -1,8 +1,8 @@
1
- # Release Notes 2.2.2-sdk.4
1
+ # Release Notes 2.2.2-sdk.40
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.2.2-sdk.4`
5
- - Generated at: 2026-03-30T12:29:53.183Z
4
+ - Previous tag: `v2.2.2-sdk.40`
5
+ - Generated at: 2026-04-12T04:14:15.899Z
6
6
 
7
7
  ## Included Drafts
8
8
 
@@ -1,9 +0,0 @@
1
- # Release Notes 2.2.2-sdk.4
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.2.2-sdk.4`
5
- - Generated at: 2026-03-30T12:29:53.183Z
6
-
7
- ## Included Drafts
8
-
9
- - None