Add types in local-cache.ts
This commit is contained in:
1 parent
37d8222479
commit
dd907a67b0
3 files changed
+79
-31
No files matched your search
@@ -22,6 +22,7 @@ import PathSet from "./common/path-set";
|
||||
import VersionedMap from "./versioned-map";
|
||||
import InstanceSet from "./instance-set";
|
||||
import { IncomingMessage, ServerResponse } from "http";
|
||||
import { Script } from "vm";
|
||||
|
||||
export type Expression = string | number | boolean | null | any[];
|
||||
|
||||
@@ -324,6 +325,34 @@ export interface Preset {
|
||||
provisions: string[][];
|
||||
}
|
||||
|
||||
export interface Provisions {
|
||||
[name: string]: { md5: string; script: Script };
|
||||
}
|
||||
|
||||
export interface VirtualParameters {
|
||||
[name: string]: { md5: string; script: Script };
|
||||
}
|
||||
|
||||
export interface Files {
|
||||
[name: string]: { length: number; md5: string; contentType: string };
|
||||
}
|
||||
|
||||
export interface Users {
|
||||
[name: string]: { password: string; salt: string; roles: string[] };
|
||||
}
|
||||
|
||||
export interface Permissions {
|
||||
[role: string]: {
|
||||
[access: number]: {
|
||||
[resource: string]: {
|
||||
access: number;
|
||||
filter: Expression;
|
||||
validate?: Expression;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export type PermissionSet = {
|
||||
[resource: string]: {
|
||||
access: number;
|
||||
@@ -332,6 +361,21 @@ export type PermissionSet = {
|
||||
};
|
||||
}[];
|
||||
|
||||
export interface Config {
|
||||
[name: string]: Expression;
|
||||
}
|
||||
|
||||
export interface UiConfig {
|
||||
filters: {};
|
||||
device: {};
|
||||
index: {};
|
||||
overview: {
|
||||
charts?: {};
|
||||
groups?: {};
|
||||
};
|
||||
pageSize?: Expression;
|
||||
}
|
||||
|
||||
export interface SoapMessage {
|
||||
id: string;
|
||||
cwmpVersion: string;
|
||||
|
||||
Reference in new issue
Block a user