@studiometa/forge-sdk 0.3.0 → 0.4.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/README.md +13 -11
- package/dist/forge.d.ts +13 -8
- package/dist/forge.d.ts.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +378 -355
- package/dist/index.js.map +1 -1
- package/dist/pagination.d.ts +8 -5
- package/dist/pagination.d.ts.map +1 -1
- package/dist/resources/backups.d.ts +18 -10
- package/dist/resources/backups.d.ts.map +1 -1
- package/dist/resources/base.d.ts +3 -2
- package/dist/resources/base.d.ts.map +1 -1
- package/dist/resources/certificates.d.ts +22 -59
- package/dist/resources/certificates.d.ts.map +1 -1
- package/dist/resources/commands.d.ts +18 -10
- package/dist/resources/commands.d.ts.map +1 -1
- package/dist/resources/daemons.d.ts +18 -10
- package/dist/resources/daemons.d.ts.map +1 -1
- package/dist/resources/database-users.d.ts +18 -10
- package/dist/resources/database-users.d.ts.map +1 -1
- package/dist/resources/databases.d.ts +18 -10
- package/dist/resources/databases.d.ts.map +1 -1
- package/dist/resources/deployments.d.ts +15 -9
- package/dist/resources/deployments.d.ts.map +1 -1
- package/dist/resources/firewall-rules.d.ts +18 -10
- package/dist/resources/firewall-rules.d.ts.map +1 -1
- package/dist/resources/monitors.d.ts +18 -10
- package/dist/resources/monitors.d.ts.map +1 -1
- package/dist/resources/nginx-templates.d.ts +21 -11
- package/dist/resources/nginx-templates.d.ts.map +1 -1
- package/dist/resources/recipes.d.ts +17 -10
- package/dist/resources/recipes.d.ts.map +1 -1
- package/dist/resources/redirect-rules.d.ts +18 -10
- package/dist/resources/redirect-rules.d.ts.map +1 -1
- package/dist/resources/scheduled-jobs.d.ts +18 -10
- package/dist/resources/scheduled-jobs.d.ts.map +1 -1
- package/dist/resources/security-rules.d.ts +18 -10
- package/dist/resources/security-rules.d.ts.map +1 -1
- package/dist/resources/servers.d.ts +25 -13
- package/dist/resources/servers.d.ts.map +1 -1
- package/dist/resources/sites.d.ts +29 -17
- package/dist/resources/sites.d.ts.map +1 -1
- package/dist/resources/ssh-keys.d.ts +18 -10
- package/dist/resources/ssh-keys.d.ts.map +1 -1
- package/dist/test-utils.d.ts +12 -3
- package/dist/test-utils.d.ts.map +1 -1
- package/dist/test-utils.js +16 -5
- package/dist/test-utils.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HttpClient } from "@studiometa/forge-api";
|
|
1
|
+
import { HttpClient, unwrapDocument, unwrapDocument as unwrapDocument$1, unwrapListDocument, unwrapListDocument as unwrapListDocument$1, unwrapResource } from "@studiometa/forge-api";
|
|
2
2
|
/**
|
|
3
|
-
* Async paginated iterator that auto-fetches all pages.
|
|
3
|
+
* Async paginated iterator that auto-fetches all pages using cursor-based pagination.
|
|
4
4
|
*
|
|
5
5
|
* @example
|
|
6
6
|
* ```ts
|
|
@@ -15,19 +15,17 @@ import { HttpClient } from "@studiometa/forge-api";
|
|
|
15
15
|
*/
|
|
16
16
|
var AsyncPaginatedIterator = class {
|
|
17
17
|
fetchPage;
|
|
18
|
-
|
|
19
|
-
constructor(fetchPage, perPage = 200) {
|
|
18
|
+
constructor(fetchPage) {
|
|
20
19
|
this.fetchPage = fetchPage;
|
|
21
|
-
this.perPage = perPage;
|
|
22
20
|
}
|
|
23
21
|
async *[Symbol.asyncIterator]() {
|
|
24
|
-
let
|
|
22
|
+
let cursor = null;
|
|
25
23
|
let hasMore = true;
|
|
26
24
|
while (hasMore) {
|
|
27
|
-
const items = await this.fetchPage(
|
|
25
|
+
const { items, nextCursor } = await this.fetchPage(cursor);
|
|
28
26
|
for (const item of items) yield item;
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
if (nextCursor) cursor = nextCursor;
|
|
28
|
+
else hasMore = false;
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
/**
|
|
@@ -56,12 +54,14 @@ function matchByName(items, query, getName) {
|
|
|
56
54
|
}
|
|
57
55
|
/**
|
|
58
56
|
* Abstract base class for resource collections.
|
|
59
|
-
* Provides
|
|
57
|
+
* Provides shared `client` and `orgSlug` properties to avoid duplication across all collection classes.
|
|
60
58
|
*/
|
|
61
59
|
var BaseCollection = class {
|
|
62
60
|
client;
|
|
63
|
-
|
|
61
|
+
orgSlug;
|
|
62
|
+
constructor(client, orgSlug) {
|
|
64
63
|
this.client = client;
|
|
64
|
+
this.orgSlug = orgSlug;
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
@@ -76,13 +76,13 @@ var BaseCollection = class {
|
|
|
76
76
|
*/
|
|
77
77
|
var DeploymentsCollection = class extends BaseCollection {
|
|
78
78
|
/** @internal */
|
|
79
|
-
constructor(client, serverId, siteId) {
|
|
80
|
-
super(client);
|
|
79
|
+
constructor(client, orgSlug, serverId, siteId) {
|
|
80
|
+
super(client, orgSlug);
|
|
81
81
|
this.serverId = serverId;
|
|
82
82
|
this.siteId = siteId;
|
|
83
83
|
}
|
|
84
84
|
get basePath() {
|
|
85
|
-
return `/servers/${this.serverId}/sites/${this.siteId}/deployments`;
|
|
85
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/sites/${this.siteId}/deployments`;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* List deployments for this site.
|
|
@@ -91,13 +91,14 @@ var DeploymentsCollection = class extends BaseCollection {
|
|
|
91
91
|
* ```ts
|
|
92
92
|
* const deployments = await forge.server(123).site(456).deployments.list();
|
|
93
93
|
*
|
|
94
|
-
* // Fetch a specific page:
|
|
95
|
-
* const page2 = await forge.server(123).site(456).deployments.list({
|
|
94
|
+
* // Fetch a specific cursor page:
|
|
95
|
+
* const page2 = await forge.server(123).site(456).deployments.list({ cursor: 'next-cursor-value' });
|
|
96
96
|
* ```
|
|
97
97
|
*/
|
|
98
98
|
async list(options = {}) {
|
|
99
|
-
const
|
|
100
|
-
|
|
99
|
+
const params = new URLSearchParams({ sort: "-created_at" });
|
|
100
|
+
if (options.cursor !== void 0) params.set("page[cursor]", options.cursor);
|
|
101
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}?${params.toString()}`));
|
|
101
102
|
}
|
|
102
103
|
/**
|
|
103
104
|
* Iterate over all deployments across all pages.
|
|
@@ -112,11 +113,15 @@ var DeploymentsCollection = class extends BaseCollection {
|
|
|
112
113
|
* const deployments = await forge.server(123).site(456).deployments.all().toArray();
|
|
113
114
|
* ```
|
|
114
115
|
*/
|
|
115
|
-
all(
|
|
116
|
-
return new AsyncPaginatedIterator((
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
all() {
|
|
117
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
118
|
+
const params = "?sort=-created_at" + (cursor !== null ? `&page[cursor]=${cursor}` : "");
|
|
119
|
+
const response = await this.client.get(`${this.basePath}${params}`);
|
|
120
|
+
return {
|
|
121
|
+
items: unwrapListDocument$1(response),
|
|
122
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
123
|
+
};
|
|
124
|
+
});
|
|
120
125
|
}
|
|
121
126
|
/**
|
|
122
127
|
* Get a specific deployment.
|
|
@@ -127,7 +132,7 @@ var DeploymentsCollection = class extends BaseCollection {
|
|
|
127
132
|
* ```
|
|
128
133
|
*/
|
|
129
134
|
async get(deploymentId) {
|
|
130
|
-
return (await this.client.get(`${this.basePath}/${deploymentId}`))
|
|
135
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${deploymentId}`));
|
|
131
136
|
}
|
|
132
137
|
/**
|
|
133
138
|
* Get the output of a deployment.
|
|
@@ -138,7 +143,7 @@ var DeploymentsCollection = class extends BaseCollection {
|
|
|
138
143
|
* ```
|
|
139
144
|
*/
|
|
140
145
|
async output(deploymentId) {
|
|
141
|
-
return this.client.get(`${this.basePath}/${deploymentId}/output`);
|
|
146
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${deploymentId}/output`)).output;
|
|
142
147
|
}
|
|
143
148
|
/**
|
|
144
149
|
* Get the deployment script.
|
|
@@ -149,7 +154,7 @@ var DeploymentsCollection = class extends BaseCollection {
|
|
|
149
154
|
* ```
|
|
150
155
|
*/
|
|
151
156
|
async script() {
|
|
152
|
-
return this.client.get(`/servers/${this.serverId}/sites/${this.siteId}/
|
|
157
|
+
return unwrapDocument$1(await this.client.get(`/orgs/${this.orgSlug}/servers/${this.serverId}/sites/${this.siteId}/deployments/script`)).content;
|
|
153
158
|
}
|
|
154
159
|
/**
|
|
155
160
|
* Update the deployment script.
|
|
@@ -160,120 +165,77 @@ var DeploymentsCollection = class extends BaseCollection {
|
|
|
160
165
|
* ```
|
|
161
166
|
*/
|
|
162
167
|
async updateScript(content) {
|
|
163
|
-
await this.client.put(`/servers/${this.serverId}/sites/${this.siteId}/
|
|
168
|
+
await this.client.put(`/orgs/${this.orgSlug}/servers/${this.serverId}/sites/${this.siteId}/deployments/script`, { content });
|
|
164
169
|
}
|
|
165
170
|
};
|
|
166
171
|
/**
|
|
167
|
-
*
|
|
172
|
+
* SSL certificates for a site, accessed per-domain.
|
|
173
|
+
*
|
|
174
|
+
* In v2, certificates are a singular sub-resource of a domain:
|
|
175
|
+
* `/orgs/{org}/servers/{server}/sites/{site}/domains/{domain}/certificate`
|
|
168
176
|
*
|
|
169
177
|
* Access via `forge.server(id).site(id).certificates`.
|
|
170
178
|
*
|
|
171
179
|
* @example
|
|
172
180
|
* ```ts
|
|
173
|
-
* const
|
|
181
|
+
* const cert = await forge.server(123).site(456).certificates.get(789);
|
|
174
182
|
* ```
|
|
175
183
|
*/
|
|
176
184
|
var CertificatesCollection = class extends BaseCollection {
|
|
177
185
|
/** @internal */
|
|
178
|
-
constructor(client, serverId, siteId) {
|
|
179
|
-
super(client);
|
|
186
|
+
constructor(client, orgSlug, serverId, siteId) {
|
|
187
|
+
super(client, orgSlug);
|
|
180
188
|
this.serverId = serverId;
|
|
181
189
|
this.siteId = siteId;
|
|
182
190
|
}
|
|
183
|
-
|
|
184
|
-
return `/servers/${this.serverId}/sites/${this.siteId}/
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* List certificates for this site.
|
|
188
|
-
*
|
|
189
|
-
* @example
|
|
190
|
-
* ```ts
|
|
191
|
-
* const certs = await forge.server(123).site(456).certificates.list();
|
|
192
|
-
*
|
|
193
|
-
* // Fetch a specific page:
|
|
194
|
-
* const page2 = await forge.server(123).site(456).certificates.list({ page: 2 });
|
|
195
|
-
* ```
|
|
196
|
-
*/
|
|
197
|
-
async list(options = {}) {
|
|
198
|
-
const query = options.page !== void 0 ? `?page=${options.page}` : "";
|
|
199
|
-
return (await this.client.get(`${this.basePath}${query}`)).certificates;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Iterate over all certificates across all pages.
|
|
203
|
-
*
|
|
204
|
-
* @example
|
|
205
|
-
* ```ts
|
|
206
|
-
* for await (const cert of forge.server(123).site(456).certificates.all()) {
|
|
207
|
-
* console.log(cert);
|
|
208
|
-
* }
|
|
209
|
-
*
|
|
210
|
-
* // Or collect all at once:
|
|
211
|
-
* const certs = await forge.server(123).site(456).certificates.all().toArray();
|
|
212
|
-
* ```
|
|
213
|
-
*/
|
|
214
|
-
all(options = {}) {
|
|
215
|
-
return new AsyncPaginatedIterator((page) => this.list({
|
|
216
|
-
...options,
|
|
217
|
-
page
|
|
218
|
-
}));
|
|
191
|
+
domainPath(domainId) {
|
|
192
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/sites/${this.siteId}/domains/${domainId}/certificate`;
|
|
219
193
|
}
|
|
220
194
|
/**
|
|
221
|
-
* Get a
|
|
195
|
+
* Get the certificate for a domain.
|
|
222
196
|
*
|
|
223
197
|
* @example
|
|
224
198
|
* ```ts
|
|
225
199
|
* const cert = await forge.server(123).site(456).certificates.get(789);
|
|
226
200
|
* ```
|
|
227
201
|
*/
|
|
228
|
-
async get(
|
|
229
|
-
return (await this.client.get(
|
|
202
|
+
async get(domainId) {
|
|
203
|
+
return unwrapDocument$1(await this.client.get(this.domainPath(domainId)));
|
|
230
204
|
}
|
|
231
205
|
/**
|
|
232
|
-
* Create a
|
|
206
|
+
* Create a certificate for a domain.
|
|
233
207
|
*
|
|
234
208
|
* @example
|
|
235
209
|
* ```ts
|
|
236
|
-
* const cert = await forge.server(123).site(456).certificates.create({
|
|
237
|
-
* type: '
|
|
238
|
-
* domain: 'example.com',
|
|
210
|
+
* const cert = await forge.server(123).site(456).certificates.create(789, {
|
|
211
|
+
* type: 'letsencrypt',
|
|
239
212
|
* });
|
|
240
213
|
* ```
|
|
241
214
|
*/
|
|
242
|
-
async create(data) {
|
|
243
|
-
return (await this.client.post(this.
|
|
215
|
+
async create(domainId, data) {
|
|
216
|
+
return unwrapDocument$1(await this.client.post(this.domainPath(domainId), data));
|
|
244
217
|
}
|
|
245
218
|
/**
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
* @example
|
|
249
|
-
* ```ts
|
|
250
|
-
* await forge.server(123).site(456).certificates.letsEncrypt(['example.com', 'www.example.com']);
|
|
251
|
-
* ```
|
|
252
|
-
*/
|
|
253
|
-
async letsEncrypt(domains) {
|
|
254
|
-
return (await this.client.post(`${this.basePath}/letsencrypt`, { domains })).certificate;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Delete a certificate.
|
|
219
|
+
* Delete the certificate for a domain.
|
|
258
220
|
*
|
|
259
221
|
* @example
|
|
260
222
|
* ```ts
|
|
261
223
|
* await forge.server(123).site(456).certificates.delete(789);
|
|
262
224
|
* ```
|
|
263
225
|
*/
|
|
264
|
-
async delete(
|
|
265
|
-
await this.client.delete(
|
|
226
|
+
async delete(domainId) {
|
|
227
|
+
await this.client.delete(this.domainPath(domainId));
|
|
266
228
|
}
|
|
267
229
|
/**
|
|
268
|
-
* Activate a
|
|
230
|
+
* Activate the certificate for a domain.
|
|
269
231
|
*
|
|
270
232
|
* @example
|
|
271
233
|
* ```ts
|
|
272
234
|
* await forge.server(123).site(456).certificates.activate(789);
|
|
273
235
|
* ```
|
|
274
236
|
*/
|
|
275
|
-
async activate(
|
|
276
|
-
await this.client.post(`${this.
|
|
237
|
+
async activate(domainId) {
|
|
238
|
+
await this.client.post(`${this.domainPath(domainId)}/actions`, { action: "activate" });
|
|
277
239
|
}
|
|
278
240
|
};
|
|
279
241
|
/**
|
|
@@ -288,13 +250,13 @@ var CertificatesCollection = class extends BaseCollection {
|
|
|
288
250
|
*/
|
|
289
251
|
var CommandsCollection = class extends BaseCollection {
|
|
290
252
|
/** @internal */
|
|
291
|
-
constructor(client, serverId, siteId) {
|
|
292
|
-
super(client);
|
|
253
|
+
constructor(client, orgSlug, serverId, siteId) {
|
|
254
|
+
super(client, orgSlug);
|
|
293
255
|
this.serverId = serverId;
|
|
294
256
|
this.siteId = siteId;
|
|
295
257
|
}
|
|
296
258
|
get basePath() {
|
|
297
|
-
return `/servers/${this.serverId}/sites/${this.siteId}/commands`;
|
|
259
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/sites/${this.siteId}/commands`;
|
|
298
260
|
}
|
|
299
261
|
/**
|
|
300
262
|
* List commands run on this site.
|
|
@@ -303,13 +265,13 @@ var CommandsCollection = class extends BaseCollection {
|
|
|
303
265
|
* ```ts
|
|
304
266
|
* const commands = await forge.server(123).site(456).commands.list();
|
|
305
267
|
*
|
|
306
|
-
* // Fetch a specific page:
|
|
307
|
-
* const page2 = await forge.server(123).site(456).commands.list({
|
|
268
|
+
* // Fetch a specific cursor page:
|
|
269
|
+
* const page2 = await forge.server(123).site(456).commands.list({ cursor: 'next-cursor-value' });
|
|
308
270
|
* ```
|
|
309
271
|
*/
|
|
310
272
|
async list(options = {}) {
|
|
311
|
-
const query = options.
|
|
312
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
273
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
274
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
313
275
|
}
|
|
314
276
|
/**
|
|
315
277
|
* Iterate over all commands across all pages.
|
|
@@ -324,11 +286,15 @@ var CommandsCollection = class extends BaseCollection {
|
|
|
324
286
|
* const commands = await forge.server(123).site(456).commands.all().toArray();
|
|
325
287
|
* ```
|
|
326
288
|
*/
|
|
327
|
-
all(
|
|
328
|
-
return new AsyncPaginatedIterator((
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
289
|
+
all() {
|
|
290
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
291
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
292
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
293
|
+
return {
|
|
294
|
+
items: unwrapListDocument$1(response),
|
|
295
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
296
|
+
};
|
|
297
|
+
});
|
|
332
298
|
}
|
|
333
299
|
/**
|
|
334
300
|
* Get a specific command.
|
|
@@ -339,7 +305,7 @@ var CommandsCollection = class extends BaseCollection {
|
|
|
339
305
|
* ```
|
|
340
306
|
*/
|
|
341
307
|
async get(commandId) {
|
|
342
|
-
return (await this.client.get(`${this.basePath}/${commandId}`))
|
|
308
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${commandId}`));
|
|
343
309
|
}
|
|
344
310
|
/**
|
|
345
311
|
* Run a command on this site.
|
|
@@ -352,7 +318,7 @@ var CommandsCollection = class extends BaseCollection {
|
|
|
352
318
|
* ```
|
|
353
319
|
*/
|
|
354
320
|
async create(data) {
|
|
355
|
-
return (await this.client.post(this.basePath, data))
|
|
321
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
356
322
|
}
|
|
357
323
|
};
|
|
358
324
|
/**
|
|
@@ -367,13 +333,13 @@ var CommandsCollection = class extends BaseCollection {
|
|
|
367
333
|
*/
|
|
368
334
|
var SecurityRulesCollection = class extends BaseCollection {
|
|
369
335
|
/** @internal */
|
|
370
|
-
constructor(client, serverId, siteId) {
|
|
371
|
-
super(client);
|
|
336
|
+
constructor(client, orgSlug, serverId, siteId) {
|
|
337
|
+
super(client, orgSlug);
|
|
372
338
|
this.serverId = serverId;
|
|
373
339
|
this.siteId = siteId;
|
|
374
340
|
}
|
|
375
341
|
get basePath() {
|
|
376
|
-
return `/servers/${this.serverId}/sites/${this.siteId}/security-rules`;
|
|
342
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/sites/${this.siteId}/security-rules`;
|
|
377
343
|
}
|
|
378
344
|
/**
|
|
379
345
|
* List security rules on this site.
|
|
@@ -382,13 +348,13 @@ var SecurityRulesCollection = class extends BaseCollection {
|
|
|
382
348
|
* ```ts
|
|
383
349
|
* const rules = await forge.server(123).site(456).securityRules.list();
|
|
384
350
|
*
|
|
385
|
-
* // Fetch a specific page:
|
|
386
|
-
* const page2 = await forge.server(123).site(456).securityRules.list({
|
|
351
|
+
* // Fetch a specific cursor page:
|
|
352
|
+
* const page2 = await forge.server(123).site(456).securityRules.list({ cursor: 'next-cursor-value' });
|
|
387
353
|
* ```
|
|
388
354
|
*/
|
|
389
355
|
async list(options = {}) {
|
|
390
|
-
const query = options.
|
|
391
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
356
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
357
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
392
358
|
}
|
|
393
359
|
/**
|
|
394
360
|
* Iterate over all security rules across all pages.
|
|
@@ -403,11 +369,15 @@ var SecurityRulesCollection = class extends BaseCollection {
|
|
|
403
369
|
* const rules = await forge.server(123).site(456).securityRules.all().toArray();
|
|
404
370
|
* ```
|
|
405
371
|
*/
|
|
406
|
-
all(
|
|
407
|
-
return new AsyncPaginatedIterator((
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
372
|
+
all() {
|
|
373
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
374
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
375
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
376
|
+
return {
|
|
377
|
+
items: unwrapListDocument$1(response),
|
|
378
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
379
|
+
};
|
|
380
|
+
});
|
|
411
381
|
}
|
|
412
382
|
/**
|
|
413
383
|
* Get a specific security rule.
|
|
@@ -418,7 +388,7 @@ var SecurityRulesCollection = class extends BaseCollection {
|
|
|
418
388
|
* ```
|
|
419
389
|
*/
|
|
420
390
|
async get(ruleId) {
|
|
421
|
-
return (await this.client.get(`${this.basePath}/${ruleId}`))
|
|
391
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${ruleId}`));
|
|
422
392
|
}
|
|
423
393
|
/**
|
|
424
394
|
* Create a new security rule.
|
|
@@ -433,7 +403,7 @@ var SecurityRulesCollection = class extends BaseCollection {
|
|
|
433
403
|
* ```
|
|
434
404
|
*/
|
|
435
405
|
async create(data) {
|
|
436
|
-
return (await this.client.post(this.basePath, data))
|
|
406
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
437
407
|
}
|
|
438
408
|
/**
|
|
439
409
|
* Delete a security rule.
|
|
@@ -459,13 +429,13 @@ var SecurityRulesCollection = class extends BaseCollection {
|
|
|
459
429
|
*/
|
|
460
430
|
var RedirectRulesCollection = class extends BaseCollection {
|
|
461
431
|
/** @internal */
|
|
462
|
-
constructor(client, serverId, siteId) {
|
|
463
|
-
super(client);
|
|
432
|
+
constructor(client, orgSlug, serverId, siteId) {
|
|
433
|
+
super(client, orgSlug);
|
|
464
434
|
this.serverId = serverId;
|
|
465
435
|
this.siteId = siteId;
|
|
466
436
|
}
|
|
467
437
|
get basePath() {
|
|
468
|
-
return `/servers/${this.serverId}/sites/${this.siteId}/redirect-rules`;
|
|
438
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/sites/${this.siteId}/redirect-rules`;
|
|
469
439
|
}
|
|
470
440
|
/**
|
|
471
441
|
* List redirect rules on this site.
|
|
@@ -474,13 +444,13 @@ var RedirectRulesCollection = class extends BaseCollection {
|
|
|
474
444
|
* ```ts
|
|
475
445
|
* const rules = await forge.server(123).site(456).redirectRules.list();
|
|
476
446
|
*
|
|
477
|
-
* // Fetch a specific page:
|
|
478
|
-
* const page2 = await forge.server(123).site(456).redirectRules.list({
|
|
447
|
+
* // Fetch a specific cursor page:
|
|
448
|
+
* const page2 = await forge.server(123).site(456).redirectRules.list({ cursor: 'next-cursor-value' });
|
|
479
449
|
* ```
|
|
480
450
|
*/
|
|
481
451
|
async list(options = {}) {
|
|
482
|
-
const query = options.
|
|
483
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
452
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
453
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
484
454
|
}
|
|
485
455
|
/**
|
|
486
456
|
* Iterate over all redirect rules across all pages.
|
|
@@ -495,11 +465,15 @@ var RedirectRulesCollection = class extends BaseCollection {
|
|
|
495
465
|
* const rules = await forge.server(123).site(456).redirectRules.all().toArray();
|
|
496
466
|
* ```
|
|
497
467
|
*/
|
|
498
|
-
all(
|
|
499
|
-
return new AsyncPaginatedIterator((
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
468
|
+
all() {
|
|
469
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
470
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
471
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
472
|
+
return {
|
|
473
|
+
items: unwrapListDocument$1(response),
|
|
474
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
475
|
+
};
|
|
476
|
+
});
|
|
503
477
|
}
|
|
504
478
|
/**
|
|
505
479
|
* Get a specific redirect rule.
|
|
@@ -510,7 +484,7 @@ var RedirectRulesCollection = class extends BaseCollection {
|
|
|
510
484
|
* ```
|
|
511
485
|
*/
|
|
512
486
|
async get(ruleId) {
|
|
513
|
-
return (await this.client.get(`${this.basePath}/${ruleId}`))
|
|
487
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${ruleId}`));
|
|
514
488
|
}
|
|
515
489
|
/**
|
|
516
490
|
* Create a new redirect rule.
|
|
@@ -525,7 +499,7 @@ var RedirectRulesCollection = class extends BaseCollection {
|
|
|
525
499
|
* ```
|
|
526
500
|
*/
|
|
527
501
|
async create(data) {
|
|
528
|
-
return (await this.client.post(this.basePath, data))
|
|
502
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
529
503
|
}
|
|
530
504
|
/**
|
|
531
505
|
* Delete a redirect rule.
|
|
@@ -551,12 +525,12 @@ var RedirectRulesCollection = class extends BaseCollection {
|
|
|
551
525
|
*/
|
|
552
526
|
var SitesCollection = class extends BaseCollection {
|
|
553
527
|
/** @internal */
|
|
554
|
-
constructor(client, serverId) {
|
|
555
|
-
super(client);
|
|
528
|
+
constructor(client, orgSlug, serverId) {
|
|
529
|
+
super(client, orgSlug);
|
|
556
530
|
this.serverId = serverId;
|
|
557
531
|
}
|
|
558
532
|
get basePath() {
|
|
559
|
-
return `/servers/${this.serverId}/sites`;
|
|
533
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/sites`;
|
|
560
534
|
}
|
|
561
535
|
/**
|
|
562
536
|
* List sites on this server.
|
|
@@ -565,13 +539,13 @@ var SitesCollection = class extends BaseCollection {
|
|
|
565
539
|
* ```ts
|
|
566
540
|
* const sites = await forge.server(123).sites.list();
|
|
567
541
|
*
|
|
568
|
-
* // Fetch a specific page:
|
|
569
|
-
* const page2 = await forge.server(123).sites.list({
|
|
542
|
+
* // Fetch a specific cursor page:
|
|
543
|
+
* const page2 = await forge.server(123).sites.list({ cursor: 'next-cursor-value' });
|
|
570
544
|
* ```
|
|
571
545
|
*/
|
|
572
546
|
async list(options = {}) {
|
|
573
|
-
const query = options.
|
|
574
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
547
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
548
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
575
549
|
}
|
|
576
550
|
/**
|
|
577
551
|
* Iterate over all sites across all pages.
|
|
@@ -586,11 +560,15 @@ var SitesCollection = class extends BaseCollection {
|
|
|
586
560
|
* const sites = await forge.server(123).sites.all().toArray();
|
|
587
561
|
* ```
|
|
588
562
|
*/
|
|
589
|
-
all(
|
|
590
|
-
return new AsyncPaginatedIterator((
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
563
|
+
all() {
|
|
564
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
565
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
566
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
567
|
+
return {
|
|
568
|
+
items: unwrapListDocument$1(response),
|
|
569
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
570
|
+
};
|
|
571
|
+
});
|
|
594
572
|
}
|
|
595
573
|
/**
|
|
596
574
|
* Get a specific site by ID.
|
|
@@ -601,7 +579,7 @@ var SitesCollection = class extends BaseCollection {
|
|
|
601
579
|
* ```
|
|
602
580
|
*/
|
|
603
581
|
async get(siteId) {
|
|
604
|
-
return (await this.client.get(
|
|
582
|
+
return unwrapDocument$1(await this.client.get(`/orgs/${this.orgSlug}/sites/${siteId}`));
|
|
605
583
|
}
|
|
606
584
|
/**
|
|
607
585
|
* Create a new site on this server.
|
|
@@ -609,14 +587,14 @@ var SitesCollection = class extends BaseCollection {
|
|
|
609
587
|
* @example
|
|
610
588
|
* ```ts
|
|
611
589
|
* const site = await forge.server(123).sites.create({
|
|
612
|
-
*
|
|
613
|
-
*
|
|
590
|
+
* type: 'php',
|
|
591
|
+
* name: 'example.com',
|
|
614
592
|
* directory: '/public',
|
|
615
593
|
* });
|
|
616
594
|
* ```
|
|
617
595
|
*/
|
|
618
596
|
async create(data) {
|
|
619
|
-
return (await this.client.post(this.basePath, data))
|
|
597
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
620
598
|
}
|
|
621
599
|
/**
|
|
622
600
|
* Update a site.
|
|
@@ -627,7 +605,7 @@ var SitesCollection = class extends BaseCollection {
|
|
|
627
605
|
* ```
|
|
628
606
|
*/
|
|
629
607
|
async update(siteId, data) {
|
|
630
|
-
return (await this.client.put(`${this.basePath}/${siteId}`, data))
|
|
608
|
+
return unwrapDocument$1(await this.client.put(`${this.basePath}/${siteId}`, data));
|
|
631
609
|
}
|
|
632
610
|
/**
|
|
633
611
|
* Delete a site.
|
|
@@ -699,20 +677,20 @@ var SiteResource = class extends BaseCollection {
|
|
|
699
677
|
/** Redirect rules for this site. */
|
|
700
678
|
redirectRules;
|
|
701
679
|
/** @internal */
|
|
702
|
-
constructor(client, serverId, siteId) {
|
|
703
|
-
super(client);
|
|
680
|
+
constructor(client, orgSlug, serverId, siteId) {
|
|
681
|
+
super(client, orgSlug);
|
|
704
682
|
this.serverId = serverId;
|
|
705
683
|
this.siteId = siteId;
|
|
706
|
-
this.deployments = new DeploymentsCollection(client, serverId, siteId);
|
|
707
|
-
this.certificates = new CertificatesCollection(client, serverId, siteId);
|
|
708
|
-
this.env = new SiteEnvResource(client, serverId, siteId);
|
|
709
|
-
this.nginx = new SiteNginxResource(client, serverId, siteId);
|
|
710
|
-
this.commands = new CommandsCollection(client, serverId, siteId);
|
|
711
|
-
this.securityRules = new SecurityRulesCollection(client, serverId, siteId);
|
|
712
|
-
this.redirectRules = new RedirectRulesCollection(client, serverId, siteId);
|
|
684
|
+
this.deployments = new DeploymentsCollection(client, orgSlug, serverId, siteId);
|
|
685
|
+
this.certificates = new CertificatesCollection(client, orgSlug, serverId, siteId);
|
|
686
|
+
this.env = new SiteEnvResource(client, orgSlug, serverId, siteId);
|
|
687
|
+
this.nginx = new SiteNginxResource(client, orgSlug, serverId, siteId);
|
|
688
|
+
this.commands = new CommandsCollection(client, orgSlug, serverId, siteId);
|
|
689
|
+
this.securityRules = new SecurityRulesCollection(client, orgSlug, serverId, siteId);
|
|
690
|
+
this.redirectRules = new RedirectRulesCollection(client, orgSlug, serverId, siteId);
|
|
713
691
|
}
|
|
714
692
|
get basePath() {
|
|
715
|
-
return `/servers/${this.serverId}/sites/${this.siteId}`;
|
|
693
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/sites/${this.siteId}`;
|
|
716
694
|
}
|
|
717
695
|
/**
|
|
718
696
|
* Get this site's details.
|
|
@@ -723,7 +701,7 @@ var SiteResource = class extends BaseCollection {
|
|
|
723
701
|
* ```
|
|
724
702
|
*/
|
|
725
703
|
async get() {
|
|
726
|
-
return (await this.client.get(this.
|
|
704
|
+
return unwrapDocument$1(await this.client.get(`/orgs/${this.orgSlug}/sites/${this.siteId}`));
|
|
727
705
|
}
|
|
728
706
|
/**
|
|
729
707
|
* Deploy this site.
|
|
@@ -734,7 +712,7 @@ var SiteResource = class extends BaseCollection {
|
|
|
734
712
|
* ```
|
|
735
713
|
*/
|
|
736
714
|
async deploy() {
|
|
737
|
-
await this.client.post(`${this.basePath}/
|
|
715
|
+
await this.client.post(`${this.basePath}/deployments/deploy`);
|
|
738
716
|
}
|
|
739
717
|
/**
|
|
740
718
|
* Delete this site.
|
|
@@ -759,13 +737,13 @@ var SiteResource = class extends BaseCollection {
|
|
|
759
737
|
*/
|
|
760
738
|
var SiteEnvResource = class extends BaseCollection {
|
|
761
739
|
/** @internal */
|
|
762
|
-
constructor(client, serverId, siteId) {
|
|
763
|
-
super(client);
|
|
740
|
+
constructor(client, orgSlug, serverId, siteId) {
|
|
741
|
+
super(client, orgSlug);
|
|
764
742
|
this.serverId = serverId;
|
|
765
743
|
this.siteId = siteId;
|
|
766
744
|
}
|
|
767
745
|
get basePath() {
|
|
768
|
-
return `/servers/${this.serverId}/sites/${this.siteId}/
|
|
746
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/sites/${this.siteId}/environment`;
|
|
769
747
|
}
|
|
770
748
|
/**
|
|
771
749
|
* Get the environment file content.
|
|
@@ -795,13 +773,13 @@ var SiteEnvResource = class extends BaseCollection {
|
|
|
795
773
|
*/
|
|
796
774
|
var SiteNginxResource = class extends BaseCollection {
|
|
797
775
|
/** @internal */
|
|
798
|
-
constructor(client, serverId, siteId) {
|
|
799
|
-
super(client);
|
|
776
|
+
constructor(client, orgSlug, serverId, siteId) {
|
|
777
|
+
super(client, orgSlug);
|
|
800
778
|
this.serverId = serverId;
|
|
801
779
|
this.siteId = siteId;
|
|
802
780
|
}
|
|
803
781
|
get basePath() {
|
|
804
|
-
return `/servers/${this.serverId}/sites/${this.siteId}/nginx`;
|
|
782
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/sites/${this.siteId}/nginx`;
|
|
805
783
|
}
|
|
806
784
|
/**
|
|
807
785
|
* Get the Nginx configuration.
|
|
@@ -832,12 +810,12 @@ var SiteNginxResource = class extends BaseCollection {
|
|
|
832
810
|
*/
|
|
833
811
|
var DatabasesCollection = class extends BaseCollection {
|
|
834
812
|
/** @internal */
|
|
835
|
-
constructor(client, serverId) {
|
|
836
|
-
super(client);
|
|
813
|
+
constructor(client, orgSlug, serverId) {
|
|
814
|
+
super(client, orgSlug);
|
|
837
815
|
this.serverId = serverId;
|
|
838
816
|
}
|
|
839
817
|
get basePath() {
|
|
840
|
-
return `/servers/${this.serverId}/
|
|
818
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/database/schemas`;
|
|
841
819
|
}
|
|
842
820
|
/**
|
|
843
821
|
* List databases on this server.
|
|
@@ -846,13 +824,13 @@ var DatabasesCollection = class extends BaseCollection {
|
|
|
846
824
|
* ```ts
|
|
847
825
|
* const dbs = await forge.server(123).databases.list();
|
|
848
826
|
*
|
|
849
|
-
* // Fetch a specific page:
|
|
850
|
-
* const page2 = await forge.server(123).databases.list({
|
|
827
|
+
* // Fetch a specific cursor page:
|
|
828
|
+
* const page2 = await forge.server(123).databases.list({ cursor: 'next-cursor-value' });
|
|
851
829
|
* ```
|
|
852
830
|
*/
|
|
853
831
|
async list(options = {}) {
|
|
854
|
-
const query = options.
|
|
855
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
832
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
833
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
856
834
|
}
|
|
857
835
|
/**
|
|
858
836
|
* Iterate over all databases across all pages.
|
|
@@ -867,11 +845,15 @@ var DatabasesCollection = class extends BaseCollection {
|
|
|
867
845
|
* const dbs = await forge.server(123).databases.all().toArray();
|
|
868
846
|
* ```
|
|
869
847
|
*/
|
|
870
|
-
all(
|
|
871
|
-
return new AsyncPaginatedIterator((
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
848
|
+
all() {
|
|
849
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
850
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
851
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
852
|
+
return {
|
|
853
|
+
items: unwrapListDocument$1(response),
|
|
854
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
855
|
+
};
|
|
856
|
+
});
|
|
875
857
|
}
|
|
876
858
|
/**
|
|
877
859
|
* Get a specific database.
|
|
@@ -882,7 +864,7 @@ var DatabasesCollection = class extends BaseCollection {
|
|
|
882
864
|
* ```
|
|
883
865
|
*/
|
|
884
866
|
async get(databaseId) {
|
|
885
|
-
return (await this.client.get(`${this.basePath}/${databaseId}`))
|
|
867
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${databaseId}`));
|
|
886
868
|
}
|
|
887
869
|
/**
|
|
888
870
|
* Create a new database.
|
|
@@ -897,7 +879,7 @@ var DatabasesCollection = class extends BaseCollection {
|
|
|
897
879
|
* ```
|
|
898
880
|
*/
|
|
899
881
|
async create(data) {
|
|
900
|
-
return (await this.client.post(this.basePath, data))
|
|
882
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
901
883
|
}
|
|
902
884
|
/**
|
|
903
885
|
* Delete a database.
|
|
@@ -923,12 +905,12 @@ var DatabasesCollection = class extends BaseCollection {
|
|
|
923
905
|
*/
|
|
924
906
|
var DatabaseUsersCollection = class extends BaseCollection {
|
|
925
907
|
/** @internal */
|
|
926
|
-
constructor(client, serverId) {
|
|
927
|
-
super(client);
|
|
908
|
+
constructor(client, orgSlug, serverId) {
|
|
909
|
+
super(client, orgSlug);
|
|
928
910
|
this.serverId = serverId;
|
|
929
911
|
}
|
|
930
912
|
get basePath() {
|
|
931
|
-
return `/servers/${this.serverId}/database
|
|
913
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/database/users`;
|
|
932
914
|
}
|
|
933
915
|
/**
|
|
934
916
|
* List database users on this server.
|
|
@@ -937,13 +919,13 @@ var DatabaseUsersCollection = class extends BaseCollection {
|
|
|
937
919
|
* ```ts
|
|
938
920
|
* const users = await forge.server(123).databaseUsers.list();
|
|
939
921
|
*
|
|
940
|
-
* // Fetch a specific page:
|
|
941
|
-
* const page2 = await forge.server(123).databaseUsers.list({
|
|
922
|
+
* // Fetch a specific cursor page:
|
|
923
|
+
* const page2 = await forge.server(123).databaseUsers.list({ cursor: 'next-cursor-value' });
|
|
942
924
|
* ```
|
|
943
925
|
*/
|
|
944
926
|
async list(options = {}) {
|
|
945
|
-
const query = options.
|
|
946
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
927
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
928
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
947
929
|
}
|
|
948
930
|
/**
|
|
949
931
|
* Iterate over all database users across all pages.
|
|
@@ -958,11 +940,15 @@ var DatabaseUsersCollection = class extends BaseCollection {
|
|
|
958
940
|
* const users = await forge.server(123).databaseUsers.all().toArray();
|
|
959
941
|
* ```
|
|
960
942
|
*/
|
|
961
|
-
all(
|
|
962
|
-
return new AsyncPaginatedIterator((
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
943
|
+
all() {
|
|
944
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
945
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
946
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
947
|
+
return {
|
|
948
|
+
items: unwrapListDocument$1(response),
|
|
949
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
950
|
+
};
|
|
951
|
+
});
|
|
966
952
|
}
|
|
967
953
|
/**
|
|
968
954
|
* Get a specific database user.
|
|
@@ -973,7 +959,7 @@ var DatabaseUsersCollection = class extends BaseCollection {
|
|
|
973
959
|
* ```
|
|
974
960
|
*/
|
|
975
961
|
async get(userId) {
|
|
976
|
-
return (await this.client.get(`${this.basePath}/${userId}`))
|
|
962
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${userId}`));
|
|
977
963
|
}
|
|
978
964
|
/**
|
|
979
965
|
* Create a new database user.
|
|
@@ -988,7 +974,7 @@ var DatabaseUsersCollection = class extends BaseCollection {
|
|
|
988
974
|
* ```
|
|
989
975
|
*/
|
|
990
976
|
async create(data) {
|
|
991
|
-
return (await this.client.post(this.basePath, data))
|
|
977
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
992
978
|
}
|
|
993
979
|
/**
|
|
994
980
|
* Delete a database user.
|
|
@@ -1014,12 +1000,12 @@ var DatabaseUsersCollection = class extends BaseCollection {
|
|
|
1014
1000
|
*/
|
|
1015
1001
|
var DaemonsCollection = class extends BaseCollection {
|
|
1016
1002
|
/** @internal */
|
|
1017
|
-
constructor(client, serverId) {
|
|
1018
|
-
super(client);
|
|
1003
|
+
constructor(client, orgSlug, serverId) {
|
|
1004
|
+
super(client, orgSlug);
|
|
1019
1005
|
this.serverId = serverId;
|
|
1020
1006
|
}
|
|
1021
1007
|
get basePath() {
|
|
1022
|
-
return `/servers/${this.serverId}/
|
|
1008
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/background-processes`;
|
|
1023
1009
|
}
|
|
1024
1010
|
/**
|
|
1025
1011
|
* List daemons on this server.
|
|
@@ -1028,13 +1014,13 @@ var DaemonsCollection = class extends BaseCollection {
|
|
|
1028
1014
|
* ```ts
|
|
1029
1015
|
* const daemons = await forge.server(123).daemons.list();
|
|
1030
1016
|
*
|
|
1031
|
-
* // Fetch a specific page:
|
|
1032
|
-
* const page2 = await forge.server(123).daemons.list({
|
|
1017
|
+
* // Fetch a specific cursor page:
|
|
1018
|
+
* const page2 = await forge.server(123).daemons.list({ cursor: 'next-cursor-value' });
|
|
1033
1019
|
* ```
|
|
1034
1020
|
*/
|
|
1035
1021
|
async list(options = {}) {
|
|
1036
|
-
const query = options.
|
|
1037
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
1022
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
1023
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
1038
1024
|
}
|
|
1039
1025
|
/**
|
|
1040
1026
|
* Iterate over all daemons across all pages.
|
|
@@ -1049,11 +1035,15 @@ var DaemonsCollection = class extends BaseCollection {
|
|
|
1049
1035
|
* const daemons = await forge.server(123).daemons.all().toArray();
|
|
1050
1036
|
* ```
|
|
1051
1037
|
*/
|
|
1052
|
-
all(
|
|
1053
|
-
return new AsyncPaginatedIterator((
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1038
|
+
all() {
|
|
1039
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
1040
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
1041
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
1042
|
+
return {
|
|
1043
|
+
items: unwrapListDocument$1(response),
|
|
1044
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
1045
|
+
};
|
|
1046
|
+
});
|
|
1057
1047
|
}
|
|
1058
1048
|
/**
|
|
1059
1049
|
* Get a specific daemon.
|
|
@@ -1064,7 +1054,7 @@ var DaemonsCollection = class extends BaseCollection {
|
|
|
1064
1054
|
* ```
|
|
1065
1055
|
*/
|
|
1066
1056
|
async get(daemonId) {
|
|
1067
|
-
return (await this.client.get(`${this.basePath}/${daemonId}`))
|
|
1057
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${daemonId}`));
|
|
1068
1058
|
}
|
|
1069
1059
|
/**
|
|
1070
1060
|
* Create a new daemon.
|
|
@@ -1078,7 +1068,7 @@ var DaemonsCollection = class extends BaseCollection {
|
|
|
1078
1068
|
* ```
|
|
1079
1069
|
*/
|
|
1080
1070
|
async create(data) {
|
|
1081
|
-
return (await this.client.post(this.basePath, data))
|
|
1071
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
1082
1072
|
}
|
|
1083
1073
|
/**
|
|
1084
1074
|
* Delete a daemon.
|
|
@@ -1115,12 +1105,12 @@ var DaemonsCollection = class extends BaseCollection {
|
|
|
1115
1105
|
*/
|
|
1116
1106
|
var BackupsCollection = class extends BaseCollection {
|
|
1117
1107
|
/** @internal */
|
|
1118
|
-
constructor(client, serverId) {
|
|
1119
|
-
super(client);
|
|
1108
|
+
constructor(client, orgSlug, serverId) {
|
|
1109
|
+
super(client, orgSlug);
|
|
1120
1110
|
this.serverId = serverId;
|
|
1121
1111
|
}
|
|
1122
1112
|
get basePath() {
|
|
1123
|
-
return `/servers/${this.serverId}/
|
|
1113
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/database/backups`;
|
|
1124
1114
|
}
|
|
1125
1115
|
/**
|
|
1126
1116
|
* List backup configurations on this server.
|
|
@@ -1129,13 +1119,13 @@ var BackupsCollection = class extends BaseCollection {
|
|
|
1129
1119
|
* ```ts
|
|
1130
1120
|
* const backups = await forge.server(123).backups.list();
|
|
1131
1121
|
*
|
|
1132
|
-
* // Fetch a specific page:
|
|
1133
|
-
* const page2 = await forge.server(123).backups.list({
|
|
1122
|
+
* // Fetch a specific cursor page:
|
|
1123
|
+
* const page2 = await forge.server(123).backups.list({ cursor: 'next-cursor-value' });
|
|
1134
1124
|
* ```
|
|
1135
1125
|
*/
|
|
1136
1126
|
async list(options = {}) {
|
|
1137
|
-
const query = options.
|
|
1138
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
1127
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
1128
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
1139
1129
|
}
|
|
1140
1130
|
/**
|
|
1141
1131
|
* Iterate over all backup configurations across all pages.
|
|
@@ -1150,11 +1140,15 @@ var BackupsCollection = class extends BaseCollection {
|
|
|
1150
1140
|
* const backups = await forge.server(123).backups.all().toArray();
|
|
1151
1141
|
* ```
|
|
1152
1142
|
*/
|
|
1153
|
-
all(
|
|
1154
|
-
return new AsyncPaginatedIterator((
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1143
|
+
all() {
|
|
1144
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
1145
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
1146
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
1147
|
+
return {
|
|
1148
|
+
items: unwrapListDocument$1(response),
|
|
1149
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
1150
|
+
};
|
|
1151
|
+
});
|
|
1158
1152
|
}
|
|
1159
1153
|
/**
|
|
1160
1154
|
* Get a specific backup configuration.
|
|
@@ -1165,7 +1159,7 @@ var BackupsCollection = class extends BaseCollection {
|
|
|
1165
1159
|
* ```
|
|
1166
1160
|
*/
|
|
1167
1161
|
async get(backupId) {
|
|
1168
|
-
return (await this.client.get(`${this.basePath}/${backupId}`))
|
|
1162
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${backupId}`));
|
|
1169
1163
|
}
|
|
1170
1164
|
/**
|
|
1171
1165
|
* Create a new backup configuration.
|
|
@@ -1182,7 +1176,7 @@ var BackupsCollection = class extends BaseCollection {
|
|
|
1182
1176
|
* ```
|
|
1183
1177
|
*/
|
|
1184
1178
|
async create(data) {
|
|
1185
|
-
return (await this.client.post(this.basePath, data))
|
|
1179
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
1186
1180
|
}
|
|
1187
1181
|
/**
|
|
1188
1182
|
* Delete a backup configuration.
|
|
@@ -1208,12 +1202,12 @@ var BackupsCollection = class extends BaseCollection {
|
|
|
1208
1202
|
*/
|
|
1209
1203
|
var ScheduledJobsCollection = class extends BaseCollection {
|
|
1210
1204
|
/** @internal */
|
|
1211
|
-
constructor(client, serverId) {
|
|
1212
|
-
super(client);
|
|
1205
|
+
constructor(client, orgSlug, serverId) {
|
|
1206
|
+
super(client, orgSlug);
|
|
1213
1207
|
this.serverId = serverId;
|
|
1214
1208
|
}
|
|
1215
1209
|
get basePath() {
|
|
1216
|
-
return `/servers/${this.serverId}/jobs`;
|
|
1210
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/scheduled-jobs`;
|
|
1217
1211
|
}
|
|
1218
1212
|
/**
|
|
1219
1213
|
* List scheduled jobs on this server.
|
|
@@ -1222,13 +1216,13 @@ var ScheduledJobsCollection = class extends BaseCollection {
|
|
|
1222
1216
|
* ```ts
|
|
1223
1217
|
* const jobs = await forge.server(123).scheduledJobs.list();
|
|
1224
1218
|
*
|
|
1225
|
-
* // Fetch a specific page:
|
|
1226
|
-
* const page2 = await forge.server(123).scheduledJobs.list({
|
|
1219
|
+
* // Fetch a specific cursor page:
|
|
1220
|
+
* const page2 = await forge.server(123).scheduledJobs.list({ cursor: 'next-cursor-value' });
|
|
1227
1221
|
* ```
|
|
1228
1222
|
*/
|
|
1229
1223
|
async list(options = {}) {
|
|
1230
|
-
const query = options.
|
|
1231
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
1224
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
1225
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
1232
1226
|
}
|
|
1233
1227
|
/**
|
|
1234
1228
|
* Iterate over all scheduled jobs across all pages.
|
|
@@ -1243,11 +1237,15 @@ var ScheduledJobsCollection = class extends BaseCollection {
|
|
|
1243
1237
|
* const jobs = await forge.server(123).scheduledJobs.all().toArray();
|
|
1244
1238
|
* ```
|
|
1245
1239
|
*/
|
|
1246
|
-
all(
|
|
1247
|
-
return new AsyncPaginatedIterator((
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1240
|
+
all() {
|
|
1241
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
1242
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
1243
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
1244
|
+
return {
|
|
1245
|
+
items: unwrapListDocument$1(response),
|
|
1246
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
1247
|
+
};
|
|
1248
|
+
});
|
|
1251
1249
|
}
|
|
1252
1250
|
/**
|
|
1253
1251
|
* Get a specific scheduled job.
|
|
@@ -1258,7 +1256,7 @@ var ScheduledJobsCollection = class extends BaseCollection {
|
|
|
1258
1256
|
* ```
|
|
1259
1257
|
*/
|
|
1260
1258
|
async get(jobId) {
|
|
1261
|
-
return (await this.client.get(`${this.basePath}/${jobId}`))
|
|
1259
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${jobId}`));
|
|
1262
1260
|
}
|
|
1263
1261
|
/**
|
|
1264
1262
|
* Create a new scheduled job.
|
|
@@ -1273,7 +1271,7 @@ var ScheduledJobsCollection = class extends BaseCollection {
|
|
|
1273
1271
|
* ```
|
|
1274
1272
|
*/
|
|
1275
1273
|
async create(data) {
|
|
1276
|
-
return (await this.client.post(this.basePath, data))
|
|
1274
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
1277
1275
|
}
|
|
1278
1276
|
/**
|
|
1279
1277
|
* Delete a scheduled job.
|
|
@@ -1299,12 +1297,12 @@ var ScheduledJobsCollection = class extends BaseCollection {
|
|
|
1299
1297
|
*/
|
|
1300
1298
|
var MonitorsCollection = class extends BaseCollection {
|
|
1301
1299
|
/** @internal */
|
|
1302
|
-
constructor(client, serverId) {
|
|
1303
|
-
super(client);
|
|
1300
|
+
constructor(client, orgSlug, serverId) {
|
|
1301
|
+
super(client, orgSlug);
|
|
1304
1302
|
this.serverId = serverId;
|
|
1305
1303
|
}
|
|
1306
1304
|
get basePath() {
|
|
1307
|
-
return `/servers/${this.serverId}/monitors`;
|
|
1305
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/monitors`;
|
|
1308
1306
|
}
|
|
1309
1307
|
/**
|
|
1310
1308
|
* List monitors on this server.
|
|
@@ -1313,13 +1311,13 @@ var MonitorsCollection = class extends BaseCollection {
|
|
|
1313
1311
|
* ```ts
|
|
1314
1312
|
* const monitors = await forge.server(123).monitors.list();
|
|
1315
1313
|
*
|
|
1316
|
-
* // Fetch a specific page:
|
|
1317
|
-
* const page2 = await forge.server(123).monitors.list({
|
|
1314
|
+
* // Fetch a specific cursor page:
|
|
1315
|
+
* const page2 = await forge.server(123).monitors.list({ cursor: 'next-cursor-value' });
|
|
1318
1316
|
* ```
|
|
1319
1317
|
*/
|
|
1320
1318
|
async list(options = {}) {
|
|
1321
|
-
const query = options.
|
|
1322
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
1319
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
1320
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
1323
1321
|
}
|
|
1324
1322
|
/**
|
|
1325
1323
|
* Iterate over all monitors across all pages.
|
|
@@ -1334,11 +1332,15 @@ var MonitorsCollection = class extends BaseCollection {
|
|
|
1334
1332
|
* const monitors = await forge.server(123).monitors.all().toArray();
|
|
1335
1333
|
* ```
|
|
1336
1334
|
*/
|
|
1337
|
-
all(
|
|
1338
|
-
return new AsyncPaginatedIterator((
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1335
|
+
all() {
|
|
1336
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
1337
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
1338
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
1339
|
+
return {
|
|
1340
|
+
items: unwrapListDocument$1(response),
|
|
1341
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
1342
|
+
};
|
|
1343
|
+
});
|
|
1342
1344
|
}
|
|
1343
1345
|
/**
|
|
1344
1346
|
* Get a specific monitor.
|
|
@@ -1349,7 +1351,7 @@ var MonitorsCollection = class extends BaseCollection {
|
|
|
1349
1351
|
* ```
|
|
1350
1352
|
*/
|
|
1351
1353
|
async get(monitorId) {
|
|
1352
|
-
return (await this.client.get(`${this.basePath}/${monitorId}`))
|
|
1354
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${monitorId}`));
|
|
1353
1355
|
}
|
|
1354
1356
|
/**
|
|
1355
1357
|
* Create a new monitor.
|
|
@@ -1365,7 +1367,7 @@ var MonitorsCollection = class extends BaseCollection {
|
|
|
1365
1367
|
* ```
|
|
1366
1368
|
*/
|
|
1367
1369
|
async create(data) {
|
|
1368
|
-
return (await this.client.post(this.basePath, data))
|
|
1370
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
1369
1371
|
}
|
|
1370
1372
|
/**
|
|
1371
1373
|
* Delete a monitor.
|
|
@@ -1391,12 +1393,12 @@ var MonitorsCollection = class extends BaseCollection {
|
|
|
1391
1393
|
*/
|
|
1392
1394
|
var FirewallRulesCollection = class extends BaseCollection {
|
|
1393
1395
|
/** @internal */
|
|
1394
|
-
constructor(client, serverId) {
|
|
1395
|
-
super(client);
|
|
1396
|
+
constructor(client, orgSlug, serverId) {
|
|
1397
|
+
super(client, orgSlug);
|
|
1396
1398
|
this.serverId = serverId;
|
|
1397
1399
|
}
|
|
1398
1400
|
get basePath() {
|
|
1399
|
-
return `/servers/${this.serverId}/firewall-rules`;
|
|
1401
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/firewall-rules`;
|
|
1400
1402
|
}
|
|
1401
1403
|
/**
|
|
1402
1404
|
* List firewall rules on this server.
|
|
@@ -1405,13 +1407,13 @@ var FirewallRulesCollection = class extends BaseCollection {
|
|
|
1405
1407
|
* ```ts
|
|
1406
1408
|
* const rules = await forge.server(123).firewallRules.list();
|
|
1407
1409
|
*
|
|
1408
|
-
* // Fetch a specific page:
|
|
1409
|
-
* const page2 = await forge.server(123).firewallRules.list({
|
|
1410
|
+
* // Fetch a specific cursor page:
|
|
1411
|
+
* const page2 = await forge.server(123).firewallRules.list({ cursor: 'next-cursor-value' });
|
|
1410
1412
|
* ```
|
|
1411
1413
|
*/
|
|
1412
1414
|
async list(options = {}) {
|
|
1413
|
-
const query = options.
|
|
1414
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
1415
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
1416
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
1415
1417
|
}
|
|
1416
1418
|
/**
|
|
1417
1419
|
* Iterate over all firewall rules across all pages.
|
|
@@ -1426,11 +1428,15 @@ var FirewallRulesCollection = class extends BaseCollection {
|
|
|
1426
1428
|
* const rules = await forge.server(123).firewallRules.all().toArray();
|
|
1427
1429
|
* ```
|
|
1428
1430
|
*/
|
|
1429
|
-
all(
|
|
1430
|
-
return new AsyncPaginatedIterator((
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1431
|
+
all() {
|
|
1432
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
1433
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
1434
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
1435
|
+
return {
|
|
1436
|
+
items: unwrapListDocument$1(response),
|
|
1437
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
1438
|
+
};
|
|
1439
|
+
});
|
|
1434
1440
|
}
|
|
1435
1441
|
/**
|
|
1436
1442
|
* Get a specific firewall rule.
|
|
@@ -1441,7 +1447,7 @@ var FirewallRulesCollection = class extends BaseCollection {
|
|
|
1441
1447
|
* ```
|
|
1442
1448
|
*/
|
|
1443
1449
|
async get(ruleId) {
|
|
1444
|
-
return (await this.client.get(`${this.basePath}/${ruleId}`))
|
|
1450
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${ruleId}`));
|
|
1445
1451
|
}
|
|
1446
1452
|
/**
|
|
1447
1453
|
* Create a new firewall rule.
|
|
@@ -1456,7 +1462,7 @@ var FirewallRulesCollection = class extends BaseCollection {
|
|
|
1456
1462
|
* ```
|
|
1457
1463
|
*/
|
|
1458
1464
|
async create(data) {
|
|
1459
|
-
return (await this.client.post(this.basePath, data))
|
|
1465
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
1460
1466
|
}
|
|
1461
1467
|
/**
|
|
1462
1468
|
* Delete a firewall rule.
|
|
@@ -1482,12 +1488,12 @@ var FirewallRulesCollection = class extends BaseCollection {
|
|
|
1482
1488
|
*/
|
|
1483
1489
|
var SshKeysCollection = class extends BaseCollection {
|
|
1484
1490
|
/** @internal */
|
|
1485
|
-
constructor(client, serverId) {
|
|
1486
|
-
super(client);
|
|
1491
|
+
constructor(client, orgSlug, serverId) {
|
|
1492
|
+
super(client, orgSlug);
|
|
1487
1493
|
this.serverId = serverId;
|
|
1488
1494
|
}
|
|
1489
1495
|
get basePath() {
|
|
1490
|
-
return `/servers/${this.serverId}/keys`;
|
|
1496
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/ssh-keys`;
|
|
1491
1497
|
}
|
|
1492
1498
|
/**
|
|
1493
1499
|
* List SSH keys on this server.
|
|
@@ -1496,13 +1502,13 @@ var SshKeysCollection = class extends BaseCollection {
|
|
|
1496
1502
|
* ```ts
|
|
1497
1503
|
* const keys = await forge.server(123).sshKeys.list();
|
|
1498
1504
|
*
|
|
1499
|
-
* // Fetch a specific page:
|
|
1500
|
-
* const page2 = await forge.server(123).sshKeys.list({
|
|
1505
|
+
* // Fetch a specific cursor page:
|
|
1506
|
+
* const page2 = await forge.server(123).sshKeys.list({ cursor: 'next-cursor-value' });
|
|
1501
1507
|
* ```
|
|
1502
1508
|
*/
|
|
1503
1509
|
async list(options = {}) {
|
|
1504
|
-
const query = options.
|
|
1505
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
1510
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
1511
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
1506
1512
|
}
|
|
1507
1513
|
/**
|
|
1508
1514
|
* Iterate over all SSH keys across all pages.
|
|
@@ -1517,11 +1523,15 @@ var SshKeysCollection = class extends BaseCollection {
|
|
|
1517
1523
|
* const keys = await forge.server(123).sshKeys.all().toArray();
|
|
1518
1524
|
* ```
|
|
1519
1525
|
*/
|
|
1520
|
-
all(
|
|
1521
|
-
return new AsyncPaginatedIterator((
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1526
|
+
all() {
|
|
1527
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
1528
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
1529
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
1530
|
+
return {
|
|
1531
|
+
items: unwrapListDocument$1(response),
|
|
1532
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
1533
|
+
};
|
|
1534
|
+
});
|
|
1525
1535
|
}
|
|
1526
1536
|
/**
|
|
1527
1537
|
* Get a specific SSH key.
|
|
@@ -1532,7 +1542,7 @@ var SshKeysCollection = class extends BaseCollection {
|
|
|
1532
1542
|
* ```
|
|
1533
1543
|
*/
|
|
1534
1544
|
async get(keyId) {
|
|
1535
|
-
return (await this.client.get(`${this.basePath}/${keyId}`))
|
|
1545
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${keyId}`));
|
|
1536
1546
|
}
|
|
1537
1547
|
/**
|
|
1538
1548
|
* Create a new SSH key.
|
|
@@ -1546,7 +1556,7 @@ var SshKeysCollection = class extends BaseCollection {
|
|
|
1546
1556
|
* ```
|
|
1547
1557
|
*/
|
|
1548
1558
|
async create(data) {
|
|
1549
|
-
return (await this.client.post(this.basePath, data))
|
|
1559
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
1550
1560
|
}
|
|
1551
1561
|
/**
|
|
1552
1562
|
* Delete an SSH key.
|
|
@@ -1572,12 +1582,12 @@ var SshKeysCollection = class extends BaseCollection {
|
|
|
1572
1582
|
*/
|
|
1573
1583
|
var NginxTemplatesCollection = class extends BaseCollection {
|
|
1574
1584
|
/** @internal */
|
|
1575
|
-
constructor(client, serverId) {
|
|
1576
|
-
super(client);
|
|
1585
|
+
constructor(client, orgSlug, serverId) {
|
|
1586
|
+
super(client, orgSlug);
|
|
1577
1587
|
this.serverId = serverId;
|
|
1578
1588
|
}
|
|
1579
1589
|
get basePath() {
|
|
1580
|
-
return `/servers/${this.serverId}/nginx/templates`;
|
|
1590
|
+
return `/orgs/${this.orgSlug}/servers/${this.serverId}/nginx/templates`;
|
|
1581
1591
|
}
|
|
1582
1592
|
/**
|
|
1583
1593
|
* List Nginx templates on this server.
|
|
@@ -1586,13 +1596,13 @@ var NginxTemplatesCollection = class extends BaseCollection {
|
|
|
1586
1596
|
* ```ts
|
|
1587
1597
|
* const templates = await forge.server(123).nginxTemplates.list();
|
|
1588
1598
|
*
|
|
1589
|
-
* // Fetch a specific page:
|
|
1590
|
-
* const page2 = await forge.server(123).nginxTemplates.list({
|
|
1599
|
+
* // Fetch a specific cursor page:
|
|
1600
|
+
* const page2 = await forge.server(123).nginxTemplates.list({ cursor: 'next-cursor-value' });
|
|
1591
1601
|
* ```
|
|
1592
1602
|
*/
|
|
1593
1603
|
async list(options = {}) {
|
|
1594
|
-
const query = options.
|
|
1595
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
1604
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
1605
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
1596
1606
|
}
|
|
1597
1607
|
/**
|
|
1598
1608
|
* Iterate over all Nginx templates across all pages.
|
|
@@ -1607,11 +1617,15 @@ var NginxTemplatesCollection = class extends BaseCollection {
|
|
|
1607
1617
|
* const templates = await forge.server(123).nginxTemplates.all().toArray();
|
|
1608
1618
|
* ```
|
|
1609
1619
|
*/
|
|
1610
|
-
all(
|
|
1611
|
-
return new AsyncPaginatedIterator((
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1620
|
+
all() {
|
|
1621
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
1622
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
1623
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
1624
|
+
return {
|
|
1625
|
+
items: unwrapListDocument$1(response),
|
|
1626
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
1627
|
+
};
|
|
1628
|
+
});
|
|
1615
1629
|
}
|
|
1616
1630
|
/**
|
|
1617
1631
|
* Get a specific Nginx template.
|
|
@@ -1622,7 +1636,7 @@ var NginxTemplatesCollection = class extends BaseCollection {
|
|
|
1622
1636
|
* ```
|
|
1623
1637
|
*/
|
|
1624
1638
|
async get(templateId) {
|
|
1625
|
-
return (await this.client.get(`${this.basePath}/${templateId}`))
|
|
1639
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${templateId}`));
|
|
1626
1640
|
}
|
|
1627
1641
|
/**
|
|
1628
1642
|
* Create a new Nginx template.
|
|
@@ -1636,7 +1650,7 @@ var NginxTemplatesCollection = class extends BaseCollection {
|
|
|
1636
1650
|
* ```
|
|
1637
1651
|
*/
|
|
1638
1652
|
async create(data) {
|
|
1639
|
-
return (await this.client.post(this.basePath, data))
|
|
1653
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
1640
1654
|
}
|
|
1641
1655
|
/**
|
|
1642
1656
|
* Update an existing Nginx template.
|
|
@@ -1650,7 +1664,7 @@ var NginxTemplatesCollection = class extends BaseCollection {
|
|
|
1650
1664
|
* ```
|
|
1651
1665
|
*/
|
|
1652
1666
|
async update(templateId, data) {
|
|
1653
|
-
return (await this.client.put(`${this.basePath}/${templateId}`, data))
|
|
1667
|
+
return unwrapDocument$1(await this.client.put(`${this.basePath}/${templateId}`, data));
|
|
1654
1668
|
}
|
|
1655
1669
|
/**
|
|
1656
1670
|
* Delete a Nginx template.
|
|
@@ -1683,8 +1697,8 @@ var NginxTemplatesCollection = class extends BaseCollection {
|
|
|
1683
1697
|
*/
|
|
1684
1698
|
var ServersCollection = class extends BaseCollection {
|
|
1685
1699
|
/** @internal */
|
|
1686
|
-
|
|
1687
|
-
|
|
1700
|
+
get basePath() {
|
|
1701
|
+
return `/orgs/${this.orgSlug}/servers`;
|
|
1688
1702
|
}
|
|
1689
1703
|
/**
|
|
1690
1704
|
* List servers.
|
|
@@ -1693,13 +1707,13 @@ var ServersCollection = class extends BaseCollection {
|
|
|
1693
1707
|
* ```ts
|
|
1694
1708
|
* const servers = await forge.servers.list();
|
|
1695
1709
|
*
|
|
1696
|
-
* // Fetch a specific page:
|
|
1697
|
-
* const page2 = await forge.servers.list({
|
|
1710
|
+
* // Fetch a specific cursor page:
|
|
1711
|
+
* const page2 = await forge.servers.list({ cursor: 'next-cursor-value' });
|
|
1698
1712
|
* ```
|
|
1699
1713
|
*/
|
|
1700
1714
|
async list(options = {}) {
|
|
1701
|
-
const query = options.
|
|
1702
|
-
return (await this.client.get(
|
|
1715
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
1716
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
1703
1717
|
}
|
|
1704
1718
|
/**
|
|
1705
1719
|
* Iterate over all servers across all pages.
|
|
@@ -1714,11 +1728,15 @@ var ServersCollection = class extends BaseCollection {
|
|
|
1714
1728
|
* const servers = await forge.servers.all().toArray();
|
|
1715
1729
|
* ```
|
|
1716
1730
|
*/
|
|
1717
|
-
all(
|
|
1718
|
-
return new AsyncPaginatedIterator((
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1731
|
+
all() {
|
|
1732
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
1733
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
1734
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
1735
|
+
return {
|
|
1736
|
+
items: unwrapListDocument$1(response),
|
|
1737
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
1738
|
+
};
|
|
1739
|
+
});
|
|
1722
1740
|
}
|
|
1723
1741
|
/**
|
|
1724
1742
|
* Get a specific server by ID.
|
|
@@ -1729,7 +1747,7 @@ var ServersCollection = class extends BaseCollection {
|
|
|
1729
1747
|
* ```
|
|
1730
1748
|
*/
|
|
1731
1749
|
async get(serverId) {
|
|
1732
|
-
return (await this.client.get(
|
|
1750
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${serverId}`));
|
|
1733
1751
|
}
|
|
1734
1752
|
/**
|
|
1735
1753
|
* Create a new server.
|
|
@@ -1747,7 +1765,7 @@ var ServersCollection = class extends BaseCollection {
|
|
|
1747
1765
|
* ```
|
|
1748
1766
|
*/
|
|
1749
1767
|
async create(data) {
|
|
1750
|
-
return (await this.client.post(
|
|
1768
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
1751
1769
|
}
|
|
1752
1770
|
/**
|
|
1753
1771
|
* Update a server.
|
|
@@ -1758,7 +1776,7 @@ var ServersCollection = class extends BaseCollection {
|
|
|
1758
1776
|
* ```
|
|
1759
1777
|
*/
|
|
1760
1778
|
async update(serverId, data) {
|
|
1761
|
-
return (await this.client.put(
|
|
1779
|
+
return unwrapDocument$1(await this.client.put(`${this.basePath}/${serverId}`, data));
|
|
1762
1780
|
}
|
|
1763
1781
|
/**
|
|
1764
1782
|
* Delete a server.
|
|
@@ -1769,7 +1787,7 @@ var ServersCollection = class extends BaseCollection {
|
|
|
1769
1787
|
* ```
|
|
1770
1788
|
*/
|
|
1771
1789
|
async delete(serverId) {
|
|
1772
|
-
await this.client.delete(
|
|
1790
|
+
await this.client.delete(`${this.basePath}/${serverId}`);
|
|
1773
1791
|
}
|
|
1774
1792
|
/**
|
|
1775
1793
|
* Reboot a server.
|
|
@@ -1780,7 +1798,7 @@ var ServersCollection = class extends BaseCollection {
|
|
|
1780
1798
|
* ```
|
|
1781
1799
|
*/
|
|
1782
1800
|
async reboot(serverId) {
|
|
1783
|
-
await this.client.post(
|
|
1801
|
+
await this.client.post(`${this.basePath}/${serverId}/reboot`);
|
|
1784
1802
|
}
|
|
1785
1803
|
/**
|
|
1786
1804
|
* Find servers by name using case-insensitive partial matching.
|
|
@@ -1852,19 +1870,19 @@ var ServerResource = class extends BaseCollection {
|
|
|
1852
1870
|
/** Nginx templates on this server. */
|
|
1853
1871
|
nginxTemplates;
|
|
1854
1872
|
/** @internal */
|
|
1855
|
-
constructor(client, serverId) {
|
|
1856
|
-
super(client);
|
|
1873
|
+
constructor(client, orgSlug, serverId) {
|
|
1874
|
+
super(client, orgSlug);
|
|
1857
1875
|
this.serverId = serverId;
|
|
1858
|
-
this.sites = new SitesCollection(client, serverId);
|
|
1859
|
-
this.databases = new DatabasesCollection(client, serverId);
|
|
1860
|
-
this.databaseUsers = new DatabaseUsersCollection(client, serverId);
|
|
1861
|
-
this.daemons = new DaemonsCollection(client, serverId);
|
|
1862
|
-
this.backups = new BackupsCollection(client, serverId);
|
|
1863
|
-
this.scheduledJobs = new ScheduledJobsCollection(client, serverId);
|
|
1864
|
-
this.monitors = new MonitorsCollection(client, serverId);
|
|
1865
|
-
this.firewallRules = new FirewallRulesCollection(client, serverId);
|
|
1866
|
-
this.sshKeys = new SshKeysCollection(client, serverId);
|
|
1867
|
-
this.nginxTemplates = new NginxTemplatesCollection(client, serverId);
|
|
1876
|
+
this.sites = new SitesCollection(client, orgSlug, serverId);
|
|
1877
|
+
this.databases = new DatabasesCollection(client, orgSlug, serverId);
|
|
1878
|
+
this.databaseUsers = new DatabaseUsersCollection(client, orgSlug, serverId);
|
|
1879
|
+
this.daemons = new DaemonsCollection(client, orgSlug, serverId);
|
|
1880
|
+
this.backups = new BackupsCollection(client, orgSlug, serverId);
|
|
1881
|
+
this.scheduledJobs = new ScheduledJobsCollection(client, orgSlug, serverId);
|
|
1882
|
+
this.monitors = new MonitorsCollection(client, orgSlug, serverId);
|
|
1883
|
+
this.firewallRules = new FirewallRulesCollection(client, orgSlug, serverId);
|
|
1884
|
+
this.sshKeys = new SshKeysCollection(client, orgSlug, serverId);
|
|
1885
|
+
this.nginxTemplates = new NginxTemplatesCollection(client, orgSlug, serverId);
|
|
1868
1886
|
}
|
|
1869
1887
|
/**
|
|
1870
1888
|
* Access a specific site on this server, with nested resources.
|
|
@@ -1879,7 +1897,7 @@ var ServerResource = class extends BaseCollection {
|
|
|
1879
1897
|
* ```
|
|
1880
1898
|
*/
|
|
1881
1899
|
site(siteId) {
|
|
1882
|
-
return new SiteResource(this.client, this.serverId, siteId);
|
|
1900
|
+
return new SiteResource(this.client, this.orgSlug, this.serverId, siteId);
|
|
1883
1901
|
}
|
|
1884
1902
|
/**
|
|
1885
1903
|
* Get this server's details.
|
|
@@ -1890,7 +1908,7 @@ var ServerResource = class extends BaseCollection {
|
|
|
1890
1908
|
* ```
|
|
1891
1909
|
*/
|
|
1892
1910
|
async get() {
|
|
1893
|
-
return (await this.client.get(`/servers/${this.serverId}`))
|
|
1911
|
+
return unwrapDocument$1(await this.client.get(`/orgs/${this.orgSlug}/servers/${this.serverId}`));
|
|
1894
1912
|
}
|
|
1895
1913
|
/**
|
|
1896
1914
|
* Reboot this server.
|
|
@@ -1901,7 +1919,7 @@ var ServerResource = class extends BaseCollection {
|
|
|
1901
1919
|
* ```
|
|
1902
1920
|
*/
|
|
1903
1921
|
async reboot() {
|
|
1904
|
-
await this.client.post(`/servers/${this.serverId}/reboot`);
|
|
1922
|
+
await this.client.post(`/orgs/${this.orgSlug}/servers/${this.serverId}/reboot`);
|
|
1905
1923
|
}
|
|
1906
1924
|
/**
|
|
1907
1925
|
* Delete this server.
|
|
@@ -1912,7 +1930,7 @@ var ServerResource = class extends BaseCollection {
|
|
|
1912
1930
|
* ```
|
|
1913
1931
|
*/
|
|
1914
1932
|
async delete() {
|
|
1915
|
-
await this.client.delete(`/servers/${this.serverId}`);
|
|
1933
|
+
await this.client.delete(`/orgs/${this.orgSlug}/servers/${this.serverId}`);
|
|
1916
1934
|
}
|
|
1917
1935
|
};
|
|
1918
1936
|
/**
|
|
@@ -1927,11 +1945,8 @@ var ServerResource = class extends BaseCollection {
|
|
|
1927
1945
|
*/
|
|
1928
1946
|
var RecipesCollection = class extends BaseCollection {
|
|
1929
1947
|
/** @internal */
|
|
1930
|
-
constructor(client) {
|
|
1931
|
-
super(client);
|
|
1932
|
-
}
|
|
1933
1948
|
get basePath() {
|
|
1934
|
-
return `/recipes`;
|
|
1949
|
+
return `/orgs/${this.orgSlug}/recipes`;
|
|
1935
1950
|
}
|
|
1936
1951
|
/**
|
|
1937
1952
|
* List all recipes.
|
|
@@ -1940,13 +1955,13 @@ var RecipesCollection = class extends BaseCollection {
|
|
|
1940
1955
|
* ```ts
|
|
1941
1956
|
* const recipes = await forge.recipes.list();
|
|
1942
1957
|
*
|
|
1943
|
-
* // Fetch a specific page:
|
|
1944
|
-
* const page2 = await forge.recipes.list({
|
|
1958
|
+
* // Fetch a specific cursor page:
|
|
1959
|
+
* const page2 = await forge.recipes.list({ cursor: 'next-cursor-value' });
|
|
1945
1960
|
* ```
|
|
1946
1961
|
*/
|
|
1947
1962
|
async list(options = {}) {
|
|
1948
|
-
const query = options.
|
|
1949
|
-
return (await this.client.get(`${this.basePath}${query}`))
|
|
1963
|
+
const query = options.cursor !== void 0 ? `?page[cursor]=${options.cursor}` : "";
|
|
1964
|
+
return unwrapListDocument$1(await this.client.get(`${this.basePath}${query}`));
|
|
1950
1965
|
}
|
|
1951
1966
|
/**
|
|
1952
1967
|
* Iterate over all recipes across all pages.
|
|
@@ -1961,11 +1976,15 @@ var RecipesCollection = class extends BaseCollection {
|
|
|
1961
1976
|
* const recipes = await forge.recipes.all().toArray();
|
|
1962
1977
|
* ```
|
|
1963
1978
|
*/
|
|
1964
|
-
all(
|
|
1965
|
-
return new AsyncPaginatedIterator((
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1979
|
+
all() {
|
|
1980
|
+
return new AsyncPaginatedIterator(async (cursor) => {
|
|
1981
|
+
const query = cursor !== null ? `?page[cursor]=${cursor}` : "";
|
|
1982
|
+
const response = await this.client.get(`${this.basePath}${query}`);
|
|
1983
|
+
return {
|
|
1984
|
+
items: unwrapListDocument$1(response),
|
|
1985
|
+
nextCursor: response.meta.next_cursor ?? null
|
|
1986
|
+
};
|
|
1987
|
+
});
|
|
1969
1988
|
}
|
|
1970
1989
|
/**
|
|
1971
1990
|
* Get a specific recipe.
|
|
@@ -1976,7 +1995,7 @@ var RecipesCollection = class extends BaseCollection {
|
|
|
1976
1995
|
* ```
|
|
1977
1996
|
*/
|
|
1978
1997
|
async get(recipeId) {
|
|
1979
|
-
return (await this.client.get(`${this.basePath}/${recipeId}`))
|
|
1998
|
+
return unwrapDocument$1(await this.client.get(`${this.basePath}/${recipeId}`));
|
|
1980
1999
|
}
|
|
1981
2000
|
/**
|
|
1982
2001
|
* Create a new recipe.
|
|
@@ -1991,7 +2010,7 @@ var RecipesCollection = class extends BaseCollection {
|
|
|
1991
2010
|
* ```
|
|
1992
2011
|
*/
|
|
1993
2012
|
async create(data) {
|
|
1994
|
-
return (await this.client.post(this.basePath, data))
|
|
2013
|
+
return unwrapDocument$1(await this.client.post(this.basePath, data));
|
|
1995
2014
|
}
|
|
1996
2015
|
/**
|
|
1997
2016
|
* Delete a recipe.
|
|
@@ -2026,7 +2045,7 @@ var RecipesCollection = class extends BaseCollection {
|
|
|
2026
2045
|
* ```ts
|
|
2027
2046
|
* import { Forge } from '@studiometa/forge-sdk';
|
|
2028
2047
|
*
|
|
2029
|
-
* const forge = new Forge('your-api-token');
|
|
2048
|
+
* const forge = new Forge('your-api-token', 'my-org');
|
|
2030
2049
|
*
|
|
2031
2050
|
* // List all servers
|
|
2032
2051
|
* const servers = await forge.servers.list();
|
|
@@ -2044,6 +2063,8 @@ var RecipesCollection = class extends BaseCollection {
|
|
|
2044
2063
|
var Forge = class {
|
|
2045
2064
|
/** @internal */
|
|
2046
2065
|
client;
|
|
2066
|
+
/** The organization slug used for v2 API URL prefixing. */
|
|
2067
|
+
organizationSlug;
|
|
2047
2068
|
/** Server operations (list, get, create, update, delete, reboot). */
|
|
2048
2069
|
servers;
|
|
2049
2070
|
/** Recipe operations (list, get, create, delete, run). */
|
|
@@ -2052,29 +2073,31 @@ var Forge = class {
|
|
|
2052
2073
|
* Create a new Forge SDK instance.
|
|
2053
2074
|
*
|
|
2054
2075
|
* @param token Your Laravel Forge API token.
|
|
2076
|
+
* @param organizationSlug Your organization slug (used for v2 API URLs).
|
|
2055
2077
|
* @param options Optional configuration (custom fetch, base URL, rate limiting).
|
|
2056
2078
|
*
|
|
2057
2079
|
* @example
|
|
2058
2080
|
* ```ts
|
|
2059
2081
|
* // Basic usage
|
|
2060
|
-
* const forge = new Forge('your-api-token');
|
|
2082
|
+
* const forge = new Forge('your-api-token', 'my-org');
|
|
2061
2083
|
*
|
|
2062
2084
|
* // With custom options
|
|
2063
|
-
* const forge = new Forge('your-api-token', {
|
|
2064
|
-
* baseUrl: 'https://
|
|
2085
|
+
* const forge = new Forge('your-api-token', 'my-org', {
|
|
2086
|
+
* baseUrl: 'https://forge.laravel.com/api/v2',
|
|
2065
2087
|
* });
|
|
2066
2088
|
*
|
|
2067
2089
|
* // With mock fetch for testing
|
|
2068
|
-
* const forge = new Forge('test-token', { fetch: mockFetch });
|
|
2090
|
+
* const forge = new Forge('test-token', 'test-org', { fetch: mockFetch });
|
|
2069
2091
|
* ```
|
|
2070
2092
|
*/
|
|
2071
|
-
constructor(token, options) {
|
|
2093
|
+
constructor(token, organizationSlug, options) {
|
|
2072
2094
|
this.client = new HttpClient({
|
|
2073
2095
|
token,
|
|
2074
2096
|
...options
|
|
2075
2097
|
});
|
|
2076
|
-
this.
|
|
2077
|
-
this.
|
|
2098
|
+
this.organizationSlug = organizationSlug;
|
|
2099
|
+
this.servers = new ServersCollection(this.client, organizationSlug);
|
|
2100
|
+
this.recipes = new RecipesCollection(this.client, organizationSlug);
|
|
2078
2101
|
}
|
|
2079
2102
|
/**
|
|
2080
2103
|
* Access a specific server by ID, with nested resources.
|
|
@@ -2100,7 +2123,7 @@ var Forge = class {
|
|
|
2100
2123
|
* ```
|
|
2101
2124
|
*/
|
|
2102
2125
|
server(serverId) {
|
|
2103
|
-
return new ServerResource(this.client, serverId);
|
|
2126
|
+
return new ServerResource(this.client, this.organizationSlug, serverId);
|
|
2104
2127
|
}
|
|
2105
2128
|
/**
|
|
2106
2129
|
* Get the currently authenticated user.
|
|
@@ -2112,9 +2135,9 @@ var Forge = class {
|
|
|
2112
2135
|
* ```
|
|
2113
2136
|
*/
|
|
2114
2137
|
async user() {
|
|
2115
|
-
return (await this.client.get("/user"))
|
|
2138
|
+
return unwrapDocument$1(await this.client.get("/user"));
|
|
2116
2139
|
}
|
|
2117
2140
|
};
|
|
2118
|
-
export { AsyncPaginatedIterator, BackupsCollection, BaseCollection, CertificatesCollection, CommandsCollection, DaemonsCollection, DatabaseUsersCollection, DatabasesCollection, DeploymentsCollection, FirewallRulesCollection, Forge, MonitorsCollection, NginxTemplatesCollection, RecipesCollection, RedirectRulesCollection, ScheduledJobsCollection, SecurityRulesCollection, ServerResource, ServersCollection, SiteEnvResource, SiteNginxResource, SiteResource, SitesCollection, SshKeysCollection };
|
|
2141
|
+
export { AsyncPaginatedIterator, BackupsCollection, BaseCollection, CertificatesCollection, CommandsCollection, DaemonsCollection, DatabaseUsersCollection, DatabasesCollection, DeploymentsCollection, FirewallRulesCollection, Forge, MonitorsCollection, NginxTemplatesCollection, RecipesCollection, RedirectRulesCollection, ScheduledJobsCollection, SecurityRulesCollection, ServerResource, ServersCollection, SiteEnvResource, SiteNginxResource, SiteResource, SitesCollection, SshKeysCollection, unwrapDocument, unwrapListDocument, unwrapResource };
|
|
2119
2142
|
|
|
2120
2143
|
//# sourceMappingURL=index.js.map
|