@fusebase/fusebase-gate-sdk 2.2.2-sdk.21 → 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 +27 -1
- package/dist/apis/IsolatedStoresApi.js +30 -0
- package/dist/types/isolated-store/isolated-store.d.ts +45 -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.21.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, IsolatedStoreNoSqlStatsResponseContract, IsolatedStoreResponseContract, IsolatedStoreRevisionIdInPathRequired, IsolatedStoreRevisionListResponseContract, IsolatedStoreSqlBatchInsertRequestContract, IsolatedStoreSqlBatchInsertResponseContract, IsolatedStoreSqlCountRequestContract, IsolatedStoreSqlCountResponseContract, IsolatedStoreSqlDeleteRequestContract, IsolatedStoreSqlDeleteResponseContract, IsolatedStoreSqlDescribeTableResponseContract, IsolatedStoreSqlExecuteRequestContract, IsolatedStoreSqlExecuteResponseContract, IsolatedStoreSqlImportRequestContract, IsolatedStoreSqlImportResponseContract, IsolatedStoreSqlInsertRequestContract, IsolatedStoreSqlInsertResponseContract, IsolatedStoreSqlListTablesResponseContract, IsolatedStoreSqlQueryRequestContract, IsolatedStoreSqlQueryResponseContract, IsolatedStoreSqlSchemaNameInQueryOptional, IsolatedStoreSqlSelectRequestContract, IsolatedStoreSqlSelectResponseContract, IsolatedStoreSqlStatsResponseContract, 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).
|
|
@@ -190,6 +203,19 @@ export declare class IsolatedStoresApi {
|
|
|
190
203
|
};
|
|
191
204
|
headers?: Record<string, string>;
|
|
192
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>;
|
|
193
219
|
/**
|
|
194
220
|
* Get SQL stats
|
|
195
221
|
* Returns table-level stats for the selected isolated postgres stage, including tables, columns, row counts, and relation-size hints.
|
|
@@ -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).
|
|
@@ -216,6 +231,21 @@ class IsolatedStoresApi {
|
|
|
216
231
|
expectedContentType: "application/json",
|
|
217
232
|
});
|
|
218
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
|
+
}
|
|
219
249
|
/**
|
|
220
250
|
* Get SQL stats
|
|
221
251
|
* Returns table-level stats for the selected isolated postgres stage, including tables, columns, row counts, and relation-size hints.
|
|
@@ -115,6 +115,51 @@ export interface IsolatedStoreSqlStatsResponseContract {
|
|
|
115
115
|
totalBytes?: number | null;
|
|
116
116
|
tables: IsolatedStoreSqlTableStatsContract[];
|
|
117
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
|
+
}
|
|
118
163
|
export interface IsolatedStoreSqlListTablesResponseContract {
|
|
119
164
|
tables: IsolatedStoreSqlTableContract[];
|
|
120
165
|
}
|
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
|
|