@rollupdate/hctl 0.0.0-stage → 3.1.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.
Files changed (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1071 -2
  3. package/dist/auction/cache.d.ts +6 -0
  4. package/dist/auction/cache.js +55 -0
  5. package/dist/auction/client.d.ts +24 -0
  6. package/dist/auction/client.js +236 -0
  7. package/dist/auction/commands.d.ts +2 -0
  8. package/dist/auction/commands.js +440 -0
  9. package/dist/auction/diff-formatter.d.ts +3 -0
  10. package/dist/auction/diff-formatter.js +61 -0
  11. package/dist/auction/diff.d.ts +11 -0
  12. package/dist/auction/diff.js +28 -0
  13. package/dist/auction/formatter.d.ts +21 -0
  14. package/dist/auction/formatter.js +182 -0
  15. package/dist/auction/store.d.ts +24 -0
  16. package/dist/auction/store.js +177 -0
  17. package/dist/auction/types.d.ts +74 -0
  18. package/dist/auction/types.js +5 -0
  19. package/dist/cli.d.ts +2 -0
  20. package/dist/cli.js +74 -0
  21. package/dist/client.d.ts +2 -0
  22. package/dist/client.js +4 -0
  23. package/dist/cloud/browser-bootstrap.d.ts +28 -0
  24. package/dist/cloud/browser-bootstrap.js +480 -0
  25. package/dist/cloud/client.d.ts +520 -0
  26. package/dist/cloud/client.js +755 -0
  27. package/dist/cloud/commands/certificate.d.ts +2 -0
  28. package/dist/cloud/commands/certificate.js +108 -0
  29. package/dist/cloud/commands/context.d.ts +2 -0
  30. package/dist/cloud/commands/context.js +133 -0
  31. package/dist/cloud/commands/datacenter.d.ts +2 -0
  32. package/dist/cloud/commands/datacenter.js +24 -0
  33. package/dist/cloud/commands/firewall.d.ts +2 -0
  34. package/dist/cloud/commands/firewall.js +142 -0
  35. package/dist/cloud/commands/floating-ip.d.ts +2 -0
  36. package/dist/cloud/commands/floating-ip.js +138 -0
  37. package/dist/cloud/commands/image.d.ts +2 -0
  38. package/dist/cloud/commands/image.js +98 -0
  39. package/dist/cloud/commands/index.d.ts +2 -0
  40. package/dist/cloud/commands/index.js +47 -0
  41. package/dist/cloud/commands/inventory.d.ts +2 -0
  42. package/dist/cloud/commands/inventory.js +13 -0
  43. package/dist/cloud/commands/iso.d.ts +2 -0
  44. package/dist/cloud/commands/iso.js +27 -0
  45. package/dist/cloud/commands/load-balancer-type.d.ts +2 -0
  46. package/dist/cloud/commands/load-balancer-type.js +24 -0
  47. package/dist/cloud/commands/load-balancer.d.ts +2 -0
  48. package/dist/cloud/commands/load-balancer.js +269 -0
  49. package/dist/cloud/commands/location.d.ts +2 -0
  50. package/dist/cloud/commands/location.js +24 -0
  51. package/dist/cloud/commands/network.d.ts +2 -0
  52. package/dist/cloud/commands/network.js +157 -0
  53. package/dist/cloud/commands/placement-group.d.ts +2 -0
  54. package/dist/cloud/commands/placement-group.js +79 -0
  55. package/dist/cloud/commands/pricing.d.ts +2 -0
  56. package/dist/cloud/commands/pricing.js +15 -0
  57. package/dist/cloud/commands/primary-ip.d.ts +2 -0
  58. package/dist/cloud/commands/primary-ip.js +139 -0
  59. package/dist/cloud/commands/server-type.d.ts +2 -0
  60. package/dist/cloud/commands/server-type.js +24 -0
  61. package/dist/cloud/commands/server.d.ts +2 -0
  62. package/dist/cloud/commands/server.js +346 -0
  63. package/dist/cloud/commands/ssh-key.d.ts +2 -0
  64. package/dist/cloud/commands/ssh-key.js +94 -0
  65. package/dist/cloud/commands/volume.d.ts +2 -0
  66. package/dist/cloud/commands/volume.js +138 -0
  67. package/dist/cloud/context.d.ts +34 -0
  68. package/dist/cloud/context.js +215 -0
  69. package/dist/cloud/formatter.d.ts +40 -0
  70. package/dist/cloud/formatter.js +824 -0
  71. package/dist/cloud/helpers.d.ts +27 -0
  72. package/dist/cloud/helpers.js +67 -0
  73. package/dist/cloud/inventory.d.ts +100 -0
  74. package/dist/cloud/inventory.js +229 -0
  75. package/dist/cloud/pricing.d.ts +27 -0
  76. package/dist/cloud/pricing.js +103 -0
  77. package/dist/cloud/token-instructions.d.ts +2 -0
  78. package/dist/cloud/token-instructions.js +21 -0
  79. package/dist/cloud/types.d.ts +437 -0
  80. package/dist/cloud/types.js +5 -0
  81. package/dist/config.d.ts +1 -0
  82. package/dist/config.js +2 -0
  83. package/dist/formatter.d.ts +3 -0
  84. package/dist/formatter.js +6 -0
  85. package/dist/index.d.ts +12 -0
  86. package/dist/index.js +21 -0
  87. package/dist/robot/client.d.ts +256 -0
  88. package/dist/robot/client.js +745 -0
  89. package/dist/robot/commands/auth.d.ts +2 -0
  90. package/dist/robot/commands/auth.js +54 -0
  91. package/dist/robot/commands/boot.d.ts +2 -0
  92. package/dist/robot/commands/boot.js +76 -0
  93. package/dist/robot/commands/cancel.d.ts +2 -0
  94. package/dist/robot/commands/cancel.js +37 -0
  95. package/dist/robot/commands/failover.d.ts +2 -0
  96. package/dist/robot/commands/failover.js +46 -0
  97. package/dist/robot/commands/firewall.d.ts +2 -0
  98. package/dist/robot/commands/firewall.js +72 -0
  99. package/dist/robot/commands/index.d.ts +2 -0
  100. package/dist/robot/commands/index.js +36 -0
  101. package/dist/robot/commands/interactive.d.ts +2 -0
  102. package/dist/robot/commands/interactive.js +152 -0
  103. package/dist/robot/commands/ip.d.ts +2 -0
  104. package/dist/robot/commands/ip.js +55 -0
  105. package/dist/robot/commands/key.d.ts +2 -0
  106. package/dist/robot/commands/key.js +68 -0
  107. package/dist/robot/commands/order.d.ts +2 -0
  108. package/dist/robot/commands/order.js +33 -0
  109. package/dist/robot/commands/rdns.d.ts +2 -0
  110. package/dist/robot/commands/rdns.js +41 -0
  111. package/dist/robot/commands/reset.d.ts +2 -0
  112. package/dist/robot/commands/reset.js +77 -0
  113. package/dist/robot/commands/server.d.ts +2 -0
  114. package/dist/robot/commands/server.js +32 -0
  115. package/dist/robot/commands/storagebox.d.ts +2 -0
  116. package/dist/robot/commands/storagebox.js +126 -0
  117. package/dist/robot/commands/subnet.d.ts +2 -0
  118. package/dist/robot/commands/subnet.js +24 -0
  119. package/dist/robot/commands/traffic.d.ts +2 -0
  120. package/dist/robot/commands/traffic.js +23 -0
  121. package/dist/robot/commands/vswitch.d.ts +2 -0
  122. package/dist/robot/commands/vswitch.js +81 -0
  123. package/dist/robot/commands/wol.d.ts +2 -0
  124. package/dist/robot/commands/wol.js +20 -0
  125. package/dist/robot/formatter.d.ts +57 -0
  126. package/dist/robot/formatter.js +582 -0
  127. package/dist/robot/types.d.ts +359 -0
  128. package/dist/robot/types.js +5 -0
  129. package/dist/shared/config.d.ts +86 -0
  130. package/dist/shared/config.js +289 -0
  131. package/dist/shared/formatter.d.ts +29 -0
  132. package/dist/shared/formatter.js +121 -0
  133. package/dist/shared/helpers.d.ts +39 -0
  134. package/dist/shared/helpers.js +86 -0
  135. package/dist/shared/init.d.ts +2 -0
  136. package/dist/shared/init.js +107 -0
  137. package/dist/shared/reference.d.ts +5 -0
  138. package/dist/shared/reference.js +689 -0
  139. package/dist/shared/schemas.d.ts +1 -0
  140. package/dist/shared/schemas.js +1031 -0
  141. package/dist/types.d.ts +2 -0
  142. package/dist/types.js +2 -0
  143. package/package.json +127 -4
@@ -0,0 +1,359 @@
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 NamedVSwitchServer extends VSwitchServer {
193
+ server_name: string | null;
194
+ }
195
+ export type VSwitchWithServerNames = Omit<VSwitch, "server"> & {
196
+ server: NamedVSwitchServer[];
197
+ };
198
+ export interface VSwitchSubnet {
199
+ gateway: string;
200
+ ip: string;
201
+ mask: number;
202
+ }
203
+ export interface VSwitchCloudNetwork {
204
+ gateway: string;
205
+ id: number;
206
+ ip: string;
207
+ mask: number;
208
+ }
209
+ export interface StorageBox {
210
+ cancelled: boolean;
211
+ disk_quota: number;
212
+ disk_usage: number;
213
+ disk_usage_data: number;
214
+ disk_usage_snapshots: number;
215
+ external_reachability: boolean;
216
+ host_system: string;
217
+ id: number;
218
+ linked_server: number | null;
219
+ location: string;
220
+ locked: boolean;
221
+ login: string;
222
+ name: string;
223
+ paid_until: string;
224
+ product: string;
225
+ samba: boolean;
226
+ server: string;
227
+ ssh: boolean;
228
+ webdav: boolean;
229
+ zfs: boolean;
230
+ }
231
+ export interface StorageBoxSnapshot {
232
+ name: string;
233
+ size: number;
234
+ size_formatted: string;
235
+ timestamp: string;
236
+ }
237
+ export interface StorageBoxSnapshotPlan {
238
+ day_of_month: number;
239
+ day_of_week: number;
240
+ hour: number;
241
+ max_snapshots: number;
242
+ minute: number;
243
+ status: "enabled" | "disabled";
244
+ }
245
+ export interface StorageBoxSubaccount {
246
+ accountid: string;
247
+ comment: string;
248
+ createtime: string;
249
+ external_reachability: boolean;
250
+ homedirectory: string;
251
+ readonly: boolean;
252
+ samba: boolean;
253
+ server: string;
254
+ ssh: boolean;
255
+ username: string;
256
+ webdav: boolean;
257
+ }
258
+ export interface Traffic {
259
+ data: TrafficData[];
260
+ from: string;
261
+ ip: string;
262
+ to: string;
263
+ type: "day" | "month" | "year";
264
+ }
265
+ export interface TrafficData {
266
+ date?: string;
267
+ in: number;
268
+ out: number;
269
+ sum: number;
270
+ }
271
+ export interface Wol {
272
+ server_ip: string;
273
+ server_ipv6_net: string;
274
+ server_number: number;
275
+ }
276
+ export interface ServerProduct {
277
+ arch: number[];
278
+ description: string[];
279
+ dist: string[];
280
+ id: string;
281
+ lang: string[];
282
+ location: string[];
283
+ name: string;
284
+ orderable_addons: string[];
285
+ prices: ProductPrice[];
286
+ traffic: string;
287
+ }
288
+ export interface ProductPrice {
289
+ location: string;
290
+ price: {
291
+ net: string;
292
+ gross: string;
293
+ };
294
+ price_setup: {
295
+ net: string;
296
+ gross: string;
297
+ };
298
+ price_setup_vat: {
299
+ net: string;
300
+ gross: string;
301
+ };
302
+ price_vat: {
303
+ net: string;
304
+ gross: string;
305
+ };
306
+ }
307
+ export interface ServerMarketProduct {
308
+ arch: number[];
309
+ cpu: string;
310
+ cpu_benchmark: number;
311
+ datacenter: string;
312
+ description: string[];
313
+ dist: string[];
314
+ fixed_price: boolean;
315
+ hdd_count: number;
316
+ hdd_size: number;
317
+ hdd_text: string;
318
+ id: number;
319
+ lang: string[];
320
+ memory_size: number;
321
+ name: string;
322
+ network_speed: string;
323
+ next_reduce: number;
324
+ next_reduce_date: string;
325
+ orderable_addons: string[];
326
+ price: string;
327
+ price_setup: string;
328
+ traffic: string;
329
+ }
330
+ export interface ServerTransaction {
331
+ authorized_key: string[];
332
+ comment: string;
333
+ date: string;
334
+ host_key: string[];
335
+ id: string;
336
+ product: ServerTransactionProduct;
337
+ server_ip: string | null;
338
+ server_number: number | null;
339
+ status: "ready" | "in process" | "cancelled";
340
+ }
341
+ export interface ServerTransactionProduct {
342
+ arch: number;
343
+ description: string[];
344
+ dist: string;
345
+ id: string;
346
+ lang: string;
347
+ location: string;
348
+ name: string;
349
+ traffic: string;
350
+ }
351
+ export type ApiResponse<T> = Record<string, T>;
352
+ export interface ApiError {
353
+ error: {
354
+ status: number;
355
+ code: string;
356
+ message: string;
357
+ };
358
+ }
359
+ export {};
@@ -0,0 +1,5 @@
1
+ // ============================================================================
2
+ // Hetzner Robot API Types
3
+ // Based on: https://robot.hetzner.com/doc/webservice/en.html
4
+ // ============================================================================
5
+ 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
+ }>;