Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit a513586

Browse files
authored
More APIs
1 parent e593eed commit a513586

2 files changed

Lines changed: 40 additions & 27 deletions

File tree

src/base/apps.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -123,31 +123,4 @@ export class ManagerApps extends ApiConnection {
123123
updateStatus() {
124124
return this.get<appUpdateStatus>("update-status");
125125
}
126-
127-
/**
128-
* Enable Let's encrypt. This also accepts the Let's encrypt terms of service.
129-
*
130-
* @param email The user's email address
131-
*/
132-
enableLetsEncrypt(email: string) {
133-
return this.post<void>("enable-letsencrypt", {
134-
email,
135-
acceptedTos: true,
136-
});
137-
}
138-
139-
letsEncryptStatus() {
140-
return this.get<{
141-
email?: string;
142-
agreed_lets_encrypt_tos?: boolean;
143-
app_domains?: Record<string, string>;
144-
}>("letsencrypt");
145-
}
146-
147-
addDomain(app: string, domain: string) {
148-
return this.post<void>("add-domain", {
149-
app,
150-
domain,
151-
});
152-
}
153126
}

src/base/auth.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,44 @@ export class ManagerAuth extends ApiConnection {
200200
public async isTotpEnabled(): Promise<boolean> {
201201
return (await this.get<{totpEnabled: boolean}>('totp/status')).totpEnabled;
202202
}
203+
204+
runningCitadelStatus() {
205+
return this.get<{
206+
isSetup: boolean;
207+
username: string;
208+
password: string;
209+
subdomain: string;
210+
}>("runningcitadel");
211+
}
212+
213+
/**
214+
* Enable Let's encrypt. This also accepts the Let's encrypt terms of service.
215+
*
216+
* @param email The user's email address
217+
*/
218+
enableLetsEncrypt(email: string) {
219+
return this.post<void>("enable-letsencrypt", {
220+
email,
221+
acceptedTos: true,
222+
});
223+
}
224+
225+
letsEncryptStatus() {
226+
return this.get<{
227+
email?: string;
228+
agreed_lets_encrypt_tos?: boolean;
229+
app_domains?: Record<string, string>;
230+
}>("letsencrypt");
231+
}
232+
233+
addDomain(app: string, domain: string) {
234+
return this.post<void>("add-domain", {
235+
app,
236+
domain,
237+
});
238+
}
239+
240+
ipAddr() {
241+
return this.get<string>("ip-addr");
242+
}
203243
}

0 commit comments

Comments
 (0)