@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,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class TodosItemsDelete extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
listId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
itemId: 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 TodosItemsDelete extends base_1.BaseCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
listId: core_1.Args.string({ description: 'Todo list id', required: true }),
|
|
8
|
+
itemId: core_1.Args.string({ description: 'Todo item id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Delete a todo item (irreversible)';
|
|
11
|
+
static examples = ['<%= config.bin %> todos items delete <list-id> <item-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(TodosItemsDelete);
|
|
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/todo_lists/${args.listId}/items/${args.itemId}`);
|
|
21
|
+
if (!this.jsonEnabled())
|
|
22
|
+
this.log(`Deleted todo item ${args.itemId}`);
|
|
23
|
+
return { deleted: args.itemId };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = TodosItemsDelete;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class TodosItemsList extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
listId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 TodosItemsList extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
listId: core_1.Args.string({ description: 'Todo list id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'List the items of one of your todo lists';
|
|
11
|
+
static examples = ['<%= config.bin %> todos items list <list-id>'];
|
|
12
|
+
static flags = { ...base_1.pageFlag };
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(TodosItemsList);
|
|
15
|
+
const res = await this.api.get(`/cli/v1/todo_lists/${args.listId}/items?page=${flags.page}`);
|
|
16
|
+
const items = res.data ?? [];
|
|
17
|
+
if (!this.jsonEnabled()) {
|
|
18
|
+
this.log((0, output_1.renderTable)(['TITLE', 'DONE', 'TICKET', 'ID'], items.map((item) => [
|
|
19
|
+
String(item.title ?? ''),
|
|
20
|
+
item.done ? 'yes' : 'no',
|
|
21
|
+
String(item.ticket_code ?? '-'),
|
|
22
|
+
String(item.id ?? ''),
|
|
23
|
+
])));
|
|
24
|
+
}
|
|
25
|
+
return res;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = TodosItemsList;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class TodosItemsUpdate extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
listId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
itemId: 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
|
+
ticket: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
position: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<unknown>;
|
|
15
|
+
}
|
|
@@ -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 TodosItemsUpdate extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
listId: core_1.Args.string({ description: 'Todo list id', required: true }),
|
|
9
|
+
itemId: core_1.Args.string({ description: 'Todo item id', required: true }),
|
|
10
|
+
};
|
|
11
|
+
static description = 'Update a todo item (retitle, relink a ticket, or reposition)';
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> todos items update <list-id> <item-id> --title "New title"',
|
|
14
|
+
'<%= config.bin %> todos items update <list-id> <item-id> --ticket <ticket-id>',
|
|
15
|
+
];
|
|
16
|
+
static flags = {
|
|
17
|
+
title: core_1.Flags.string({ description: 'New title' }),
|
|
18
|
+
ticket: core_1.Flags.string({ description: 'Link the item to a ticket id' }),
|
|
19
|
+
position: core_1.Flags.integer({ description: 'Position in the list' }),
|
|
20
|
+
};
|
|
21
|
+
async run() {
|
|
22
|
+
const { args, flags } = await this.parse(TodosItemsUpdate);
|
|
23
|
+
const body = {};
|
|
24
|
+
if (flags.title !== undefined)
|
|
25
|
+
body.title = flags.title;
|
|
26
|
+
if (flags.ticket !== undefined)
|
|
27
|
+
body.ticket_id = flags.ticket;
|
|
28
|
+
if (flags.position !== undefined)
|
|
29
|
+
body.position = flags.position;
|
|
30
|
+
const res = await this.api.put(`/cli/v1/todo_lists/${args.listId}/items/${args.itemId}`, body);
|
|
31
|
+
if (!this.jsonEnabled()) {
|
|
32
|
+
this.log('Todo item updated:');
|
|
33
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
34
|
+
}
|
|
35
|
+
return res;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.default = TodosItemsUpdate;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TodosList extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<unknown>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 TodosList extends base_1.BaseCommand {
|
|
6
|
+
static description = 'List your own todo lists';
|
|
7
|
+
static examples = ['<%= config.bin %> todos list', '<%= config.bin %> todos list --page 2 --json'];
|
|
8
|
+
static flags = { ...base_1.pageFlag };
|
|
9
|
+
async run() {
|
|
10
|
+
const { flags } = await this.parse(TodosList);
|
|
11
|
+
const res = await this.api.get(`/cli/v1/todo_lists?page=${flags.page}`);
|
|
12
|
+
const lists = res.data ?? [];
|
|
13
|
+
if (!this.jsonEnabled()) {
|
|
14
|
+
this.log((0, output_1.renderTable)(['NAME', 'ITEMS', 'DONE', 'ID'], lists.map((list) => [
|
|
15
|
+
String(list.name ?? ''),
|
|
16
|
+
String(list.items_count ?? 0),
|
|
17
|
+
String(list.done_count ?? 0),
|
|
18
|
+
String(list.id ?? ''),
|
|
19
|
+
])));
|
|
20
|
+
}
|
|
21
|
+
return res;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = TodosList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TodosReorder extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
list: import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<unknown>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 TodosReorder extends base_1.BaseCommand {
|
|
6
|
+
static description = 'Reorder your todo lists (pass --list once per id, in the desired order)';
|
|
7
|
+
static examples = ['<%= config.bin %> todos reorder --list <id-a> --list <id-b> --list <id-c>'];
|
|
8
|
+
static flags = {
|
|
9
|
+
list: core_1.Flags.string({ description: 'List id, in order (repeatable)', multiple: true, required: true }),
|
|
10
|
+
};
|
|
11
|
+
async run() {
|
|
12
|
+
const { flags } = await this.parse(TodosReorder);
|
|
13
|
+
const res = await this.api.put('/cli/v1/todo_lists/reorder', { ordered_ids: flags.list });
|
|
14
|
+
if (!this.jsonEnabled())
|
|
15
|
+
this.log(`Reordered ${flags.list.length} todo lists`);
|
|
16
|
+
return res;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.default = TodosReorder;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TodosShare extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
listId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
account: 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 TodosShare extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
listId: core_1.Args.string({ description: 'Todo list id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Set who a todo list is shared with (replaces the set; omit --account to unshare all)';
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> todos share <list-id> --account <account-id> --account <account-id>',
|
|
13
|
+
'<%= config.bin %> todos share <list-id>',
|
|
14
|
+
];
|
|
15
|
+
static flags = {
|
|
16
|
+
account: core_1.Flags.string({ description: 'Recipient account id (repeatable)', multiple: true, default: [] }),
|
|
17
|
+
};
|
|
18
|
+
async run() {
|
|
19
|
+
const { args, flags } = await this.parse(TodosShare);
|
|
20
|
+
const res = await this.api.put(`/cli/v1/todo_lists/${args.listId}/sharing`, { account_ids: flags.account });
|
|
21
|
+
const recipients = res.data ?? [];
|
|
22
|
+
if (!this.jsonEnabled()) {
|
|
23
|
+
this.log(`Todo list shared with ${recipients.length} members`);
|
|
24
|
+
this.log((0, output_1.renderTable)(['NAME', 'HANDLE', 'ID'], recipients.map((account) => [
|
|
25
|
+
String(account.name ?? ''),
|
|
26
|
+
String(account.handle ?? ''),
|
|
27
|
+
String(account.id ?? ''),
|
|
28
|
+
])));
|
|
29
|
+
}
|
|
30
|
+
return res;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.default = TodosShare;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TodosSharedShow 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,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 TodosSharedShow extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: core_1.Args.string({ description: 'Shared todo list id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Show a todo list shared with you (read-only)';
|
|
11
|
+
static examples = ['<%= config.bin %> todos shared-show <list-id>'];
|
|
12
|
+
async run() {
|
|
13
|
+
const { args } = await this.parse(TodosSharedShow);
|
|
14
|
+
const res = await this.api.get(`/cli/v1/shared_todo_lists/${args.id}`);
|
|
15
|
+
if (!this.jsonEnabled())
|
|
16
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
17
|
+
return res;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = TodosSharedShow;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TodosShared extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number, 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 TodosShared extends base_1.BaseCommand {
|
|
6
|
+
static description = 'List todo lists shared with you (read-only)';
|
|
7
|
+
static examples = ['<%= config.bin %> todos shared', '<%= config.bin %> todos shared --page 2 --json'];
|
|
8
|
+
static flags = { ...base_1.pageFlag };
|
|
9
|
+
async run() {
|
|
10
|
+
const { flags } = await this.parse(TodosShared);
|
|
11
|
+
const res = await this.api.get(`/cli/v1/shared_todo_lists?page=${flags.page}`);
|
|
12
|
+
const lists = res.data ?? [];
|
|
13
|
+
if (!this.jsonEnabled()) {
|
|
14
|
+
this.log((0, output_1.renderTable)(['NAME', 'OWNER', 'ITEMS', 'DONE', 'ID'], lists.map((list) => [
|
|
15
|
+
String(list.name ?? ''),
|
|
16
|
+
String(list.owner?.name ?? ''),
|
|
17
|
+
String(list.items_count ?? 0),
|
|
18
|
+
String(list.done_count ?? 0),
|
|
19
|
+
String(list.id ?? ''),
|
|
20
|
+
])));
|
|
21
|
+
}
|
|
22
|
+
return res;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = TodosShared;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TodosShares extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
listId: 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,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
|
+
const output_1 = require("../../lib/output");
|
|
6
|
+
class TodosShares extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
listId: core_1.Args.string({ description: 'Todo list id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'List the members a todo list is shared with (read-only)';
|
|
11
|
+
static examples = ['<%= config.bin %> todos shares <list-id>'];
|
|
12
|
+
async run() {
|
|
13
|
+
const { args } = await this.parse(TodosShares);
|
|
14
|
+
const res = await this.api.get(`/cli/v1/todo_lists/${args.listId}/sharing`);
|
|
15
|
+
const recipients = res.data ?? [];
|
|
16
|
+
if (!this.jsonEnabled()) {
|
|
17
|
+
this.log((0, output_1.renderTable)(['NAME', 'HANDLE', 'ID'], recipients.map((account) => [
|
|
18
|
+
String(account.name ?? ''),
|
|
19
|
+
String(account.handle ?? ''),
|
|
20
|
+
String(account.id ?? ''),
|
|
21
|
+
])));
|
|
22
|
+
}
|
|
23
|
+
return res;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = TodosShares;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TodosShow 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,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 TodosShow extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: core_1.Args.string({ description: 'Todo list id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Show one of your todo lists';
|
|
11
|
+
static examples = ['<%= config.bin %> todos show <list-id>'];
|
|
12
|
+
async run() {
|
|
13
|
+
const { args } = await this.parse(TodosShow);
|
|
14
|
+
const res = await this.api.get(`/cli/v1/todo_lists/${args.id}`);
|
|
15
|
+
if (!this.jsonEnabled())
|
|
16
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
17
|
+
return res;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = TodosShow;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TodosUncomplete extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
listId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
itemId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
run(): Promise<unknown>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 TodosUncomplete extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
listId: core_1.Args.string({ description: 'Todo list id', required: true }),
|
|
9
|
+
itemId: core_1.Args.string({ description: 'Todo item id', required: true }),
|
|
10
|
+
};
|
|
11
|
+
static description = 'Reopen a todo item (mark it not done)';
|
|
12
|
+
static examples = ['<%= config.bin %> todos uncomplete <list-id> <item-id>'];
|
|
13
|
+
async run() {
|
|
14
|
+
const { args } = await this.parse(TodosUncomplete);
|
|
15
|
+
const res = await this.api.delete(`/cli/v1/todo_lists/${args.listId}/items/${args.itemId}/completion`);
|
|
16
|
+
if (!this.jsonEnabled()) {
|
|
17
|
+
this.log('Todo item reopened:');
|
|
18
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
19
|
+
}
|
|
20
|
+
return res;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = TodosUncomplete;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TodosUpdate 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
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
color: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 TodosUpdate extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: core_1.Args.string({ description: 'Todo list id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Update a todo list (rename or recolor)';
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> todos update <list-id> --name "Sprint prep"',
|
|
13
|
+
'<%= config.bin %> todos update <list-id> --color rose',
|
|
14
|
+
];
|
|
15
|
+
static flags = {
|
|
16
|
+
name: core_1.Flags.string({ description: 'New name' }),
|
|
17
|
+
color: core_1.Flags.string({ description: 'Color label' }),
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
const { args, flags } = await this.parse(TodosUpdate);
|
|
21
|
+
const body = {};
|
|
22
|
+
if (flags.name !== undefined)
|
|
23
|
+
body.name = flags.name;
|
|
24
|
+
if (flags.color !== undefined)
|
|
25
|
+
body.color = flags.color;
|
|
26
|
+
const res = await this.api.put(`/cli/v1/todo_lists/${args.id}`, body);
|
|
27
|
+
if (!this.jsonEnabled()) {
|
|
28
|
+
this.log('Todo list updated:');
|
|
29
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
30
|
+
}
|
|
31
|
+
return res;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = TodosUpdate;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class UptimeGroupsCreate extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
color: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
icon: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -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 UptimeGroupsCreate extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Create an uptime monitor group (org-level container)';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> uptime-groups create --name "Core services"',
|
|
10
|
+
'<%= config.bin %> uptime-groups create --name API --color sky --icon server --description "Public API"',
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
name: core_1.Flags.string({ description: 'Group name', required: true }),
|
|
14
|
+
color: core_1.Flags.string({ description: 'Accent color (Tailwind palette name)' }),
|
|
15
|
+
icon: core_1.Flags.string({ description: 'Icon name' }),
|
|
16
|
+
description: core_1.Flags.string({ description: 'Group description' }),
|
|
17
|
+
};
|
|
18
|
+
async run() {
|
|
19
|
+
const { flags } = await this.parse(UptimeGroupsCreate);
|
|
20
|
+
const body = { name: flags.name };
|
|
21
|
+
if (flags.color !== undefined)
|
|
22
|
+
body.color = flags.color;
|
|
23
|
+
if (flags.icon !== undefined)
|
|
24
|
+
body.icon = flags.icon;
|
|
25
|
+
if (flags.description !== undefined)
|
|
26
|
+
body.description = flags.description;
|
|
27
|
+
const res = await this.api.post('/cli/v1/uptime_groups', body);
|
|
28
|
+
if (!this.jsonEnabled()) {
|
|
29
|
+
this.log('Uptime group created:');
|
|
30
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
31
|
+
}
|
|
32
|
+
return res;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = UptimeGroupsCreate;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class UptimeGroupsDelete 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,25 @@
|
|
|
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 UptimeGroupsDelete extends base_1.BaseCommand {
|
|
6
|
+
static description = 'Delete an uptime monitor group (irreversible)';
|
|
7
|
+
static examples = ['<%= config.bin %> uptime-groups delete <group-id> --confirm'];
|
|
8
|
+
static args = {
|
|
9
|
+
id: core_1.Args.string({ description: 'Uptime group id', required: true }),
|
|
10
|
+
};
|
|
11
|
+
static flags = {
|
|
12
|
+
confirm: core_1.Flags.boolean({ description: 'Required: confirm the irreversible deletion' }),
|
|
13
|
+
};
|
|
14
|
+
async run() {
|
|
15
|
+
const { args, flags } = await this.parse(UptimeGroupsDelete);
|
|
16
|
+
if (!flags.confirm) {
|
|
17
|
+
this.error('Refusing to delete without --confirm (the action is irreversible).', { exit: 2 });
|
|
18
|
+
}
|
|
19
|
+
await this.api.delete(`/cli/v1/uptime_groups/${args.id}`);
|
|
20
|
+
if (!this.jsonEnabled())
|
|
21
|
+
this.log(`Deleted uptime group ${args.id}`);
|
|
22
|
+
return { deleted: args.id };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = UptimeGroupsDelete;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class UptimeGroupsList extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<unknown>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 UptimeGroupsList extends base_1.BaseCommand {
|
|
6
|
+
static description = 'List the uptime monitor groups in your organization';
|
|
7
|
+
static examples = ['<%= config.bin %> uptime-groups list', '<%= config.bin %> uptime-groups list --page 2 --json'];
|
|
8
|
+
static flags = { ...base_1.pageFlag };
|
|
9
|
+
async run() {
|
|
10
|
+
const { flags } = await this.parse(UptimeGroupsList);
|
|
11
|
+
const res = await this.api.get(`/cli/v1/uptime_groups?page=${flags.page}`);
|
|
12
|
+
const groups = res.data ?? [];
|
|
13
|
+
if (!this.jsonEnabled()) {
|
|
14
|
+
this.log((0, output_1.renderTable)(['NAME', 'SLUG', 'PUBLIC', 'ID'], groups.map((group) => [
|
|
15
|
+
String(group.name ?? ''),
|
|
16
|
+
String(group.slug ?? ''),
|
|
17
|
+
String(group.public_status_enabled ?? false),
|
|
18
|
+
String(group.id ?? ''),
|
|
19
|
+
])));
|
|
20
|
+
}
|
|
21
|
+
return res;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = UptimeGroupsList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class UptimeGroupsPublish 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,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 UptimeGroupsPublish extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Publish the public status page for an uptime group';
|
|
8
|
+
static examples = ['<%= config.bin %> uptime-groups publish <group-id>'];
|
|
9
|
+
static args = {
|
|
10
|
+
id: core_1.Args.string({ description: 'Uptime group id', required: true }),
|
|
11
|
+
};
|
|
12
|
+
async run() {
|
|
13
|
+
const { args } = await this.parse(UptimeGroupsPublish);
|
|
14
|
+
const res = await this.api.put(`/cli/v1/uptime_groups/${args.id}/publication`);
|
|
15
|
+
if (!this.jsonEnabled()) {
|
|
16
|
+
this.log(`Published the public status page for uptime group ${args.id}:`);
|
|
17
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
18
|
+
}
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = UptimeGroupsPublish;
|