@mittwald/cli 1.0.0-alpha.25 → 1.0.0-alpha.27
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 +1002 -241
- package/dist/esm/GetBaseCommand.d.ts +1 -1
- package/dist/esm/ListBaseCommand.d.ts +1 -1
- package/dist/esm/commands/app/create/python.d.ts +12 -0
- package/dist/esm/commands/app/create/python.js +13 -0
- package/dist/esm/commands/app/create/static.d.ts +1 -1
- package/dist/esm/commands/app/create/static.js +1 -1
- package/dist/esm/commands/app/dependency/list.d.ts +1 -1
- package/dist/esm/commands/app/dependency/versions.d.ts +1 -1
- package/dist/esm/commands/app/get.d.ts +1 -1
- package/dist/esm/commands/app/install/drupal.d.ts +11 -0
- package/dist/esm/commands/app/install/drupal.js +21 -0
- package/dist/esm/commands/app/install/grav.d.ts +11 -0
- package/dist/esm/commands/app/install/grav.js +22 -0
- package/dist/esm/commands/app/install/nextcloud.d.ts +11 -0
- package/dist/esm/commands/app/install/nextcloud.js +21 -0
- package/dist/esm/commands/app/ssh.js +1 -1
- package/dist/esm/commands/{project/backup → backup}/create.d.ts +3 -1
- package/dist/esm/commands/{project/backup → backup}/create.js +8 -6
- package/dist/esm/commands/{project/backup → backup}/delete.d.ts +3 -1
- package/dist/esm/commands/{project/backup → backup}/delete.js +3 -1
- package/dist/esm/commands/{project/backup → backup}/download.d.ts +4 -2
- package/dist/esm/commands/{project/backup → backup}/download.js +8 -6
- package/dist/esm/commands/{project/backup → backup}/get.d.ts +4 -2
- package/dist/esm/commands/{project/backup → backup}/get.js +7 -5
- package/dist/esm/commands/{project/backup → backup}/list.d.ts +5 -3
- package/dist/esm/commands/{project/backup → backup}/list.js +5 -3
- package/dist/esm/commands/{project/backupschedule → backup/schedule}/list.d.ts +2 -0
- package/dist/esm/commands/{project/backupschedule → backup/schedule}/list.js +2 -0
- package/dist/esm/commands/context/get.d.ts +1 -1
- package/dist/esm/commands/conversation/categories.d.ts +11 -4
- package/dist/esm/commands/conversation/categories.js +11 -3
- package/dist/esm/commands/conversation/list.d.ts +11 -4
- package/dist/esm/commands/conversation/list.js +11 -3
- package/dist/esm/commands/conversation/show.js +0 -3
- package/dist/esm/commands/{project/cronjob → cronjob}/execution/get.d.ts +5 -4
- package/dist/esm/commands/{project/cronjob → cronjob}/execution/get.js +5 -6
- package/dist/esm/commands/{project/cronjob → cronjob}/execution/list.d.ts +6 -4
- package/dist/esm/commands/{project/cronjob → cronjob}/execution/list.js +4 -2
- package/dist/esm/commands/{project/cronjob → cronjob}/execution/logs.d.ts +3 -1
- package/dist/esm/commands/{project/cronjob → cronjob}/execution/logs.js +4 -2
- package/dist/esm/{generated/cronjob/getCronjob.d.ts → commands/cronjob/get.d.ts} +5 -5
- package/dist/esm/commands/cronjob/get.js +20 -0
- package/dist/esm/commands/{project/cronjob → cronjob}/list.d.ts +5 -3
- package/dist/esm/commands/{project/cronjob → cronjob}/list.js +5 -3
- package/dist/esm/commands/database/mysql/charsets.d.ts +1 -1
- package/dist/esm/commands/database/mysql/create.js +2 -2
- package/dist/esm/commands/database/mysql/delete.js +2 -2
- package/dist/esm/commands/database/mysql/get.d.ts +2 -2
- package/dist/esm/commands/database/mysql/get.js +2 -2
- package/dist/esm/commands/database/mysql/phpmyadmin.js +1 -1
- package/dist/esm/commands/database/mysql/user/get.d.ts +1 -1
- package/dist/esm/commands/database/mysql/user/get.js +1 -1
- package/dist/esm/commands/database/mysql/versions.d.ts +1 -1
- package/dist/esm/commands/database/redis/create.js +1 -1
- package/dist/esm/commands/database/redis/get.d.ts +2 -2
- package/dist/esm/commands/database/redis/get.js +1 -1
- package/dist/esm/commands/domain/dnszone/get.d.ts +14 -2
- package/dist/esm/commands/domain/dnszone/get.js +18 -5
- package/dist/esm/commands/domain/dnszone/list.d.ts +12 -2
- package/dist/esm/commands/domain/dnszone/list.js +15 -5
- package/dist/esm/commands/domain/get.d.ts +13 -2
- package/dist/esm/commands/domain/get.js +18 -5
- package/dist/esm/commands/domain/ownership/get.d.ts +14 -2
- package/dist/esm/commands/domain/ownership/get.js +18 -5
- package/dist/esm/commands/domain/virtualhost/get.d.ts +1 -1
- package/dist/esm/commands/domain/virtualhost/list.js +4 -1
- package/dist/esm/commands/mail/address/create.js +1 -1
- package/dist/esm/commands/mail/address/delete.js +2 -2
- package/dist/esm/commands/mail/address/get.d.ts +15 -2
- package/dist/esm/commands/mail/address/get.js +21 -5
- package/dist/esm/commands/mail/address/list.d.ts +3 -3
- package/dist/esm/commands/mail/address/list.js +1 -1
- package/dist/esm/commands/mail/deliverybox/get.d.ts +15 -2
- package/dist/esm/commands/mail/deliverybox/get.js +21 -5
- package/dist/esm/commands/mail/deliverybox/list.d.ts +3 -3
- package/dist/esm/commands/mail/deliverybox/list.js +1 -1
- package/dist/esm/commands/org/get.d.ts +1 -1
- package/dist/esm/commands/org/invite/list-own.d.ts +1 -1
- package/dist/esm/commands/org/list.d.ts +1 -1
- package/dist/esm/commands/org/membership/list-own.d.ts +1 -1
- package/dist/esm/commands/org/membership/list.d.ts +3 -0
- package/dist/esm/commands/project/create.js +1 -1
- package/dist/esm/commands/project/filesystem/usage.js +1 -1
- package/dist/esm/commands/project/get.d.ts +1 -1
- package/dist/esm/commands/project/get.js +1 -1
- package/dist/esm/commands/project/invite/get.d.ts +13 -2
- package/dist/esm/commands/project/invite/get.js +18 -5
- package/dist/esm/commands/project/invite/list-own.d.ts +10 -3
- package/dist/esm/commands/project/invite/list-own.js +10 -2
- package/dist/esm/commands/project/invite/list.d.ts +10 -4
- package/dist/esm/commands/project/invite/list.js +13 -7
- package/dist/esm/commands/project/list.d.ts +2 -3
- package/dist/esm/commands/project/membership/get-own.d.ts +11 -3
- package/dist/esm/commands/project/membership/get-own.js +14 -9
- package/dist/esm/commands/project/membership/get.d.ts +13 -2
- package/dist/esm/commands/project/membership/get.js +18 -5
- package/dist/esm/commands/project/membership/list-own.d.ts +10 -3
- package/dist/esm/commands/project/membership/list-own.js +10 -2
- package/dist/esm/commands/project/membership/list.d.ts +10 -4
- package/dist/esm/commands/project/membership/list.js +15 -7
- package/dist/esm/commands/project/ssh.js +2 -2
- package/dist/esm/commands/server/get.d.ts +15 -2
- package/dist/esm/commands/server/get.js +17 -5
- package/dist/esm/commands/server/list.d.ts +10 -3
- package/dist/esm/commands/server/list.js +10 -2
- package/dist/esm/commands/{project/sftp-user → sftp-user}/list.d.ts +5 -3
- package/dist/esm/commands/{project/sftp-user → sftp-user}/list.js +4 -2
- package/dist/esm/commands/{project/ssh-user → ssh-user}/list.d.ts +5 -3
- package/dist/esm/commands/{project/ssh-user → ssh-user}/list.js +4 -2
- package/dist/esm/commands/user/api-token/get.d.ts +13 -2
- package/dist/esm/commands/user/api-token/get.js +18 -5
- package/dist/esm/commands/user/api-token/list.d.ts +10 -3
- package/dist/esm/commands/user/api-token/list.js +10 -2
- package/dist/esm/commands/user/get.d.ts +1 -1
- package/dist/esm/commands/user/session/get.d.ts +13 -2
- package/dist/esm/commands/user/session/get.js +18 -5
- package/dist/esm/commands/user/session/list.d.ts +10 -3
- package/dist/esm/commands/user/session/list.js +10 -2
- package/dist/esm/commands/user/ssh-key/get.d.ts +13 -2
- package/dist/esm/commands/user/ssh-key/get.js +18 -5
- package/dist/esm/commands/user/ssh-key/list.d.ts +10 -3
- package/dist/esm/commands/user/ssh-key/list.js +10 -2
- package/dist/esm/lib/database/common.js +1 -1
- package/dist/esm/lib/database/mysql/connect.js +2 -2
- package/dist/esm/lib/database/redis/connect.js +2 -2
- package/dist/esm/lib/project/hooks.js +2 -2
- package/dist/esm/lib/project/shortId.js +1 -1
- package/dist/esm/rendering/process/components/ProcessConfirmation.d.ts +1 -1
- package/dist/esm/rendering/process/components/ProcessInput.d.ts +1 -1
- package/dist/esm/rendering/react/RenderBaseCommand.d.ts +2 -2
- package/package.json +31 -30
- package/dist/esm/commands/domain/get-handle.d.ts +0 -3
- package/dist/esm/commands/domain/get-handle.js +0 -6
- package/dist/esm/commands/project/cronjob/get.d.ts +0 -3
- package/dist/esm/commands/project/cronjob/get.js +0 -6
- package/dist/esm/generated/conversation/getCategory.d.ts +0 -16
- package/dist/esm/generated/conversation/getCategory.js +0 -25
- package/dist/esm/generated/conversation/getConversation.d.ts +0 -16
- package/dist/esm/generated/conversation/getConversation.js +0 -25
- package/dist/esm/generated/conversation/listCategories.d.ts +0 -13
- package/dist/esm/generated/conversation/listCategories.js +0 -15
- package/dist/esm/generated/conversation/listConversations.d.ts +0 -13
- package/dist/esm/generated/conversation/listConversations.js +0 -15
- package/dist/esm/generated/conversation/listMessagesByConversation.d.ts +0 -13
- package/dist/esm/generated/conversation/listMessagesByConversation.js +0 -22
- package/dist/esm/generated/cronjob/getCronjob.js +0 -25
- package/dist/esm/generated/cronjob/getExecution.d.ts +0 -16
- package/dist/esm/generated/cronjob/getExecution.js +0 -29
- package/dist/esm/generated/domain/dnsZoneGetSpecific.d.ts +0 -16
- package/dist/esm/generated/domain/dnsZoneGetSpecific.js +0 -25
- package/dist/esm/generated/domain/dnsZonesForProject.d.ts +0 -14
- package/dist/esm/generated/domain/dnsZonesForProject.js +0 -24
- package/dist/esm/generated/domain/getDomain.d.ts +0 -16
- package/dist/esm/generated/domain/getDomain.js +0 -25
- package/dist/esm/generated/domain/getHandleFields.d.ts +0 -16
- package/dist/esm/generated/domain/getHandleFields.js +0 -25
- package/dist/esm/generated/domain/getSpecificDomainOwnership.d.ts +0 -16
- package/dist/esm/generated/domain/getSpecificDomainOwnership.js +0 -25
- package/dist/esm/generated/file/getFile.d.ts +0 -16
- package/dist/esm/generated/file/getFile.js +0 -25
- package/dist/esm/generated/file/getFileMeta.d.ts +0 -14
- package/dist/esm/generated/file/getFileMeta.js +0 -24
- package/dist/esm/generated/file/getFileTokenRules.d.ts +0 -16
- package/dist/esm/generated/file/getFileTokenRules.js +0 -25
- package/dist/esm/generated/file/getFileTypeRules.d.ts +0 -16
- package/dist/esm/generated/file/getFileTypeRules.js +0 -25
- package/dist/esm/generated/mail/deliveryboxGetSpecific.d.ts +0 -16
- package/dist/esm/generated/mail/deliveryboxGetSpecific.js +0 -25
- package/dist/esm/generated/mail/mailaddressGetSpecific.d.ts +0 -16
- package/dist/esm/generated/mail/mailaddressGetSpecific.js +0 -25
- package/dist/esm/generated/mail/mailaddressList.d.ts +0 -13
- package/dist/esm/generated/mail/mailaddressList.js +0 -22
- package/dist/esm/generated/mail/projectsettingGetSpecific.d.ts +0 -14
- package/dist/esm/generated/mail/projectsettingGetSpecific.js +0 -24
- package/dist/esm/generated/notification/newsletterGetInfo.d.ts +0 -14
- package/dist/esm/generated/notification/newsletterGetInfo.js +0 -16
- package/dist/esm/generated/notification/scountUnreadNotifications.d.ts +0 -14
- package/dist/esm/generated/notification/scountUnreadNotifications.js +0 -16
- package/dist/esm/generated/notification/slistNotifications.d.ts +0 -13
- package/dist/esm/generated/notification/slistNotifications.js +0 -15
- package/dist/esm/generated/project/getProject.d.ts +0 -16
- package/dist/esm/generated/project/getProject.js +0 -25
- package/dist/esm/generated/project/getProjectInvite.d.ts +0 -16
- package/dist/esm/generated/project/getProjectInvite.js +0 -25
- package/dist/esm/generated/project/getProjectMembership.d.ts +0 -16
- package/dist/esm/generated/project/getProjectMembership.js +0 -25
- package/dist/esm/generated/project/getSelfMembershipForProject.d.ts +0 -14
- package/dist/esm/generated/project/getSelfMembershipForProject.js +0 -24
- package/dist/esm/generated/project/getServer.d.ts +0 -16
- package/dist/esm/generated/project/getServer.js +0 -25
- package/dist/esm/generated/project/listInvitesForProject.d.ts +0 -13
- package/dist/esm/generated/project/listInvitesForProject.js +0 -22
- package/dist/esm/generated/project/listMembershipsForProject.d.ts +0 -13
- package/dist/esm/generated/project/listMembershipsForProject.js +0 -22
- package/dist/esm/generated/project/listProjectInvites.d.ts +0 -13
- package/dist/esm/generated/project/listProjectInvites.js +0 -15
- package/dist/esm/generated/project/listProjectMemberships.d.ts +0 -13
- package/dist/esm/generated/project/listProjectMemberships.js +0 -15
- package/dist/esm/generated/project/listProjects.d.ts +0 -13
- package/dist/esm/generated/project/listProjects.js +0 -15
- package/dist/esm/generated/project/listServers.d.ts +0 -13
- package/dist/esm/generated/project/listServers.js +0 -15
- package/dist/esm/generated/user/getApiToken.d.ts +0 -16
- package/dist/esm/generated/user/getApiToken.js +0 -25
- package/dist/esm/generated/user/getPersonalizedSettings.d.ts +0 -14
- package/dist/esm/generated/user/getPersonalizedSettings.js +0 -24
- package/dist/esm/generated/user/getSession.d.ts +0 -16
- package/dist/esm/generated/user/getSession.js +0 -25
- package/dist/esm/generated/user/getSshKey.d.ts +0 -16
- package/dist/esm/generated/user/getSshKey.js +0 -25
- package/dist/esm/generated/user/listApiTokens.d.ts +0 -13
- package/dist/esm/generated/user/listApiTokens.js +0 -15
- package/dist/esm/generated/user/listFeedback.d.ts +0 -13
- package/dist/esm/generated/user/listFeedback.js +0 -22
- package/dist/esm/generated/user/listSessions.d.ts +0 -13
- package/dist/esm/generated/user/listSessions.js +0 -15
- package/dist/esm/generated/user/listSshKeys.d.ts +0 -13
- package/dist/esm/generated/user/listSshKeys.js +0 -15
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Args } from "@oclif/core";
|
|
2
|
+
import { GetBaseCommand } from "../../../GetBaseCommand.js";
|
|
3
|
+
export default class Get extends GetBaseCommand {
|
|
4
|
+
static description = "Get a specific delivery box";
|
|
5
|
+
static flags = {
|
|
6
|
+
...GetBaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
static args = {
|
|
9
|
+
id: Args.string({
|
|
10
|
+
description: "ID of the deliverybox you want to retrieve",
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
async getData() {
|
|
15
|
+
return await this.apiClient.mail.getDeliveryBox({
|
|
16
|
+
deliveryBoxId: this.args.id,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
mapParams(input) {
|
|
20
|
+
return input;
|
|
21
|
+
}
|
|
6
22
|
}
|
|
@@ -3,9 +3,9 @@ import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
|
3
3
|
import { SuccessfulResponse } from "../../../types.js";
|
|
4
4
|
import { ListColumns } from "../../../Formatter.js";
|
|
5
5
|
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
6
|
-
type ResponseItem = Simplify<MittwaldAPIV2.Paths.
|
|
7
|
-
export type PathParams = MittwaldAPIV2.Paths.
|
|
8
|
-
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["mail"]["
|
|
6
|
+
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdDeliveryBoxes.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
7
|
+
export type PathParams = MittwaldAPIV2.Paths.V2ProjectsProjectIdDeliveryBoxes.Get.Parameters.Path;
|
|
8
|
+
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["mail"]["listDeliveryBoxes"]>>;
|
|
9
9
|
export declare class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
|
|
10
10
|
static description: string;
|
|
11
11
|
static args: {};
|
|
@@ -10,7 +10,7 @@ export class List extends ListBaseCommand {
|
|
|
10
10
|
};
|
|
11
11
|
async getData() {
|
|
12
12
|
const projectId = await withProjectId(this.apiClient, List, this.flags, this.args, this.config);
|
|
13
|
-
return await this.apiClient.mail.
|
|
13
|
+
return await this.apiClient.mail.listDeliveryBoxes({ projectId });
|
|
14
14
|
}
|
|
15
15
|
mapData(data) {
|
|
16
16
|
return data;
|
|
@@ -5,7 +5,7 @@ export type PathParams = MittwaldAPIV2.Paths.V2CustomersCustomerId.Get.Parameter
|
|
|
5
5
|
export declare class Get extends RenderBaseCommand<typeof Get> {
|
|
6
6
|
static description: string;
|
|
7
7
|
static flags: {
|
|
8
|
-
[x: string]: import("@oclif/core/lib/interfaces/parser.js").
|
|
8
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
9
9
|
};
|
|
10
10
|
static args: {
|
|
11
11
|
"org-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
@@ -13,7 +13,7 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
|
|
|
13
13
|
static description: string;
|
|
14
14
|
static args: {};
|
|
15
15
|
static flags: {
|
|
16
|
-
[x: string]: import("@oclif/core/lib/interfaces/parser.js").
|
|
16
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
17
17
|
};
|
|
18
18
|
getData(): Promise<Response>;
|
|
19
19
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): Promise<(MittwaldAPIV2.Components.Schemas.MembershipCustomerInvite | {
|
|
@@ -10,7 +10,7 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static args: {};
|
|
12
12
|
static flags: {
|
|
13
|
-
[x: string]: import("@oclif/core/lib/interfaces/parser.js").
|
|
13
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
14
14
|
};
|
|
15
15
|
getData(): Promise<Response>;
|
|
16
16
|
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
@@ -13,7 +13,7 @@ export declare class ListOwn extends ListBaseCommand<typeof ListOwn, ResponseIte
|
|
|
13
13
|
static description: string;
|
|
14
14
|
static args: {};
|
|
15
15
|
static flags: {
|
|
16
|
-
[x: string]: import("@oclif/core/lib/interfaces/parser.js").
|
|
16
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
17
17
|
};
|
|
18
18
|
getData(): Promise<Response>;
|
|
19
19
|
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
@@ -20,6 +20,9 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
|
|
|
20
20
|
user: {
|
|
21
21
|
avatarRef?: string | undefined;
|
|
22
22
|
email?: string | undefined;
|
|
23
|
+
employeeInformation?: {
|
|
24
|
+
department: string;
|
|
25
|
+
} | undefined;
|
|
23
26
|
person: MittwaldAPIV2.Components.Schemas.CommonsPerson;
|
|
24
27
|
phoneNumber?: string | undefined;
|
|
25
28
|
registeredAt?: string | undefined;
|
|
@@ -42,7 +42,7 @@ export default class Create extends ExecRenderBaseCommand {
|
|
|
42
42
|
const stepWaiting = process.addStep(_jsx(Text, { children: "waiting for project to be ready" }));
|
|
43
43
|
await waitUntil(async () => {
|
|
44
44
|
const projectResponse = await this.apiClient.project.getProject({
|
|
45
|
-
|
|
45
|
+
projectId: result.data.id,
|
|
46
46
|
headers: { "if-event-reached": eventId },
|
|
47
47
|
});
|
|
48
48
|
if (projectResponse.status === 200 &&
|
|
@@ -23,7 +23,7 @@ export class Usage extends RenderBaseCommand {
|
|
|
23
23
|
static args = { ...projectArgs };
|
|
24
24
|
render() {
|
|
25
25
|
const projectId = usePromise(() => withProjectId(this.apiClient, Usage, this.flags, this.args, this.config), []);
|
|
26
|
-
const project = usePromise((
|
|
26
|
+
const project = usePromise((projectId) => this.apiClient.project.getProject({ projectId }), [projectId]);
|
|
27
27
|
const projectDiskUsage = usePromise((id) => this.apiClient.projectFileSystem.getDiskUsage({
|
|
28
28
|
projectId: id,
|
|
29
29
|
}), [projectId]);
|
|
@@ -4,7 +4,7 @@ import { RenderBaseCommand } from "../../rendering/react/RenderBaseCommand.js";
|
|
|
4
4
|
export declare class Get extends RenderBaseCommand<typeof Get> {
|
|
5
5
|
static description: string;
|
|
6
6
|
static flags: {
|
|
7
|
-
[x: string]: import("@oclif/core/lib/interfaces/parser.js").
|
|
7
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
8
8
|
};
|
|
9
9
|
static args: {
|
|
10
10
|
"project-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
@@ -72,7 +72,7 @@ export class Get extends RenderBaseCommand {
|
|
|
72
72
|
formatter = new GetFormatter(new ComponentPrinter((r) => _jsx(GetProject, { response: r })));
|
|
73
73
|
render() {
|
|
74
74
|
const projectId = usePromise(() => withProjectId(this.apiClient, Get, this.flags, this.args, this.config), []);
|
|
75
|
-
const projectResponse = usePromise((
|
|
75
|
+
const projectResponse = usePromise((projectId) => this.apiClient.project.getProject({ projectId }), [projectId]);
|
|
76
76
|
assertStatus(projectResponse, 200);
|
|
77
77
|
if (this.flags.output === "json") {
|
|
78
78
|
return _jsx(RenderJson, { name: "project", data: projectResponse.data });
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { GetBaseCommand } from "../../../GetBaseCommand.js";
|
|
3
|
+
type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["project"]["getProjectInvite"]>>;
|
|
4
|
+
export default class Get extends GetBaseCommand<typeof Get, APIResponse> {
|
|
5
|
+
static description: string;
|
|
6
|
+
static flags: {
|
|
7
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
8
|
+
};
|
|
9
|
+
static args: {
|
|
10
|
+
"invite-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
11
|
+
};
|
|
12
|
+
protected getData(): Promise<APIResponse>;
|
|
3
13
|
}
|
|
14
|
+
export {};
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Args } from "@oclif/core";
|
|
2
|
+
import { GetBaseCommand } from "../../../GetBaseCommand.js";
|
|
3
|
+
export default class Get extends GetBaseCommand {
|
|
4
|
+
static description = "Get a ProjectInvite.";
|
|
5
|
+
static flags = {
|
|
6
|
+
...GetBaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
static args = {
|
|
9
|
+
"invite-id": Args.string({
|
|
10
|
+
description: "ID of the ProjectInvite to be retrieved.",
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
async getData() {
|
|
15
|
+
return await this.apiClient.project.getProjectInvite({
|
|
16
|
+
inviteId: this.args["invite-id"],
|
|
17
|
+
});
|
|
18
|
+
}
|
|
6
19
|
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
|
-
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
2
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
3
|
import { SuccessfulResponse } from "../../../types.js";
|
|
4
|
-
import { GeneratedProjectListProjectInvites, Response } from "../../../generated/project/listProjectInvites.js";
|
|
5
4
|
import { ListColumns } from "../../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
6
6
|
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectInvites.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
7
|
-
|
|
7
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["project"]["listProjectInvites"]>>;
|
|
8
|
+
export default class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
|
|
9
|
+
static description: string;
|
|
10
|
+
static args: {};
|
|
11
|
+
static flags: {
|
|
12
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
13
|
+
};
|
|
14
|
+
getData(): Promise<Response>;
|
|
8
15
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.MembershipProjectInvite[];
|
|
9
16
|
protected getColumns(): ListColumns<ResponseItem>;
|
|
10
17
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { GeneratedProjectListProjectInvites, } from "../../../generated/project/listProjectInvites.js";
|
|
2
1
|
import { formatRelativeDate } from "../../../lib/viewhelpers/date.js";
|
|
3
|
-
|
|
2
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
3
|
+
export default class List extends ListBaseCommand {
|
|
4
|
+
static description = "List all project invites for the executing user.";
|
|
5
|
+
static args = {};
|
|
6
|
+
static flags = {
|
|
7
|
+
...ListBaseCommand.baseFlags,
|
|
8
|
+
};
|
|
9
|
+
async getData() {
|
|
10
|
+
return await this.apiClient.project.listProjectInvites();
|
|
11
|
+
}
|
|
4
12
|
mapData(data) {
|
|
5
13
|
return data;
|
|
6
14
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
|
-
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
2
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
3
|
import { SuccessfulResponse } from "../../../types.js";
|
|
4
|
-
import { GeneratedProjectListInvitesForProject, PathParams, Response } from "../../../generated/project/listInvitesForProject.js";
|
|
5
4
|
import { ListColumns } from "../../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
6
6
|
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdInvites.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
7
|
-
|
|
7
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["project"]["listInvitesForProject"]>>;
|
|
8
|
+
export default class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
|
|
9
|
+
static description: string;
|
|
10
|
+
static args: {};
|
|
11
|
+
static flags: {
|
|
12
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
13
|
+
};
|
|
14
|
+
getData(): Promise<Response>;
|
|
8
15
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.MembershipProjectInvite[];
|
|
9
|
-
protected mapParams(input: PathParams): Promise<PathParams>;
|
|
10
16
|
protected getColumns(): ListColumns<ResponseItem>;
|
|
11
17
|
}
|
|
12
18
|
export {};
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { GeneratedProjectListInvitesForProject, } from "../../../generated/project/listInvitesForProject.js";
|
|
2
|
-
import { normalizeProjectIdToUuid } from "../../../Helpers.js";
|
|
3
1
|
import { formatRelativeDate } from "../../../lib/viewhelpers/date.js";
|
|
4
|
-
|
|
2
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
3
|
+
import { projectFlags, withProjectId } from "../../../lib/project/flags.js";
|
|
4
|
+
export default class List extends ListBaseCommand {
|
|
5
|
+
static description = "List all invites belonging to a project.";
|
|
6
|
+
static args = {};
|
|
7
|
+
static flags = {
|
|
8
|
+
...ListBaseCommand.baseFlags,
|
|
9
|
+
...projectFlags,
|
|
10
|
+
};
|
|
11
|
+
async getData() {
|
|
12
|
+
const projectId = await withProjectId(this.apiClient, List, this.flags, this.args, this.config);
|
|
13
|
+
return await this.apiClient.project.listInvitesForProject({ projectId });
|
|
14
|
+
}
|
|
5
15
|
mapData(data) {
|
|
6
16
|
return data;
|
|
7
17
|
}
|
|
8
|
-
async mapParams(input) {
|
|
9
|
-
input.projectId = await normalizeProjectIdToUuid(this.apiClient, input.projectId);
|
|
10
|
-
return super.mapParams(input);
|
|
11
|
-
}
|
|
12
18
|
getColumns() {
|
|
13
19
|
return {
|
|
14
20
|
id: {
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
2
|
import { ListColumns } from "../../Formatter.js";
|
|
3
3
|
import { MittwaldAPIV2, MittwaldAPIV2Client, MittwaldAPIV2Client as MittwaldAPIClient } from "@mittwald/api-client";
|
|
4
|
-
import { GeneratedProjectListProjects } from "../../generated/project/listProjects.js";
|
|
5
4
|
import { SuccessfulResponse } from "../../types.js";
|
|
6
5
|
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
7
6
|
type ProjectResponse = Awaited<ReturnType<MittwaldAPIClient["project"]["listProjects"]>>;
|
|
8
7
|
type ProjectResponseItem = Simplify<MittwaldAPIV2.Paths.V2Projects.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
9
8
|
type Response = Awaited<ReturnType<MittwaldAPIV2Client["project"]["listProjects"]>>;
|
|
10
|
-
export declare class List extends ListBaseCommand<typeof
|
|
9
|
+
export declare class List extends ListBaseCommand<typeof List, ProjectResponseItem, Response> {
|
|
11
10
|
static description: string;
|
|
12
11
|
static args: {};
|
|
13
12
|
static flags: {
|
|
14
|
-
[x: string]: import("@oclif/core/lib/interfaces/parser.js").
|
|
13
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
15
14
|
};
|
|
16
15
|
getData(): Promise<Response>;
|
|
17
16
|
protected mapData(data: SuccessfulResponse<ProjectResponse, 200>["data"]): ProjectResponseItem[];
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { GetBaseCommand } from "../../../GetBaseCommand.js";
|
|
3
|
+
type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["project"]["getSelfMembershipForProject"]>>;
|
|
4
|
+
export default class GetOwn extends GetBaseCommand<typeof GetOwn, APIResponse> {
|
|
5
|
+
static description: string;
|
|
6
|
+
static flags: {
|
|
7
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
8
|
+
};
|
|
9
|
+
static args: {};
|
|
10
|
+
protected getData(): Promise<APIResponse>;
|
|
4
11
|
}
|
|
12
|
+
export {};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { GetBaseCommand } from "../../../GetBaseCommand.js";
|
|
2
|
+
import { projectFlags, withProjectId } from "../../../lib/project/flags.js";
|
|
3
|
+
export default class GetOwn extends GetBaseCommand {
|
|
4
|
+
static description = "Get the executing user's membership in a Project.";
|
|
5
|
+
static flags = {
|
|
6
|
+
...GetBaseCommand.baseFlags,
|
|
7
|
+
...projectFlags,
|
|
8
|
+
};
|
|
9
|
+
static args = {};
|
|
10
|
+
async getData() {
|
|
11
|
+
const projectId = await withProjectId(this.apiClient, GetOwn, this.flags, this.args, this.config);
|
|
12
|
+
return await this.apiClient.project.getSelfMembershipForProject({
|
|
13
|
+
projectId,
|
|
14
|
+
});
|
|
10
15
|
}
|
|
11
16
|
}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { GetBaseCommand } from "../../../GetBaseCommand.js";
|
|
3
|
+
type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["project"]["getProjectMembership"]>>;
|
|
4
|
+
export default class Get extends GetBaseCommand<typeof Get, APIResponse> {
|
|
5
|
+
static description: string;
|
|
6
|
+
static flags: {
|
|
7
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
8
|
+
};
|
|
9
|
+
static args: {
|
|
10
|
+
"membership-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
11
|
+
};
|
|
12
|
+
protected getData(): Promise<APIResponse>;
|
|
3
13
|
}
|
|
14
|
+
export {};
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Args } from "@oclif/core";
|
|
2
|
+
import { GetBaseCommand } from "../../../GetBaseCommand.js";
|
|
3
|
+
export default class Get extends GetBaseCommand {
|
|
4
|
+
static description = "Get a ProjectMembership";
|
|
5
|
+
static flags = {
|
|
6
|
+
...GetBaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
static args = {
|
|
9
|
+
"membership-id": Args.string({
|
|
10
|
+
description: "ID of the ProjectMembership to be retrieved.",
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
async getData() {
|
|
15
|
+
return await this.apiClient.project.getProjectMembership({
|
|
16
|
+
membershipId: this.args["membership-id"],
|
|
17
|
+
});
|
|
18
|
+
}
|
|
6
19
|
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
|
-
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
2
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
3
|
import { SuccessfulResponse } from "../../../types.js";
|
|
4
|
-
import { GeneratedProjectListProjectMemberships, Response } from "../../../generated/project/listProjectMemberships.js";
|
|
5
4
|
import { ListColumns } from "../../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
6
6
|
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectMemberships.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
7
|
-
|
|
7
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["project"]["listProjectMemberships"]>>;
|
|
8
|
+
export default class ListOwn extends ListBaseCommand<typeof ListOwn, ResponseItem, Response> {
|
|
9
|
+
static description: string;
|
|
10
|
+
static args: {};
|
|
11
|
+
static flags: {
|
|
12
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
13
|
+
};
|
|
14
|
+
getData(): Promise<Response>;
|
|
8
15
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.MembershipProjectMembership[];
|
|
9
16
|
protected getColumns(): ListColumns<ResponseItem>;
|
|
10
17
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { GeneratedProjectListProjectMemberships, } from "../../../generated/project/listProjectMemberships.js";
|
|
2
1
|
import { formatRelativeDate } from "../../../lib/viewhelpers/date.js";
|
|
3
|
-
|
|
2
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
3
|
+
export default class ListOwn extends ListBaseCommand {
|
|
4
|
+
static description = "List ProjectMemberships belonging to the executing user.";
|
|
5
|
+
static args = {};
|
|
6
|
+
static flags = {
|
|
7
|
+
...ListBaseCommand.baseFlags,
|
|
8
|
+
};
|
|
9
|
+
async getData() {
|
|
10
|
+
return await this.apiClient.project.listProjectMemberships();
|
|
11
|
+
}
|
|
4
12
|
mapData(data) {
|
|
5
13
|
return data;
|
|
6
14
|
}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
|
-
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
2
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
3
|
import { SuccessfulResponse } from "../../../types.js";
|
|
4
|
-
import { GeneratedProjectListMembershipsForProject, PathParams, Response } from "../../../generated/project/listMembershipsForProject.js";
|
|
5
4
|
import { ListColumns } from "../../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
6
6
|
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdMemberships.Get.Responses.$200.Content.ApplicationJson[number]> & {
|
|
7
7
|
user?: MittwaldAPIV2.Components.Schemas.UserUser;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["project"]["listMembershipsForProject"]>>;
|
|
10
|
+
export default class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
|
|
11
|
+
static description: string;
|
|
12
|
+
static args: {};
|
|
13
|
+
static flags: {
|
|
14
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
15
|
+
};
|
|
16
|
+
getData(): Promise<Response>;
|
|
10
17
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): Promise<({
|
|
11
18
|
expiresAt?: string | undefined;
|
|
12
19
|
id: string;
|
|
@@ -19,7 +26,6 @@ export default class List extends GeneratedProjectListMembershipsForProject<Resp
|
|
|
19
26
|
} & {
|
|
20
27
|
user?: MittwaldAPIV2.Components.Schemas.UserUser | undefined;
|
|
21
28
|
})[]>;
|
|
22
|
-
protected mapParams(input: PathParams): Promise<PathParams>;
|
|
23
29
|
protected getColumns(): ListColumns<ResponseItem>;
|
|
24
30
|
}
|
|
25
31
|
export {};
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import { GeneratedProjectListMembershipsForProject, } from "../../../generated/project/listMembershipsForProject.js";
|
|
2
1
|
import { formatRelativeDate } from "../../../lib/viewhelpers/date.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
3
|
+
import { projectFlags, withProjectId } from "../../../lib/project/flags.js";
|
|
4
|
+
export default class List extends ListBaseCommand {
|
|
5
|
+
static description = "List all memberships for a Project.";
|
|
6
|
+
static args = {};
|
|
7
|
+
static flags = {
|
|
8
|
+
...ListBaseCommand.baseFlags,
|
|
9
|
+
...projectFlags,
|
|
10
|
+
};
|
|
11
|
+
async getData() {
|
|
12
|
+
const pathParams = {
|
|
13
|
+
projectId: await withProjectId(this.apiClient, List, this.flags, this.args, this.config),
|
|
14
|
+
};
|
|
15
|
+
return await this.apiClient.project.listMembershipsForProject(pathParams);
|
|
16
|
+
}
|
|
5
17
|
mapData(data) {
|
|
6
18
|
return Promise.all(data.map(async (item) => {
|
|
7
19
|
const out = structuredClone(item);
|
|
@@ -14,10 +26,6 @@ export default class List extends GeneratedProjectListMembershipsForProject {
|
|
|
14
26
|
return out;
|
|
15
27
|
}));
|
|
16
28
|
}
|
|
17
|
-
async mapParams(input) {
|
|
18
|
-
input.projectId = await normalizeProjectIdToUuid(this.apiClient, input.projectId);
|
|
19
|
-
return super.mapParams(input);
|
|
20
|
-
}
|
|
21
29
|
getColumns() {
|
|
22
30
|
return {
|
|
23
31
|
id: {
|
|
@@ -7,9 +7,9 @@ export default class Ssh extends BaseCommand {
|
|
|
7
7
|
static args = { ...projectArgs };
|
|
8
8
|
async run() {
|
|
9
9
|
const { args } = await this.parse(Ssh);
|
|
10
|
-
const
|
|
10
|
+
const projectId = await withProjectId(this.apiClient, Ssh, {}, args, this.config);
|
|
11
11
|
const projectResponse = await this.apiClient.project.getProject({
|
|
12
|
-
|
|
12
|
+
projectId,
|
|
13
13
|
});
|
|
14
14
|
const userResponse = await this.apiClient.user.getOwnAccount();
|
|
15
15
|
assertStatus(projectResponse, 200);
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
3
|
+
type PathParams = MittwaldAPIV2.Paths.V2ServersServerId.Get.Parameters.Path;
|
|
4
|
+
type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["project"]["getServer"]>>;
|
|
5
|
+
export default class Get extends GetBaseCommand<typeof Get, APIResponse> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static flags: {
|
|
8
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
9
|
+
};
|
|
10
|
+
static args: {
|
|
11
|
+
"server-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
12
|
+
};
|
|
13
|
+
protected getData(): Promise<APIResponse>;
|
|
14
|
+
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
3
15
|
}
|
|
16
|
+
export {};
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
2
|
+
import { serverArgs, withServerId } from "../../lib/server/flags.js";
|
|
3
|
+
export default class Get extends GetBaseCommand {
|
|
4
|
+
static description = "Get a server.";
|
|
5
|
+
static flags = {
|
|
6
|
+
...GetBaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
static args = {
|
|
9
|
+
...serverArgs,
|
|
10
|
+
};
|
|
11
|
+
async getData() {
|
|
12
|
+
const serverId = await withServerId(this.apiClient, Get, this.flags, this.args, this.config);
|
|
13
|
+
return await this.apiClient.project.getServer({ serverId });
|
|
14
|
+
}
|
|
15
|
+
mapParams(input) {
|
|
16
|
+
return input;
|
|
17
|
+
}
|
|
6
18
|
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
|
-
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
2
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
3
|
import { SuccessfulResponse } from "../../types.js";
|
|
4
|
-
import { GeneratedProjectListServers, Response } from "../../generated/project/listServers.js";
|
|
5
4
|
import { ListColumns } from "../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
6
6
|
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2Servers.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
7
|
-
|
|
7
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["project"]["listServers"]>>;
|
|
8
|
+
export default class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
|
|
9
|
+
static description: string;
|
|
10
|
+
static args: {};
|
|
11
|
+
static flags: {
|
|
12
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
13
|
+
};
|
|
14
|
+
getData(): Promise<Response>;
|
|
8
15
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.ProjectServer[];
|
|
9
16
|
protected getColumns(ignoredData: ResponseItem[]): ListColumns<ResponseItem>;
|
|
10
17
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class List extends
|
|
1
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
2
|
+
export default class List extends ListBaseCommand {
|
|
3
|
+
static description = "List servers for an organization or user.";
|
|
4
|
+
static args = {};
|
|
5
|
+
static flags = {
|
|
6
|
+
...ListBaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
async getData() {
|
|
9
|
+
return await this.apiClient.project.listServers();
|
|
10
|
+
}
|
|
3
11
|
mapData(data) {
|
|
4
12
|
return data;
|
|
5
13
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
2
|
import { Simplify } from "@mittwald/api-client-commons";
|
|
3
|
-
import { SuccessfulResponse } from "
|
|
4
|
-
import { ListColumns } from "
|
|
5
|
-
import { ListBaseCommand } from "
|
|
3
|
+
import { SuccessfulResponse } from "../../types.js";
|
|
4
|
+
import { ListColumns } from "../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
6
6
|
type SftpUserResponse = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sftpUserListSftpUsers"]>>;
|
|
7
7
|
type SftpUserResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdSftpUsers.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
8
8
|
type Response = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sftpUserListSftpUsers"]>>;
|
|
@@ -12,6 +12,8 @@ export default class List extends ListBaseCommand<typeof List, SftpUserResponseI
|
|
|
12
12
|
static flags: {
|
|
13
13
|
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
14
|
};
|
|
15
|
+
static aliases: string[];
|
|
16
|
+
static deprecateAliases: boolean;
|
|
15
17
|
getData(): Promise<Response>;
|
|
16
18
|
protected mapData(data: SuccessfulResponse<SftpUserResponse, 200>["data"]): SftpUserResponseItem[];
|
|
17
19
|
protected getColumns(data: SftpUserResponseItem[]): ListColumns<SftpUserResponseItem>;
|