๐ src/models/enums.ts
D-OPEN SOVEREIGN
Documentation & Insights
Local-only, non-EVM operations (analytics, local state).
EVM-bound mutations use `PatchOperation` from `@the_library/db_schemas`
(re-exported in `binary.ts`) โ do not add EVM operation variants here.Sidecar type byte in the DPM1 wire header (SPEC ยง4.1).1/*
2 * Copyright (c) 2026 DataPond D-Library Pty Ltd. ("The Sanctuary")
3 * Non-Profit Public Library โ The World Library
4 *
5 * D-SAFE Certification issued by POND Enterprise.
6 * Published under the D-Open Code Sovereign Licence v1.0 framework
7 * DataPond D-Library All exclusive Right reserved on modifiying the code - CC Attribution to data pond, Non modifiable, Non Commercial.
8 * https://registry.world.bibliotech.com/licence
9 * Source code donated to DataPond D-Library by it's author: data pond.
10 *
11 * Technical Guardian ("The Shield"): Pond Enterprise Pty Ltd. (ACN 694 747 987)
12 * All liability claims about D-SAFE certification issues coming from the published D-Safe direction must be addressed with Pond Enterprise Pty Ltd.
13 * Code Modification automatically voids the certified liability protection provided by Pond Enterprise.
14 */
15/**
16 * Local-only, non-EVM operations (analytics, local state).
17 * EVM-bound mutations use `PatchOperation` from `@the_library/db_schemas`
18 * (re-exported in `binary.ts`) โ do not add EVM operation variants here.
19 */
20export enum ActionTypes {
21 Visit = 0,
22 VisitPart = 1,
23 Download = 2,
24 Rate = 3,
25 RatePart = 4,
26 Share = 5,
27 SharePart = 6,
28}
29
30export enum WorkerCommands {
31 Init = 'init', // Initial load: fetch sidecars + local patches
32 SavePatches = 'savePatches',
33 GetRecord = 'getRecord', // LRU on-demand re-hydration (SPEC ยง2.5)
34 LoadLanguage = 'loadLanguage', // Dynamic language loading (SPEC ยง12.9)
35}
36
37export enum Rating {
38 None,
39 New,
40 Keep,
41 Trash,
42 Shared,
43}
44
45export enum WorkerEvent {
46 WorkerReady = 'workerready',
47 WorkerLoadingError = 'workerLoadingError',
48 DownloadStarted = 'downloadStarted',
49 DownloadFinished = 'downloadFinished',
50 DownloadError = 'downloadError',
51 LevelUpdated = 'levelUpdated',
52}
53
54export enum DownloadState {
55 Unknown,
56 Pending,
57 InProgress,
58 Done,
59 Error
60}
61
62/** Sidecar type byte in the DPM1 wire header (SPEC ยง4.1). */
63export enum SidecarType {
64 Slim = 0x00,
65 Extended = 0x01,
66 Provenance = 0x02,
67}
68