@instantkom/cli 3.149.0 → 3.151.0
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/dist/commands/tags/bots/list.d.ts +22 -0
- package/dist/commands/tags/bots/list.js +28 -0
- package/dist/commands/tags/segments/list.d.ts +22 -0
- package/dist/commands/tags/segments/list.js +28 -0
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +1689 -1475
- package/package.json +8 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
export default class TagsBotsList extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/interfaces").Arg<number, {
|
|
6
|
+
max?: number;
|
|
7
|
+
min?: number;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
static flags: {
|
|
11
|
+
page: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
quiet: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
'no-color': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'api-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
};
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { createCliApiClient } from '../../../send/api.js';
|
|
4
|
+
export default class TagsBotsList extends BaseCommand {
|
|
5
|
+
static description = 'List bots that use a specific tag';
|
|
6
|
+
static args = {
|
|
7
|
+
id: Args.integer({ description: 'Tag ID', required: true }),
|
|
8
|
+
};
|
|
9
|
+
static flags = {
|
|
10
|
+
...BaseCommand.baseFlags,
|
|
11
|
+
page: Flags.integer({ description: 'Page number', default: 1 }),
|
|
12
|
+
limit: Flags.integer({ description: 'Items per page', default: 20 }),
|
|
13
|
+
};
|
|
14
|
+
async run() {
|
|
15
|
+
const { args, flags } = await this.parse(TagsBotsList);
|
|
16
|
+
this.flags = flags;
|
|
17
|
+
const params = new URLSearchParams();
|
|
18
|
+
if (flags.page)
|
|
19
|
+
params.append('page', flags.page.toString());
|
|
20
|
+
if (flags.limit)
|
|
21
|
+
params.append('limit', flags.limit.toString());
|
|
22
|
+
const query = params.toString() ? `?${params.toString()}` : '';
|
|
23
|
+
const client = await createCliApiClient(flags);
|
|
24
|
+
const result = await client.get(`/v1/tags/${args.id}/bots${query}`);
|
|
25
|
+
if (!flags.quiet)
|
|
26
|
+
this.log(this.toFormatted(result));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
export default class TagsSegmentsList extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/interfaces").Arg<number, {
|
|
6
|
+
max?: number;
|
|
7
|
+
min?: number;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
static flags: {
|
|
11
|
+
page: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
quiet: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
'no-color': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'api-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
};
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { createCliApiClient } from '../../../send/api.js';
|
|
4
|
+
export default class TagsSegmentsList extends BaseCommand {
|
|
5
|
+
static description = 'List segments that use a specific tag';
|
|
6
|
+
static args = {
|
|
7
|
+
id: Args.integer({ description: 'Tag ID', required: true }),
|
|
8
|
+
};
|
|
9
|
+
static flags = {
|
|
10
|
+
...BaseCommand.baseFlags,
|
|
11
|
+
page: Flags.integer({ description: 'Page number', default: 1 }),
|
|
12
|
+
limit: Flags.integer({ description: 'Items per page', default: 20 }),
|
|
13
|
+
};
|
|
14
|
+
async run() {
|
|
15
|
+
const { args, flags } = await this.parse(TagsSegmentsList);
|
|
16
|
+
this.flags = flags;
|
|
17
|
+
const params = new URLSearchParams();
|
|
18
|
+
if (flags.page)
|
|
19
|
+
params.append('page', flags.page.toString());
|
|
20
|
+
if (flags.limit)
|
|
21
|
+
params.append('limit', flags.limit.toString());
|
|
22
|
+
const query = params.toString() ? `?${params.toString()}` : '';
|
|
23
|
+
const client = await createCliApiClient(flags);
|
|
24
|
+
const result = await client.get(`/v1/tags/${args.id}/segments${query}`);
|
|
25
|
+
if (!flags.quiet)
|
|
26
|
+
this.log(this.toFormatted(result));
|
|
27
|
+
}
|
|
28
|
+
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instantkom/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.151.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@instantkom/cli",
|
|
9
|
-
"version": "3.
|
|
9
|
+
"version": "3.151.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/core": "^4",
|