2021-11-11 23:37:42 +01:00
|
|
|
export type Address = string;
|
2022-01-28 20:51:34 +01:00
|
|
|
export type VALUE_TYPE = "Address" | "String" | "Number" | "Invalid";
|
2021-11-11 23:37:42 +01:00
|
|
|
|
|
|
|
export interface IEntry {
|
|
|
|
entity: Address;
|
|
|
|
attribute: string;
|
2022-01-09 21:24:49 +01:00
|
|
|
value: IValue;
|
|
|
|
}
|
|
|
|
|
2022-01-28 20:51:34 +01:00
|
|
|
export type IValue =
|
|
|
|
| {
|
|
|
|
t: "Address";
|
|
|
|
c: string;
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
t: "String";
|
|
|
|
c: string;
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
t: "Number";
|
|
|
|
c: number;
|
|
|
|
}
|
2022-02-20 18:04:16 +01:00
|
|
|
| {
|
|
|
|
t: "Null";
|
|
|
|
c: null;
|
|
|
|
}
|
2022-01-28 20:51:34 +01:00
|
|
|
| {
|
|
|
|
t: "Invalid";
|
|
|
|
c: null;
|
|
|
|
};
|
2021-11-11 23:37:42 +01:00
|
|
|
|
2022-02-20 13:06:01 +01:00
|
|
|
export interface InvariantEntry {
|
|
|
|
attribute: string;
|
|
|
|
value: IValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type InAddress =
|
|
|
|
| Address
|
|
|
|
| { t: "Attribute" | "Url" | "Uuid"; c?: string };
|
|
|
|
|
|
|
|
export type InEntry =
|
|
|
|
| IEntry
|
|
|
|
| IEntry[]
|
|
|
|
| InvariantEntry
|
|
|
|
| { entity: InAddress };
|
|
|
|
|
2021-11-11 23:37:42 +01:00
|
|
|
export interface ListingResult {
|
|
|
|
[key: string]: IEntry;
|
|
|
|
}
|
|
|
|
|
2022-02-09 20:34:52 +01:00
|
|
|
// entry address, entity address address
|
|
|
|
export type PutResult = [string | undefined, string];
|
|
|
|
|
2021-12-19 13:54:16 +01:00
|
|
|
// export type OrderedListing = [Address, IEntry][];
|
2021-11-11 23:37:42 +01:00
|
|
|
|
2022-03-02 22:39:05 +01:00
|
|
|
export type AttributeListingResult = Array<{
|
|
|
|
name: string;
|
|
|
|
labels: string[];
|
|
|
|
}>;
|
|
|
|
|
2021-11-11 23:37:42 +01:00
|
|
|
export interface IFile {
|
|
|
|
hash: string;
|
|
|
|
path: string;
|
|
|
|
valid: boolean;
|
|
|
|
added: string;
|
|
|
|
size: number;
|
|
|
|
mtime: string;
|
|
|
|
}
|
|
|
|
|
2021-12-21 16:10:16 +01:00
|
|
|
export interface IJob {
|
|
|
|
title: string;
|
2022-03-01 22:50:15 +01:00
|
|
|
job_type: string;
|
2021-12-21 16:10:16 +01:00
|
|
|
progress: number;
|
|
|
|
state: "InProgress" | "Done" | "Failed";
|
|
|
|
}
|
|
|
|
|
2021-11-11 23:37:42 +01:00
|
|
|
export interface VaultInfo {
|
|
|
|
name: string | null;
|
|
|
|
location: string;
|
2022-02-02 22:36:45 +01:00
|
|
|
version: string;
|
2022-02-04 12:09:43 +01:00
|
|
|
desktop: boolean;
|
2022-01-09 21:24:49 +01:00
|
|
|
}
|
2022-02-21 21:27:46 +01:00
|
|
|
|
|
|
|
export interface StoreInfo {
|
|
|
|
totals: { count: number; size: number };
|
|
|
|
blobs: {
|
|
|
|
hash: string;
|
|
|
|
size: number;
|
|
|
|
paths: { added: number; valid: boolean; path: string }[];
|
|
|
|
}[];
|
|
|
|
}
|