@crossworks/client-types 0.706.2 → 0.707.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/package.json +1 -1
- package/src/dto/file-status.ts +25 -1
package/package.json
CHANGED
package/src/dto/file-status.ts
CHANGED
|
@@ -18,7 +18,8 @@ import type { DataFileState, FileDatabaseReadBy } from './file-databases';
|
|
|
18
18
|
|
|
19
19
|
/** Was the file's content read into the brain:
|
|
20
20
|
* - `done`: read, in search (facts and mentions where the reader makes them);
|
|
21
|
-
* - `partial`: read in part (
|
|
21
|
+
* - `partial`: read in part (rows, sheets, characters, pictures or pages left
|
|
22
|
+
* out: `FileProcessing.extraction.cuts`, its `hint` the sentence);
|
|
22
23
|
* - `waiting`: not read yet (queued, retrying, or about to be queued);
|
|
23
24
|
* - `failed`: the read failed (`FileProcessing.error` says why);
|
|
24
25
|
* - `none`: not read on purpose: kept to its name, or nothing to read. */
|
|
@@ -62,8 +63,31 @@ export type FilePipelineRead = { id: string; name: string; version: string };
|
|
|
62
63
|
export type FileProcessingExtraction = {
|
|
63
64
|
state: 'indexed' | 'partial' | 'failed' | 'skipped' | 'pending' | 'name_only';
|
|
64
65
|
reason?: string;
|
|
66
|
+
/** One sentence for a person (a `partial` file: what was left out, each
|
|
67
|
+
* cut in turn). The client shows it as is. */
|
|
65
68
|
hint?: string;
|
|
66
69
|
pages?: { read: number; total: number };
|
|
70
|
+
/** Pictures left out: the pictures kept and found (`more`: at least). */
|
|
71
|
+
pictures?: { kept: number; found: number; more?: true };
|
|
72
|
+
/** Each kind of cut (docs/files.md, "Read in part"). A `partial` file
|
|
73
|
+
* has the cuts that made it so; an `indexed` file may carry details
|
|
74
|
+
* only (`pictures_small`, `pictures_tiny`: icons and small pictures the
|
|
75
|
+
* size gate skipped), which are no reason for a partial badge. Each cut:
|
|
76
|
+
* its key (`sheet_rows`, `text_store`, `pictures_small`, `ocr_pages`,
|
|
77
|
+
* `pictures`, `page_pictures`, ...), the unit, how many were read of how many (`atLeast`: the total
|
|
78
|
+
* is a lower bound), the limit, and its own sentence. */
|
|
79
|
+
cuts?: FileReadCut[];
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** One kind of cut of a file read in part (FileProcessingExtraction.cuts). */
|
|
83
|
+
export type FileReadCut = {
|
|
84
|
+
key: string;
|
|
85
|
+
what: string;
|
|
86
|
+
read: number;
|
|
87
|
+
total?: number;
|
|
88
|
+
atLeast?: true;
|
|
89
|
+
limit?: number;
|
|
90
|
+
hint: string;
|
|
67
91
|
};
|
|
68
92
|
|
|
69
93
|
/** One item made from the file (its `data.sourceFileId`): an extracted
|