@firmer/mesh 0.0.1
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/README.md +24 -0
- package/dist/asm/index.d.ts +11 -0
- package/dist/cause/codeable.d.ts +5 -0
- package/dist/cause/errors.d.ts +1 -0
- package/dist/cause/index.d.ts +3 -0
- package/dist/cause/status.d.ts +46 -0
- package/dist/codec/codec.d.ts +43 -0
- package/dist/codec/index.d.ts +2 -0
- package/dist/codec/json.d.ts +12 -0
- package/dist/grpc/consumer.d.ts +8 -0
- package/dist/grpc/index.d.ts +3 -0
- package/dist/grpc/interceptor.d.ts +2 -0
- package/dist/grpc/provider.d.ts +5 -0
- package/dist/http/consumer.d.ts +12 -0
- package/dist/http/index.d.ts +2 -0
- package/dist/http/provider.d.ts +5 -0
- package/dist/index.d.ts +116 -0
- package/dist/macro/ark.d.ts +84 -0
- package/dist/macro/binding.d.ts +1 -0
- package/dist/macro/dsa.d.ts +20 -0
- package/dist/macro/env.d.ts +43 -0
- package/dist/macro/idx.d.ts +12 -0
- package/dist/macro/index.d.ts +10 -0
- package/dist/macro/inspector.d.ts +144 -0
- package/dist/macro/loader.d.ts +15 -0
- package/dist/macro/mpi.d.ts +21 -0
- package/dist/macro/mps.d.ts +12 -0
- package/dist/macro/spi.d.ts +13 -0
- package/dist/mesh.d.ts +2 -0
- package/dist/mesh.js +11088 -0
- package/dist/mesh.umd.cjs +24 -0
- package/dist/mpc/compiler.d.ts +23 -0
- package/dist/mpc/consumer.d.ts +28 -0
- package/dist/mpc/consumer_filter.d.ts +6 -0
- package/dist/mpc/context.d.ts +33 -0
- package/dist/mpc/eden.d.ts +44 -0
- package/dist/mpc/execution.d.ts +74 -0
- package/dist/mpc/filter.d.ts +19 -0
- package/dist/mpc/hook.d.ts +23 -0
- package/dist/mpc/index.d.ts +16 -0
- package/dist/mpc/invoker.d.ts +57 -0
- package/dist/mpc/mesh.d.ts +42 -0
- package/dist/mpc/mesh_eden.d.ts +25 -0
- package/dist/mpc/mock.d.ts +7 -0
- package/dist/mpc/provider.d.ts +10 -0
- package/dist/mpc/proxy.d.ts +6 -0
- package/dist/mpc/reference.d.ts +21 -0
- package/dist/mpc/service.d.ts +7 -0
- package/dist/mpc/urn.d.ts +32 -0
- package/dist/psi/builtin.d.ts +49 -0
- package/dist/psi/cache.d.ts +44 -0
- package/dist/psi/cipher.d.ts +73 -0
- package/dist/psi/cluster.d.ts +11 -0
- package/dist/psi/commerce.d.ts +20 -0
- package/dist/psi/context.d.ts +148 -0
- package/dist/psi/cryptor.d.ts +23 -0
- package/dist/psi/datahouse.d.ts +24 -0
- package/dist/psi/dispatcher.d.ts +13 -0
- package/dist/psi/endpoint.d.ts +14 -0
- package/dist/psi/evaluator.d.ts +20 -0
- package/dist/psi/graph.d.ts +11 -0
- package/dist/psi/index.d.ts +29 -0
- package/dist/psi/kms.d.ts +20 -0
- package/dist/psi/kv.d.ts +24 -0
- package/dist/psi/licenser.d.ts +24 -0
- package/dist/psi/locker.d.ts +19 -0
- package/dist/psi/network.d.ts +49 -0
- package/dist/psi/pipeline.d.ts +28 -0
- package/dist/psi/publisher.d.ts +12 -0
- package/dist/psi/registry.d.ts +20 -0
- package/dist/psi/routable.d.ts +37 -0
- package/dist/psi/savepoint.d.ts +24 -0
- package/dist/psi/scheduler.d.ts +47 -0
- package/dist/psi/sequence.d.ts +20 -0
- package/dist/psi/subscriber.d.ts +11 -0
- package/dist/psi/tokenizer.d.ts +48 -0
- package/dist/psi/transport.d.ts +33 -0
- package/dist/psi/vfs.d.ts +32 -0
- package/dist/psi/workflow.d.ts +35 -0
- package/dist/schema/citizen.d.ts +25 -0
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/schema.d.ts +2 -0
- package/dist/system/index.d.ts +1 -0
- package/dist/system/mesh_network.d.ts +15 -0
- package/dist/test/network.test.d.ts +4 -0
- package/dist/tool/addrs.d.ts +11 -0
- package/dist/tool/index.d.ts +3 -0
- package/dist/tool/table.d.ts +7 -0
- package/dist/tool/tool.d.ts +31 -0
- package/dist/types/builtin.d.ts +121 -0
- package/dist/types/cipher.d.ts +111 -0
- package/dist/types/document.d.ts +34 -0
- package/dist/types/entity.d.ts +59 -0
- package/dist/types/enums.d.ts +2 -0
- package/dist/types/environ.d.ts +52 -0
- package/dist/types/event.d.ts +55 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/keys.d.ts +41 -0
- package/dist/types/license.d.ts +111 -0
- package/dist/types/oauth2.d.ts +138 -0
- package/dist/types/payload.d.ts +29 -0
- package/dist/types/principal.d.ts +35 -0
- package/dist/types/registration.d.ts +114 -0
- package/dist/types/route.d.ts +90 -0
- package/dist/types/savepoint.d.ts +34 -0
- package/dist/types/script.d.ts +26 -0
- package/dist/types/status.d.ts +13 -0
- package/dist/types/transport.d.ts +40 -0
- package/dist/types/version.d.ts +10 -0
- package/dist/types/workflow.d.ts +190 -0
- package/package.json +56 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Context } from './context';
|
|
2
|
+
import { AccessCode, AccessGrant, AccessID, AccessToken, Captcha, Credential } from '../types';
|
|
3
|
+
export declare abstract class Tokenizer {
|
|
4
|
+
/**
|
|
5
|
+
* Captcha apply a graphics captcha.
|
|
6
|
+
*/
|
|
7
|
+
captcha(kind: string, features: Record<string, string>, ctx?: Context): Promise<Captcha>;
|
|
8
|
+
/**
|
|
9
|
+
* Matches a graphics captcha value.
|
|
10
|
+
*/
|
|
11
|
+
matches(mno: string, value: string, ctx?: Context): Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Apply
|
|
14
|
+
*/
|
|
15
|
+
apply(kind: string, duration: number, ctx?: Context): Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Verify
|
|
18
|
+
*/
|
|
19
|
+
verify(token: string, ctx?: Context): Promise<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Quickauth OAuth2 quick authorize, contains grant code and code authorize.
|
|
22
|
+
*/
|
|
23
|
+
quickauth(credential: Credential, ctx?: Context): Promise<AccessToken>;
|
|
24
|
+
/**
|
|
25
|
+
* Grant OAuth2 code grant.
|
|
26
|
+
*/
|
|
27
|
+
grant(credential: Credential, ctx?: Context): Promise<AccessGrant>;
|
|
28
|
+
/**
|
|
29
|
+
* Accept OAuth2 accept grant code.
|
|
30
|
+
*/
|
|
31
|
+
accept(code: string, ctx?: Context): Promise<AccessCode>;
|
|
32
|
+
/**
|
|
33
|
+
* Reject OAuth2 reject grant code.
|
|
34
|
+
*/
|
|
35
|
+
reject(code: string, ctx?: Context): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Authorize OAuth2 code authorize.
|
|
38
|
+
*/
|
|
39
|
+
authorize(code: string, ctx?: Context): Promise<AccessToken>;
|
|
40
|
+
/**
|
|
41
|
+
* Authenticate OAuth2 authenticate.
|
|
42
|
+
*/
|
|
43
|
+
authenticate(token: string, ctx?: Context): Promise<AccessID>;
|
|
44
|
+
/**
|
|
45
|
+
* Refresh OAuth2 auth token refresh.
|
|
46
|
+
*/
|
|
47
|
+
refresh(token: string, ctx?: Context): Promise<AccessToken>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Context } from './context';
|
|
2
|
+
import { Packet } from '../types';
|
|
3
|
+
export declare abstract class Transporter {
|
|
4
|
+
/**
|
|
5
|
+
* Attach the tcp over transport with uri and partner mdc.
|
|
6
|
+
*/
|
|
7
|
+
attach(uri: string, pdc: string, ctx?: Context): Promise<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Detach the tcp over transport with descriptor.
|
|
10
|
+
*/
|
|
11
|
+
detach(descriptor: string, ctx?: Context): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Scan packets with ref and header in all buckets.
|
|
14
|
+
*
|
|
15
|
+
* Parameters:
|
|
16
|
+
* rid - reference node id for exclude in scan set.
|
|
17
|
+
* h - types.TCPHeader
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
scan(rid: string, h: number, limit: number, ctx?: Context): Promise<Packet[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Write packet to bucket.
|
|
23
|
+
*/
|
|
24
|
+
write(packet: Packet, ctx?: Context): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Read packets in bucket.
|
|
27
|
+
*/
|
|
28
|
+
read(bucket: string, limit: number, ctx?: Context): Promise<Packet[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Clean all packets in buckets.
|
|
31
|
+
*/
|
|
32
|
+
clean(buckets: string[], ctx?: Context): Promise<void>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Context } from './context';
|
|
2
|
+
import { FileEntry } from '../types';
|
|
3
|
+
export declare abstract class FileSystem {
|
|
4
|
+
/**
|
|
5
|
+
* Exist Check file path exist in system
|
|
6
|
+
*/
|
|
7
|
+
exist(path: string, ctx?: Context): Promise<boolean>;
|
|
8
|
+
/**
|
|
9
|
+
* Mkdir
|
|
10
|
+
*/
|
|
11
|
+
mkdir(path: string, ctx?: Context): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Write
|
|
14
|
+
*/
|
|
15
|
+
write(path: string, buff: Uint8Array, ctx?: Context): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Read from the path.
|
|
18
|
+
*/
|
|
19
|
+
read(path: string, ctx?: Context): Promise<Uint8Array>;
|
|
20
|
+
/**
|
|
21
|
+
* Remove directories.
|
|
22
|
+
*/
|
|
23
|
+
remove(path: string, ctx?: Context): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Delete files.
|
|
26
|
+
*/
|
|
27
|
+
delete(paths: string[], ctx?: Context): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* List all file trees.
|
|
30
|
+
*/
|
|
31
|
+
list(path: string, ctx?: Context): Promise<FileEntry>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Context } from './context';
|
|
2
|
+
import { Page, Paging, WorkChart, WorkGroup, WorkIntent, WorkVertex } from '../types';
|
|
3
|
+
export declare abstract class Workflow {
|
|
4
|
+
/**
|
|
5
|
+
* Mass workflow work in group.
|
|
6
|
+
* Return workflow code
|
|
7
|
+
*/
|
|
8
|
+
mass(group: WorkGroup, ctx?: Context): Promise<string>;
|
|
9
|
+
/**
|
|
10
|
+
* Groups page workflow review groups.
|
|
11
|
+
*/
|
|
12
|
+
groups(index: Paging, ctx?: Context): Promise<Page<WorkGroup>>;
|
|
13
|
+
/**
|
|
14
|
+
* Compile workflow in engine.
|
|
15
|
+
* Return workflow code
|
|
16
|
+
*/
|
|
17
|
+
compile(chart: WorkChart, ctx?: Context): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Index workflows.
|
|
20
|
+
*/
|
|
21
|
+
index(index: Paging, ctx?: Context): Promise<Page<WorkChart>>;
|
|
22
|
+
/**
|
|
23
|
+
* Submit workflow.
|
|
24
|
+
* Return workflow instance code
|
|
25
|
+
*/
|
|
26
|
+
submit(intent: WorkIntent, ctx?: Context): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Take action on workflow instance.
|
|
29
|
+
*/
|
|
30
|
+
take(vertex: WorkVertex, ctx?: Context): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Routines infer workflow instance as routine.
|
|
33
|
+
*/
|
|
34
|
+
routines(index: Paging, ctx?: Context): Promise<Page<WorkVertex>>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare class Citizen {
|
|
3
|
+
name: ReactNode | string;
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
path: string;
|
|
6
|
+
describe?: ReactNode | string;
|
|
7
|
+
disable?: boolean;
|
|
8
|
+
star?: boolean;
|
|
9
|
+
route?: ReactNode;
|
|
10
|
+
children?: Citizen[];
|
|
11
|
+
parent?: Citizen;
|
|
12
|
+
attrs?: Record<string, any>;
|
|
13
|
+
/**
|
|
14
|
+
* Absolute path.
|
|
15
|
+
*/
|
|
16
|
+
static abs(route: Citizen, root?: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Preproc parent-child relationship.
|
|
19
|
+
*/
|
|
20
|
+
static preproc(routes: Citizen[]): void;
|
|
21
|
+
/**
|
|
22
|
+
* Build route chain.
|
|
23
|
+
*/
|
|
24
|
+
static chain(route: Citizen): Citizen[];
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './mesh_network';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Context, Network } from '../psi';
|
|
2
|
+
import { Environ, Page, Paging, Route, Versions } from '../types';
|
|
3
|
+
export declare class MeshNetwork extends Network {
|
|
4
|
+
private readonly proxy;
|
|
5
|
+
constructor();
|
|
6
|
+
environ(ctx: Context): Promise<Environ>;
|
|
7
|
+
accessible(route: Route, ctx: Context): Promise<boolean>;
|
|
8
|
+
refresh(routes: Route[], ctx: Context): Promise<void>;
|
|
9
|
+
route(node_id: string, ctx: Context): Promise<Route>;
|
|
10
|
+
routes(ctx: Context): Promise<Route[]>;
|
|
11
|
+
disable(node_id: string, ctx: Context): Promise<void>;
|
|
12
|
+
enable(node_id: string, ctx: Context): Promise<void>;
|
|
13
|
+
index(index: Paging, ctx: Context): Promise<Page<Route>>;
|
|
14
|
+
version(node_id: string, ctx: Context): Promise<Versions>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class Addrs {
|
|
2
|
+
private readonly servers;
|
|
3
|
+
private readonly availableAddrs;
|
|
4
|
+
constructor(addrs: string);
|
|
5
|
+
any(): string;
|
|
6
|
+
}
|
|
7
|
+
export declare class StatefulServer {
|
|
8
|
+
private available;
|
|
9
|
+
private address;
|
|
10
|
+
constructor(available: boolean, address: string);
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Page, Paging } from '../types';
|
|
2
|
+
export declare class VTable<T> {
|
|
3
|
+
values: T[];
|
|
4
|
+
filter?: (v: T, factor: Record<string, any>) => boolean;
|
|
5
|
+
constructor(values: T[], filter?: (v: T, factor: Record<string, any>) => boolean);
|
|
6
|
+
index(index: Paging): Page<T>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Addrs } from './addrs';
|
|
2
|
+
import { Body, CacheBody, Cause } from '../types';
|
|
3
|
+
declare class Once<T> {
|
|
4
|
+
private value?;
|
|
5
|
+
private readonly fn;
|
|
6
|
+
constructor(fn: () => T);
|
|
7
|
+
get(): T;
|
|
8
|
+
}
|
|
9
|
+
export declare class Tool {
|
|
10
|
+
static substring(v: string, begin: number, length: number): string;
|
|
11
|
+
static repeat(ch: string, count: number): string;
|
|
12
|
+
static anyone(...varg: (string | undefined)[]): string;
|
|
13
|
+
static traceId(): string;
|
|
14
|
+
static spanId(spanId: string, calls: number): string;
|
|
15
|
+
static MESH_ADDRESS: Once<Addrs>;
|
|
16
|
+
static newEntity(value: any): Body;
|
|
17
|
+
static newCacheEntity(key: string, value: any, duration: number): CacheBody;
|
|
18
|
+
static readObject<T>(entity: Body): T | null;
|
|
19
|
+
/**
|
|
20
|
+
* Is the version less than the appointed version.
|
|
21
|
+
*
|
|
22
|
+
* @param x comparing version
|
|
23
|
+
* @param v compared version
|
|
24
|
+
* @return true less than
|
|
25
|
+
*/
|
|
26
|
+
static compareVersion(x: string, v: string): number;
|
|
27
|
+
static ofError(err: Error): Cause;
|
|
28
|
+
static ofCause(code: string, message: string, cause: Cause): Error;
|
|
29
|
+
static hexString(src: string): string;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Stacktrace } from '../macro';
|
|
2
|
+
export declare class Paging {
|
|
3
|
+
/**
|
|
4
|
+
* Session ID
|
|
5
|
+
*/
|
|
6
|
+
sid: string;
|
|
7
|
+
/**
|
|
8
|
+
* Start index
|
|
9
|
+
*/
|
|
10
|
+
index: number;
|
|
11
|
+
/**
|
|
12
|
+
* Start limit
|
|
13
|
+
*/
|
|
14
|
+
limit: number;
|
|
15
|
+
/**
|
|
16
|
+
* Paging factor
|
|
17
|
+
*/
|
|
18
|
+
factor: Record<string, any>;
|
|
19
|
+
/**
|
|
20
|
+
* Sort order
|
|
21
|
+
*/
|
|
22
|
+
order: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class Page<T> {
|
|
25
|
+
/**
|
|
26
|
+
* Session ID
|
|
27
|
+
*/
|
|
28
|
+
sid: string;
|
|
29
|
+
/**
|
|
30
|
+
* Start index
|
|
31
|
+
*/
|
|
32
|
+
index: number;
|
|
33
|
+
/**
|
|
34
|
+
* Start limit
|
|
35
|
+
*/
|
|
36
|
+
limit: number;
|
|
37
|
+
/**
|
|
38
|
+
* Start total
|
|
39
|
+
*/
|
|
40
|
+
total: number;
|
|
41
|
+
/**
|
|
42
|
+
* Has next
|
|
43
|
+
*/
|
|
44
|
+
next: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Index data
|
|
47
|
+
*/
|
|
48
|
+
data: T[];
|
|
49
|
+
}
|
|
50
|
+
export declare class DataLord {
|
|
51
|
+
/**
|
|
52
|
+
* 节点编码
|
|
53
|
+
*/
|
|
54
|
+
nodeId: string;
|
|
55
|
+
/**
|
|
56
|
+
* 节点名称
|
|
57
|
+
*/
|
|
58
|
+
nodeName: string;
|
|
59
|
+
/**
|
|
60
|
+
* 机构编码
|
|
61
|
+
*/
|
|
62
|
+
instId: string;
|
|
63
|
+
/**
|
|
64
|
+
* 机构名称
|
|
65
|
+
*/
|
|
66
|
+
instName: string;
|
|
67
|
+
}
|
|
68
|
+
export declare class Mani {
|
|
69
|
+
/**
|
|
70
|
+
* 状态
|
|
71
|
+
*/
|
|
72
|
+
status: number;
|
|
73
|
+
/**
|
|
74
|
+
* 创建时间
|
|
75
|
+
*/
|
|
76
|
+
createAt?: Date;
|
|
77
|
+
/**
|
|
78
|
+
* 更新时间
|
|
79
|
+
*/
|
|
80
|
+
updateAt?: Date;
|
|
81
|
+
/**
|
|
82
|
+
* 创建人
|
|
83
|
+
*/
|
|
84
|
+
createBy: string;
|
|
85
|
+
/**
|
|
86
|
+
* 更新人
|
|
87
|
+
*/
|
|
88
|
+
updateBy: string;
|
|
89
|
+
}
|
|
90
|
+
export declare class Cause implements Stacktrace {
|
|
91
|
+
/**
|
|
92
|
+
* Cause name
|
|
93
|
+
*/
|
|
94
|
+
name: string;
|
|
95
|
+
/**
|
|
96
|
+
* Cause position
|
|
97
|
+
*/
|
|
98
|
+
pos: string;
|
|
99
|
+
/**
|
|
100
|
+
* Cause descriptor
|
|
101
|
+
*/
|
|
102
|
+
text: string;
|
|
103
|
+
/**
|
|
104
|
+
* Cause stack
|
|
105
|
+
*/
|
|
106
|
+
buff: Uint8Array;
|
|
107
|
+
}
|
|
108
|
+
export declare class Topic {
|
|
109
|
+
/**
|
|
110
|
+
*/
|
|
111
|
+
topic: string;
|
|
112
|
+
/**
|
|
113
|
+
*/
|
|
114
|
+
code: string;
|
|
115
|
+
/**
|
|
116
|
+
*/
|
|
117
|
+
group: string;
|
|
118
|
+
/**
|
|
119
|
+
*/
|
|
120
|
+
sets: string;
|
|
121
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export declare class CRL {
|
|
2
|
+
/**
|
|
3
|
+
* Resource suite
|
|
4
|
+
*/
|
|
5
|
+
suite: string;
|
|
6
|
+
/**
|
|
7
|
+
* Resource project
|
|
8
|
+
*/
|
|
9
|
+
project: string;
|
|
10
|
+
/**
|
|
11
|
+
* Resource name
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Resource version
|
|
16
|
+
*/
|
|
17
|
+
version: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class CipherHello {
|
|
20
|
+
/**
|
|
21
|
+
*/
|
|
22
|
+
name: string;
|
|
23
|
+
/**
|
|
24
|
+
* ReAnonymize/ReCipher/Homomorphic
|
|
25
|
+
*/
|
|
26
|
+
proto: string;
|
|
27
|
+
/**
|
|
28
|
+
* SM2/RSA2/BFV etc.
|
|
29
|
+
*/
|
|
30
|
+
algo: string;
|
|
31
|
+
/**
|
|
32
|
+
*/
|
|
33
|
+
parties: string[];
|
|
34
|
+
/**
|
|
35
|
+
*/
|
|
36
|
+
message: string;
|
|
37
|
+
}
|
|
38
|
+
export declare class CipherSuite {
|
|
39
|
+
/**
|
|
40
|
+
* Handshake suite
|
|
41
|
+
*/
|
|
42
|
+
suite: string;
|
|
43
|
+
/**
|
|
44
|
+
* Cipher sign request
|
|
45
|
+
*/
|
|
46
|
+
csr: Uint8Array;
|
|
47
|
+
}
|
|
48
|
+
export declare class CipherKeygen {
|
|
49
|
+
/**
|
|
50
|
+
*/
|
|
51
|
+
hello: CipherHello;
|
|
52
|
+
/**
|
|
53
|
+
*/
|
|
54
|
+
suite: CipherSuite;
|
|
55
|
+
/**
|
|
56
|
+
* Local party
|
|
57
|
+
*/
|
|
58
|
+
local: string;
|
|
59
|
+
}
|
|
60
|
+
export declare class CipherRegen extends CipherKeygen {
|
|
61
|
+
/**
|
|
62
|
+
* Generate keys
|
|
63
|
+
*/
|
|
64
|
+
keys: Record<string, Uint8Array>;
|
|
65
|
+
}
|
|
66
|
+
export declare class CipherKey {
|
|
67
|
+
/**
|
|
68
|
+
* Generate keys
|
|
69
|
+
*/
|
|
70
|
+
keys: Record<string, Uint8Array>;
|
|
71
|
+
}
|
|
72
|
+
export declare class CipherEntity {
|
|
73
|
+
/**
|
|
74
|
+
*/
|
|
75
|
+
suite: string;
|
|
76
|
+
/**
|
|
77
|
+
*/
|
|
78
|
+
body: Uint8Array;
|
|
79
|
+
}
|
|
80
|
+
export declare class CipherTxEntity extends CipherEntity {
|
|
81
|
+
/**
|
|
82
|
+
*/
|
|
83
|
+
reKey: Uint8Array;
|
|
84
|
+
}
|
|
85
|
+
export declare class CipherObject {
|
|
86
|
+
/**
|
|
87
|
+
*/
|
|
88
|
+
code: string;
|
|
89
|
+
/**
|
|
90
|
+
*/
|
|
91
|
+
name: string;
|
|
92
|
+
/**
|
|
93
|
+
*/
|
|
94
|
+
memo: string;
|
|
95
|
+
/**
|
|
96
|
+
*/
|
|
97
|
+
uri: string;
|
|
98
|
+
/**
|
|
99
|
+
* Confidential level
|
|
100
|
+
*/
|
|
101
|
+
level: string;
|
|
102
|
+
/**
|
|
103
|
+
*/
|
|
104
|
+
nodeId: string;
|
|
105
|
+
/**
|
|
106
|
+
*/
|
|
107
|
+
instId: string;
|
|
108
|
+
/**
|
|
109
|
+
*/
|
|
110
|
+
raw: string;
|
|
111
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare class Document {
|
|
2
|
+
/**
|
|
3
|
+
*/
|
|
4
|
+
metadata: Record<string, string>;
|
|
5
|
+
/**
|
|
6
|
+
*/
|
|
7
|
+
content: string;
|
|
8
|
+
/**
|
|
9
|
+
*/
|
|
10
|
+
timestamp: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class DocumentMetadata {
|
|
13
|
+
/**
|
|
14
|
+
*/
|
|
15
|
+
queries: Record<string, string>;
|
|
16
|
+
/**
|
|
17
|
+
*/
|
|
18
|
+
start: number;
|
|
19
|
+
/**
|
|
20
|
+
*/
|
|
21
|
+
end: number;
|
|
22
|
+
/**
|
|
23
|
+
*/
|
|
24
|
+
limit: number;
|
|
25
|
+
/**
|
|
26
|
+
*/
|
|
27
|
+
step: string;
|
|
28
|
+
/**
|
|
29
|
+
*/
|
|
30
|
+
direction: string;
|
|
31
|
+
/**
|
|
32
|
+
*/
|
|
33
|
+
routeKey: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare class Body {
|
|
2
|
+
/**
|
|
3
|
+
*/
|
|
4
|
+
codec: string;
|
|
5
|
+
/**
|
|
6
|
+
*/
|
|
7
|
+
schema: string;
|
|
8
|
+
/**
|
|
9
|
+
*/
|
|
10
|
+
buffer: Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
export declare class CacheBody {
|
|
13
|
+
/**
|
|
14
|
+
* Cache version
|
|
15
|
+
*/
|
|
16
|
+
version: string;
|
|
17
|
+
/**
|
|
18
|
+
* Cache entity
|
|
19
|
+
*/
|
|
20
|
+
entity: Body;
|
|
21
|
+
/**
|
|
22
|
+
* Cache timestamp
|
|
23
|
+
*/
|
|
24
|
+
timestamp: number;
|
|
25
|
+
/**
|
|
26
|
+
* Cache expired duration
|
|
27
|
+
*/
|
|
28
|
+
duration: number;
|
|
29
|
+
/**
|
|
30
|
+
* Cache key
|
|
31
|
+
*/
|
|
32
|
+
key: string;
|
|
33
|
+
}
|
|
34
|
+
export declare class Entry {
|
|
35
|
+
/**
|
|
36
|
+
*/
|
|
37
|
+
key: string;
|
|
38
|
+
/**
|
|
39
|
+
*/
|
|
40
|
+
value: Body;
|
|
41
|
+
/**
|
|
42
|
+
*/
|
|
43
|
+
updateAt?: Date;
|
|
44
|
+
}
|
|
45
|
+
export declare class FileEntry {
|
|
46
|
+
/**
|
|
47
|
+
*/
|
|
48
|
+
mno: string;
|
|
49
|
+
/**
|
|
50
|
+
* 0 文件/1 目录
|
|
51
|
+
*/
|
|
52
|
+
kind: string;
|
|
53
|
+
/**
|
|
54
|
+
*/
|
|
55
|
+
mime: Uint8Array;
|
|
56
|
+
/**
|
|
57
|
+
*/
|
|
58
|
+
text: string;
|
|
59
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export declare class Lattice {
|
|
2
|
+
/**
|
|
3
|
+
* Zone
|
|
4
|
+
*/
|
|
5
|
+
zone: string;
|
|
6
|
+
/**
|
|
7
|
+
* Cluster
|
|
8
|
+
*/
|
|
9
|
+
cluster: string;
|
|
10
|
+
/**
|
|
11
|
+
* Cell
|
|
12
|
+
*/
|
|
13
|
+
cell: string;
|
|
14
|
+
/**
|
|
15
|
+
* Group
|
|
16
|
+
*/
|
|
17
|
+
group: string;
|
|
18
|
+
/**
|
|
19
|
+
* Address
|
|
20
|
+
*/
|
|
21
|
+
address: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class Environ {
|
|
24
|
+
/**
|
|
25
|
+
* 数据中心编号
|
|
26
|
+
*/
|
|
27
|
+
mdc: string;
|
|
28
|
+
/**
|
|
29
|
+
* 版本
|
|
30
|
+
*/
|
|
31
|
+
version: string;
|
|
32
|
+
/**
|
|
33
|
+
* 名称
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* 数据中心根证书
|
|
38
|
+
*/
|
|
39
|
+
crt: string;
|
|
40
|
+
/**
|
|
41
|
+
* 数据中心根证书私钥.
|
|
42
|
+
*/
|
|
43
|
+
key: string;
|
|
44
|
+
/**
|
|
45
|
+
* 根证书,信任根
|
|
46
|
+
*/
|
|
47
|
+
rootCrt: string;
|
|
48
|
+
/**
|
|
49
|
+
* Lattice
|
|
50
|
+
*/
|
|
51
|
+
lattice: Lattice;
|
|
52
|
+
}
|