@fusebase/fusebase-gate-sdk 2.2.18 → 2.2.20-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.
- package/dist/apis/IsolatedStoresApi.d.ts +16 -1
- package/dist/apis/IsolatedStoresApi.js +15 -0
- package/dist/apis/PortalsApi.d.ts +23 -1
- package/dist/apis/PortalsApi.js +29 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/isolated-store/isolated-store.d.ts +109 -0
- package/dist/types/isolated-store/isolated-store.js +24 -1
- package/dist/types/portals/portals.d.ts +26 -0
- package/dist/types/portals/portals.js +2 -0
- package/package.json +1 -1
- package/release-notes/2.2.20-sdk.1.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.2.15-sdk.7.md +0 -122
- package/release-notes/2.2.18.md +0 -9
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: isolated-stores
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { AdoptIsolatedStoreSqlMigrationBaselineRequestContract, AdoptIsolatedStoreSqlMigrationBaselineResponseContract, ApplyIsolatedStoreSqlMigrationsRequestContract, ApplyIsolatedStoreSqlMigrationsResponseContract, AttachIsolatedStoreSourceScopeRequestContract, AttachIsolatedStoreSourceScopeResponseContract, CreateIsolatedStoreCheckpointRequestContract, CreateIsolatedStoreCheckpointResponseContract, CreateIsolatedStoreRequestContract, CreateIsolatedStoreResponseContract, DeleteIsolatedStoreResponseContract, DeleteIsolatedStoreStageResponseContract, GetIsolatedStoreSqlMigrationStatusRequestContract, GetOrCreateIsolatedStoreRequestContract, GetOrCreateIsolatedStoreResponseContract, InitIsolatedStoreStageRequestContract, InitIsolatedStoreStageResponseContract, IsolatedStoreIdInPathRequired, IsolatedStoreListResponseContract, IsolatedStoreResponseContract, IsolatedStoreRevisionIdInPathRequired, IsolatedStoreRevisionListResponseContract, IsolatedStoreSqlBatchInsertRequestContract, IsolatedStoreSqlBatchInsertResponseContract, IsolatedStoreSqlCountRequestContract, IsolatedStoreSqlCountResponseContract, IsolatedStoreSqlDeleteRequestContract, IsolatedStoreSqlDeleteResponseContract, IsolatedStoreSqlDescribeTableResponseContract, IsolatedStoreSqlExecuteRequestContract, IsolatedStoreSqlExecuteResponseContract, IsolatedStoreSqlImportRequestContract, IsolatedStoreSqlImportResponseContract, IsolatedStoreSqlInsertRequestContract, IsolatedStoreSqlInsertResponseContract, IsolatedStoreSqlListTablesResponseContract, IsolatedStoreSqlMigrationStatusContract, IsolatedStoreSqlQueryRequestContract, IsolatedStoreSqlQueryResponseContract, IsolatedStoreSqlSchemaNameInQueryOptional, IsolatedStoreSqlSelectRequestContract, IsolatedStoreSqlSelectResponseContract, IsolatedStoreSqlStatsResponseContract, IsolatedStoreSqlTableNameInPathRequired, IsolatedStoreSqlUpdateRequestContract, IsolatedStoreSqlUpdateResponseContract, IsolatedStoreStageInPathRequired, IsolatedStoreStageListResponseContract, ListIsolatedStoresAliasLikeInQueryOptional, ListIsolatedStoresClientIdInQueryOptional, orgIdInPathRequired, RepairIsolatedStoreSqlMigrationJournalChecksumsRequestContract, RepairIsolatedStoreSqlMigrationJournalChecksumsResponseContract, RestoreIsolatedStoreRevisionResponseContract } from "../types";
|
|
8
|
+
import type { AdoptIsolatedStoreSqlMigrationBaselineRequestContract, AdoptIsolatedStoreSqlMigrationBaselineResponseContract, ApplyIsolatedStoreSqlMigrationsRequestContract, ApplyIsolatedStoreSqlMigrationsResponseContract, AttachIsolatedStoreSourceScopeRequestContract, AttachIsolatedStoreSourceScopeResponseContract, CreateIsolatedStoreCheckpointRequestContract, CreateIsolatedStoreCheckpointResponseContract, CreateIsolatedStoreRequestContract, CreateIsolatedStoreResponseContract, DeleteIsolatedStoreResponseContract, DeleteIsolatedStoreStageResponseContract, GetIsolatedStoreSqlMigrationStatusRequestContract, GetOrCreateIsolatedStoreRequestContract, GetOrCreateIsolatedStoreResponseContract, InitIsolatedStoreStageRequestContract, InitIsolatedStoreStageResponseContract, IsolatedStoreIdInPathRequired, IsolatedStoreListResponseContract, IsolatedStoreResponseContract, IsolatedStoreRevisionIdInPathRequired, IsolatedStoreRevisionListResponseContract, IsolatedStoreSqlBatchInsertRequestContract, IsolatedStoreSqlBatchInsertResponseContract, IsolatedStoreSqlCountRequestContract, IsolatedStoreSqlCountResponseContract, IsolatedStoreSqlDeleteRequestContract, IsolatedStoreSqlDeleteResponseContract, IsolatedStoreSqlDescribeTableResponseContract, IsolatedStoreSqlExecuteRequestContract, IsolatedStoreSqlExecuteResponseContract, IsolatedStoreSqlImportRequestContract, IsolatedStoreSqlImportResponseContract, IsolatedStoreSqlInsertRequestContract, IsolatedStoreSqlInsertResponseContract, IsolatedStoreSqlListTablesResponseContract, IsolatedStoreSqlMigrationStatusContract, IsolatedStoreSqlQueryRequestContract, IsolatedStoreSqlQueryResponseContract, IsolatedStoreSqlRlsStatusResponseContract, IsolatedStoreSqlSchemaNameInQueryOptional, IsolatedStoreSqlSelectRequestContract, IsolatedStoreSqlSelectResponseContract, IsolatedStoreSqlStatsResponseContract, IsolatedStoreSqlTableNameInPathRequired, IsolatedStoreSqlUpdateRequestContract, IsolatedStoreSqlUpdateResponseContract, IsolatedStoreStageInPathRequired, IsolatedStoreStageListResponseContract, ListIsolatedStoresAliasLikeInQueryOptional, ListIsolatedStoresClientIdInQueryOptional, orgIdInPathRequired, RepairIsolatedStoreSqlMigrationJournalChecksumsRequestContract, RepairIsolatedStoreSqlMigrationJournalChecksumsResponseContract, RestoreIsolatedStoreRevisionResponseContract } from "../types";
|
|
9
9
|
export declare class IsolatedStoresApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -199,6 +199,21 @@ export declare class IsolatedStoresApi {
|
|
|
199
199
|
headers?: Record<string, string>;
|
|
200
200
|
body: GetIsolatedStoreSqlMigrationStatusRequestContract;
|
|
201
201
|
}): Promise<IsolatedStoreSqlMigrationStatusContract>;
|
|
202
|
+
/**
|
|
203
|
+
* Get SQL RLS status
|
|
204
|
+
* Returns read-only PostgreSQL row-level security introspection for the selected isolated store stage: table RLS flags, FORCE RLS flags, policies, columns, indexes, and table-level warnings. This is intended for Studio/support visibility; policy changes must still flow through app migrations.
|
|
205
|
+
*/
|
|
206
|
+
getIsolatedStoreSqlRlsStatus(params: {
|
|
207
|
+
path: {
|
|
208
|
+
orgId: orgIdInPathRequired;
|
|
209
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
210
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
211
|
+
};
|
|
212
|
+
query?: {
|
|
213
|
+
schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
|
|
214
|
+
};
|
|
215
|
+
headers?: Record<string, string>;
|
|
216
|
+
}): Promise<IsolatedStoreSqlRlsStatusResponseContract>;
|
|
202
217
|
/**
|
|
203
218
|
* Get SQL stats
|
|
204
219
|
* Returns table-level stats for the selected isolated postgres stage, including tables, columns, row counts, and relation-size hints.
|
|
@@ -232,6 +232,21 @@ class IsolatedStoresApi {
|
|
|
232
232
|
expectedContentType: "application/json",
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* Get SQL RLS status
|
|
237
|
+
* Returns read-only PostgreSQL row-level security introspection for the selected isolated store stage: table RLS flags, FORCE RLS flags, policies, columns, indexes, and table-level warnings. This is intended for Studio/support visibility; policy changes must still flow through app migrations.
|
|
238
|
+
*/
|
|
239
|
+
async getIsolatedStoreSqlRlsStatus(params) {
|
|
240
|
+
return this.client.request({
|
|
241
|
+
method: "GET",
|
|
242
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rls/status",
|
|
243
|
+
pathParams: params.path,
|
|
244
|
+
query: params.query,
|
|
245
|
+
headers: params.headers,
|
|
246
|
+
opId: "getIsolatedStoreSqlRlsStatus",
|
|
247
|
+
expectedContentType: "application/json",
|
|
248
|
+
});
|
|
249
|
+
}
|
|
235
250
|
/**
|
|
236
251
|
* Get SQL stats
|
|
237
252
|
* Returns table-level stats for the selected isolated postgres stage, including tables, columns, row counts, and relation-size hints.
|
|
@@ -5,10 +5,32 @@
|
|
|
5
5
|
* Domain: portals
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { orgIdInPathRequired, OrgPortalListResponseContract } from "../types";
|
|
8
|
+
import type { CreatePortalRequestContract, CreatePortalResponseContract, globalIdInPathRequired, orgIdInPathRequired, OrgPortalListResponseContract, PortalDetailContract } from "../types";
|
|
9
9
|
export declare class PortalsApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* Create a new portal
|
|
14
|
+
* Creates a new portal under the given org and workspace. Returns portal details and one-time admin credentials for the portal customizer. Requires org.write and org access.
|
|
15
|
+
*/
|
|
16
|
+
createPortal(params: {
|
|
17
|
+
path: {
|
|
18
|
+
orgId: orgIdInPathRequired;
|
|
19
|
+
};
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
body: CreatePortalRequestContract;
|
|
22
|
+
}): Promise<CreatePortalResponseContract>;
|
|
23
|
+
/**
|
|
24
|
+
* Get portal details
|
|
25
|
+
* Returns detailed information for a single portal by ID. Requires org.read access.
|
|
26
|
+
*/
|
|
27
|
+
getPortal(params: {
|
|
28
|
+
path: {
|
|
29
|
+
orgId: orgIdInPathRequired;
|
|
30
|
+
globalId: globalIdInPathRequired;
|
|
31
|
+
};
|
|
32
|
+
headers?: Record<string, string>;
|
|
33
|
+
}): Promise<PortalDetailContract>;
|
|
12
34
|
/**
|
|
13
35
|
* List organization portals
|
|
14
36
|
* Returns portals visible for the caller in the organization. Requires org.read and org access.
|
package/dist/apis/PortalsApi.js
CHANGED
|
@@ -11,6 +11,35 @@ class PortalsApi {
|
|
|
11
11
|
constructor(client) {
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Create a new portal
|
|
16
|
+
* Creates a new portal under the given org and workspace. Returns portal details and one-time admin credentials for the portal customizer. Requires org.write and org access.
|
|
17
|
+
*/
|
|
18
|
+
async createPortal(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/:orgId/portals",
|
|
22
|
+
pathParams: params.path,
|
|
23
|
+
headers: params.headers,
|
|
24
|
+
body: params.body,
|
|
25
|
+
opId: "createPortal",
|
|
26
|
+
expectedContentType: "application/json",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get portal details
|
|
31
|
+
* Returns detailed information for a single portal by ID. Requires org.read access.
|
|
32
|
+
*/
|
|
33
|
+
async getPortal(params) {
|
|
34
|
+
return this.client.request({
|
|
35
|
+
method: "GET",
|
|
36
|
+
path: "/:orgId/portals/:globalId",
|
|
37
|
+
pathParams: params.path,
|
|
38
|
+
headers: params.headers,
|
|
39
|
+
opId: "getPortal",
|
|
40
|
+
expectedContentType: "application/json",
|
|
41
|
+
});
|
|
42
|
+
}
|
|
14
43
|
/**
|
|
15
44
|
* List organization portals
|
|
16
45
|
* Returns portals visible for the caller in the organization. Requires org.read and org access.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type { MeAuthContract, MeOrgGroupContract, MeResponseContract, MeScopeCon
|
|
|
17
17
|
export * from "./note/note";
|
|
18
18
|
export * from "./org-group/org-group";
|
|
19
19
|
export type { OrgInviteContract, OrgMagicLinkContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserListResponseContract, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract } from "./org-user/org-user";
|
|
20
|
+
export type { CreatePortalRequestContract, CreatePortalResponseContract, PortalDetailContract, globalIdInPathRequired } from "./portals/portals";
|
|
20
21
|
export * from "./shared/common";
|
|
21
22
|
export * from "./shared/enums";
|
|
22
23
|
export type { GetHealth200ResponseContract } from "./shared/health";
|
|
@@ -107,6 +107,76 @@ export interface IsolatedStoreSqlStatsResponseContract {
|
|
|
107
107
|
totalBytes?: number | null;
|
|
108
108
|
tables: IsolatedStoreSqlTableStatsContract[];
|
|
109
109
|
}
|
|
110
|
+
export type IsolatedStoreSqlRlsWarningCodeContract = "rls_not_enabled" | "rls_not_forced" | "rls_enabled_without_policies";
|
|
111
|
+
export interface IsolatedStoreSqlRlsWarningContract {
|
|
112
|
+
code: IsolatedStoreSqlRlsWarningCodeContract;
|
|
113
|
+
message: string;
|
|
114
|
+
}
|
|
115
|
+
export interface IsolatedStoreSqlRlsPolicyContract {
|
|
116
|
+
policyName: string;
|
|
117
|
+
command: string;
|
|
118
|
+
roles: string[];
|
|
119
|
+
usingExpression?: string | null;
|
|
120
|
+
withCheckExpression?: string | null;
|
|
121
|
+
}
|
|
122
|
+
export interface IsolatedStoreSqlRlsIndexContract {
|
|
123
|
+
indexName: string;
|
|
124
|
+
isUnique: boolean;
|
|
125
|
+
columnNames: string[];
|
|
126
|
+
indexDefinition: string;
|
|
127
|
+
}
|
|
128
|
+
export interface IsolatedStoreSqlRlsTableStatusContract {
|
|
129
|
+
schemaName: string;
|
|
130
|
+
tableName: string;
|
|
131
|
+
tableType: string;
|
|
132
|
+
rlsEnabled: boolean;
|
|
133
|
+
rlsForced: boolean;
|
|
134
|
+
columns: IsolatedStoreSqlColumnContract[];
|
|
135
|
+
indexes: IsolatedStoreSqlRlsIndexContract[];
|
|
136
|
+
policies: IsolatedStoreSqlRlsPolicyContract[];
|
|
137
|
+
warnings: IsolatedStoreSqlRlsWarningContract[];
|
|
138
|
+
}
|
|
139
|
+
export interface IsolatedStoreSqlRlsStatusResponseContract {
|
|
140
|
+
databaseName: string;
|
|
141
|
+
schemaName: string;
|
|
142
|
+
tableCount: number;
|
|
143
|
+
rlsEnabledCount: number;
|
|
144
|
+
rlsForcedCount: number;
|
|
145
|
+
tables: IsolatedStoreSqlRlsTableStatusContract[];
|
|
146
|
+
}
|
|
147
|
+
export type IsolatedStoreSqlRlsTableClassificationContract = "tenant" | "user" | "owner_collaborator" | "scoped" | "none" | "technical";
|
|
148
|
+
export interface IsolatedStoreSqlRlsScopeManifestContract {
|
|
149
|
+
name: string;
|
|
150
|
+
column: string;
|
|
151
|
+
setting?: string | null;
|
|
152
|
+
}
|
|
153
|
+
export interface IsolatedStoreSqlRlsTableManifestContract {
|
|
154
|
+
classification: IsolatedStoreSqlRlsTableClassificationContract;
|
|
155
|
+
schemaName?: string | null;
|
|
156
|
+
orgColumn?: string | null;
|
|
157
|
+
userColumn?: string | null;
|
|
158
|
+
ownerColumn?: string | null;
|
|
159
|
+
collaboratorTable?: string | null;
|
|
160
|
+
scopes?: IsolatedStoreSqlRlsScopeManifestContract[] | null;
|
|
161
|
+
reason?: string | null;
|
|
162
|
+
}
|
|
163
|
+
export interface IsolatedStoreSqlRlsManifestContract {
|
|
164
|
+
tables: Record<string, IsolatedStoreSqlRlsTableManifestContract>;
|
|
165
|
+
}
|
|
166
|
+
export type IsolatedStoreSqlRlsValidationWarningCodeContract = "rls_manifest_table_missing" | "rls_manifest_column_missing" | "rls_manifest_index_missing" | "rls_manifest_policy_missing" | "rls_manifest_rls_not_enabled" | "rls_manifest_rls_not_forced" | "rls_manifest_exemption_reason_missing" | "rls_manifest_collaborator_table_missing";
|
|
167
|
+
export interface IsolatedStoreSqlRlsValidationWarningContract {
|
|
168
|
+
code: IsolatedStoreSqlRlsValidationWarningCodeContract;
|
|
169
|
+
message: string;
|
|
170
|
+
tableName: string;
|
|
171
|
+
schemaName?: string | null;
|
|
172
|
+
columnName?: string | null;
|
|
173
|
+
}
|
|
174
|
+
export interface IsolatedStoreSqlRlsValidationResultContract {
|
|
175
|
+
mode: "warn";
|
|
176
|
+
tableCount: number;
|
|
177
|
+
warningCount: number;
|
|
178
|
+
warnings: IsolatedStoreSqlRlsValidationWarningContract[];
|
|
179
|
+
}
|
|
110
180
|
export interface IsolatedStoreSqlMigrationBundleEntryContract {
|
|
111
181
|
version: number;
|
|
112
182
|
name: string;
|
|
@@ -173,10 +243,12 @@ export interface IsolatedStoreSqlMigrationStatusContract {
|
|
|
173
243
|
structuredIssues: IsolatedStoreSqlMigrationIssueContract[];
|
|
174
244
|
appliedMigrations: IsolatedStoreSqlAppliedMigrationContract[];
|
|
175
245
|
pendingMigrations: IsolatedStoreSqlMigrationBundleEntryContract[];
|
|
246
|
+
rlsValidation?: IsolatedStoreSqlRlsValidationResultContract | null;
|
|
176
247
|
}
|
|
177
248
|
export interface GetIsolatedStoreSqlMigrationStatusRequestContract {
|
|
178
249
|
schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
|
|
179
250
|
bundle: IsolatedStoreSqlMigrationBundleContract;
|
|
251
|
+
rlsManifest?: IsolatedStoreSqlRlsManifestContract | null;
|
|
180
252
|
/** Same optimistic-lock semantics as `applyIsolatedStoreSqlMigrations`; HTTP 409 when the journal tail disagrees. */
|
|
181
253
|
expectedLastAppliedVersion?: number | null;
|
|
182
254
|
expectedLastAppliedChecksum?: string | null;
|
|
@@ -189,6 +261,8 @@ export interface ApplyIsolatedStoreSqlMigrationsRequestContract {
|
|
|
189
261
|
* expected-head validation) but does not execute SQL or write the journal.
|
|
190
262
|
*/
|
|
191
263
|
dryRun?: boolean | null;
|
|
264
|
+
/** Optional warn-only RLS manifest validation for current/post-apply database state. */
|
|
265
|
+
rlsManifest?: IsolatedStoreSqlRlsManifestContract | null;
|
|
192
266
|
/**
|
|
193
267
|
* Optimistic lock: last applied migration version on the server must match.
|
|
194
268
|
* Omit to skip. Use `null` to require an empty journal (no rows applied).
|
|
@@ -211,6 +285,7 @@ export interface ApplyIsolatedStoreSqlMigrationsResponseContract {
|
|
|
211
285
|
export interface AdoptIsolatedStoreSqlMigrationBaselineRequestContract {
|
|
212
286
|
schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
|
|
213
287
|
bundle: IsolatedStoreSqlMigrationBundleContract;
|
|
288
|
+
rlsManifest?: IsolatedStoreSqlRlsManifestContract | null;
|
|
214
289
|
/** Validate eligibility and return the projected post-adoption status without writing the journal. */
|
|
215
290
|
dryRun?: boolean | null;
|
|
216
291
|
}
|
|
@@ -255,6 +330,7 @@ export interface IsolatedStoreSqlDescribeTableResponseContract {
|
|
|
255
330
|
export interface IsolatedStoreSqlQueryRequestContract {
|
|
256
331
|
sql: string;
|
|
257
332
|
params?: unknown[] | null;
|
|
333
|
+
rlsContext?: IsolatedStoreSqlRlsContextContract | null;
|
|
258
334
|
}
|
|
259
335
|
export interface IsolatedStoreSqlQueryResultContract {
|
|
260
336
|
command: string;
|
|
@@ -268,7 +344,10 @@ export interface IsolatedStoreSqlQueryResponseContract {
|
|
|
268
344
|
export interface IsolatedStoreSqlExecuteRequestContract {
|
|
269
345
|
sql: string;
|
|
270
346
|
params?: unknown[] | null;
|
|
347
|
+
rlsContext?: IsolatedStoreSqlRlsContextContract | null;
|
|
271
348
|
}
|
|
349
|
+
export type IsolatedStoreSqlRlsContextValueContract = string | number | boolean | null;
|
|
350
|
+
export type IsolatedStoreSqlRlsContextContract = Record<string, IsolatedStoreSqlRlsContextValueContract>;
|
|
272
351
|
export interface IsolatedStoreSqlExecuteResponseContract {
|
|
273
352
|
result: IsolatedStoreSqlQueryResultContract;
|
|
274
353
|
}
|
|
@@ -287,6 +366,7 @@ export interface IsolatedStoreSqlCountRequestContract {
|
|
|
287
366
|
schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
|
|
288
367
|
tableName: string;
|
|
289
368
|
filters?: IsolatedStoreSqlFilterContract[] | null;
|
|
369
|
+
rlsContext?: IsolatedStoreSqlRlsContextContract | null;
|
|
290
370
|
}
|
|
291
371
|
export interface IsolatedStoreSqlCountResponseContract {
|
|
292
372
|
count: number;
|
|
@@ -299,6 +379,7 @@ export interface IsolatedStoreSqlSelectRequestContract {
|
|
|
299
379
|
sort?: IsolatedStoreSqlSortContract[] | null;
|
|
300
380
|
limit?: number | null;
|
|
301
381
|
offset?: number | null;
|
|
382
|
+
rlsContext?: IsolatedStoreSqlRlsContextContract | null;
|
|
302
383
|
}
|
|
303
384
|
export interface IsolatedStoreSqlSelectResponseContract {
|
|
304
385
|
columns: string[];
|
|
@@ -314,6 +395,7 @@ export interface IsolatedStoreSqlInsertRequestContract {
|
|
|
314
395
|
tableName: string;
|
|
315
396
|
values: Record<string, unknown>;
|
|
316
397
|
returning?: string[] | null;
|
|
398
|
+
rlsContext?: IsolatedStoreSqlRlsContextContract | null;
|
|
317
399
|
}
|
|
318
400
|
export interface IsolatedStoreSqlInsertResponseContract {
|
|
319
401
|
rowCount: number;
|
|
@@ -324,6 +406,7 @@ export interface IsolatedStoreSqlBatchInsertRequestContract {
|
|
|
324
406
|
tableName: string;
|
|
325
407
|
rows: Record<string, unknown>[];
|
|
326
408
|
returning?: string[] | null;
|
|
409
|
+
rlsContext?: IsolatedStoreSqlRlsContextContract | null;
|
|
327
410
|
}
|
|
328
411
|
export interface IsolatedStoreSqlBatchInsertResponseContract {
|
|
329
412
|
rowCount: number;
|
|
@@ -338,6 +421,7 @@ export interface IsolatedStoreSqlImportRequestContract {
|
|
|
338
421
|
columns?: string[] | null;
|
|
339
422
|
hasHeader?: boolean | null;
|
|
340
423
|
nullString?: string | null;
|
|
424
|
+
rlsContext?: IsolatedStoreSqlRlsContextContract | null;
|
|
341
425
|
}
|
|
342
426
|
export interface IsolatedStoreSqlImportResponseContract {
|
|
343
427
|
imported: true;
|
|
@@ -352,6 +436,7 @@ export interface IsolatedStoreSqlUpdateRequestContract {
|
|
|
352
436
|
filters?: IsolatedStoreSqlFilterContract[] | null;
|
|
353
437
|
allowAll?: boolean | null;
|
|
354
438
|
returning?: string[] | null;
|
|
439
|
+
rlsContext?: IsolatedStoreSqlRlsContextContract | null;
|
|
355
440
|
}
|
|
356
441
|
export interface IsolatedStoreSqlUpdateResponseContract {
|
|
357
442
|
rowCount: number;
|
|
@@ -362,6 +447,7 @@ export interface IsolatedStoreSqlDeleteRequestContract {
|
|
|
362
447
|
tableName: string;
|
|
363
448
|
filters?: IsolatedStoreSqlFilterContract[] | null;
|
|
364
449
|
allowAll?: boolean | null;
|
|
450
|
+
rlsContext?: IsolatedStoreSqlRlsContextContract | null;
|
|
365
451
|
}
|
|
366
452
|
export interface IsolatedStoreSqlDeleteResponseContract {
|
|
367
453
|
rowCount: number;
|
|
@@ -487,6 +573,29 @@ export declare const IsolatedStoreScopeTypeContract: {
|
|
|
487
573
|
readonly ParentRow: "parent_row";
|
|
488
574
|
readonly ParentTable: "parent_table";
|
|
489
575
|
};
|
|
576
|
+
export declare const IsolatedStoreSqlRlsWarningCodeContract: {
|
|
577
|
+
readonly RlsNotEnabled: "rls_not_enabled";
|
|
578
|
+
readonly RlsNotForced: "rls_not_forced";
|
|
579
|
+
readonly RlsEnabledWithoutPolicies: "rls_enabled_without_policies";
|
|
580
|
+
};
|
|
581
|
+
export declare const IsolatedStoreSqlRlsTableClassificationContract: {
|
|
582
|
+
readonly Tenant: "tenant";
|
|
583
|
+
readonly User: "user";
|
|
584
|
+
readonly OwnerCollaborator: "owner_collaborator";
|
|
585
|
+
readonly Scoped: "scoped";
|
|
586
|
+
readonly None: "none";
|
|
587
|
+
readonly Technical: "technical";
|
|
588
|
+
};
|
|
589
|
+
export declare const IsolatedStoreSqlRlsValidationWarningCodeContract: {
|
|
590
|
+
readonly RlsManifestTableMissing: "rls_manifest_table_missing";
|
|
591
|
+
readonly RlsManifestColumnMissing: "rls_manifest_column_missing";
|
|
592
|
+
readonly RlsManifestIndexMissing: "rls_manifest_index_missing";
|
|
593
|
+
readonly RlsManifestPolicyMissing: "rls_manifest_policy_missing";
|
|
594
|
+
readonly RlsManifestRlsNotEnabled: "rls_manifest_rls_not_enabled";
|
|
595
|
+
readonly RlsManifestRlsNotForced: "rls_manifest_rls_not_forced";
|
|
596
|
+
readonly RlsManifestExemptionReasonMissing: "rls_manifest_exemption_reason_missing";
|
|
597
|
+
readonly RlsManifestCollaboratorTableMissing: "rls_manifest_collaborator_table_missing";
|
|
598
|
+
};
|
|
490
599
|
export declare const IsolatedStoreSqlMigrationIssueCodeContract: {
|
|
491
600
|
readonly IsolatedSqlJournalLongerThanBundle: "isolated_sql_journal_longer_than_bundle";
|
|
492
601
|
readonly IsolatedSqlVersionMismatch: "isolated_sql_version_mismatch";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IsolatedStoreSqlImportFormatContract = exports.IsolatedStoreSqlSortDirectionContract = exports.IsolatedStoreSqlFilterOperatorContract = exports.IsolatedStoreSqlMigrationIssueFieldContract = exports.IsolatedStoreSqlMigrationIssueCodeContract = exports.IsolatedStoreScopeTypeContract = exports.IsolatedStoreRevisionKindContract = exports.IsolatedStoreStageStatusContract = exports.IsolatedStoreStatusContract = exports.IsolatedStoreEngineContract = exports.IsolatedStoreTypeContract = void 0;
|
|
3
|
+
exports.IsolatedStoreSqlImportFormatContract = exports.IsolatedStoreSqlSortDirectionContract = exports.IsolatedStoreSqlFilterOperatorContract = exports.IsolatedStoreSqlMigrationIssueFieldContract = exports.IsolatedStoreSqlMigrationIssueCodeContract = exports.IsolatedStoreSqlRlsValidationWarningCodeContract = exports.IsolatedStoreSqlRlsTableClassificationContract = exports.IsolatedStoreSqlRlsWarningCodeContract = exports.IsolatedStoreScopeTypeContract = exports.IsolatedStoreRevisionKindContract = exports.IsolatedStoreStageStatusContract = exports.IsolatedStoreStatusContract = exports.IsolatedStoreEngineContract = exports.IsolatedStoreTypeContract = void 0;
|
|
4
4
|
exports.IsolatedStoreTypeContract = {
|
|
5
5
|
Sql: "sql"
|
|
6
6
|
};
|
|
@@ -32,6 +32,29 @@ exports.IsolatedStoreScopeTypeContract = {
|
|
|
32
32
|
ParentRow: "parent_row",
|
|
33
33
|
ParentTable: "parent_table"
|
|
34
34
|
};
|
|
35
|
+
exports.IsolatedStoreSqlRlsWarningCodeContract = {
|
|
36
|
+
RlsNotEnabled: "rls_not_enabled",
|
|
37
|
+
RlsNotForced: "rls_not_forced",
|
|
38
|
+
RlsEnabledWithoutPolicies: "rls_enabled_without_policies"
|
|
39
|
+
};
|
|
40
|
+
exports.IsolatedStoreSqlRlsTableClassificationContract = {
|
|
41
|
+
Tenant: "tenant",
|
|
42
|
+
User: "user",
|
|
43
|
+
OwnerCollaborator: "owner_collaborator",
|
|
44
|
+
Scoped: "scoped",
|
|
45
|
+
None: "none",
|
|
46
|
+
Technical: "technical"
|
|
47
|
+
};
|
|
48
|
+
exports.IsolatedStoreSqlRlsValidationWarningCodeContract = {
|
|
49
|
+
RlsManifestTableMissing: "rls_manifest_table_missing",
|
|
50
|
+
RlsManifestColumnMissing: "rls_manifest_column_missing",
|
|
51
|
+
RlsManifestIndexMissing: "rls_manifest_index_missing",
|
|
52
|
+
RlsManifestPolicyMissing: "rls_manifest_policy_missing",
|
|
53
|
+
RlsManifestRlsNotEnabled: "rls_manifest_rls_not_enabled",
|
|
54
|
+
RlsManifestRlsNotForced: "rls_manifest_rls_not_forced",
|
|
55
|
+
RlsManifestExemptionReasonMissing: "rls_manifest_exemption_reason_missing",
|
|
56
|
+
RlsManifestCollaboratorTableMissing: "rls_manifest_collaborator_table_missing"
|
|
57
|
+
};
|
|
35
58
|
exports.IsolatedStoreSqlMigrationIssueCodeContract = {
|
|
36
59
|
IsolatedSqlJournalLongerThanBundle: "isolated_sql_journal_longer_than_bundle",
|
|
37
60
|
IsolatedSqlVersionMismatch: "isolated_sql_version_mismatch",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type globalIdInPathRequired = string;
|
|
2
|
+
export type PortalThemeKey = "light_purple" | "soft_light" | "quite_green" | "space_gray" | "carbon" | "oxford" | "ultramarine" | "milky_blue" | "shades_of_green" | "savvy_red" | "light_orange" | "light_blue" | "lemon_drop";
|
|
3
|
+
export interface CreatePortalRequestContract {
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
domain: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Color theme key for the portal. When provided, applied via updateThemeSettings changeEvent. */
|
|
8
|
+
theme?: PortalThemeKey;
|
|
9
|
+
}
|
|
10
|
+
export interface CreatePortalResponseContract {
|
|
11
|
+
portal: PortalDetailContract;
|
|
12
|
+
}
|
|
13
|
+
export interface PortalDetailContract {
|
|
14
|
+
id: string;
|
|
15
|
+
orgId: string;
|
|
16
|
+
workspaceId: string;
|
|
17
|
+
domain: string;
|
|
18
|
+
status: string;
|
|
19
|
+
createdAt: number;
|
|
20
|
+
updatedAt: number;
|
|
21
|
+
lastPublishedAt?: number;
|
|
22
|
+
version: number;
|
|
23
|
+
cnameType?: string;
|
|
24
|
+
cnameValue?: string;
|
|
25
|
+
cnameStatus?: string;
|
|
26
|
+
}
|
package/package.json
CHANGED
package/release-notes/latest.md
CHANGED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# Release Notes 2.2.15-sdk.7
|
|
2
|
-
|
|
3
|
-
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.2.15-sdk.5`
|
|
5
|
-
- Generated at: 2026-05-22T11:41:28.271Z
|
|
6
|
-
|
|
7
|
-
## Included Drafts
|
|
8
|
-
|
|
9
|
-
- `docs/release-notes/2026-05-06-app-magic-links.md` - 2026-05-06-app-magic-links
|
|
10
|
-
- `docs/release-notes/2026-05-20-app-magic-links-product-app-naming.md` - 2026-05-20-app-magic-links-product-app-naming
|
|
11
|
-
- `docs/release-notes/2026-05-21-fusebase-auth-app-flows.md` - 2026-05-21-fusebase-auth-app-flows
|
|
12
|
-
- `docs/release-notes/2026-05-22-magic-link-access-principals-skills.md` - 2026-05-22 — Magic-link accessPrincipals and session-exchange skill guidance
|
|
13
|
-
|
|
14
|
-
## Summary
|
|
15
|
-
|
|
16
|
-
### 2026-05-06-app-magic-links
|
|
17
|
-
|
|
18
|
-
Surface AI App **Magic Link** flows through Gate. Three new ops let app owners and runtime apps issue, request, and activate magic links against `nimbus-ai`'s storage layer. Ships with a new `appMagicLinks` MCP prompt group and the regenerated `app-magic-links.md` skill reference under `generated/claude_skills/fusebase-gate/references/`.
|
|
19
|
-
|
|
20
|
-
### 2026-05-20-app-magic-links-product-app-naming
|
|
21
|
-
|
|
22
|
-
Update the `appMagicLinks` MCP prompt (and the regenerated `app-magic-links.md` skill reference) so it accounts for the `app → product` / `feature → app` rename. The magic-link **wire contract still uses the pre-rename field names** (`appId`, `appFeatureId`, `featureToken`), which no longer match the CLI (`fusebase.json`, `fusebase app list`). The stale skill caused agents to pass an App id where Gate expects a Product id, failing with `App not found`. No API, SDK, or permission changes — skill/prompt content only.
|
|
23
|
-
|
|
24
|
-
### 2026-05-22 — Magic-link accessPrincipals and session-exchange skill guidance
|
|
25
|
-
|
|
26
|
-
Expand MCP prompt / skill guidance so agents and app builders do not confuse **org membership** with **App `accessPrincipals`** (silent `requestAppMagicLink` no-ops) and document the **post-activation** pattern: exchange `featureToken` + `sessionToken` on the app backend with `EverHelper-Session-ID` before relying on platform cookies.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## API / SDK Changes
|
|
30
|
-
|
|
31
|
-
### 2026-05-06-app-magic-links
|
|
32
|
-
|
|
33
|
-
- New ops in `src/api/contracts/ops/app-magic-links/app-magic-links.ts`:
|
|
34
|
-
- `createAppMagicLink` — `POST /:orgId/apps/:appId/magic-links`. Owner/admin invite flow. Requires the new permission `app_magic_link.write` and org access.
|
|
35
|
-
- `requestAppMagicLink` — `POST /apps/by-host/:host/magic-links/request`. Visitor self-service flow (no auth). Always returns `{ ok: true }` so it cannot be used to enumerate emails or access state. Apply per-IP rate limiting upstream.
|
|
36
|
-
- `activateAppMagicLink` — `POST /apps/magic-links/:globalId/activate`. Visitor activation (no auth). Returns `{ id, sessionToken, featureToken, dashboardToken, redirectPath, expiresAt, appFeatureId }`. Surfaces `403` with `reason=expired|revoked` and `404` for unknown/deleted links.
|
|
37
|
-
- New permission `app_magic_link.write` registered in `GatePermission` and granted to owner/manager/member/guest roles via the existing `GATE_ALL_PERMISSIONS` set.
|
|
38
|
-
- New controller `AppMagicLinksController` (`src/controllers/app-magic-links/app-magic-links.ts`) and nimbus-ai client wrapper `src/clients/app-magic-link-client.ts`. The wrapper forwards the caller's userId via the standard `Authorization: Internal <userId>:gate` + `X-Secret` header pair on the create endpoint, and only `X-Secret` on the visitor endpoints.
|
|
39
|
-
- Bumped `@internal/nimbus-ai` peer to `^1.58.0` to pick up the new `apiCreateAppMagicLink`, `apiRequestAppMagicLink`, and `apiActivateAppMagicLink` methods. The 1.58.0 client is published by the nimbus-ai NIM-40935 MR (`internal/nimbus-ai!65`); CI on this MR will be red until that MR lands and the registry has 1.58.0.
|
|
40
|
-
|
|
41
|
-
### 2026-05-20-app-magic-links-product-app-naming
|
|
42
|
-
|
|
43
|
-
- None. The HTTP contracts, SDK, OpenAPI spec, and permissions are unchanged.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## Consumer Impact
|
|
47
|
-
|
|
48
|
-
### 2026-05-06-app-magic-links
|
|
49
|
-
|
|
50
|
-
- New SDK domain `AppMagicLinksApi` with three methods (`createAppMagicLink`, `requestAppMagicLink`, `activateAppMagicLink`) materialized in `generated/sdk-client/src/apis/AppMagicLinksApi.ts`.
|
|
51
|
-
- New SDK type module `generated/sdk-client/src/types/app-magic-link/`.
|
|
52
|
-
- Apps that want to ship a one-click client onboarding flow can now invite-by-email (with optional `addToAccessPrincipals=true` to provision a brand-new user) and surface a `/link?id=…&redirect=…` route in their SPA scaffold (see follow-up subtask NIM-41013 for the apps-cli template).
|
|
53
|
-
- The `request` endpoint never mutates `accessPrincipals` and never provisions users, by design — visitors can self-service only when they already have access.
|
|
54
|
-
- New MCP prompt group `appMagicLinks` (registered in `src/mcp/prompts/index.ts`) covers when to use each flow, deep-link `redirectPath` rules, and expired/revoked link handling. The op contracts declare `promptGroups: ["authz", "sdk", "appMagicLinks"]` (authed) and `["sdk", "appMagicLinks"]` (visitor), so prompt-aware MCP clients receive the guidance automatically.
|
|
55
|
-
- New skill reference file `generated/claude_skills/fusebase-gate/references/app-magic-links.md` (marker `mcp-app-magic-links-loaded`). `npm run mcp:skills:copy-to-apps-cli:local` propagates it into `apps-cli/project-template/.claude/skills/fusebase-gate/references/` for fresh `fusebase init` output.
|
|
56
|
-
|
|
57
|
-
### 2026-05-20-app-magic-links-product-app-naming
|
|
58
|
-
|
|
59
|
-
- `src/mcp/prompts/app-magic-links.ts` — bumped `version` `1.0.0` → `1.1.0`. New "Terminology: `product` / `app` vs the Gate wire contract" section maps the renamed concepts onto the unchanged wire fields:
|
|
60
|
-
- `createAppMagicLink`'s `appId` **path segment** is the **Product id** (`productId` in `fusebase.json`), not an App id.
|
|
61
|
-
- `appFeatureId` in the activation response and the scope of `featureToken` is an **App** id (`apps[].id` / `fusebase app list`).
|
|
62
|
-
- The wire field names stay at their pre-rename spelling for backward compatibility; only the human-facing concepts were renamed.
|
|
63
|
-
- The Invite-flow, Identity/Scoping, Activation, and Working-Rules sections now use `Product` / `App` consistently ("every App of the Product", "App-scoped by host", etc.) and call out the `App not found` failure mode explicitly.
|
|
64
|
-
- The Activation section now folds in the SPA `fetch`-vs-SDK note and the `fbsdashboardtoken` cookie detail, so the next `mcp:skills:copy-to-apps-cli` no longer reverts the apps-cli-side hand edits — the generated skill is the single source of truth again.
|
|
65
|
-
- Regenerated `generated/claude_skills/fusebase-gate/references/app-magic-links.md` (frontmatter `version: 1.1.0`). `apps-cli` receives the same file under `project-template/.claude/skills/fusebase-gate/references/`.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Verification
|
|
69
|
-
|
|
70
|
-
### 2026-05-06-app-magic-links
|
|
71
|
-
|
|
72
|
-
- `npm run lint`
|
|
73
|
-
- `npm test` (190 tests pass; new tests in `tests/unit/app-magic-links-contracts.test.ts` and `tests/unit/app-magic-links-controller.test.ts`)
|
|
74
|
-
- `npm run build`
|
|
75
|
-
- `FEATURE_FLAGS=isolated_sql_stores,isolated_nosql_stores npm run build:sdk` — SDK regenerated, `dist/apis/AppMagicLinksApi.{js,d.ts}` and `dist/types/app-magic-link/` produced; OpenAPI spec updated.
|
|
76
|
-
- `npm run mcp:skills:generate` — `app-magic-links.md` written under `generated/claude_skills/fusebase-gate/references/`; `SKILL.md` TOC updated.
|
|
77
|
-
- `npm run mcp:skills:validate` — passes (1 skill).
|
|
78
|
-
- `npm run mcp:skills:copy-to-apps-cli:local` — generated skill copied into the local apps-cli checkout (commit owned by NIM-41013).
|
|
79
|
-
|
|
80
|
-
### 2026-05-20-app-magic-links-product-app-naming
|
|
81
|
-
|
|
82
|
-
- `npm run build` — clean.
|
|
83
|
-
- `npm run lint` — 0 errors (5 pre-existing `dist/` warnings).
|
|
84
|
-
- `npm test` — 216 pass / 1 skipped, including the new `mcp-prompts.test.ts` case `maps the product/app rename onto the magic-link wire contract`.
|
|
85
|
-
- `npm run mcp:skills:generate` — only `app-magic-links.md` rewritten.
|
|
86
|
-
- `npm run mcp:skills:validate` — passes (1 skill).
|
|
87
|
-
|
|
88
|
-
### 2026-05-22 — Magic-link accessPrincipals and session-exchange skill guidance
|
|
89
|
-
|
|
90
|
-
- `npm test -- --runInBand tests/unit/mcp-prompts.test.ts`
|
|
91
|
-
- `npm run mcp:skills:generate`
|
|
92
|
-
- `npm run mcp:skills:validate`
|
|
93
|
-
- `npm run mcp:skills:copy-to-apps-cli:local` (optional; propagates to `apps-cli/project-template`)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
## Follow-ups
|
|
97
|
-
|
|
98
|
-
### 2026-05-06-app-magic-links
|
|
99
|
-
|
|
100
|
-
- **CI dependency:** the dependency bump to `@internal/nimbus-ai@^1.58.0` requires `internal/nimbus-ai!65` (NIM-40935) to merge and publish 1.58.0 to the GitLab npm registry. After it merges, this branch should be rebased and `npm install` re-run to refresh the lock file with the upstream-published integrity hash.
|
|
101
|
-
- **NIM-41013:** receive the generated skill in `apps-cli` and ship the `/link` route example in `feature-templates/spa/`. The skill file is already in the local apps-cli working tree from `mcp:skills:copy-to-apps-cli:local`; NIM-41013 owns the apps-cli commit.
|
|
102
|
-
|
|
103
|
-
### 2026-05-20-app-magic-links-product-app-naming
|
|
104
|
-
|
|
105
|
-
- Optional: align the magic-link wire field names (`appId` → `productId`, `appFeatureId` → `appId`) and the `nimbus-ai` `app_magic_links` columns with the new terminology. That is a contract/SDK change deferred as a separate product decision (see story-spec `NIM-40935/README.md` Open Questions); this change only makes the skill describe the current contract correctly.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
## Changes
|
|
109
|
-
|
|
110
|
-
### 2026-05-22 — Magic-link accessPrincipals and session-exchange skill guidance
|
|
111
|
-
|
|
112
|
-
- `src/mcp/prompts/fusebase-auth.ts` — `1.0.0` → `1.1.0`: `accessPrincipals` vs org membership, Memberspace `--access` checklist, magic-link → app session exchange.
|
|
113
|
-
- `src/mcp/prompts/app-magic-links.ts` — `1.1.0` → `1.2.0`: self-service diagnostics, principals table, activation/session exchange section; clarify `sessionToken` vs `featureToken`.
|
|
114
|
-
- `src/mcp/prompts/users.ts` — `1.0.0` → `1.1.0`: `addOrgUser` does not grant app principals / magic-link dispatch.
|
|
115
|
-
- Regenerated `generated/claude_skills/fusebase-gate/references/{fusebase-auth,app-magic-links,users}.md`.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
## Consumer impact
|
|
119
|
-
|
|
120
|
-
### 2026-05-22 — Magic-link accessPrincipals and session-exchange skill guidance
|
|
121
|
-
|
|
122
|
-
Documentation / agent guidance only — no API or permission changes.
|