1 | import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext";
|
2 |
|
3 |
|
4 |
|
5 | export declare type PreferenceStoreFactory = (ctx: HandlerContext) => PreferenceStore;
|
6 |
|
7 |
|
8 |
|
9 | export declare enum PreferenceScope {
|
10 | Sdm = "sdm",
|
11 | Workspace = "workspace"
|
12 | }
|
13 |
|
14 |
|
15 |
|
16 | export interface PreferenceStore {
|
17 | |
18 |
|
19 |
|
20 | get<V>(key: string, options?: {
|
21 | scope?: PreferenceScope | string;
|
22 | defaultValue?: V;
|
23 | }): Promise<V | undefined>;
|
24 | |
25 |
|
26 |
|
27 | put<V>(key: string, value: V, options?: {
|
28 | scope?: PreferenceScope | string;
|
29 | ttl?: number;
|
30 | }): Promise<V>;
|
31 | |
32 |
|
33 |
|
34 | list<V>(scope: PreferenceScope | string): Promise<Array<{
|
35 | key: string;
|
36 | value: V;
|
37 | }>>;
|
38 | |
39 |
|
40 |
|
41 | delete(key: string, options?: {
|
42 | scope?: PreferenceScope | string;
|
43 | }): Promise<void>;
|
44 | }
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export declare const NoPreferenceStore: PreferenceStore;
|
50 |
|
\ | No newline at end of file |