@fusebase/fusebase-gate-sdk 2.2.2-sdk.9 → 2.2.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.
- package/dist/apis/BillingApi.d.ts +111 -0
- package/dist/apis/BillingApi.js +150 -0
- package/dist/apis/IsolatedStoresApi.d.ts +449 -0
- package/dist/apis/IsolatedStoresApi.js +514 -0
- package/dist/apis/OrgGroupsApi.d.ts +199 -0
- package/dist/apis/OrgGroupsApi.js +246 -0
- package/dist/extras/fetchWithRetry.js +6 -1
- package/dist/extras/sqlMigrationBundle.d.ts +13 -0
- package/dist/extras/sqlMigrationBundle.js +69 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -1
- package/dist/types/billing/billing.d.ts +129 -0
- package/dist/types/billing/billing.js +13 -0
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.js +3 -0
- package/dist/types/isolated-store/isolated-store.d.ts +591 -0
- package/dist/types/isolated-store/isolated-store.js +91 -0
- package/dist/types/org-group/org-group.d.ts +128 -0
- package/dist/types/org-group/org-group.js +7 -0
- package/dist/types/shared/enums.d.ts +1 -1
- package/dist/types/shared/enums.js +1 -1
- package/dist/types/token/token.d.ts +11 -0
- package/package.json +1 -1
- package/release-notes/2.2.2-sdk.41.md +44 -0
- package/release-notes/2.2.4.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.2.2-sdk.9.md +0 -9
|
@@ -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
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type OrgRoleContract = "owner" | "manager" | "member" | "client" | "guest" | "visitor";
|
|
2
2
|
export type PermissionContract = string & {
|
|
3
|
-
__pattern: "^[
|
|
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 = /^[
|
|
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}`);
|
|
@@ -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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Release Notes 2.2.2-sdk.41
|
|
2
|
+
|
|
3
|
+
- Current ref: `HEAD`
|
|
4
|
+
- Previous tag: `v2.2.2-sdk.40`
|
|
5
|
+
- Generated at: 2026-04-13T12:12:11.171Z
|
|
6
|
+
|
|
7
|
+
## Included Drafts
|
|
8
|
+
|
|
9
|
+
- `docs/release-notes/2026-04-13-sdk-build-feature-flags-env.md` - SDK Build Feature Flags From Env
|
|
10
|
+
|
|
11
|
+
## Summary
|
|
12
|
+
|
|
13
|
+
### SDK Build Feature Flags From Env
|
|
14
|
+
|
|
15
|
+
- Removed the SDK build-script bootstrap that mutated `FEATURE_FLAGS` at runtime.
|
|
16
|
+
- The SDK build now reads feature flags from `.env` / process env instead.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## API / SDK Changes
|
|
20
|
+
|
|
21
|
+
### SDK Build Feature Flags From Env
|
|
22
|
+
|
|
23
|
+
- `scripts/build-sdk.mts` now loads `.env` (or `.env.test` when `NODE_ENV=test`) instead of injecting `isolated_stores` into `process.env.FEATURE_FLAGS`.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Consumer Impact
|
|
27
|
+
|
|
28
|
+
### SDK Build Feature Flags From Env
|
|
29
|
+
|
|
30
|
+
- Keep `FEATURE_FLAGS=isolated_stores` in `.env` or the shell environment before running `npm run build:sdk` or `npm run build:sdk:push` when isolated-store contracts and related SDK extras must be included.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Verification
|
|
34
|
+
|
|
35
|
+
### SDK Build Feature Flags From Env
|
|
36
|
+
|
|
37
|
+
- `npm run build:sdk`
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Follow-ups
|
|
41
|
+
|
|
42
|
+
### SDK Build Feature Flags From Env
|
|
43
|
+
|
|
44
|
+
- Keep local `.env`, CI, and release environments aligned for any SDK builds that need feature-flagged contracts.
|
package/release-notes/latest.md
CHANGED