@fusebase/fusebase-gate-sdk 2.2.2-sdk.20 → 2.2.2-sdk.22
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 +51 -1
- package/dist/apis/IsolatedStoresApi.js +58 -0
- package/dist/types/isolated-store/isolated-store.d.ts +75 -0
- package/package.json +1 -1
- package/release-notes/2.2.2-sdk.22.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.2.2-sdk.20.md +0 -9
|
@@ -5,10 +5,23 @@
|
|
|
5
5
|
* Domain: isolated-stores
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { CountIsolatedStoreNoSqlDocumentsRequestContract, CountIsolatedStoreNoSqlDocumentsResponseContract, CreateIsolatedStoreCheckpointRequestContract, CreateIsolatedStoreCheckpointResponseContract, CreateIsolatedStoreNoSqlCollectionRequestContract, CreateIsolatedStoreNoSqlCollectionResponseContract, CreateIsolatedStoreRequestContract, CreateIsolatedStoreResponseContract, DeleteIsolatedStoreNoSqlDocumentResponseContract, DeleteIsolatedStoreStageResponseContract, ImportIsolatedStoreNoSqlDocumentsRequestContract, ImportIsolatedStoreNoSqlDocumentsResponseContract, InitIsolatedStoreStageRequestContract, InitIsolatedStoreStageResponseContract, IsolatedStoreIdInPathRequired, IsolatedStoreListResponseContract, IsolatedStoreNoSqlCollectionNameInPathRequired, IsolatedStoreNoSqlDocumentIdInPathRequired, IsolatedStoreNoSqlDocumentResponseContract, IsolatedStoreNoSqlListCollectionsResponseContract, IsolatedStoreResponseContract, IsolatedStoreRevisionIdInPathRequired, IsolatedStoreRevisionListResponseContract, IsolatedStoreSqlBatchInsertRequestContract, IsolatedStoreSqlBatchInsertResponseContract, IsolatedStoreSqlCountRequestContract, IsolatedStoreSqlCountResponseContract, IsolatedStoreSqlDeleteRequestContract, IsolatedStoreSqlDeleteResponseContract, IsolatedStoreSqlDescribeTableResponseContract, IsolatedStoreSqlExecuteRequestContract, IsolatedStoreSqlExecuteResponseContract, IsolatedStoreSqlImportRequestContract, IsolatedStoreSqlImportResponseContract, IsolatedStoreSqlInsertRequestContract, IsolatedStoreSqlInsertResponseContract, IsolatedStoreSqlListTablesResponseContract, IsolatedStoreSqlQueryRequestContract, IsolatedStoreSqlQueryResponseContract, IsolatedStoreSqlSchemaNameInQueryOptional, IsolatedStoreSqlSelectRequestContract, IsolatedStoreSqlSelectResponseContract, IsolatedStoreSqlTableNameInPathRequired, IsolatedStoreSqlUpdateRequestContract, IsolatedStoreSqlUpdateResponseContract, IsolatedStoreStageInPathRequired, IsolatedStoreStageListResponseContract, orgIdInPathRequired, PutIsolatedStoreNoSqlDocumentRequestContract, PutIsolatedStoreNoSqlDocumentResponseContract, QueryIsolatedStoreNoSqlDocumentsRequestContract, QueryIsolatedStoreNoSqlDocumentsResponseContract, RestoreIsolatedStoreRevisionResponseContract } from "../types";
|
|
8
|
+
import type { ApplyIsolatedStoreSqlMigrationsRequestContract, ApplyIsolatedStoreSqlMigrationsResponseContract, CountIsolatedStoreNoSqlDocumentsRequestContract, CountIsolatedStoreNoSqlDocumentsResponseContract, CreateIsolatedStoreCheckpointRequestContract, CreateIsolatedStoreCheckpointResponseContract, CreateIsolatedStoreNoSqlCollectionRequestContract, CreateIsolatedStoreNoSqlCollectionResponseContract, CreateIsolatedStoreRequestContract, CreateIsolatedStoreResponseContract, DeleteIsolatedStoreNoSqlDocumentResponseContract, DeleteIsolatedStoreStageResponseContract, GetIsolatedStoreSqlMigrationStatusRequestContract, ImportIsolatedStoreNoSqlDocumentsRequestContract, ImportIsolatedStoreNoSqlDocumentsResponseContract, InitIsolatedStoreStageRequestContract, InitIsolatedStoreStageResponseContract, IsolatedStoreIdInPathRequired, IsolatedStoreListResponseContract, IsolatedStoreNoSqlCollectionNameInPathRequired, IsolatedStoreNoSqlDocumentIdInPathRequired, IsolatedStoreNoSqlDocumentResponseContract, IsolatedStoreNoSqlListCollectionsResponseContract, IsolatedStoreNoSqlStatsResponseContract, 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, orgIdInPathRequired, PutIsolatedStoreNoSqlDocumentRequestContract, PutIsolatedStoreNoSqlDocumentResponseContract, QueryIsolatedStoreNoSqlDocumentsRequestContract, QueryIsolatedStoreNoSqlDocumentsResponseContract, RestoreIsolatedStoreRevisionResponseContract } from "../types";
|
|
9
9
|
export declare class IsolatedStoresApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* Apply SQL migrations
|
|
14
|
+
* Applies pending postgres migrations from an ordered migration bundle into the selected stage database. For prod, gate creates a checkpoint automatically before applying pending migrations. Applied history must match the bundle prefix exactly; drifted stages are rejected.
|
|
15
|
+
*/
|
|
16
|
+
applyIsolatedStoreSqlMigrations(params: {
|
|
17
|
+
path: {
|
|
18
|
+
orgId: orgIdInPathRequired;
|
|
19
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
20
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
21
|
+
};
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
body: ApplyIsolatedStoreSqlMigrationsRequestContract;
|
|
24
|
+
}): Promise<ApplyIsolatedStoreSqlMigrationsResponseContract>;
|
|
12
25
|
/**
|
|
13
26
|
* Batch insert rows
|
|
14
27
|
* Inserts multiple rows into a postgres table with a shared column set. Row cap per request is floor(65535 / columnCount) (Postgres bind-parameter limit). For very large loads use importIsolatedStoreSqlRows (COPY FROM STDIN).
|
|
@@ -178,6 +191,43 @@ export declare class IsolatedStoresApi {
|
|
|
178
191
|
};
|
|
179
192
|
headers?: Record<string, string>;
|
|
180
193
|
}): Promise<IsolatedStoreNoSqlDocumentResponseContract>;
|
|
194
|
+
/**
|
|
195
|
+
* Get NoSQL stats
|
|
196
|
+
* Returns collection-level stats for the selected isolated Mongo stage, including collection names, document counts, and storage-size hints when available.
|
|
197
|
+
*/
|
|
198
|
+
getIsolatedStoreNoSqlStats(params: {
|
|
199
|
+
path: {
|
|
200
|
+
orgId: orgIdInPathRequired;
|
|
201
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
202
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
203
|
+
};
|
|
204
|
+
headers?: Record<string, string>;
|
|
205
|
+
}): Promise<IsolatedStoreNoSqlStatsResponseContract>;
|
|
206
|
+
/**
|
|
207
|
+
* Get SQL migration status
|
|
208
|
+
* Compares an ordered SQL migration bundle with the migration journal stored inside the selected postgres stage database. Returns applied migrations, pending migrations, and drift issues when the applied history no longer matches the bundle prefix.
|
|
209
|
+
*/
|
|
210
|
+
getIsolatedStoreSqlMigrationStatus(params: {
|
|
211
|
+
path: {
|
|
212
|
+
orgId: orgIdInPathRequired;
|
|
213
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
214
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
215
|
+
};
|
|
216
|
+
headers?: Record<string, string>;
|
|
217
|
+
body: GetIsolatedStoreSqlMigrationStatusRequestContract;
|
|
218
|
+
}): Promise<IsolatedStoreSqlMigrationStatusContract>;
|
|
219
|
+
/**
|
|
220
|
+
* Get SQL stats
|
|
221
|
+
* Returns table-level stats for the selected isolated postgres stage, including tables, columns, row counts, and relation-size hints.
|
|
222
|
+
*/
|
|
223
|
+
getIsolatedStoreSqlStats(params: {
|
|
224
|
+
path: {
|
|
225
|
+
orgId: orgIdInPathRequired;
|
|
226
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
227
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
228
|
+
};
|
|
229
|
+
headers?: Record<string, string>;
|
|
230
|
+
}): Promise<IsolatedStoreSqlStatsResponseContract>;
|
|
181
231
|
/**
|
|
182
232
|
* Import NDJSON documents
|
|
183
233
|
* Imports newline-delimited JSON documents into a Mongo collection. Use this bulk path for large seed or migration-style writes instead of per-document tool calls.
|
|
@@ -11,6 +11,21 @@ class IsolatedStoresApi {
|
|
|
11
11
|
constructor(client) {
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Apply SQL migrations
|
|
16
|
+
* Applies pending postgres migrations from an ordered migration bundle into the selected stage database. For prod, gate creates a checkpoint automatically before applying pending migrations. Applied history must match the bundle prefix exactly; drifted stages are rejected.
|
|
17
|
+
*/
|
|
18
|
+
async applyIsolatedStoreSqlMigrations(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/migrations/apply",
|
|
22
|
+
pathParams: params.path,
|
|
23
|
+
headers: params.headers,
|
|
24
|
+
body: params.body,
|
|
25
|
+
opId: "applyIsolatedStoreSqlMigrations",
|
|
26
|
+
expectedContentType: "application/json",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
14
29
|
/**
|
|
15
30
|
* Batch insert rows
|
|
16
31
|
* Inserts multiple rows into a postgres table with a shared column set. Row cap per request is floor(65535 / columnCount) (Postgres bind-parameter limit). For very large loads use importIsolatedStoreSqlRows (COPY FROM STDIN).
|
|
@@ -202,6 +217,49 @@ class IsolatedStoresApi {
|
|
|
202
217
|
expectedContentType: "application/json",
|
|
203
218
|
});
|
|
204
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Get NoSQL stats
|
|
222
|
+
* Returns collection-level stats for the selected isolated Mongo stage, including collection names, document counts, and storage-size hints when available.
|
|
223
|
+
*/
|
|
224
|
+
async getIsolatedStoreNoSqlStats(params) {
|
|
225
|
+
return this.client.request({
|
|
226
|
+
method: "GET",
|
|
227
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/stats",
|
|
228
|
+
pathParams: params.path,
|
|
229
|
+
headers: params.headers,
|
|
230
|
+
opId: "getIsolatedStoreNoSqlStats",
|
|
231
|
+
expectedContentType: "application/json",
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Get SQL migration status
|
|
236
|
+
* Compares an ordered SQL migration bundle with the migration journal stored inside the selected postgres stage database. Returns applied migrations, pending migrations, and drift issues when the applied history no longer matches the bundle prefix.
|
|
237
|
+
*/
|
|
238
|
+
async getIsolatedStoreSqlMigrationStatus(params) {
|
|
239
|
+
return this.client.request({
|
|
240
|
+
method: "POST",
|
|
241
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/migrations/status",
|
|
242
|
+
pathParams: params.path,
|
|
243
|
+
headers: params.headers,
|
|
244
|
+
body: params.body,
|
|
245
|
+
opId: "getIsolatedStoreSqlMigrationStatus",
|
|
246
|
+
expectedContentType: "application/json",
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Get SQL stats
|
|
251
|
+
* Returns table-level stats for the selected isolated postgres stage, including tables, columns, row counts, and relation-size hints.
|
|
252
|
+
*/
|
|
253
|
+
async getIsolatedStoreSqlStats(params) {
|
|
254
|
+
return this.client.request({
|
|
255
|
+
method: "GET",
|
|
256
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/stats",
|
|
257
|
+
pathParams: params.path,
|
|
258
|
+
headers: params.headers,
|
|
259
|
+
opId: "getIsolatedStoreSqlStats",
|
|
260
|
+
expectedContentType: "application/json",
|
|
261
|
+
});
|
|
262
|
+
}
|
|
205
263
|
/**
|
|
206
264
|
* Import NDJSON documents
|
|
207
265
|
* Imports newline-delimited JSON documents into a Mongo collection. Use this bulk path for large seed or migration-style writes instead of per-document tool calls.
|
|
@@ -99,6 +99,67 @@ export interface IsolatedStoreSqlTableDescriptionContract {
|
|
|
99
99
|
tableName: string;
|
|
100
100
|
columns: IsolatedStoreSqlColumnContract[];
|
|
101
101
|
}
|
|
102
|
+
export interface IsolatedStoreSqlTableStatsContract {
|
|
103
|
+
schemaName: string;
|
|
104
|
+
tableName: string;
|
|
105
|
+
tableType: string;
|
|
106
|
+
rowCount: number;
|
|
107
|
+
totalBytes?: number | null;
|
|
108
|
+
columns: IsolatedStoreSqlColumnContract[];
|
|
109
|
+
}
|
|
110
|
+
export interface IsolatedStoreSqlStatsResponseContract {
|
|
111
|
+
databaseName: string;
|
|
112
|
+
schemaName: string;
|
|
113
|
+
tableCount: number;
|
|
114
|
+
totalRowCount: number;
|
|
115
|
+
totalBytes?: number | null;
|
|
116
|
+
tables: IsolatedStoreSqlTableStatsContract[];
|
|
117
|
+
}
|
|
118
|
+
export interface IsolatedStoreSqlMigrationBundleEntryContract {
|
|
119
|
+
version: number;
|
|
120
|
+
name: string;
|
|
121
|
+
checksum: string;
|
|
122
|
+
sql: string;
|
|
123
|
+
}
|
|
124
|
+
export interface IsolatedStoreSqlMigrationBundleContract {
|
|
125
|
+
bundleVersion?: string | null;
|
|
126
|
+
migrations: IsolatedStoreSqlMigrationBundleEntryContract[];
|
|
127
|
+
}
|
|
128
|
+
export interface IsolatedStoreSqlAppliedMigrationContract {
|
|
129
|
+
version: number;
|
|
130
|
+
name: string;
|
|
131
|
+
checksum: string;
|
|
132
|
+
bundleVersion?: string | null;
|
|
133
|
+
appliedAt: string;
|
|
134
|
+
appliedBy: string;
|
|
135
|
+
}
|
|
136
|
+
export interface IsolatedStoreSqlMigrationStatusContract {
|
|
137
|
+
databaseName: string;
|
|
138
|
+
schemaName: string;
|
|
139
|
+
journalTableName: string;
|
|
140
|
+
currentVersion?: number | null;
|
|
141
|
+
bundleHeadVersion?: number | null;
|
|
142
|
+
appliedCount: number;
|
|
143
|
+
pendingCount: number;
|
|
144
|
+
isDrifted: boolean;
|
|
145
|
+
issues: string[];
|
|
146
|
+
appliedMigrations: IsolatedStoreSqlAppliedMigrationContract[];
|
|
147
|
+
pendingMigrations: IsolatedStoreSqlMigrationBundleEntryContract[];
|
|
148
|
+
}
|
|
149
|
+
export interface GetIsolatedStoreSqlMigrationStatusRequestContract {
|
|
150
|
+
schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
|
|
151
|
+
bundle: IsolatedStoreSqlMigrationBundleContract;
|
|
152
|
+
}
|
|
153
|
+
export interface ApplyIsolatedStoreSqlMigrationsRequestContract {
|
|
154
|
+
schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
|
|
155
|
+
bundle: IsolatedStoreSqlMigrationBundleContract;
|
|
156
|
+
}
|
|
157
|
+
export interface ApplyIsolatedStoreSqlMigrationsResponseContract {
|
|
158
|
+
appliedCount: number;
|
|
159
|
+
appliedVersions: number[];
|
|
160
|
+
checkpointRevision?: IsolatedStoreRevisionContract | null;
|
|
161
|
+
status: IsolatedStoreSqlMigrationStatusContract;
|
|
162
|
+
}
|
|
102
163
|
export interface IsolatedStoreSqlListTablesResponseContract {
|
|
103
164
|
tables: IsolatedStoreSqlTableContract[];
|
|
104
165
|
}
|
|
@@ -269,6 +330,20 @@ export interface RestoreIsolatedStoreRevisionResponseContract {
|
|
|
269
330
|
export interface IsolatedStoreNoSqlCollectionContract {
|
|
270
331
|
collectionName: string;
|
|
271
332
|
}
|
|
333
|
+
export interface IsolatedStoreNoSqlCollectionStatsContract {
|
|
334
|
+
collectionName: string;
|
|
335
|
+
documentCount: number;
|
|
336
|
+
sizeBytes?: number | null;
|
|
337
|
+
storageSizeBytes?: number | null;
|
|
338
|
+
avgDocumentSizeBytes?: number | null;
|
|
339
|
+
}
|
|
340
|
+
export interface IsolatedStoreNoSqlStatsResponseContract {
|
|
341
|
+
databaseName: string;
|
|
342
|
+
collectionCount: number;
|
|
343
|
+
totalDocumentCount: number;
|
|
344
|
+
totalSizeBytes?: number | null;
|
|
345
|
+
collections: IsolatedStoreNoSqlCollectionStatsContract[];
|
|
346
|
+
}
|
|
272
347
|
export interface IsolatedStoreNoSqlListCollectionsResponseContract {
|
|
273
348
|
collections: IsolatedStoreNoSqlCollectionContract[];
|
|
274
349
|
}
|
package/package.json
CHANGED
package/release-notes/latest.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Release Notes 2.2.2-sdk.
|
|
1
|
+
# Release Notes 2.2.2-sdk.22
|
|
2
2
|
|
|
3
3
|
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.2.2-sdk.
|
|
5
|
-
- Generated at: 2026-04-
|
|
4
|
+
- Previous tag: `v2.2.2-sdk.22`
|
|
5
|
+
- Generated at: 2026-04-04T19:05:46.075Z
|
|
6
6
|
|
|
7
7
|
## Included Drafts
|
|
8
8
|
|