@studiometa/forge-sdk 0.2.5 → 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
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { CreateMonitorData,
|
|
1
|
+
import type { CreateMonitorData, HttpClient, MonitorAttributes } from "@studiometa/forge-api";
|
|
2
2
|
import { BaseCollection } from "./base.ts";
|
|
3
3
|
import { AsyncPaginatedIterator } from "../pagination.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Options for listing monitors.
|
|
6
6
|
*/
|
|
7
7
|
export interface MonitorListOptions {
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** Cursor for pagination (from previous response's next_cursor). */
|
|
9
|
+
cursor?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Collection of server monitors.
|
|
@@ -21,7 +21,7 @@ export interface MonitorListOptions {
|
|
|
21
21
|
export declare class MonitorsCollection extends BaseCollection {
|
|
22
22
|
private readonly serverId;
|
|
23
23
|
/** @internal */
|
|
24
|
-
constructor(client: HttpClient, serverId: number);
|
|
24
|
+
constructor(client: HttpClient, orgSlug: string, serverId: number);
|
|
25
25
|
private get basePath();
|
|
26
26
|
/**
|
|
27
27
|
* List monitors on this server.
|
|
@@ -30,11 +30,13 @@ export declare class MonitorsCollection extends BaseCollection {
|
|
|
30
30
|
* ```ts
|
|
31
31
|
* const monitors = await forge.server(123).monitors.list();
|
|
32
32
|
*
|
|
33
|
-
* // Fetch a specific page:
|
|
34
|
-
* const page2 = await forge.server(123).monitors.list({
|
|
33
|
+
* // Fetch a specific cursor page:
|
|
34
|
+
* const page2 = await forge.server(123).monitors.list({ cursor: 'next-cursor-value' });
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
list(options?: MonitorListOptions): Promise<
|
|
37
|
+
list(options?: MonitorListOptions): Promise<Array<MonitorAttributes & {
|
|
38
|
+
id: number;
|
|
39
|
+
}>>;
|
|
38
40
|
/**
|
|
39
41
|
* Iterate over all monitors across all pages.
|
|
40
42
|
*
|
|
@@ -48,7 +50,9 @@ export declare class MonitorsCollection extends BaseCollection {
|
|
|
48
50
|
* const monitors = await forge.server(123).monitors.all().toArray();
|
|
49
51
|
* ```
|
|
50
52
|
*/
|
|
51
|
-
all(
|
|
53
|
+
all(): AsyncPaginatedIterator<MonitorAttributes & {
|
|
54
|
+
id: number;
|
|
55
|
+
}>;
|
|
52
56
|
/**
|
|
53
57
|
* Get a specific monitor.
|
|
54
58
|
*
|
|
@@ -57,7 +61,9 @@ export declare class MonitorsCollection extends BaseCollection {
|
|
|
57
61
|
* const monitor = await forge.server(123).monitors.get(789);
|
|
58
62
|
* ```
|
|
59
63
|
*/
|
|
60
|
-
get(monitorId: number): Promise<
|
|
64
|
+
get(monitorId: number): Promise<MonitorAttributes & {
|
|
65
|
+
id: number;
|
|
66
|
+
}>;
|
|
61
67
|
/**
|
|
62
68
|
* Create a new monitor.
|
|
63
69
|
*
|
|
@@ -71,7 +77,9 @@ export declare class MonitorsCollection extends BaseCollection {
|
|
|
71
77
|
* });
|
|
72
78
|
* ```
|
|
73
79
|
*/
|
|
74
|
-
create(data: CreateMonitorData): Promise<
|
|
80
|
+
create(data: CreateMonitorData): Promise<MonitorAttributes & {
|
|
81
|
+
id: number;
|
|
82
|
+
}>;
|
|
75
83
|
/**
|
|
76
84
|
* Delete a monitor.
|
|
77
85
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitors.d.ts","sourceRoot":"","sources":["../../src/resources/monitors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"monitors.d.ts","sourceRoot":"","sources":["../../src/resources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xTemplateData, HttpClient, NginxTemplateAttributes } from "@studiometa/forge-api";
|
|
2
2
|
import { BaseCollection } from "./base.ts";
|
|
3
3
|
import { AsyncPaginatedIterator } from "../pagination.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Options for listing Nginx templates.
|
|
6
6
|
*/
|
|
7
7
|
export interface NginxTemplateListOptions {
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** Cursor for pagination (from previous response's next_cursor). */
|
|
9
|
+
cursor?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Collection of Nginx templates on a server.
|
|
@@ -21,7 +21,7 @@ export interface NginxTemplateListOptions {
|
|
|
21
21
|
export declare class NginxTemplatesCollection extends BaseCollection {
|
|
22
22
|
private readonly serverId;
|
|
23
23
|
/** @internal */
|
|
24
|
-
constructor(client: HttpClient, serverId: number);
|
|
24
|
+
constructor(client: HttpClient, orgSlug: string, serverId: number);
|
|
25
25
|
private get basePath();
|
|
26
26
|
/**
|
|
27
27
|
* List Nginx templates on this server.
|
|
@@ -30,11 +30,13 @@ export declare class NginxTemplatesCollection extends BaseCollection {
|
|
|
30
30
|
* ```ts
|
|
31
31
|
* const templates = await forge.server(123).nginxTemplates.list();
|
|
32
32
|
*
|
|
33
|
-
* // Fetch a specific page:
|
|
34
|
-
* const page2 = await forge.server(123).nginxTemplates.list({
|
|
33
|
+
* // Fetch a specific cursor page:
|
|
34
|
+
* const page2 = await forge.server(123).nginxTemplates.list({ cursor: 'next-cursor-value' });
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
list(options?: NginxTemplateListOptions): Promise<
|
|
37
|
+
list(options?: NginxTemplateListOptions): Promise<Array<NginxTemplateAttributes & {
|
|
38
|
+
id: number;
|
|
39
|
+
}>>;
|
|
38
40
|
/**
|
|
39
41
|
* Iterate over all Nginx templates across all pages.
|
|
40
42
|
*
|
|
@@ -48,7 +50,9 @@ export declare class NginxTemplatesCollection extends BaseCollection {
|
|
|
48
50
|
* const templates = await forge.server(123).nginxTemplates.all().toArray();
|
|
49
51
|
* ```
|
|
50
52
|
*/
|
|
51
|
-
all(
|
|
53
|
+
all(): AsyncPaginatedIterator<NginxTemplateAttributes & {
|
|
54
|
+
id: number;
|
|
55
|
+
}>;
|
|
52
56
|
/**
|
|
53
57
|
* Get a specific Nginx template.
|
|
54
58
|
*
|
|
@@ -57,7 +61,9 @@ export declare class NginxTemplatesCollection extends BaseCollection {
|
|
|
57
61
|
* const template = await forge.server(123).nginxTemplates.get(789);
|
|
58
62
|
* ```
|
|
59
63
|
*/
|
|
60
|
-
get(templateId: number): Promise<
|
|
64
|
+
get(templateId: number): Promise<NginxTemplateAttributes & {
|
|
65
|
+
id: number;
|
|
66
|
+
}>;
|
|
61
67
|
/**
|
|
62
68
|
* Create a new Nginx template.
|
|
63
69
|
*
|
|
@@ -69,7 +75,9 @@ export declare class NginxTemplatesCollection extends BaseCollection {
|
|
|
69
75
|
* });
|
|
70
76
|
* ```
|
|
71
77
|
*/
|
|
72
|
-
create(data: CreateNginxTemplateData): Promise<
|
|
78
|
+
create(data: CreateNginxTemplateData): Promise<NginxTemplateAttributes & {
|
|
79
|
+
id: number;
|
|
80
|
+
}>;
|
|
73
81
|
/**
|
|
74
82
|
* Update an existing Nginx template.
|
|
75
83
|
*
|
|
@@ -81,7 +89,9 @@ export declare class NginxTemplatesCollection extends BaseCollection {
|
|
|
81
89
|
* });
|
|
82
90
|
* ```
|
|
83
91
|
*/
|
|
84
|
-
update(templateId: number, data: Partial<CreateNginxTemplateData>): Promise<
|
|
92
|
+
update(templateId: number, data: Partial<CreateNginxTemplateData>): Promise<NginxTemplateAttributes & {
|
|
93
|
+
id: number;
|
|
94
|
+
}>;
|
|
85
95
|
/**
|
|
86
96
|
* Delete a Nginx template.
|
|
87
97
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nginx-templates.d.ts","sourceRoot":"","sources":["../../src/resources/nginx-templates.ts"],"names":[],"mappings":"AAAA,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AO,CAAC,uBAAuB,CAAC,GACrC,OAAO,CAAC,uBAAuB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAQpD;;;;;;;OAOG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGhD"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { CreateRecipeData,
|
|
1
|
+
import type { CreateRecipeData, RecipeAttributes } from "@studiometa/forge-api";
|
|
2
2
|
import { BaseCollection } from "./base.ts";
|
|
3
3
|
import { AsyncPaginatedIterator } from "../pagination.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Options for listing recipes.
|
|
6
6
|
*/
|
|
7
7
|
export interface RecipeListOptions {
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** Cursor for pagination (from previous response's next_cursor). */
|
|
9
|
+
cursor?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Options for running a recipe.
|
|
@@ -27,7 +27,6 @@ export interface RunRecipeOptions {
|
|
|
27
27
|
*/
|
|
28
28
|
export declare class RecipesCollection extends BaseCollection {
|
|
29
29
|
/** @internal */
|
|
30
|
-
constructor(client: HttpClient);
|
|
31
30
|
private get basePath();
|
|
32
31
|
/**
|
|
33
32
|
* List all recipes.
|
|
@@ -36,11 +35,13 @@ export declare class RecipesCollection extends BaseCollection {
|
|
|
36
35
|
* ```ts
|
|
37
36
|
* const recipes = await forge.recipes.list();
|
|
38
37
|
*
|
|
39
|
-
* // Fetch a specific page:
|
|
40
|
-
* const page2 = await forge.recipes.list({
|
|
38
|
+
* // Fetch a specific cursor page:
|
|
39
|
+
* const page2 = await forge.recipes.list({ cursor: 'next-cursor-value' });
|
|
41
40
|
* ```
|
|
42
41
|
*/
|
|
43
|
-
list(options?: RecipeListOptions): Promise<
|
|
42
|
+
list(options?: RecipeListOptions): Promise<Array<RecipeAttributes & {
|
|
43
|
+
id: number;
|
|
44
|
+
}>>;
|
|
44
45
|
/**
|
|
45
46
|
* Iterate over all recipes across all pages.
|
|
46
47
|
*
|
|
@@ -54,7 +55,9 @@ export declare class RecipesCollection extends BaseCollection {
|
|
|
54
55
|
* const recipes = await forge.recipes.all().toArray();
|
|
55
56
|
* ```
|
|
56
57
|
*/
|
|
57
|
-
all(
|
|
58
|
+
all(): AsyncPaginatedIterator<RecipeAttributes & {
|
|
59
|
+
id: number;
|
|
60
|
+
}>;
|
|
58
61
|
/**
|
|
59
62
|
* Get a specific recipe.
|
|
60
63
|
*
|
|
@@ -63,7 +66,9 @@ export declare class RecipesCollection extends BaseCollection {
|
|
|
63
66
|
* const recipe = await forge.recipes.get(789);
|
|
64
67
|
* ```
|
|
65
68
|
*/
|
|
66
|
-
get(recipeId: number): Promise<
|
|
69
|
+
get(recipeId: number): Promise<RecipeAttributes & {
|
|
70
|
+
id: number;
|
|
71
|
+
}>;
|
|
67
72
|
/**
|
|
68
73
|
* Create a new recipe.
|
|
69
74
|
*
|
|
@@ -76,7 +81,9 @@ export declare class RecipesCollection extends BaseCollection {
|
|
|
76
81
|
* });
|
|
77
82
|
* ```
|
|
78
83
|
*/
|
|
79
|
-
create(data: CreateRecipeData): Promise<
|
|
84
|
+
create(data: CreateRecipeData): Promise<RecipeAttributes & {
|
|
85
|
+
id: number;
|
|
86
|
+
}>;
|
|
80
87
|
/**
|
|
81
88
|
* Delete a recipe.
|
|
82
89
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../src/resources/recipes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,
|
|
1
|
+
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../src/resources/recipes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAGhB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,qBAAa,iBAAkB,SAAQ,cAAc;IACnD,gBAAgB;IAEhB,OAAO,KAAK,QAAQ,GAEnB;IAED;;;;;;;;;;OAUG;IACG,IAAI,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,KAAK,CAAC,gBAAgB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAQ9F;;;;;;;;;;;;OAYG;IACH,GAAG,IAAI,sBAAsB,CAAC,gBAAgB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAahE;;;;;;;OAOG;IACG,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAOvE;;;;;;;;;;;OAWG;IACG,MAAM,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAKhF;;;;;;;OAOG;IACG,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C;;;;;;;OAOG;IACG,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtE"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { CreateRedirectRuleData,
|
|
1
|
+
import type { CreateRedirectRuleData, HttpClient, RedirectRuleAttributes } from "@studiometa/forge-api";
|
|
2
2
|
import { BaseCollection } from "./base.ts";
|
|
3
3
|
import { AsyncPaginatedIterator } from "../pagination.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Options for listing redirect rules.
|
|
6
6
|
*/
|
|
7
7
|
export interface RedirectRuleListOptions {
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** Cursor for pagination (from previous response's next_cursor). */
|
|
9
|
+
cursor?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Collection of redirect rules on a site.
|
|
@@ -22,7 +22,7 @@ export declare class RedirectRulesCollection extends BaseCollection {
|
|
|
22
22
|
private readonly serverId;
|
|
23
23
|
private readonly siteId;
|
|
24
24
|
/** @internal */
|
|
25
|
-
constructor(client: HttpClient, serverId: number, siteId: number);
|
|
25
|
+
constructor(client: HttpClient, orgSlug: string, serverId: number, siteId: number);
|
|
26
26
|
private get basePath();
|
|
27
27
|
/**
|
|
28
28
|
* List redirect rules on this site.
|
|
@@ -31,11 +31,13 @@ export declare class RedirectRulesCollection extends BaseCollection {
|
|
|
31
31
|
* ```ts
|
|
32
32
|
* const rules = await forge.server(123).site(456).redirectRules.list();
|
|
33
33
|
*
|
|
34
|
-
* // Fetch a specific page:
|
|
35
|
-
* const page2 = await forge.server(123).site(456).redirectRules.list({
|
|
34
|
+
* // Fetch a specific cursor page:
|
|
35
|
+
* const page2 = await forge.server(123).site(456).redirectRules.list({ cursor: 'next-cursor-value' });
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
list(options?: RedirectRuleListOptions): Promise<
|
|
38
|
+
list(options?: RedirectRuleListOptions): Promise<Array<RedirectRuleAttributes & {
|
|
39
|
+
id: number;
|
|
40
|
+
}>>;
|
|
39
41
|
/**
|
|
40
42
|
* Iterate over all redirect rules across all pages.
|
|
41
43
|
*
|
|
@@ -49,7 +51,9 @@ export declare class RedirectRulesCollection extends BaseCollection {
|
|
|
49
51
|
* const rules = await forge.server(123).site(456).redirectRules.all().toArray();
|
|
50
52
|
* ```
|
|
51
53
|
*/
|
|
52
|
-
all(
|
|
54
|
+
all(): AsyncPaginatedIterator<RedirectRuleAttributes & {
|
|
55
|
+
id: number;
|
|
56
|
+
}>;
|
|
53
57
|
/**
|
|
54
58
|
* Get a specific redirect rule.
|
|
55
59
|
*
|
|
@@ -58,7 +62,9 @@ export declare class RedirectRulesCollection extends BaseCollection {
|
|
|
58
62
|
* const rule = await forge.server(123).site(456).redirectRules.get(789);
|
|
59
63
|
* ```
|
|
60
64
|
*/
|
|
61
|
-
get(ruleId: number): Promise<
|
|
65
|
+
get(ruleId: number): Promise<RedirectRuleAttributes & {
|
|
66
|
+
id: number;
|
|
67
|
+
}>;
|
|
62
68
|
/**
|
|
63
69
|
* Create a new redirect rule.
|
|
64
70
|
*
|
|
@@ -71,7 +77,9 @@ export declare class RedirectRulesCollection extends BaseCollection {
|
|
|
71
77
|
* });
|
|
72
78
|
* ```
|
|
73
79
|
*/
|
|
74
|
-
create(data: CreateRedirectRuleData): Promise<
|
|
80
|
+
create(data: CreateRedirectRuleData): Promise<RedirectRuleAttributes & {
|
|
81
|
+
id: number;
|
|
82
|
+
}>;
|
|
75
83
|
/**
|
|
76
84
|
* Delete a redirect rule.
|
|
77
85
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redirect-rules.d.ts","sourceRoot":"","sources":["../../src/resources/redirect-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"redirect-rules.d.ts","sourceRoot":"","sources":["../../src/resources/redirect-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,UAAU,EAGV,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IAKvD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,gBAAgB;gBAEd,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,EACE,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM;IAKjC,OAAO,KAAK,QAAQ,GAEnB;IAED;;;;;;;;;;OAUG;IACG,IAAI,CACR,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAQ1D;;;;;;;;;;;;OAYG;IACH,GAAG,IAAI,sBAAsB,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAatE;;;;;;;OAOG;IACG,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAO3E;;;;;;;;;;;OAWG;IACG,MAAM,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAQ5F;;;;;;;OAOG;IACG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG5C"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { CreateScheduledJobData,
|
|
1
|
+
import type { CreateScheduledJobData, HttpClient, ScheduledJobAttributes } from "@studiometa/forge-api";
|
|
2
2
|
import { BaseCollection } from "./base.ts";
|
|
3
3
|
import { AsyncPaginatedIterator } from "../pagination.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Options for listing scheduled jobs.
|
|
6
6
|
*/
|
|
7
7
|
export interface ScheduledJobListOptions {
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** Cursor for pagination (from previous response's next_cursor). */
|
|
9
|
+
cursor?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Collection of scheduled jobs (cron jobs) on a server.
|
|
@@ -21,7 +21,7 @@ export interface ScheduledJobListOptions {
|
|
|
21
21
|
export declare class ScheduledJobsCollection extends BaseCollection {
|
|
22
22
|
private readonly serverId;
|
|
23
23
|
/** @internal */
|
|
24
|
-
constructor(client: HttpClient, serverId: number);
|
|
24
|
+
constructor(client: HttpClient, orgSlug: string, serverId: number);
|
|
25
25
|
private get basePath();
|
|
26
26
|
/**
|
|
27
27
|
* List scheduled jobs on this server.
|
|
@@ -30,11 +30,13 @@ export declare class ScheduledJobsCollection extends BaseCollection {
|
|
|
30
30
|
* ```ts
|
|
31
31
|
* const jobs = await forge.server(123).scheduledJobs.list();
|
|
32
32
|
*
|
|
33
|
-
* // Fetch a specific page:
|
|
34
|
-
* const page2 = await forge.server(123).scheduledJobs.list({
|
|
33
|
+
* // Fetch a specific cursor page:
|
|
34
|
+
* const page2 = await forge.server(123).scheduledJobs.list({ cursor: 'next-cursor-value' });
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
list(options?: ScheduledJobListOptions): Promise<
|
|
37
|
+
list(options?: ScheduledJobListOptions): Promise<Array<ScheduledJobAttributes & {
|
|
38
|
+
id: number;
|
|
39
|
+
}>>;
|
|
38
40
|
/**
|
|
39
41
|
* Iterate over all scheduled jobs across all pages.
|
|
40
42
|
*
|
|
@@ -48,7 +50,9 @@ export declare class ScheduledJobsCollection extends BaseCollection {
|
|
|
48
50
|
* const jobs = await forge.server(123).scheduledJobs.all().toArray();
|
|
49
51
|
* ```
|
|
50
52
|
*/
|
|
51
|
-
all(
|
|
53
|
+
all(): AsyncPaginatedIterator<ScheduledJobAttributes & {
|
|
54
|
+
id: number;
|
|
55
|
+
}>;
|
|
52
56
|
/**
|
|
53
57
|
* Get a specific scheduled job.
|
|
54
58
|
*
|
|
@@ -57,7 +61,9 @@ export declare class ScheduledJobsCollection extends BaseCollection {
|
|
|
57
61
|
* const job = await forge.server(123).scheduledJobs.get(789);
|
|
58
62
|
* ```
|
|
59
63
|
*/
|
|
60
|
-
get(jobId: number): Promise<
|
|
64
|
+
get(jobId: number): Promise<ScheduledJobAttributes & {
|
|
65
|
+
id: number;
|
|
66
|
+
}>;
|
|
61
67
|
/**
|
|
62
68
|
* Create a new scheduled job.
|
|
63
69
|
*
|
|
@@ -70,7 +76,9 @@ export declare class ScheduledJobsCollection extends BaseCollection {
|
|
|
70
76
|
* });
|
|
71
77
|
* ```
|
|
72
78
|
*/
|
|
73
|
-
create(data: CreateScheduledJobData): Promise<
|
|
79
|
+
create(data: CreateScheduledJobData): Promise<ScheduledJobAttributes & {
|
|
80
|
+
id: number;
|
|
81
|
+
}>;
|
|
74
82
|
/**
|
|
75
83
|
* Delete a scheduled job.
|
|
76
84
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled-jobs.d.ts","sourceRoot":"","sources":["../../src/resources/scheduled-jobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"scheduled-jobs.d.ts","sourceRoot":"","sources":["../../src/resources/scheduled-jobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,UAAU,EAGV,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IAKvD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJ3B,gBAAgB;gBAEd,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,EACE,QAAQ,EAAE,MAAM;IAKnC,OAAO,KAAK,QAAQ,GAEnB;IAED;;;;;;;;;;OAUG;IACG,IAAI,CACR,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAQ1D;;;;;;;;;;;;OAYG;IACH,GAAG,IAAI,sBAAsB,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAatE;;;;;;;OAOG;IACG,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAO1E;;;;;;;;;;;OAWG;IACG,MAAM,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAQ5F;;;;;;;OAOG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3C"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { CreateSecurityRuleData,
|
|
1
|
+
import type { CreateSecurityRuleData, HttpClient, SecurityRuleAttributes } from "@studiometa/forge-api";
|
|
2
2
|
import { BaseCollection } from "./base.ts";
|
|
3
3
|
import { AsyncPaginatedIterator } from "../pagination.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Options for listing security rules.
|
|
6
6
|
*/
|
|
7
7
|
export interface SecurityRuleListOptions {
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** Cursor for pagination (from previous response's next_cursor). */
|
|
9
|
+
cursor?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Collection of security rules on a site.
|
|
@@ -22,7 +22,7 @@ export declare class SecurityRulesCollection extends BaseCollection {
|
|
|
22
22
|
private readonly serverId;
|
|
23
23
|
private readonly siteId;
|
|
24
24
|
/** @internal */
|
|
25
|
-
constructor(client: HttpClient, serverId: number, siteId: number);
|
|
25
|
+
constructor(client: HttpClient, orgSlug: string, serverId: number, siteId: number);
|
|
26
26
|
private get basePath();
|
|
27
27
|
/**
|
|
28
28
|
* List security rules on this site.
|
|
@@ -31,11 +31,13 @@ export declare class SecurityRulesCollection extends BaseCollection {
|
|
|
31
31
|
* ```ts
|
|
32
32
|
* const rules = await forge.server(123).site(456).securityRules.list();
|
|
33
33
|
*
|
|
34
|
-
* // Fetch a specific page:
|
|
35
|
-
* const page2 = await forge.server(123).site(456).securityRules.list({
|
|
34
|
+
* // Fetch a specific cursor page:
|
|
35
|
+
* const page2 = await forge.server(123).site(456).securityRules.list({ cursor: 'next-cursor-value' });
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
list(options?: SecurityRuleListOptions): Promise<
|
|
38
|
+
list(options?: SecurityRuleListOptions): Promise<Array<SecurityRuleAttributes & {
|
|
39
|
+
id: number;
|
|
40
|
+
}>>;
|
|
39
41
|
/**
|
|
40
42
|
* Iterate over all security rules across all pages.
|
|
41
43
|
*
|
|
@@ -49,7 +51,9 @@ export declare class SecurityRulesCollection extends BaseCollection {
|
|
|
49
51
|
* const rules = await forge.server(123).site(456).securityRules.all().toArray();
|
|
50
52
|
* ```
|
|
51
53
|
*/
|
|
52
|
-
all(
|
|
54
|
+
all(): AsyncPaginatedIterator<SecurityRuleAttributes & {
|
|
55
|
+
id: number;
|
|
56
|
+
}>;
|
|
53
57
|
/**
|
|
54
58
|
* Get a specific security rule.
|
|
55
59
|
*
|
|
@@ -58,7 +62,9 @@ export declare class SecurityRulesCollection extends BaseCollection {
|
|
|
58
62
|
* const rule = await forge.server(123).site(456).securityRules.get(789);
|
|
59
63
|
* ```
|
|
60
64
|
*/
|
|
61
|
-
get(ruleId: number): Promise<
|
|
65
|
+
get(ruleId: number): Promise<SecurityRuleAttributes & {
|
|
66
|
+
id: number;
|
|
67
|
+
}>;
|
|
62
68
|
/**
|
|
63
69
|
* Create a new security rule.
|
|
64
70
|
*
|
|
@@ -71,7 +77,9 @@ export declare class SecurityRulesCollection extends BaseCollection {
|
|
|
71
77
|
* });
|
|
72
78
|
* ```
|
|
73
79
|
*/
|
|
74
|
-
create(data: CreateSecurityRuleData): Promise<
|
|
80
|
+
create(data: CreateSecurityRuleData): Promise<SecurityRuleAttributes & {
|
|
81
|
+
id: number;
|
|
82
|
+
}>;
|
|
75
83
|
/**
|
|
76
84
|
* Delete a security rule.
|
|
77
85
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-rules.d.ts","sourceRoot":"","sources":["../../src/resources/security-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"security-rules.d.ts","sourceRoot":"","sources":["../../src/resources/security-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,UAAU,EAGV,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IAKvD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,gBAAgB;gBAEd,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,EACE,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM;IAKjC,OAAO,KAAK,QAAQ,GAEnB;IAED;;;;;;;;;;OAUG;IACG,IAAI,CACR,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAQ1D;;;;;;;;;;;;OAYG;IACH,GAAG,IAAI,sBAAsB,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAatE;;;;;;;OAOG;IACG,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAO3E;;;;;;;;;;;OAWG;IACG,MAAM,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAQ5F;;;;;;;OAOG;IACG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG5C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreateServerData,
|
|
1
|
+
import type { CreateServerData, HttpClient, ServerAttributes } from "@studiometa/forge-api";
|
|
2
2
|
import { AsyncPaginatedIterator } from "../pagination.ts";
|
|
3
3
|
import { SitesCollection, SiteResource } from "./sites.ts";
|
|
4
4
|
import { DatabasesCollection } from "./databases.ts";
|
|
@@ -30,8 +30,8 @@ export interface ResolveResult {
|
|
|
30
30
|
* Options for listing servers.
|
|
31
31
|
*/
|
|
32
32
|
export interface ServerListOptions {
|
|
33
|
-
/**
|
|
34
|
-
|
|
33
|
+
/** Cursor for pagination (from previous response's next_cursor). */
|
|
34
|
+
cursor?: string;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Collection of servers.
|
|
@@ -52,7 +52,7 @@ export interface ServerListOptions {
|
|
|
52
52
|
*/
|
|
53
53
|
export declare class ServersCollection extends BaseCollection {
|
|
54
54
|
/** @internal */
|
|
55
|
-
|
|
55
|
+
private get basePath();
|
|
56
56
|
/**
|
|
57
57
|
* List servers.
|
|
58
58
|
*
|
|
@@ -60,11 +60,13 @@ export declare class ServersCollection extends BaseCollection {
|
|
|
60
60
|
* ```ts
|
|
61
61
|
* const servers = await forge.servers.list();
|
|
62
62
|
*
|
|
63
|
-
* // Fetch a specific page:
|
|
64
|
-
* const page2 = await forge.servers.list({
|
|
63
|
+
* // Fetch a specific cursor page:
|
|
64
|
+
* const page2 = await forge.servers.list({ cursor: 'next-cursor-value' });
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
|
-
list(options?: ServerListOptions): Promise<
|
|
67
|
+
list(options?: ServerListOptions): Promise<Array<ServerAttributes & {
|
|
68
|
+
id: number;
|
|
69
|
+
}>>;
|
|
68
70
|
/**
|
|
69
71
|
* Iterate over all servers across all pages.
|
|
70
72
|
*
|
|
@@ -78,7 +80,9 @@ export declare class ServersCollection extends BaseCollection {
|
|
|
78
80
|
* const servers = await forge.servers.all().toArray();
|
|
79
81
|
* ```
|
|
80
82
|
*/
|
|
81
|
-
all(
|
|
83
|
+
all(): AsyncPaginatedIterator<ServerAttributes & {
|
|
84
|
+
id: number;
|
|
85
|
+
}>;
|
|
82
86
|
/**
|
|
83
87
|
* Get a specific server by ID.
|
|
84
88
|
*
|
|
@@ -87,7 +91,9 @@ export declare class ServersCollection extends BaseCollection {
|
|
|
87
91
|
* const server = await forge.servers.get(123);
|
|
88
92
|
* ```
|
|
89
93
|
*/
|
|
90
|
-
get(serverId: number): Promise<
|
|
94
|
+
get(serverId: number): Promise<ServerAttributes & {
|
|
95
|
+
id: number;
|
|
96
|
+
}>;
|
|
91
97
|
/**
|
|
92
98
|
* Create a new server.
|
|
93
99
|
*
|
|
@@ -103,7 +109,9 @@ export declare class ServersCollection extends BaseCollection {
|
|
|
103
109
|
* });
|
|
104
110
|
* ```
|
|
105
111
|
*/
|
|
106
|
-
create(data: CreateServerData): Promise<
|
|
112
|
+
create(data: CreateServerData): Promise<ServerAttributes & {
|
|
113
|
+
id: number;
|
|
114
|
+
}>;
|
|
107
115
|
/**
|
|
108
116
|
* Update a server.
|
|
109
117
|
*
|
|
@@ -112,7 +120,9 @@ export declare class ServersCollection extends BaseCollection {
|
|
|
112
120
|
* await forge.servers.update(123, { name: 'web-1-renamed' });
|
|
113
121
|
* ```
|
|
114
122
|
*/
|
|
115
|
-
update(serverId: number, data: Partial<CreateServerData>): Promise<
|
|
123
|
+
update(serverId: number, data: Partial<CreateServerData>): Promise<ServerAttributes & {
|
|
124
|
+
id: number;
|
|
125
|
+
}>;
|
|
116
126
|
/**
|
|
117
127
|
* Delete a server.
|
|
118
128
|
*
|
|
@@ -191,7 +201,7 @@ export declare class ServerResource extends BaseCollection {
|
|
|
191
201
|
/** Nginx templates on this server. */
|
|
192
202
|
readonly nginxTemplates: NginxTemplatesCollection;
|
|
193
203
|
/** @internal */
|
|
194
|
-
constructor(client: HttpClient, serverId: number);
|
|
204
|
+
constructor(client: HttpClient, orgSlug: string, serverId: number);
|
|
195
205
|
/**
|
|
196
206
|
* Access a specific site on this server, with nested resources.
|
|
197
207
|
*
|
|
@@ -213,7 +223,9 @@ export declare class ServerResource extends BaseCollection {
|
|
|
213
223
|
* const server = await forge.server(123).get();
|
|
214
224
|
* ```
|
|
215
225
|
*/
|
|
216
|
-
get(): Promise<
|
|
226
|
+
get(): Promise<ServerAttributes & {
|
|
227
|
+
id: number;
|
|
228
|
+
}>;
|
|
217
229
|
/**
|
|
218
230
|
* Reboot this server.
|
|
219
231
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"servers.d.ts","sourceRoot":"","sources":["../../src/resources/servers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"servers.d.ts","sourceRoot":"","sources":["../../src/resources/servers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EAGV,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,O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