@fusebase/fusebase-gate-sdk 2.8.0 → 2.10.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/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 { AddWorkspaceMarkdownNoteAttachmentRequestContract, AddWorkspaceMarkdownNoteAttachmentResponseContract, AddWorkspaceNoteAttachmentRequestContract, AddWorkspaceNoteAttachmentResponseContract, AppendWorkspaceMarkdownNoteContentRequestContract, AppendWorkspaceNoteContentRequestContract, CreateWorkspaceMarkdownNoteRequestContract, CreateWorkspaceNoteFolderRequestContract, CreateWorkspaceNoteFolderResponseContract, CreateWorkspaceNoteRequestContract, CreateWorkspaceNoteResponseContract, orgIdInPathRequired, UpdateWorkspaceMarkdownNoteContentRequestContract, WorkspaceIdInPathRequired, WorkspaceMarkdownNoteResponseContract, WorkspaceNoteContentResponseContract, WorkspaceNoteFolderListResponseContract, WorkspaceNoteIdInPathRequired, WorkspaceNoteListResponseContract, WorkspaceNoteParentIdInQueryOptional } from "../types";
|
|
8
|
+
import type { AddWorkspaceMarkdownNoteAttachmentRequestContract, AddWorkspaceMarkdownNoteAttachmentResponseContract, AddWorkspaceNoteAttachmentRequestContract, AddWorkspaceNoteAttachmentResponseContract, AppendWorkspaceMarkdownNoteContentRequestContract, AppendWorkspaceNoteContentRequestContract, CreateWorkspaceMarkdownNoteRequestContract, CreateWorkspaceNoteFolderRequestContract, CreateWorkspaceNoteFolderResponseContract, CreateWorkspaceNoteRequestContract, CreateWorkspaceNoteResponseContract, orgIdInPathRequired, ShareWorkspaceMarkdownNoteRequestContract, ShareWorkspaceMarkdownNoteResponseContract, UnshareWorkspaceMarkdownNoteResponseContract, 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);
|
|
@@ -146,6 +146,31 @@ export declare class NotesApi {
|
|
|
146
146
|
};
|
|
147
147
|
headers?: Record<string, string>;
|
|
148
148
|
}): Promise<WorkspaceNoteListResponseContract>;
|
|
149
|
+
/**
|
|
150
|
+
* Share markdown (v3) note
|
|
151
|
+
* Publishes a v3 markdown note through the existing note-service share flow and returns the share links for the three read-only modes: `ui` (full share page), `rendered` (markdown only) and `raw` (the markdown source as `text/markdown`). note-service creates the security key and enforces the caller's own note access, password and access-control rules — gate mints nothing. Calling it again on an already shared note updates that same share instead of creating a second one. v2 notes are not accepted here; they keep their existing sharing flow.
|
|
152
|
+
*/
|
|
153
|
+
shareWorkspaceMarkdownNote(params: {
|
|
154
|
+
path: {
|
|
155
|
+
orgId: orgIdInPathRequired;
|
|
156
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
157
|
+
noteId: WorkspaceNoteIdInPathRequired;
|
|
158
|
+
};
|
|
159
|
+
headers?: Record<string, string>;
|
|
160
|
+
body?: ShareWorkspaceMarkdownNoteRequestContract;
|
|
161
|
+
}): Promise<ShareWorkspaceMarkdownNoteResponseContract>;
|
|
162
|
+
/**
|
|
163
|
+
* Revoke markdown (v3) note share
|
|
164
|
+
* Revokes the web share of a v3 markdown note, so every share link stops serving it. Re-sharing the same note later reuses the same share id and security key, so a revoked link becomes live again — mint a new note if the old link must stay dead.
|
|
165
|
+
*/
|
|
166
|
+
unshareWorkspaceMarkdownNote(params: {
|
|
167
|
+
path: {
|
|
168
|
+
orgId: orgIdInPathRequired;
|
|
169
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
170
|
+
noteId: WorkspaceNoteIdInPathRequired;
|
|
171
|
+
};
|
|
172
|
+
headers?: Record<string, string>;
|
|
173
|
+
}): Promise<UnshareWorkspaceMarkdownNoteResponseContract>;
|
|
149
174
|
/**
|
|
150
175
|
* Replace workspace markdown note content
|
|
151
176
|
* 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`.
|
package/dist/apis/NotesApi.js
CHANGED
|
@@ -173,6 +173,35 @@ class NotesApi {
|
|
|
173
173
|
expectedContentType: "application/json",
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Share markdown (v3) note
|
|
178
|
+
* Publishes a v3 markdown note through the existing note-service share flow and returns the share links for the three read-only modes: `ui` (full share page), `rendered` (markdown only) and `raw` (the markdown source as `text/markdown`). note-service creates the security key and enforces the caller's own note access, password and access-control rules — gate mints nothing. Calling it again on an already shared note updates that same share instead of creating a second one. v2 notes are not accepted here; they keep their existing sharing flow.
|
|
179
|
+
*/
|
|
180
|
+
async shareWorkspaceMarkdownNote(params) {
|
|
181
|
+
return this.client.request({
|
|
182
|
+
method: "POST",
|
|
183
|
+
path: "/:orgId/workspaces/:workspaceId/markdown-notes/:noteId/share",
|
|
184
|
+
pathParams: params.path,
|
|
185
|
+
headers: params.headers,
|
|
186
|
+
body: params.body,
|
|
187
|
+
opId: "shareWorkspaceMarkdownNote",
|
|
188
|
+
expectedContentType: "application/json",
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Revoke markdown (v3) note share
|
|
193
|
+
* Revokes the web share of a v3 markdown note, so every share link stops serving it. Re-sharing the same note later reuses the same share id and security key, so a revoked link becomes live again — mint a new note if the old link must stay dead.
|
|
194
|
+
*/
|
|
195
|
+
async unshareWorkspaceMarkdownNote(params) {
|
|
196
|
+
return this.client.request({
|
|
197
|
+
method: "DELETE",
|
|
198
|
+
path: "/:orgId/workspaces/:workspaceId/markdown-notes/:noteId/share",
|
|
199
|
+
pathParams: params.path,
|
|
200
|
+
headers: params.headers,
|
|
201
|
+
opId: "unshareWorkspaceMarkdownNote",
|
|
202
|
+
expectedContentType: "application/json",
|
|
203
|
+
});
|
|
204
|
+
}
|
|
176
205
|
/**
|
|
177
206
|
* Replace workspace markdown note content
|
|
178
207
|
* 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`.
|
|
@@ -170,7 +170,53 @@ export interface AddWorkspaceMarkdownNoteAttachmentResponseContract {
|
|
|
170
170
|
*/
|
|
171
171
|
note: WorkspaceMarkdownNoteContract;
|
|
172
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Who may open a share link. Mirrors the note-service share model:
|
|
175
|
+
* `public` — anyone with the link, `workspace` — workspace members,
|
|
176
|
+
* `org` — organization members.
|
|
177
|
+
*/
|
|
178
|
+
export type WorkspaceMarkdownNoteShareAccessControlContract = "public" | "workspace" | "org";
|
|
179
|
+
export interface ShareWorkspaceMarkdownNoteRequestContract {
|
|
180
|
+
/**
|
|
181
|
+
* Who may open the link. Defaults to `public` for a new share; omitting it
|
|
182
|
+
* on an already shared note keeps the current setting.
|
|
183
|
+
*/
|
|
184
|
+
accessControl?: WorkspaceMarkdownNoteShareAccessControlContract | null;
|
|
185
|
+
/**
|
|
186
|
+
* Optional share password. note-service hashes and stores it; readers are
|
|
187
|
+
* asked for it before the note is served. Omit it to leave the share
|
|
188
|
+
* password unchanged is not supported: an omitted password clears it.
|
|
189
|
+
*/
|
|
190
|
+
password?: string | null;
|
|
191
|
+
}
|
|
192
|
+
export interface WorkspaceMarkdownNoteShareUrlsContract {
|
|
193
|
+
/** Full share page with navigation and branding. */
|
|
194
|
+
ui: string;
|
|
195
|
+
/** Rendered markdown only, without the surrounding Fusebase UI. */
|
|
196
|
+
rendered: string;
|
|
197
|
+
/** The markdown source, served as `text/markdown`. */
|
|
198
|
+
raw: string;
|
|
199
|
+
}
|
|
200
|
+
export interface WorkspaceMarkdownNoteShareContract {
|
|
201
|
+
shareId: number;
|
|
202
|
+
securityKey: string;
|
|
203
|
+
accessControl: WorkspaceMarkdownNoteShareAccessControlContract;
|
|
204
|
+
passwordRequired: boolean;
|
|
205
|
+
urls: WorkspaceMarkdownNoteShareUrlsContract;
|
|
206
|
+
}
|
|
207
|
+
export interface ShareWorkspaceMarkdownNoteResponseContract {
|
|
208
|
+
share: WorkspaceMarkdownNoteShareContract;
|
|
209
|
+
}
|
|
210
|
+
export interface UnshareWorkspaceMarkdownNoteResponseContract {
|
|
211
|
+
noteId: string;
|
|
212
|
+
shared: boolean;
|
|
213
|
+
}
|
|
173
214
|
export declare const WorkspaceNoteContentFormatContract: {
|
|
174
215
|
readonly Text: "text";
|
|
175
216
|
readonly Html: "html";
|
|
176
217
|
};
|
|
218
|
+
export declare const WorkspaceMarkdownNoteShareAccessControlContract: {
|
|
219
|
+
readonly Public: "public";
|
|
220
|
+
readonly Workspace: "workspace";
|
|
221
|
+
readonly Org: "org";
|
|
222
|
+
};
|
package/dist/types/note/note.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkspaceNoteContentFormatContract = void 0;
|
|
3
|
+
exports.WorkspaceMarkdownNoteShareAccessControlContract = exports.WorkspaceNoteContentFormatContract = void 0;
|
|
4
4
|
exports.WorkspaceNoteContentFormatContract = {
|
|
5
5
|
Text: "text",
|
|
6
6
|
Html: "html"
|
|
7
7
|
};
|
|
8
|
+
exports.WorkspaceMarkdownNoteShareAccessControlContract = {
|
|
9
|
+
Public: "public",
|
|
10
|
+
Workspace: "workspace",
|
|
11
|
+
Org: "org"
|
|
12
|
+
};
|
package/package.json
CHANGED
package/release-notes/latest.md
CHANGED