@fusebase/fusebase-gate-sdk 2.3.31 → 2.3.32-sdk.3
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/NotesApi.d.ts +51 -1
- package/dist/apis/NotesApi.js +59 -0
- package/dist/types/note/note.d.ts +62 -0
- package/package.json +1 -1
- package/release-notes/2.3.32-sdk.3.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.3.31-sdk.0.md +0 -9
- package/release-notes/2.3.31.md +0 -9
package/dist/apis/NotesApi.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: notes
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { AddWorkspaceNoteAttachmentRequestContract, AddWorkspaceNoteAttachmentResponseContract, AppendWorkspaceNoteContentRequestContract, CreateWorkspaceNoteFolderRequestContract, CreateWorkspaceNoteFolderResponseContract, CreateWorkspaceNoteRequestContract, CreateWorkspaceNoteResponseContract, orgIdInPathRequired, WorkspaceIdInPathRequired, WorkspaceNoteContentResponseContract, WorkspaceNoteFolderListResponseContract, WorkspaceNoteIdInPathRequired, WorkspaceNoteListResponseContract, WorkspaceNoteParentIdInQueryOptional } from "../types";
|
|
8
|
+
import type { AddWorkspaceNoteAttachmentRequestContract, AddWorkspaceNoteAttachmentResponseContract, AppendWorkspaceMarkdownNoteContentRequestContract, AppendWorkspaceNoteContentRequestContract, CreateWorkspaceMarkdownNoteRequestContract, CreateWorkspaceNoteFolderRequestContract, CreateWorkspaceNoteFolderResponseContract, CreateWorkspaceNoteRequestContract, CreateWorkspaceNoteResponseContract, orgIdInPathRequired, UpdateWorkspaceMarkdownNoteContentRequestContract, WorkspaceIdInPathRequired, WorkspaceMarkdownNoteResponseContract, WorkspaceNoteContentResponseContract, WorkspaceNoteFolderListResponseContract, WorkspaceNoteIdInPathRequired, WorkspaceNoteListResponseContract, WorkspaceNoteParentIdInQueryOptional } from "../types";
|
|
9
9
|
export declare class NotesApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -22,6 +22,19 @@ export declare class NotesApi {
|
|
|
22
22
|
headers?: Record<string, string>;
|
|
23
23
|
body: AddWorkspaceNoteAttachmentRequestContract;
|
|
24
24
|
}): Promise<AddWorkspaceNoteAttachmentResponseContract>;
|
|
25
|
+
/**
|
|
26
|
+
* Append to workspace markdown note content
|
|
27
|
+
* Appends markdown to the end of a v3 markdown note without replacing existing content. `revision` is an optional optimistic lock: when provided and stale, note-service rejects the write with HTTP 409. Returns the full markdown after the append and the new `revision`.
|
|
28
|
+
*/
|
|
29
|
+
appendWorkspaceMarkdownNoteContent(params: {
|
|
30
|
+
path: {
|
|
31
|
+
orgId: orgIdInPathRequired;
|
|
32
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
33
|
+
noteId: WorkspaceNoteIdInPathRequired;
|
|
34
|
+
};
|
|
35
|
+
headers?: Record<string, string>;
|
|
36
|
+
body: AppendWorkspaceMarkdownNoteContentRequestContract;
|
|
37
|
+
}): Promise<WorkspaceMarkdownNoteResponseContract>;
|
|
25
38
|
/**
|
|
26
39
|
* Append content to workspace note
|
|
27
40
|
* Appends text or html to the end of an existing workspace note without replacing current content, then returns the refreshed note md. Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace before calling note-service and editor-server. For markdown sources, apps should render markdown to html before calling this operation when formatting fidelity matters; otherwise send markdown-like text as `format: text`.
|
|
@@ -35,6 +48,18 @@ export declare class NotesApi {
|
|
|
35
48
|
headers?: Record<string, string>;
|
|
36
49
|
body: AppendWorkspaceNoteContentRequestContract;
|
|
37
50
|
}): Promise<WorkspaceNoteContentResponseContract>;
|
|
51
|
+
/**
|
|
52
|
+
* Create workspace markdown note
|
|
53
|
+
* Creates a v3 note whose source of truth is markdown stored in note-service (no editor-service involved). Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace. When parentId is omitted, gate uses `default`. Returns the stored markdown and the initial `revision` to use for later writes.
|
|
54
|
+
*/
|
|
55
|
+
createWorkspaceMarkdownNote(params: {
|
|
56
|
+
path: {
|
|
57
|
+
orgId: orgIdInPathRequired;
|
|
58
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
59
|
+
};
|
|
60
|
+
headers?: Record<string, string>;
|
|
61
|
+
body: CreateWorkspaceMarkdownNoteRequestContract;
|
|
62
|
+
}): Promise<WorkspaceMarkdownNoteResponseContract>;
|
|
38
63
|
/**
|
|
39
64
|
* Create workspace note
|
|
40
65
|
* Creates a note in the requested workspace. Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace before calling note-service and editor-server. When parentId is omitted, gate uses `default`. Optional initial text or html can be appended after creation.
|
|
@@ -59,6 +84,18 @@ export declare class NotesApi {
|
|
|
59
84
|
headers?: Record<string, string>;
|
|
60
85
|
body: CreateWorkspaceNoteFolderRequestContract;
|
|
61
86
|
}): Promise<CreateWorkspaceNoteFolderResponseContract>;
|
|
87
|
+
/**
|
|
88
|
+
* Read workspace markdown note
|
|
89
|
+
* Returns the markdown source of truth and current `revision` of a v3 markdown note straight from note-service. Only works for notes created as markdown (v3) notes; v2 notes are served by getWorkspaceNote. Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace.
|
|
90
|
+
*/
|
|
91
|
+
getWorkspaceMarkdownNote(params: {
|
|
92
|
+
path: {
|
|
93
|
+
orgId: orgIdInPathRequired;
|
|
94
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
95
|
+
noteId: WorkspaceNoteIdInPathRequired;
|
|
96
|
+
};
|
|
97
|
+
headers?: Record<string, string>;
|
|
98
|
+
}): Promise<WorkspaceMarkdownNoteResponseContract>;
|
|
62
99
|
/**
|
|
63
100
|
* Read workspace note
|
|
64
101
|
* Returns the note title, parent metadata, and md content for the requested workspace note. Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace before calling note-service and editor-server.
|
|
@@ -96,4 +133,17 @@ export declare class NotesApi {
|
|
|
96
133
|
};
|
|
97
134
|
headers?: Record<string, string>;
|
|
98
135
|
}): Promise<WorkspaceNoteListResponseContract>;
|
|
136
|
+
/**
|
|
137
|
+
* Replace workspace markdown note content
|
|
138
|
+
* Replaces the whole markdown document of a v3 markdown note. Requires the `revision` from the last read as an optimistic lock; a stale revision returns HTTP 409 with the current revision. Returns the stored markdown and the new `revision`.
|
|
139
|
+
*/
|
|
140
|
+
updateWorkspaceMarkdownNoteContent(params: {
|
|
141
|
+
path: {
|
|
142
|
+
orgId: orgIdInPathRequired;
|
|
143
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
144
|
+
noteId: WorkspaceNoteIdInPathRequired;
|
|
145
|
+
};
|
|
146
|
+
headers?: Record<string, string>;
|
|
147
|
+
body: UpdateWorkspaceMarkdownNoteContentRequestContract;
|
|
148
|
+
}): Promise<WorkspaceMarkdownNoteResponseContract>;
|
|
99
149
|
}
|
package/dist/apis/NotesApi.js
CHANGED
|
@@ -26,6 +26,21 @@ class NotesApi {
|
|
|
26
26
|
expectedContentType: "application/json",
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Append to workspace markdown note content
|
|
31
|
+
* Appends markdown to the end of a v3 markdown note without replacing existing content. `revision` is an optional optimistic lock: when provided and stale, note-service rejects the write with HTTP 409. Returns the full markdown after the append and the new `revision`.
|
|
32
|
+
*/
|
|
33
|
+
async appendWorkspaceMarkdownNoteContent(params) {
|
|
34
|
+
return this.client.request({
|
|
35
|
+
method: "POST",
|
|
36
|
+
path: "/:orgId/workspaces/:workspaceId/markdown-notes/:noteId/content/append",
|
|
37
|
+
pathParams: params.path,
|
|
38
|
+
headers: params.headers,
|
|
39
|
+
body: params.body,
|
|
40
|
+
opId: "appendWorkspaceMarkdownNoteContent",
|
|
41
|
+
expectedContentType: "application/json",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
29
44
|
/**
|
|
30
45
|
* Append content to workspace note
|
|
31
46
|
* Appends text or html to the end of an existing workspace note without replacing current content, then returns the refreshed note md. Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace before calling note-service and editor-server. For markdown sources, apps should render markdown to html before calling this operation when formatting fidelity matters; otherwise send markdown-like text as `format: text`.
|
|
@@ -41,6 +56,21 @@ class NotesApi {
|
|
|
41
56
|
expectedContentType: "application/json",
|
|
42
57
|
});
|
|
43
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Create workspace markdown note
|
|
61
|
+
* Creates a v3 note whose source of truth is markdown stored in note-service (no editor-service involved). Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace. When parentId is omitted, gate uses `default`. Returns the stored markdown and the initial `revision` to use for later writes.
|
|
62
|
+
*/
|
|
63
|
+
async createWorkspaceMarkdownNote(params) {
|
|
64
|
+
return this.client.request({
|
|
65
|
+
method: "POST",
|
|
66
|
+
path: "/:orgId/workspaces/:workspaceId/markdown-notes",
|
|
67
|
+
pathParams: params.path,
|
|
68
|
+
headers: params.headers,
|
|
69
|
+
body: params.body,
|
|
70
|
+
opId: "createWorkspaceMarkdownNote",
|
|
71
|
+
expectedContentType: "application/json",
|
|
72
|
+
});
|
|
73
|
+
}
|
|
44
74
|
/**
|
|
45
75
|
* Create workspace note
|
|
46
76
|
* Creates a note in the requested workspace. Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace before calling note-service and editor-server. When parentId is omitted, gate uses `default`. Optional initial text or html can be appended after creation.
|
|
@@ -71,6 +101,20 @@ class NotesApi {
|
|
|
71
101
|
expectedContentType: "application/json",
|
|
72
102
|
});
|
|
73
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Read workspace markdown note
|
|
106
|
+
* Returns the markdown source of truth and current `revision` of a v3 markdown note straight from note-service. Only works for notes created as markdown (v3) notes; v2 notes are served by getWorkspaceNote. Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace.
|
|
107
|
+
*/
|
|
108
|
+
async getWorkspaceMarkdownNote(params) {
|
|
109
|
+
return this.client.request({
|
|
110
|
+
method: "GET",
|
|
111
|
+
path: "/:orgId/workspaces/:workspaceId/markdown-notes/:noteId",
|
|
112
|
+
pathParams: params.path,
|
|
113
|
+
headers: params.headers,
|
|
114
|
+
opId: "getWorkspaceMarkdownNote",
|
|
115
|
+
expectedContentType: "application/json",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
74
118
|
/**
|
|
75
119
|
* Read workspace note
|
|
76
120
|
* Returns the note title, parent metadata, and md content for the requested workspace note. Prefer a real workspace id; when the path workspaceId is `default`, gate resolves it to the organization's default workspace before calling note-service and editor-server.
|
|
@@ -114,5 +158,20 @@ class NotesApi {
|
|
|
114
158
|
expectedContentType: "application/json",
|
|
115
159
|
});
|
|
116
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Replace workspace markdown note content
|
|
163
|
+
* Replaces the whole markdown document of a v3 markdown note. Requires the `revision` from the last read as an optimistic lock; a stale revision returns HTTP 409 with the current revision. Returns the stored markdown and the new `revision`.
|
|
164
|
+
*/
|
|
165
|
+
async updateWorkspaceMarkdownNoteContent(params) {
|
|
166
|
+
return this.client.request({
|
|
167
|
+
method: "PUT",
|
|
168
|
+
path: "/:orgId/workspaces/:workspaceId/markdown-notes/:noteId/content",
|
|
169
|
+
pathParams: params.path,
|
|
170
|
+
headers: params.headers,
|
|
171
|
+
body: params.body,
|
|
172
|
+
opId: "updateWorkspaceMarkdownNoteContent",
|
|
173
|
+
expectedContentType: "application/json",
|
|
174
|
+
});
|
|
175
|
+
}
|
|
117
176
|
}
|
|
118
177
|
exports.NotesApi = NotesApi;
|
|
@@ -63,6 +63,68 @@ export interface AppendWorkspaceNoteContentRequestContract {
|
|
|
63
63
|
*/
|
|
64
64
|
format?: WorkspaceNoteContentFormatContract | null;
|
|
65
65
|
}
|
|
66
|
+
export interface WorkspaceMarkdownNoteContract extends WorkspaceNoteSummaryContract {
|
|
67
|
+
/**
|
|
68
|
+
* Markdown source of truth of the v3 note.
|
|
69
|
+
*/
|
|
70
|
+
markdown: string;
|
|
71
|
+
/**
|
|
72
|
+
* Optimistic-concurrency revision. Increments on every markdown write; send
|
|
73
|
+
* it back with update/append calls to detect conflicting writers.
|
|
74
|
+
*/
|
|
75
|
+
revision: number;
|
|
76
|
+
}
|
|
77
|
+
export interface WorkspaceMarkdownNoteResponseContract {
|
|
78
|
+
note: WorkspaceMarkdownNoteContract;
|
|
79
|
+
}
|
|
80
|
+
export interface CreateWorkspaceMarkdownNoteRequestContract {
|
|
81
|
+
title: string;
|
|
82
|
+
/**
|
|
83
|
+
* Parent folder global id. Defaults to `default`.
|
|
84
|
+
*/
|
|
85
|
+
parentId?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* Optional initial markdown content. Defaults to an empty document.
|
|
88
|
+
*/
|
|
89
|
+
markdown?: string | null;
|
|
90
|
+
}
|
|
91
|
+
export interface UpdateWorkspaceMarkdownNoteContentRequestContract {
|
|
92
|
+
/**
|
|
93
|
+
* Full markdown document that replaces the current note content.
|
|
94
|
+
*/
|
|
95
|
+
markdown: string;
|
|
96
|
+
/**
|
|
97
|
+
* Revision returned by the last read. The write is rejected with HTTP 409
|
|
98
|
+
* (`data.errorCode` = markdown_note_revision_conflict) when it is stale.
|
|
99
|
+
*/
|
|
100
|
+
revision: number;
|
|
101
|
+
}
|
|
102
|
+
export interface AppendWorkspaceMarkdownNoteContentRequestContract {
|
|
103
|
+
/**
|
|
104
|
+
* Markdown appended to the end of the existing note content.
|
|
105
|
+
*/
|
|
106
|
+
markdown: string;
|
|
107
|
+
/**
|
|
108
|
+
* Optional optimistic lock. When provided and stale, the write is rejected
|
|
109
|
+
* with HTTP 409 (`data.errorCode` = markdown_note_revision_conflict).
|
|
110
|
+
* Omit it to append unconditionally.
|
|
111
|
+
*/
|
|
112
|
+
revision?: number | null;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Body returned with HTTP 409 when a markdown write carries a stale revision.
|
|
116
|
+
* `data.currentRevision` is the revision currently stored by note-service;
|
|
117
|
+
* re-read the note (or reuse this value) and retry the write.
|
|
118
|
+
*/
|
|
119
|
+
export interface WorkspaceMarkdownNoteRevisionConflictErrorBodyContract {
|
|
120
|
+
success: false;
|
|
121
|
+
message: string;
|
|
122
|
+
data: {
|
|
123
|
+
code: string;
|
|
124
|
+
errorCode: "markdown_note_revision_conflict";
|
|
125
|
+
currentRevision: number;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
66
128
|
export interface AddWorkspaceNoteAttachmentRequestContract {
|
|
67
129
|
/**
|
|
68
130
|
* Stored-file UUID returned by completeMultipartFileUpload.
|
package/package.json
CHANGED
package/release-notes/latest.md
CHANGED