@dreamlake/dreamlake-cli 0.89.0 → 0.91.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/api/client.d.ts +2 -1
- package/dist/api/client.js +1 -1
- package/dist/api/index.d.ts +105 -70
- package/dist/api/index.js +2 -0
- package/dist/api/note-files.d.ts +57 -30
- package/dist/api/note-files.js +100 -58
- package/dist/api/note-linger.d.ts +83 -0
- package/dist/api/note-linger.js +270 -0
- package/dist/api/note-presence.d.ts +82 -0
- package/dist/api/note-presence.js +72 -0
- package/dist/api/note-reading.d.ts +24 -0
- package/dist/api/note-reading.js +15 -0
- package/dist/api/notes.d.ts +59 -32
- package/dist/api/notes.js +32 -2
- package/dist/api/sessions.d.ts +6 -1
- package/dist/cli/notes/api-transport.d.ts +5 -0
- package/dist/cli/notes/api-transport.js +20 -0
- package/dist/cli/notes/document.js +28 -3
- package/dist/cli/notes/files-commands.d.ts +2 -25
- package/dist/cli/notes/files-commands.js +16 -22
- package/dist/cli/notes/index.js +5 -8
- package/dist/cli/notes/linger.d.ts +3 -58
- package/dist/cli/notes/linger.js +56 -299
- package/dist/cli/notes/select-command.js +20 -41
- package/dist/cli/sessions/index.js +15 -4
- package/dist/cli/version.d.ts +1 -1
- package/dist/cli/version.js +1 -1
- package/package.json +9 -9
package/dist/api/client.d.ts
CHANGED
|
@@ -32,7 +32,8 @@ export interface RequestOptions {
|
|
|
32
32
|
onHeaders?: (headers: Headers) => void;
|
|
33
33
|
query?: Record<string, string | number | boolean | undefined | null>;
|
|
34
34
|
headers?: Record<string, string>;
|
|
35
|
-
|
|
35
|
+
/** null on raw streaming requests uses the caller's signal and idle deadline instead of a total deadline. */
|
|
36
|
+
timeoutMs?: number | null;
|
|
36
37
|
signal?: AbortSignal;
|
|
37
38
|
}
|
|
38
39
|
/** A non-2xx response. `code` is the server's stable error identifier. */
|
package/dist/api/client.js
CHANGED
|
@@ -53,7 +53,7 @@ export function createTransport(options) {
|
|
|
53
53
|
token: options.token,
|
|
54
54
|
fetch: doFetch,
|
|
55
55
|
headers: headers(request),
|
|
56
|
-
timeoutMs: request.timeoutMs ?? options.timeoutMs ?? 30000,
|
|
56
|
+
timeoutMs: request.timeoutMs === null && request.signal ? undefined : request.timeoutMs ?? options.timeoutMs ?? 30000,
|
|
57
57
|
});
|
|
58
58
|
if (!response.ok)
|
|
59
59
|
throw apiFailure(new HttpError(response.status, await response.text().catch(() => "")));
|
package/dist/api/index.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export * from "./content.js";
|
|
|
17
17
|
export * from "./execution.js";
|
|
18
18
|
export * from "./ownership.js";
|
|
19
19
|
export * from "./note-files.js";
|
|
20
|
+
export * from "./note-presence.js";
|
|
21
|
+
export * from "./note-linger.js";
|
|
20
22
|
export * from "./jobs.js";
|
|
21
23
|
export * from "./infra.js";
|
|
22
24
|
import { type ClientOptions, type Transport } from "./client.js";
|
|
@@ -308,9 +310,7 @@ export declare function createApi(transport: Transport): {
|
|
|
308
310
|
serviceAccounts: (namespace: string) => {
|
|
309
311
|
list: (query?: {
|
|
310
312
|
page?: number;
|
|
311
|
-
pageSize
|
|
312
|
-
/** TypeScript operations use an explicit transport; importing does not execute CLI startup. */
|
|
313
|
-
?: number;
|
|
313
|
+
pageSize?: number;
|
|
314
314
|
}) => Promise<unknown>;
|
|
315
315
|
get: (id: string) => Promise<unknown>;
|
|
316
316
|
create: (input: {
|
|
@@ -369,7 +369,7 @@ export declare function createApi(transport: Transport): {
|
|
|
369
369
|
id: string;
|
|
370
370
|
}) => Promise<unknown>;
|
|
371
371
|
list: (query?: import("./sessions.js").ListSessionsQuery) => Promise<import("./sessions.js").SessionPage>;
|
|
372
|
-
available: (query?: import("./sessions.js").
|
|
372
|
+
available: (query?: import("./sessions.js").AvailableSessionsQuery) => Promise<import("./sessions.js").SessionPage>;
|
|
373
373
|
get: (sessionId: string) => Promise<import("./sessions.js").Session>;
|
|
374
374
|
conversation: (sessionId: string) => Promise<{
|
|
375
375
|
conversation: import("./sessions.js").Conversation | null;
|
|
@@ -474,7 +474,17 @@ export declare function createApi(transport: Transport): {
|
|
|
474
474
|
managed: (id: string, action: "status" | "start" | "reconnect" | "stop", input: Record<string, unknown>) => Promise<unknown>;
|
|
475
475
|
};
|
|
476
476
|
notes: (namespace: string) => {
|
|
477
|
+
linger: (noteId: string, options: import("./note-linger.js").NoteLingerOptions, receive: (event: import("./note-linger.js").NoteLingerEvent) => void | Promise<void>) => Promise<void>;
|
|
477
478
|
namespace: string;
|
|
479
|
+
resolve: (ref: string) => Promise<string>;
|
|
480
|
+
selectElement: (noteId: string, css: string) => Promise<{
|
|
481
|
+
etag: string;
|
|
482
|
+
tag: string;
|
|
483
|
+
attrs: Record<string, string | null>;
|
|
484
|
+
outer: [number, number];
|
|
485
|
+
inner: [number, number];
|
|
486
|
+
text: string;
|
|
487
|
+
}>;
|
|
478
488
|
source: (noteId: string, at?: string) => Promise<import("./note-edits.js").NoteSource>;
|
|
479
489
|
patch: (noteId: string, input: import("./note-edits.js").NotePatch) => Promise<{
|
|
480
490
|
note: string;
|
|
@@ -550,25 +560,24 @@ export declare function createApi(transport: Transport): {
|
|
|
550
560
|
remove: (userId: string) => Promise<unknown>;
|
|
551
561
|
};
|
|
552
562
|
files: (noteId: string) => {
|
|
553
|
-
|
|
554
|
-
list: (query?: {
|
|
555
|
-
prefix?: string;
|
|
556
|
-
trash?: boolean;
|
|
557
|
-
limit?: number;
|
|
558
|
-
offset?: number;
|
|
559
|
-
}) => Promise<{
|
|
560
|
-
files: import("./note-files.js").NoteFile[];
|
|
561
|
-
total: number;
|
|
562
|
-
}>;
|
|
563
|
+
list: (query?: import("./note-files.js").NoteFileListOptions) => Promise<import("./note-files.js").NoteFilePage>;
|
|
563
564
|
get: (id: string) => Promise<import("./note-files.js").NoteFile>;
|
|
564
|
-
|
|
565
|
+
resolve: (ref: string, includeTrashed?: boolean) => Promise<import("./note-files.js").NoteFile>;
|
|
566
|
+
text: (ref: string) => Promise<{
|
|
565
567
|
text: string;
|
|
566
568
|
etag: string;
|
|
567
569
|
}>;
|
|
568
|
-
|
|
570
|
+
cat: (ref: string) => Promise<{
|
|
571
|
+
text: string;
|
|
572
|
+
etag: string;
|
|
573
|
+
}>;
|
|
574
|
+
download: (ref: string, signal?: AbortSignal) => Promise<Response>;
|
|
575
|
+
upload: (path: string, body: NonNullable<import("./client.js").RequestOptions["body"]> | import("stream").Readable, options?: {
|
|
569
576
|
contentType?: string;
|
|
570
577
|
overwrite?: boolean;
|
|
571
578
|
ifMatch?: string;
|
|
579
|
+
contentLength?: number;
|
|
580
|
+
signal?: AbortSignal;
|
|
572
581
|
}) => Promise<import("./note-files.js").NoteFile>;
|
|
573
582
|
write: (input: {
|
|
574
583
|
path: string;
|
|
@@ -578,40 +587,36 @@ export declare function createApi(transport: Transport): {
|
|
|
578
587
|
}, options?: {
|
|
579
588
|
ifMatch?: string;
|
|
580
589
|
idempotencyKey?: string;
|
|
581
|
-
}) => Promise<import("./note-files.js").
|
|
582
|
-
move: (
|
|
590
|
+
}) => Promise<import("./note-files.js").NoteFileWriteReceipt>;
|
|
591
|
+
move: (ref: string, path: string, options?: {
|
|
583
592
|
overwrite?: boolean;
|
|
584
593
|
ifMatch?: string;
|
|
585
594
|
}) => Promise<import("./note-files.js").NoteFile>;
|
|
586
|
-
copy: (
|
|
595
|
+
copy: (ref: string, path: string, options?: {
|
|
587
596
|
overwrite?: boolean;
|
|
588
597
|
idempotencyKey?: string;
|
|
589
|
-
}) => Promise<import("./note-files.js").
|
|
590
|
-
operation: (operationId: string, action?: "status" | "reconcile" | "cancel") => Promise<
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
}>;
|
|
596
|
-
delete: (id: string, options?: {
|
|
598
|
+
}) => Promise<import("./note-files.js").NoteFileWriteReceipt>;
|
|
599
|
+
operation: (operationId: string, action?: "status" | "reconcile" | "cancel") => Promise<import("./note-files.js").NoteFileOperationReceipt>;
|
|
600
|
+
status: (id: string) => Promise<import("./note-files.js").NoteFileOperationReceipt>;
|
|
601
|
+
reconcile: (id: string) => Promise<import("./note-files.js").NoteFileOperationReceipt>;
|
|
602
|
+
cancel: (id: string) => Promise<import("./note-files.js").NoteFileOperationReceipt>;
|
|
603
|
+
delete: (ref: string, options?: {
|
|
597
604
|
purge?: boolean;
|
|
598
605
|
ifMatch?: string;
|
|
599
606
|
}) => Promise<{
|
|
600
607
|
id: string;
|
|
601
608
|
purged: boolean;
|
|
602
609
|
}>;
|
|
603
|
-
restore: (
|
|
604
|
-
preview: (
|
|
605
|
-
|
|
606
|
-
url: string;
|
|
607
|
-
}>;
|
|
608
|
-
revokePreview: (id: string) => Promise<{
|
|
610
|
+
restore: (ref: string, path?: string) => Promise<import("./note-files.js").NoteFile>;
|
|
611
|
+
preview: (ref: string, share?: boolean) => Promise<import("./note-files.js").NoteFilePreview>;
|
|
612
|
+
revokePreview: (ref: string) => Promise<{
|
|
609
613
|
id: string;
|
|
610
614
|
shared: boolean;
|
|
611
615
|
}>;
|
|
612
616
|
};
|
|
613
|
-
media: (form: FormData) => Promise<
|
|
617
|
+
media: (form: FormData) => Promise<import("./notes.js").NoteMediaReceipt>;
|
|
614
618
|
read: (noteId: string, query?: import("./common.js").Query) => Promise<import("./notes.js").NoteReadResult>;
|
|
619
|
+
readView: (noteId: string, options?: import("./note-reading.js").NoteReadingOptions) => Promise<import("./note-reading.js").NoteReadingPage>;
|
|
615
620
|
html: (noteId: string, options?: {
|
|
616
621
|
at?: string;
|
|
617
622
|
section?: string;
|
|
@@ -630,7 +635,6 @@ export declare function createApi(transport: Transport): {
|
|
|
630
635
|
since?: string;
|
|
631
636
|
format?: "diff" | "inline-dff";
|
|
632
637
|
}) => Promise<unknown>;
|
|
633
|
-
presence: (noteId: string, input: import("./common.js").JsonObject) => Promise<unknown>;
|
|
634
638
|
saveVersion: (noteId: string, input: {
|
|
635
639
|
hash: string;
|
|
636
640
|
tag?: string;
|
|
@@ -697,6 +701,20 @@ export declare function createApi(transport: Transport): {
|
|
|
697
701
|
after?: string;
|
|
698
702
|
}, ifMatch?: string) => Promise<import("./notes.js").WriteReceipt>;
|
|
699
703
|
removeSection: (noteId: string, anchor: string, ifMatch?: string) => Promise<import("./notes.js").WriteReceipt>;
|
|
704
|
+
presence: {
|
|
705
|
+
(id: string): Promise<import("./note-presence.js").NotePresenceRoster>;
|
|
706
|
+
(id: string, input: Record<string, unknown>): Promise<import("./note-presence.js").NotePresenceReceipt>;
|
|
707
|
+
};
|
|
708
|
+
presenceText: (id: string) => Promise<string>;
|
|
709
|
+
updatePresence: (id: string, input: Record<string, unknown>, options?: import("./client.js").RequestOptions) => Promise<import("./note-presence.js").NotePresenceReceipt>;
|
|
710
|
+
visit: (id: string, options?: {
|
|
711
|
+
intent?: string;
|
|
712
|
+
}) => Promise<import("./note-presence.js").NotePresenceReceipt>;
|
|
713
|
+
activity: (id: string, options?: import("./client.js").RequestOptions) => Promise<{
|
|
714
|
+
activities: import("./note-presence.js").NoteActivity[];
|
|
715
|
+
}>;
|
|
716
|
+
events: (id: string, signal: AbortSignal, receive: (event: import("./note-events.js").NoteEvent) => void) => Promise<void>;
|
|
717
|
+
selectText: (id: string, options: import("./note-presence.js").NoteSelectionOptions) => Promise<import("./note-presence.js").NoteSelectionReceipt>;
|
|
700
718
|
};
|
|
701
719
|
projects: (namespace: string) => {
|
|
702
720
|
grants: (project: string) => Promise<unknown>;
|
|
@@ -1489,9 +1507,7 @@ export declare function createClient(options: ClientOptions): {
|
|
|
1489
1507
|
serviceAccounts: (namespace: string) => {
|
|
1490
1508
|
list: (query?: {
|
|
1491
1509
|
page?: number;
|
|
1492
|
-
pageSize
|
|
1493
|
-
/** TypeScript operations use an explicit transport; importing does not execute CLI startup. */
|
|
1494
|
-
?: number;
|
|
1510
|
+
pageSize?: number;
|
|
1495
1511
|
}) => Promise<unknown>;
|
|
1496
1512
|
get: (id: string) => Promise<unknown>;
|
|
1497
1513
|
create: (input: {
|
|
@@ -1550,7 +1566,7 @@ export declare function createClient(options: ClientOptions): {
|
|
|
1550
1566
|
id: string;
|
|
1551
1567
|
}) => Promise<unknown>;
|
|
1552
1568
|
list: (query?: import("./sessions.js").ListSessionsQuery) => Promise<import("./sessions.js").SessionPage>;
|
|
1553
|
-
available: (query?: import("./sessions.js").
|
|
1569
|
+
available: (query?: import("./sessions.js").AvailableSessionsQuery) => Promise<import("./sessions.js").SessionPage>;
|
|
1554
1570
|
get: (sessionId: string) => Promise<import("./sessions.js").Session>;
|
|
1555
1571
|
conversation: (sessionId: string) => Promise<{
|
|
1556
1572
|
conversation: import("./sessions.js").Conversation | null;
|
|
@@ -1655,7 +1671,17 @@ export declare function createClient(options: ClientOptions): {
|
|
|
1655
1671
|
managed: (id: string, action: "status" | "start" | "reconnect" | "stop", input: Record<string, unknown>) => Promise<unknown>;
|
|
1656
1672
|
};
|
|
1657
1673
|
notes: (namespace: string) => {
|
|
1674
|
+
linger: (noteId: string, options: import("./note-linger.js").NoteLingerOptions, receive: (event: import("./note-linger.js").NoteLingerEvent) => void | Promise<void>) => Promise<void>;
|
|
1658
1675
|
namespace: string;
|
|
1676
|
+
resolve: (ref: string) => Promise<string>;
|
|
1677
|
+
selectElement: (noteId: string, css: string) => Promise<{
|
|
1678
|
+
etag: string;
|
|
1679
|
+
tag: string;
|
|
1680
|
+
attrs: Record<string, string | null>;
|
|
1681
|
+
outer: [number, number];
|
|
1682
|
+
inner: [number, number];
|
|
1683
|
+
text: string;
|
|
1684
|
+
}>;
|
|
1659
1685
|
source: (noteId: string, at?: string) => Promise<import("./note-edits.js").NoteSource>;
|
|
1660
1686
|
patch: (noteId: string, input: import("./note-edits.js").NotePatch) => Promise<{
|
|
1661
1687
|
note: string;
|
|
@@ -1731,25 +1757,24 @@ export declare function createClient(options: ClientOptions): {
|
|
|
1731
1757
|
remove: (userId: string) => Promise<unknown>;
|
|
1732
1758
|
};
|
|
1733
1759
|
files: (noteId: string) => {
|
|
1734
|
-
|
|
1735
|
-
list: (query?: {
|
|
1736
|
-
prefix?: string;
|
|
1737
|
-
trash?: boolean;
|
|
1738
|
-
limit?: number;
|
|
1739
|
-
offset?: number;
|
|
1740
|
-
}) => Promise<{
|
|
1741
|
-
files: import("./note-files.js").NoteFile[];
|
|
1742
|
-
total: number;
|
|
1743
|
-
}>;
|
|
1760
|
+
list: (query?: import("./note-files.js").NoteFileListOptions) => Promise<import("./note-files.js").NoteFilePage>;
|
|
1744
1761
|
get: (id: string) => Promise<import("./note-files.js").NoteFile>;
|
|
1745
|
-
|
|
1762
|
+
resolve: (ref: string, includeTrashed?: boolean) => Promise<import("./note-files.js").NoteFile>;
|
|
1763
|
+
text: (ref: string) => Promise<{
|
|
1746
1764
|
text: string;
|
|
1747
1765
|
etag: string;
|
|
1748
1766
|
}>;
|
|
1749
|
-
|
|
1767
|
+
cat: (ref: string) => Promise<{
|
|
1768
|
+
text: string;
|
|
1769
|
+
etag: string;
|
|
1770
|
+
}>;
|
|
1771
|
+
download: (ref: string, signal?: AbortSignal) => Promise<Response>;
|
|
1772
|
+
upload: (path: string, body: NonNullable<import("./client.js").RequestOptions["body"]> | import("stream").Readable, options?: {
|
|
1750
1773
|
contentType?: string;
|
|
1751
1774
|
overwrite?: boolean;
|
|
1752
1775
|
ifMatch?: string;
|
|
1776
|
+
contentLength?: number;
|
|
1777
|
+
signal?: AbortSignal;
|
|
1753
1778
|
}) => Promise<import("./note-files.js").NoteFile>;
|
|
1754
1779
|
write: (input: {
|
|
1755
1780
|
path: string;
|
|
@@ -1759,40 +1784,36 @@ export declare function createClient(options: ClientOptions): {
|
|
|
1759
1784
|
}, options?: {
|
|
1760
1785
|
ifMatch?: string;
|
|
1761
1786
|
idempotencyKey?: string;
|
|
1762
|
-
}) => Promise<import("./note-files.js").
|
|
1763
|
-
move: (
|
|
1787
|
+
}) => Promise<import("./note-files.js").NoteFileWriteReceipt>;
|
|
1788
|
+
move: (ref: string, path: string, options?: {
|
|
1764
1789
|
overwrite?: boolean;
|
|
1765
1790
|
ifMatch?: string;
|
|
1766
1791
|
}) => Promise<import("./note-files.js").NoteFile>;
|
|
1767
|
-
copy: (
|
|
1792
|
+
copy: (ref: string, path: string, options?: {
|
|
1768
1793
|
overwrite?: boolean;
|
|
1769
1794
|
idempotencyKey?: string;
|
|
1770
|
-
}) => Promise<import("./note-files.js").
|
|
1771
|
-
operation: (operationId: string, action?: "status" | "reconcile" | "cancel") => Promise<
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
}>;
|
|
1777
|
-
delete: (id: string, options?: {
|
|
1795
|
+
}) => Promise<import("./note-files.js").NoteFileWriteReceipt>;
|
|
1796
|
+
operation: (operationId: string, action?: "status" | "reconcile" | "cancel") => Promise<import("./note-files.js").NoteFileOperationReceipt>;
|
|
1797
|
+
status: (id: string) => Promise<import("./note-files.js").NoteFileOperationReceipt>;
|
|
1798
|
+
reconcile: (id: string) => Promise<import("./note-files.js").NoteFileOperationReceipt>;
|
|
1799
|
+
cancel: (id: string) => Promise<import("./note-files.js").NoteFileOperationReceipt>;
|
|
1800
|
+
delete: (ref: string, options?: {
|
|
1778
1801
|
purge?: boolean;
|
|
1779
1802
|
ifMatch?: string;
|
|
1780
1803
|
}) => Promise<{
|
|
1781
1804
|
id: string;
|
|
1782
1805
|
purged: boolean;
|
|
1783
1806
|
}>;
|
|
1784
|
-
restore: (
|
|
1785
|
-
preview: (
|
|
1786
|
-
|
|
1787
|
-
url: string;
|
|
1788
|
-
}>;
|
|
1789
|
-
revokePreview: (id: string) => Promise<{
|
|
1807
|
+
restore: (ref: string, path?: string) => Promise<import("./note-files.js").NoteFile>;
|
|
1808
|
+
preview: (ref: string, share?: boolean) => Promise<import("./note-files.js").NoteFilePreview>;
|
|
1809
|
+
revokePreview: (ref: string) => Promise<{
|
|
1790
1810
|
id: string;
|
|
1791
1811
|
shared: boolean;
|
|
1792
1812
|
}>;
|
|
1793
1813
|
};
|
|
1794
|
-
media: (form: FormData) => Promise<
|
|
1814
|
+
media: (form: FormData) => Promise<import("./notes.js").NoteMediaReceipt>;
|
|
1795
1815
|
read: (noteId: string, query?: import("./common.js").Query) => Promise<import("./notes.js").NoteReadResult>;
|
|
1816
|
+
readView: (noteId: string, options?: import("./note-reading.js").NoteReadingOptions) => Promise<import("./note-reading.js").NoteReadingPage>;
|
|
1796
1817
|
html: (noteId: string, options?: {
|
|
1797
1818
|
at?: string;
|
|
1798
1819
|
section?: string;
|
|
@@ -1811,7 +1832,6 @@ export declare function createClient(options: ClientOptions): {
|
|
|
1811
1832
|
since?: string;
|
|
1812
1833
|
format?: "diff" | "inline-dff";
|
|
1813
1834
|
}) => Promise<unknown>;
|
|
1814
|
-
presence: (noteId: string, input: import("./common.js").JsonObject) => Promise<unknown>;
|
|
1815
1835
|
saveVersion: (noteId: string, input: {
|
|
1816
1836
|
hash: string;
|
|
1817
1837
|
tag?: string;
|
|
@@ -1878,6 +1898,20 @@ export declare function createClient(options: ClientOptions): {
|
|
|
1878
1898
|
after?: string;
|
|
1879
1899
|
}, ifMatch?: string) => Promise<import("./notes.js").WriteReceipt>;
|
|
1880
1900
|
removeSection: (noteId: string, anchor: string, ifMatch?: string) => Promise<import("./notes.js").WriteReceipt>;
|
|
1901
|
+
presence: {
|
|
1902
|
+
(id: string): Promise<import("./note-presence.js").NotePresenceRoster>;
|
|
1903
|
+
(id: string, input: Record<string, unknown>): Promise<import("./note-presence.js").NotePresenceReceipt>;
|
|
1904
|
+
};
|
|
1905
|
+
presenceText: (id: string) => Promise<string>;
|
|
1906
|
+
updatePresence: (id: string, input: Record<string, unknown>, options?: import("./client.js").RequestOptions) => Promise<import("./note-presence.js").NotePresenceReceipt>;
|
|
1907
|
+
visit: (id: string, options?: {
|
|
1908
|
+
intent?: string;
|
|
1909
|
+
}) => Promise<import("./note-presence.js").NotePresenceReceipt>;
|
|
1910
|
+
activity: (id: string, options?: import("./client.js").RequestOptions) => Promise<{
|
|
1911
|
+
activities: import("./note-presence.js").NoteActivity[];
|
|
1912
|
+
}>;
|
|
1913
|
+
events: (id: string, signal: AbortSignal, receive: (event: import("./note-events.js").NoteEvent) => void) => Promise<void>;
|
|
1914
|
+
selectText: (id: string, options: import("./note-presence.js").NoteSelectionOptions) => Promise<import("./note-presence.js").NoteSelectionReceipt>;
|
|
1881
1915
|
};
|
|
1882
1916
|
projects: (namespace: string) => {
|
|
1883
1917
|
grants: (project: string) => Promise<unknown>;
|
|
@@ -2328,3 +2362,4 @@ export * from "./note-html-read.js";
|
|
|
2328
2362
|
export { characterDiff, NotePatchError, PATCH_LIMITS, } from "./note-character-plan.js";
|
|
2329
2363
|
export * from "./presigned-transfer.js";
|
|
2330
2364
|
export * from "./note-events.js";
|
|
2365
|
+
export type { NoteReadingOptions, NoteReadingPage } from "./note-reading.js";
|
package/dist/api/index.js
CHANGED
|
@@ -29,6 +29,8 @@ export * from "./content.js";
|
|
|
29
29
|
export * from "./execution.js";
|
|
30
30
|
export * from "./ownership.js";
|
|
31
31
|
export * from "./note-files.js";
|
|
32
|
+
export * from "./note-presence.js";
|
|
33
|
+
export * from "./note-linger.js";
|
|
32
34
|
export * from "./jobs.js";
|
|
33
35
|
export * from "./infra.js";
|
|
34
36
|
/** `@dreamlake/dreamlake-cli/api` — the DreamLake TypeScript API.
|
package/dist/api/note-files.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/** Note attachments. JSON receipts match `notes files … --json`; bytes remain streams. */
|
|
2
|
+
import { type Transport, type RequestOptions } from './client.js';
|
|
3
|
+
import type { Readable } from 'node:stream';
|
|
2
4
|
export interface NoteFile {
|
|
3
5
|
id: string;
|
|
4
6
|
path: string;
|
|
@@ -12,26 +14,56 @@ export interface NoteFile {
|
|
|
12
14
|
previewKind: string | null;
|
|
13
15
|
text: boolean;
|
|
14
16
|
}
|
|
17
|
+
export interface NoteFilePage {
|
|
18
|
+
files: NoteFile[];
|
|
19
|
+
total: number;
|
|
20
|
+
}
|
|
21
|
+
export interface NoteFileListOptions {
|
|
22
|
+
glob?: string;
|
|
23
|
+
trashed?: boolean;
|
|
24
|
+
contentType?: string;
|
|
25
|
+
limit?: number;
|
|
26
|
+
offset?: number;
|
|
27
|
+
/** @deprecated Use glob. This is interpreted as a literal path prefix. */
|
|
28
|
+
prefix?: string;
|
|
29
|
+
/** @deprecated Use trashed. */
|
|
30
|
+
trash?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export type NoteFileWriteReceipt = NoteFile & {
|
|
33
|
+
operationId?: string;
|
|
34
|
+
};
|
|
35
|
+
export interface NoteFileOperationReceipt {
|
|
36
|
+
operationId: string;
|
|
37
|
+
state: 'admitted' | 'write-started' | 'published' | 'aborted-before-write';
|
|
38
|
+
historicalResult: boolean;
|
|
39
|
+
file?: NoteFile;
|
|
40
|
+
}
|
|
41
|
+
export interface NoteFilePreview {
|
|
42
|
+
url: string;
|
|
43
|
+
kind: 'session' | 'shared';
|
|
44
|
+
previewKind: string | null;
|
|
45
|
+
}
|
|
46
|
+
export declare function noteFileOperationId(value: unknown): string | undefined;
|
|
47
|
+
export declare function validateNoteFileKey(key?: string): void;
|
|
15
48
|
export declare function noteFilesApi(t: Transport, base: string): {
|
|
16
|
-
|
|
17
|
-
list: (query?: {
|
|
18
|
-
prefix?: string;
|
|
19
|
-
trash?: boolean;
|
|
20
|
-
limit?: number;
|
|
21
|
-
offset?: number;
|
|
22
|
-
}) => Promise<{
|
|
23
|
-
files: NoteFile[];
|
|
24
|
-
total: number;
|
|
25
|
-
}>;
|
|
49
|
+
list: (query?: NoteFileListOptions) => Promise<NoteFilePage>;
|
|
26
50
|
get: (id: string) => Promise<NoteFile>;
|
|
27
|
-
|
|
51
|
+
resolve: (ref: string, includeTrashed?: boolean) => Promise<NoteFile>;
|
|
52
|
+
text: (ref: string) => Promise<{
|
|
28
53
|
text: string;
|
|
29
54
|
etag: string;
|
|
30
55
|
}>;
|
|
31
|
-
|
|
56
|
+
cat: (ref: string) => Promise<{
|
|
57
|
+
text: string;
|
|
58
|
+
etag: string;
|
|
59
|
+
}>;
|
|
60
|
+
download: (ref: string, signal?: AbortSignal) => Promise<Response>;
|
|
61
|
+
upload: (path: string, body: NonNullable<RequestOptions["body"]> | Readable, options?: {
|
|
32
62
|
contentType?: string;
|
|
33
63
|
overwrite?: boolean;
|
|
34
64
|
ifMatch?: string;
|
|
65
|
+
contentLength?: number;
|
|
66
|
+
signal?: AbortSignal;
|
|
35
67
|
}) => Promise<NoteFile>;
|
|
36
68
|
write: (input: {
|
|
37
69
|
path: string;
|
|
@@ -41,34 +73,29 @@ export declare function noteFilesApi(t: Transport, base: string): {
|
|
|
41
73
|
}, options?: {
|
|
42
74
|
ifMatch?: string;
|
|
43
75
|
idempotencyKey?: string;
|
|
44
|
-
}) => Promise<
|
|
45
|
-
move: (
|
|
76
|
+
}) => Promise<NoteFileWriteReceipt>;
|
|
77
|
+
move: (ref: string, path: string, options?: {
|
|
46
78
|
overwrite?: boolean;
|
|
47
79
|
ifMatch?: string;
|
|
48
80
|
}) => Promise<NoteFile>;
|
|
49
|
-
copy: (
|
|
81
|
+
copy: (ref: string, path: string, options?: {
|
|
50
82
|
overwrite?: boolean;
|
|
51
83
|
idempotencyKey?: string;
|
|
52
|
-
}) => Promise<
|
|
53
|
-
operation: (operationId: string, action?: "status" | "reconcile" | "cancel") => Promise<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}>;
|
|
59
|
-
delete: (id: string, options?: {
|
|
84
|
+
}) => Promise<NoteFileWriteReceipt>;
|
|
85
|
+
operation: (operationId: string, action?: "status" | "reconcile" | "cancel") => Promise<NoteFileOperationReceipt>;
|
|
86
|
+
status: (id: string) => Promise<NoteFileOperationReceipt>;
|
|
87
|
+
reconcile: (id: string) => Promise<NoteFileOperationReceipt>;
|
|
88
|
+
cancel: (id: string) => Promise<NoteFileOperationReceipt>;
|
|
89
|
+
delete: (ref: string, options?: {
|
|
60
90
|
purge?: boolean;
|
|
61
91
|
ifMatch?: string;
|
|
62
92
|
}) => Promise<{
|
|
63
93
|
id: string;
|
|
64
94
|
purged: boolean;
|
|
65
95
|
}>;
|
|
66
|
-
restore: (
|
|
67
|
-
preview: (
|
|
68
|
-
|
|
69
|
-
url: string;
|
|
70
|
-
}>;
|
|
71
|
-
revokePreview: (id: string) => Promise<{
|
|
96
|
+
restore: (ref: string, path?: string) => Promise<NoteFile>;
|
|
97
|
+
preview: (ref: string, share?: boolean) => Promise<NoteFilePreview>;
|
|
98
|
+
revokePreview: (ref: string) => Promise<{
|
|
72
99
|
id: string;
|
|
73
100
|
shared: boolean;
|
|
74
101
|
}>;
|