@webdock/sdk 1.0.51 → 1.0.52

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 (59) hide show
  1. package/dist/account.d.ts +43 -0
  2. package/dist/account.d.ts.map +1 -0
  3. package/dist/account.test.d.ts +2 -0
  4. package/dist/account.test.d.ts.map +1 -0
  5. package/dist/events.d.ts +38 -0
  6. package/dist/events.d.ts.map +1 -0
  7. package/dist/events.test.d.ts +2 -0
  8. package/dist/events.test.d.ts.map +1 -0
  9. package/dist/hooks.d.ts +65 -0
  10. package/dist/hooks.d.ts.map +1 -0
  11. package/dist/hooks.test.d.ts +2 -0
  12. package/dist/hooks.test.d.ts.map +1 -0
  13. package/dist/images.d.ts +24 -0
  14. package/dist/images.d.ts.map +1 -0
  15. package/dist/images.test.d.ts +2 -0
  16. package/dist/images.test.d.ts.map +1 -0
  17. package/dist/index.cjs +9 -0
  18. package/dist/index.cjs.map +1 -0
  19. package/dist/index.d.ts +48 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.mjs +4105 -0
  22. package/dist/index.mjs.map +1 -0
  23. package/dist/locations.d.ts +26 -0
  24. package/dist/locations.d.ts.map +1 -0
  25. package/dist/locations.test.d.ts +2 -0
  26. package/dist/locations.test.d.ts.map +1 -0
  27. package/dist/operation.d.ts +31 -0
  28. package/dist/operation.d.ts.map +1 -0
  29. package/dist/operation.test.d.ts +2 -0
  30. package/dist/operation.test.d.ts.map +1 -0
  31. package/dist/profiles.d.ts +37 -0
  32. package/dist/profiles.d.ts.map +1 -0
  33. package/dist/profiles.test.d.ts +2 -0
  34. package/dist/profiles.test.d.ts.map +1 -0
  35. package/dist/scripts.d.ts +122 -0
  36. package/dist/scripts.d.ts.map +1 -0
  37. package/dist/scripts.test.d.ts +2 -0
  38. package/dist/scripts.test.d.ts.map +1 -0
  39. package/dist/servers.d.ts +215 -0
  40. package/dist/servers.d.ts.map +1 -0
  41. package/dist/servers.test.d.ts +2 -0
  42. package/dist/servers.test.d.ts.map +1 -0
  43. package/dist/shellusers.d.ts +87 -0
  44. package/dist/shellusers.d.ts.map +1 -0
  45. package/dist/shellusers.test.d.ts +2 -0
  46. package/dist/shellusers.test.d.ts.map +1 -0
  47. package/dist/snapshots.d.ts +51 -0
  48. package/dist/snapshots.d.ts.map +1 -0
  49. package/dist/snapshots.test.d.ts +2 -0
  50. package/dist/snapshots.test.d.ts.map +1 -0
  51. package/dist/sshkeys.d.ts +35 -0
  52. package/dist/sshkeys.d.ts.map +1 -0
  53. package/dist/sshkeys.test.d.ts +2 -0
  54. package/dist/sshkeys.test.d.ts.map +1 -0
  55. package/dist/testUtils.d.ts +5 -0
  56. package/dist/testUtils.d.ts.map +1 -0
  57. package/dist/utils/req.d.ts +3 -0
  58. package/dist/utils/req.d.ts.map +1 -0
  59. package/package.json +1 -1
@@ -0,0 +1,26 @@
1
+ import { Webdock } from './index';
2
+ export type Location = {
3
+ id: string;
4
+ name: string;
5
+ city: string;
6
+ country: string;
7
+ description: string;
8
+ icon: string;
9
+ };
10
+ export type ListLocationsType = {
11
+ body: Location[];
12
+ };
13
+ export declare class LocationClass {
14
+ private parent;
15
+ constructor(parent: Webdock);
16
+ list(): Promise<{
17
+ success: false;
18
+ error: string;
19
+ errorType: "network" | "server";
20
+ code: number;
21
+ } | {
22
+ success: true;
23
+ response: ListLocationsType;
24
+ }>;
25
+ }
26
+ //# sourceMappingURL=locations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locations.d.ts","sourceRoot":"","sources":["../src/locations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,MAAM,MAAM,QAAQ,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,QAAQ,EAAE,CAAC;CACjB,CAAC;AAEF,qBAAa,aAAa;IACzB,OAAO,CAAC,MAAM,CAAU;gBACZ,MAAM,EAAE,OAAO;IAIrB,IAAI;;;;;;;;;CAOV"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=locations.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locations.test.d.ts","sourceRoot":"","sources":["../src/locations.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ import { Webdock } from './index.js';
2
+ interface EventLog {
3
+ id: number;
4
+ startTime: string;
5
+ endTime: string | null;
6
+ callbackId: string;
7
+ serverSlug: string;
8
+ eventType: string;
9
+ action: string;
10
+ actionData: string;
11
+ status: "waiting" | "working" | "finished" | "error";
12
+ message: string;
13
+ }
14
+ type EventLogResponse = {
15
+ body: EventLog[];
16
+ };
17
+ export declare class OperationClass {
18
+ private parent;
19
+ constructor(parent: Webdock);
20
+ fetch(callbackId: string): Promise<{
21
+ success: false;
22
+ error: string;
23
+ errorType: "network" | "server";
24
+ code: number;
25
+ } | {
26
+ success: true;
27
+ response: EventLogResponse;
28
+ }>;
29
+ }
30
+ export {};
31
+ //# sourceMappingURL=operation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../src/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,UAAU,QAAQ;IACd,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;IACrD,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,KAAK,gBAAgB,GAAG;IACpB,IAAI,EAAE,QAAQ,EAAE,CAAC;CACpB,CAAC;AACF,qBAAa,cAAc;IACvB,OAAO,CAAC,MAAM,CAAU;gBAEZ,MAAM,EAAE,OAAO;IAIrB,KAAK,CAAC,UAAU,EAAE,MAAM;;;;;;;;;CAQjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=operation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation.test.d.ts","sourceRoot":"","sources":["../src/operation.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ import { Webdock } from './index';
2
+ export type CPU = {
3
+ cores: number;
4
+ threads: number;
5
+ };
6
+ export type Price = {
7
+ amount: number;
8
+ currency: string;
9
+ };
10
+ export type Profile = {
11
+ slug: string;
12
+ name: string;
13
+ ram: number;
14
+ disk: number;
15
+ cpu: CPU;
16
+ price: Price;
17
+ };
18
+ export type ListProfilesResponseType = {
19
+ body: Profile[];
20
+ };
21
+ export declare class ProfilesClass {
22
+ private parent;
23
+ constructor(parent: Webdock);
24
+ list({ locationId, profileSlug }: {
25
+ locationId?: string | undefined;
26
+ profileSlug?: string | undefined;
27
+ }): Promise<{
28
+ success: false;
29
+ error: string;
30
+ errorType: "network" | "server";
31
+ code: number;
32
+ } | {
33
+ success: true;
34
+ response: ListProfilesResponseType;
35
+ }>;
36
+ }
37
+ //# sourceMappingURL=profiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../src/profiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,MAAM,MAAM,GAAG,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,GAAG,CAAC;IACT,KAAK,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,OAAO,EAAE,CAAC;CAChB,CAAC;AAIF,qBAAa,aAAa;IACzB,OAAO,CAAC,MAAM,CAAU;gBACZ,MAAM,EAAE,OAAO;IAIrB,IAAI,CAAC,EACV,UAAiB,EACjB,WAAgB,EAChB;;;KAAA;;;;;;;;;CAcD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=profiles.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.test.d.ts","sourceRoot":"","sources":["../src/profiles.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,122 @@
1
+ import { Webdock } from './index';
2
+ export type CreateScriptBodyType = {
3
+ name: string;
4
+ filename: string;
5
+ content: string;
6
+ };
7
+ export type CreateScriptResponseType = {
8
+ body: {
9
+ id: number;
10
+ name: string;
11
+ description: string;
12
+ filename: string;
13
+ content: string;
14
+ };
15
+ };
16
+ export type DeleteScriptServerReturnType = {
17
+ body: Script;
18
+ headers: {
19
+ "x-callback-id": string;
20
+ };
21
+ };
22
+ export type ExecuteScriptOnServerReturnType = {
23
+ body: Script;
24
+ headers: {
25
+ "x-callback-id": string;
26
+ };
27
+ };
28
+ export type GetScriptByIdTResponseType = {
29
+ body: {
30
+ id: number;
31
+ name: string;
32
+ description: string;
33
+ filename: string;
34
+ content: string;
35
+ };
36
+ };
37
+ export interface ResponseHeaders {
38
+ "x-callback-id": string;
39
+ }
40
+ /**
41
+ * Response Schema (application/json)
42
+ */
43
+ export interface Script {
44
+ /** Script ID (int64) */
45
+ id: number;
46
+ /** Script name */
47
+ name: string;
48
+ /** Script path */
49
+ path: string;
50
+ /** Date/time of the last run */
51
+ lastRun: string | null;
52
+ /** Callback ID of the last script run */
53
+ lastRunCallbackId: string | null;
54
+ /** Creation date/time */
55
+ created: string;
56
+ }
57
+ export type CreateScriptOnServerResponse = {
58
+ headers: ResponseHeaders;
59
+ body: Script;
60
+ };
61
+ export type ListScriptsOnServerResponseType = {
62
+ body: {
63
+ id: number;
64
+ name: string;
65
+ path: string;
66
+ lastRun: Date | null;
67
+ lastRunCallbackId: string;
68
+ created: Date;
69
+ }[];
70
+ };
71
+ export type ListScriptsResponse = {
72
+ body: {
73
+ id: number;
74
+ name: string;
75
+ description: string;
76
+ filename: string;
77
+ content: string;
78
+ }[];
79
+ };
80
+ export declare class ScriptsClass {
81
+ private parent;
82
+ constructor(parent: Webdock);
83
+ create({ content, filename, name }: {
84
+ name: string;
85
+ filename: string;
86
+ content: string;
87
+ }): Promise<import('./index').WebdockApiRequestReturn<CreateScriptResponseType>>;
88
+ createOnServer({ scriptId, path, makeScriptExecutable, executeImmediately, serverSlug, }: {
89
+ scriptId: number;
90
+ path: string;
91
+ makeScriptExecutable: boolean;
92
+ executeImmediately: boolean;
93
+ serverSlug: string;
94
+ }): Promise<import('./index').WebdockApiRequestReturn<CreateScriptOnServerResponse>>;
95
+ delete({ id }: {
96
+ id: number;
97
+ }): Promise<import('./index').WebdockApiRequestReturn<undefined>>;
98
+ deleteScriptFromServer({ serverSlug, scriptId }: {
99
+ serverSlug: string;
100
+ scriptId: number;
101
+ }): Promise<import('./index').WebdockApiRequestReturn<DeleteScriptServerReturnType>>;
102
+ executeOnServer({ serverSlug, scriptID }: {
103
+ serverSlug: string;
104
+ scriptID: number;
105
+ }): Promise<import('./index').WebdockApiRequestReturn<ExecuteScriptOnServerReturnType>>;
106
+ getById({ scriptId }: {
107
+ token?: string;
108
+ scriptId: number;
109
+ }): Promise<import('./index').WebdockApiRequestReturn<GetScriptByIdTResponseType>>;
110
+ list(token?: string): Promise<import('./index').WebdockApiRequestReturn<ListScriptsResponse>>;
111
+ listOnServer({ serverSlug }: {
112
+ token?: string;
113
+ serverSlug: string;
114
+ }): Promise<import('./index').WebdockApiRequestReturn<ListScriptsOnServerResponseType>>;
115
+ update({ id, name, filename, content, }: {
116
+ id: number;
117
+ name: string;
118
+ filename: string;
119
+ content: string;
120
+ }): Promise<import('./index').WebdockApiRequestReturn<CreateScriptResponseType>>;
121
+ }
122
+ //# sourceMappingURL=scripts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../src/scripts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,MAAM,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACR,eAAe,EAAE,MAAM,CAAC;KACxB,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACR,eAAe,EAAE,MAAM,CAAC;KACxB,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE;QACL,EAAE,EAAE,MA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@
1
+ export {};
2
+ //# sourceMappingURL=scripts.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts.test.d.ts","sourceRoot":"","sources":["../src/scripts.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,215 @@
1
+ import { Webdock } from './index';
2
+ export type ServerStatus = "provisioning" | "running" | "stopped" | "error" | "rebooting" | "starting" | "stopping" | "reinstalling" | "suspended";
3
+ export type VirtualizationType = "container" | "kvm";
4
+ export type ServerType = "Apache" | "Nginx" | "None";
5
+ export type Server = {
6
+ slug: string;
7
+ name: string;
8
+ date: string;
9
+ location: string;
10
+ image: string;
11
+ profile: string;
12
+ ipv4: string | null;
13
+ ipv6: string | null;
14
+ status: ServerStatus;
15
+ virtualization: VirtualizationType;
16
+ webServer: ServerType;
17
+ aliases: [
18
+ string
19
+ ];
20
+ snapshotRunTime: 0;
21
+ description: string;
22
+ WordPressLockDown: boolean;
23
+ SSHPasswordAuthEnabled: boolean;
24
+ notes: string;
25
+ nextActionDate: string;
26
+ };
27
+ export type CreateServerResponseType = {
28
+ body: Server;
29
+ headers: {
30
+ "x-callback-id": string;
31
+ };
32
+ };
33
+ export type DeleteServerResponseType = {
34
+ body: Server;
35
+ headers: {
36
+ "x-callback-id": string;
37
+ };
38
+ };
39
+ export type FetchFileResponsePayload = {
40
+ body: {
41
+ content: string;
42
+ };
43
+ headers: {
44
+ "x-callback-id": string;
45
+ };
46
+ };
47
+ export type ListServersResponseType = {
48
+ body: Server[];
49
+ };
50
+ export type ReinstallServerResponseType = {
51
+ body: Server;
52
+ headers: {
53
+ "x-callback-id": string;
54
+ };
55
+ };
56
+ interface WarningDTO {
57
+ type: string;
58
+ message: string;
59
+ data: Record<string, string | number>;
60
+ }
61
+ interface Price {
62
+ amount: number;
63
+ currency: "EUR" | "DKK" | "USD";
64
+ }
65
+ interface ChargeSummaryItemDTO {
66
+ text: string;
67
+ price: Price;
68
+ isRefund: boolean;
69
+ }
70
+ interface ChargeSummaryTotalDTO {
71
+ subTotal: Price;
72
+ vat: Price;
73
+ total: Price;
74
+ }
75
+ interface ChargeSummaryDTO {
76
+ items: ChargeSummaryItemDTO[];
77
+ total: ChargeSummaryTotalDTO;
78
+ }
79
+ type DryRunResponse = {
80
+ warnings: WarningDTO[];
81
+ chargeSummary: ChargeSummaryDTO;
82
+ };
83
+ export type ResizeDryRunResponseType = {
84
+ body: DryRunResponse;
85
+ };
86
+ export type ResizeResponseType = {
87
+ body: Server;
88
+ headers: {
89
+ "x-callback-id": string;
90
+ };
91
+ };
92
+ export type StartResponseType = {
93
+ body: Server;
94
+ headers: {
95
+ "x-callback-id": string;
96
+ };
97
+ };
98
+ export type ArchiveResponseType = {
99
+ body: Server;
100
+ headers: {
101
+ "x-callback-id": string;
102
+ };
103
+ };
104
+ export type UpdateServerResponseType = {
105
+ body: Server;
106
+ };
107
+ /** */
108
+ interface MetricsSamplingDTO {
109
+ amount: number;
110
+ timestamp: string;
111
+ }
112
+ interface DiskMetricsDTO {
113
+ allowed: number;
114
+ samplings: MetricsSamplingDTO[];
115
+ }
116
+ interface NetworkMetricsDTO {
117
+ total: number;
118
+ allowed: number;
119
+ ingressSamplings: MetricsSamplingDTO[];
120
+ egressSamplings: MetricsSamplingDTO[];
121
+ }
122
+ interface CpuMetricsDTO {
123
+ usageSamplings: MetricsSamplingDTO[];
124
+ }
125
+ interface ProcessesMetricsDTO {
126
+ processesSamplings: MetricsSamplingDTO[];
127
+ }
128
+ interface MemoryMetricsDTO {
129
+ usageSamplings: MetricsSamplingDTO[];
130
+ }
131
+ export type MetricsNowResponseType = {
132
+ body: {
133
+ disk: DiskMetricsDTO;
134
+ network: NetworkMetricsDTO;
135
+ cpu: CpuMetricsDTO;
136
+ processes: ProcessesMetricsDTO;
137
+ memory: MemoryMetricsDTO;
138
+ };
139
+ };
140
+ export declare class ServersClass {
141
+ private parent;
142
+ constructor(parent: Webdock);
143
+ create({ name, locationId, profileSlug, imageSlug, virtualization, snapshotId, userScriptId, slug }: {
144
+ name: string;
145
+ locationId: string;
146
+ profileSlug?: string;
147
+ virtualization?: string;
148
+ slug?: string;
149
+ userScriptId?: number;
150
+ } & ({
151
+ snapshotId?: number;
152
+ imageSlug?: never;
153
+ } | {
154
+ imageSlug?: string;
155
+ snapshotId?: never;
156
+ })): Promise<import('./index').WebdockApiRequestReturn<CreateServerResponseType>>;
157
+ delete({ serverSlug, }: {
158
+ serverSlug: string;
159
+ }): Promise<import('./index').WebdockApiRequestReturn<DeleteServerResponseType>>;
160
+ fetchFile({ path, slug, }: {
161
+ path: string;
162
+ slug: string;
163
+ }): Promise<{
164
+ success: boolean;
165
+ message: string;
166
+ content?: undefined;
167
+ } | {
168
+ success: boolean;
169
+ content: string;
170
+ message?: undefined;
171
+ }>;
172
+ getBySlug({ serverSlang, }: {
173
+ serverSlang: string;
174
+ }): Promise<import('./index').WebdockApiRequestReturn<CreateServerResponseType>>;
175
+ list(): Promise<import('./index').WebdockApiRequestReturn<ListServersResponseType>>;
176
+ metrics({ now, serverSlug }: {
177
+ serverSlug: string;
178
+ now: boolean;
179
+ }): Promise<import('./index').WebdockApiRequestReturn<MetricsNowResponseType>>;
180
+ reboot({ serverSlug, }: {
181
+ serverSlug: string;
182
+ }): Promise<import('./index').WebdockApiRequestReturn<StartResponseType>>;
183
+ reinstall({ imageSlug, serverSlug, userScriptId, deleteSnapshots }: {
184
+ deleteSnapshots?: boolean;
185
+ serverSlug: string;
186
+ userScriptId: number;
187
+ imageSlug: string;
188
+ }): Promise<import('./index').WebdockApiRequestReturn<ReinstallServerResponseType>>;
189
+ resize({ serverSlug, profileSlug }: {
190
+ serverSlug: string;
191
+ profileSlug: string;
192
+ }): Promise<import('./index').WebdockApiRequestReturn<ResizeResponseType>>;
193
+ resizeDryRun({ serverSlug, profileSlug }: {
194
+ serverSlug: string;
195
+ profileSlug: string;
196
+ }): Promise<import('./index').WebdockApiRequestReturn<ResizeDryRunResponseType>>;
197
+ start({ serverSlug }: {
198
+ serverSlug: string;
199
+ }): Promise<import('./index').WebdockApiRequestReturn<StartResponseType>>;
200
+ stop({ serverSlug, }: {
201
+ serverSlug: string;
202
+ }): Promise<import('./index').WebdockApiRequestReturn<StartResponseType>>;
203
+ archive({ serverSlug }: {
204
+ serverSlug: string;
205
+ }): Promise<import('./index').WebdockApiRequestReturn<ArchiveResponseType>>;
206
+ update({ serverSlug, nextActionDate, name, description, notes, }: {
207
+ serverSlug: string;
208
+ nextActionDate?: string;
209
+ name?: string;
210
+ description?: string;
211
+ notes?: string;
212
+ }): Promise<import('./index').WebdockApiRequestReturn<UpdateServerResponseType>>;
213
+ }
214
+ export {};
215
+ //# sourceMappingURL=servers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"servers.d.ts","sourceRoot":"","sources":["../src/servers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,MAAM,MAAM,YAAY,GACrB,cAAc,GACd,SAAS,GACT,SAAS,GACT,OAAO,GACP,WAAW,GACX,UAAU,GACV,UAAU,GACV,cAAc,GACd,WAAW,CAAC;AACf,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,KAAK,CAAC;AACrD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAErD,MAAM,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,EAAE,kBAAkB,CAAC;IACnC,SAAS,EAAE,UAAU,CAAC;IACtB,OAAO,EAAE;QACR,MAAM;KACN,CAAC;IACF,eAAe,EAA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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"servers.test.d.ts","sourceRoot":"","sources":["../src/servers.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,87 @@
1
+ import { Webdock } from './index';
2
+ export type ShellUser = {
3
+ id: number;
4
+ username: string;
5
+ group: string;
6
+ shell: string;
7
+ created: string;
8
+ updated: string;
9
+ publicKeys: number[];
10
+ };
11
+ export type CreateShellUserResponseType = {
12
+ body: ShellUserDTO;
13
+ headers: {
14
+ "x-callback-id": string;
15
+ };
16
+ };
17
+ export type DeleteUserShellResponseType = {
18
+ body: ShellUser;
19
+ headers: {
20
+ "x-callback-id": string;
21
+ };
22
+ };
23
+ export type ListShellUsersResponseType = {
24
+ body: ShellUser[];
25
+ };
26
+ export type PublicKeyDTO = {
27
+ id: number;
28
+ name: string;
29
+ key: string;
30
+ created: string;
31
+ };
32
+ export type ShellUserDTO = {
33
+ id: number;
34
+ username: string;
35
+ group: string;
36
+ shell: string;
37
+ publicKeys: PublicKeyDTO[];
38
+ created: string;
39
+ };
40
+ export type ListShellUserDTO = {
41
+ id: number;
42
+ username: string;
43
+ group: string;
44
+ shell: string;
45
+ publicKeys: PublicKeyDTO[];
46
+ created: string;
47
+ };
48
+ export type ShellUserCreationResponse = {
49
+ headers: {
50
+ "x-callback-id": string;
51
+ };
52
+ body: ShellUserDTO;
53
+ };
54
+ export type CreateWebSSHTokenResponseType = {
55
+ body: {
56
+ token: string;
57
+ };
58
+ };
59
+ export declare class ShellUsersClass {
60
+ private parent;
61
+ constructor(parent: Webdock);
62
+ create({ serverSlug, username, password, group, shell, publicKeys, }: {
63
+ serverSlug: string;
64
+ username: string;
65
+ password: string;
66
+ group?: string;
67
+ shell?: string;
68
+ publicKeys?: number[];
69
+ }): Promise<import('./index').WebdockApiRequestReturn<CreateShellUserResponseType>>;
70
+ delete({ serverSlug, userId, }: {
71
+ serverSlug: string;
72
+ userId: number;
73
+ }): Promise<import('./index').WebdockApiRequestReturn<DeleteUserShellResponseType>>;
74
+ list({ serverSlug, }: {
75
+ serverSlug: string;
76
+ }): Promise<import('./index').WebdockApiRequestReturn<ListShellUsersResponseType>>;
77
+ edit({ slug, id, keys }: {
78
+ slug: string;
79
+ id: number;
80
+ keys: number[];
81
+ }): Promise<import('./index').WebdockApiRequestReturn<ShellUserCreationResponse>>;
82
+ websshToken({ serverSlug, username, }: {
83
+ serverSlug: string;
84
+ username: string;
85
+ }): Promise<import('./index').WebdockApiRequestReturn<CreateWebSSHTokenResponseType>>;
86
+ }
87
+ //# sourceMappingURL=shellusers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shellusers.d.ts","sourceRoot":"","sources":["../src/shellusers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,MAAM,MAAM,SAAS,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACzC,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE;QACR,eAAe,EAAE,MAAM,CAAC;KACxB,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACzC,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE;QACR,eAAe,EAAE,MAAM,CAAC;KACxB,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,SAAS,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CA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,CAAC,EAAE,UAAU,GAAG,EAAE;QACrB,UAAU,EAAE,MAAM,CAAC;KACnB;IAOD,IAAI,CACH,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,EAAE,CAAC;KACf;IAaF,WAAW,CACV,EAAE,UAAU,EAAE,QAAQ,GAAG,EAAE;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KACjB;CAaF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=shellusers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shellusers.test.d.ts","sourceRoot":"","sources":["../src/shellusers.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ import { Webdock } from './index';
2
+ export type Snapshot = {
3
+ id: number;
4
+ name: string;
5
+ date: string;
6
+ type: "daily" | "weekly" | "monthly";
7
+ virtualization: "container" | "kvm";
8
+ completed: boolean;
9
+ deletable: boolean;
10
+ };
11
+ export type SnapshotsCreateResponseType = {
12
+ body: Snapshot;
13
+ headers: {
14
+ "x-callback-id": string;
15
+ };
16
+ };
17
+ export type DeleteSnapShotResponseType = {
18
+ body: Snapshot;
19
+ headers: {
20
+ "x-callback-id": string;
21
+ };
22
+ };
23
+ export type ListSnapshotResponseType = {
24
+ body: Snapshot[];
25
+ };
26
+ export type RestoreSnapShotType = {
27
+ body: Snapshot;
28
+ headers: {
29
+ "x-callback-id": string;
30
+ };
31
+ };
32
+ export declare class SnapshotsClass {
33
+ private parent;
34
+ constructor(parent: Webdock);
35
+ create({ serverSlug, name, }: {
36
+ serverSlug: string;
37
+ name: string;
38
+ }): Promise<import('./index').WebdockApiRequestReturn<SnapshotsCreateResponseType>>;
39
+ list({ serverSlug, }: {
40
+ serverSlug: string;
41
+ }): Promise<import('./index').WebdockApiRequestReturn<ListSnapshotResponseType>>;
42
+ delete({ serverSlug, snapshotId, }: {
43
+ serverSlug: string;
44
+ snapshotId: number;
45
+ }): Promise<import('./index').WebdockApiRequestReturn<DeleteSnapShotResponseType>>;
46
+ restore({ serverSlug, snapshotId, }: {
47
+ serverSlug: string;
48
+ snapshotId: number;
49
+ }): Promise<import('./index').WebdockApiRequestReturn<RestoreSnapShotType>>;
50
+ }
51
+ //# sourceMappingURL=snapshots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshots.d.ts","sourceRoot":"","sources":["../src/snapshots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,MAAM,MAAM,QAAQ,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACrC,cAAc,EAAE,WAAW,GAAG,KAAK,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACzC,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE;QACR,eAAe,EAAE,MAAM,CAAC;KACxB,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE;QACR,eAAe,EAAE,MAAM,CAAC;KACxB,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,QAAQ,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE;QACR,eAAe,EAAE,MAAM,CAAC;KACxB,CAAC;CACF,CAAC;AAEF,qBAAa,cAAc;IAC1B,OAAO,CAAC,MAAM,CAAU;gBAEZ,MAAM,EAAE,OAAO;IAI3B,MAAM,CAAC,EACN,UAAU,EACV,IAAI,GACJ,EAAE;QACF,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;KACb;IAYD,IAAI,CAAC,EACJ,UAAU,GACV,EAAE;QACF,UAAU,EAAE,MAAM,CAAC;KACnB;IAQD,MAAM,CAAC,EACN,UAAU,EACV,UAAU,GACV,EAAE;QACF,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACnB;IASD,OAAO,CAAC,EACP,UAAU,EACV,UAAU,GACV,EAAE;QACF,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACnB;CAWD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=snapshots.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshots.test.d.ts","sourceRoot":"","sources":["../src/snapshots.test.ts"],"names":[],"mappings":""}