@fusebase/fusebase-gate-sdk 2.2.6-sdk.4 → 2.2.10-sdk.0
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/FilesApi.d.ts +68 -0
- package/dist/apis/FilesApi.js +90 -0
- package/dist/apis/IsolatedStoresApi.d.ts +3 -2
- package/dist/apis/IsolatedStoresApi.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/types/file/file.d.ts +125 -0
- package/dist/types/file/file.js +21 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/isolated-store/isolated-store.d.ts +2 -0
- package/package.json +1 -1
- package/release-notes/2.2.10-sdk.0.md +71 -0
- package/release-notes/latest.md +66 -4
- package/release-notes/2.2.6-sdk.4.md +0 -9
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Files API
|
|
3
|
+
*
|
|
4
|
+
* Generated from contract introspection
|
|
5
|
+
* Domain: files
|
|
6
|
+
*/
|
|
7
|
+
import type { Client } from "../runtime/transport";
|
|
8
|
+
import type { CompleteMultipartFileUploadRequestContract, CompleteMultipartFileUploadResponseContract, DeleteFileRequestContract, DeleteFileResponseContract, GetFileDownloadUrlRequestContract, GetFileDownloadUrlResponseContract, MultipartUploadIdInPathRequired, orgIdInPathRequired, PrepareFileUploadRequestContract, PrepareFileUploadResponseContract, StartMultipartFileUploadResponseContract } from "../types";
|
|
9
|
+
export declare class FilesApi {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* Complete multipart file upload
|
|
14
|
+
* Commits the provided Azure block ids for a previously started multipart upload.
|
|
15
|
+
*/
|
|
16
|
+
completeMultipartFileUpload(params: {
|
|
17
|
+
path: {
|
|
18
|
+
orgId: orgIdInPathRequired;
|
|
19
|
+
uploadId: MultipartUploadIdInPathRequired;
|
|
20
|
+
};
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
body: CompleteMultipartFileUploadRequestContract;
|
|
23
|
+
}): Promise<CompleteMultipartFileUploadResponseContract>;
|
|
24
|
+
/**
|
|
25
|
+
* Delete file
|
|
26
|
+
* Deletes an org-scoped Azure Blob by the previously returned fileId. Public assets must resend their stored visibility so Gate can resolve the correct container without a DB record.
|
|
27
|
+
*/
|
|
28
|
+
deleteFile(params: {
|
|
29
|
+
path: {
|
|
30
|
+
orgId: orgIdInPathRequired;
|
|
31
|
+
};
|
|
32
|
+
headers?: Record<string, string>;
|
|
33
|
+
body: DeleteFileRequestContract;
|
|
34
|
+
}): Promise<DeleteFileResponseContract>;
|
|
35
|
+
/**
|
|
36
|
+
* Get file read URL
|
|
37
|
+
* Creates either a short-lived Azure Blob read URL or a stable public URL for a previously uploaded org-scoped file, depending on the requested access mode. Gate never handles the file bytes.
|
|
38
|
+
*/
|
|
39
|
+
getFileDownloadUrl(params: {
|
|
40
|
+
path: {
|
|
41
|
+
orgId: orgIdInPathRequired;
|
|
42
|
+
};
|
|
43
|
+
headers?: Record<string, string>;
|
|
44
|
+
body: GetFileDownloadUrlRequestContract;
|
|
45
|
+
}): Promise<GetFileDownloadUrlResponseContract>;
|
|
46
|
+
/**
|
|
47
|
+
* Prepare direct file upload
|
|
48
|
+
* Creates a short-lived Azure Blob upload URL for the organization. Uploads default to private storage, but callers may request public visibility when the service is configured with a public container. Gate never handles the file bytes.
|
|
49
|
+
*/
|
|
50
|
+
prepareFileUpload(params: {
|
|
51
|
+
path: {
|
|
52
|
+
orgId: orgIdInPathRequired;
|
|
53
|
+
};
|
|
54
|
+
headers?: Record<string, string>;
|
|
55
|
+
body: PrepareFileUploadRequestContract;
|
|
56
|
+
}): Promise<PrepareFileUploadResponseContract>;
|
|
57
|
+
/**
|
|
58
|
+
* Start multipart file upload
|
|
59
|
+
* Creates a short-lived Azure Blob upload URL for block staging and returns a signed, short-lived uploadId for later completion. Multipart uploads also support optional public visibility when the service is configured for public assets.
|
|
60
|
+
*/
|
|
61
|
+
startMultipartFileUpload(params: {
|
|
62
|
+
path: {
|
|
63
|
+
orgId: orgIdInPathRequired;
|
|
64
|
+
};
|
|
65
|
+
headers?: Record<string, string>;
|
|
66
|
+
body: PrepareFileUploadRequestContract;
|
|
67
|
+
}): Promise<StartMultipartFileUploadResponseContract>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Files API
|
|
4
|
+
*
|
|
5
|
+
* Generated from contract introspection
|
|
6
|
+
* Domain: files
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.FilesApi = void 0;
|
|
10
|
+
class FilesApi {
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Complete multipart file upload
|
|
16
|
+
* Commits the provided Azure block ids for a previously started multipart upload.
|
|
17
|
+
*/
|
|
18
|
+
async completeMultipartFileUpload(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/:orgId/files/uploads/:uploadId/complete",
|
|
22
|
+
pathParams: params.path,
|
|
23
|
+
headers: params.headers,
|
|
24
|
+
body: params.body,
|
|
25
|
+
opId: "completeMultipartFileUpload",
|
|
26
|
+
expectedContentType: "application/json",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Delete file
|
|
31
|
+
* Deletes an org-scoped Azure Blob by the previously returned fileId. Public assets must resend their stored visibility so Gate can resolve the correct container without a DB record.
|
|
32
|
+
*/
|
|
33
|
+
async deleteFile(params) {
|
|
34
|
+
return this.client.request({
|
|
35
|
+
method: "DELETE",
|
|
36
|
+
path: "/:orgId/files",
|
|
37
|
+
pathParams: params.path,
|
|
38
|
+
headers: params.headers,
|
|
39
|
+
body: params.body,
|
|
40
|
+
opId: "deleteFile",
|
|
41
|
+
expectedContentType: "application/json",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get file read URL
|
|
46
|
+
* Creates either a short-lived Azure Blob read URL or a stable public URL for a previously uploaded org-scoped file, depending on the requested access mode. Gate never handles the file bytes.
|
|
47
|
+
*/
|
|
48
|
+
async getFileDownloadUrl(params) {
|
|
49
|
+
return this.client.request({
|
|
50
|
+
method: "POST",
|
|
51
|
+
path: "/:orgId/files/download-url",
|
|
52
|
+
pathParams: params.path,
|
|
53
|
+
headers: params.headers,
|
|
54
|
+
body: params.body,
|
|
55
|
+
opId: "getFileDownloadUrl",
|
|
56
|
+
expectedContentType: "application/json",
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Prepare direct file upload
|
|
61
|
+
* Creates a short-lived Azure Blob upload URL for the organization. Uploads default to private storage, but callers may request public visibility when the service is configured with a public container. Gate never handles the file bytes.
|
|
62
|
+
*/
|
|
63
|
+
async prepareFileUpload(params) {
|
|
64
|
+
return this.client.request({
|
|
65
|
+
method: "POST",
|
|
66
|
+
path: "/:orgId/files/prepare-upload",
|
|
67
|
+
pathParams: params.path,
|
|
68
|
+
headers: params.headers,
|
|
69
|
+
body: params.body,
|
|
70
|
+
opId: "prepareFileUpload",
|
|
71
|
+
expectedContentType: "application/json",
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Start multipart file upload
|
|
76
|
+
* Creates a short-lived Azure Blob upload URL for block staging and returns a signed, short-lived uploadId for later completion. Multipart uploads also support optional public visibility when the service is configured for public assets.
|
|
77
|
+
*/
|
|
78
|
+
async startMultipartFileUpload(params) {
|
|
79
|
+
return this.client.request({
|
|
80
|
+
method: "POST",
|
|
81
|
+
path: "/:orgId/files/uploads/start",
|
|
82
|
+
pathParams: params.path,
|
|
83
|
+
headers: params.headers,
|
|
84
|
+
body: params.body,
|
|
85
|
+
opId: "startMultipartFileUpload",
|
|
86
|
+
expectedContentType: "application/json",
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.FilesApi = FilesApi;
|
|
@@ -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, ListIsolatedStoresClientIdInQueryOptional, orgIdInPathRequired, RestoreIsolatedStoreRevisionResponseContract } from "../types";
|
|
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";
|
|
9
9
|
export declare class IsolatedStoresApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -238,7 +238,7 @@ export declare class IsolatedStoresApi {
|
|
|
238
238
|
}): Promise<IsolatedStoreRevisionListResponseContract>;
|
|
239
239
|
/**
|
|
240
240
|
* List isolated stores
|
|
241
|
-
* Returns the isolated store registry for the organization. Optional query `clientId` limits results to stores whose `app` source scope `sourceId` matches (same identifier as the token `client` scope for app-owned stores). Omit or leave empty to list all org stores. This is a control-plane endpoint behind FEATURE_FLAGS=isolated_stores.
|
|
241
|
+
* Returns the isolated store registry for the organization. Optional query `clientId` limits results to stores whose `app` source scope `sourceId` matches (same identifier as the token `client` scope for app-owned stores). Optional query `aliasLike` supports either an exact alias or a glob pattern (`*`, `?`) against store alias. Omit or leave empty to list all org stores. This is a control-plane endpoint behind FEATURE_FLAGS=isolated_stores.
|
|
242
242
|
*/
|
|
243
243
|
listIsolatedStores(params: {
|
|
244
244
|
path: {
|
|
@@ -246,6 +246,7 @@ export declare class IsolatedStoresApi {
|
|
|
246
246
|
};
|
|
247
247
|
query?: {
|
|
248
248
|
clientId?: ListIsolatedStoresClientIdInQueryOptional;
|
|
249
|
+
aliasLike?: ListIsolatedStoresAliasLikeInQueryOptional;
|
|
249
250
|
};
|
|
250
251
|
headers?: Record<string, string>;
|
|
251
252
|
}): Promise<IsolatedStoreListResponseContract>;
|
|
@@ -278,7 +278,7 @@ class IsolatedStoresApi {
|
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
280
280
|
* List isolated stores
|
|
281
|
-
* Returns the isolated store registry for the organization. Optional query `clientId` limits results to stores whose `app` source scope `sourceId` matches (same identifier as the token `client` scope for app-owned stores). Omit or leave empty to list all org stores. This is a control-plane endpoint behind FEATURE_FLAGS=isolated_stores.
|
|
281
|
+
* Returns the isolated store registry for the organization. Optional query `clientId` limits results to stores whose `app` source scope `sourceId` matches (same identifier as the token `client` scope for app-owned stores). Optional query `aliasLike` supports either an exact alias or a glob pattern (`*`, `?`) against store alias. Omit or leave empty to list all org stores. This is a control-plane endpoint behind FEATURE_FLAGS=isolated_stores.
|
|
282
282
|
*/
|
|
283
283
|
async listIsolatedStores(params) {
|
|
284
284
|
return this.client.request({
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./types";
|
|
|
8
8
|
export { AccessApi } from "./apis/AccessApi";
|
|
9
9
|
export { BillingApi } from "./apis/BillingApi";
|
|
10
10
|
export { EmailsApi } from "./apis/EmailsApi";
|
|
11
|
+
export { FilesApi } from "./apis/FilesApi";
|
|
11
12
|
export { HealthApi } from "./apis/HealthApi";
|
|
12
13
|
export { IsolatedStoresApi } from "./apis/IsolatedStoresApi";
|
|
13
14
|
export { NotesApi } from "./apis/NotesApi";
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.WorkspacesApi = exports.TokensApi = exports.SystemApi = exports.PortalsApi = exports.OrgUsersApi = exports.OrgGroupsApi = exports.NotesApi = exports.IsolatedStoresApi = exports.HealthApi = exports.EmailsApi = exports.BillingApi = exports.AccessApi = void 0;
|
|
22
|
+
exports.WorkspacesApi = exports.TokensApi = exports.SystemApi = exports.PortalsApi = exports.OrgUsersApi = exports.OrgGroupsApi = exports.NotesApi = exports.IsolatedStoresApi = exports.HealthApi = exports.FilesApi = exports.EmailsApi = exports.BillingApi = exports.AccessApi = void 0;
|
|
23
23
|
__exportStar(require("./runtime"), exports);
|
|
24
24
|
__exportStar(require("./types"), exports);
|
|
25
25
|
var AccessApi_1 = require("./apis/AccessApi");
|
|
@@ -28,6 +28,8 @@ var BillingApi_1 = require("./apis/BillingApi");
|
|
|
28
28
|
Object.defineProperty(exports, "BillingApi", { enumerable: true, get: function () { return BillingApi_1.BillingApi; } });
|
|
29
29
|
var EmailsApi_1 = require("./apis/EmailsApi");
|
|
30
30
|
Object.defineProperty(exports, "EmailsApi", { enumerable: true, get: function () { return EmailsApi_1.EmailsApi; } });
|
|
31
|
+
var FilesApi_1 = require("./apis/FilesApi");
|
|
32
|
+
Object.defineProperty(exports, "FilesApi", { enumerable: true, get: function () { return FilesApi_1.FilesApi; } });
|
|
31
33
|
var HealthApi_1 = require("./apis/HealthApi");
|
|
32
34
|
Object.defineProperty(exports, "HealthApi", { enumerable: true, get: function () { return HealthApi_1.HealthApi; } });
|
|
33
35
|
var IsolatedStoresApi_1 = require("./apis/IsolatedStoresApi");
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export type FileIdInPathRequired = string;
|
|
2
|
+
export type MultipartUploadIdInPathRequired = string;
|
|
3
|
+
export type FileUploadMethodContract = "PUT";
|
|
4
|
+
export type FileDownloadMethodContract = "GET";
|
|
5
|
+
export type FileVisibilityContract = "private" | "public";
|
|
6
|
+
export type FileReadAccessContract = "temporary" | "public";
|
|
7
|
+
export type FileReadDispositionContract = "inline" | "attachment";
|
|
8
|
+
export interface PrepareFileUploadRequestContract {
|
|
9
|
+
filename: string;
|
|
10
|
+
contentType?: string | null;
|
|
11
|
+
folder?: string | null;
|
|
12
|
+
visibility?: FileVisibilityContract | null;
|
|
13
|
+
}
|
|
14
|
+
export interface DeleteFileRequestContract {
|
|
15
|
+
fileId: string;
|
|
16
|
+
visibility?: FileVisibilityContract | null;
|
|
17
|
+
}
|
|
18
|
+
export interface GetFileDownloadUrlRequestContract {
|
|
19
|
+
fileId: string;
|
|
20
|
+
visibility?: FileVisibilityContract | null;
|
|
21
|
+
access?: FileReadAccessContract | null;
|
|
22
|
+
disposition?: FileReadDispositionContract | null;
|
|
23
|
+
}
|
|
24
|
+
export interface FileUploadHeadersContract {
|
|
25
|
+
"x-ms-blob-type": "BlockBlob";
|
|
26
|
+
"Content-Type": string;
|
|
27
|
+
}
|
|
28
|
+
export interface PrepareFileUploadResponseContract {
|
|
29
|
+
/**
|
|
30
|
+
* Opaque file identifier to persist for later read and deletion calls.
|
|
31
|
+
*/
|
|
32
|
+
fileId: string;
|
|
33
|
+
visibility: FileVisibilityContract;
|
|
34
|
+
/**
|
|
35
|
+
* Stable public URL when `visibility` is `public`; otherwise `null`.
|
|
36
|
+
* @format uri
|
|
37
|
+
*/
|
|
38
|
+
publicUrl: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* @format uri
|
|
41
|
+
*/
|
|
42
|
+
uploadUrl: string;
|
|
43
|
+
method: FileUploadMethodContract;
|
|
44
|
+
headers: FileUploadHeadersContract;
|
|
45
|
+
/**
|
|
46
|
+
* @format date-time
|
|
47
|
+
*/
|
|
48
|
+
expiresAt: string;
|
|
49
|
+
}
|
|
50
|
+
export interface DeleteFileResponseContract {
|
|
51
|
+
fileId: string;
|
|
52
|
+
visibility: FileVisibilityContract;
|
|
53
|
+
deleted: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface GetFileDownloadUrlResponseContract {
|
|
56
|
+
fileId: string;
|
|
57
|
+
visibility: FileVisibilityContract;
|
|
58
|
+
access: FileReadAccessContract;
|
|
59
|
+
/**
|
|
60
|
+
* @format uri
|
|
61
|
+
*/
|
|
62
|
+
downloadUrl: string;
|
|
63
|
+
method: FileDownloadMethodContract;
|
|
64
|
+
/**
|
|
65
|
+
* @format date-time
|
|
66
|
+
*/
|
|
67
|
+
expiresAt: string | null;
|
|
68
|
+
}
|
|
69
|
+
export interface StartMultipartFileUploadResponseContract {
|
|
70
|
+
/**
|
|
71
|
+
* Signed short-lived multipart token. Treat as opaque and send it back unchanged.
|
|
72
|
+
*/
|
|
73
|
+
uploadId: string;
|
|
74
|
+
fileId: string;
|
|
75
|
+
visibility: FileVisibilityContract;
|
|
76
|
+
/**
|
|
77
|
+
* Stable public URL when `visibility` is `public`; otherwise `null`.
|
|
78
|
+
* @format uri
|
|
79
|
+
*/
|
|
80
|
+
publicUrl: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* @format uri
|
|
83
|
+
*/
|
|
84
|
+
uploadUrl: string;
|
|
85
|
+
method: FileUploadMethodContract;
|
|
86
|
+
/**
|
|
87
|
+
* @format date-time
|
|
88
|
+
*/
|
|
89
|
+
expiresAt: string;
|
|
90
|
+
}
|
|
91
|
+
export interface CompleteMultipartFileUploadRequestContract {
|
|
92
|
+
/**
|
|
93
|
+
* Base64-encoded block ids in the exact order they should be committed.
|
|
94
|
+
*/
|
|
95
|
+
blockIds: string[];
|
|
96
|
+
}
|
|
97
|
+
export interface CompleteMultipartFileUploadResponseContract {
|
|
98
|
+
fileId: string;
|
|
99
|
+
visibility: FileVisibilityContract;
|
|
100
|
+
/**
|
|
101
|
+
* Stable public URL when `visibility` is `public`; otherwise `null`.
|
|
102
|
+
* @format uri
|
|
103
|
+
*/
|
|
104
|
+
publicUrl: string | null;
|
|
105
|
+
committed: boolean;
|
|
106
|
+
blockCount: number;
|
|
107
|
+
}
|
|
108
|
+
export declare const FileUploadMethodContract: {
|
|
109
|
+
readonly Put: "PUT";
|
|
110
|
+
};
|
|
111
|
+
export declare const FileDownloadMethodContract: {
|
|
112
|
+
readonly Get: "GET";
|
|
113
|
+
};
|
|
114
|
+
export declare const FileVisibilityContract: {
|
|
115
|
+
readonly Private: "private";
|
|
116
|
+
readonly Public: "public";
|
|
117
|
+
};
|
|
118
|
+
export declare const FileReadAccessContract: {
|
|
119
|
+
readonly Temporary: "temporary";
|
|
120
|
+
readonly Public: "public";
|
|
121
|
+
};
|
|
122
|
+
export declare const FileReadDispositionContract: {
|
|
123
|
+
readonly Inline: "inline";
|
|
124
|
+
readonly Attachment: "attachment";
|
|
125
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileReadDispositionContract = exports.FileReadAccessContract = exports.FileVisibilityContract = exports.FileDownloadMethodContract = exports.FileUploadMethodContract = void 0;
|
|
4
|
+
exports.FileUploadMethodContract = {
|
|
5
|
+
Put: "PUT"
|
|
6
|
+
};
|
|
7
|
+
exports.FileDownloadMethodContract = {
|
|
8
|
+
Get: "GET"
|
|
9
|
+
};
|
|
10
|
+
exports.FileVisibilityContract = {
|
|
11
|
+
Private: "private",
|
|
12
|
+
Public: "public"
|
|
13
|
+
};
|
|
14
|
+
exports.FileReadAccessContract = {
|
|
15
|
+
Temporary: "temporary",
|
|
16
|
+
Public: "public"
|
|
17
|
+
};
|
|
18
|
+
exports.FileReadDispositionContract = {
|
|
19
|
+
Inline: "inline",
|
|
20
|
+
Attachment: "attachment"
|
|
21
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export type { AuthenticatedUserSummaryContract, MyOrgAccessResponseContract } from "./access/access";
|
|
8
8
|
export * from "./billing/billing";
|
|
9
9
|
export type { OrgEmailSendRequestContract, OrgEmailSendResponseContract } from "./email/email";
|
|
10
|
+
export * from "./file/file";
|
|
10
11
|
export * from "./isolated-store/isolated-store";
|
|
11
12
|
export type { MeAuthContract, MeOrgGroupContract, MeResponseContract, MeScopeContract, MeUserContract } from "./me/me";
|
|
12
13
|
export * from "./note/note";
|
package/dist/types/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
__exportStar(require("./billing/billing"), exports);
|
|
24
|
+
__exportStar(require("./file/file"), exports);
|
|
24
25
|
__exportStar(require("./isolated-store/isolated-store"), exports);
|
|
25
26
|
__exportStar(require("./note/note"), exports);
|
|
26
27
|
__exportStar(require("./org-group/org-group"), exports);
|
|
@@ -365,6 +365,8 @@ export interface IsolatedStoreListResponseContract {
|
|
|
365
365
|
}
|
|
366
366
|
/** Optional `clientId` query for `listIsolatedStores`; matches `app` source scope `sourceId`. */
|
|
367
367
|
export type ListIsolatedStoresClientIdInQueryOptional = string | null;
|
|
368
|
+
/** Optional `aliasLike` query for `listIsolatedStores`; exact alias or glob (`*`, `?`). */
|
|
369
|
+
export type ListIsolatedStoresAliasLikeInQueryOptional = string | null;
|
|
368
370
|
export interface IsolatedStoreResponseContract {
|
|
369
371
|
store: IsolatedStoreContract;
|
|
370
372
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
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.
|
package/release-notes/latest.md
CHANGED
|
@@ -1,9 +1,71 @@
|
|
|
1
|
-
# Release Notes 2.2.
|
|
1
|
+
# Release Notes 2.2.10-sdk.0
|
|
2
2
|
|
|
3
3
|
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.2.
|
|
5
|
-
- Generated at: 2026-04-
|
|
4
|
+
- Previous tag: `v2.2.10-sdk.0`
|
|
5
|
+
- Generated at: 2026-04-22T07:58:13.022Z
|
|
6
6
|
|
|
7
7
|
## Included Drafts
|
|
8
8
|
|
|
9
|
-
-
|
|
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.
|