@mittwald/cli 1.0.0-alpha.10 → 1.0.0-alpha.11

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.
Files changed (70) hide show
  1. package/dist/esm/Formatter.js +3 -0
  2. package/dist/esm/ListBaseCommand.js +6 -1
  3. package/dist/esm/commands/domain/ownership/list.js +1 -0
  4. package/dist/esm/commands/domain/virtualhost/create.d.ts +26 -0
  5. package/dist/esm/commands/domain/virtualhost/create.js +122 -0
  6. package/dist/esm/commands/domain/virtualhost/delete.d.ts +13 -0
  7. package/dist/esm/commands/domain/virtualhost/delete.js +21 -0
  8. package/dist/esm/commands/domain/virtualhost/get.d.ts +13 -2
  9. package/dist/esm/commands/domain/virtualhost/get.js +85 -5
  10. package/dist/esm/commands/domain/virtualhost/list.d.ts +1 -1
  11. package/dist/esm/commands/domain/virtualhost/list.js +29 -13
  12. package/dist/esm/commands/mail/address/create.d.ts +16 -8
  13. package/dist/esm/commands/mail/address/create.js +51 -9
  14. package/dist/esm/commands/org/delete.d.ts +13 -0
  15. package/dist/esm/commands/org/delete.js +17 -0
  16. package/dist/esm/commands/org/invite/list-own.d.ts +46 -5
  17. package/dist/esm/commands/org/invite/list-own.js +38 -3
  18. package/dist/esm/commands/org/invite/list.d.ts +13 -3
  19. package/dist/esm/commands/org/invite/list.js +31 -2
  20. package/dist/esm/commands/org/invite/revoke.d.ts +17 -0
  21. package/dist/esm/commands/org/invite/revoke.js +39 -0
  22. package/dist/esm/commands/org/invite.d.ts +21 -0
  23. package/dist/esm/commands/org/invite.js +66 -0
  24. package/dist/esm/commands/org/list.d.ts +13 -4
  25. package/dist/esm/commands/org/list.js +17 -3
  26. package/dist/esm/commands/org/membership/list-own.d.ts +45 -5
  27. package/dist/esm/commands/org/membership/list-own.js +41 -3
  28. package/dist/esm/commands/org/membership/list.d.ts +33 -5
  29. package/dist/esm/commands/org/membership/list.js +40 -3
  30. package/dist/esm/commands/org/membership/revoke.d.ts +17 -0
  31. package/dist/esm/commands/org/membership/revoke.js +43 -0
  32. package/dist/esm/generated/domain/listDomainOwnerships.d.ts +1 -1
  33. package/dist/esm/generated/domain/listDomainOwnerships.js +3 -6
  34. package/dist/esm/lib/context_flags.js +2 -1
  35. package/dist/esm/lib/handleError.js +11 -0
  36. package/dist/esm/rendering/react/components/Ingress/DnsValidationErrors.d.ts +8 -0
  37. package/dist/esm/rendering/react/components/Ingress/DnsValidationErrors.js +17 -0
  38. package/dist/esm/rendering/react/components/Ingress/DomainOwnership.d.ts +8 -0
  39. package/dist/esm/rendering/react/components/Ingress/DomainOwnership.js +7 -0
  40. package/dist/esm/rendering/react/components/Note.d.ts +1 -2
  41. package/dist/esm/rendering/react/components/Warning.d.ts +4 -0
  42. package/dist/esm/rendering/react/components/Warning.js +7 -0
  43. package/dist/esm/rendering/react/error.d.ts +1 -0
  44. package/dist/esm/rendering/react/error.js +43 -0
  45. package/dist/esm/rendering/react/process_flags.js +2 -1
  46. package/package.json +4 -4
  47. package/dist/esm/commands/org/invite/get.d.ts +0 -3
  48. package/dist/esm/commands/org/invite/get.js +0 -6
  49. package/dist/esm/commands/org/membership/get.d.ts +0 -3
  50. package/dist/esm/commands/org/membership/get.js +0 -6
  51. package/dist/esm/generated/customer/getCustomerCategory.d.ts +0 -16
  52. package/dist/esm/generated/customer/getCustomerCategory.js +0 -25
  53. package/dist/esm/generated/customer/getCustomerInvite.d.ts +0 -16
  54. package/dist/esm/generated/customer/getCustomerInvite.js +0 -25
  55. package/dist/esm/generated/customer/getCustomerMembership.d.ts +0 -16
  56. package/dist/esm/generated/customer/getCustomerMembership.js +0 -25
  57. package/dist/esm/generated/customer/listCustomerInvites.d.ts +0 -13
  58. package/dist/esm/generated/customer/listCustomerInvites.js +0 -17
  59. package/dist/esm/generated/customer/listCustomerMemberships.d.ts +0 -13
  60. package/dist/esm/generated/customer/listCustomerMemberships.js +0 -17
  61. package/dist/esm/generated/customer/listCustomers.d.ts +0 -13
  62. package/dist/esm/generated/customer/listCustomers.js +0 -17
  63. package/dist/esm/generated/customer/listInvitesForCustomer.d.ts +0 -13
  64. package/dist/esm/generated/customer/listInvitesForCustomer.js +0 -24
  65. package/dist/esm/generated/customer/listMembershipsForCustomer.d.ts +0 -13
  66. package/dist/esm/generated/customer/listMembershipsForCustomer.js +0 -24
  67. package/dist/esm/generated/customer/listOfCustomerCategories.d.ts +0 -13
  68. package/dist/esm/generated/customer/listOfCustomerCategories.js +0 -17
  69. package/dist/esm/generated/domain/ingressGetSpecific.d.ts +0 -16
  70. package/dist/esm/generated/domain/ingressGetSpecific.js +0 -25
@@ -1,18 +1,15 @@
1
- import { Flags } from "@oclif/core";
2
1
  import { ListBaseCommand } from "../../ListBaseCommand.js";
2
+ import { projectFlags, withProjectId } from "../../lib/project/flags.js";
3
3
  export class GeneratedDomainListDomainOwnerships extends ListBaseCommand {
4
4
  static description = "List all domain ownerships of a project.";
5
5
  static args = {};
6
6
  static flags = {
7
7
  ...ListBaseCommand.baseFlags,
8
- "project-id": Flags.string({
9
- description: "undefined",
10
- required: true,
11
- }),
8
+ ...projectFlags,
12
9
  };
13
10
  async getData() {
14
11
  const pathParams = {
15
- projectId: this.flags["project-id"],
12
+ projectId: await withProjectId(this.apiClient, this.flags, this.args, this.config),
16
13
  };
17
14
  return await this.apiClient.domain.listDomainOwnerships({
18
15
  pathParameters: await this.mapParams(pathParams),
@@ -6,7 +6,8 @@ export function makeFlagSet(name, char, normalize = (_, id) => id) {
6
6
  [flagName]: Flags.string({
7
7
  char,
8
8
  required: false,
9
- description: `ID or short ID of a ${name}; this flag is optional if a default ${name} is set in the context`,
9
+ summary: `ID or short ID of a ${name}; this flag is optional if a default ${name} is set in the context`,
10
+ description: `May contain a short ID or a full ID of a ${name}; you can also use the "<%= config.bin %> context set --${name}-id=<VALUE>" command to persistently set a default ${name} for all commands that accept this flag.`,
10
11
  }),
11
12
  };
12
13
  const args = {
@@ -1,10 +1,21 @@
1
1
  import oclif from "@oclif/core";
2
2
  import { ApiClientError } from "@mittwald/api-client-commons";
3
+ import { CLIError, ExitError } from "@oclif/core/lib/errors/index.js";
4
+ import { renderError } from "../rendering/react/error.js";
3
5
  export const handleError = (error) => {
4
6
  if (!isUnexpectedError(error)) {
5
7
  process.exit(1);
6
8
  return;
7
9
  }
10
+ if (error instanceof ExitError) {
11
+ process.exit(error.oclif.exit);
12
+ return;
13
+ }
14
+ if (error instanceof CLIError) {
15
+ renderError(error);
16
+ process.exit(1);
17
+ return;
18
+ }
8
19
  if (error instanceof ApiClientError) {
9
20
  const responseJson = JSON.stringify(error.response?.data, undefined, 2);
10
21
  const errorMessage = `\
@@ -0,0 +1,8 @@
1
+ import { MittwaldAPIV2 } from "@mittwald/api-client";
2
+ import { FC } from "react";
3
+ import IngressIngress = MittwaldAPIV2.Components.Schemas.IngressIngress;
4
+ type Props = {
5
+ ingress: IngressIngress;
6
+ };
7
+ export declare const DnsValidationErrors: FC<Props>;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Warning, warningColor } from "../Warning.js";
3
+ import { ListItem } from "../ListItem.js";
4
+ import { Value } from "../Value.js";
5
+ import { Box, Text } from "ink";
6
+ export const DnsValidationErrors = ({ ingress }) => {
7
+ return (_jsxs(Warning, { raw: true, children: [_jsx(Box, { marginY: 1, children: _jsx(Text, { color: warningColor, children: "Your virtual host was created, but there were some issues with your DNS configuration that require your attention:" }) }), ingress.dnsValidationErrors.map((error, idx) => {
8
+ switch (error) {
9
+ case "ERROR_NO_A_RECORD":
10
+ return (_jsx(ListItem, { children: _jsxs(Text, { color: warningColor, children: ["No A record for the hostname ", ingress.hostname, " was found; please create one and point it to the following IP addresses:", " ", ingress.ips.v4.join(", ")] }) }, idx));
11
+ case "ERROR_QUAD_A":
12
+ return (_jsx(ListItem, { children: _jsxs(Text, { color: warningColor, children: ["We found a AAA record for ", ingress.hostname, "; please note that we do not support IPv6 at the moment; please create a regular A record and point it to the following IP addresses:", " ", ingress.ips.v4.join(", ")] }) }, idx));
13
+ default:
14
+ return (_jsx(ListItem, { children: _jsxs(Text, { color: warningColor, children: ["An unspecified error in your DNS configuration was found; if unsure, please contact our customer support (easiest by using the ", _jsx(Value, { children: "mw conversation create" }), " command)"] }) }, idx));
15
+ }
16
+ })] }));
17
+ };
@@ -0,0 +1,8 @@
1
+ import { MittwaldAPIV2 } from "@mittwald/api-client";
2
+ import { FC } from "react";
3
+ import DomainDomainOwnership = MittwaldAPIV2.Components.Schemas.DomainDomainOwnership;
4
+ type Props = {
5
+ ownership: DomainDomainOwnership;
6
+ };
7
+ export declare const DomainOwnership: FC<Props>;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Warning, warningColor } from "../Warning.js";
3
+ import { Value } from "../Value.js";
4
+ import { Box, Text } from "ink";
5
+ export const DomainOwnership = ({ ownership }) => {
6
+ return (_jsx(Warning, { raw: true, children: _jsxs(Box, { marginY: 1, flexDirection: "column", children: [_jsxs(Text, { color: warningColor, children: ["Your virtual host was created, but you need to verify your ownership of the domain ", _jsx(Value, { children: ownership.domain }), " before proceeding. To do this, create a TXT record with the following content:"] }), _jsx(Box, { marginY: 1, children: _jsx(Text, { children: _jsxs(Value, { children: [" ", ownership.txtRecord] }) }) }), _jsxs(Text, { color: warningColor, children: ["Once you have created the record, use the", " ", _jsx(Value, { children: "mw domain ownership verify" }), " command to verify your ownership."] })] }) }));
7
+ };
@@ -1,5 +1,5 @@
1
1
  import { FC, PropsWithChildren } from "react";
2
- type NoteProps = PropsWithChildren<{
2
+ export type NoteProps = PropsWithChildren<{
3
3
  title?: string;
4
4
  color?: string;
5
5
  marginY?: number;
@@ -7,4 +7,3 @@ type NoteProps = PropsWithChildren<{
7
7
  }>;
8
8
  export declare const noteColor = "#407FF8";
9
9
  export declare const Note: FC<NoteProps>;
10
- export {};
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { NoteProps } from "./Note.js";
3
+ export declare const warningColor = "#FF9343";
4
+ export declare const Warning: FC<NoteProps>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Note } from "./Note.js";
3
+ export const warningColor = "#FF9343";
4
+ export const Warning = (props) => {
5
+ const { title = "Warning", color = warningColor } = props;
6
+ return _jsx(Note, { ...props, title: title, color: color });
7
+ };
@@ -0,0 +1 @@
1
+ export declare function renderError(err: unknown): void;
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Box, render, Text } from "ink";
3
+ import Link from "ink-link";
4
+ import { FailedFlagValidationError, RequiredArgsError, } from "@oclif/core/lib/parser/errors.js";
5
+ const color = "red";
6
+ const issueURL = "https://github.com/mittwald/cli/issues/new";
7
+ const boxProps = {
8
+ width: 80,
9
+ flexDirection: "column",
10
+ borderColor: color,
11
+ borderStyle: "round",
12
+ paddingX: 1,
13
+ rowGap: 1,
14
+ };
15
+ const GenericError = ({ err, withStack, }) => {
16
+ return (_jsxs(_Fragment, { children: [_jsxs(Box, { ...boxProps, borderColor: color, children: [_jsx(Text, { color: color, bold: true, underline: true, children: "ERROR" }), _jsx(Text, { color: color, children: "An error occurred while executing this command:" }), _jsx(Box, { marginX: 2, children: _jsx(Text, { color: color, children: err.toString() }) }), _jsxs(Text, { color: color, children: ["If you believe this to be a bug, please open an issue at", " ", _jsx(Link, { url: issueURL, children: issueURL }), "."] })] }), withStack && "stack" in err ? (_jsxs(Box, { marginX: 2, marginY: 1, flexDirection: "column", rowGap: 1, children: [_jsx(Text, { color: color, dimColor: true, bold: true, children: "ERROR STACK TRACE" }), _jsx(Text, { color: color, dimColor: true, children: "Please provide this when opening a bug report." }), _jsx(Text, { color: color, dimColor: true, children: err.stack })] })) : undefined] }));
17
+ };
18
+ const InvalidFlagsError = ({ err }) => {
19
+ const color = "yellow";
20
+ return (_jsxs(Box, { ...boxProps, borderColor: color, children: [_jsx(Text, { color: color, bold: true, underline: true, children: "INVALID COMMAND FLAGS" }), _jsxs(Text, { color: color, children: ["The flags that you provided for this command were invalid. ", err.message] })] }));
21
+ };
22
+ const InvalidArgsError = ({ err }) => {
23
+ const color = "yellow";
24
+ return (_jsxs(Box, { ...boxProps, borderColor: color, children: [_jsx(Text, { color: color, bold: true, underline: true, children: "INVALID COMMAND ARGUMENTS" }), _jsxs(Text, { color: color, children: ["The arguments that you provided for this command were invalid.", " ", err.message] })] }));
25
+ };
26
+ const ErrorBox = ({ err }) => {
27
+ if (err instanceof FailedFlagValidationError) {
28
+ return _jsx(InvalidFlagsError, { err: err });
29
+ }
30
+ else if (err instanceof RequiredArgsError) {
31
+ return _jsx(InvalidArgsError, { err: err });
32
+ }
33
+ else if (err instanceof Error) {
34
+ return _jsx(GenericError, { err: err, withStack: true });
35
+ }
36
+ else {
37
+ const realError = new Error(err.toString());
38
+ return _jsx(GenericError, { err: realError, withStack: false });
39
+ }
40
+ };
41
+ export function renderError(err) {
42
+ render(_jsx(ErrorBox, { err: err }));
43
+ }
@@ -4,7 +4,8 @@ import { SilentProcessRenderer } from "./process_quiet.js";
4
4
  export const processFlags = {
5
5
  quiet: Flags.boolean({
6
6
  char: "q",
7
- description: "Suppress process output and only display a machine-readable summary.",
7
+ summary: "suppress process output and only display a machine-readable summary.",
8
+ description: "This flag controls if you want to see the process output or only a summary. When using <%= config.bin %> non-interactively (e.g. in scripts), you can use this flag to easily get the IDs of created resources for further processing.",
8
9
  }),
9
10
  };
10
11
  export const makeProcessRenderer = (flags, title) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/cli",
3
- "version": "1.0.0-alpha.10",
3
+ "version": "1.0.0-alpha.11",
4
4
  "description": "Hand-crafted CLI for the mittwald API",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -11,6 +11,9 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/mittwald/api-client-js/issues"
13
13
  },
14
+ "bin": {
15
+ "mw": "bin/run.js"
16
+ },
14
17
  "type": "module",
15
18
  "scripts": {
16
19
  "clean": "(rimraf --glob dist tsconfig.*.tsbuildinfo) | true",
@@ -38,9 +41,6 @@
38
41
  "{dist,dist-cjs}/**/*.{js,d.ts}",
39
42
  "bin"
40
43
  ],
41
- "bin": {
42
- "mw": "bin/run.js"
43
- },
44
44
  "dependencies": {
45
45
  "@mittwald/api-client": "^2.0.5",
46
46
  "@mittwald/api-client-commons": "^3.0.3",
@@ -1,3 +0,0 @@
1
- import { GeneratedCustomerGetCustomerInvite } from "../../../generated/customer/getCustomerInvite.js";
2
- export default class Get extends GeneratedCustomerGetCustomerInvite {
3
- }
@@ -1,6 +0,0 @@
1
- /* eslint-disable */
2
- /* prettier-ignore */
3
- /* This file is auto-generated with acg (@mittwald/api-code-generator) */
4
- import { GeneratedCustomerGetCustomerInvite } from "../../../generated/customer/getCustomerInvite.js";
5
- export default class Get extends GeneratedCustomerGetCustomerInvite {
6
- }
@@ -1,3 +0,0 @@
1
- import { GeneratedCustomerGetCustomerMembership } from "../../../generated/customer/getCustomerMembership.js";
2
- export default class Get extends GeneratedCustomerGetCustomerMembership {
3
- }
@@ -1,6 +0,0 @@
1
- /* eslint-disable */
2
- /* prettier-ignore */
3
- /* This file is auto-generated with acg (@mittwald/api-code-generator) */
4
- import { GeneratedCustomerGetCustomerMembership } from "../../../generated/customer/getCustomerMembership.js";
5
- export default class Get extends GeneratedCustomerGetCustomerMembership {
6
- }
@@ -1,16 +0,0 @@
1
- import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { GetBaseCommand } from "../../GetBaseCommand.js";
3
- export type PathParams = MittwaldAPIV2.Paths.V2CustomerCategoriesCategoryId.Get.Parameters.Path;
4
- type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["customer"]["getCustomerCategory"]>>;
5
- export declare abstract class GeneratedCustomerGetCustomerCategory extends GetBaseCommand<typeof GeneratedCustomerGetCustomerCategory, 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 GeneratedCustomerGetCustomerCategory extends GetBaseCommand {
7
- static description = "Get a customer 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.customer.getCustomerCategory({
19
- pathParameters: await this.mapParams(this.args),
20
- });
21
- }
22
- mapParams(input) {
23
- return input;
24
- }
25
- }
@@ -1,16 +0,0 @@
1
- import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { GetBaseCommand } from "../../GetBaseCommand.js";
3
- export type PathParams = MittwaldAPIV2.Paths.V2CustomerInvitesInviteId.Get.Parameters.Path;
4
- type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["customer"]["getCustomerInvite"]>>;
5
- export declare abstract class GeneratedCustomerGetCustomerInvite extends GetBaseCommand<typeof GeneratedCustomerGetCustomerInvite, 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
- inviteId: 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 GeneratedCustomerGetCustomerInvite extends GetBaseCommand {
7
- static description = "Get a CustomerInvite.";
8
- static flags = {
9
- ...GetBaseCommand.baseFlags,
10
- };
11
- static args = {
12
- inviteId: Args.string({
13
- description: "ID of the CustomerInvite to be retrieved.",
14
- required: true,
15
- }),
16
- };
17
- async getData() {
18
- return await this.apiClient.customer.getCustomerInvite({
19
- pathParameters: await this.mapParams(this.args),
20
- });
21
- }
22
- mapParams(input) {
23
- return input;
24
- }
25
- }
@@ -1,16 +0,0 @@
1
- import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { GetBaseCommand } from "../../GetBaseCommand.js";
3
- export type PathParams = MittwaldAPIV2.Paths.V2CustomerMembershipsMembershipId.Get.Parameters.Path;
4
- type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["customer"]["getCustomerMembership"]>>;
5
- export declare abstract class GeneratedCustomerGetCustomerMembership extends GetBaseCommand<typeof GeneratedCustomerGetCustomerMembership, 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
- membershipId: 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 GeneratedCustomerGetCustomerMembership extends GetBaseCommand {
7
- static description = "Get a CustomerMembership.";
8
- static flags = {
9
- ...GetBaseCommand.baseFlags,
10
- };
11
- static args = {
12
- membershipId: Args.string({
13
- description: "ID of the CustomerMembership to retrieve.",
14
- required: true,
15
- }),
16
- };
17
- async getData() {
18
- return await this.apiClient.customer.getCustomerMembership({
19
- pathParameters: await this.mapParams(this.args),
20
- });
21
- }
22
- mapParams(input) {
23
- return input;
24
- }
25
- }
@@ -1,13 +0,0 @@
1
- import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { ListBaseCommand } from "../../ListBaseCommand.js";
3
- export type PathParams = MittwaldAPIV2.Paths.V2CustomerInvites.Get.Parameters.Path;
4
- export type Response = Awaited<ReturnType<MittwaldAPIV2Client["customer"]["listCustomerInvites"]>>;
5
- export declare abstract class GeneratedCustomerListCustomerInvites<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedCustomerListCustomerInvites, TItem, Response> {
6
- static description: string;
7
- static args: {};
8
- static flags: {
9
- [x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
10
- };
11
- getData(): Promise<Response>;
12
- protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
13
- }
@@ -1,17 +0,0 @@
1
- import { ListBaseCommand } from "../../ListBaseCommand.js";
2
- export class GeneratedCustomerListCustomerInvites extends ListBaseCommand {
3
- static description = "List all CustomerInvites for the executing user.";
4
- static args = {};
5
- static flags = {
6
- ...ListBaseCommand.baseFlags,
7
- };
8
- async getData() {
9
- const pathParams = {};
10
- return await this.apiClient.customer.listCustomerInvites({
11
- pathParameters: await this.mapParams(pathParams),
12
- });
13
- }
14
- mapParams(input) {
15
- return input;
16
- }
17
- }
@@ -1,13 +0,0 @@
1
- import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { ListBaseCommand } from "../../ListBaseCommand.js";
3
- export type PathParams = MittwaldAPIV2.Paths.V2CustomerMemberships.Get.Parameters.Path;
4
- export type Response = Awaited<ReturnType<MittwaldAPIV2Client["customer"]["listCustomerMemberships"]>>;
5
- export declare abstract class GeneratedCustomerListCustomerMemberships<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedCustomerListCustomerMemberships, TItem, Response> {
6
- static description: string;
7
- static args: {};
8
- static flags: {
9
- [x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
10
- };
11
- getData(): Promise<Response>;
12
- protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
13
- }
@@ -1,17 +0,0 @@
1
- import { ListBaseCommand } from "../../ListBaseCommand.js";
2
- export class GeneratedCustomerListCustomerMemberships extends ListBaseCommand {
3
- static description = "List all CustomerMemberships for the executing user.";
4
- static args = {};
5
- static flags = {
6
- ...ListBaseCommand.baseFlags,
7
- };
8
- async getData() {
9
- const pathParams = {};
10
- return await this.apiClient.customer.listCustomerMemberships({
11
- pathParameters: await this.mapParams(pathParams),
12
- });
13
- }
14
- mapParams(input) {
15
- return input;
16
- }
17
- }
@@ -1,13 +0,0 @@
1
- import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { ListBaseCommand } from "../../ListBaseCommand.js";
3
- export type PathParams = MittwaldAPIV2.Paths.V2Customers.Get.Parameters.Path;
4
- export type Response = Awaited<ReturnType<MittwaldAPIV2Client["customer"]["listCustomers"]>>;
5
- export declare abstract class GeneratedCustomerListCustomers<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedCustomerListCustomers, TItem, Response> {
6
- static description: string;
7
- static args: {};
8
- static flags: {
9
- [x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
10
- };
11
- getData(): Promise<Response>;
12
- protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
13
- }
@@ -1,17 +0,0 @@
1
- import { ListBaseCommand } from "../../ListBaseCommand.js";
2
- export class GeneratedCustomerListCustomers extends ListBaseCommand {
3
- static description = "Get all customer profiles the authenticated user has access to.";
4
- static args = {};
5
- static flags = {
6
- ...ListBaseCommand.baseFlags,
7
- };
8
- async getData() {
9
- const pathParams = {};
10
- return await this.apiClient.customer.listCustomers({
11
- pathParameters: await this.mapParams(pathParams),
12
- });
13
- }
14
- mapParams(input) {
15
- return input;
16
- }
17
- }
@@ -1,13 +0,0 @@
1
- import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { ListBaseCommand } from "../../ListBaseCommand.js";
3
- export type PathParams = MittwaldAPIV2.Paths.V2CustomersCustomerIdInvites.Get.Parameters.Path;
4
- export type Response = Awaited<ReturnType<MittwaldAPIV2Client["customer"]["listInvitesForCustomer"]>>;
5
- export declare abstract class GeneratedCustomerListInvitesForCustomer<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedCustomerListInvitesForCustomer, TItem, Response> {
6
- static description: string;
7
- static args: {};
8
- static flags: {
9
- "customer-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
- };
11
- getData(): Promise<Response>;
12
- protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
13
- }
@@ -1,24 +0,0 @@
1
- import { Flags } from "@oclif/core";
2
- import { ListBaseCommand } from "../../ListBaseCommand.js";
3
- export class GeneratedCustomerListInvitesForCustomer extends ListBaseCommand {
4
- static description = "List all invites for a Customer.";
5
- static args = {};
6
- static flags = {
7
- ...ListBaseCommand.baseFlags,
8
- "customer-id": Flags.string({
9
- description: "ID of the Customer to list invites for.",
10
- required: true,
11
- }),
12
- };
13
- async getData() {
14
- const pathParams = {
15
- customerId: this.flags["customer-id"],
16
- };
17
- return await this.apiClient.customer.listInvitesForCustomer({
18
- pathParameters: await this.mapParams(pathParams),
19
- });
20
- }
21
- mapParams(input) {
22
- return input;
23
- }
24
- }
@@ -1,13 +0,0 @@
1
- import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { ListBaseCommand } from "../../ListBaseCommand.js";
3
- export type PathParams = MittwaldAPIV2.Paths.V2CustomersCustomerIdMemberships.Get.Parameters.Path;
4
- export type Response = Awaited<ReturnType<MittwaldAPIV2Client["customer"]["listMembershipsForCustomer"]>>;
5
- export declare abstract class GeneratedCustomerListMembershipsForCustomer<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedCustomerListMembershipsForCustomer, TItem, Response> {
6
- static description: string;
7
- static args: {};
8
- static flags: {
9
- "customer-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
- };
11
- getData(): Promise<Response>;
12
- protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
13
- }
@@ -1,24 +0,0 @@
1
- import { Flags } from "@oclif/core";
2
- import { ListBaseCommand } from "../../ListBaseCommand.js";
3
- export class GeneratedCustomerListMembershipsForCustomer extends ListBaseCommand {
4
- static description = "List all memberships belonging to a Customer.";
5
- static args = {};
6
- static flags = {
7
- ...ListBaseCommand.baseFlags,
8
- "customer-id": Flags.string({
9
- description: "Customer to list memberships for.",
10
- required: true,
11
- }),
12
- };
13
- async getData() {
14
- const pathParams = {
15
- customerId: this.flags["customer-id"],
16
- };
17
- return await this.apiClient.customer.listMembershipsForCustomer({
18
- pathParameters: await this.mapParams(pathParams),
19
- });
20
- }
21
- mapParams(input) {
22
- return input;
23
- }
24
- }
@@ -1,13 +0,0 @@
1
- import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { ListBaseCommand } from "../../ListBaseCommand.js";
3
- export type PathParams = MittwaldAPIV2.Paths.V2CustomerCategories.Get.Parameters.Path;
4
- export type Response = Awaited<ReturnType<MittwaldAPIV2Client["customer"]["listOfCustomerCategories"]>>;
5
- export declare abstract class GeneratedCustomerListOfCustomerCategories<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedCustomerListOfCustomerCategories, TItem, Response> {
6
- static description: string;
7
- static args: {};
8
- static flags: {
9
- [x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
10
- };
11
- getData(): Promise<Response>;
12
- protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
13
- }
@@ -1,17 +0,0 @@
1
- import { ListBaseCommand } from "../../ListBaseCommand.js";
2
- export class GeneratedCustomerListOfCustomerCategories extends ListBaseCommand {
3
- static description = "Get all customer categories.";
4
- static args = {};
5
- static flags = {
6
- ...ListBaseCommand.baseFlags,
7
- };
8
- async getData() {
9
- const pathParams = {};
10
- return await this.apiClient.customer.listOfCustomerCategories({
11
- pathParameters: await this.mapParams(pathParams),
12
- });
13
- }
14
- mapParams(input) {
15
- return input;
16
- }
17
- }
@@ -1,16 +0,0 @@
1
- import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { GetBaseCommand } from "../../GetBaseCommand.js";
3
- export type PathParams = MittwaldAPIV2.Paths.V2IngressesIngressId.Get.Parameters.Path;
4
- type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["domain"]["ingressGetSpecific"]>>;
5
- export declare abstract class GeneratedIngressGetSpecific extends GetBaseCommand<typeof GeneratedIngressGetSpecific, 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
- ingressId: 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 GeneratedIngressGetSpecific extends GetBaseCommand {
7
- static description = "Get an Ingress.";
8
- static flags = {
9
- ...GetBaseCommand.baseFlags,
10
- };
11
- static args = {
12
- ingressId: Args.string({
13
- description: "ID of the Ingress to be retrieved.",
14
- required: true,
15
- }),
16
- };
17
- async getData() {
18
- return await this.apiClient.domain.ingressGetSpecific({
19
- pathParameters: await this.mapParams(this.args),
20
- });
21
- }
22
- mapParams(input) {
23
- return input;
24
- }
25
- }