Skip to content

Commit

Permalink
$ npm run generate
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsmfm committed Aug 5, 2024
1 parent 5f8ea67 commit 4957edd
Show file tree
Hide file tree
Showing 24 changed files with 74 additions and 91 deletions.
5 changes: 2 additions & 3 deletions src/commands/mobile/api/describe-test-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ export default class MobileApiDescribeTestResult extends Command {

static flags = {
"project-id": Flags.string({
description:
"ID of the project from which the test results will be obtained.",
description: `ID of the project from which the test results will be obtained.`,
required: true,
}),
id: Flags.string({ description: "Test Result ID.", required: true }),
id: Flags.string({ description: `Test Result ID.`, required: true }),
};

public async run(): Promise<void> {
Expand Down
9 changes: 4 additions & 5 deletions src/commands/mobile/api/list-test-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@ export default class MobileApiListTestResults extends Command {

static flags = {
"project-id": Flags.string({
description:
"ID of the project from which the list of test results will be retrieved.",
description: `ID of the project from which the list of test results will be retrieved.`,
required: true,
}),
page: Flags.integer({
description: "Page number to be retrieved.",
description: `Page number to be retrieved.`,
required: false,
}),
"per-page": Flags.integer({
description: "Number of test results per page.",
description: `Number of test results per page.`,
required: false,
}),
"test-plan-id": Flags.string({
description: "ID of the test plan.",
description: `ID of the test plan.`,
required: false,
}),
};
Expand Down
4 changes: 2 additions & 2 deletions src/commands/mobile/api/run-test-plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export default class MobileApiRunTestPlan extends Command {

static flags = {
"test-plan-id": Flags.string({
description: "The ID of the test plan to run.",
description: `The ID of the test plan to run.`,
required: true,
}),
"run-test-plan-request": Flags.string({
description: "The build_id to execute the test plan.",
description: `The build_id to execute the test plan.`,
required: true,
}),
};
Expand Down
4 changes: 2 additions & 2 deletions src/commands/mobile/api/upload-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export default class MobileApiUploadBuild extends Command {

static flags = {
"project-id": Flags.string({
description: "The ID of the project to upload the build file to.",
description: `The ID of the project to upload the build file to.`,
required: true,
}),
file: Flags.string({ description: "Build file.", required: true }),
file: Flags.string({ description: `Build file.`, required: true }),
};

public async run(): Promise<void> {
Expand Down
5 changes: 2 additions & 3 deletions src/commands/web/api/create-access-point.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ export default class WebApiCreateAccessPoint extends Command {

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios`,
required: true,
}),
"create-access-point-request": Flags.string({
description: "The name of the access point to be created",
description: `The name of the access point to be created`,
required: true,
}),
};
Expand Down
6 changes: 2 additions & 4 deletions src/commands/web/api/create-test-plan-variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ export default class WebApiCreateTestPlanVariable extends Command {

static flags = {
"test-plan-id": Flags.integer({
description:
"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15",
description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`,
required: true,
}),
"create-test-plan-variable-request": Flags.string({
description:
"The new variable key and default value to use in the test plan",
description: `The new variable key and default value to use in the test plan`,
required: true,
}),
};
Expand Down
5 changes: 2 additions & 3 deletions src/commands/web/api/create-url-replacement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ export default class WebApiCreateUrlReplacement extends Command {

static flags = {
"test-plan-id": Flags.integer({
description:
"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15",
description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`,
required: true,
}),
"create-url-replacement-request": Flags.string({
description: "The url to replace",
description: `The url to replace`,
required: true,
}),
};
Expand Down
5 changes: 2 additions & 3 deletions src/commands/web/api/delete-access-point.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ export default class WebApiDeleteAccessPoint extends Command {

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios`,
required: true,
}),
"delete-access-point-request": Flags.string({
description: "The name of the access point to be deleted",
description: `The name of the access point to be deleted`,
required: true,
}),
};
Expand Down
5 changes: 2 additions & 3 deletions src/commands/web/api/delete-test-plan-variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ export default class WebApiDeleteTestPlanVariable extends Command {

static flags = {
"test-plan-id": Flags.integer({
description:
"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15/",
description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15/`,
required: true,
}),
"test-plan-variable-id": Flags.integer({
description: "test_plan_variable id",
description: `test_plan_variable id`,
required: true,
}),
};
Expand Down
5 changes: 2 additions & 3 deletions src/commands/web/api/delete-url-replacement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ export default class WebApiDeleteUrlReplacement extends Command {

static flags = {
"test-plan-id": Flags.integer({
description:
"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15",
description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`,
required: true,
}),
"url-replacement-id": Flags.integer({
description: "url_replacement id",
description: `url_replacement id`,
required: true,
}),
};
Expand Down
8 changes: 3 additions & 5 deletions src/commands/web/api/describe-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ export default class WebApiDescribeResult extends Command {

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/results/4",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/results/4`,
required: true,
}),
"result-id": Flags.integer({
description:
"For example, 4 for the following URL: https://app.autify.com/projects/1/results/4",
description: `For example, 4 for the following URL: https://app.autify.com/projects/1/results/4`,
required: true,
}),
"get-details": Flags.string({
description: "The flag to get details of the test case result.",
description: `The flag to get details of the test case result.`,
required: false,
}),
};
Expand Down
6 changes: 2 additions & 4 deletions src/commands/web/api/describe-scenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ export default class WebApiDescribeScenario extends Command {

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2`,
required: true,
}),
"scenario-id": Flags.integer({
description:
"For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2",
description: `For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2`,
required: true,
}),
};
Expand Down
5 changes: 2 additions & 3 deletions src/commands/web/api/execute-scenarios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ export default class WebApiExecuteScenarios extends Command {

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios`,
required: true,
}),
"execute-scenarios-request": Flags.string({
description: "The scenarios and settings to execute",
description: `The scenarios and settings to execute`,
required: true,
}),
};
Expand Down
7 changes: 3 additions & 4 deletions src/commands/web/api/execute-schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ import { getWebClient } from "../../../autify/web/getWebClient";

export default class WebApiExecuteSchedule extends Command {
static description =
'"Schedule" is called as "Test Plan" now.\\ If you want to run a test plan, use this endpoint.';
'"Schedule" is called as "Test Plan" now. If you want to run a test plan, use this endpoint.';

static examples = ["<%= config.bin %> <%= command.id %>"];

static flags = {
"schedule-id": Flags.integer({
description:
"For example, 3 for the following URL: https://app.autify.com/projects/1/test_plans/3",
description: `For example, 3 for the following URL: https://app.autify.com/projects/1/test_plans/3`,
required: true,
}),
"execute-schedule-request": Flags.string({
description: "The options to execute a test plan.",
description: `The options to execute a test plan.`,
required: false,
}),
};
Expand Down
17 changes: 7 additions & 10 deletions src/commands/web/api/get-credit-usage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,33 @@ import { getWebClient } from "../../../autify/web/getWebClient";

export default class WebApiGetCreditUsage extends Command {
static description =
"Get the number of credits used in the project\\ \\ Notes:\\ This endpoint works only for organizations on credit-based plans. It always returns 0 for `credits_consumed` and `credit_consumption_event_count` if your organization is on a run-based plan.";
"Get the number of credits used in the project Notes: This endpoint works only for organizations on credit-based plans. It always returns 0 for `credits_consumed` and `credit_consumption_event_count` if your organization is on a run-based plan.";

static examples = ["<%= config.bin %> <%= command.id %>"];

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/credits",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/credits`,
required: true,
}),
"date-from": Flags.string({
description:
"The date to start counting used credits from.\\ If not specified, the date will be set to 1 week ago.\\ Up to 90 days in advance can be specified. If the specified date is more than 90 days in the past, the date will be set to 90 days ago.\\ Date must follow the format YYYY-MM-DD (example: &quot;2023-09-21&quot;).",
description: `The date to start counting used credits from. If not specified, the date will be set to 1 week ago. Up to 90 days in advance can be specified. If the specified date is more than 90 days in the past, the date will be set to 90 days ago. Date must follow the format YYYY-MM-DD (example: "2023-09-21").`,
required: false,
}),
"date-to": Flags.string({
description:
"The date to end counting used credits from.\\ If not specified, the date will be set to today.\\ Date must follow the format YYYY-MM-DD (example: &quot;2023-09-28&quot;).",
description: `The date to end counting used credits from. If not specified, the date will be set to today. Date must follow the format YYYY-MM-DD (example: "2023-09-28").`,
required: false,
}),
"scenario-id": Flags.integer({
description: "The scenario ID to filter used credits by.",
description: `The scenario ID to filter used credits by.`,
required: false,
}),
"test-plan-id": Flags.integer({
description: "The test plan ID to filter used credits by.",
description: `The test plan ID to filter used credits by.`,
required: false,
}),
"user-id": Flags.integer({
description: "The user ID that executed tests to filter used credits by.",
description: `The user ID that executed tests to filter used credits by.`,
required: false,
}),
};
Expand Down
3 changes: 1 addition & 2 deletions src/commands/web/api/get-project-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export default class WebApiGetProjectInfo extends Command {

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/project_info",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/project_info`,
required: true,
}),
};
Expand Down
5 changes: 2 additions & 3 deletions src/commands/web/api/list-access-points.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ export default class WebApiListAccessPoints extends Command {

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios`,
required: true,
}),
page: Flags.integer({
description: "The number of page returns.",
description: `The number of page returns.`,
required: false,
}),
};
Expand Down
24 changes: 18 additions & 6 deletions src/commands/web/api/list-capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,27 @@ export default class WebApiListCapabilities extends Command {

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/capabilities",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/capabilities`,
required: true,
}),
os: Flags.string({ description: "os name to filter", required: false }),
os: Flags.string({
description: `os name to filter (deprecated)`,
required: false,
}),
"os-type": Flags.string({
description: `Type of the os to filter`,
required: false,
}),
browser: Flags.string({
description: "browser name to filter",
description: `browser name to filter (deprecated)`,
required: false,
}),
"browser-type": Flags.string({
description: `Type of the browser to filter`,
required: false,
}),
"device-type": Flags.string({
description: "device_type name to filter",
description: `device_type name to filter (mobile is deprecated)`,
required: false,
}),
};
Expand All @@ -30,8 +40,10 @@ export default class WebApiListCapabilities extends Command {
const res = await client.listCapabilities(
flags["project-id"],
flags.os,
flags["os-type"] ? JSON.parse(flags["os-type"]) : undefined,
flags.browser,
flags["device-type"]
flags["browser-type"] ? JSON.parse(flags["browser-type"]) : undefined,
flags["device-type"] ? JSON.parse(flags["device-type"]) : undefined
);
console.log(JSON.stringify(res.data, null, 2));
}
Expand Down
10 changes: 4 additions & 6 deletions src/commands/web/api/list-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@ export default class WebApiListResults extends Command {

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/results",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/results`,
required: true,
}),
page: Flags.integer({
description: "The number of page returns.",
description: `The number of page returns.`,
required: false,
}),
"per-page": Flags.integer({
description:
"The number of items returns. Default number is 30 and up to a maximum of 100",
description: `The number of items returns. Default number is 30 and up to a maximum of 100`,
required: false,
}),
"test-plan-id": Flags.integer({
description: "Test plan ID used to filter results.",
description: `Test plan ID used to filter results.`,
required: false,
}),
};
Expand Down
5 changes: 2 additions & 3 deletions src/commands/web/api/list-scenarios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ export default class WebApiListScenarios extends Command {

static flags = {
"project-id": Flags.integer({
description:
"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios",
description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios`,
required: true,
}),
page: Flags.integer({
description: "The number of page returns.",
description: `The number of page returns.`,
required: false,
}),
};
Expand Down
3 changes: 1 addition & 2 deletions src/commands/web/api/list-test-plan-variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export default class WebApiListTestPlanVariable extends Command {

static flags = {
"test-plan-id": Flags.integer({
description:
"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15",
description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`,
required: true,
}),
};
Expand Down
Loading

0 comments on commit 4957edd

Please sign in to comment.