mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-25 04:32:31 +01:00
feat(importer): update standardnotes types
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
"@notesnook/enex": "^1.0.3",
|
||||
"@notesnook/onenote": "^1.0.2",
|
||||
"@notesnook/znel": "^1.0.0",
|
||||
"@standardnotes/common": "^1.8.0",
|
||||
"@standardnotes/features": "^1.25.0",
|
||||
"@standardnotes/common": "^1.19.8",
|
||||
"@standardnotes/features": "^1.42.1",
|
||||
"fflate": "^0.7.3",
|
||||
"highlight.js": "^11.4.0",
|
||||
"node-html-parser": "github:thecodrr/node-html-parser",
|
||||
|
||||
@@ -1,18 +1,30 @@
|
||||
import type { AppDataField, BackupFile } from "@standardnotes/snjs";
|
||||
import { ComponentArea, EditorFeatureDescription, NoteType } from "@standardnotes/features";
|
||||
import {
|
||||
AppDataField,
|
||||
BackupFile,
|
||||
BackupFileDecryptedContextualPayload,
|
||||
ItemContent,
|
||||
} from "@standardnotes/snjs";
|
||||
import {
|
||||
ComponentArea,
|
||||
EditorFeatureDescription,
|
||||
NoteType,
|
||||
} from "@standardnotes/features";
|
||||
import { ContentType } from "@standardnotes/common";
|
||||
import {RawPayload, NoteContent, TagContent, ComponentContent} from "@standardnotes/snjs";
|
||||
import { NoteContent, TagContent, ComponentContent } from "@standardnotes/snjs";
|
||||
|
||||
enum ProtocolVersion {
|
||||
V001 = "001",
|
||||
V002 = "002",
|
||||
V003 = "003",
|
||||
V004 = "004"
|
||||
V004 = "004",
|
||||
}
|
||||
const ComponentDataDomain = 'org.standardnotes.sn.components';
|
||||
const ComponentDataDomain = "org.standardnotes.sn.components";
|
||||
const DefaultAppDomain = "org.standardnotes.sn";
|
||||
|
||||
type SNBackupItem<TContentType extends ContentType, TContent> = RawPayload & {
|
||||
type SNBackupItem<
|
||||
TContentType extends ContentType,
|
||||
TContent extends ItemContent
|
||||
> = BackupFileDecryptedContextualPayload<TContent> & {
|
||||
content_type: TContentType;
|
||||
content: TContent & {
|
||||
appData: {
|
||||
@@ -25,9 +37,7 @@ type SNBackupItem<TContentType extends ContentType, TContent> = RawPayload & {
|
||||
export type SNNote = SNBackupItem<ContentType.Note, NoteContent>;
|
||||
export type SNComponent = SNBackupItem<ContentType.Component, ComponentContent>;
|
||||
export type SNTag = SNBackupItem<ContentType.Tag, TagContent>;
|
||||
export type SNBackup = {
|
||||
items: RawPayload[];
|
||||
} & BackupFile;
|
||||
export type SNBackup = BackupFile;
|
||||
export type EditorDescription = Pick<
|
||||
EditorFeatureDescription,
|
||||
"note_type" | "file_type"
|
||||
@@ -41,7 +51,10 @@ export type Spreadsheet = {
|
||||
};
|
||||
|
||||
export {
|
||||
DefaultAppDomain, ComponentDataDomain, ProtocolVersion,
|
||||
DefaultAppDomain,
|
||||
ComponentDataDomain,
|
||||
ProtocolVersion,
|
||||
ContentType,
|
||||
ComponentArea, NoteType
|
||||
ComponentArea,
|
||||
NoteType,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user