@fusebase/fusebase-gate-sdk 2.2.11-sdk.3 → 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
- * Commits the provided Azure block ids for a previously started multipart upload.
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: {
@@ -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: {
@@ -32,37 +32,15 @@ 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
- * 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
35
  /**
58
36
  * 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.
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.
60
38
  */
61
39
  startMultipartFileUpload(params: {
62
40
  path: {
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
- * Commits the provided Azure block ids for a previously started multipart upload.
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({
@@ -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({
@@ -41,39 +41,9 @@ class FilesApi {
41
41
  expectedContentType: "application/json",
42
42
  });
43
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
44
  /**
75
45
  * 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.
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.
77
47
  */
78
48
  async startMultipartFileUpload(params) {
79
49
  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.
@@ -1,125 +1,72 @@
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 FileVisibilityContract = "private" | "public";
6
- export type FileReadAccessContract = "temporary" | "public";
7
- export type FileReadDispositionContract = "inline" | "attachment";
8
- export interface PrepareFileUploadRequestContract {
4
+ export interface StartMultipartFileUploadRequestContract {
9
5
  filename: string;
6
+ size: number;
10
7
  contentType?: string | null;
11
8
  folder?: string | null;
12
- visibility?: FileVisibilityContract | null;
13
9
  }
14
10
  export interface DeleteFileRequestContract {
15
11
  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
12
  }
24
13
  export interface FileUploadHeadersContract {
25
- "x-ms-blob-type": "BlockBlob";
26
14
  "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;
15
+ "Content-Length"?: string;
49
16
  }
50
17
  export interface DeleteFileResponseContract {
51
18
  fileId: string;
52
- visibility: FileVisibilityContract;
53
19
  deleted: boolean;
54
20
  }
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
21
  export interface StartMultipartFileUploadResponseContract {
70
22
  /**
71
- * Signed short-lived multipart token. Treat as opaque and send it back unchanged.
23
+ * File-service multipart upload id. Treat as opaque and send it back unchanged.
72
24
  */
73
25
  uploadId: string;
74
26
  fileId: string;
75
- visibility: FileVisibilityContract;
76
27
  /**
77
- * Stable public URL when `visibility` is `public`; otherwise `null`.
78
28
  * @format uri
79
29
  */
80
- publicUrl: string | null;
30
+ uploadUrl: string;
81
31
  /**
82
32
  * @format uri
83
33
  */
84
- uploadUrl: string;
34
+ partsUrls: string[];
35
+ partSize: number;
85
36
  method: FileUploadMethodContract;
86
- /**
87
- * @format date-time
88
- */
89
- expiresAt: string;
37
+ headers: FileUploadHeadersContract;
38
+ tempStoredfileName: string;
39
+ partNumber: number;
40
+ }
41
+ export interface CompleteMultipartFileUploadPartContract {
42
+ etag: string;
43
+ partNumber: number;
90
44
  }
91
45
  export interface CompleteMultipartFileUploadRequestContract {
92
- /**
93
- * Base64-encoded block ids in the exact order they should be committed.
94
- */
95
- blockIds: string[];
46
+ tempStoredfileName: string;
47
+ parts: CompleteMultipartFileUploadPartContract[];
48
+ contentType?: string | null;
49
+ folder?: string | null;
96
50
  }
97
51
  export interface CompleteMultipartFileUploadResponseContract {
98
52
  fileId: string;
99
- visibility: FileVisibilityContract;
53
+ storedFileUUID: string;
54
+ /**
55
+ * File-service public object name returned by finish multipart upload.
56
+ */
57
+ publicFileName: string;
100
58
  /**
101
- * Stable public URL when `visibility` is `public`; otherwise `null`.
59
+ * Public URL built from the file-service public object name.
102
60
  * @format uri
103
61
  */
104
- publicUrl: string | null;
62
+ readUrl: string;
105
63
  committed: boolean;
106
- blockCount: number;
64
+ partCount: number;
65
+ filename: string;
66
+ contentType: string;
67
+ size: number;
68
+ kind: string;
107
69
  }
108
70
  export declare const FileUploadMethodContract: {
109
71
  readonly Put: "PUT";
110
72
  };
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
- };
@@ -1,21 +1,6 @@
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.FileUploadMethodContract = void 0;
4
4
  exports.FileUploadMethodContract = {
5
5
  Put: "PUT"
6
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
- };
@@ -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.3",
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.3
1
+ # Release Notes 2.2.11-sdk.5
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.2.11-sdk.3`
5
- - Generated at: 2026-04-23T11:09:53.530Z
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.3
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.2.11-sdk.3`
5
- - Generated at: 2026-04-23T11:09:53.530Z
6
-
7
- ## Included Drafts
8
-
9
- - None