@fusebase/fusebase-gate-sdk 2.2.11-sdk.4 → 2.2.11-sdk.5

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.
@@ -5,13 +5,13 @@
5
5
  * Domain: files
6
6
  */
7
7
  import type { Client } from "../runtime/transport";
8
- import type { CompleteMultipartFileUploadRequestContract, CompleteMultipartFileUploadResponseContract, DeleteFileRequestContract, DeleteFileResponseContract, GetFileDownloadUrlRequestContract, GetFileDownloadUrlResponseContract, MultipartUploadIdInPathRequired, orgIdInPathRequired, PrepareFileUploadRequestContract, PrepareFileUploadResponseContract, StartMultipartFileUploadResponseContract } from "../types";
8
+ import type { CompleteMultipartFileUploadRequestContract, CompleteMultipartFileUploadResponseContract, DeleteFileRequestContract, DeleteFileResponseContract, MultipartUploadIdInPathRequired, orgIdInPathRequired, StartMultipartFileUploadRequestContract, StartMultipartFileUploadResponseContract } from "../types";
9
9
  export declare class FilesApi {
10
10
  private client;
11
11
  constructor(client: Client);
12
12
  /**
13
13
  * Complete multipart file upload
14
- * Finishes a file-service multipart upload, then creates the stored-file record that downstream note attachment flows use.
14
+ * Finishes a public file-service multipart upload, then creates the stored-file record that downstream note attachment flows use. The response includes a stable public readUrl suitable for image src usage.
15
15
  */
16
16
  completeMultipartFileUpload(params: {
17
17
  path: {
@@ -32,28 +32,6 @@ export declare class FilesApi {
32
32
  headers?: Record<string, string>;
33
33
  body: DeleteFileRequestContract;
34
34
  }): Promise<DeleteFileResponseContract>;
35
- /**
36
- * Get file read URL
37
- * Builds a public file-service read URL from the public object name returned by completeMultipartFileUpload. 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
- * Starts a file-service multipart upload and returns the first direct PUT URL. Clients upload bytes directly to the returned URL, then call completeMultipartFileUpload with the returned uploadId, tempStoredfileName, and uploaded part ETag.
49
- */
50
- prepareFileUpload(params: {
51
- path: {
52
- orgId: orgIdInPathRequired;
53
- };
54
- headers?: Record<string, string>;
55
- body: PrepareFileUploadRequestContract;
56
- }): Promise<PrepareFileUploadResponseContract>;
57
35
  /**
58
36
  * Start multipart file upload
59
37
  * Starts a file-service multipart upload and returns direct PUT URLs. Clients upload each part to the returned URLs, keep each response ETag, and pass those ETags to completeMultipartFileUpload.
@@ -63,6 +41,6 @@ export declare class FilesApi {
63
41
  orgId: orgIdInPathRequired;
64
42
  };
65
43
  headers?: Record<string, string>;
66
- body: PrepareFileUploadRequestContract;
44
+ body: StartMultipartFileUploadRequestContract;
67
45
  }): Promise<StartMultipartFileUploadResponseContract>;
68
46
  }
@@ -13,7 +13,7 @@ class FilesApi {
13
13
  }
14
14
  /**
15
15
  * Complete multipart file upload
16
- * Finishes a file-service multipart upload, then creates the stored-file record that downstream note attachment flows use.
16
+ * Finishes a public file-service multipart upload, then creates the stored-file record that downstream note attachment flows use. The response includes a stable public readUrl suitable for image src usage.
17
17
  */
18
18
  async completeMultipartFileUpload(params) {
19
19
  return this.client.request({
@@ -41,36 +41,6 @@ class FilesApi {
41
41
  expectedContentType: "application/json",
42
42
  });
43
43
  }
44
- /**
45
- * Get file read URL
46
- * Builds a public file-service read URL from the public object name returned by completeMultipartFileUpload. 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
- * Starts a file-service multipart upload and returns the first direct PUT URL. Clients upload bytes directly to the returned URL, then call completeMultipartFileUpload with the returned uploadId, tempStoredfileName, and uploaded part ETag.
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
44
  /**
75
45
  * Start multipart file upload
76
46
  * Starts a file-service multipart upload and returns direct PUT URLs. Clients upload each part to the returned URLs, keep each response ETag, and pass those ETags to completeMultipartFileUpload.
@@ -1,9 +1,7 @@
1
1
  export type FileIdInPathRequired = string;
2
2
  export type MultipartUploadIdInPathRequired = string;
3
3
  export type FileUploadMethodContract = "PUT";
4
- export type FileDownloadMethodContract = "GET";
5
- export type FileReadDispositionContract = "inline" | "attachment";
6
- export interface PrepareFileUploadRequestContract {
4
+ export interface StartMultipartFileUploadRequestContract {
7
5
  filename: string;
8
6
  size: number;
9
7
  contentType?: string | null;
@@ -12,57 +10,14 @@ export interface PrepareFileUploadRequestContract {
12
10
  export interface DeleteFileRequestContract {
13
11
  fileId: string;
14
12
  }
15
- export interface GetFileDownloadUrlRequestContract {
16
- /**
17
- * Public file-service object name returned as `publicFileName` by completeMultipartFileUpload.
18
- */
19
- fileName: string;
20
- disposition?: FileReadDispositionContract | null;
21
- }
22
13
  export interface FileUploadHeadersContract {
23
14
  "Content-Type": string;
24
15
  "Content-Length"?: string;
25
16
  }
26
- export interface PrepareFileUploadResponseContract {
27
- /**
28
- * Temporary stored-file name. Complete the upload to receive the stored-file UUID.
29
- */
30
- fileId: string;
31
- /**
32
- * @format uri
33
- */
34
- uploadUrl: string;
35
- /**
36
- * @format uri
37
- */
38
- partsUrls: string[];
39
- partSize: number;
40
- method: FileUploadMethodContract;
41
- headers: FileUploadHeadersContract;
42
- uploadId: string;
43
- tempStoredfileName: string;
44
- partNumber: number;
45
- /**
46
- * @format date-time
47
- */
48
- expiresAt: string | null;
49
- }
50
17
  export interface DeleteFileResponseContract {
51
18
  fileId: string;
52
19
  deleted: boolean;
53
20
  }
54
- export interface GetFileDownloadUrlResponseContract {
55
- fileName: string;
56
- /**
57
- * @format uri
58
- */
59
- downloadUrl: string;
60
- method: FileDownloadMethodContract;
61
- /**
62
- * @format date-time
63
- */
64
- expiresAt: string | null;
65
- }
66
21
  export interface StartMultipartFileUploadResponseContract {
67
22
  /**
68
23
  * File-service multipart upload id. Treat as opaque and send it back unchanged.
@@ -82,10 +37,6 @@ export interface StartMultipartFileUploadResponseContract {
82
37
  headers: FileUploadHeadersContract;
83
38
  tempStoredfileName: string;
84
39
  partNumber: number;
85
- /**
86
- * @format date-time
87
- */
88
- expiresAt: string | null;
89
40
  }
90
41
  export interface CompleteMultipartFileUploadPartContract {
91
42
  etag: string;
@@ -108,7 +59,7 @@ export interface CompleteMultipartFileUploadResponseContract {
108
59
  * Public URL built from the file-service public object name.
109
60
  * @format uri
110
61
  */
111
- downloadUrl: string;
62
+ readUrl: string;
112
63
  committed: boolean;
113
64
  partCount: number;
114
65
  filename: string;
@@ -119,10 +70,3 @@ export interface CompleteMultipartFileUploadResponseContract {
119
70
  export declare const FileUploadMethodContract: {
120
71
  readonly Put: "PUT";
121
72
  };
122
- export declare const FileDownloadMethodContract: {
123
- readonly Get: "GET";
124
- };
125
- export declare const FileReadDispositionContract: {
126
- readonly Inline: "inline";
127
- readonly Attachment: "attachment";
128
- };
@@ -1,13 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FileReadDispositionContract = exports.FileDownloadMethodContract = exports.FileUploadMethodContract = void 0;
3
+ exports.FileUploadMethodContract = void 0;
4
4
  exports.FileUploadMethodContract = {
5
5
  Put: "PUT"
6
6
  };
7
- exports.FileDownloadMethodContract = {
8
- Get: "GET"
9
- };
10
- exports.FileReadDispositionContract = {
11
- Inline: "inline",
12
- Attachment: "attachment"
13
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.2.11-sdk.4",
3
+ "version": "2.2.11-sdk.5",
4
4
  "description": "TypeScript SDK for Fusebase Gate APIs - Generated from contract introspection",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -0,0 +1,9 @@
1
+ # Release Notes 2.2.11-sdk.5
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.2.11-sdk.5`
5
+ - Generated at: 2026-04-27T10:47:08.478Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -1,8 +1,8 @@
1
- # Release Notes 2.2.11-sdk.4
1
+ # Release Notes 2.2.11-sdk.5
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.2.11-sdk.4`
5
- - Generated at: 2026-04-27T07:43:13.021Z
4
+ - Previous tag: `v2.2.11-sdk.5`
5
+ - Generated at: 2026-04-27T10:47:08.478Z
6
6
 
7
7
  ## Included Drafts
8
8
 
@@ -1,9 +0,0 @@
1
- # Release Notes 2.2.11-sdk.4
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.2.11-sdk.4`
5
- - Generated at: 2026-04-27T07:43:13.021Z
6
-
7
- ## Included Drafts
8
-
9
- - None