@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,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const base_1 = require("../../../base");
|
|
4
|
+
class AlertsNotificationsReadAll extends base_1.BaseCommand {
|
|
5
|
+
static description = 'Mark all your unread notifications as read';
|
|
6
|
+
static examples = ['<%= config.bin %> alerts notifications read-all'];
|
|
7
|
+
async run() {
|
|
8
|
+
const res = await this.api.put('/cli/v1/alert_notifications/read_all');
|
|
9
|
+
if (!this.jsonEnabled()) {
|
|
10
|
+
this.log(`Marked ${res.data?.marked_read ?? 0} notification(s) read`);
|
|
11
|
+
}
|
|
12
|
+
return res;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.default = AlertsNotificationsReadAll;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class AlertsNotificationsRead 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,22 @@
|
|
|
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 AlertsNotificationsRead extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: core_1.Args.string({ description: 'Notification id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Mark a single notification as read (idempotent)';
|
|
11
|
+
static examples = ['<%= config.bin %> alerts notifications read <notification-id>'];
|
|
12
|
+
async run() {
|
|
13
|
+
const { args } = await this.parse(AlertsNotificationsRead);
|
|
14
|
+
const res = await this.api.put(`/cli/v1/alert_notifications/${args.id}/read`);
|
|
15
|
+
if (!this.jsonEnabled()) {
|
|
16
|
+
this.log(`Notification ${args.id} marked read:`);
|
|
17
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
18
|
+
}
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = AlertsNotificationsRead;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const base_1 = require("../../../base");
|
|
4
|
+
const output_1 = require("../../../lib/output");
|
|
5
|
+
class AlertsPreferencesShow extends base_1.BaseCommand {
|
|
6
|
+
static description = 'Show your personal alert preferences (per organization)';
|
|
7
|
+
static examples = ['<%= config.bin %> alerts preferences show'];
|
|
8
|
+
async run() {
|
|
9
|
+
const res = await this.api.get('/cli/v1/alert_preferences');
|
|
10
|
+
if (!this.jsonEnabled()) {
|
|
11
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
12
|
+
}
|
|
13
|
+
return res;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.default = AlertsPreferencesShow;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class AlertsPreferencesUpdate extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
'in-app-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
'email-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
'errors-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
'uptime-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
'tickets-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
'chat-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
'servers-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
'min-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'quiet-hours-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
'quiet-hours-start': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
'quiet-hours-end': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
'quiet-hours-tz': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<unknown>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 AlertsPreferencesUpdate extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Update your personal alert preferences (send only the fields you want to change)';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> alerts preferences update --no-email-enabled --min-level error',
|
|
10
|
+
'<%= config.bin %> alerts preferences update --quiet-hours-enabled --quiet-hours-start 22:00 --quiet-hours-end 07:00 --quiet-hours-tz Europe/Rome',
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
'in-app-enabled': core_1.Flags.boolean({ allowNo: true, description: 'Deliver notifications in-app' }),
|
|
14
|
+
'email-enabled': core_1.Flags.boolean({ allowNo: true, description: 'Deliver notifications by email' }),
|
|
15
|
+
'errors-enabled': core_1.Flags.boolean({ allowNo: true, description: 'Receive error alerts' }),
|
|
16
|
+
'uptime-enabled': core_1.Flags.boolean({ allowNo: true, description: 'Receive uptime alerts' }),
|
|
17
|
+
'tickets-enabled': core_1.Flags.boolean({ allowNo: true, description: 'Receive ticket notifications' }),
|
|
18
|
+
'chat-enabled': core_1.Flags.boolean({ allowNo: true, description: 'Receive chat notifications' }),
|
|
19
|
+
'servers-enabled': core_1.Flags.boolean({ allowNo: true, description: 'Receive server alerts' }),
|
|
20
|
+
'min-level': core_1.Flags.string({ description: 'Minimum error level that notifies you' }),
|
|
21
|
+
'quiet-hours-enabled': core_1.Flags.boolean({ allowNo: true, description: 'Enable the quiet-hours window' }),
|
|
22
|
+
'quiet-hours-start': core_1.Flags.string({ description: 'Quiet-hours start (HH:MM)' }),
|
|
23
|
+
'quiet-hours-end': core_1.Flags.string({ description: 'Quiet-hours end (HH:MM)' }),
|
|
24
|
+
'quiet-hours-tz': core_1.Flags.string({ description: 'Quiet-hours timezone (IANA, e.g. Europe/Rome)' }),
|
|
25
|
+
};
|
|
26
|
+
async run() {
|
|
27
|
+
const { flags } = await this.parse(AlertsPreferencesUpdate);
|
|
28
|
+
const body = {};
|
|
29
|
+
if (flags['in-app-enabled'] !== undefined)
|
|
30
|
+
body.in_app_enabled = flags['in-app-enabled'];
|
|
31
|
+
if (flags['email-enabled'] !== undefined)
|
|
32
|
+
body.email_enabled = flags['email-enabled'];
|
|
33
|
+
if (flags['errors-enabled'] !== undefined)
|
|
34
|
+
body.errors_enabled = flags['errors-enabled'];
|
|
35
|
+
if (flags['uptime-enabled'] !== undefined)
|
|
36
|
+
body.uptime_enabled = flags['uptime-enabled'];
|
|
37
|
+
if (flags['tickets-enabled'] !== undefined)
|
|
38
|
+
body.tickets_enabled = flags['tickets-enabled'];
|
|
39
|
+
if (flags['chat-enabled'] !== undefined)
|
|
40
|
+
body.chat_enabled = flags['chat-enabled'];
|
|
41
|
+
if (flags['servers-enabled'] !== undefined)
|
|
42
|
+
body.servers_enabled = flags['servers-enabled'];
|
|
43
|
+
if (flags['min-level'] !== undefined)
|
|
44
|
+
body.min_level = flags['min-level'];
|
|
45
|
+
// The backend keeps the quiet window only when quiet_hours_enabled is the string "1" (else it clears
|
|
46
|
+
// start/end). Map the boolean flag to that sentinel; pass start/end/tz through untouched.
|
|
47
|
+
if (flags['quiet-hours-enabled'] !== undefined)
|
|
48
|
+
body.quiet_hours_enabled = flags['quiet-hours-enabled'] ? '1' : '0';
|
|
49
|
+
if (flags['quiet-hours-start'] !== undefined)
|
|
50
|
+
body.quiet_hours_start = flags['quiet-hours-start'];
|
|
51
|
+
if (flags['quiet-hours-end'] !== undefined)
|
|
52
|
+
body.quiet_hours_end = flags['quiet-hours-end'];
|
|
53
|
+
if (flags['quiet-hours-tz'] !== undefined)
|
|
54
|
+
body.quiet_hours_tz = flags['quiet-hours-tz'];
|
|
55
|
+
const res = await this.api.put('/cli/v1/alert_preferences', body);
|
|
56
|
+
if (!this.jsonEnabled()) {
|
|
57
|
+
this.log('Alert preferences updated:');
|
|
58
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
59
|
+
}
|
|
60
|
+
return res;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.default = AlertsPreferencesUpdate;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class AnalyticsGoalsCreate extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
kind: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
'display-name': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
'event-name': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
'path-pattern': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 AnalyticsGoalsCreate extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Create a conversion goal on a project';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> analytics goals create -p acme-web --kind custom_event --display-name Signup --event-name signup',
|
|
10
|
+
'<%= config.bin %> analytics goals create -p acme-web --kind pageview_path --display-name Pricing --path-pattern "/pricing"',
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
...base_1.projectFlag,
|
|
14
|
+
kind: core_1.Flags.string({ description: 'Goal kind', options: ['pageview_path', 'custom_event'], required: true }),
|
|
15
|
+
'display-name': core_1.Flags.string({ description: 'Human-readable goal name', required: true }),
|
|
16
|
+
'event-name': core_1.Flags.string({ description: 'Custom event name (required for custom_event goals)' }),
|
|
17
|
+
'path-pattern': core_1.Flags.string({ description: 'Path pattern, "*" suffix = prefix match (required for pageview_path goals)' }),
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
const { flags } = await this.parse(AnalyticsGoalsCreate);
|
|
21
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
22
|
+
const body = { kind: flags.kind, display_name: flags['display-name'] };
|
|
23
|
+
if (flags['event-name'] !== undefined)
|
|
24
|
+
body.event_name = flags['event-name'];
|
|
25
|
+
if (flags['path-pattern'] !== undefined)
|
|
26
|
+
body.path_pattern = flags['path-pattern'];
|
|
27
|
+
const res = await this.api.post(`/cli/v1/projects/${projectId}/analytics/goals`, body);
|
|
28
|
+
if (!this.jsonEnabled()) {
|
|
29
|
+
this.log('Goal created:');
|
|
30
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
31
|
+
}
|
|
32
|
+
return res;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = AnalyticsGoalsCreate;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class AnalyticsGoalsDelete 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
|
+
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 AnalyticsGoalsDelete extends base_1.BaseCommand {
|
|
6
|
+
static description = 'Delete a conversion goal (irreversible)';
|
|
7
|
+
static examples = ['<%= config.bin %> analytics goals delete <goal-id> --project acme-web --confirm'];
|
|
8
|
+
static args = {
|
|
9
|
+
id: core_1.Args.string({ description: 'Goal id', required: true }),
|
|
10
|
+
};
|
|
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(AnalyticsGoalsDelete);
|
|
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}/analytics/goals/${args.id}`);
|
|
22
|
+
if (!this.jsonEnabled())
|
|
23
|
+
this.log(`Deleted goal ${args.id}`);
|
|
24
|
+
return { deleted: args.id };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = AnalyticsGoalsDelete;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class AnalyticsGoalsList extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<unknown>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const base_1 = require("../../../base");
|
|
4
|
+
const output_1 = require("../../../lib/output");
|
|
5
|
+
class AnalyticsGoalsList extends base_1.BaseCommand {
|
|
6
|
+
static description = 'List the conversion goals of a project';
|
|
7
|
+
static examples = ['<%= config.bin %> analytics goals list --project acme-web'];
|
|
8
|
+
static flags = { ...base_1.projectFlag };
|
|
9
|
+
async run() {
|
|
10
|
+
const { flags } = await this.parse(AnalyticsGoalsList);
|
|
11
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
12
|
+
const res = await this.api.get(`/cli/v1/projects/${projectId}/analytics/goals`);
|
|
13
|
+
const goals = res.data ?? [];
|
|
14
|
+
if (!this.jsonEnabled()) {
|
|
15
|
+
this.log((0, output_1.renderTable)(['NAME', 'KIND', 'TARGET', 'ID'], goals.map((goal) => [
|
|
16
|
+
String(goal.display_name ?? ''),
|
|
17
|
+
String(goal.kind ?? ''),
|
|
18
|
+
String(goal.event_name ?? goal.path_pattern ?? ''),
|
|
19
|
+
String(goal.id ?? ''),
|
|
20
|
+
])));
|
|
21
|
+
}
|
|
22
|
+
return res;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = AnalyticsGoalsList;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class AnalyticsShare extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
password: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<unknown>;
|
|
10
|
+
}
|
|
@@ -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
|
+
const output_1 = require("../../lib/output");
|
|
6
|
+
class AnalyticsShare extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Publish a public shareable link to the analytics dashboard (optional password)';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> analytics share --project acme-web',
|
|
10
|
+
'<%= config.bin %> analytics share -p acme-web --password s3cret',
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
...base_1.projectFlag,
|
|
14
|
+
password: core_1.Flags.string({ description: 'Optional password to protect the shared link' }),
|
|
15
|
+
};
|
|
16
|
+
async run() {
|
|
17
|
+
const { flags } = await this.parse(AnalyticsShare);
|
|
18
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
19
|
+
const body = {};
|
|
20
|
+
if (flags.password !== undefined)
|
|
21
|
+
body.password = flags.password;
|
|
22
|
+
const res = await this.api.post(`/cli/v1/projects/${projectId}/analytics/share`, body);
|
|
23
|
+
if (!this.jsonEnabled()) {
|
|
24
|
+
this.log('Analytics dashboard shared:');
|
|
25
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
26
|
+
}
|
|
27
|
+
return res;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.default = AnalyticsShare;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class AnalyticsShow extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
range: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<unknown>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 AnalyticsShow extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Show the web analytics snapshot for a project (traffic, top pages, goals)';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> analytics show --project acme-web',
|
|
10
|
+
'<%= config.bin %> analytics show -p acme-web --range 30d --environment production --json',
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
...base_1.projectFlag,
|
|
14
|
+
range: core_1.Flags.string({ description: 'Time range', options: ['24h', '7d', '30d', '1y'] }),
|
|
15
|
+
environment: core_1.Flags.string({ description: 'Filter by environment code' }),
|
|
16
|
+
};
|
|
17
|
+
async run() {
|
|
18
|
+
const { flags } = await this.parse(AnalyticsShow);
|
|
19
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
20
|
+
const params = new URLSearchParams();
|
|
21
|
+
if (flags.range !== undefined)
|
|
22
|
+
params.set('range', flags.range);
|
|
23
|
+
if (flags.environment !== undefined)
|
|
24
|
+
params.set('environment', flags.environment);
|
|
25
|
+
const query = params.toString();
|
|
26
|
+
const res = await this.api.get(`/cli/v1/projects/${projectId}/analytics${query ? `?${query}` : ''}`);
|
|
27
|
+
if (!this.jsonEnabled())
|
|
28
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
29
|
+
return res;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.default = AnalyticsShow;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class AnalyticsUnshare extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
confirm: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<unknown>;
|
|
10
|
+
}
|
|
@@ -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
|
+
class AnalyticsUnshare extends base_1.BaseCommand {
|
|
6
|
+
static description = 'Revoke the public analytics dashboard link';
|
|
7
|
+
static examples = ['<%= config.bin %> analytics unshare --project acme-web --confirm'];
|
|
8
|
+
static flags = {
|
|
9
|
+
...base_1.projectFlag,
|
|
10
|
+
confirm: core_1.Flags.boolean({ description: 'Required: confirm revoking the public link' }),
|
|
11
|
+
};
|
|
12
|
+
async run() {
|
|
13
|
+
const { flags } = await this.parse(AnalyticsUnshare);
|
|
14
|
+
if (!flags.confirm) {
|
|
15
|
+
this.error('Refusing to unshare without --confirm.', { exit: 2 });
|
|
16
|
+
}
|
|
17
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
18
|
+
await this.api.delete(`/cli/v1/projects/${projectId}/analytics/share`);
|
|
19
|
+
if (!this.jsonEnabled())
|
|
20
|
+
this.log('Revoked the public analytics link');
|
|
21
|
+
return { unshared: projectId };
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = AnalyticsUnshare;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class CronMonitorsList extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
status: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<unknown>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 CronMonitorsList extends base_1.BaseCommand {
|
|
7
|
+
static description = 'List cron / heartbeat monitors across your visible projects';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> cron-monitors list',
|
|
10
|
+
'<%= config.bin %> cron-monitors list --status missed --project acme-api --json',
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
...base_1.pageFlag,
|
|
14
|
+
project: core_1.Flags.string({ char: 'p', description: 'Filter by project id (UUID) or key' }),
|
|
15
|
+
status: core_1.Flags.string({ description: 'Filter by status', options: ['unknown', 'ok', 'late', 'missed'] }),
|
|
16
|
+
};
|
|
17
|
+
async run() {
|
|
18
|
+
const { flags } = await this.parse(CronMonitorsList);
|
|
19
|
+
const params = new URLSearchParams({ page: String(flags.page) });
|
|
20
|
+
if (flags.status !== undefined)
|
|
21
|
+
params.set('status', flags.status);
|
|
22
|
+
if (flags.project !== undefined)
|
|
23
|
+
params.set('project_id', await this.resolveProjectId(flags.project));
|
|
24
|
+
const res = await this.api.get(`/cli/v1/cron_monitors?${params.toString()}`);
|
|
25
|
+
const monitors = res.data ?? [];
|
|
26
|
+
if (!this.jsonEnabled()) {
|
|
27
|
+
this.log((0, output_1.renderTable)(['NAME', 'STATUS', 'INTERVAL (min)', 'LAST CHECK-IN', 'ID'], monitors.map((monitor) => [
|
|
28
|
+
String(monitor.name ?? ''),
|
|
29
|
+
String(monitor.status ?? ''),
|
|
30
|
+
String(monitor.expected_interval_minutes ?? '-'),
|
|
31
|
+
String(monitor.last_check_in_at ?? '-'),
|
|
32
|
+
String(monitor.id ?? ''),
|
|
33
|
+
])));
|
|
34
|
+
}
|
|
35
|
+
return res;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.default = CronMonitorsList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class CronMonitorsShow 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
|
+
run(): Promise<unknown>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 CronMonitorsShow extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Show a cron / heartbeat monitor';
|
|
8
|
+
static examples = ['<%= config.bin %> cron-monitors show <monitor-id>'];
|
|
9
|
+
static args = {
|
|
10
|
+
id: core_1.Args.string({ description: 'Cron monitor id', required: true }),
|
|
11
|
+
};
|
|
12
|
+
async run() {
|
|
13
|
+
const { args } = await this.parse(CronMonitorsShow);
|
|
14
|
+
const res = await this.api.get(`/cli/v1/cron_monitors/${args.id}`);
|
|
15
|
+
if (!this.jsonEnabled())
|
|
16
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
17
|
+
return res;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = CronMonitorsShow;
|
|
@@ -7,6 +7,7 @@ export default class GroupsCreate extends BaseCommand {
|
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
9
|
color: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
'roadmap-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
11
|
};
|
|
11
12
|
run(): Promise<unknown>;
|
|
12
13
|
}
|
|
@@ -11,15 +11,22 @@ class GroupsCreate extends base_1.BaseCommand {
|
|
|
11
11
|
static examples = [
|
|
12
12
|
'<%= config.bin %> groups create DriverOne',
|
|
13
13
|
'<%= config.bin %> groups create DriverOne --color indigo',
|
|
14
|
+
'<%= config.bin %> groups create DriverOne --roadmap-enabled',
|
|
14
15
|
];
|
|
15
16
|
static flags = {
|
|
16
17
|
color: core_1.Flags.string({ description: 'Color label' }),
|
|
18
|
+
'roadmap-enabled': core_1.Flags.boolean({
|
|
19
|
+
allowNo: true,
|
|
20
|
+
description: 'Enable the roadmap and cascade it to the projects in this group',
|
|
21
|
+
}),
|
|
17
22
|
};
|
|
18
23
|
async run() {
|
|
19
24
|
const { args, flags } = await this.parse(GroupsCreate);
|
|
20
25
|
const body = { name: args.name };
|
|
21
26
|
if (flags.color !== undefined)
|
|
22
27
|
body.color = flags.color;
|
|
28
|
+
if (flags['roadmap-enabled'] !== undefined)
|
|
29
|
+
body.roadmap_enabled = flags['roadmap-enabled'];
|
|
23
30
|
const res = await this.api.post('/cli/v1/groups', body);
|
|
24
31
|
if (!this.jsonEnabled()) {
|
|
25
32
|
this.log('Group created:');
|
|
@@ -8,6 +8,7 @@ export default class GroupsUpdate extends BaseCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
10
|
color: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'roadmap-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
12
|
};
|
|
12
13
|
run(): Promise<unknown>;
|
|
13
14
|
}
|
|
@@ -7,14 +7,19 @@ class GroupsUpdate extends base_1.BaseCommand {
|
|
|
7
7
|
static args = {
|
|
8
8
|
group: core_1.Args.string({ description: 'Group id (UUID) or name', required: true }),
|
|
9
9
|
};
|
|
10
|
-
static description = 'Update a group (rename
|
|
10
|
+
static description = 'Update a group (rename, recolor, toggle roadmap)';
|
|
11
11
|
static examples = [
|
|
12
12
|
'<%= config.bin %> groups update Backend --name "Backend services"',
|
|
13
13
|
'<%= config.bin %> groups update Backend --color indigo',
|
|
14
|
+
'<%= config.bin %> groups update Backend --roadmap-enabled',
|
|
14
15
|
];
|
|
15
16
|
static flags = {
|
|
16
17
|
name: core_1.Flags.string({ description: 'New name' }),
|
|
17
18
|
color: core_1.Flags.string({ description: 'Color label' }),
|
|
19
|
+
'roadmap-enabled': core_1.Flags.boolean({
|
|
20
|
+
allowNo: true,
|
|
21
|
+
description: 'Enable/disable the roadmap and cascade it to the projects in this group',
|
|
22
|
+
}),
|
|
18
23
|
};
|
|
19
24
|
async run() {
|
|
20
25
|
const { args, flags } = await this.parse(GroupsUpdate);
|
|
@@ -24,6 +29,8 @@ class GroupsUpdate extends base_1.BaseCommand {
|
|
|
24
29
|
body.name = flags.name;
|
|
25
30
|
if (flags.color !== undefined)
|
|
26
31
|
body.color = flags.color;
|
|
32
|
+
if (flags['roadmap-enabled'] !== undefined)
|
|
33
|
+
body.roadmap_enabled = flags['roadmap-enabled'];
|
|
27
34
|
const res = await this.api.put(`/cli/v1/groups/${id}`, body);
|
|
28
35
|
if (!this.jsonEnabled()) {
|
|
29
36
|
this.log('Group updated:');
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class IdeasArchive 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 IdeasArchive extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: core_1.Args.string({ description: 'Idea id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Archive an idea (open → archived; author always allowed, others need ideas.edit)';
|
|
11
|
+
static examples = ['<%= config.bin %> ideas archive <idea-id> --project acme-api'];
|
|
12
|
+
static flags = { ...base_1.projectFlag };
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(IdeasArchive);
|
|
15
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
16
|
+
const res = await this.api.put(`/cli/v1/projects/${projectId}/ideas/${args.id}/archive`);
|
|
17
|
+
if (!this.jsonEnabled()) {
|
|
18
|
+
this.log(`Archived idea ${args.id}:`);
|
|
19
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
20
|
+
}
|
|
21
|
+
return res;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = IdeasArchive;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class IdeasCaseDelete 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
|
+
confirm: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<unknown>;
|
|
14
|
+
}
|