@e-mc/types 0.13.5 → 0.13.7
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 +5 -5
- package/constant.d.ts +1 -1
- package/index.js +12 -13
- package/lib/core.d.ts +10 -6
- package/lib/http.d.ts +2 -1
- package/lib/index.d.ts +4 -1
- package/lib/request.d.ts +50 -0
- package/lib/settings.d.ts +13 -19
- package/lib/squared.d.ts +7 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
* [View Source](https://www.unpkg.com/@e-mc/types@0.13.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.13.7/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { LogArguments } from "./lib/logger";
|
|
@@ -208,10 +208,10 @@ const IMPORT_MAP: Record<string, string | undefined>;
|
|
|
208
208
|
|
|
209
209
|
## References
|
|
210
210
|
|
|
211
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
212
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
213
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
214
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
211
|
+
- https://www.unpkg.com/@e-mc/types@0.13.7/index.d.ts
|
|
212
|
+
- https://www.unpkg.com/@e-mc/types@0.13.7/lib/logger.d.ts
|
|
213
|
+
- https://www.unpkg.com/@e-mc/types@0.13.7/lib/module.d.ts
|
|
214
|
+
- https://www.unpkg.com/@e-mc/types@0.13.7/lib/node.d.ts
|
|
215
215
|
|
|
216
216
|
* https://developer.mozilla.org/en-US/docs/Web/API/DOMException
|
|
217
217
|
* https://www.npmjs.com/package/@types/bytes
|
package/constant.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -176,8 +176,7 @@ function fromObject(value, typedArray, structured, shared) {
|
|
|
176
176
|
function trimQuote(value) {
|
|
177
177
|
value = value.trim();
|
|
178
178
|
const first = value[0];
|
|
179
|
-
|
|
180
|
-
return first === last && (first === '"' || first === "'" || first === "`") ? value.substring(1, value.length - 1) : value;
|
|
179
|
+
return first === value.at(-1) && (first === '"' || first === "'" || first === "`") ? value.substring(1, value.length - 1) : value;
|
|
181
180
|
}
|
|
182
181
|
function checkCipherType(value) {
|
|
183
182
|
switch (value) {
|
|
@@ -1052,18 +1051,18 @@ function asFunction(value, sync = true) {
|
|
|
1052
1051
|
}
|
|
1053
1052
|
function getEncoding(value, fallback) {
|
|
1054
1053
|
if (typeof value === 'string') {
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1054
|
+
const result = value.trim().toLowerCase();
|
|
1055
|
+
if (result.slice(0, 3) === 'utf') {
|
|
1056
|
+
switch (result.slice(result[3] === '-' ? 4 : 3)) {
|
|
1057
|
+
case '8':
|
|
1058
|
+
return 'utf8';
|
|
1059
|
+
case '16le':
|
|
1060
|
+
case '16':
|
|
1061
|
+
return 'utf16le';
|
|
1062
|
+
}
|
|
1064
1063
|
}
|
|
1065
|
-
if (Buffer.isEncoding(
|
|
1066
|
-
return
|
|
1064
|
+
else if (Buffer.isEncoding(result)) {
|
|
1065
|
+
return result;
|
|
1067
1066
|
}
|
|
1068
1067
|
}
|
|
1069
1068
|
return fallback || 'utf8';
|
package/lib/core.d.ts
CHANGED
|
@@ -40,11 +40,11 @@ export interface IClientDb<T extends IHost, U extends ClientModule<ClientDbSetti
|
|
|
40
40
|
hasCache(source: string, sessionKey?: string): boolean;
|
|
41
41
|
hasCoerce(source: string, component: keyof DbCoerceSettings, uuidKey: string | undefined): boolean;
|
|
42
42
|
hasCoerce(source: string, component: keyof DbCoerceSettings, credential?: unknown): boolean;
|
|
43
|
+
getQueryResult(source: string, credential: unknown, queryString: string, options: CacheOptions): QueryResult | undefined;
|
|
43
44
|
getQueryResult(source: string, credential: unknown, queryString: string, renewCache: boolean): QueryResult | undefined;
|
|
44
|
-
getQueryResult(source: string, credential: unknown, queryString: string, sessionKey?: string, renewCache?: boolean): QueryResult | undefined;
|
|
45
|
-
|
|
46
|
-
setQueryResult(source: string, credential: unknown, queryString: string, result: unknown, sessionKey?: string): QueryResult;
|
|
47
|
-
setQueryResult(source: string, credential: unknown, queryString: string, result: unknown, options?: CacheOptions | string): QueryResult;
|
|
45
|
+
getQueryResult(source: string, credential: unknown, queryString: string, sessionKey?: string | CacheOptions, renewCache?: boolean): QueryResult | undefined;
|
|
46
|
+
setQueryResult(source: string, credential: unknown, queryString: string, result: unknown, options: CacheOptions): QueryResult;
|
|
47
|
+
setQueryResult(source: string, credential: unknown, queryString: string, result: unknown, sessionKey?: string | CacheOptions): QueryResult;
|
|
48
48
|
getCacheResult(source: string, credential: unknown, queryString: string, cacheValue: CacheOptions, ignoreCache?: IntBool | FirstOf<number, number>): QueryResult | undefined;
|
|
49
49
|
applyState(items: V | V[], value: number, as?: boolean): void;
|
|
50
50
|
commit(items?: V[]): Promise<boolean>;
|
|
@@ -68,12 +68,16 @@ export interface ClientDbConstructor<T extends IHost = IHost, U extends ClientMo
|
|
|
68
68
|
loadSettings(settings: Pick<Settings, "process" | "memory">, password?: string): boolean;
|
|
69
69
|
getTimeout(value: number | string | TimeoutAction | undefined): number;
|
|
70
70
|
convertTime(value: number | string): number;
|
|
71
|
+
findResult(source: string, credential: unknown, queryString: string, timeout: number, renewCache: boolean): QueryResult | undefined;
|
|
71
72
|
findResult(source: string, credential: unknown, queryString: string, timeout: number, sessionKey?: string | boolean, renewCache?: boolean): QueryResult | undefined;
|
|
72
73
|
storeResult(source: string, credential: unknown, queryString: string, result: QueryResult, options: StoreResultOptions): QueryResult;
|
|
74
|
+
/** @deprecated */
|
|
73
75
|
storeResult(source: string, credential: unknown, queryString: string, result: QueryResult, sessionKey: string, sessionExpires: number): QueryResult;
|
|
74
76
|
storeResult(source: string, credential: unknown, queryString: string, result: QueryResult, cache: DbCacheValue): QueryResult;
|
|
75
|
-
storeResult(source: string, credential: unknown, queryString: string, result: QueryResult, cache: DbCacheValue | undefined, options: StoreResultOptions): QueryResult;
|
|
76
|
-
|
|
77
|
+
storeResult(source: string, credential: unknown, queryString: string, result: QueryResult, cache: DbCacheValue | undefined, options: Omit<StoreResultOptions, "cache">): QueryResult;
|
|
78
|
+
findSession<W = unknown>(source: string, user: string, key: string): W | undefined;
|
|
79
|
+
storeSession(source: string, user: string, key: string, result: unknown, expires?: number): void;
|
|
80
|
+
purgeResult(prefix?: string, lru?: boolean | number): Promise<number>;
|
|
77
81
|
extractUUID(credential: unknown): string;
|
|
78
82
|
setPoolConfig(value: unknown): void;
|
|
79
83
|
getPoolConfig(source: string): unknown;
|
package/lib/http.d.ts
CHANGED
|
@@ -112,7 +112,8 @@ export interface AuthValue {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
export type HttpRequestClient = ClientRequest | ClientHttp2Stream;
|
|
115
|
-
export type
|
|
115
|
+
export type HttpHeaders = OutgoingHttpHeaders | Headers;
|
|
116
|
+
export type HttpOutgoingHeaders = ObjectMap<HttpHeaders>;
|
|
116
117
|
export type HttpAgentOptions = Pick<AgentOptions, "timeout" | "maxSockets" | "maxTotalSockets" | "keepAliveMsecs" | "maxFreeSockets" | "proxyEnv">;
|
|
117
118
|
export type HttpProtocolVersion = 1 | 2 | 3;
|
|
118
119
|
export type InternetProtocolVersion = 0 | 4 | 6;
|
package/lib/index.d.ts
CHANGED
|
@@ -625,6 +625,7 @@ declare namespace functions {
|
|
|
625
625
|
defineHttpCache(options: HttpMemorySettings, disk?: boolean): void;
|
|
626
626
|
defineHttpConnect(options: HttpConnectSettings): void;
|
|
627
627
|
defineHttpAdapter(module: unknown): void;
|
|
628
|
+
generateSessionId(): string;
|
|
628
629
|
readonly prototype: IFileManager<T>;
|
|
629
630
|
new(baseDirectory: string, config: RequestData<T>, postFinalize?: PostFinalizeCallback): IFileManager<T>;
|
|
630
631
|
new(baseDirectory: string, config: RequestData<T>, permission?: IPermission | null, postFinalize?: PostFinalizeCallback): IFileManager<T>;
|
|
@@ -679,6 +680,7 @@ declare namespace functions {
|
|
|
679
680
|
getThreadCount(full: true): ThreadCountStat;
|
|
680
681
|
getThreadCount(username: string, iv?: BinaryLike): ThreadCountStat;
|
|
681
682
|
getThreadCount(username?: string | boolean, iv?: BinaryLike): number;
|
|
683
|
+
parseIp(value: unknown, kind?: "ipv4" | "ipv6"): string;
|
|
682
684
|
getLogDelayed(): FormatMessageArgs[];
|
|
683
685
|
getPermissionFromSettings(freeze?: boolean): IPermission;
|
|
684
686
|
readonly prototype: IHost;
|
|
@@ -689,7 +691,7 @@ declare namespace functions {
|
|
|
689
691
|
readonly status: LogStatus<StatusType>[];
|
|
690
692
|
readonly errors: unknown[];
|
|
691
693
|
supported(major: number, minor?: number, patch?: number, lts?: boolean): boolean;
|
|
692
|
-
supports(name: string, value?: boolean): boolean;
|
|
694
|
+
supports(name: string, value?: boolean, locked?: boolean): boolean;
|
|
693
695
|
getTempDir(options: TempDirOptions): string;
|
|
694
696
|
getTempDir(uuidDir: boolean, createDir: boolean): string;
|
|
695
697
|
getTempDir(pathname: string, createDir: boolean): string;
|
|
@@ -900,6 +902,7 @@ declare namespace functions {
|
|
|
900
902
|
sanitizeArgs(values: string[], doubleQuote?: boolean): string[];
|
|
901
903
|
purgeMemory(percent: number, limit: number, parent?: boolean): Promise<number>;
|
|
902
904
|
purgeMemory(percent?: number, limit?: number | boolean, parent?: unknown): Promise<number>;
|
|
905
|
+
availableParallelism(factor?: number): number;
|
|
903
906
|
canWrite(name: "temp" | "home"): boolean;
|
|
904
907
|
loadSettings(settings: Settings, password?: string): boolean;
|
|
905
908
|
readonly prototype: IModule<T>;
|
package/lib/request.d.ts
CHANGED
|
@@ -38,13 +38,20 @@ export interface IHttpHost {
|
|
|
38
38
|
success(version: HttpProtocolVersion, status?: boolean): number;
|
|
39
39
|
failed(version: HttpProtocolVersion, status?: boolean): number;
|
|
40
40
|
error(version: HttpProtocolVersion, status?: boolean): number;
|
|
41
|
+
/** @deprecated altSvc.did */
|
|
41
42
|
didAltSvc(version: HttpProtocolVersion): boolean;
|
|
43
|
+
/** @deprecated altSvc.next */
|
|
42
44
|
nextAltSvc(): boolean;
|
|
45
|
+
/** @deprecated altSvc.close */
|
|
43
46
|
closeAltSvc(error?: boolean): boolean;
|
|
47
|
+
/** @deprecated altSvc.clear */
|
|
44
48
|
clearAltSvc(version?: HttpProtocolVersion): void;
|
|
49
|
+
/** @deprecated altSvc.flag */
|
|
45
50
|
flagAltSvc(version: HttpProtocolVersion, value: number): void;
|
|
46
51
|
reset(): void;
|
|
52
|
+
v1(): boolean;
|
|
47
53
|
v2(): boolean;
|
|
54
|
+
get altSvc(): IHttpHostAltSvc;
|
|
48
55
|
set version(value);
|
|
49
56
|
get version(): HttpProtocolVersion;
|
|
50
57
|
get protocol(): string;
|
|
@@ -66,6 +73,25 @@ export interface HttpHostConstructor {
|
|
|
66
73
|
new(url: URL, httpVersion?: HttpProtocolVersion): IHttpHost;
|
|
67
74
|
}
|
|
68
75
|
|
|
76
|
+
export interface IHttpHostAltSvc {
|
|
77
|
+
did(version: HttpProtocolVersion): boolean;
|
|
78
|
+
next(): boolean;
|
|
79
|
+
close(error?: boolean): boolean;
|
|
80
|
+
clear(version?: HttpProtocolVersion): void;
|
|
81
|
+
flag(version: HttpProtocolVersion, value: number): void;
|
|
82
|
+
valid(hostname: string, port: string, version: number): boolean;
|
|
83
|
+
set available(value: unknown[]);
|
|
84
|
+
get errors(): AltSvcInfo[];
|
|
85
|
+
get hostname(): string | undefined;
|
|
86
|
+
get port(): string | undefined;
|
|
87
|
+
get origin(): string | undefined;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface HttpHostAltSvcConstructor {
|
|
91
|
+
readonly prototype: IHttpHostAltSvc;
|
|
92
|
+
new(host: IHttpHost, versionData: AltSvcData): IHttpHostAltSvc;
|
|
93
|
+
}
|
|
94
|
+
|
|
69
95
|
export interface IHttpAdapter<T extends OpenOptions = OpenOptions> {
|
|
70
96
|
instance: IRequest;
|
|
71
97
|
state: ControllerState;
|
|
@@ -218,6 +244,30 @@ export interface ControllerState {
|
|
|
218
244
|
readonly config: Required<ClientConfig>;
|
|
219
245
|
}
|
|
220
246
|
|
|
247
|
+
export interface AltSvcInfo {
|
|
248
|
+
hostname: string;
|
|
249
|
+
port: string;
|
|
250
|
+
version: number;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface AltSvcLocation extends Partial<AltSvcInfo> {
|
|
254
|
+
origin?: string;
|
|
255
|
+
timeout?: NodeJS.Timeout | null;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface AltSvcAvailability extends AltSvcInfo {
|
|
259
|
+
expires: number;
|
|
260
|
+
persist: boolean;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface AltSvcData {
|
|
264
|
+
success: number;
|
|
265
|
+
failed: number;
|
|
266
|
+
errors: number;
|
|
267
|
+
alpn: number;
|
|
268
|
+
status: number;
|
|
269
|
+
}
|
|
270
|
+
|
|
221
271
|
export type HttpMethod = "GET" | "POST" | "PUT" | "HEAD" | "DELETE";
|
|
222
272
|
export type BufferFormat = "json" | "yaml" | "json5" | "xml" | "toml";
|
|
223
273
|
export type ReadExpectType = "always" | "string" | "none";
|
package/lib/settings.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WatchInterval } from './squared';
|
|
1
|
+
import type { ExpiresAction, WatchInterval } from './squared';
|
|
2
2
|
|
|
3
3
|
import type { HashAlgorithm } from './asset';
|
|
4
4
|
import type { CloudSource } from './cloud';
|
|
@@ -74,20 +74,18 @@ export interface ProcessModule<T = PlainObject> extends HandlerSettings<T> {
|
|
|
74
74
|
};
|
|
75
75
|
queue?: {
|
|
76
76
|
limit?: number | string;
|
|
77
|
-
expires?: number | string;
|
|
78
77
|
priority: { bypass?: number | string } & MinMax<number | string>;
|
|
79
|
-
};
|
|
78
|
+
} & ExpiresAction;
|
|
80
79
|
worker?: {
|
|
81
80
|
users?: boolean | string[];
|
|
82
81
|
max?: number | string;
|
|
83
82
|
max_expires?: number | string;
|
|
84
83
|
locked?: boolean;
|
|
85
|
-
channel?: MinMax<number | string> &
|
|
84
|
+
channel?: MinMax<number | string> & ExpiresAction & { verbose?: boolean };
|
|
86
85
|
};
|
|
87
86
|
limit?: number | string;
|
|
88
87
|
sub_limit?: number | string;
|
|
89
|
-
|
|
90
|
-
};
|
|
88
|
+
} & ExpiresAction;
|
|
91
89
|
cipher?: CipherConfig;
|
|
92
90
|
password?: string;
|
|
93
91
|
}
|
|
@@ -114,8 +112,7 @@ export interface PermissionSettings extends PlainObject {
|
|
|
114
112
|
minimatch?: MinimatchOptions | null;
|
|
115
113
|
}
|
|
116
114
|
|
|
117
|
-
export interface DownloadModule<T = PlainObject> extends HandlerSettings<T
|
|
118
|
-
expires?: number | string;
|
|
115
|
+
export interface DownloadModule<T = PlainObject> extends HandlerSettings<T>, ExpiresAction {
|
|
119
116
|
aria2?: DownloadAction & {
|
|
120
117
|
check_integrity?: boolean;
|
|
121
118
|
update_status?: number | string | { interval?: number | string; broadcast_only?: boolean };
|
|
@@ -233,7 +230,7 @@ export interface DocumentDirectory extends StringMap {
|
|
|
233
230
|
export type DocumentComponentOptions = DocumentComponent<DocumentComponentOption<DocumentTransform>, DocumentComponentOption<boolean>>;
|
|
234
231
|
|
|
235
232
|
export interface ClientDbSettings<T = PlainObject> extends ClientSettings<T>, PurgeAction {
|
|
236
|
-
session_expires?: number;
|
|
233
|
+
session_expires?: number | string;
|
|
237
234
|
user_key?: ObjectMap<DbSourceOptions>;
|
|
238
235
|
imports?: StringMap;
|
|
239
236
|
}
|
|
@@ -246,13 +243,13 @@ export interface MemorySettings extends PlainObject {
|
|
|
246
243
|
file_count?: boolean;
|
|
247
244
|
};
|
|
248
245
|
cache_disk?: MemoryCacheDiskSettings;
|
|
246
|
+
gc?: { interval?: number | string; expires_limit?: number | string } & ExpiresAction;
|
|
249
247
|
}
|
|
250
248
|
|
|
251
|
-
export interface MemoryCacheDiskSettings<T = number | string, U = string[] | null> extends IncludeAction<U> {
|
|
249
|
+
export interface MemoryCacheDiskSettings<T = number | string, U = string[] | null> extends IncludeAction<U>, ExpiresAction<T> {
|
|
252
250
|
enabled?: boolean;
|
|
253
251
|
min_size?: T;
|
|
254
252
|
max_size?: T;
|
|
255
|
-
expires?: T;
|
|
256
253
|
}
|
|
257
254
|
|
|
258
255
|
export interface DbModule<T = DbSettings> extends ClientModule<T>, DbSourceDataType<ObjectMap<AnyObject>>, PlainObject {
|
|
@@ -282,6 +279,7 @@ export interface DbCoerceSettings<T = boolean> {
|
|
|
282
279
|
|
|
283
280
|
export interface PurgeBase<T = number | string> extends MinMax {
|
|
284
281
|
enabled?: boolean;
|
|
282
|
+
type?: "lru" | "lfu";
|
|
285
283
|
percent?: T;
|
|
286
284
|
limit?: T;
|
|
287
285
|
}
|
|
@@ -504,10 +502,9 @@ export interface HttpSettings {
|
|
|
504
502
|
certs?: ObjectMap<SecureConfig<string | string[]>>;
|
|
505
503
|
}
|
|
506
504
|
|
|
507
|
-
export interface HttpDiskSettings extends IncludeAction {
|
|
505
|
+
export interface HttpDiskSettings extends IncludeAction, ExpiresAction {
|
|
508
506
|
enabled?: boolean;
|
|
509
507
|
limit?: number | string;
|
|
510
|
-
expires?: number | string;
|
|
511
508
|
}
|
|
512
509
|
|
|
513
510
|
export interface HttpMemorySettings extends HttpDiskSettings {
|
|
@@ -524,17 +521,15 @@ export interface HttpConnectSettings {
|
|
|
524
521
|
redirect_limit?: number | string;
|
|
525
522
|
}
|
|
526
523
|
|
|
527
|
-
export interface DnsLookupSettings {
|
|
524
|
+
export interface DnsLookupSettings extends ExpiresAction {
|
|
528
525
|
family?: number | string;
|
|
529
|
-
expires?: number | string;
|
|
530
526
|
resolve?: ObjectMap<Partial<LookupAddress>>;
|
|
531
527
|
}
|
|
532
528
|
|
|
533
|
-
export interface HashConfig extends IncludeAction<ObjectMap<string[] | "*"
|
|
529
|
+
export interface HashConfig extends IncludeAction<ObjectMap<string[] | "*">>, ExpiresAction {
|
|
534
530
|
enabled?: boolean;
|
|
535
531
|
algorithm?: HashAlgorithm;
|
|
536
532
|
etag?: boolean;
|
|
537
|
-
expires?: number | string;
|
|
538
533
|
renew?: boolean;
|
|
539
534
|
limit?: number | string;
|
|
540
535
|
}
|
|
@@ -552,10 +547,9 @@ export interface PurgeAction {
|
|
|
552
547
|
purge?: PurgeComponent;
|
|
553
548
|
}
|
|
554
549
|
|
|
555
|
-
export interface CacheDirAction {
|
|
550
|
+
export interface CacheDirAction extends ExpiresAction {
|
|
556
551
|
enabled?: boolean;
|
|
557
552
|
dir?: string;
|
|
558
|
-
expires?: number | string;
|
|
559
553
|
}
|
|
560
554
|
|
|
561
555
|
export interface PoolConfig<T = number> extends MinMax {
|
package/lib/squared.d.ts
CHANGED
|
@@ -149,6 +149,10 @@ export interface FromAction {
|
|
|
149
149
|
from?: string[];
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
export interface ExpiresAction<T = number | string> {
|
|
153
|
+
expires?: T;
|
|
154
|
+
}
|
|
155
|
+
|
|
152
156
|
export interface TaskCommand<T = PlainObject> {
|
|
153
157
|
handler?: string;
|
|
154
158
|
task?: string | T;
|
|
@@ -204,11 +208,10 @@ export interface LocationUri {
|
|
|
204
208
|
filename: string;
|
|
205
209
|
}
|
|
206
210
|
|
|
207
|
-
export interface ViewEngine<T = unknown, U = PlainObject> {
|
|
211
|
+
export interface ViewEngine<T = unknown, U = PlainObject> extends ExpiresAction {
|
|
208
212
|
name?: string;
|
|
209
213
|
singleRow?: boolean;
|
|
210
214
|
outputEmpty?: boolean;
|
|
211
|
-
expires?: number | string;
|
|
212
215
|
options?: {
|
|
213
216
|
compile?: T;
|
|
214
217
|
output?: U;
|
|
@@ -323,9 +326,8 @@ export interface ResponseError {
|
|
|
323
326
|
hint?: string;
|
|
324
327
|
}
|
|
325
328
|
|
|
326
|
-
export interface RequestObserve extends WebSocketClient {
|
|
329
|
+
export interface RequestObserve extends WebSocketClient, ExpiresAction {
|
|
327
330
|
action?: string;
|
|
328
|
-
expires?: number | string;
|
|
329
331
|
}
|
|
330
332
|
|
|
331
333
|
export interface ChecksumBase<T = BinaryToTextEncoding> {
|
|
@@ -342,10 +344,9 @@ export interface ChecksumOutput<T = BinaryToTextEncoding> extends ChecksumBase<T
|
|
|
342
344
|
recursive?: boolean | 1;
|
|
343
345
|
}
|
|
344
346
|
|
|
345
|
-
export interface TaskBase {
|
|
347
|
+
export interface TaskBase extends ExpiresAction {
|
|
346
348
|
interval?: number | string;
|
|
347
349
|
start?: number | string;
|
|
348
|
-
expires?: number | string;
|
|
349
350
|
}
|
|
350
351
|
|
|
351
352
|
export type WebSocketEvent = "close" | "error";
|