This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
forked from nodevault/node-vault
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
134 lines (122 loc) · 5.53 KB
/
index.d.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// Type definitions for node-vault 0.9.8
// Project: https://github.com/kr1sp1n/node-vault
// Definitions by: Jianrong Yu <https://github.com/YuJianrong>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as request from "request";
declare namespace NodeVault {
interface Option {
[p: string]: any;
}
interface RequestOption extends Option {
path: string;
method: string;
}
interface functionConf {
method: string;
path: string;
schema?: {
req?: Option;
query?: Option;
res?: Option;
};
}
interface client {
handleVaultResponse(res?: { statusCode: number, request: Option, body: any }): Promise<any>;
apiVersion: string;
endpoint: string;
token: string;
request(requestOptions: RequestOption): Promise<any>;
help(path: string, requestOptions?: Option): Promise<any>;
write(path: string, data: any, requestOptions?: Option): Promise<any>;
read(path: string, requestOptions?: Option): Promise<any>;
list(path: string, requestOptions?: Option): Promise<any>;
delete(path: string, requestOptions?: Option): Promise<any>;
generateFunction(name: string, conf: functionConf): void;
status(options?: Option): Promise<any>;
initialized(options?: Option): Promise<any>;
init(options?: Option): Promise<any>;
unseal(options?: Option): Promise<any>;
seal(options?: Option): Promise<any>;
generateRootStatus(options?: Option): Promise<any>;
generateRootInit(options?: Option): Promise<any>;
generateRootCancel(options?: Option): Promise<any>;
generateRootUpdate(options?: Option): Promise<any>;
mounts(options?: Option): Promise<any>;
mount(options?: Option): Promise<any>;
unmount(options?: Option): Promise<any>;
remount(options?: Option): Promise<any>;
policies(options?: Option): Promise<any>;
addPolicy(options?: Option): Promise<any>;
getPolicy(options?: Option): Promise<any>;
removePolicy(options?: Option): Promise<any>;
auths(options?: Option): Promise<any>;
enableAuth(options?: Option): Promise<any>;
disableAuth(options?: Option): Promise<any>;
audits(options?: Option): Promise<any>;
enableAudit(options?: Option): Promise<any>;
disableAudit(options?: Option): Promise<any>;
renew(options?: Option): Promise<any>;
revoke(options?: Option): Promise<any>;
revokePrefix(options?: Option): Promise<any>;
rotate(options?: Option): Promise<any>;
gcpLogin(options?: Option): Promise<any>;
githubLogin(options?: Option): Promise<any>;
userpassLogin(options?: Option): Promise<any>;
kubernetesLogin(options?: Option): Promise<any>;
awsIamLogin(options?: Option): Promise<any>;
tokenAccessors(options?: Option): Promise<any>;
tokenCreate(options?: Option): Promise<any>;
tokenCreateOrphan(options?: Option): Promise<any>;
tokenCreateRole(options?: Option): Promise<any>;
tokenLookup(options?: Option): Promise<any>;
tokenLookupAccessor(options?: Option): Promise<any>;
tokenLookupSelf(options?: Option): Promise<any>;
tokenRenew(options?: Option): Promise<any>;
tokenRenewSelf(options?: Option): Promise<any>;
tokenRevoke(options?: Option): Promise<any>;
tokenRevokeAccessor(options?: Option): Promise<any>;
tokenRevokeOrphan(options?: Option): Promise<any>;
tokenRevokeSelf(options?: Option): Promise<any>;
tokenRoles(options?: Option): Promise<any>;
addTokenRole(options?: Option): Promise<any>;
getTokenRole(options?: Option): Promise<any>;
removeTokenRole(options?: Option): Promise<any>;
approleRoles(options?: Option): Promise<any>;
addApproleRole(options?: Option): Promise<any>;
getApproleRole(options?: Option): Promise<any>;
deleteApproleRole(options?: Option): Promise<any>;
getApproleRoleId(options?: Option): Promise<any>;
updateApproleRoleId(options?: Option): Promise<any>;
getApproleRoleSecret(options?: Option): Promise<any>;
approleSecretAccessors(options?: Option): Promise<any>;
approleSecretLookup(options?: Option): Promise<any>;
approleSecretDestroy(options?: Option): Promise<any>;
approleSecretAccessorLookup(options?: Option): Promise<any>;
approleSecretAccessorDestroy(options?: Option): Promise<any>;
approleLogin(options?: Option): Promise<any>;
health(options?: Option): Promise<any>;
leader(options?: Option): Promise<any>;
stepDown(options?: Option): Promise<any>;
encryptData(options?: Option): Promise<any>;
decryptData(options?: Option): Promise<any>;
generateDatabaseCredentials(options?: Option): Promise<any>;
}
interface VaultOptions {
debug?(...args: any[]): any;
tv4?(...args: any[]): any;
commands?: Array<{ method: string, path: string, scheme: any }>;
mustache?: any;
"request-promise"?: any;
Promise?: PromiseConstructor;
apiVersion?: string;
endpoint?: string;
namespace?: string;
noCustomHTTPVerbs?: boolean;
pathPrefix?: string;
token?: string;
requestOptions?: request.CoreOptions;
}
}
declare function NodeVault(options?: NodeVault.VaultOptions): NodeVault.client;
export = NodeVault;