-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.ts
63 lines (56 loc) · 1.04 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import {
Authenticator,
Codec,
JetStreamClient,
JetStreamManager,
NatsConnection,
ObjectStore,
} from "nats";
import { RestBindParameters } from "sqlite3";
export type NatsInit = {
url: string;
app: string;
creds: string;
token: string;
};
export type NatsConf = {
servers: string;
authenticator?: Authenticator;
token?: string;
maxReconnectAttempts?: number;
};
export type NatsRes = {
nc: NatsConnection;
sc: Codec<string>;
js: JetStreamClient;
os: ObjectStore;
jsm: JetStreamManager;
};
export type ParseRes = {
error: string;
simple: boolean;
query: string;
params: RestBindParameters;
t: number;
data: JSON;
isRead: boolean;
bulkItems: string[];
bulkParams: bulkParams[];
};
type bulkParams = {
query: string;
params: RestBindParameters;
};
export type Res = {
error?: string;
results: Array<Record<string, unknown>>;
time: number;
};
export type Options = {
url: string;
creds: string;
token: string;
dataDir: string;
externalBackup: string;
externalBackupUrl: string;
};