@bussolabs/closeyourit-cli 0.0.16 → 0.0.18
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 +81 -2
- package/dist/commands/agents/assign.d.ts +13 -0
- package/dist/commands/agents/assign.js +25 -0
- package/dist/commands/agents/create.d.ts +22 -0
- package/dist/commands/agents/create.js +58 -0
- package/dist/commands/agents/delete.d.ts +12 -0
- package/dist/commands/agents/delete.js +25 -0
- package/dist/commands/agents/list.d.ts +10 -0
- package/dist/commands/agents/list.js +34 -0
- package/dist/commands/agents/runs/list.d.ts +12 -0
- package/dist/commands/agents/runs/list.js +32 -0
- package/dist/commands/agents/runs/show.d.ts +10 -0
- package/dist/commands/agents/runs/show.js +21 -0
- package/dist/commands/agents/show.d.ts +9 -0
- package/dist/commands/agents/show.js +20 -0
- package/dist/commands/agents/update.d.ts +23 -0
- package/dist/commands/agents/update.js +59 -0
- package/dist/commands/alerts/notifications/delete.d.ts +12 -0
- package/dist/commands/alerts/notifications/delete.js +25 -0
- package/dist/commands/alerts/notifications/list.d.ts +9 -0
- package/dist/commands/alerts/notifications/list.js +29 -0
- package/dist/commands/alerts/notifications/read-all.d.ts +6 -0
- package/dist/commands/alerts/notifications/read-all.js +15 -0
- package/dist/commands/alerts/notifications/read.d.ts +9 -0
- package/dist/commands/alerts/notifications/read.js +22 -0
- package/dist/commands/alerts/preferences/show.d.ts +6 -0
- package/dist/commands/alerts/preferences/show.js +16 -0
- package/dist/commands/alerts/preferences/update.d.ts +20 -0
- package/dist/commands/alerts/preferences/update.js +63 -0
- package/dist/commands/analytics/goals/create.d.ts +13 -0
- package/dist/commands/analytics/goals/create.js +35 -0
- package/dist/commands/analytics/goals/delete.d.ts +13 -0
- package/dist/commands/analytics/goals/delete.js +27 -0
- package/dist/commands/analytics/goals/list.d.ts +9 -0
- package/dist/commands/analytics/goals/list.js +25 -0
- package/dist/commands/analytics/share.d.ts +10 -0
- package/dist/commands/analytics/share.js +30 -0
- package/dist/commands/analytics/show.d.ts +11 -0
- package/dist/commands/analytics/show.js +32 -0
- package/dist/commands/analytics/unshare.d.ts +10 -0
- package/dist/commands/analytics/unshare.js +24 -0
- package/dist/commands/cron-monitors/list.d.ts +11 -0
- package/dist/commands/cron-monitors/list.js +38 -0
- package/dist/commands/cron-monitors/show.d.ts +9 -0
- package/dist/commands/cron-monitors/show.js +20 -0
- package/dist/commands/groups/create.d.ts +1 -0
- package/dist/commands/groups/create.js +7 -0
- package/dist/commands/groups/update.d.ts +1 -0
- package/dist/commands/groups/update.js +8 -1
- package/dist/commands/ideas/archive.d.ts +12 -0
- package/dist/commands/ideas/archive.js +24 -0
- package/dist/commands/ideas/case-delete.d.ts +14 -0
- package/dist/commands/ideas/case-delete.js +30 -0
- package/dist/commands/ideas/case-update.d.ts +15 -0
- package/dist/commands/ideas/case-update.js +41 -0
- package/dist/commands/ideas/delete.d.ts +13 -0
- package/dist/commands/ideas/delete.js +27 -0
- package/dist/commands/ideas/unarchive.d.ts +12 -0
- package/dist/commands/ideas/unarchive.js +24 -0
- package/dist/commands/logs/link.d.ts +12 -0
- package/dist/commands/logs/link.js +33 -0
- package/dist/commands/logs/show.d.ts +9 -0
- package/dist/commands/logs/show.js +21 -0
- package/dist/commands/logs/unlink.d.ts +13 -0
- package/dist/commands/logs/unlink.js +26 -0
- package/dist/commands/members/remove.d.ts +12 -0
- package/dist/commands/members/remove.js +27 -0
- package/dist/commands/members/set-access.d.ts +4 -0
- package/dist/commands/members/set-access.js +38 -4
- package/dist/commands/members/update.d.ts +14 -0
- package/dist/commands/members/update.js +40 -0
- package/dist/commands/monitors/announcements/clear.d.ts +13 -0
- package/dist/commands/monitors/announcements/clear.js +27 -0
- package/dist/commands/monitors/announcements/set.d.ts +17 -0
- package/dist/commands/monitors/announcements/set.js +45 -0
- package/dist/commands/monitors/announcements/show.d.ts +12 -0
- package/dist/commands/monitors/announcements/show.js +24 -0
- package/dist/commands/monitors/create.d.ts +1 -0
- package/dist/commands/monitors/create.js +3 -0
- package/dist/commands/monitors/incidents/delete.d.ts +14 -0
- package/dist/commands/monitors/incidents/delete.js +28 -0
- package/dist/commands/monitors/incidents/group.d.ts +15 -0
- package/dist/commands/monitors/incidents/group.js +38 -0
- package/dist/commands/monitors/incidents/ungroup.d.ts +14 -0
- package/dist/commands/monitors/incidents/ungroup.js +31 -0
- package/dist/commands/monitors/incidents/update-add.d.ts +15 -0
- package/dist/commands/monitors/incidents/update-add.js +38 -0
- package/dist/commands/monitors/incidents/update-delete.d.ts +15 -0
- package/dist/commands/monitors/incidents/update-delete.js +31 -0
- package/dist/commands/monitors/publish.d.ts +12 -0
- package/dist/commands/monitors/publish.js +21 -0
- package/dist/commands/monitors/unpublish.d.ts +12 -0
- package/dist/commands/monitors/unpublish.js +21 -0
- package/dist/commands/monitors/update.d.ts +1 -0
- package/dist/commands/monitors/update.js +3 -0
- package/dist/commands/org/update.d.ts +2 -0
- package/dist/commands/org/update.js +10 -0
- package/dist/commands/platforms/create.d.ts +1 -0
- package/dist/commands/platforms/create.js +7 -0
- package/dist/commands/platforms/update.d.ts +1 -0
- package/dist/commands/platforms/update.js +8 -1
- package/dist/commands/projects/create.d.ts +2 -0
- package/dist/commands/projects/create.js +13 -0
- package/dist/commands/projects/link-server.d.ts +11 -0
- package/dist/commands/projects/link-server.js +33 -0
- package/dist/commands/projects/settings/show.d.ts +9 -0
- package/dist/commands/projects/settings/show.js +23 -0
- package/dist/commands/projects/settings/update.d.ts +14 -0
- package/dist/commands/projects/settings/update.js +50 -0
- package/dist/commands/projects/unlink-server.d.ts +13 -0
- package/dist/commands/projects/unlink-server.js +29 -0
- package/dist/commands/projects/update.d.ts +2 -0
- package/dist/commands/projects/update.js +14 -1
- package/dist/commands/releases/list.d.ts +10 -0
- package/dist/commands/releases/list.js +29 -0
- package/dist/commands/tickets/links.d.ts +12 -0
- package/dist/commands/tickets/links.js +33 -0
- package/dist/commands/tickets/reviewer.d.ts +13 -0
- package/dist/commands/tickets/reviewer.js +29 -0
- package/dist/commands/tickets/unlink.d.ts +14 -0
- package/dist/commands/tickets/unlink.js +29 -0
- package/dist/commands/tickets/unreviewer.d.ts +12 -0
- package/dist/commands/tickets/unreviewer.js +25 -0
- package/dist/commands/tickets/unwatch.d.ts +12 -0
- package/dist/commands/tickets/unwatch.js +25 -0
- package/dist/commands/tickets/watch.d.ts +12 -0
- package/dist/commands/tickets/watch.js +26 -0
- package/dist/commands/todos/complete.d.ts +10 -0
- package/dist/commands/todos/complete.js +23 -0
- package/dist/commands/todos/create.d.ts +10 -0
- package/dist/commands/todos/create.js +29 -0
- package/dist/commands/todos/delete.d.ts +12 -0
- package/dist/commands/todos/delete.js +25 -0
- package/dist/commands/todos/items/add.d.ts +14 -0
- package/dist/commands/todos/items/add.js +35 -0
- package/dist/commands/todos/items/delete.d.ts +13 -0
- package/dist/commands/todos/items/delete.js +26 -0
- package/dist/commands/todos/items/list.d.ts +12 -0
- package/dist/commands/todos/items/list.js +28 -0
- package/dist/commands/todos/items/update.d.ts +15 -0
- package/dist/commands/todos/items/update.js +38 -0
- package/dist/commands/todos/list.d.ts +9 -0
- package/dist/commands/todos/list.js +24 -0
- package/dist/commands/todos/reorder.d.ts +9 -0
- package/dist/commands/todos/reorder.js +19 -0
- package/dist/commands/todos/share.d.ts +12 -0
- package/dist/commands/todos/share.js +33 -0
- package/dist/commands/todos/shared-show.d.ts +9 -0
- package/dist/commands/todos/shared-show.js +20 -0
- package/dist/commands/todos/shared.d.ts +9 -0
- package/dist/commands/todos/shared.js +25 -0
- package/dist/commands/todos/shares.d.ts +9 -0
- package/dist/commands/todos/shares.js +26 -0
- package/dist/commands/todos/show.d.ts +9 -0
- package/dist/commands/todos/show.js +20 -0
- package/dist/commands/todos/uncomplete.d.ts +10 -0
- package/dist/commands/todos/uncomplete.js +23 -0
- package/dist/commands/todos/update.d.ts +13 -0
- package/dist/commands/todos/update.js +34 -0
- package/dist/commands/uptime-groups/create.d.ts +12 -0
- package/dist/commands/uptime-groups/create.js +35 -0
- package/dist/commands/uptime-groups/delete.d.ts +12 -0
- package/dist/commands/uptime-groups/delete.js +25 -0
- package/dist/commands/uptime-groups/list.d.ts +9 -0
- package/dist/commands/uptime-groups/list.js +24 -0
- package/dist/commands/uptime-groups/publish.d.ts +9 -0
- package/dist/commands/uptime-groups/publish.js +22 -0
- package/dist/commands/uptime-groups/show.d.ts +9 -0
- package/dist/commands/uptime-groups/show.js +20 -0
- package/dist/commands/uptime-groups/unpublish.d.ts +9 -0
- package/dist/commands/uptime-groups/unpublish.js +22 -0
- package/dist/commands/uptime-groups/update.d.ts +15 -0
- package/dist/commands/uptime-groups/update.js +37 -0
- package/oclif.manifest.json +6389 -2226
- package/opencli.json +3003 -83
- package/package.json +16 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
class IdeasCaseDelete extends base_1.BaseCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
idea: core_1.Args.string({ description: 'Idea id', required: true }),
|
|
8
|
+
case: core_1.Args.string({ description: 'Case id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Delete a case from an open idea (author always allowed, others need ideas.edit)';
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> ideas case-delete <idea-id> <case-id> --project acme-api --confirm',
|
|
13
|
+
];
|
|
14
|
+
static flags = {
|
|
15
|
+
...base_1.projectFlag,
|
|
16
|
+
confirm: core_1.Flags.boolean({ description: 'Required: confirm the irreversible deletion' }),
|
|
17
|
+
};
|
|
18
|
+
async run() {
|
|
19
|
+
const { args, flags } = await this.parse(IdeasCaseDelete);
|
|
20
|
+
if (!flags.confirm) {
|
|
21
|
+
this.error('Refusing to delete without --confirm (the action is irreversible).', { exit: 2 });
|
|
22
|
+
}
|
|
23
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
24
|
+
await this.api.delete(`/cli/v1/projects/${projectId}/ideas/${args.idea}/cases/${args.case}`);
|
|
25
|
+
if (!this.jsonEnabled())
|
|
26
|
+
this.log(`Deleted case ${args.case}`);
|
|
27
|
+
return { deleted: args.case };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.default = IdeasCaseDelete;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class IdeasCaseUpdate extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
idea: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
case: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static flags: {
|
|
10
|
+
title: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<unknown>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const output_1 = require("../../lib/output");
|
|
6
|
+
class IdeasCaseUpdate extends base_1.BaseCommand {
|
|
7
|
+
// PATCH /cli/v1/projects/:p/ideas/:idea_id/cases/:id maps to Ideas::UpdateCase (only open ideas;
|
|
8
|
+
// same gate as editing the idea — author, otherwise `ideas.edit`). The CLI transport speaks PUT,
|
|
9
|
+
// which the Rails `resources :cases` update action accepts just like PATCH; only the passed fields
|
|
10
|
+
// are sent so the backend rewrites nothing you did not touch.
|
|
11
|
+
static args = {
|
|
12
|
+
idea: core_1.Args.string({ description: 'Idea id', required: true }),
|
|
13
|
+
case: core_1.Args.string({ description: 'Case id', required: true }),
|
|
14
|
+
};
|
|
15
|
+
static description = 'Update a case (example/scenario) of an idea (title and/or description)';
|
|
16
|
+
static examples = [
|
|
17
|
+
'<%= config.bin %> ideas case-update <idea-id> <case-id> --project acme-api --title "QR check-in"',
|
|
18
|
+
'<%= config.bin %> ideas case-update <idea-id> <case-id> -p acme-api --description "Staff scans the QR at the door"',
|
|
19
|
+
];
|
|
20
|
+
static flags = {
|
|
21
|
+
...base_1.projectFlag,
|
|
22
|
+
title: core_1.Flags.string({ description: 'New case title' }),
|
|
23
|
+
description: core_1.Flags.string({ description: 'New case description' }),
|
|
24
|
+
};
|
|
25
|
+
async run() {
|
|
26
|
+
const { args, flags } = await this.parse(IdeasCaseUpdate);
|
|
27
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
28
|
+
const body = {};
|
|
29
|
+
if (flags.title !== undefined)
|
|
30
|
+
body.title = flags.title;
|
|
31
|
+
if (flags.description !== undefined)
|
|
32
|
+
body.description = flags.description;
|
|
33
|
+
const res = await this.api.put(`/cli/v1/projects/${projectId}/ideas/${args.idea}/cases/${args.case}`, body);
|
|
34
|
+
if (!this.jsonEnabled()) {
|
|
35
|
+
this.log('Case updated:');
|
|
36
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
37
|
+
}
|
|
38
|
+
return res;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.default = IdeasCaseUpdate;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class IdeasDelete extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
confirm: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
class IdeasDelete extends base_1.BaseCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
id: core_1.Args.string({ description: 'Idea id', required: true }),
|
|
8
|
+
};
|
|
9
|
+
static description = 'Delete an idea (author always allowed; others need ideas.delete)';
|
|
10
|
+
static examples = ['<%= config.bin %> ideas delete <idea-id> --project acme-api --confirm'];
|
|
11
|
+
static flags = {
|
|
12
|
+
...base_1.projectFlag,
|
|
13
|
+
confirm: core_1.Flags.boolean({ description: 'Required: confirm the irreversible deletion' }),
|
|
14
|
+
};
|
|
15
|
+
async run() {
|
|
16
|
+
const { args, flags } = await this.parse(IdeasDelete);
|
|
17
|
+
if (!flags.confirm) {
|
|
18
|
+
this.error('Refusing to delete without --confirm (the action is irreversible).', { exit: 2 });
|
|
19
|
+
}
|
|
20
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
21
|
+
await this.api.delete(`/cli/v1/projects/${projectId}/ideas/${args.id}`);
|
|
22
|
+
if (!this.jsonEnabled())
|
|
23
|
+
this.log(`Deleted idea ${args.id}`);
|
|
24
|
+
return { deleted: args.id };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = IdeasDelete;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class IdeasUnarchive extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const output_1 = require("../../lib/output");
|
|
6
|
+
class IdeasUnarchive extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: core_1.Args.string({ description: 'Idea id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Reopen an archived idea (archived → open; author always allowed, others need ideas.edit)';
|
|
11
|
+
static examples = ['<%= config.bin %> ideas unarchive <idea-id> --project acme-api'];
|
|
12
|
+
static flags = { ...base_1.projectFlag };
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(IdeasUnarchive);
|
|
15
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
16
|
+
const res = await this.api.delete(`/cli/v1/projects/${projectId}/ideas/${args.id}/archive`);
|
|
17
|
+
if (!this.jsonEnabled()) {
|
|
18
|
+
this.log(`Reopened idea ${args.id}:`);
|
|
19
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
20
|
+
}
|
|
21
|
+
return res;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = IdeasUnarchive;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class LogsLink extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
to: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const output_1 = require("../../lib/output");
|
|
6
|
+
class LogsLink extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: core_1.Args.string({ description: 'Log entry id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Manually link a log entry to an error group or a ticket';
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> logs link <log-entry-id> --to "Errors::Group:<uuid>"',
|
|
13
|
+
'<%= config.bin %> logs link <log-entry-id> --to "Ticketing::Ticket:<uuid>"',
|
|
14
|
+
];
|
|
15
|
+
static flags = {
|
|
16
|
+
to: core_1.Flags.string({
|
|
17
|
+
description: 'Target to link: "Errors::Group:<uuid>" or "Ticketing::Ticket:<uuid>"',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
async run() {
|
|
22
|
+
const { args, flags } = await this.parse(LogsLink);
|
|
23
|
+
const res = await this.api.post(`/cli/v1/log_entries/${args.id}/links`, {
|
|
24
|
+
linkable: flags.to,
|
|
25
|
+
});
|
|
26
|
+
if (!this.jsonEnabled()) {
|
|
27
|
+
this.log(`Linked log ${args.id} to ${flags.to}:`);
|
|
28
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
29
|
+
}
|
|
30
|
+
return res;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.default = LogsLink;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class LogsShow extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
run(): Promise<unknown>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const output_1 = require("../../lib/output");
|
|
6
|
+
class LogsShow extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: core_1.Args.string({ description: 'Log entry id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Show a single log entry (attributes, trace id, correlation)';
|
|
11
|
+
static examples = ['<%= config.bin %> logs show <log-entry-id>'];
|
|
12
|
+
async run() {
|
|
13
|
+
const { args } = await this.parse(LogsShow);
|
|
14
|
+
const res = await this.api.get(`/cli/v1/log_entries/${args.id}`);
|
|
15
|
+
if (!this.jsonEnabled()) {
|
|
16
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
17
|
+
}
|
|
18
|
+
return res;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = LogsShow;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class LogsUnlink extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
link: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static flags: {
|
|
10
|
+
confirm: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
class LogsUnlink extends base_1.BaseCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
id: core_1.Args.string({ description: 'Log entry id', required: true }),
|
|
8
|
+
link: core_1.Args.string({ description: 'Link id to remove', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Remove a manual log↔target link (irreversible)';
|
|
11
|
+
static examples = ['<%= config.bin %> logs unlink <log-entry-id> <link-id> --confirm'];
|
|
12
|
+
static flags = {
|
|
13
|
+
confirm: core_1.Flags.boolean({ description: 'Required: confirm the irreversible deletion' }),
|
|
14
|
+
};
|
|
15
|
+
async run() {
|
|
16
|
+
const { args, flags } = await this.parse(LogsUnlink);
|
|
17
|
+
if (!flags.confirm) {
|
|
18
|
+
this.error('Refusing to delete without --confirm (the action is irreversible).', { exit: 2 });
|
|
19
|
+
}
|
|
20
|
+
await this.api.delete(`/cli/v1/log_entries/${args.id}/links/${args.link}`);
|
|
21
|
+
if (!this.jsonEnabled())
|
|
22
|
+
this.log(`Removed link ${args.link} from log ${args.id}`);
|
|
23
|
+
return { deleted: args.link };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = LogsUnlink;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class MembersRemove extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
confirm: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
class MembersRemove extends base_1.BaseCommand {
|
|
6
|
+
// Remove the membership from the organization (the account survives, it just loses access to this org).
|
|
7
|
+
// The backend gates `members.manage`. Irreversible → requires --confirm. The arg is the MEMBERSHIP id.
|
|
8
|
+
static description = 'Remove a member from your organization (irreversible; requires members.manage)';
|
|
9
|
+
static examples = ['<%= config.bin %> members remove <membership-id> --confirm'];
|
|
10
|
+
static args = {
|
|
11
|
+
id: core_1.Args.string({ description: 'Membership id', required: true }),
|
|
12
|
+
};
|
|
13
|
+
static flags = {
|
|
14
|
+
confirm: core_1.Flags.boolean({ description: 'Required: confirm the irreversible removal' }),
|
|
15
|
+
};
|
|
16
|
+
async run() {
|
|
17
|
+
const { args, flags } = await this.parse(MembersRemove);
|
|
18
|
+
if (!flags.confirm) {
|
|
19
|
+
this.error('Refusing to remove without --confirm (the action is irreversible).', { exit: 2 });
|
|
20
|
+
}
|
|
21
|
+
await this.api.delete(`/cli/v1/members/${encodeURIComponent(args.id)}`);
|
|
22
|
+
if (!this.jsonEnabled())
|
|
23
|
+
this.log(`Removed member ${args.id}`);
|
|
24
|
+
return { removed: args.id };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = MembersRemove;
|
|
@@ -8,6 +8,10 @@ export default class MembersSetAccess extends BaseCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
group: import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
10
|
project: import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'role-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
override: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
13
|
};
|
|
12
14
|
run(): Promise<unknown>;
|
|
15
|
+
/** Parse repeated `key=allow|deny|inherit` entries into a `{key: value}` map; usage error on a bad entry. */
|
|
16
|
+
private parseOverrides;
|
|
13
17
|
}
|
|
@@ -4,12 +4,16 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const base_1 = require("../../base");
|
|
5
5
|
const output_1 = require("../../lib/output");
|
|
6
6
|
class MembersSetAccess extends base_1.BaseCommand {
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
|
|
7
|
+
// Scope (groups/projects): FULL REPLACE — the ids you pass become the member's complete access set;
|
|
8
|
+
// omit --group / --project to clear that dimension (an empty array is always sent).
|
|
9
|
+
// Roles/overrides: applied ONLY when their flag is passed (a client sending just --group/--project
|
|
10
|
+
// never clears roles or overrides). --role-id is a full-replace of the direct roles; --override is a
|
|
11
|
+
// full-replace of the personal allow/deny overrides ("inherit" removes the override for that key).
|
|
12
|
+
static description = "Set a member's access: group/project scope, direct roles, and permission overrides";
|
|
10
13
|
static examples = [
|
|
11
14
|
'<%= config.bin %> members set-access <membership-id> --project acme-api --project acme-web',
|
|
12
|
-
'<%= config.bin %> members set-access <membership-id> --group DriverOne',
|
|
15
|
+
'<%= config.bin %> members set-access <membership-id> --group DriverOne --role-id Maintainer',
|
|
16
|
+
'<%= config.bin %> members set-access <membership-id> --override tickets.edit=allow --override errors.triage=deny',
|
|
13
17
|
'<%= config.bin %> members set-access <membership-id>',
|
|
14
18
|
];
|
|
15
19
|
static args = {
|
|
@@ -26,13 +30,29 @@ class MembersSetAccess extends base_1.BaseCommand {
|
|
|
26
30
|
multiple: true,
|
|
27
31
|
default: [],
|
|
28
32
|
}),
|
|
33
|
+
'role-id': core_1.Flags.string({
|
|
34
|
+
description: 'Direct role id or name (repeatable; when passed, replaces the direct roles set)',
|
|
35
|
+
multiple: true,
|
|
36
|
+
}),
|
|
37
|
+
override: core_1.Flags.string({
|
|
38
|
+
description: 'Permission override "permission.key=allow|deny|inherit" (repeatable; when passed, replaces the overrides)',
|
|
39
|
+
multiple: true,
|
|
40
|
+
}),
|
|
29
41
|
};
|
|
30
42
|
async run() {
|
|
31
43
|
const { args, flags } = await this.parse(MembersSetAccess);
|
|
44
|
+
// Scope is always sent (full-replace / clear). Roles & overrides only when their flag is present,
|
|
45
|
+
// so this mirrors the backend `params.key?`-gated apply and never clears what the caller omitted.
|
|
32
46
|
const body = {
|
|
33
47
|
group_ids: await this.resolveAll(flags.group, (v) => this.resolveGroupId(v)),
|
|
34
48
|
project_ids: await this.resolveAll(flags.project, (v) => this.resolveProjectId(v)),
|
|
35
49
|
};
|
|
50
|
+
if (flags['role-id'] !== undefined) {
|
|
51
|
+
body.role_ids = await this.resolveAll(flags['role-id'], (v) => this.resolveRoleId(v));
|
|
52
|
+
}
|
|
53
|
+
if (flags.override !== undefined) {
|
|
54
|
+
body.overrides = this.parseOverrides(flags.override);
|
|
55
|
+
}
|
|
36
56
|
const res = await this.api.put(`/cli/v1/members/${encodeURIComponent(args.id)}/access`, body);
|
|
37
57
|
if (!this.jsonEnabled()) {
|
|
38
58
|
this.log('Member access updated:');
|
|
@@ -40,5 +60,19 @@ class MembersSetAccess extends base_1.BaseCommand {
|
|
|
40
60
|
}
|
|
41
61
|
return res;
|
|
42
62
|
}
|
|
63
|
+
/** Parse repeated `key=allow|deny|inherit` entries into a `{key: value}` map; usage error on a bad entry. */
|
|
64
|
+
parseOverrides(entries) {
|
|
65
|
+
const out = {};
|
|
66
|
+
for (const entry of entries) {
|
|
67
|
+
const eq = entry.indexOf('=');
|
|
68
|
+
const key = eq === -1 ? '' : entry.slice(0, eq).trim();
|
|
69
|
+
const value = eq === -1 ? '' : entry.slice(eq + 1).trim();
|
|
70
|
+
if (!key || !['allow', 'deny', 'inherit'].includes(value)) {
|
|
71
|
+
this.error(`Invalid --override "${entry}". Use "permission.key=allow|deny|inherit".`, { exit: 2 });
|
|
72
|
+
}
|
|
73
|
+
out[key] = value;
|
|
74
|
+
}
|
|
75
|
+
return out;
|
|
76
|
+
}
|
|
43
77
|
}
|
|
44
78
|
exports.default = MembersSetAccess;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class MembersUpdate extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
email: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
handle: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<unknown>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const output_1 = require("../../lib/output");
|
|
6
|
+
class MembersUpdate extends base_1.BaseCommand {
|
|
7
|
+
// Update the member's account profile (name/email/handle). email/handle are GLOBAL credentials.
|
|
8
|
+
// Only the flags you pass are sent. The backend gates `members.edit` and protects privileged targets
|
|
9
|
+
// (owner/god) from non-privileged actors. The arg is the MEMBERSHIP id (like set-role/set-access).
|
|
10
|
+
static description = "Update a member's profile: name, email, handle (requires members.edit)";
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> members update <membership-id> --name "Ada Lovelace"',
|
|
13
|
+
'<%= config.bin %> members update <membership-id> --email ada@acme.test --handle ada',
|
|
14
|
+
];
|
|
15
|
+
static args = {
|
|
16
|
+
id: core_1.Args.string({ description: 'Membership id', required: true }),
|
|
17
|
+
};
|
|
18
|
+
static flags = {
|
|
19
|
+
name: core_1.Flags.string({ description: 'New display name' }),
|
|
20
|
+
email: core_1.Flags.string({ description: 'New email (global credential)' }),
|
|
21
|
+
handle: core_1.Flags.string({ description: 'New handle (global; a-z, 0-9, underscore)' }),
|
|
22
|
+
};
|
|
23
|
+
async run() {
|
|
24
|
+
const { args, flags } = await this.parse(MembersUpdate);
|
|
25
|
+
const body = {};
|
|
26
|
+
if (flags.name !== undefined)
|
|
27
|
+
body.name = flags.name;
|
|
28
|
+
if (flags.email !== undefined)
|
|
29
|
+
body.email = flags.email;
|
|
30
|
+
if (flags.handle !== undefined)
|
|
31
|
+
body.handle = flags.handle;
|
|
32
|
+
const res = await this.api.put(`/cli/v1/members/${encodeURIComponent(args.id)}`, body);
|
|
33
|
+
if (!this.jsonEnabled()) {
|
|
34
|
+
this.log('Member updated:');
|
|
35
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
36
|
+
}
|
|
37
|
+
return res;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = MembersUpdate;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class MonitorsAnnouncementsClear extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
monitor: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
confirm: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../../base");
|
|
5
|
+
class MonitorsAnnouncementsClear extends base_1.BaseCommand {
|
|
6
|
+
static description = 'Remove the status page announcement banner for a monitor';
|
|
7
|
+
static examples = ['<%= config.bin %> monitors announcements clear <monitor-id> --project acme-api --confirm'];
|
|
8
|
+
static args = {
|
|
9
|
+
monitor: core_1.Args.string({ description: 'Monitor id', required: true }),
|
|
10
|
+
};
|
|
11
|
+
static flags = {
|
|
12
|
+
...base_1.projectFlag,
|
|
13
|
+
confirm: core_1.Flags.boolean({ description: 'Required: confirm the removal' }),
|
|
14
|
+
};
|
|
15
|
+
async run() {
|
|
16
|
+
const { args, flags } = await this.parse(MonitorsAnnouncementsClear);
|
|
17
|
+
if (!flags.confirm) {
|
|
18
|
+
this.error('Refusing to clear the announcement without --confirm.', { exit: 2 });
|
|
19
|
+
}
|
|
20
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
21
|
+
await this.api.delete(`/cli/v1/projects/${encodeURIComponent(projectId)}/monitors/${encodeURIComponent(args.monitor)}/announcement`);
|
|
22
|
+
if (!this.jsonEnabled())
|
|
23
|
+
this.log(`Cleared announcement for monitor ${args.monitor}`);
|
|
24
|
+
return { cleared: args.monitor };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = MonitorsAnnouncementsClear;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class MonitorsAnnouncementsSet extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
monitor: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
level: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
message: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'starts-at': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'ends-at': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
active: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<unknown>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../../base");
|
|
5
|
+
const output_1 = require("../../../lib/output");
|
|
6
|
+
class MonitorsAnnouncementsSet extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Upsert the status page announcement banner for a monitor';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> monitors announcements set <monitor-id> --project acme-api --level maintenance --message "Scheduled DB upgrade"',
|
|
10
|
+
'<%= config.bin %> monitors announcements set <monitor-id> -p acme-api --level warning --message "Degraded" --starts-at 2026-07-10T09:00:00Z --ends-at 2026-07-10T11:00:00Z --active',
|
|
11
|
+
];
|
|
12
|
+
static args = {
|
|
13
|
+
monitor: core_1.Args.string({ description: 'Monitor id', required: true }),
|
|
14
|
+
};
|
|
15
|
+
static flags = {
|
|
16
|
+
...base_1.projectFlag,
|
|
17
|
+
level: core_1.Flags.string({ description: 'Banner level', options: ['info', 'maintenance', 'warning'] }),
|
|
18
|
+
message: core_1.Flags.string({ description: 'Banner message' }),
|
|
19
|
+
'starts-at': core_1.Flags.string({ description: 'Start time (ISO 8601)' }),
|
|
20
|
+
'ends-at': core_1.Flags.string({ description: 'End time (ISO 8601)' }),
|
|
21
|
+
active: core_1.Flags.boolean({ allowNo: true, description: 'Whether the banner is active' }),
|
|
22
|
+
};
|
|
23
|
+
async run() {
|
|
24
|
+
const { args, flags } = await this.parse(MonitorsAnnouncementsSet);
|
|
25
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
26
|
+
const body = {};
|
|
27
|
+
if (flags.level !== undefined)
|
|
28
|
+
body.level = flags.level;
|
|
29
|
+
if (flags.message !== undefined)
|
|
30
|
+
body.message = flags.message;
|
|
31
|
+
if (flags['starts-at'] !== undefined)
|
|
32
|
+
body.starts_at = flags['starts-at'];
|
|
33
|
+
if (flags['ends-at'] !== undefined)
|
|
34
|
+
body.ends_at = flags['ends-at'];
|
|
35
|
+
if (flags.active !== undefined)
|
|
36
|
+
body.active = flags.active;
|
|
37
|
+
const res = await this.api.put(`/cli/v1/projects/${encodeURIComponent(projectId)}/monitors/${encodeURIComponent(args.monitor)}/announcement`, body);
|
|
38
|
+
if (!this.jsonEnabled()) {
|
|
39
|
+
this.log('Announcement saved:');
|
|
40
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
41
|
+
}
|
|
42
|
+
return res;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.default = MonitorsAnnouncementsSet;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class MonitorsAnnouncementsShow extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
monitor: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../../base");
|
|
5
|
+
const output_1 = require("../../../lib/output");
|
|
6
|
+
class MonitorsAnnouncementsShow extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Show the status page announcement banner for a monitor (null if none)';
|
|
8
|
+
static examples = ['<%= config.bin %> monitors announcements show <monitor-id> --project acme-api'];
|
|
9
|
+
static args = {
|
|
10
|
+
monitor: core_1.Args.string({ description: 'Monitor id', required: true }),
|
|
11
|
+
};
|
|
12
|
+
static flags = { ...base_1.projectFlag };
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(MonitorsAnnouncementsShow);
|
|
15
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
16
|
+
const res = await this.api.get(`/cli/v1/projects/${encodeURIComponent(projectId)}/monitors/${encodeURIComponent(args.monitor)}/announcement`);
|
|
17
|
+
if (!this.jsonEnabled()) {
|
|
18
|
+
const announcement = res.data;
|
|
19
|
+
this.log(announcement ? (0, output_1.renderRecord)(announcement) : 'No announcement set.');
|
|
20
|
+
}
|
|
21
|
+
return res;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = MonitorsAnnouncementsShow;
|
|
@@ -11,6 +11,7 @@ export default class MonitorsCreate extends BaseCommand {
|
|
|
11
11
|
'timeout-seconds': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
12
|
'expected-body-keyword': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
13
|
'ssl-expiry-warn-days': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'group-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
15
|
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
16
|
};
|
|
16
17
|
run(): Promise<unknown>;
|