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

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.
@@ -11,7 +11,7 @@ export declare class FilesApi {
11
11
  constructor(client: Client);
12
12
  /**
13
13
  * Complete multipart file upload
14
- * Commits the provided Azure block ids for a previously started multipart upload.
14
+ * Finishes a file-service multipart upload, then creates the stored-file record that downstream note attachment flows use.
15
15
  */
16
16
  completeMultipartFileUpload(params: {
17
17
  path: {
@@ -23,7 +23,7 @@ export declare class FilesApi {
23
23
  }): Promise<CompleteMultipartFileUploadResponseContract>;
24
24
  /**
25
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.
26
+ * Deletes a file-service stored file by stored-file UUID. Gate never handles the file bytes.
27
27
  */
28
28
  deleteFile(params: {
29
29
  path: {
@@ -34,7 +34,7 @@ export declare class FilesApi {
34
34
  }): Promise<DeleteFileResponseContract>;
35
35
  /**
36
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.
37
+ * Builds a public file-service read URL from the public object name returned by completeMultipartFileUpload. Gate never handles the file bytes.
38
38
  */
39
39
  getFileDownloadUrl(params: {
40
40
  path: {
@@ -45,7 +45,7 @@ export declare class FilesApi {
45
45
  }): Promise<GetFileDownloadUrlResponseContract>;
46
46
  /**
47
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.
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
49
  */
50
50
  prepareFileUpload(params: {
51
51
  path: {
@@ -56,7 +56,7 @@ export declare class FilesApi {
56
56
  }): Promise<PrepareFileUploadResponseContract>;
57
57
  /**
58
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.
59
+ * 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.
60
60
  */
61
61
  startMultipartFileUpload(params: {
62
62
  path: {
@@ -13,7 +13,7 @@ class FilesApi {
13
13
  }
14
14
  /**
15
15
  * Complete multipart file upload
16
- * Commits the provided Azure block ids for a previously started multipart upload.
16
+ * Finishes a file-service multipart upload, then creates the stored-file record that downstream note attachment flows use.
17
17
  */
18
18
  async completeMultipartFileUpload(params) {
19
19
  return this.client.request({
@@ -28,7 +28,7 @@ class FilesApi {
28
28
  }
29
29
  /**
30
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.
31
+ * Deletes a file-service stored file by stored-file UUID. Gate never handles the file bytes.
32
32
  */
33
33
  async deleteFile(params) {
34
34
  return this.client.request({
@@ -43,7 +43,7 @@ class FilesApi {
43
43
  }
44
44
  /**
45
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.
46
+ * Builds a public file-service read URL from the public object name returned by completeMultipartFileUpload. Gate never handles the file bytes.
47
47
  */
48
48
  async getFileDownloadUrl(params) {
49
49
  return this.client.request({
@@ -58,7 +58,7 @@ class FilesApi {
58
58
  }
59
59
  /**
60
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.
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
62
  */
63
63
  async prepareFileUpload(params) {
64
64
  return this.client.request({
@@ -73,7 +73,7 @@ class FilesApi {
73
73
  }
74
74
  /**
75
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.
76
+ * 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.
77
77
  */
78
78
  async startMultipartFileUpload(params) {
79
79
  return this.client.request({
@@ -5,10 +5,23 @@
5
5
  * Domain: notes
6
6
  */
7
7
  import type { Client } from "../runtime/transport";
8
- import type { CreateWorkspaceNoteFolderRequestContract, CreateWorkspaceNoteFolderResponseContract, CreateWorkspaceNoteRequestContract, CreateWorkspaceNoteResponseContract, orgIdInPathRequired, WorkspaceIdInPathRequired, WorkspaceNoteContentResponseContract, WorkspaceNoteFolderListResponseContract, WorkspaceNoteIdInPathRequired, WorkspaceNoteListResponseContract, WorkspaceNoteParentIdInQueryOptional } from "../types";
8
+ import type { AddWorkspaceNoteAttachmentRequestContract, AddWorkspaceNoteAttachmentResponseContract, CreateWorkspaceNoteFolderRequestContract, CreateWorkspaceNoteFolderResponseContract, CreateWorkspaceNoteRequestContract, CreateWorkspaceNoteResponseContract, orgIdInPathRequired, WorkspaceIdInPathRequired, WorkspaceNoteContentResponseContract, WorkspaceNoteFolderListResponseContract, WorkspaceNoteIdInPathRequired, WorkspaceNoteListResponseContract, WorkspaceNoteParentIdInQueryOptional } from "../types";
9
9
  export declare class NotesApi {
10
10
  private client;
11
11
  constructor(client: Client);
12
+ /**
13
+ * Add workspace note attachment
14
+ * Attaches a stored-file UUID from the files upload flow to a workspace note, then appends an image blot for image attachments or a file blot for all other attachment types.
15
+ */
16
+ addWorkspaceNoteAttachment(params: {
17
+ path: {
18
+ orgId: orgIdInPathRequired;
19
+ workspaceId: WorkspaceIdInPathRequired;
20
+ noteId: WorkspaceNoteIdInPathRequired;
21
+ };
22
+ headers?: Record<string, string>;
23
+ body: AddWorkspaceNoteAttachmentRequestContract;
24
+ }): Promise<AddWorkspaceNoteAttachmentResponseContract>;
12
25
  /**
13
26
  * Create workspace note
14
27
  * Creates a note in the requested workspace. When parentId is omitted, gate uses `default`. Optional initial text or html can be appended after creation.
@@ -11,6 +11,21 @@ class NotesApi {
11
11
  constructor(client) {
12
12
  this.client = client;
13
13
  }
14
+ /**
15
+ * Add workspace note attachment
16
+ * Attaches a stored-file UUID from the files upload flow to a workspace note, then appends an image blot for image attachments or a file blot for all other attachment types.
17
+ */
18
+ async addWorkspaceNoteAttachment(params) {
19
+ return this.client.request({
20
+ method: "POST",
21
+ path: "/:orgId/workspaces/:workspaceId/notes/:noteId/attachments",
22
+ pathParams: params.path,
23
+ headers: params.headers,
24
+ body: params.body,
25
+ opId: "addWorkspaceNoteAttachment",
26
+ expectedContentType: "application/json",
27
+ });
28
+ }
14
29
  /**
15
30
  * Create workspace note
16
31
  * Creates a note in the requested workspace. When parentId is omitted, gate uses `default`. Optional initial text or html can be appended after creation.
@@ -2,60 +2,57 @@ export type FileIdInPathRequired = string;
2
2
  export type MultipartUploadIdInPathRequired = string;
3
3
  export type FileUploadMethodContract = "PUT";
4
4
  export type FileDownloadMethodContract = "GET";
5
- export type FileVisibilityContract = "private" | "public";
6
- export type FileReadAccessContract = "temporary" | "public";
7
5
  export type FileReadDispositionContract = "inline" | "attachment";
8
6
  export interface PrepareFileUploadRequestContract {
9
7
  filename: string;
8
+ size: number;
10
9
  contentType?: string | null;
11
10
  folder?: string | null;
12
- visibility?: FileVisibilityContract | null;
13
11
  }
14
12
  export interface DeleteFileRequestContract {
15
13
  fileId: string;
16
- visibility?: FileVisibilityContract | null;
17
14
  }
18
15
  export interface GetFileDownloadUrlRequestContract {
19
- fileId: string;
20
- visibility?: FileVisibilityContract | null;
21
- access?: FileReadAccessContract | null;
16
+ /**
17
+ * Public file-service object name returned as `publicFileName` by completeMultipartFileUpload.
18
+ */
19
+ fileName: string;
22
20
  disposition?: FileReadDispositionContract | null;
23
21
  }
24
22
  export interface FileUploadHeadersContract {
25
- "x-ms-blob-type": "BlockBlob";
26
23
  "Content-Type": string;
24
+ "Content-Length"?: string;
27
25
  }
28
26
  export interface PrepareFileUploadResponseContract {
29
27
  /**
30
- * Opaque file identifier to persist for later read and deletion calls.
28
+ * Temporary stored-file name. Complete the upload to receive the stored-file UUID.
31
29
  */
32
30
  fileId: string;
33
- visibility: FileVisibilityContract;
34
31
  /**
35
- * Stable public URL when `visibility` is `public`; otherwise `null`.
36
32
  * @format uri
37
33
  */
38
- publicUrl: string | null;
34
+ uploadUrl: string;
39
35
  /**
40
36
  * @format uri
41
37
  */
42
- uploadUrl: string;
38
+ partsUrls: string[];
39
+ partSize: number;
43
40
  method: FileUploadMethodContract;
44
41
  headers: FileUploadHeadersContract;
42
+ uploadId: string;
43
+ tempStoredfileName: string;
44
+ partNumber: number;
45
45
  /**
46
46
  * @format date-time
47
47
  */
48
- expiresAt: string;
48
+ expiresAt: string | null;
49
49
  }
50
50
  export interface DeleteFileResponseContract {
51
51
  fileId: string;
52
- visibility: FileVisibilityContract;
53
52
  deleted: boolean;
54
53
  }
55
54
  export interface GetFileDownloadUrlResponseContract {
56
- fileId: string;
57
- visibility: FileVisibilityContract;
58
- access: FileReadAccessContract;
55
+ fileName: string;
59
56
  /**
60
57
  * @format uri
61
58
  */
@@ -68,42 +65,56 @@ export interface GetFileDownloadUrlResponseContract {
68
65
  }
69
66
  export interface StartMultipartFileUploadResponseContract {
70
67
  /**
71
- * Signed short-lived multipart token. Treat as opaque and send it back unchanged.
68
+ * File-service multipart upload id. Treat as opaque and send it back unchanged.
72
69
  */
73
70
  uploadId: string;
74
71
  fileId: string;
75
- visibility: FileVisibilityContract;
76
72
  /**
77
- * Stable public URL when `visibility` is `public`; otherwise `null`.
78
73
  * @format uri
79
74
  */
80
- publicUrl: string | null;
75
+ uploadUrl: string;
81
76
  /**
82
77
  * @format uri
83
78
  */
84
- uploadUrl: string;
79
+ partsUrls: string[];
80
+ partSize: number;
85
81
  method: FileUploadMethodContract;
82
+ headers: FileUploadHeadersContract;
83
+ tempStoredfileName: string;
84
+ partNumber: number;
86
85
  /**
87
86
  * @format date-time
88
87
  */
89
- expiresAt: string;
88
+ expiresAt: string | null;
89
+ }
90
+ export interface CompleteMultipartFileUploadPartContract {
91
+ etag: string;
92
+ partNumber: number;
90
93
  }
91
94
  export interface CompleteMultipartFileUploadRequestContract {
92
- /**
93
- * Base64-encoded block ids in the exact order they should be committed.
94
- */
95
- blockIds: string[];
95
+ tempStoredfileName: string;
96
+ parts: CompleteMultipartFileUploadPartContract[];
97
+ contentType?: string | null;
98
+ folder?: string | null;
96
99
  }
97
100
  export interface CompleteMultipartFileUploadResponseContract {
98
101
  fileId: string;
99
- visibility: FileVisibilityContract;
102
+ storedFileUUID: string;
100
103
  /**
101
- * Stable public URL when `visibility` is `public`; otherwise `null`.
104
+ * File-service public object name returned by finish multipart upload.
105
+ */
106
+ publicFileName: string;
107
+ /**
108
+ * Public URL built from the file-service public object name.
102
109
  * @format uri
103
110
  */
104
- publicUrl: string | null;
111
+ downloadUrl: string;
105
112
  committed: boolean;
106
- blockCount: number;
113
+ partCount: number;
114
+ filename: string;
115
+ contentType: string;
116
+ size: number;
117
+ kind: string;
107
118
  }
108
119
  export declare const FileUploadMethodContract: {
109
120
  readonly Put: "PUT";
@@ -111,14 +122,6 @@ export declare const FileUploadMethodContract: {
111
122
  export declare const FileDownloadMethodContract: {
112
123
  readonly Get: "GET";
113
124
  };
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
125
  export declare const FileReadDispositionContract: {
123
126
  readonly Inline: "inline";
124
127
  readonly Attachment: "attachment";
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FileReadDispositionContract = exports.FileReadAccessContract = exports.FileVisibilityContract = exports.FileDownloadMethodContract = exports.FileUploadMethodContract = void 0;
3
+ exports.FileReadDispositionContract = exports.FileDownloadMethodContract = exports.FileUploadMethodContract = void 0;
4
4
  exports.FileUploadMethodContract = {
5
5
  Put: "PUT"
6
6
  };
7
7
  exports.FileDownloadMethodContract = {
8
8
  Get: "GET"
9
9
  };
10
- exports.FileVisibilityContract = {
11
- Private: "private",
12
- Public: "public"
13
- };
14
- exports.FileReadAccessContract = {
15
- Temporary: "temporary",
16
- Public: "public"
17
- };
18
10
  exports.FileReadDispositionContract = {
19
11
  Inline: "inline",
20
12
  Attachment: "attachment"
@@ -53,6 +53,28 @@ export interface CreateWorkspaceNoteRequestContract {
53
53
  export interface CreateWorkspaceNoteResponseContract {
54
54
  note: WorkspaceNoteSummaryContract;
55
55
  }
56
+ export interface AddWorkspaceNoteAttachmentRequestContract {
57
+ /**
58
+ * Stored-file UUID returned by completeMultipartFileUpload.
59
+ */
60
+ storedFileUUID: string;
61
+ /**
62
+ * Whether the attachment should appear in the note attachment list.
63
+ */
64
+ inList?: boolean | null;
65
+ }
66
+ export interface WorkspaceNoteAttachmentContract {
67
+ globalId: string;
68
+ displayName: string;
69
+ mime?: string | null;
70
+ type: string;
71
+ storedFileUUID: string;
72
+ size: number;
73
+ inList: boolean;
74
+ }
75
+ export interface AddWorkspaceNoteAttachmentResponseContract {
76
+ attachment: WorkspaceNoteAttachmentContract;
77
+ }
56
78
  export declare const WorkspaceNoteContentFormatContract: {
57
79
  readonly Text: "text";
58
80
  readonly Html: "html";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.2.11-sdk.2",
3
+ "version": "2.2.11-sdk.4",
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.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
@@ -1,8 +1,8 @@
1
- # Release Notes 2.2.11-sdk.2
1
+ # Release Notes 2.2.11-sdk.4
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.2.11-sdk.2`
5
- - Generated at: 2026-04-23T11:00:31.974Z
4
+ - Previous tag: `v2.2.11-sdk.4`
5
+ - Generated at: 2026-04-27T07:43:13.021Z
6
6
 
7
7
  ## Included Drafts
8
8
 
@@ -1,9 +0,0 @@
1
- # Release Notes 2.2.11-sdk.2
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.2.11-sdk.2`
5
- - Generated at: 2026-04-23T11:00:31.974Z
6
-
7
- ## Included Drafts
8
-
9
- - None