mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
chore(client/ts): fix one dependency to server
This commit is contained in:
parent
d9a1bd78b0
commit
9071a97730
18
src/public/app/server_types.ts
Normal file
18
src/public/app/server_types.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// TODO: Deduplicate with src/services/entity_changes_interface.ts
|
||||||
|
export interface EntityChange {
|
||||||
|
id?: number | null;
|
||||||
|
noteId?: string;
|
||||||
|
entityName: string;
|
||||||
|
entityId: string;
|
||||||
|
entity?: any;
|
||||||
|
positions?: Record<string, number>;
|
||||||
|
hash: string;
|
||||||
|
utcDateChanged?: string;
|
||||||
|
utcDateModified?: string;
|
||||||
|
utcDateCreated?: string;
|
||||||
|
isSynced: boolean | 1 | 0;
|
||||||
|
isErased: boolean | 1 | 0;
|
||||||
|
componentId?: string | null;
|
||||||
|
changeId?: string | null;
|
||||||
|
instanceId?: string | null;
|
||||||
|
}
|
@ -7,7 +7,7 @@ import FBranch, { FBranchRow } from "../entities/fbranch.js";
|
|||||||
import FAttribute, { FAttributeRow } from "../entities/fattribute.js";
|
import FAttribute, { FAttributeRow } from "../entities/fattribute.js";
|
||||||
import FAttachment, { FAttachmentRow } from "../entities/fattachment.js";
|
import FAttachment, { FAttachmentRow } from "../entities/fattachment.js";
|
||||||
import FNote, { FNoteRow } from "../entities/fnote.js";
|
import FNote, { FNoteRow } from "../entities/fnote.js";
|
||||||
import { EntityChange } from "../../../services/entity_changes_interface.js";
|
import type { EntityChange } from "../server_types.js"
|
||||||
|
|
||||||
async function processEntityChanges(entityChanges: EntityChange[]) {
|
async function processEntityChanges(entityChanges: EntityChange[]) {
|
||||||
const loadResults = new LoadResults(entityChanges);
|
const loadResults = new LoadResults(entityChanges);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { EntityChange } from "../../../services/entity_changes_interface.js";
|
import { EntityChange } from "../server_types.js";
|
||||||
|
|
||||||
interface BranchRow {
|
interface BranchRow {
|
||||||
branchId: string;
|
branchId: string;
|
||||||
|
@ -4,8 +4,8 @@ import server from "./server.js";
|
|||||||
import options from "./options.js";
|
import options from "./options.js";
|
||||||
import frocaUpdater from "./froca_updater.js";
|
import frocaUpdater from "./froca_updater.js";
|
||||||
import appContext from "../components/app_context.js";
|
import appContext from "../components/app_context.js";
|
||||||
import { EntityChange } from '../../../services/entity_changes_interface.js';
|
|
||||||
import { t } from './i18n.js';
|
import { t } from './i18n.js';
|
||||||
|
import { EntityChange } from '../server_types.js';
|
||||||
|
|
||||||
type MessageHandler = (message: any) => void;
|
type MessageHandler = (message: any) => void;
|
||||||
const messageHandlers: MessageHandler[] = [];
|
const messageHandlers: MessageHandler[] = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user