Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump @mittwald/api-client from 3.0.7 to 3.0.27 #90

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
41 changes: 14 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ USAGE
* [`mw domain dnszone get ZONEID`](#mw-domain-dnszone-get-zoneid)
* [`mw domain dnszone list`](#mw-domain-dnszone-list)
* [`mw domain get DOMAINID`](#mw-domain-get-domainid)
* [`mw domain get-handle DOMAINNAME`](#mw-domain-get-handle-domainname)
* [`mw domain list`](#mw-domain-list)
* [`mw domain ownership get DOMAINOWNERSHIPID`](#mw-domain-ownership-get-domainownershipid)
* [`mw domain ownership list`](#mw-domain-ownership-list)
Expand Down Expand Up @@ -1859,15 +1858,22 @@ gets all dns zones by project id

```
USAGE
$ mw domain dnszone list --project-id <value> [-o json|yaml | | ]
$ mw domain dnszone list [-o json|yaml | | ] [-p <value>]

FLAGS
-o, --output=<option> output in a more machine friendly format
<options: json|yaml>
--project-id=<value> (required) project you want to get the zones for
-o, --output=<option> output in a more machine friendly format
<options: json|yaml>
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
context

DESCRIPTION
gets all dns zones by project id

FLAG DESCRIPTIONS
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the context

May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=<VALUE>" command
to persistently set a default project for all commands that accept this flag.
```

## `mw domain get DOMAINID`
Expand All @@ -1889,25 +1895,6 @@ DESCRIPTION
Get a Domain.
```

## `mw domain get-handle DOMAINNAME`

Get a HandleSchema.

```
USAGE
$ mw domain get-handle DOMAINNAME [-o json|yaml | | ]

ARGUMENTS
DOMAINNAME The whole domain name

FLAGS
-o, --output=<option> output in a more machine friendly format
<options: json|yaml>

DESCRIPTION
Get a HandleSchema.
```

## `mw domain list`

List Domains belonging to a Project.
Expand Down Expand Up @@ -1949,7 +1936,7 @@ USAGE
$ mw domain ownership get DOMAINOWNERSHIPID [-o json|yaml | | ]

ARGUMENTS
DOMAINOWNERSHIPID undefined
DOMAINOWNERSHIPID The domain ownership ID.

FLAGS
-o, --output=<option> output in a more machine friendly format
Expand Down Expand Up @@ -2328,7 +2315,7 @@ FLAG DESCRIPTIONS

## `mw mail deliverybox get ID`

Get a specific deliverybox
Get a specific delivery box

```
USAGE
Expand All @@ -2342,7 +2329,7 @@ FLAGS
<options: json|yaml>

DESCRIPTION
Get a specific deliverybox
Get a specific delivery box
```

## `mw mail deliverybox list`
Expand Down
2 changes: 1 addition & 1 deletion src/commands/app/ssh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class Ssh extends BaseCommand {
}

const projectResponse = await this.apiClient.project.getProject({
id: appInstallationResponse.data.projectId,
projectId: appInstallationResponse.data.projectId,
});

assertStatus(projectResponse, 200);
Expand Down
4 changes: 2 additions & 2 deletions src/commands/database/mysql/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class Create extends ExecRenderBaseCommand<typeof Create, Result> {

const database = await p.runStep("fetching database", async () => {
const r = await this.apiClient.database.getMysqlDatabase({
id: db.id,
mysqlDatabaseId: db.id,
});
assertStatus(r, 200);

Expand All @@ -113,7 +113,7 @@ export class Create extends ExecRenderBaseCommand<typeof Create, Result> {

const user = await p.runStep("fetching user", async () => {
const r = await this.apiClient.database.getMysqlUser({
id: db.userId,
mysqlUserId: db.userId,
});
assertStatus(r, 200);

Expand Down
4 changes: 2 additions & 2 deletions src/commands/database/mysql/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export default class Delete extends DeleteBaseCommand<typeof Delete> {
static args = { ...mysqlArgs };

protected async deleteResource(): Promise<void> {
const id = await withMySQLId(
const mysqlDatabaseId = await withMySQLId(
this.apiClient,
this.flags,
this.args,
this.config,
);
const response = await this.apiClient.database.deleteMysqlDatabase({
id,
mysqlDatabaseId,
});

assertStatus(response, 200);
Expand Down
8 changes: 4 additions & 4 deletions src/commands/database/mysql/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { GetBaseCommand } from "../../../GetBaseCommand.js";
import { mysqlArgs, withMySQLId } from "../../../lib/database/mysql/flags.js";

export type PathParams =
MittwaldAPIV2.Paths.V2MysqlDatabasesId.Get.Parameters.Path;
MittwaldAPIV2.Paths.V2MysqlDatabasesMysqlDatabaseId.Get.Parameters.Path;
type APIResponse = Awaited<
ReturnType<MittwaldAPIV2Client["database"]["getMysqlDatabase"]>
>;
Expand All @@ -17,14 +17,14 @@ export abstract class Get extends GetBaseCommand<typeof Get, APIResponse> {
static args = { ...mysqlArgs };

protected async getData(): Promise<APIResponse> {
const id = await withMySQLId(
const mysqlDatabaseId = await withMySQLId(
this.apiClient,
this.flags,
this.args,
this.config,
);
return await this.apiClient.database.getMysqlDatabase({
id,
} as Parameters<typeof this.apiClient.database.getMysqlDatabase>[0]);
mysqlDatabaseId,
});
}
}
2 changes: 1 addition & 1 deletion src/commands/database/mysql/phpmyadmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class PhpMyAdmin extends BaseCommand {
}

const pma = await this.apiClient.database.getMysqlUserPhpMyAdminUrl({
id: mainUser.id,
mysqlUserId: mainUser.id,
});

assertStatus(pma, 200);
Expand Down
4 changes: 2 additions & 2 deletions src/commands/database/mysql/user/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class Get extends GetBaseCommand<typeof Get, APIResponse> {

protected async getData(): Promise<APIResponse> {
return await this.apiClient.database.getMysqlUser({
id: this.args.id,
} as Parameters<typeof this.apiClient.database.getMysqlUser>[0]);
mysqlUserId: this.args.id,
});
}
}
2 changes: 1 addition & 1 deletion src/commands/database/redis/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class Create extends ExecRenderBaseCommand<typeof Create, Result> {

const database = await p.runStep("fetching database", async () => {
const r = await this.apiClient.database.getRedisDatabase({
id: db.id,
redisDatabaseId: db.id,
});
assertStatus(r, 200);

Expand Down
6 changes: 3 additions & 3 deletions src/commands/database/redis/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
import { GetBaseCommand } from "../../../GetBaseCommand.js";

export type PathParams =
MittwaldAPIV2.Paths.V2RedisDatabasesId.Get.Parameters.Path;
MittwaldAPIV2.Paths.V2RedisDatabasesRedisDatabaseId.Get.Parameters.Path;
type APIResponse = Awaited<
ReturnType<MittwaldAPIV2Client["database"]["getRedisDatabase"]>
>;
Expand All @@ -23,8 +23,8 @@ export class Get extends GetBaseCommand<typeof Get, APIResponse> {

protected async getData(): Promise<APIResponse> {
return await this.apiClient.database.getRedisDatabase({
...(await this.mapParams(this.args as PathParams)),
} as Parameters<typeof this.apiClient.database.getRedisDatabase>[0]);
redisDatabaseId: this.args.id,
});
}

protected mapParams(input: PathParams): Promise<PathParams> | PathParams {
Expand Down
33 changes: 28 additions & 5 deletions src/commands/domain/dnszone/get.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
/* eslint-disable */
/* prettier-ignore */
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
import { GeneratedDnsZoneGetSpecific } from "../../../generated/domain/dnsZoneGetSpecific.js";
import { Args } from "@oclif/core";
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
import { GetBaseCommand } from "../../../GetBaseCommand.js";

export default class Get extends GeneratedDnsZoneGetSpecific {}
export type PathParams =
MittwaldAPIV2.Paths.V2DnsZonesDnsZoneId.Get.Parameters.Path;
type APIResponse = Awaited<
ReturnType<MittwaldAPIV2Client["domain"]["dnsGetDnsZone"]>
>;

export abstract class Get extends GetBaseCommand<typeof Get, APIResponse> {
static description = "gets a specific zone";

static flags = {
...GetBaseCommand.baseFlags,
};
static args = {
zoneId: Args.string({
description: "id of the zone you want to get",
required: true,
}),
};

protected async getData(): Promise<APIResponse> {
return await this.apiClient.domain.dnsGetDnsZone({
dnsZoneId: this.args.zoneId,
});
}
}
36 changes: 31 additions & 5 deletions src/commands/domain/dnszone/list.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
/* eslint-disable */
/* prettier-ignore */
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
import { GeneratedDnsZonesForProject } from "../../../generated/domain/dnsZonesForProject.js";
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
import { GetBaseCommand } from "../../../GetBaseCommand.js";
import { projectFlags, withProjectId } from "../../../lib/project/flags.js";

export default class Get extends GeneratedDnsZonesForProject {}
export type PathParams =
MittwaldAPIV2.Paths.V2ProjectsProjectIdDnsZones.Get.Parameters.Path;
type APIResponse = Awaited<
ReturnType<MittwaldAPIV2Client["domain"]["dnsListDnsZones"]>
>;

export default class List extends GetBaseCommand<typeof List, APIResponse> {
static description = "gets all dns zones by project id";

static flags = {
...GetBaseCommand.baseFlags,
...projectFlags,
};
static args = {};

protected async getData(): Promise<APIResponse> {
const projectId = await withProjectId(
this.apiClient,
List,
this.flags,
this.args,
this.config,
);
return await this.apiClient.domain.dnsListDnsZones({
projectId,
});
}
}
6 changes: 0 additions & 6 deletions src/commands/domain/get-handle.ts

This file was deleted.

33 changes: 28 additions & 5 deletions src/commands/domain/ownership/get.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
/* eslint-disable */
/* prettier-ignore */
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
import { GeneratedDomainGetSpecificDomainOwnership } from "../../../generated/domain/getSpecificDomainOwnership.js";
import { Args } from "@oclif/core";
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
import { GetBaseCommand } from "../../../GetBaseCommand.js";

export default class Get extends GeneratedDomainGetSpecificDomainOwnership {}
export type PathParams =
MittwaldAPIV2.Paths.V2DomainOwnershipsDomainOwnershipId.Get.Parameters.Path;
type APIResponse = Awaited<
ReturnType<MittwaldAPIV2Client["domain"]["getDomainOwnership"]>
>;

export default class Get extends GetBaseCommand<typeof Get, APIResponse> {
static description = "Get a domain ownership.";

static flags = {
...GetBaseCommand.baseFlags,
};
static args = {
domainOwnershipId: Args.string({
description: "The domain ownership ID.",
required: true,
}),
};

protected async getData(): Promise<APIResponse> {
return await this.apiClient.domain.getDomainOwnership({
domainOwnershipId: this.args.domainOwnershipId,
} as Parameters<typeof this.apiClient.domain.getDomainOwnership>[0]);
}
}
8 changes: 4 additions & 4 deletions src/commands/domain/virtualhost/list.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* eslint-disable */
/* prettier-ignore */
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
import { Simplify } from "@mittwald/api-client-commons";
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
import { SuccessfulResponse } from "../../../types.js";
Expand Down Expand Up @@ -76,7 +73,10 @@ export class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
if ("url" in p.target) {
return `${p.path} → url (${p.target.url})`;
}
return `${p.path} → app (${p.target.installationId})`;
if ("installationId" in p.target) {
return `${p.path} → app (${p.target.installationId})`;
}
return `${p.path} → default`;
})
.join("\n"),
},
Expand Down
2 changes: 1 addition & 1 deletion src/commands/mail/address/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default class Create extends ExecRenderBaseCommand<
const response = await process.runStep(
"creating mail address",
async () => {
const response = await this.apiClient.mail.mailaddressCreate({
const response = await this.apiClient.mail.createMailAddress({
projectId,
data: {
address: flags.address,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/mail/address/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export default class Delete extends DeleteBaseCommand<typeof Delete> {
};

protected async deleteResource(): Promise<void> {
const response = await this.apiClient.mail.mailaddressDelete({
id: this.args.id,
const response = await this.apiClient.mail.deleteMailAddress({
mailAddressId: this.args.id,
});

assertStatus(response, 200);
Expand Down
37 changes: 32 additions & 5 deletions src/commands/mail/address/get.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
/* eslint-disable */
/* prettier-ignore */
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
import { GeneratedMailMailaddressGetSpecific } from "../../../generated/mail/mailaddressGetSpecific.js";
import { Args } from "@oclif/core";
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
import { GetBaseCommand } from "../../../GetBaseCommand.js";

export default class Get extends GeneratedMailMailaddressGetSpecific {}
export type PathParams =
MittwaldAPIV2.Paths.V2MailAddressesMailAddressId.Get.Parameters.Path;
type APIResponse = Awaited<
ReturnType<MittwaldAPIV2Client["mail"]["getMailAddress"]>
>;

export default class Get extends GetBaseCommand<typeof Get, APIResponse> {
static description = "Get a specific mail address";

static flags = {
...GetBaseCommand.baseFlags,
};
static args = {
id: Args.string({
description: "id of the address you want to get",
required: true,
}),
};

protected async getData(): Promise<APIResponse> {
return await this.apiClient.mail.getMailAddress({
mailAddressId: this.args.id,
} as Parameters<typeof this.apiClient.mail.getMailAddress>[0]);
}

protected mapParams(input: PathParams): Promise<PathParams> | PathParams {
return input;
}
}
Loading
Loading