@ninedeploy/sdk 0.18.4 → 0.18.10
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/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/resources/auth.d.ts +20 -1
- package/dist/resources/auth.d.ts.map +1 -1
- package/dist/resources/auth.js +9 -0
- package/dist/resources/auth.js.map +1 -1
- package/dist/resources/databases.d.ts +6 -1
- package/dist/resources/databases.d.ts.map +1 -1
- package/dist/resources/databases.js +4 -0
- package/dist/resources/databases.js.map +1 -1
- package/dist/resources/deploys.d.ts +34 -1
- package/dist/resources/deploys.d.ts.map +1 -1
- package/dist/resources/deploys.js +11 -0
- package/dist/resources/deploys.js.map +1 -1
- package/dist/resources/domains.d.ts +16 -1
- package/dist/resources/domains.d.ts.map +1 -1
- package/dist/resources/domains.js +9 -0
- package/dist/resources/domains.js.map +1 -1
- package/dist/resources/servers.d.ts +49 -1
- package/dist/resources/servers.d.ts.map +1 -1
- package/dist/resources/servers.js +26 -0
- package/dist/resources/servers.js.map +1 -1
- package/dist/resources/services.d.ts +78 -1
- package/dist/resources/services.d.ts.map +1 -1
- package/dist/resources/services.js +47 -0
- package/dist/resources/services.js.map +1 -1
- package/dist/resources/settings.d.ts +47 -2
- package/dist/resources/settings.d.ts.map +1 -1
- package/dist/resources/settings.js +6 -0
- package/dist/resources/settings.js.map +1 -1
- package/dist/resources/sources.d.ts +6 -1
- package/dist/resources/sources.d.ts.map +1 -1
- package/dist/resources/sources.js +5 -0
- package/dist/resources/sources.js.map +1 -1
- package/dist/resources/system.d.ts +20 -1
- package/dist/resources/system.d.ts.map +1 -1
- package/dist/resources/system.js +8 -0
- package/dist/resources/system.js.map +1 -1
- package/dist/resources/traefik.d.ts +9 -0
- package/dist/resources/traefik.d.ts.map +1 -1
- package/dist/resources/traefik.js +4 -0
- package/dist/resources/traefik.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -2
- package/src/resources/auth.ts +25 -0
- package/src/resources/databases.ts +11 -0
- package/src/resources/deploys.ts +37 -0
- package/src/resources/domains.ts +30 -0
- package/src/resources/servers.ts +80 -0
- package/src/resources/services.ts +138 -0
- package/src/resources/settings.ts +45 -1
- package/src/resources/sources.ts +12 -0
- package/src/resources/system.ts +24 -0
- package/src/resources/traefik.ts +9 -0
package/src/resources/sources.ts
CHANGED
|
@@ -10,6 +10,8 @@ import type {
|
|
|
10
10
|
GithubAppManifestRequest,
|
|
11
11
|
GithubAppManifestResponse,
|
|
12
12
|
GithubAppPatch,
|
|
13
|
+
GithubRunnerConfig,
|
|
14
|
+
GithubRunnerStatus,
|
|
13
15
|
} from '@ninedeploy/schemas';
|
|
14
16
|
import type { GithubAppInstallationSync, SourceRepo, SourceUpdateInput } from '../types.js';
|
|
15
17
|
import type { Transport } from '../transport.js';
|
|
@@ -88,6 +90,11 @@ export interface SourcesApi {
|
|
|
88
90
|
remove: (id: number) => Promise<void>;
|
|
89
91
|
syncInstallations: (id: number) => Promise<GithubAppInstallationSync>;
|
|
90
92
|
installations: (id: number) => Promise<GithubAppInstallation[]>;
|
|
93
|
+
/** Self-hosted Actions runners (G4.5): settings, waiting jobs, running runners and what is missing. */
|
|
94
|
+
runners: (id: number) => Promise<GithubRunnerStatus>;
|
|
95
|
+
setRunners: (id: number, config: GithubRunnerConfig) => Promise<GithubRunnerStatus>;
|
|
96
|
+
/** Stop one runner container (and remove its registration on GitHub). */
|
|
97
|
+
stopRunner: (id: number, name: string) => Promise<void>;
|
|
91
98
|
};
|
|
92
99
|
}
|
|
93
100
|
|
|
@@ -126,6 +133,11 @@ export function sourcesApi(t: Transport): SourcesApi {
|
|
|
126
133
|
},
|
|
127
134
|
syncInstallations: (id) => send<GithubAppInstallationSync>('POST', `/v1/github-apps/${id}/installations/sync`),
|
|
128
135
|
installations: (id) => get<GithubAppInstallation[]>(`/v1/github-apps/${id}/installations`),
|
|
136
|
+
runners: (id) => get<GithubRunnerStatus>(`/v1/github-apps/${id}/runners`),
|
|
137
|
+
setRunners: (id, config) => send<GithubRunnerStatus>('PUT', `/v1/github-apps/${id}/runners`, config),
|
|
138
|
+
stopRunner: async (id, name) => {
|
|
139
|
+
await request(`/v1/github-apps/${id}/runners/${encodeURIComponent(name)}`, { method: 'DELETE' });
|
|
140
|
+
},
|
|
129
141
|
},
|
|
130
142
|
};
|
|
131
143
|
}
|
package/src/resources/system.ts
CHANGED
|
@@ -25,11 +25,27 @@ import type {
|
|
|
25
25
|
PanelBackupRestore,
|
|
26
26
|
PanelBackupSettingsPatch,
|
|
27
27
|
PanelBackupStatus,
|
|
28
|
+
GitopsApplyStep,
|
|
29
|
+
GitopsCheck,
|
|
30
|
+
GitopsConfigInput,
|
|
31
|
+
GitopsView,
|
|
28
32
|
} from '@ninedeploy/schemas';
|
|
29
33
|
import type { HealthStatus, ImageInfo, PruneImagesInput, PruneImagesResult } from '../types.js';
|
|
30
34
|
import type { Transport } from '../transport.js';
|
|
31
35
|
|
|
32
36
|
export interface SystemApi {
|
|
37
|
+
/** G5.3 instance GitOps (operators): the instance as a file in a repository. */
|
|
38
|
+
gitops: {
|
|
39
|
+
get: () => Promise<GitopsView>;
|
|
40
|
+
configure: (input: GitopsConfigInput) => Promise<GitopsView>;
|
|
41
|
+
remove: () => Promise<{ ok: true }>;
|
|
42
|
+
/** Read the file now and report the drift. */
|
|
43
|
+
check: () => Promise<GitopsCheck>;
|
|
44
|
+
/** Create and update what the file names (never deletes). */
|
|
45
|
+
apply: () => Promise<{ steps: GitopsApplyStep[]; check: GitopsCheck }>;
|
|
46
|
+
/** The live instance as the file, to commit. */
|
|
47
|
+
export: () => Promise<{ file: string }>;
|
|
48
|
+
};
|
|
33
49
|
system: {
|
|
34
50
|
resources: () => Promise<DockerResources>;
|
|
35
51
|
pruneImages: () => Promise<{ ok: boolean }>;
|
|
@@ -175,6 +191,14 @@ export interface SystemApi {
|
|
|
175
191
|
export function systemApi(t: Transport): SystemApi {
|
|
176
192
|
const { get, send, request } = t;
|
|
177
193
|
return {
|
|
194
|
+
gitops: {
|
|
195
|
+
get: () => get<GitopsView>('/v1/gitops'),
|
|
196
|
+
configure: (input) => send<GitopsView>('PUT', '/v1/gitops', input),
|
|
197
|
+
remove: () => send<{ ok: true }>('DELETE', '/v1/gitops'),
|
|
198
|
+
check: () => send<GitopsCheck>('POST', '/v1/gitops/check'),
|
|
199
|
+
apply: () => send<{ steps: GitopsApplyStep[]; check: GitopsCheck }>('POST', '/v1/gitops/apply'),
|
|
200
|
+
export: () => get<{ file: string }>('/v1/gitops/export?format=json'),
|
|
201
|
+
},
|
|
178
202
|
system: {
|
|
179
203
|
resources: () => get<DockerResources>('/v1/system/resources'),
|
|
180
204
|
pruneImages: () => send<{ ok: boolean }>('POST', '/v1/system/prune-images'),
|
package/src/resources/traefik.ts
CHANGED
|
@@ -76,6 +76,11 @@ export interface TraefikApi {
|
|
|
76
76
|
replace: (id: number, input: CustomCertificateReplace) => Promise<CustomCertificateSaved>;
|
|
77
77
|
delete: (id: number) => Promise<{ ok: boolean }>;
|
|
78
78
|
};
|
|
79
|
+
/** G5.7: give node proxies the panel's ACME certificates for the hosts they route (operator; off by default). */
|
|
80
|
+
sharedCertificates: {
|
|
81
|
+
get: () => Promise<{ enabled: boolean }>;
|
|
82
|
+
set: (enabled: boolean) => Promise<{ enabled: boolean }>;
|
|
83
|
+
};
|
|
79
84
|
};
|
|
80
85
|
}
|
|
81
86
|
|
|
@@ -120,6 +125,10 @@ export function traefikApi(t: Transport): TraefikApi {
|
|
|
120
125
|
replace: (id, input) => send<CustomCertificateSaved>('PUT', `/v1/traefik/certificates/custom/${id}`, input),
|
|
121
126
|
delete: (id) => send<{ ok: boolean }>('DELETE', `/v1/traefik/certificates/custom/${id}`),
|
|
122
127
|
},
|
|
128
|
+
sharedCertificates: {
|
|
129
|
+
get: () => get<{ enabled: boolean }>('/v1/traefik/certificates/shared'),
|
|
130
|
+
set: (enabled) => send<{ enabled: boolean }>('PUT', '/v1/traefik/certificates/shared', { enabled }),
|
|
131
|
+
},
|
|
123
132
|
},
|
|
124
133
|
};
|
|
125
134
|
}
|