@dinoxx/dinox-cli 1.0.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/README.md +294 -0
- package/dist/auth/userInfo.d.ts +14 -0
- package/dist/auth/userInfo.js +115 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +32 -0
- package/dist/cliTypes.d.ts +6 -0
- package/dist/cliTypes.js +1 -0
- package/dist/commands/auth/index.d.ts +2 -0
- package/dist/commands/auth/index.js +193 -0
- package/dist/commands/boxes/index.d.ts +2 -0
- package/dist/commands/boxes/index.js +107 -0
- package/dist/commands/boxes/repo.d.ts +21 -0
- package/dist/commands/boxes/repo.js +154 -0
- package/dist/commands/config/index.d.ts +2 -0
- package/dist/commands/config/index.js +67 -0
- package/dist/commands/info/index.d.ts +2 -0
- package/dist/commands/info/index.js +20 -0
- package/dist/commands/notes/index.d.ts +2 -0
- package/dist/commands/notes/index.js +271 -0
- package/dist/commands/notes/repo.d.ts +70 -0
- package/dist/commands/notes/repo.js +674 -0
- package/dist/commands/notes/searchTime.d.ts +9 -0
- package/dist/commands/notes/searchTime.js +85 -0
- package/dist/commands/prompt/index.d.ts +2 -0
- package/dist/commands/prompt/index.js +51 -0
- package/dist/commands/prompt/repo.d.ts +6 -0
- package/dist/commands/prompt/repo.js +18 -0
- package/dist/commands/sync.d.ts +2 -0
- package/dist/commands/sync.js +68 -0
- package/dist/commands/tags/index.d.ts +2 -0
- package/dist/commands/tags/index.js +120 -0
- package/dist/commands/tags/repo.d.ts +14 -0
- package/dist/commands/tags/repo.js +247 -0
- package/dist/config/keys.d.ts +9 -0
- package/dist/config/keys.js +17 -0
- package/dist/config/paths.d.ts +4 -0
- package/dist/config/paths.js +39 -0
- package/dist/config/resolve.d.ts +2 -0
- package/dist/config/resolve.js +56 -0
- package/dist/config/serviceEndpoints.d.ts +3 -0
- package/dist/config/serviceEndpoints.js +3 -0
- package/dist/config/store.d.ts +5 -0
- package/dist/config/store.js +87 -0
- package/dist/config/types.d.ts +51 -0
- package/dist/config/types.js +1 -0
- package/dist/dinox.d.ts +2 -0
- package/dist/dinox.js +50 -0
- package/dist/powersync/connector.d.ts +21 -0
- package/dist/powersync/connector.js +58 -0
- package/dist/powersync/runtime.d.ts +37 -0
- package/dist/powersync/runtime.js +107 -0
- package/dist/powersync/schema/content.d.ts +76 -0
- package/dist/powersync/schema/content.js +76 -0
- package/dist/powersync/schema/index.d.ts +371 -0
- package/dist/powersync/schema/index.js +35 -0
- package/dist/powersync/schema/local.d.ts +68 -0
- package/dist/powersync/schema/local.js +83 -0
- package/dist/powersync/schema/note.d.ts +34 -0
- package/dist/powersync/schema/note.js +34 -0
- package/dist/powersync/schema/notesExtras.d.ts +62 -0
- package/dist/powersync/schema/notesExtras.js +71 -0
- package/dist/powersync/schema/projects.d.ts +101 -0
- package/dist/powersync/schema/projects.js +101 -0
- package/dist/powersync/schema/tags.d.ts +37 -0
- package/dist/powersync/schema/tags.js +37 -0
- package/dist/powersync/tokenIndex.d.ts +17 -0
- package/dist/powersync/tokenIndex.js +202 -0
- package/dist/powersync/uploader.d.ts +7 -0
- package/dist/powersync/uploader.js +134 -0
- package/dist/utils/argValue.d.ts +1 -0
- package/dist/utils/argValue.js +17 -0
- package/dist/utils/errors.d.ts +10 -0
- package/dist/utils/errors.js +17 -0
- package/dist/utils/id.d.ts +1 -0
- package/dist/utils/id.js +4 -0
- package/dist/utils/output.d.ts +2 -0
- package/dist/utils/output.js +10 -0
- package/dist/utils/redact.d.ts +1 -0
- package/dist/utils/redact.js +10 -0
- package/dist/utils/text.d.ts +1 -0
- package/dist/utils/text.js +35 -0
- package/dist/utils/time.d.ts +1 -0
- package/dist/utils/time.js +3 -0
- package/dist/utils/tiptapMarkdown.d.ts +6 -0
- package/dist/utils/tiptapMarkdown.js +149 -0
- package/dist/utils/tokenize.d.ts +1 -0
- package/dist/utils/tokenize.js +56 -0
- package/dist/utils/version.d.ts +1 -0
- package/dist/utils/version.js +21 -0
- package/package.json +63 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { AbstractPowerSyncDatabase } from '@powersync/common';
|
|
2
|
+
export type NoteRow = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string | null;
|
|
5
|
+
content_md: string | null;
|
|
6
|
+
content_json: string | null;
|
|
7
|
+
content_text: string | null;
|
|
8
|
+
summary: string | null;
|
|
9
|
+
zettel_boxes: string | null;
|
|
10
|
+
tags: string | null;
|
|
11
|
+
created_at: string | null;
|
|
12
|
+
updated_at: string | null;
|
|
13
|
+
is_del: number | null;
|
|
14
|
+
version: number | null;
|
|
15
|
+
};
|
|
16
|
+
type SearchNotesOptions = {
|
|
17
|
+
includeDeleted: boolean;
|
|
18
|
+
tagsExpression?: string;
|
|
19
|
+
createdAtFrom?: string;
|
|
20
|
+
createdAtTo?: string;
|
|
21
|
+
};
|
|
22
|
+
export type SearchedNote = {
|
|
23
|
+
id: string;
|
|
24
|
+
title: string;
|
|
25
|
+
summary: string;
|
|
26
|
+
updated_at: string | null;
|
|
27
|
+
is_del: number | null;
|
|
28
|
+
version: number | null;
|
|
29
|
+
zettel_boxes: string[];
|
|
30
|
+
};
|
|
31
|
+
type NoteDetailRow = {
|
|
32
|
+
id: string;
|
|
33
|
+
content: string | null;
|
|
34
|
+
audios: string | null;
|
|
35
|
+
images: string | null;
|
|
36
|
+
created_at: string | null;
|
|
37
|
+
updated_at: string | null;
|
|
38
|
+
title: string | null;
|
|
39
|
+
type: string | null;
|
|
40
|
+
source: string | null;
|
|
41
|
+
resource_id: string | null;
|
|
42
|
+
tags: string | null;
|
|
43
|
+
is_del: number | null;
|
|
44
|
+
content_md: string | null;
|
|
45
|
+
format_type: string | null;
|
|
46
|
+
zettel_boxes_raw: string | null;
|
|
47
|
+
};
|
|
48
|
+
export type NoteDetail = Omit<NoteDetailRow, 'zettel_boxes_raw'> & {
|
|
49
|
+
zettel_boxes: string[];
|
|
50
|
+
};
|
|
51
|
+
export declare function searchNotes(db: AbstractPowerSyncDatabase, query: string, options: SearchNotesOptions): Promise<SearchedNote[]>;
|
|
52
|
+
export declare function getNote(db: AbstractPowerSyncDatabase, id: string): Promise<NoteRow | null>;
|
|
53
|
+
export declare function getNoteDetail(db: AbstractPowerSyncDatabase, id: string): Promise<NoteDetail | null>;
|
|
54
|
+
export declare function createNote(db: AbstractPowerSyncDatabase, input: {
|
|
55
|
+
id: string;
|
|
56
|
+
title: string;
|
|
57
|
+
noteType: 'note' | 'crawl';
|
|
58
|
+
contentMd: string;
|
|
59
|
+
contentText: string;
|
|
60
|
+
contentJson: unknown;
|
|
61
|
+
tags: string[];
|
|
62
|
+
zettelBoxIds: string[];
|
|
63
|
+
userId: string;
|
|
64
|
+
}): Promise<{
|
|
65
|
+
id: string;
|
|
66
|
+
}>;
|
|
67
|
+
export declare function validateTagsForCreate(db: AbstractPowerSyncDatabase, requestedTags: string[]): Promise<string[]>;
|
|
68
|
+
export declare function resolveZettelBoxIdsForCreate(db: AbstractPowerSyncDatabase, requestedNames: string[]): Promise<string[]>;
|
|
69
|
+
export declare function softDeleteNote(db: AbstractPowerSyncDatabase, id: string): Promise<void>;
|
|
70
|
+
export {};
|