@rollupdate/hctl 0.0.0-stage → 3.0.0
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/LICENSE +21 -0
- package/README.md +1066 -2
- package/dist/auction/cache.d.ts +6 -0
- package/dist/auction/cache.js +55 -0
- package/dist/auction/client.d.ts +24 -0
- package/dist/auction/client.js +236 -0
- package/dist/auction/commands.d.ts +2 -0
- package/dist/auction/commands.js +440 -0
- package/dist/auction/diff-formatter.d.ts +3 -0
- package/dist/auction/diff-formatter.js +61 -0
- package/dist/auction/diff.d.ts +11 -0
- package/dist/auction/diff.js +28 -0
- package/dist/auction/formatter.d.ts +21 -0
- package/dist/auction/formatter.js +182 -0
- package/dist/auction/store.d.ts +24 -0
- package/dist/auction/store.js +177 -0
- package/dist/auction/types.d.ts +74 -0
- package/dist/auction/types.js +5 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +74 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +4 -0
- package/dist/cloud/browser-bootstrap.d.ts +16 -0
- package/dist/cloud/browser-bootstrap.js +438 -0
- package/dist/cloud/client.d.ts +520 -0
- package/dist/cloud/client.js +755 -0
- package/dist/cloud/commands/certificate.d.ts +2 -0
- package/dist/cloud/commands/certificate.js +108 -0
- package/dist/cloud/commands/context.d.ts +2 -0
- package/dist/cloud/commands/context.js +133 -0
- package/dist/cloud/commands/datacenter.d.ts +2 -0
- package/dist/cloud/commands/datacenter.js +24 -0
- package/dist/cloud/commands/firewall.d.ts +2 -0
- package/dist/cloud/commands/firewall.js +142 -0
- package/dist/cloud/commands/floating-ip.d.ts +2 -0
- package/dist/cloud/commands/floating-ip.js +138 -0
- package/dist/cloud/commands/image.d.ts +2 -0
- package/dist/cloud/commands/image.js +98 -0
- package/dist/cloud/commands/index.d.ts +2 -0
- package/dist/cloud/commands/index.js +47 -0
- package/dist/cloud/commands/inventory.d.ts +2 -0
- package/dist/cloud/commands/inventory.js +13 -0
- package/dist/cloud/commands/iso.d.ts +2 -0
- package/dist/cloud/commands/iso.js +27 -0
- package/dist/cloud/commands/load-balancer-type.d.ts +2 -0
- package/dist/cloud/commands/load-balancer-type.js +24 -0
- package/dist/cloud/commands/load-balancer.d.ts +2 -0
- package/dist/cloud/commands/load-balancer.js +269 -0
- package/dist/cloud/commands/location.d.ts +2 -0
- package/dist/cloud/commands/location.js +24 -0
- package/dist/cloud/commands/network.d.ts +2 -0
- package/dist/cloud/commands/network.js +157 -0
- package/dist/cloud/commands/placement-group.d.ts +2 -0
- package/dist/cloud/commands/placement-group.js +79 -0
- package/dist/cloud/commands/pricing.d.ts +2 -0
- package/dist/cloud/commands/pricing.js +15 -0
- package/dist/cloud/commands/primary-ip.d.ts +2 -0
- package/dist/cloud/commands/primary-ip.js +139 -0
- package/dist/cloud/commands/server-type.d.ts +2 -0
- package/dist/cloud/commands/server-type.js +24 -0
- package/dist/cloud/commands/server.d.ts +2 -0
- package/dist/cloud/commands/server.js +346 -0
- package/dist/cloud/commands/ssh-key.d.ts +2 -0
- package/dist/cloud/commands/ssh-key.js +94 -0
- package/dist/cloud/commands/volume.d.ts +2 -0
- package/dist/cloud/commands/volume.js +138 -0
- package/dist/cloud/context.d.ts +34 -0
- package/dist/cloud/context.js +215 -0
- package/dist/cloud/formatter.d.ts +40 -0
- package/dist/cloud/formatter.js +824 -0
- package/dist/cloud/helpers.d.ts +27 -0
- package/dist/cloud/helpers.js +67 -0
- package/dist/cloud/inventory.d.ts +100 -0
- package/dist/cloud/inventory.js +229 -0
- package/dist/cloud/pricing.d.ts +27 -0
- package/dist/cloud/pricing.js +103 -0
- package/dist/cloud/token-instructions.d.ts +2 -0
- package/dist/cloud/token-instructions.js +21 -0
- package/dist/cloud/types.d.ts +437 -0
- package/dist/cloud/types.js +5 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +2 -0
- package/dist/formatter.d.ts +3 -0
- package/dist/formatter.js +6 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +21 -0
- package/dist/robot/client.d.ts +246 -0
- package/dist/robot/client.js +719 -0
- package/dist/robot/commands/auth.d.ts +2 -0
- package/dist/robot/commands/auth.js +54 -0
- package/dist/robot/commands/boot.d.ts +2 -0
- package/dist/robot/commands/boot.js +76 -0
- package/dist/robot/commands/cancel.d.ts +2 -0
- package/dist/robot/commands/cancel.js +37 -0
- package/dist/robot/commands/failover.d.ts +2 -0
- package/dist/robot/commands/failover.js +46 -0
- package/dist/robot/commands/firewall.d.ts +2 -0
- package/dist/robot/commands/firewall.js +72 -0
- package/dist/robot/commands/index.d.ts +2 -0
- package/dist/robot/commands/index.js +36 -0
- package/dist/robot/commands/interactive.d.ts +2 -0
- package/dist/robot/commands/interactive.js +152 -0
- package/dist/robot/commands/ip.d.ts +2 -0
- package/dist/robot/commands/ip.js +55 -0
- package/dist/robot/commands/key.d.ts +2 -0
- package/dist/robot/commands/key.js +68 -0
- package/dist/robot/commands/order.d.ts +2 -0
- package/dist/robot/commands/order.js +33 -0
- package/dist/robot/commands/rdns.d.ts +2 -0
- package/dist/robot/commands/rdns.js +41 -0
- package/dist/robot/commands/reset.d.ts +2 -0
- package/dist/robot/commands/reset.js +77 -0
- package/dist/robot/commands/server.d.ts +2 -0
- package/dist/robot/commands/server.js +32 -0
- package/dist/robot/commands/storagebox.d.ts +2 -0
- package/dist/robot/commands/storagebox.js +126 -0
- package/dist/robot/commands/subnet.d.ts +2 -0
- package/dist/robot/commands/subnet.js +24 -0
- package/dist/robot/commands/traffic.d.ts +2 -0
- package/dist/robot/commands/traffic.js +23 -0
- package/dist/robot/commands/vswitch.d.ts +2 -0
- package/dist/robot/commands/vswitch.js +65 -0
- package/dist/robot/commands/wol.d.ts +2 -0
- package/dist/robot/commands/wol.js +20 -0
- package/dist/robot/formatter.d.ts +56 -0
- package/dist/robot/formatter.js +546 -0
- package/dist/robot/types.d.ts +353 -0
- package/dist/robot/types.js +5 -0
- package/dist/shared/config.d.ts +86 -0
- package/dist/shared/config.js +289 -0
- package/dist/shared/formatter.d.ts +29 -0
- package/dist/shared/formatter.js +121 -0
- package/dist/shared/helpers.d.ts +39 -0
- package/dist/shared/helpers.js +86 -0
- package/dist/shared/init.d.ts +2 -0
- package/dist/shared/init.js +107 -0
- package/dist/shared/reference.d.ts +5 -0
- package/dist/shared/reference.js +688 -0
- package/dist/shared/schemas.d.ts +1 -0
- package/dist/shared/schemas.js +1022 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.js +2 -0
- package/package.json +131 -4
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
export interface Server {
|
|
2
|
+
cancelled: boolean;
|
|
3
|
+
dc: string;
|
|
4
|
+
ip: string[];
|
|
5
|
+
paid_until: string;
|
|
6
|
+
product: string;
|
|
7
|
+
server_ip: string;
|
|
8
|
+
server_ipv6_net: string;
|
|
9
|
+
server_name: string;
|
|
10
|
+
server_number: number;
|
|
11
|
+
status: "ready" | "installing" | "maintenance";
|
|
12
|
+
subnet: ServerSubnet[];
|
|
13
|
+
traffic: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ServerSubnet {
|
|
16
|
+
ip: string;
|
|
17
|
+
mask: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ServerDetails extends Server {
|
|
20
|
+
cpanel: boolean;
|
|
21
|
+
hot_swap: boolean;
|
|
22
|
+
plesk: boolean;
|
|
23
|
+
rescue: boolean;
|
|
24
|
+
reset: boolean;
|
|
25
|
+
vnc: boolean;
|
|
26
|
+
windows: boolean;
|
|
27
|
+
wol: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface Cancellation {
|
|
30
|
+
cancellation_date: string | null;
|
|
31
|
+
cancellation_reason: string[] | null;
|
|
32
|
+
cancelled: boolean;
|
|
33
|
+
earliest_cancellation_date: string;
|
|
34
|
+
server_ip: string;
|
|
35
|
+
server_ipv6_net: string;
|
|
36
|
+
server_name: string;
|
|
37
|
+
server_number: number;
|
|
38
|
+
}
|
|
39
|
+
export type ResetType = "sw" | "hw" | "man" | "power" | "power_long";
|
|
40
|
+
export interface Reset {
|
|
41
|
+
operating_status: string;
|
|
42
|
+
server_ip: string;
|
|
43
|
+
server_ipv6_net: string;
|
|
44
|
+
server_number: number;
|
|
45
|
+
type: ResetType[];
|
|
46
|
+
}
|
|
47
|
+
export interface BootConfig {
|
|
48
|
+
cpanel: CpanelConfig | null;
|
|
49
|
+
linux: LinuxConfig | null;
|
|
50
|
+
plesk: PleskConfig | null;
|
|
51
|
+
rescue: RescueConfig | null;
|
|
52
|
+
vnc: VncConfig | null;
|
|
53
|
+
windows: WindowsConfig | null;
|
|
54
|
+
}
|
|
55
|
+
interface BaseBootConfig {
|
|
56
|
+
active: boolean;
|
|
57
|
+
password: string | null;
|
|
58
|
+
server_ip: string;
|
|
59
|
+
server_ipv6_net: string;
|
|
60
|
+
server_number: number;
|
|
61
|
+
}
|
|
62
|
+
export interface RescueConfig extends BaseBootConfig {
|
|
63
|
+
arch: number[];
|
|
64
|
+
authorized_key: string[];
|
|
65
|
+
host_key: string[];
|
|
66
|
+
os: string[];
|
|
67
|
+
}
|
|
68
|
+
export interface LinuxConfig extends BaseBootConfig {
|
|
69
|
+
arch: number[];
|
|
70
|
+
authorized_key: string[];
|
|
71
|
+
dist: string[];
|
|
72
|
+
host_key: string[];
|
|
73
|
+
lang: string[];
|
|
74
|
+
}
|
|
75
|
+
export interface VncConfig extends BaseBootConfig {
|
|
76
|
+
arch: number[];
|
|
77
|
+
dist: string[];
|
|
78
|
+
lang: string[];
|
|
79
|
+
}
|
|
80
|
+
export interface WindowsConfig extends BaseBootConfig {
|
|
81
|
+
dist: string[];
|
|
82
|
+
lang: string[];
|
|
83
|
+
}
|
|
84
|
+
export interface PleskConfig extends BaseBootConfig {
|
|
85
|
+
arch: number[];
|
|
86
|
+
dist: string[];
|
|
87
|
+
hostname: string | null;
|
|
88
|
+
lang: string[];
|
|
89
|
+
}
|
|
90
|
+
export interface CpanelConfig extends BaseBootConfig {
|
|
91
|
+
arch: number[];
|
|
92
|
+
dist: string[];
|
|
93
|
+
hostname: string | null;
|
|
94
|
+
lang: string[];
|
|
95
|
+
}
|
|
96
|
+
export interface IP {
|
|
97
|
+
ip: string;
|
|
98
|
+
locked: boolean;
|
|
99
|
+
separate_mac: string | null;
|
|
100
|
+
server_ip: string;
|
|
101
|
+
server_number: number;
|
|
102
|
+
traffic_daily: number;
|
|
103
|
+
traffic_hourly: number;
|
|
104
|
+
traffic_monthly: number;
|
|
105
|
+
traffic_warnings: boolean;
|
|
106
|
+
}
|
|
107
|
+
export interface Mac {
|
|
108
|
+
ip: string;
|
|
109
|
+
mac: string;
|
|
110
|
+
}
|
|
111
|
+
export interface Subnet {
|
|
112
|
+
failover: boolean;
|
|
113
|
+
gateway: string;
|
|
114
|
+
ip: string;
|
|
115
|
+
locked: boolean;
|
|
116
|
+
mask: string;
|
|
117
|
+
server_ip: string;
|
|
118
|
+
server_number: number;
|
|
119
|
+
traffic_daily: number;
|
|
120
|
+
traffic_hourly: number;
|
|
121
|
+
traffic_monthly: number;
|
|
122
|
+
traffic_warnings: boolean;
|
|
123
|
+
}
|
|
124
|
+
export interface Failover {
|
|
125
|
+
active_server_ip: string;
|
|
126
|
+
ip: string;
|
|
127
|
+
netmask: string;
|
|
128
|
+
server_ip: string;
|
|
129
|
+
server_number: number;
|
|
130
|
+
}
|
|
131
|
+
export interface Rdns {
|
|
132
|
+
ip: string;
|
|
133
|
+
ptr: string;
|
|
134
|
+
}
|
|
135
|
+
export interface SshKey {
|
|
136
|
+
data: string;
|
|
137
|
+
fingerprint: string;
|
|
138
|
+
name: string;
|
|
139
|
+
size: number;
|
|
140
|
+
type: string;
|
|
141
|
+
}
|
|
142
|
+
export interface Firewall {
|
|
143
|
+
filter_ipv6: boolean;
|
|
144
|
+
port: "main" | "kvm";
|
|
145
|
+
rules: {
|
|
146
|
+
input: FirewallRule[];
|
|
147
|
+
output?: FirewallRule[];
|
|
148
|
+
};
|
|
149
|
+
server_ip: string;
|
|
150
|
+
server_number: number;
|
|
151
|
+
status: "active" | "disabled" | "in process";
|
|
152
|
+
whitelist_hos: boolean;
|
|
153
|
+
}
|
|
154
|
+
export interface FirewallRule {
|
|
155
|
+
action: "accept" | "discard";
|
|
156
|
+
dst_ip: string | null;
|
|
157
|
+
dst_port: string | null;
|
|
158
|
+
ip_version: string;
|
|
159
|
+
name: string;
|
|
160
|
+
protocol: string | null;
|
|
161
|
+
src_ip: string | null;
|
|
162
|
+
src_port: string | null;
|
|
163
|
+
tcp_flags: string | null;
|
|
164
|
+
}
|
|
165
|
+
export interface FirewallTemplate {
|
|
166
|
+
filter_ipv6: boolean;
|
|
167
|
+
id: number;
|
|
168
|
+
is_default: boolean;
|
|
169
|
+
name: string;
|
|
170
|
+
rules: {
|
|
171
|
+
input: FirewallRule[];
|
|
172
|
+
output?: FirewallRule[];
|
|
173
|
+
};
|
|
174
|
+
whitelist_hos: boolean;
|
|
175
|
+
}
|
|
176
|
+
export type VSwitchSummary = Pick<VSwitch, "cancelled" | "id" | "name" | "vlan">;
|
|
177
|
+
export interface VSwitch {
|
|
178
|
+
cancelled: boolean;
|
|
179
|
+
cloud_network: VSwitchCloudNetwork[];
|
|
180
|
+
id: number;
|
|
181
|
+
name: string;
|
|
182
|
+
server: VSwitchServer[];
|
|
183
|
+
subnet: VSwitchSubnet[];
|
|
184
|
+
vlan: number;
|
|
185
|
+
}
|
|
186
|
+
export interface VSwitchServer {
|
|
187
|
+
server_ip: string;
|
|
188
|
+
server_ipv6_net: string;
|
|
189
|
+
server_number: number;
|
|
190
|
+
status: "ready" | "in process" | "failed";
|
|
191
|
+
}
|
|
192
|
+
export interface VSwitchSubnet {
|
|
193
|
+
gateway: string;
|
|
194
|
+
ip: string;
|
|
195
|
+
mask: number;
|
|
196
|
+
}
|
|
197
|
+
export interface VSwitchCloudNetwork {
|
|
198
|
+
gateway: string;
|
|
199
|
+
id: number;
|
|
200
|
+
ip: string;
|
|
201
|
+
mask: number;
|
|
202
|
+
}
|
|
203
|
+
export interface StorageBox {
|
|
204
|
+
cancelled: boolean;
|
|
205
|
+
disk_quota: number;
|
|
206
|
+
disk_usage: number;
|
|
207
|
+
disk_usage_data: number;
|
|
208
|
+
disk_usage_snapshots: number;
|
|
209
|
+
external_reachability: boolean;
|
|
210
|
+
host_system: string;
|
|
211
|
+
id: number;
|
|
212
|
+
linked_server: number | null;
|
|
213
|
+
location: string;
|
|
214
|
+
locked: boolean;
|
|
215
|
+
login: string;
|
|
216
|
+
name: string;
|
|
217
|
+
paid_until: string;
|
|
218
|
+
product: string;
|
|
219
|
+
samba: boolean;
|
|
220
|
+
server: string;
|
|
221
|
+
ssh: boolean;
|
|
222
|
+
webdav: boolean;
|
|
223
|
+
zfs: boolean;
|
|
224
|
+
}
|
|
225
|
+
export interface StorageBoxSnapshot {
|
|
226
|
+
name: string;
|
|
227
|
+
size: number;
|
|
228
|
+
size_formatted: string;
|
|
229
|
+
timestamp: string;
|
|
230
|
+
}
|
|
231
|
+
export interface StorageBoxSnapshotPlan {
|
|
232
|
+
day_of_month: number;
|
|
233
|
+
day_of_week: number;
|
|
234
|
+
hour: number;
|
|
235
|
+
max_snapshots: number;
|
|
236
|
+
minute: number;
|
|
237
|
+
status: "enabled" | "disabled";
|
|
238
|
+
}
|
|
239
|
+
export interface StorageBoxSubaccount {
|
|
240
|
+
accountid: string;
|
|
241
|
+
comment: string;
|
|
242
|
+
createtime: string;
|
|
243
|
+
external_reachability: boolean;
|
|
244
|
+
homedirectory: string;
|
|
245
|
+
readonly: boolean;
|
|
246
|
+
samba: boolean;
|
|
247
|
+
server: string;
|
|
248
|
+
ssh: boolean;
|
|
249
|
+
username: string;
|
|
250
|
+
webdav: boolean;
|
|
251
|
+
}
|
|
252
|
+
export interface Traffic {
|
|
253
|
+
data: TrafficData[];
|
|
254
|
+
from: string;
|
|
255
|
+
ip: string;
|
|
256
|
+
to: string;
|
|
257
|
+
type: "day" | "month" | "year";
|
|
258
|
+
}
|
|
259
|
+
export interface TrafficData {
|
|
260
|
+
date?: string;
|
|
261
|
+
in: number;
|
|
262
|
+
out: number;
|
|
263
|
+
sum: number;
|
|
264
|
+
}
|
|
265
|
+
export interface Wol {
|
|
266
|
+
server_ip: string;
|
|
267
|
+
server_ipv6_net: string;
|
|
268
|
+
server_number: number;
|
|
269
|
+
}
|
|
270
|
+
export interface ServerProduct {
|
|
271
|
+
arch: number[];
|
|
272
|
+
description: string[];
|
|
273
|
+
dist: string[];
|
|
274
|
+
id: string;
|
|
275
|
+
lang: string[];
|
|
276
|
+
location: string[];
|
|
277
|
+
name: string;
|
|
278
|
+
orderable_addons: string[];
|
|
279
|
+
prices: ProductPrice[];
|
|
280
|
+
traffic: string;
|
|
281
|
+
}
|
|
282
|
+
export interface ProductPrice {
|
|
283
|
+
location: string;
|
|
284
|
+
price: {
|
|
285
|
+
net: string;
|
|
286
|
+
gross: string;
|
|
287
|
+
};
|
|
288
|
+
price_setup: {
|
|
289
|
+
net: string;
|
|
290
|
+
gross: string;
|
|
291
|
+
};
|
|
292
|
+
price_setup_vat: {
|
|
293
|
+
net: string;
|
|
294
|
+
gross: string;
|
|
295
|
+
};
|
|
296
|
+
price_vat: {
|
|
297
|
+
net: string;
|
|
298
|
+
gross: string;
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
export interface ServerMarketProduct {
|
|
302
|
+
arch: number[];
|
|
303
|
+
cpu: string;
|
|
304
|
+
cpu_benchmark: number;
|
|
305
|
+
datacenter: string;
|
|
306
|
+
description: string[];
|
|
307
|
+
dist: string[];
|
|
308
|
+
fixed_price: boolean;
|
|
309
|
+
hdd_count: number;
|
|
310
|
+
hdd_size: number;
|
|
311
|
+
hdd_text: string;
|
|
312
|
+
id: number;
|
|
313
|
+
lang: string[];
|
|
314
|
+
memory_size: number;
|
|
315
|
+
name: string;
|
|
316
|
+
network_speed: string;
|
|
317
|
+
next_reduce: number;
|
|
318
|
+
next_reduce_date: string;
|
|
319
|
+
orderable_addons: string[];
|
|
320
|
+
price: string;
|
|
321
|
+
price_setup: string;
|
|
322
|
+
traffic: string;
|
|
323
|
+
}
|
|
324
|
+
export interface ServerTransaction {
|
|
325
|
+
authorized_key: string[];
|
|
326
|
+
comment: string;
|
|
327
|
+
date: string;
|
|
328
|
+
host_key: string[];
|
|
329
|
+
id: string;
|
|
330
|
+
product: ServerTransactionProduct;
|
|
331
|
+
server_ip: string | null;
|
|
332
|
+
server_number: number | null;
|
|
333
|
+
status: "ready" | "in process" | "cancelled";
|
|
334
|
+
}
|
|
335
|
+
export interface ServerTransactionProduct {
|
|
336
|
+
arch: number;
|
|
337
|
+
description: string[];
|
|
338
|
+
dist: string;
|
|
339
|
+
id: string;
|
|
340
|
+
lang: string;
|
|
341
|
+
location: string;
|
|
342
|
+
name: string;
|
|
343
|
+
traffic: string;
|
|
344
|
+
}
|
|
345
|
+
export type ApiResponse<T> = Record<string, T>;
|
|
346
|
+
export interface ApiError {
|
|
347
|
+
error: {
|
|
348
|
+
status: number;
|
|
349
|
+
code: string;
|
|
350
|
+
message: string;
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if system keychain is available
|
|
3
|
+
*/
|
|
4
|
+
export declare function hasKeychainSupport(): Promise<boolean>;
|
|
5
|
+
/**
|
|
6
|
+
* Get credentials from system keychain
|
|
7
|
+
*/
|
|
8
|
+
export declare function getKeychainCredentials(): Promise<{
|
|
9
|
+
user: string;
|
|
10
|
+
password: string;
|
|
11
|
+
} | null>;
|
|
12
|
+
/**
|
|
13
|
+
* Save credentials to system keychain
|
|
14
|
+
* @returns true if saved successfully, false otherwise
|
|
15
|
+
*/
|
|
16
|
+
export declare function saveToKeychain(user: string, password: string): Promise<boolean>;
|
|
17
|
+
/**
|
|
18
|
+
* Clear credentials from system keychain
|
|
19
|
+
*/
|
|
20
|
+
export declare function clearKeychain(): Promise<void>;
|
|
21
|
+
export type CredentialSource = "environment" | "keychain" | "file" | null;
|
|
22
|
+
export interface Config {
|
|
23
|
+
password?: string;
|
|
24
|
+
user?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Load configuration from file
|
|
28
|
+
*/
|
|
29
|
+
export declare function loadConfig(): Config;
|
|
30
|
+
/**
|
|
31
|
+
* Save configuration to file
|
|
32
|
+
*/
|
|
33
|
+
export declare function saveConfig(cfg: Config): void;
|
|
34
|
+
/**
|
|
35
|
+
* Clear saved configuration from file
|
|
36
|
+
*/
|
|
37
|
+
export declare function clearConfigFile(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Clear saved configuration from all storage locations
|
|
40
|
+
*/
|
|
41
|
+
export declare function clearConfig(): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Get credentials from environment variables only (sync)
|
|
44
|
+
*/
|
|
45
|
+
export declare function getCredentialsFromEnv(): {
|
|
46
|
+
user: string;
|
|
47
|
+
password: string;
|
|
48
|
+
} | null;
|
|
49
|
+
/**
|
|
50
|
+
* Get credentials from config file only (sync)
|
|
51
|
+
*/
|
|
52
|
+
export declare function getCredentialsFromFile(): {
|
|
53
|
+
user: string;
|
|
54
|
+
password: string;
|
|
55
|
+
} | null;
|
|
56
|
+
/**
|
|
57
|
+
* Get credentials from environment variables, keychain, or config file
|
|
58
|
+
* Priority: env vars → keychain → config file
|
|
59
|
+
*/
|
|
60
|
+
export declare function getCredentials(): Promise<{
|
|
61
|
+
user: string;
|
|
62
|
+
password: string;
|
|
63
|
+
source: CredentialSource;
|
|
64
|
+
} | null>;
|
|
65
|
+
/**
|
|
66
|
+
* Check if credentials are configured (sync check - env and file only)
|
|
67
|
+
*/
|
|
68
|
+
export declare function hasCredentialsSync(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Check if credentials are configured (async - includes keychain)
|
|
71
|
+
*/
|
|
72
|
+
export declare function hasCredentials(): Promise<boolean>;
|
|
73
|
+
/**
|
|
74
|
+
* Interactive login prompt
|
|
75
|
+
*/
|
|
76
|
+
export declare function promptLogin(): Promise<{
|
|
77
|
+
user: string;
|
|
78
|
+
password: string;
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Get credentials, prompting if necessary
|
|
82
|
+
*/
|
|
83
|
+
export declare function requireCredentials(): Promise<{
|
|
84
|
+
user: string;
|
|
85
|
+
password: string;
|
|
86
|
+
}>;
|