-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
49 lines (41 loc) · 819 Bytes
/
types.ts
File metadata and controls
49 lines (41 loc) · 819 Bytes
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
export type AutoRemoveMode = 'count-based' | 'time-based';
/**
* count-based 100, 1k, 1kk, 1m
*/
export type HumanNumber = string;
/**
* s
* min
* h
* d
* w
* mon
* y
*/
export type HumanDuration = string;
export interface PluginOptions {
createdAtField: string;
/**
* - count-based: Delete items > maxItems
* - time-based: Delete age > maxAge
*/
mode: AutoRemoveMode;
/**
* for count-based mode (100', '1k', '10k', '1m')
*/
maxItems?: HumanNumber;
/**
* Max age of otem for time-based режиму ('1d', '7d', '1mon', '1y')
*/
maxAge?: HumanDuration;
/**
* Interval for running cleanup (e.g. '1h', '1d')
* Default '1d'
*/
interval?: HumanDuration;
/**
* Delete no more than X items per run
* Default 500
*/
maxDeletePerRun?: number;
}