@mittwald/cli 1.0.0-alpha.24 → 1.0.0-alpha.26
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 +770 -231
- package/dist/esm/GetBaseCommand.d.ts +1 -1
- package/dist/esm/ListBaseCommand.d.ts +1 -1
- package/dist/esm/commands/app/create/static.d.ts +12 -0
- package/dist/esm/commands/app/create/static.js +13 -0
- 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/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/list.js +0 -6
- 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/sftp-user/list.d.ts +21 -0
- package/dist/esm/commands/sftp-user/list.js +31 -0
- package/dist/esm/commands/ssh-user/list.d.ts +21 -0
- package/dist/esm/commands/ssh-user/list.js +29 -0
- 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/dist/esm/rendering/react/components/AppInstallation/AppInstallationDetails.js +9 -0
- 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/commands/project/sftp-user/list.d.ts +0 -13
- package/dist/esm/commands/project/sftp-user/list.js +0 -24
- package/dist/esm/commands/project/ssh-user/list.d.ts +0 -13
- package/dist/esm/commands/project/ssh-user/list.js +0 -24
- 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/sshsftpUser/sftpUserGetSftpUser.d.ts +0 -16
- package/dist/esm/generated/sshsftpUser/sftpUserGetSftpUser.js +0 -25
- package/dist/esm/generated/sshsftpUser/sftpUserListSftpUsers.d.ts +0 -13
- package/dist/esm/generated/sshsftpUser/sftpUserListSftpUsers.js +0 -22
- package/dist/esm/generated/sshsftpUser/sshUserGetSshUser.d.ts +0 -16
- package/dist/esm/generated/sshsftpUser/sshUserGetSshUser.js +0 -25
- package/dist/esm/generated/sshsftpUser/sshUserListSshUsers.d.ts +0 -13
- package/dist/esm/generated/sshsftpUser/sshUserListSshUsers.js +0 -22
- 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,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 { GeneratedUserListApiTokens, Response } from "../../../generated/user/listApiTokens.js";
|
|
5
4
|
import { ListColumns } from "../../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
6
6
|
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2UsersSelfApiTokens.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
7
|
-
|
|
7
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["user"]["listApiTokens"]>>;
|
|
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.SignupApiToken[];
|
|
9
16
|
protected getColumns(): ListColumns<ResponseItem>;
|
|
10
17
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { GeneratedUserListApiTokens, } from "../../../generated/user/listApiTokens.js";
|
|
2
1
|
import { formatCreatedAt, 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 API tokens of the user";
|
|
5
|
+
static args = {};
|
|
6
|
+
static flags = {
|
|
7
|
+
...ListBaseCommand.baseFlags,
|
|
8
|
+
};
|
|
9
|
+
async getData() {
|
|
10
|
+
return await this.apiClient.user.listApiTokens();
|
|
11
|
+
}
|
|
4
12
|
mapData(data) {
|
|
5
13
|
return data;
|
|
6
14
|
}
|
|
@@ -5,7 +5,7 @@ type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["user"]["getUser"]>>;
|
|
|
5
5
|
export default class Get extends GetBaseCommand<typeof Get, APIResponse> {
|
|
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
|
"user-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
@@ -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["user"]["getSession"]>>;
|
|
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
|
+
"token-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 specific session";
|
|
5
|
+
static flags = {
|
|
6
|
+
...GetBaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
static args = {
|
|
9
|
+
"token-id": Args.string({
|
|
10
|
+
description: "Token ID to identify the specific session",
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
async getData() {
|
|
15
|
+
return await this.apiClient.user.getSession({
|
|
16
|
+
tokenId: this.args["token-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 { GeneratedUserListSessions, Response } from "../../../generated/user/listSessions.js";
|
|
5
4
|
import { ListColumns } from "../../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
6
6
|
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2UsersSelfSessions.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
7
|
-
|
|
7
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["user"]["listSessions"]>>;
|
|
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.SignupUserSession[];
|
|
9
16
|
protected getColumns(): ListColumns<ResponseItem>;
|
|
10
17
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { GeneratedUserListSessions, } from "../../../generated/user/listSessions.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 active sessions";
|
|
5
|
+
static args = {};
|
|
6
|
+
static flags = {
|
|
7
|
+
...ListBaseCommand.baseFlags,
|
|
8
|
+
};
|
|
9
|
+
async getData() {
|
|
10
|
+
return await this.apiClient.user.listSessions();
|
|
11
|
+
}
|
|
4
12
|
mapData(data) {
|
|
5
13
|
return data;
|
|
6
14
|
}
|
|
@@ -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["user"]["getSshKey"]>>;
|
|
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
|
+
"key-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 specific SSH key";
|
|
5
|
+
static flags = {
|
|
6
|
+
...GetBaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
static args = {
|
|
9
|
+
"key-id": Args.string({
|
|
10
|
+
description: "The ID of an SSH key",
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
async getData() {
|
|
15
|
+
return await this.apiClient.user.getSshKey({
|
|
16
|
+
sshKeyId: this.args["key-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 { GeneratedUserListSshKeys, Response } from "../../../generated/user/listSshKeys.js";
|
|
5
4
|
import { ListColumns } from "../../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
6
6
|
type ResponseItem = Simplify<Required<MittwaldAPIV2.Paths.V2UsersSelfSshKeys.Get.Responses.$200.Content.ApplicationJson>["sshKeys"][number]>;
|
|
7
|
-
|
|
7
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["user"]["listSshKeys"]>>;
|
|
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.SignupSshKey[];
|
|
9
16
|
protected getColumns(): ListColumns<ResponseItem>;
|
|
10
17
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { GeneratedUserListSshKeys, } from "../../../generated/user/listSshKeys.js";
|
|
2
1
|
import { formatCreatedAt } from "../../../lib/viewhelpers/date.js";
|
|
3
|
-
|
|
2
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
3
|
+
export default class List extends ListBaseCommand {
|
|
4
|
+
static description = "Get your stored ssh keys";
|
|
5
|
+
static args = {};
|
|
6
|
+
static flags = {
|
|
7
|
+
...ListBaseCommand.baseFlags,
|
|
8
|
+
};
|
|
9
|
+
async getData() {
|
|
10
|
+
return await this.apiClient.user.listSshKeys();
|
|
11
|
+
}
|
|
4
12
|
mapData(data) {
|
|
5
13
|
return data.sshKeys ?? [];
|
|
6
14
|
}
|
|
@@ -9,7 +9,7 @@ export async function getUser(apiClient, p) {
|
|
|
9
9
|
export async function getProject(apiClient, p, database) {
|
|
10
10
|
return await p.runStep("fetching project", async () => {
|
|
11
11
|
const r = await apiClient.project.getProject({
|
|
12
|
-
|
|
12
|
+
projectId: database.projectId,
|
|
13
13
|
});
|
|
14
14
|
assertStatus(r, 200);
|
|
15
15
|
return r.data;
|
|
@@ -26,10 +26,10 @@ async function getPassword(p, flags) {
|
|
|
26
26
|
}
|
|
27
27
|
return await p.addInput("enter password for MySQL user", true);
|
|
28
28
|
}
|
|
29
|
-
async function getDatabase(apiClient, p,
|
|
29
|
+
async function getDatabase(apiClient, p, mysqlDatabaseId) {
|
|
30
30
|
return await p.runStep("fetching database", async () => {
|
|
31
31
|
const r = await apiClient.database.getMysqlDatabase({
|
|
32
|
-
|
|
32
|
+
mysqlDatabaseId,
|
|
33
33
|
});
|
|
34
34
|
assertStatus(r, 200);
|
|
35
35
|
return r.data;
|
|
@@ -11,10 +11,10 @@ export async function getConnectionDetails(apiClient, databaseId, p) {
|
|
|
11
11
|
sshUser: `${user.email}@${project.shortId}`,
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
async function getDatabase(apiClient, p,
|
|
14
|
+
async function getDatabase(apiClient, p, redisDatabaseId) {
|
|
15
15
|
return await p.runStep("fetching database", async () => {
|
|
16
16
|
const r = await apiClient.database.getRedisDatabase({
|
|
17
|
-
|
|
17
|
+
redisDatabaseId,
|
|
18
18
|
});
|
|
19
19
|
assertStatus(r, 200);
|
|
20
20
|
return r.data;
|
|
@@ -3,8 +3,8 @@ import { usePromise } from "@mittwald/react-use-promise";
|
|
|
3
3
|
import { assertStatus } from "@mittwald/api-client-commons";
|
|
4
4
|
export function useProject(projectId) {
|
|
5
5
|
const { apiClient } = useRenderContext();
|
|
6
|
-
const project = usePromise((
|
|
7
|
-
|
|
6
|
+
const project = usePromise((projectId) => apiClient.project.getProject({
|
|
7
|
+
projectId,
|
|
8
8
|
}), [projectId]);
|
|
9
9
|
assertStatus(project, 200);
|
|
10
10
|
return project.data;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assertStatus } from "@mittwald/api-client-commons";
|
|
2
2
|
export async function getProjectShortIdFromUuid(apiClient, uuid) {
|
|
3
3
|
const project = await apiClient.project.getProject({
|
|
4
|
-
|
|
4
|
+
projectId: uuid,
|
|
5
5
|
});
|
|
6
6
|
assertStatus(project, 200);
|
|
7
7
|
if (project.data.shortId) {
|
|
@@ -4,11 +4,11 @@ import { ExtendedBaseCommand } from "../../ExtendedBaseCommand.js";
|
|
|
4
4
|
import { Interfaces } from "@oclif/core";
|
|
5
5
|
import { FlagInput } from "@oclif/core/lib/interfaces/parser.js";
|
|
6
6
|
declare const renderFlags: {
|
|
7
|
-
output: Interfaces.OptionFlag<string,
|
|
7
|
+
output: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
export declare abstract class RenderBaseCommand<T extends typeof BaseCommand> extends ExtendedBaseCommand<T> {
|
|
10
10
|
protected static renderFlags: {
|
|
11
|
-
output: Interfaces.OptionFlag<string,
|
|
11
|
+
output: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
12
12
|
};
|
|
13
13
|
protected renderFlags: Interfaces.InferredFlags<typeof renderFlags>;
|
|
14
14
|
static buildFlags(): FlagInput;
|
|
@@ -7,18 +7,27 @@ import { AppSystemSoftware } from "./AppSystemSoftware.js";
|
|
|
7
7
|
import { Box, Text } from "ink";
|
|
8
8
|
import { phpInstaller } from "../../../../commands/app/create/php.js";
|
|
9
9
|
import { nodeInstaller } from "../../../../commands/app/create/node.js";
|
|
10
|
+
import { useProject } from "../../../../lib/project/hooks.js";
|
|
11
|
+
import { IDAndShortID } from "../IDAndShortID.js";
|
|
10
12
|
export const AppInstallationDetails = ({ app, appInstallation }) => {
|
|
11
13
|
const customInstallation = [phpInstaller.appId, nodeInstaller.appId].includes(app.id);
|
|
12
14
|
const desiredAppVersion = useAppVersion(app.id, appInstallation.appVersion.desired);
|
|
13
15
|
const currentAppVersion = appInstallation.appVersion.current
|
|
14
16
|
? useAppVersion(app.id, appInstallation.appVersion.current)
|
|
15
17
|
: undefined;
|
|
18
|
+
const project = appInstallation.projectId
|
|
19
|
+
? useProject(appInstallation.projectId)
|
|
20
|
+
: null;
|
|
16
21
|
const rows = {
|
|
17
22
|
"Installation ID": _jsx(Value, { children: appInstallation.id }),
|
|
18
23
|
App: (_jsx(SingleResultTable, { rows: {
|
|
19
24
|
ID: _jsx(Value, { children: app.id }),
|
|
20
25
|
Name: _jsx(Value, { children: app.name }),
|
|
21
26
|
} })),
|
|
27
|
+
Project: project ? (_jsx(SingleResultTable, { rows: {
|
|
28
|
+
ID: _jsx(IDAndShortID, { object: project }),
|
|
29
|
+
Description: _jsx(Value, { children: project.description }),
|
|
30
|
+
} })) : (_jsx(Value, { notSet: true })),
|
|
22
31
|
"Installation Path": _jsx(Value, { children: appInstallation.installationPath }),
|
|
23
32
|
"Document root (in installation path)": (_jsx(Value, { children: appInstallation.customDocumentRoot ?? "/" })),
|
|
24
33
|
Description: _jsx(Value, { children: appInstallation.description }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/cli",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.26",
|
|
4
4
|
"description": "Hand-crafted CLI for the mittwald API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"@mittwald/api-client": "^3.0.7",
|
|
48
48
|
"@mittwald/api-client-commons": "^4.1.0",
|
|
49
49
|
"@mittwald/react-use-promise": "^1.3.3",
|
|
50
|
-
"@oclif/core": "^
|
|
51
|
-
"@oclif/plugin-help": "^
|
|
52
|
-
"@oclif/plugin-update": "^
|
|
53
|
-
"@oclif/plugin-warn-if-update-available": "^
|
|
50
|
+
"@oclif/core": "^3.9.1",
|
|
51
|
+
"@oclif/plugin-help": "^6.0.5",
|
|
52
|
+
"@oclif/plugin-update": "^4.1.3",
|
|
53
|
+
"@oclif/plugin-warn-if-update-available": "^3.0.2",
|
|
54
54
|
"axios": "^1.5.0",
|
|
55
55
|
"chalk": "^5.3.0",
|
|
56
56
|
"date-fns": "^2.30.0",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"ink-link": "^3.0.0",
|
|
60
60
|
"ink-text-input": "^5.0.1",
|
|
61
61
|
"js-yaml": "^4.1.0",
|
|
62
|
-
"marked": "^
|
|
63
|
-
"marked-terminal": "^
|
|
64
|
-
"node-notifier": "^
|
|
62
|
+
"marked": "^9.1.5",
|
|
63
|
+
"marked-terminal": "^6.0.0",
|
|
64
|
+
"node-notifier": "^10.0.1",
|
|
65
65
|
"open": "^9.1.0",
|
|
66
66
|
"parse-duration": "^1.1.0",
|
|
67
67
|
"pretty-bytes": "^6.1.0",
|
|
@@ -73,7 +73,6 @@
|
|
|
73
73
|
"@types/chalk": "^2.2.0",
|
|
74
74
|
"@types/copyfiles": "^2.4.1",
|
|
75
75
|
"@types/js-yaml": "^4.0.5",
|
|
76
|
-
"@types/marked": "^5.0.0",
|
|
77
76
|
"@types/marked-terminal": "^3.1.3",
|
|
78
77
|
"@types/node": "^20.3.3",
|
|
79
78
|
"@types/node-notifier": "^8.0.2",
|
|
@@ -81,23 +80,23 @@
|
|
|
81
80
|
"@types/pretty-bytes": "^5.2.0",
|
|
82
81
|
"@types/react": "^18",
|
|
83
82
|
"@types/semver": "^7.5.0",
|
|
84
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
85
|
-
"@typescript-eslint/parser": "^
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
|
84
|
+
"@typescript-eslint/parser": "^6.10.0",
|
|
86
85
|
"@yarnpkg/pnpify": "^4.0.0-rc.48",
|
|
87
86
|
"copyfiles": "^2.4.1",
|
|
88
87
|
"eslint": "^8.44.0",
|
|
89
|
-
"eslint-config-prettier": "^
|
|
88
|
+
"eslint-config-prettier": "^9.0.0",
|
|
90
89
|
"eslint-plugin-json": "^3.1.0",
|
|
91
90
|
"eslint-plugin-prettier": "^4.2.1",
|
|
92
91
|
"license-checker-rseidelsohn": "^4.2.6",
|
|
93
|
-
"oclif": "^
|
|
92
|
+
"oclif": "^4.0.3",
|
|
94
93
|
"pkg": "^5.8.1",
|
|
95
94
|
"prettier": "^2.8.8",
|
|
96
95
|
"prettier-plugin-jsdoc": "^0.4.2",
|
|
97
96
|
"prettier-plugin-package": "^1.3.1",
|
|
98
|
-
"prettier-plugin-sort-json": "^
|
|
97
|
+
"prettier-plugin-sort-json": "^2.0.0",
|
|
99
98
|
"rimraf": "^5.0.1",
|
|
100
|
-
"type-fest": "^
|
|
99
|
+
"type-fest": "^4.6.0",
|
|
101
100
|
"typescript": "^5.1.6"
|
|
102
101
|
},
|
|
103
102
|
"engines": {
|
|
@@ -129,6 +128,14 @@
|
|
|
129
128
|
"article": {
|
|
130
129
|
"description": "Query available hosting articles"
|
|
131
130
|
},
|
|
131
|
+
"backup": {
|
|
132
|
+
"description": "Manage backups of your projects",
|
|
133
|
+
"subtopics": {
|
|
134
|
+
"schedule": {
|
|
135
|
+
"description": "Manage backup schedules of your projects"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
132
139
|
"context": {
|
|
133
140
|
"description": "Save certain environment parameters for later use"
|
|
134
141
|
},
|
|
@@ -138,6 +145,9 @@
|
|
|
138
145
|
"conversation": {
|
|
139
146
|
"description": "Manage your support cases"
|
|
140
147
|
},
|
|
148
|
+
"cronjob": {
|
|
149
|
+
"description": "Manage cronjobs of your projects"
|
|
150
|
+
},
|
|
141
151
|
"database": {
|
|
142
152
|
"description": "Manage databases (like MySQL and Redis) in your projects"
|
|
143
153
|
},
|
|
@@ -156,15 +166,6 @@
|
|
|
156
166
|
"project": {
|
|
157
167
|
"description": "Manage your projects, and also any kinds of user memberships concerning these projects.",
|
|
158
168
|
"subtopics": {
|
|
159
|
-
"backup": {
|
|
160
|
-
"description": "Manage backups of your projects"
|
|
161
|
-
},
|
|
162
|
-
"backupschedule": {
|
|
163
|
-
"description": "Manage backup schedules of your projects"
|
|
164
|
-
},
|
|
165
|
-
"cronjob": {
|
|
166
|
-
"description": "Manage cronjobs of your projects"
|
|
167
|
-
},
|
|
168
169
|
"filesystem": {
|
|
169
170
|
"description": "Interact with the filesystem of your project"
|
|
170
171
|
},
|
|
@@ -173,18 +174,18 @@
|
|
|
173
174
|
},
|
|
174
175
|
"membership": {
|
|
175
176
|
"description": "Control who gets to work on your projects, and who doesn't"
|
|
176
|
-
},
|
|
177
|
-
"sftp-user": {
|
|
178
|
-
"description": "Manage SFTP users of your projects"
|
|
179
|
-
},
|
|
180
|
-
"ssh-user": {
|
|
181
|
-
"description": "Manage SSH users of your projects"
|
|
182
177
|
}
|
|
183
178
|
}
|
|
184
179
|
},
|
|
185
180
|
"server": {
|
|
186
181
|
"description": "Manage your servers"
|
|
187
182
|
},
|
|
183
|
+
"sftp-user": {
|
|
184
|
+
"description": "Manage SFTP users of your projects"
|
|
185
|
+
},
|
|
186
|
+
"ssh-user": {
|
|
187
|
+
"description": "Manage SSH users of your projects"
|
|
188
|
+
},
|
|
188
189
|
"user": {
|
|
189
190
|
"description": "Manage your own user account",
|
|
190
191
|
"subtopics": {
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { GeneratedDomainGetHandleFields } from "../../generated/domain/getHandleFields.js";
|
|
5
|
-
export default class Get extends GeneratedDomainGetHandleFields {
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { GeneratedCronjobGetCronjob } from "../../../generated/cronjob/getCronjob.js";
|
|
5
|
-
export default class Get extends GeneratedCronjobGetCronjob {
|
|
6
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { GeneratedSftpUserListSftpUsers, PathParams } from "../../../generated/sshsftpUser/sftpUserListSftpUsers.js";
|
|
2
|
-
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
|
-
import { Simplify } from "@mittwald/api-client-commons";
|
|
4
|
-
import { SuccessfulResponse } from "../../../types.js";
|
|
5
|
-
import { ListColumns } from "../../../Formatter.js";
|
|
6
|
-
type SftpUserResponse = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sftpUserListSftpUsers"]>>;
|
|
7
|
-
type SftpUserResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdSftpUsers.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
8
|
-
export default class List extends GeneratedSftpUserListSftpUsers<SftpUserResponseItem> {
|
|
9
|
-
protected mapData(data: SuccessfulResponse<SftpUserResponse, 200>["data"]): SftpUserResponseItem[];
|
|
10
|
-
protected mapParams(input: PathParams): Promise<PathParams>;
|
|
11
|
-
protected getColumns(data: SftpUserResponseItem[]): ListColumns<SftpUserResponseItem>;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { GeneratedSftpUserListSftpUsers } from "../../../generated/sshsftpUser/sftpUserListSftpUsers.js";
|
|
5
|
-
import { normalizeProjectIdToUuid } from "../../../Helpers.js";
|
|
6
|
-
export default class List extends GeneratedSftpUserListSftpUsers {
|
|
7
|
-
mapData(data) {
|
|
8
|
-
return data;
|
|
9
|
-
}
|
|
10
|
-
async mapParams(input) {
|
|
11
|
-
input.projectId = await normalizeProjectIdToUuid(this.apiClient, input.projectId);
|
|
12
|
-
return super.mapParams(input);
|
|
13
|
-
}
|
|
14
|
-
getColumns(data) {
|
|
15
|
-
const baseColumns = super.getColumns(data);
|
|
16
|
-
return {
|
|
17
|
-
id: baseColumns.id,
|
|
18
|
-
userName: { header: "Username" },
|
|
19
|
-
description: {},
|
|
20
|
-
active: {},
|
|
21
|
-
createdAt: baseColumns.createdAt,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { GeneratedSshUserListSshUsers, PathParams } from "../../../generated/sshsftpUser/sshUserListSshUsers.js";
|
|
2
|
-
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
|
-
import { Simplify } from "@mittwald/api-client-commons";
|
|
4
|
-
import { SuccessfulResponse } from "../../../types.js";
|
|
5
|
-
import { ListColumns } from "../../../Formatter.js";
|
|
6
|
-
type SshUserResponse = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sftpUserListSftpUsers"]>>;
|
|
7
|
-
type SshUserResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdSftpUsers.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
8
|
-
export default class Get extends GeneratedSshUserListSshUsers<SshUserResponseItem> {
|
|
9
|
-
protected mapData(data: SuccessfulResponse<SshUserResponse, 200>["data"]): SshUserResponseItem[];
|
|
10
|
-
protected mapParams(input: PathParams): Promise<PathParams>;
|
|
11
|
-
protected getColumns(data: SshUserResponseItem[]): ListColumns<SshUserResponseItem>;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { GeneratedSshUserListSshUsers } from "../../../generated/sshsftpUser/sshUserListSshUsers.js";
|
|
5
|
-
import { normalizeProjectIdToUuid } from "../../../Helpers.js";
|
|
6
|
-
export default class Get extends GeneratedSshUserListSshUsers {
|
|
7
|
-
mapData(data) {
|
|
8
|
-
return data;
|
|
9
|
-
}
|
|
10
|
-
async mapParams(input) {
|
|
11
|
-
input.projectId = await normalizeProjectIdToUuid(this.apiClient, input.projectId);
|
|
12
|
-
return super.mapParams(input);
|
|
13
|
-
}
|
|
14
|
-
getColumns(data) {
|
|
15
|
-
const baseColumns = super.getColumns(data);
|
|
16
|
-
return {
|
|
17
|
-
id: baseColumns.id,
|
|
18
|
-
userName: { header: "Username" },
|
|
19
|
-
description: {},
|
|
20
|
-
active: {},
|
|
21
|
-
createdAt: baseColumns.createdAt,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
-
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
3
|
-
export type PathParams = MittwaldAPIV2.Paths.V2ConversationCategoriesCategoryId.Get.Parameters.Path;
|
|
4
|
-
type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["conversation"]["getCategory"]>>;
|
|
5
|
-
export declare abstract class GeneratedConversationGetCategory extends GetBaseCommand<typeof GeneratedConversationGetCategory, APIResponse> {
|
|
6
|
-
static description: string;
|
|
7
|
-
static flags: {
|
|
8
|
-
[x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
|
|
9
|
-
};
|
|
10
|
-
static args: {
|
|
11
|
-
categoryId: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
12
|
-
};
|
|
13
|
-
protected getData(): Promise<APIResponse>;
|
|
14
|
-
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { Args } from "@oclif/core";
|
|
5
|
-
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
6
|
-
export class GeneratedConversationGetCategory extends GetBaseCommand {
|
|
7
|
-
static description = "Get a specific conversation category.";
|
|
8
|
-
static flags = {
|
|
9
|
-
...GetBaseCommand.baseFlags,
|
|
10
|
-
};
|
|
11
|
-
static args = {
|
|
12
|
-
categoryId: Args.string({
|
|
13
|
-
description: "undefined",
|
|
14
|
-
required: true,
|
|
15
|
-
}),
|
|
16
|
-
};
|
|
17
|
-
async getData() {
|
|
18
|
-
return await this.apiClient.conversation.getCategory({
|
|
19
|
-
...(await this.mapParams(this.args)),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
mapParams(input) {
|
|
23
|
-
return input;
|
|
24
|
-
}
|
|
25
|
-
}
|