@fusebase/fusebase-gate-sdk 2.2.10-sdk.0 → 2.2.10-sdk.2
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 +12 -1
- package/dist/apis/IsolatedStoresApi.js +15 -0
- package/dist/types/isolated-store/isolated-store.d.ts +29 -0
- package/package.json +1 -1
- package/release-notes/2.2.10-sdk.2.md +9 -0
- package/release-notes/latest.md +4 -66
- package/release-notes/2.2.10-sdk.0.md +0 -71
|
@@ -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, CreateIsolatedStoreCheckpointRequestContract, CreateIsolatedStoreCheckpointResponseContract, CreateIsolatedStoreRequestContract, CreateIsolatedStoreResponseContract, DeleteIsolatedStoreResponseContract, DeleteIsolatedStoreStageResponseContract, GetIsolatedStoreSqlMigrationStatusRequestContract, 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, RestoreIsolatedStoreRevisionResponseContract } from "../types";
|
|
8
|
+
import type { AdoptIsolatedStoreSqlMigrationBaselineRequestContract, AdoptIsolatedStoreSqlMigrationBaselineResponseContract, ApplyIsolatedStoreSqlMigrationsRequestContract, ApplyIsolatedStoreSqlMigrationsResponseContract, CreateIsolatedStoreCheckpointRequestContract, CreateIsolatedStoreCheckpointResponseContract, CreateIsolatedStoreRequestContract, CreateIsolatedStoreResponseContract, DeleteIsolatedStoreResponseContract, DeleteIsolatedStoreStageResponseContract, GetIsolatedStoreSqlMigrationStatusRequestContract, GetOrIsolatedStoreRequestContract, GetOrIsolatedStoreResponseContract, 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, RestoreIsolatedStoreRevisionResponseContract } from "../types";
|
|
9
9
|
export declare class IsolatedStoresApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -186,6 +186,17 @@ export declare class IsolatedStoresApi {
|
|
|
186
186
|
};
|
|
187
187
|
headers?: Record<string, string>;
|
|
188
188
|
}): Promise<IsolatedStoreSqlStatsResponseContract>;
|
|
189
|
+
/**
|
|
190
|
+
* Get or create isolated store
|
|
191
|
+
* Idempotent control-plane operation for app-owned stores. Resolves an existing store by org/client/alias or creates it. Optionally bootstraps target stage from a source org store/stage using checkpoint/restore.
|
|
192
|
+
*/
|
|
193
|
+
getOrIsolatedStore(params: {
|
|
194
|
+
path: {
|
|
195
|
+
orgId: orgIdInPathRequired;
|
|
196
|
+
};
|
|
197
|
+
headers?: Record<string, string>;
|
|
198
|
+
body: GetOrIsolatedStoreRequestContract;
|
|
199
|
+
}): Promise<GetOrIsolatedStoreResponseContract>;
|
|
189
200
|
/**
|
|
190
201
|
* Import CSV or TSV rows
|
|
191
202
|
* Imports CSV or TSV payloads into a postgres table using server-side COPY FROM STDIN. Use this bulk path for large seeds or migrations instead of repeated row inserts. Max UTF-8 payload size defaults to 64MiB (override ISOLATED_SQL_IMPORT_MAX_PAYLOAD_BYTES; hard cap 256MiB); split larger files across multiple calls.
|
|
@@ -217,6 +217,21 @@ class IsolatedStoresApi {
|
|
|
217
217
|
expectedContentType: "application/json",
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Get or create isolated store
|
|
222
|
+
* Idempotent control-plane operation for app-owned stores. Resolves an existing store by org/client/alias or creates it. Optionally bootstraps target stage from a source org store/stage using checkpoint/restore.
|
|
223
|
+
*/
|
|
224
|
+
async getOrIsolatedStore(params) {
|
|
225
|
+
return this.client.request({
|
|
226
|
+
method: "POST",
|
|
227
|
+
path: "/:orgId/isolated-stores/get-or",
|
|
228
|
+
pathParams: params.path,
|
|
229
|
+
headers: params.headers,
|
|
230
|
+
body: params.body,
|
|
231
|
+
opId: "getOrIsolatedStore",
|
|
232
|
+
expectedContentType: "application/json",
|
|
233
|
+
});
|
|
234
|
+
}
|
|
220
235
|
/**
|
|
221
236
|
* Import CSV or TSV rows
|
|
222
237
|
* Imports CSV or TSV payloads into a postgres table using server-side COPY FROM STDIN. Use this bulk path for large seeds or migrations instead of repeated row inserts. Max UTF-8 payload size defaults to 64MiB (override ISOLATED_SQL_IMPORT_MAX_PAYLOAD_BYTES; hard cap 256MiB); split larger files across multiple calls.
|
|
@@ -367,6 +367,35 @@ export interface IsolatedStoreListResponseContract {
|
|
|
367
367
|
export type ListIsolatedStoresClientIdInQueryOptional = string | null;
|
|
368
368
|
/** Optional `aliasLike` query for `listIsolatedStores`; exact alias or glob (`*`, `?`). */
|
|
369
369
|
export type ListIsolatedStoresAliasLikeInQueryOptional = string | null;
|
|
370
|
+
export interface GetOrIsolatedStoreSourceContract {
|
|
371
|
+
orgId: string;
|
|
372
|
+
storeId?: string | null;
|
|
373
|
+
alias?: string | null;
|
|
374
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
375
|
+
copyStrategy?: "checkpoint_restore" | null;
|
|
376
|
+
}
|
|
377
|
+
export interface GetOrIsolatedStoreRequestContract {
|
|
378
|
+
clientId: string;
|
|
379
|
+
alias: string;
|
|
380
|
+
storeType: IsolatedStoreTypeContract;
|
|
381
|
+
engine: IsolatedStoreEngineContract;
|
|
382
|
+
targetStage: IsolatedStoreStageInPathRequired;
|
|
383
|
+
source?: GetOrIsolatedStoreSourceContract | null;
|
|
384
|
+
}
|
|
385
|
+
export interface GetOrIsolatedStoreResponseContract {
|
|
386
|
+
created: boolean;
|
|
387
|
+
cloned: boolean;
|
|
388
|
+
store: IsolatedStoreContract;
|
|
389
|
+
stageInstance: IsolatedStoreStageInstanceContract;
|
|
390
|
+
source?: {
|
|
391
|
+
orgId: string;
|
|
392
|
+
storeId: string;
|
|
393
|
+
alias: string;
|
|
394
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
395
|
+
} | null;
|
|
396
|
+
copiedFromRevision?: IsolatedStoreRevisionContract | null;
|
|
397
|
+
lineageMetadata?: Record<string, unknown> | null;
|
|
398
|
+
}
|
|
370
399
|
export interface IsolatedStoreResponseContract {
|
|
371
400
|
store: IsolatedStoreContract;
|
|
372
401
|
}
|
package/package.json
CHANGED
package/release-notes/latest.md
CHANGED
|
@@ -1,71 +1,9 @@
|
|
|
1
|
-
# Release Notes 2.2.10-sdk.
|
|
1
|
+
# Release Notes 2.2.10-sdk.2
|
|
2
2
|
|
|
3
3
|
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.2.10-sdk.
|
|
5
|
-
- Generated at: 2026-04-
|
|
4
|
+
- Previous tag: `v2.2.10-sdk.2`
|
|
5
|
+
- Generated at: 2026-04-22T13:21:20.139Z
|
|
6
6
|
|
|
7
7
|
## Included Drafts
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
## Summary
|
|
12
|
-
|
|
13
|
-
### 2026-04-20-azure-file-upload-api
|
|
14
|
-
|
|
15
|
-
Added org-scoped file upload, read-url, and deletion endpoints for Azure Blob Storage direct transfers, then hardened the multipart token flow, moved container creation out of per-request runtime handling, and introduced public-vs-private file visibility with stable public asset URLs.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## API / SDK Changes
|
|
19
|
-
|
|
20
|
-
### 2026-04-20-azure-file-upload-api
|
|
21
|
-
|
|
22
|
-
- Added `POST /:orgId/files/prepare-upload` to generate a short-lived SAS upload URL, blob `fileId`, required upload headers, expiration time, `visibility`, and an optional stable `publicUrl`.
|
|
23
|
-
- Added `POST /:orgId/files/uploads/start` to start an explicit Azure block-blob multipart upload and return an opaque `uploadId`.
|
|
24
|
-
- Added `POST /:orgId/files/uploads/:uploadId/complete` to commit the staged Azure block ids for a multipart upload and return the final file `visibility` plus optional `publicUrl`.
|
|
25
|
-
- Added `POST /:orgId/files/download-url` to generate either a short-lived read-only SAS URL or a stable public URL for a previously uploaded org-scoped blob.
|
|
26
|
-
- Added `DELETE /:orgId/files` to delete a previously prepared org-scoped blob by `fileId` in the request body, with optional `visibility` for public assets.
|
|
27
|
-
- Added the generated `FilesApi` SDK surface for these operations.
|
|
28
|
-
- Hardened multipart `uploadId` values so they are signed and expiring instead of plain base64 payloads.
|
|
29
|
-
- Removed container creation from the request path; upload preparation now performs only blob-level work.
|
|
30
|
-
- Added optional startup-time container initialization through `AZURE_STORAGE_CREATE_CONTAINER_ON_STARTUP`.
|
|
31
|
-
- Added optional public file storage configuration through `AZURE_STORAGE_PUBLIC_CONTAINER` and `AZURE_STORAGE_PUBLIC_BASE_URL`.
|
|
32
|
-
- Added Gate MCP guidance for file-upload flows and new `files.write` and `files.read` permissions.
|
|
33
|
-
- Added Gate-side validation limits for file upload inputs and composed Azure blob paths so oversized names fail fast with clear `400` responses.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## Consumer Impact
|
|
37
|
-
|
|
38
|
-
### 2026-04-20-azure-file-upload-api
|
|
39
|
-
|
|
40
|
-
- Clients should upload file bytes directly to Azure Blob Storage using the returned `uploadUrl`, `method`, and `headers`; Gate does not proxy file bytes.
|
|
41
|
-
- Clients should download file bytes directly from Azure Blob Storage or the configured public asset origin using the returned `downloadUrl`; Gate does not proxy file bytes for reads either.
|
|
42
|
-
- Multipart clients should stage blocks directly against the returned `uploadUrl`, keep the base64 block ids they used, and send those ids to `completeMultipartFileUpload`.
|
|
43
|
-
- Treat multipart `uploadId` values as opaque short-lived server tokens. Clients must not decode, modify, or synthesize them.
|
|
44
|
-
- Persist the returned `fileId` exactly as-is if the app needs to read or delete the blob later.
|
|
45
|
-
- Persist the returned `visibility` as well when there is no separate file record yet; public reads and deletes rely on that value to resolve the correct storage container.
|
|
46
|
-
- Use `visibility: "public"` on upload-start requests when the app needs a stable asset URL for long-lived embeds such as blog images or `<img src>` values.
|
|
47
|
-
- Use `getFileDownloadUrl` with `access: "temporary"` for protected or expiring reads, and `access: "public"` for stable public URLs. `disposition: "attachment"` is only supported for temporary reads.
|
|
48
|
-
- Upload preparation now rejects `filename` values longer than 255 characters, `folder` values longer than 512 characters, `contentType` values longer than 255 characters, and `fileId` values longer than Azure's 1,024-character blob-name limit.
|
|
49
|
-
- Gate also rejects composed blob paths that exceed Azure naming limits or contain too many path segments for safe Azure Blob usage.
|
|
50
|
-
- Runtime configuration now expects `AZURE_STORAGE_ACCOUNT_NAME` and can optionally use `AZURE_STORAGE_CONTAINER`, `AZURE_STORAGE_PUBLIC_CONTAINER`, `AZURE_STORAGE_PUBLIC_BASE_URL`, `AZURE_STORAGE_ACCOUNT_KEY`, `AZURE_STORAGE_UPLOAD_URL_TTL_SECONDS`, `AZURE_STORAGE_UPLOAD_ID_SECRET`, and `AZURE_STORAGE_CREATE_CONTAINER_ON_STARTUP`.
|
|
51
|
-
- Preferred deployment model is a pre-created container from infrastructure. Startup-time container creation is opt-in for environments that intentionally grant container-management permissions.
|
|
52
|
-
- Stable public URLs only work when the configured public container or CDN-backed base URL is actually publicly reachable; Gate does not probe public reachability per request.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## Verification
|
|
56
|
-
|
|
57
|
-
### 2026-04-20-azure-file-upload-api
|
|
58
|
-
|
|
59
|
-
- `npm run build:sdk`
|
|
60
|
-
- `npm run mcp:skills:generate`
|
|
61
|
-
- `npm run mcp:skills:validate`
|
|
62
|
-
- `npm test`
|
|
63
|
-
- `npm run lint`
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
## Follow-ups
|
|
67
|
-
|
|
68
|
-
### 2026-04-20-azure-file-upload-api
|
|
69
|
-
|
|
70
|
-
- Wire the new Azure storage env vars into the active Fusebase Gate Helm chart values and secrets once the deployment chart path and environment-specific account values are confirmed.
|
|
71
|
-
- If the production environment supports Microsoft Entra or managed identity, prefer user delegation SAS over account-key SAS.
|
|
9
|
+
- None
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Release Notes 2.2.10-sdk.0
|
|
2
|
-
|
|
3
|
-
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.2.10-sdk.0`
|
|
5
|
-
- Generated at: 2026-04-22T07:58:13.022Z
|
|
6
|
-
|
|
7
|
-
## Included Drafts
|
|
8
|
-
|
|
9
|
-
- `docs/release-notes/2026-04-20-azure-file-upload-api.md` - 2026-04-20-azure-file-upload-api
|
|
10
|
-
|
|
11
|
-
## Summary
|
|
12
|
-
|
|
13
|
-
### 2026-04-20-azure-file-upload-api
|
|
14
|
-
|
|
15
|
-
Added org-scoped file upload, read-url, and deletion endpoints for Azure Blob Storage direct transfers, then hardened the multipart token flow, moved container creation out of per-request runtime handling, and introduced public-vs-private file visibility with stable public asset URLs.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## API / SDK Changes
|
|
19
|
-
|
|
20
|
-
### 2026-04-20-azure-file-upload-api
|
|
21
|
-
|
|
22
|
-
- Added `POST /:orgId/files/prepare-upload` to generate a short-lived SAS upload URL, blob `fileId`, required upload headers, expiration time, `visibility`, and an optional stable `publicUrl`.
|
|
23
|
-
- Added `POST /:orgId/files/uploads/start` to start an explicit Azure block-blob multipart upload and return an opaque `uploadId`.
|
|
24
|
-
- Added `POST /:orgId/files/uploads/:uploadId/complete` to commit the staged Azure block ids for a multipart upload and return the final file `visibility` plus optional `publicUrl`.
|
|
25
|
-
- Added `POST /:orgId/files/download-url` to generate either a short-lived read-only SAS URL or a stable public URL for a previously uploaded org-scoped blob.
|
|
26
|
-
- Added `DELETE /:orgId/files` to delete a previously prepared org-scoped blob by `fileId` in the request body, with optional `visibility` for public assets.
|
|
27
|
-
- Added the generated `FilesApi` SDK surface for these operations.
|
|
28
|
-
- Hardened multipart `uploadId` values so they are signed and expiring instead of plain base64 payloads.
|
|
29
|
-
- Removed container creation from the request path; upload preparation now performs only blob-level work.
|
|
30
|
-
- Added optional startup-time container initialization through `AZURE_STORAGE_CREATE_CONTAINER_ON_STARTUP`.
|
|
31
|
-
- Added optional public file storage configuration through `AZURE_STORAGE_PUBLIC_CONTAINER` and `AZURE_STORAGE_PUBLIC_BASE_URL`.
|
|
32
|
-
- Added Gate MCP guidance for file-upload flows and new `files.write` and `files.read` permissions.
|
|
33
|
-
- Added Gate-side validation limits for file upload inputs and composed Azure blob paths so oversized names fail fast with clear `400` responses.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## Consumer Impact
|
|
37
|
-
|
|
38
|
-
### 2026-04-20-azure-file-upload-api
|
|
39
|
-
|
|
40
|
-
- Clients should upload file bytes directly to Azure Blob Storage using the returned `uploadUrl`, `method`, and `headers`; Gate does not proxy file bytes.
|
|
41
|
-
- Clients should download file bytes directly from Azure Blob Storage or the configured public asset origin using the returned `downloadUrl`; Gate does not proxy file bytes for reads either.
|
|
42
|
-
- Multipart clients should stage blocks directly against the returned `uploadUrl`, keep the base64 block ids they used, and send those ids to `completeMultipartFileUpload`.
|
|
43
|
-
- Treat multipart `uploadId` values as opaque short-lived server tokens. Clients must not decode, modify, or synthesize them.
|
|
44
|
-
- Persist the returned `fileId` exactly as-is if the app needs to read or delete the blob later.
|
|
45
|
-
- Persist the returned `visibility` as well when there is no separate file record yet; public reads and deletes rely on that value to resolve the correct storage container.
|
|
46
|
-
- Use `visibility: "public"` on upload-start requests when the app needs a stable asset URL for long-lived embeds such as blog images or `<img src>` values.
|
|
47
|
-
- Use `getFileDownloadUrl` with `access: "temporary"` for protected or expiring reads, and `access: "public"` for stable public URLs. `disposition: "attachment"` is only supported for temporary reads.
|
|
48
|
-
- Upload preparation now rejects `filename` values longer than 255 characters, `folder` values longer than 512 characters, `contentType` values longer than 255 characters, and `fileId` values longer than Azure's 1,024-character blob-name limit.
|
|
49
|
-
- Gate also rejects composed blob paths that exceed Azure naming limits or contain too many path segments for safe Azure Blob usage.
|
|
50
|
-
- Runtime configuration now expects `AZURE_STORAGE_ACCOUNT_NAME` and can optionally use `AZURE_STORAGE_CONTAINER`, `AZURE_STORAGE_PUBLIC_CONTAINER`, `AZURE_STORAGE_PUBLIC_BASE_URL`, `AZURE_STORAGE_ACCOUNT_KEY`, `AZURE_STORAGE_UPLOAD_URL_TTL_SECONDS`, `AZURE_STORAGE_UPLOAD_ID_SECRET`, and `AZURE_STORAGE_CREATE_CONTAINER_ON_STARTUP`.
|
|
51
|
-
- Preferred deployment model is a pre-created container from infrastructure. Startup-time container creation is opt-in for environments that intentionally grant container-management permissions.
|
|
52
|
-
- Stable public URLs only work when the configured public container or CDN-backed base URL is actually publicly reachable; Gate does not probe public reachability per request.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## Verification
|
|
56
|
-
|
|
57
|
-
### 2026-04-20-azure-file-upload-api
|
|
58
|
-
|
|
59
|
-
- `npm run build:sdk`
|
|
60
|
-
- `npm run mcp:skills:generate`
|
|
61
|
-
- `npm run mcp:skills:validate`
|
|
62
|
-
- `npm test`
|
|
63
|
-
- `npm run lint`
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
## Follow-ups
|
|
67
|
-
|
|
68
|
-
### 2026-04-20-azure-file-upload-api
|
|
69
|
-
|
|
70
|
-
- Wire the new Azure storage env vars into the active Fusebase Gate Helm chart values and secrets once the deployment chart path and environment-specific account values are confirmed.
|
|
71
|
-
- If the production environment supports Microsoft Entra or managed identity, prefer user delegation SAS over account-key SAS.
|