@formant/formant-cli 0.1.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/LICENSE +24 -0
- package/README.md +322 -0
- package/bin/dev.js +5 -0
- package/bin/run.js +5 -0
- package/dist/base-command.d.ts +38 -0
- package/dist/base-command.js +66 -0
- package/dist/base-command.js.map +1 -0
- package/dist/commands/analytics/query.d.ts +12 -0
- package/dist/commands/analytics/query.js +82 -0
- package/dist/commands/analytics/query.js.map +1 -0
- package/dist/commands/analytics/tables.d.ts +9 -0
- package/dist/commands/analytics/tables.js +34 -0
- package/dist/commands/analytics/tables.js.map +1 -0
- package/dist/commands/commands/for-device.d.ts +12 -0
- package/dist/commands/commands/for-device.js +33 -0
- package/dist/commands/commands/for-device.js.map +1 -0
- package/dist/commands/commands/get.d.ts +11 -0
- package/dist/commands/commands/get.js +133 -0
- package/dist/commands/commands/get.js.map +1 -0
- package/dist/commands/commands/history.d.ts +13 -0
- package/dist/commands/commands/history.js +49 -0
- package/dist/commands/commands/history.js.map +1 -0
- package/dist/commands/commands/list.d.ts +9 -0
- package/dist/commands/commands/list.js +31 -0
- package/dist/commands/commands/list.js.map +1 -0
- package/dist/commands/commands/send.d.ts +37 -0
- package/dist/commands/commands/send.js +260 -0
- package/dist/commands/commands/send.js.map +1 -0
- package/dist/commands/devices/config.d.ts +10 -0
- package/dist/commands/devices/config.js +38 -0
- package/dist/commands/devices/config.js.map +1 -0
- package/dist/commands/devices/get.d.ts +10 -0
- package/dist/commands/devices/get.js +35 -0
- package/dist/commands/devices/get.js.map +1 -0
- package/dist/commands/devices/last-seen.d.ts +10 -0
- package/dist/commands/devices/last-seen.js +25 -0
- package/dist/commands/devices/last-seen.js.map +1 -0
- package/dist/commands/devices/list.d.ts +20 -0
- package/dist/commands/devices/list.js +133 -0
- package/dist/commands/devices/list.js.map +1 -0
- package/dist/commands/devices/streams.d.ts +12 -0
- package/dist/commands/devices/streams.js +56 -0
- package/dist/commands/devices/streams.js.map +1 -0
- package/dist/commands/event-triggers/get.d.ts +10 -0
- package/dist/commands/event-triggers/get.js +29 -0
- package/dist/commands/event-triggers/get.js.map +1 -0
- package/dist/commands/event-triggers/list.d.ts +9 -0
- package/dist/commands/event-triggers/list.js +30 -0
- package/dist/commands/event-triggers/list.js.map +1 -0
- package/dist/commands/events/get.d.ts +10 -0
- package/dist/commands/events/get.js +35 -0
- package/dist/commands/events/get.js.map +1 -0
- package/dist/commands/events/list.d.ts +17 -0
- package/dist/commands/events/list.js +81 -0
- package/dist/commands/events/list.js.map +1 -0
- package/dist/commands/fleets/get.d.ts +10 -0
- package/dist/commands/fleets/get.js +28 -0
- package/dist/commands/fleets/get.js.map +1 -0
- package/dist/commands/fleets/list.d.ts +9 -0
- package/dist/commands/fleets/list.js +27 -0
- package/dist/commands/fleets/list.js.map +1 -0
- package/dist/commands/investigations/analytics.d.ts +15 -0
- package/dist/commands/investigations/analytics.js +69 -0
- package/dist/commands/investigations/analytics.js.map +1 -0
- package/dist/commands/investigations/get.d.ts +10 -0
- package/dist/commands/investigations/get.js +38 -0
- package/dist/commands/investigations/get.js.map +1 -0
- package/dist/commands/investigations/list.d.ts +12 -0
- package/dist/commands/investigations/list.js +41 -0
- package/dist/commands/investigations/list.js.map +1 -0
- package/dist/commands/investigations/run.d.ts +15 -0
- package/dist/commands/investigations/run.js +96 -0
- package/dist/commands/investigations/run.js.map +1 -0
- package/dist/commands/investigations/runs-list.d.ts +18 -0
- package/dist/commands/investigations/runs-list.js +57 -0
- package/dist/commands/investigations/runs-list.js.map +1 -0
- package/dist/commands/investigations/runs.d.ts +12 -0
- package/dist/commands/investigations/runs.js +30 -0
- package/dist/commands/investigations/runs.js.map +1 -0
- package/dist/commands/investigations/stats.d.ts +11 -0
- package/dist/commands/investigations/stats.js +40 -0
- package/dist/commands/investigations/stats.js.map +1 -0
- package/dist/commands/investigations/trigger.d.ts +14 -0
- package/dist/commands/investigations/trigger.js +43 -0
- package/dist/commands/investigations/trigger.js.map +1 -0
- package/dist/commands/kv/get.d.ts +10 -0
- package/dist/commands/kv/get.js +28 -0
- package/dist/commands/kv/get.js.map +1 -0
- package/dist/commands/kv/list.d.ts +13 -0
- package/dist/commands/kv/list.js +73 -0
- package/dist/commands/kv/list.js.map +1 -0
- package/dist/commands/kv/set.d.ts +11 -0
- package/dist/commands/kv/set.js +40 -0
- package/dist/commands/kv/set.js.map +1 -0
- package/dist/commands/query/index.d.ts +19 -0
- package/dist/commands/query/index.js +105 -0
- package/dist/commands/query/index.js.map +1 -0
- package/dist/commands/query/latest-values.d.ts +14 -0
- package/dist/commands/query/latest-values.js +102 -0
- package/dist/commands/query/latest-values.js.map +1 -0
- package/dist/commands/schedules/get.d.ts +10 -0
- package/dist/commands/schedules/get.js +29 -0
- package/dist/commands/schedules/get.js.map +1 -0
- package/dist/commands/schedules/list.d.ts +9 -0
- package/dist/commands/schedules/list.js +29 -0
- package/dist/commands/schedules/list.js.map +1 -0
- package/dist/commands/signals/count.d.ts +13 -0
- package/dist/commands/signals/count.js +43 -0
- package/dist/commands/signals/count.js.map +1 -0
- package/dist/commands/signals/get.d.ts +13 -0
- package/dist/commands/signals/get.js +80 -0
- package/dist/commands/signals/get.js.map +1 -0
- package/dist/commands/signals/list.d.ts +9 -0
- package/dist/commands/signals/list.js +30 -0
- package/dist/commands/signals/list.js.map +1 -0
- package/dist/commands/signals/query.d.ts +14 -0
- package/dist/commands/signals/query.js +52 -0
- package/dist/commands/signals/query.js.map +1 -0
- package/dist/commands/users/get.d.ts +10 -0
- package/dist/commands/users/get.js +28 -0
- package/dist/commands/users/get.js.map +1 -0
- package/dist/commands/users/list.d.ts +9 -0
- package/dist/commands/users/list.js +28 -0
- package/dist/commands/users/list.js.map +1 -0
- package/dist/help.d.ts +4 -0
- package/dist/help.js +91 -0
- package/dist/help.js.map +1 -0
- package/dist/hooks/init.d.ts +3 -0
- package/dist/hooks/init.js +7 -0
- package/dist/hooks/init.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/api.d.ts +12 -0
- package/dist/lib/api.js +46 -0
- package/dist/lib/api.js.map +1 -0
- package/dist/lib/auth.d.ts +17 -0
- package/dist/lib/auth.js +41 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/config.d.ts +7 -0
- package/dist/lib/config.js +21 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/formatters.d.ts +17 -0
- package/dist/lib/formatters.js +53 -0
- package/dist/lib/formatters.js.map +1 -0
- package/oclif.manifest.json +2683 -0
- package/package.json +117 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class KvGet extends BaseCommand<typeof KvGet> {
|
|
3
|
+
static args: {
|
|
4
|
+
key: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static summary: string;
|
|
9
|
+
run(): Promise<Record<string, unknown>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
import { formatDetail } from '../../lib/formatters.js';
|
|
4
|
+
export default class KvGet extends BaseCommand {
|
|
5
|
+
static args = {
|
|
6
|
+
key: Args.string({ description: 'Key to retrieve', required: true }),
|
|
7
|
+
};
|
|
8
|
+
static description = `Get a value from the key-value store.
|
|
9
|
+
|
|
10
|
+
The key-value store allows devices and applications to store metadata.`;
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> kv get my-key',
|
|
13
|
+
'<%= config.bin %> kv get my-key --json',
|
|
14
|
+
];
|
|
15
|
+
static summary = 'Get key-value';
|
|
16
|
+
async run() {
|
|
17
|
+
const result = await this.api('admin', `key-value/${this.args.key}`, {
|
|
18
|
+
method: 'GET',
|
|
19
|
+
});
|
|
20
|
+
if (!this.jsonEnabled()) {
|
|
21
|
+
this.log(`\nKey-Value (${this.env}):\n`);
|
|
22
|
+
this.log(formatDetail(result));
|
|
23
|
+
this.log('');
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/commands/kv/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAA;AAEpD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAyB;IAC1D,MAAM,CAAU,IAAI,GAAG;QACrB,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;KACnE,CAAA;IAED,MAAM,CAAU,WAAW,GAAG;;uEAEuC,CAAA;IAErE,MAAM,CAAU,QAAQ,GAAG;QACzB,iCAAiC;QACjC,wCAAwC;KACzC,CAAA;IAED,MAAM,CAAU,OAAO,GAAG,eAAe,CAAA;IAElC,KAAK,CAAC,GAAG;QACd,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAA0B,OAAO,EAAE,aAAa,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE;YAC5F,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,gBAAgB,IAAI,CAAC,GAAG,MAAM,CAAC,CAAA;YACxC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAA;YAC9B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACd,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class KvList extends BaseCommand<typeof KvList> {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
keys: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
prefix: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
};
|
|
9
|
+
static summary: string;
|
|
10
|
+
run(): Promise<{
|
|
11
|
+
items: unknown[];
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
import { formatTable } from '../../lib/formatters.js';
|
|
4
|
+
export default class KvList extends BaseCommand {
|
|
5
|
+
static description = `List all keys in the key-value store.
|
|
6
|
+
|
|
7
|
+
Shows all stored keys in the organization's key-value store. Use --prefix to filter
|
|
8
|
+
keys that start with a specific prefix, or --keys to query specific keys.`;
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> kv list',
|
|
11
|
+
'<%= config.bin %> kv list --prefix config',
|
|
12
|
+
'<%= config.bin %> kv list --keys key1 --keys key2 --keys key3',
|
|
13
|
+
'<%= config.bin %> kv list --json',
|
|
14
|
+
];
|
|
15
|
+
static flags = {
|
|
16
|
+
keys: Flags.string({
|
|
17
|
+
char: 'k',
|
|
18
|
+
description: 'Specific keys to query (can be specified multiple times)',
|
|
19
|
+
multiple: true,
|
|
20
|
+
}),
|
|
21
|
+
prefix: Flags.string({
|
|
22
|
+
char: 'p',
|
|
23
|
+
description: 'Filter keys by prefix',
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
static summary = 'List key-value keys';
|
|
27
|
+
async run() {
|
|
28
|
+
let result;
|
|
29
|
+
if (this.flags.prefix || this.flags.keys) {
|
|
30
|
+
// Use query endpoint with filters
|
|
31
|
+
const body = {};
|
|
32
|
+
if (this.flags.prefix)
|
|
33
|
+
body.prefix = this.flags.prefix;
|
|
34
|
+
if (this.flags.keys)
|
|
35
|
+
body.keys = this.flags.keys;
|
|
36
|
+
result = await this.api('admin', 'key-value/query', { body });
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
// Use simple list endpoint
|
|
40
|
+
result = await this.api('admin', 'key-value/', { method: 'GET' });
|
|
41
|
+
}
|
|
42
|
+
if (!this.jsonEnabled()) {
|
|
43
|
+
// The list endpoint returns plain key name strings,
|
|
44
|
+
// while the query endpoint returns objects with key/value properties.
|
|
45
|
+
const isQueryResult = this.flags.prefix || this.flags.keys;
|
|
46
|
+
const columns = isQueryResult
|
|
47
|
+
? [
|
|
48
|
+
{ key: 'key', label: 'KEY', width: 40 },
|
|
49
|
+
{ key: 'value', label: 'VALUE', width: 60 },
|
|
50
|
+
]
|
|
51
|
+
: [{ key: 'key', label: 'KEY' }];
|
|
52
|
+
const rows = (result.items ?? []).map((item) => {
|
|
53
|
+
if (typeof item === 'string') {
|
|
54
|
+
return { key: item };
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
key: item.key,
|
|
58
|
+
value: typeof item.value === 'object' ? JSON.stringify(item.value) : item.value,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
let filterMsg = '';
|
|
62
|
+
if (this.flags.prefix)
|
|
63
|
+
filterMsg = ` (prefix: ${this.flags.prefix})`;
|
|
64
|
+
if (this.flags.keys)
|
|
65
|
+
filterMsg = ` (keys: ${this.flags.keys.join(', ')})`;
|
|
66
|
+
this.log(`\nKey-Value Store${filterMsg} (${this.env}):\n`);
|
|
67
|
+
this.log(formatTable(rows, columns));
|
|
68
|
+
this.log('');
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
71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YAEF,IAAI,SAAS,GAAG,EAAE,CAAA;YAClB,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM;gBAAE,SAAS,GAAG,aAAa,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAA;YACpE,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI;gBAAE,SAAS,GAAG,WAAW,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAA;YAEzE,IAAI,CAAC,GAAG,CAAC,oBAAoB,SAAS,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,CAAA;YAC1D,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAA;YACpC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACd,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class KvSet extends BaseCommand<typeof KvSet> {
|
|
3
|
+
static args: {
|
|
4
|
+
key: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
value: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static summary: string;
|
|
10
|
+
run(): Promise<Record<string, unknown>>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
export default class KvSet extends BaseCommand {
|
|
4
|
+
static args = {
|
|
5
|
+
key: Args.string({ description: 'Key to set', required: true }),
|
|
6
|
+
value: Args.string({ description: 'Value to store (JSON string)', required: true }),
|
|
7
|
+
};
|
|
8
|
+
static description = `Set a value in the key-value store.
|
|
9
|
+
|
|
10
|
+
Stores a value associated with a key. The value should be a JSON string.`;
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> kv set my-key \'{"data": "value"}\'',
|
|
13
|
+
'<%= config.bin %> kv set config \'{"setting": true}\'',
|
|
14
|
+
];
|
|
15
|
+
static summary = 'Set key-value';
|
|
16
|
+
async run() {
|
|
17
|
+
// Parse value as JSON to validate
|
|
18
|
+
let parsedValue;
|
|
19
|
+
try {
|
|
20
|
+
parsedValue = JSON.parse(this.args.value);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
this.error('Value must be valid JSON');
|
|
24
|
+
}
|
|
25
|
+
const result = await this.api('admin', 'key-value/', {
|
|
26
|
+
body: {
|
|
27
|
+
key: this.args.key,
|
|
28
|
+
value: parsedValue,
|
|
29
|
+
},
|
|
30
|
+
method: 'POST',
|
|
31
|
+
});
|
|
32
|
+
if (!this.jsonEnabled()) {
|
|
33
|
+
this.log(`\nKey-Value Set (${this.env}):\n`);
|
|
34
|
+
this.log(` Key: ${this.args.key}`);
|
|
35
|
+
this.log(` Value: ${this.args.value}\n`);
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../src/commands/kv/set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AAEjD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAyB;IAC1D,MAAM,CAAU,IAAI,GAAG;QACrB,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;QAC7D,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,8BAA8B,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;KAClF,CAAA;IAED,MAAM,CAAU,WAAW,GAAG;;yEAEyC,CAAA;IAEvE,MAAM,CAAU,QAAQ,GAAG;QACzB,uDAAuD;QACvD,uDAAuD;KACxD,CAAA;IAED,MAAM,CAAU,OAAO,GAAG,eAAe,CAAA;IAElC,KAAK,CAAC,GAAG;QACd,kCAAkC;QAClC,IAAI,WAAoB,CAAA;QACxB,IAAI,CAAC;YACH,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC3C,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAA;QACxC,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAA0B,OAAO,EAAE,YAAY,EAAE;YAC5E,IAAI,EAAE;gBACJ,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG;gBAClB,KAAK,EAAE,WAAW;aACnB;YACD,MAAM,EAAE,MAAM;SACf,CAAC,CAAA;QAEF,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,oBAAoB,IAAI,CAAC,GAAG,MAAM,CAAC,CAAA;YAC5C,IAAI,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAA;YACnC,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAA;QAC3C,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class Query extends BaseCommand<typeof Query> {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
aggregate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
device: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
end: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
latest: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
start: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
stream: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
static summary: string;
|
|
16
|
+
run(): Promise<{
|
|
17
|
+
items: unknown[];
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
import { formatTable } from '../../lib/formatters.js';
|
|
4
|
+
export default class Query extends BaseCommand {
|
|
5
|
+
static description = `Query telemetry stream data for a device over a time range.
|
|
6
|
+
|
|
7
|
+
Returns time-series datapoints for the specified stream(s). Supports aggregation
|
|
8
|
+
for downsampling large datasets, and --latest to get only the most recent value.
|
|
9
|
+
|
|
10
|
+
Stream types: numeric, text, image, video, location, json, bitset, battery, health,
|
|
11
|
+
"numeric set", "point cloud", localization, "transform tree", file.
|
|
12
|
+
|
|
13
|
+
Aggregate levels: second, 5 seconds, 30 seconds, minute, 5 minutes, 30 minutes,
|
|
14
|
+
hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
15
|
+
static examples = [
|
|
16
|
+
'<%= config.bin %> query --device <id> --stream battery_level --start 2026-01-01 --end 2026-01-02',
|
|
17
|
+
'<%= config.bin %> query --device <id> --stream speed --aggregate hour --start 2026-01-01 --end 2026-02-01',
|
|
18
|
+
'<%= config.bin %> query --device <id> --stream battery_level --latest',
|
|
19
|
+
'<%= config.bin %> query --device <id> --stream temperature --type numeric --json',
|
|
20
|
+
];
|
|
21
|
+
static flags = {
|
|
22
|
+
aggregate: Flags.string({
|
|
23
|
+
char: 'a',
|
|
24
|
+
description: 'Aggregation level for downsampling',
|
|
25
|
+
}),
|
|
26
|
+
device: Flags.string({
|
|
27
|
+
char: 'd',
|
|
28
|
+
description: 'Device ID (UUID)',
|
|
29
|
+
required: true,
|
|
30
|
+
}),
|
|
31
|
+
end: Flags.string({
|
|
32
|
+
description: 'End time (ISO 8601)',
|
|
33
|
+
}),
|
|
34
|
+
latest: Flags.boolean({
|
|
35
|
+
description: 'Only return the most recent value per stream',
|
|
36
|
+
}),
|
|
37
|
+
limit: Flags.integer({
|
|
38
|
+
char: 'l',
|
|
39
|
+
description: 'Maximum number of datapoints',
|
|
40
|
+
}),
|
|
41
|
+
start: Flags.string({
|
|
42
|
+
description: 'Start time (ISO 8601)',
|
|
43
|
+
}),
|
|
44
|
+
stream: Flags.string({
|
|
45
|
+
char: 's',
|
|
46
|
+
description: 'Stream name(s), can be specified multiple times',
|
|
47
|
+
multiple: true,
|
|
48
|
+
required: true,
|
|
49
|
+
}),
|
|
50
|
+
type: Flags.string({
|
|
51
|
+
description: 'Filter by stream type',
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
static summary = 'Query telemetry stream data';
|
|
55
|
+
async run() {
|
|
56
|
+
// --start and --end are required unless --latest
|
|
57
|
+
if (!this.flags.latest && (!this.flags.start || !this.flags.end)) {
|
|
58
|
+
this.error('--start and --end are required (unless using --latest).');
|
|
59
|
+
}
|
|
60
|
+
const body = {
|
|
61
|
+
deviceIds: [this.flags.device],
|
|
62
|
+
names: this.flags.stream,
|
|
63
|
+
};
|
|
64
|
+
if (this.flags.start)
|
|
65
|
+
body.start = this.normalizeDateTime(this.flags.start);
|
|
66
|
+
if (this.flags.end)
|
|
67
|
+
body.end = this.normalizeDateTime(this.flags.end);
|
|
68
|
+
if (this.flags.type)
|
|
69
|
+
body.types = [this.flags.type];
|
|
70
|
+
if (this.flags.aggregate)
|
|
71
|
+
body.aggregate = this.flags.aggregate;
|
|
72
|
+
if (this.flags.latest)
|
|
73
|
+
body.latestOnly = true;
|
|
74
|
+
if (this.flags.limit)
|
|
75
|
+
body.limit = this.flags.limit;
|
|
76
|
+
// If using --latest and no time range given, use a reasonable default
|
|
77
|
+
if (this.flags.latest && !this.flags.start) {
|
|
78
|
+
body.start = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString();
|
|
79
|
+
body.end = new Date().toISOString();
|
|
80
|
+
}
|
|
81
|
+
const result = await this.api('query', 'queries', { body });
|
|
82
|
+
if (!this.jsonEnabled()) {
|
|
83
|
+
this.log(`\nTelemetry Data (${this.env} environment):\n`);
|
|
84
|
+
for (const stream of result.items ?? []) {
|
|
85
|
+
const points = stream.points ?? [];
|
|
86
|
+
this.log(` Stream: ${stream.name} (${stream.type}) Device: ${stream.deviceId}`);
|
|
87
|
+
this.log(` Points: ${points.length}\n`);
|
|
88
|
+
if (points.length > 0) {
|
|
89
|
+
const columns = [
|
|
90
|
+
{ key: 'time', label: 'TIME', width: 28 },
|
|
91
|
+
{ key: 'value', label: 'VALUE', width: 50 },
|
|
92
|
+
];
|
|
93
|
+
const rows = points.map((p) => ({
|
|
94
|
+
time: p.time,
|
|
95
|
+
value: typeof p.value === 'object' ? JSON.stringify(p.value) : p.value,
|
|
96
|
+
}));
|
|
97
|
+
this.log(formatTable(rows, columns));
|
|
98
|
+
this.log('');
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return result;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/query/index.ts"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K,EAAE,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK;qBACvE,CAAC,CAAC,CAAA;oBAEH,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAA;oBACpC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;gBACd,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class QueryLatestValues extends BaseCommand<typeof QueryLatestValues> {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
'all-streams': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
device: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
stream: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
static summary: string;
|
|
11
|
+
run(): Promise<{
|
|
12
|
+
items: unknown[];
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
import { formatTable } from '../../lib/formatters.js';
|
|
4
|
+
export default class QueryLatestValues extends BaseCommand {
|
|
5
|
+
static description = `Get the latest values for streams across devices.
|
|
6
|
+
|
|
7
|
+
Returns the most recent value for specified streams without needing to specify
|
|
8
|
+
a time range. Useful for checking current sensor readings.
|
|
9
|
+
|
|
10
|
+
Use --all-streams with a single device to automatically discover and query all
|
|
11
|
+
configured streams from the device configuration.`;
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> query latest-values --device <id> --stream battery_level',
|
|
14
|
+
'<%= config.bin %> query latest-values --device <id> --stream temperature --stream humidity',
|
|
15
|
+
'<%= config.bin %> query latest-values --device <id> --all-streams',
|
|
16
|
+
'<%= config.bin %> query latest-values --device <id> --all-streams --json',
|
|
17
|
+
];
|
|
18
|
+
static flags = {
|
|
19
|
+
'all-streams': Flags.boolean({
|
|
20
|
+
description: 'Query all configured streams for the device (requires single --device)',
|
|
21
|
+
}),
|
|
22
|
+
device: Flags.string({
|
|
23
|
+
char: 'd',
|
|
24
|
+
description: 'Device ID (UUID)',
|
|
25
|
+
multiple: true,
|
|
26
|
+
required: true,
|
|
27
|
+
}),
|
|
28
|
+
stream: Flags.string({
|
|
29
|
+
char: 's',
|
|
30
|
+
description: 'Stream name(s), can be specified multiple times',
|
|
31
|
+
multiple: true,
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
static summary = 'Get latest stream values';
|
|
35
|
+
async run() {
|
|
36
|
+
let streamNames = this.flags.stream ?? [];
|
|
37
|
+
// If --all-streams, discover streams from device config
|
|
38
|
+
if (this.flags['all-streams']) {
|
|
39
|
+
if (this.flags.device.length !== 1) {
|
|
40
|
+
this.error('--all-streams requires exactly one --device');
|
|
41
|
+
}
|
|
42
|
+
const deviceId = this.flags.device[0];
|
|
43
|
+
// Fetch device to get config version
|
|
44
|
+
const device = await this.api('admin', `devices/${deviceId}`, {
|
|
45
|
+
method: 'GET',
|
|
46
|
+
});
|
|
47
|
+
const configVersion = device.desiredConfigurationVersion;
|
|
48
|
+
if (!configVersion) {
|
|
49
|
+
this.error('Device has no configuration version set');
|
|
50
|
+
}
|
|
51
|
+
// Fetch config
|
|
52
|
+
const config = await this.api('admin', `devices/${deviceId}/configurations/${configVersion}`, { method: 'GET' });
|
|
53
|
+
// Parse stream names from config
|
|
54
|
+
const doc = config.document;
|
|
55
|
+
const telemetry = doc?.telemetry;
|
|
56
|
+
const streams = telemetry?.streams || [];
|
|
57
|
+
streamNames = streams.map((s) => s.name).filter(Boolean);
|
|
58
|
+
if (streamNames.length === 0) {
|
|
59
|
+
this.error('No streams configured on this device');
|
|
60
|
+
}
|
|
61
|
+
if (!this.jsonEnabled()) {
|
|
62
|
+
this.log(`\nDiscovered ${streamNames.length} streams from device config.\n`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (streamNames.length === 0) {
|
|
66
|
+
this.error('Specify --stream names or use --all-streams with a single device');
|
|
67
|
+
}
|
|
68
|
+
const result = await this.api('query', 'stream-current-value', {
|
|
69
|
+
body: {
|
|
70
|
+
deviceIds: this.flags.device,
|
|
71
|
+
names: streamNames,
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
if (!this.jsonEnabled()) {
|
|
75
|
+
const columns = [
|
|
76
|
+
{ key: 'stream', label: 'STREAM', width: 30 },
|
|
77
|
+
{ key: 'value', label: 'VALUE', width: 40 },
|
|
78
|
+
{ key: 'type', label: 'TYPE', width: 14 },
|
|
79
|
+
{ key: 'time', label: 'TIME', width: 26 },
|
|
80
|
+
];
|
|
81
|
+
// Only show device column for multi-device queries
|
|
82
|
+
if (this.flags.device.length > 1) {
|
|
83
|
+
columns.unshift({ key: 'deviceId', label: 'DEVICE ID', width: 40 });
|
|
84
|
+
}
|
|
85
|
+
const rows = (result.items ?? []).map((item) => {
|
|
86
|
+
const val = item.currentValue ?? item.value;
|
|
87
|
+
return {
|
|
88
|
+
deviceId: item.deviceId,
|
|
89
|
+
stream: item.streamName ?? item.name ?? '—',
|
|
90
|
+
type: item.streamType ?? item.type ?? '—',
|
|
91
|
+
value: typeof val === 'object' ? JSON.stringify(val) : String(val ?? '—'),
|
|
92
|
+
time: item.currentValueTime ?? item.time ?? '—',
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
this.log(`\nLatest Stream Values (${this.env}):\n`);
|
|
96
|
+
this.log(formatTable(rows, columns));
|
|
97
|
+
this.log('');
|
|
98
|
+
}
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=latest-values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latest-values.js","sourceRoot":"","sources":["../../../src/commands/query/latest-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAc,WAAW,EAAC,MAAM,yBAAyB,CAAA;AAEhE,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAqC;IAClF,MAAM,CAAU,WAAW,GAAG;;;;;;kDAMkB,CAAA;IAEhD,MAAM,CAAU,QAAQ,GAAG;QACzB,4EAA4E;QAC5E,4FAA4F;QAC5F,mEAAmE;QACnE,0EAA0E;KAC3E,CAAA;IAED,MAAM,CAAU,KAAK,GAAG;QACtB,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC;YAC3B,WAAW,EAAE,wEAAwE;SACtF,CAAC;QACF,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;YACnB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;YACnB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IAED,MAAM,CAAU,OAAO,GAAG,0BAA0B,CAAA;IAE7C,KAAK,CAAC,GAAG;QACd,IAAI,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAA;QAEzC,wDAAwD;QACxD,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;YAC9B,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,E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GAAG;oBAC3C,IAAI,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,IAAI,GAAG;oBACzC,KAAK,EAAE,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC;oBACzE,IAAI,EAAE,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,IAAI,IAAI,GAAG;iBAChD,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,IAAI,CAAC,GAAG,CAAC,2BAA2B,IAAI,CAAC,GAAG,MAAM,CAAC,CAAA;YACnD,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAA;YACpC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACd,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class SchedulesGet extends BaseCommand<typeof SchedulesGet> {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static summary: string;
|
|
9
|
+
run(): Promise<Record<string, unknown>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
import { formatDetail } from '../../lib/formatters.js';
|
|
4
|
+
export default class SchedulesGet extends BaseCommand {
|
|
5
|
+
static args = {
|
|
6
|
+
id: Args.string({ description: 'Schedule ID (UUID)', required: true }),
|
|
7
|
+
};
|
|
8
|
+
static description = `Get detailed information about a schedule.
|
|
9
|
+
|
|
10
|
+
Shows the full schedule configuration including cron expression, command template,
|
|
11
|
+
investigation link, and execution settings.`;
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> schedules get <schedule-id>',
|
|
14
|
+
'<%= config.bin %> schedules get <schedule-id> --json',
|
|
15
|
+
];
|
|
16
|
+
static summary = 'Get schedule details';
|
|
17
|
+
async run() {
|
|
18
|
+
const schedule = await this.api('admin', `schedules/${this.args.id}`, {
|
|
19
|
+
method: 'GET',
|
|
20
|
+
});
|
|
21
|
+
if (!this.jsonEnabled()) {
|
|
22
|
+
this.log(`\nSchedule Details (${this.env}):\n`);
|
|
23
|
+
this.log(formatDetail(schedule));
|
|
24
|
+
this.log('');
|
|
25
|
+
}
|
|
26
|
+
return schedule;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/commands/schedules/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAA;AAEpD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAgC;IACxE,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,oBAAoB,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;KACrE,CAAA;IAED,MAAM,CAAU,WAAW,GAAG;;;4CAGY,CAAA;IAE1C,MAAM,CAAU,QAAQ,GAAG;QACzB,+CAA+C;QAC/C,sDAAsD;KACvD,CAAA;IAED,MAAM,CAAU,OAAO,GAAG,sBAAsB,CAAA;IAEzC,KAAK,CAAC,GAAG;QACd,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAA0B,OAAO,EAAE,aAAa,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE;YAC7F,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,uBAAuB,IAAI,CAAC,GAAG,MAAM,CAAC,CAAA;YAC/C,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAA;YAChC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACd,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class SchedulesList extends BaseCommand<typeof SchedulesList> {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static summary: string;
|
|
6
|
+
run(): Promise<{
|
|
7
|
+
items: unknown[];
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
import { formatTable } from '../../lib/formatters.js';
|
|
3
|
+
export default class SchedulesList extends BaseCommand {
|
|
4
|
+
static description = `List all schedules in your organization.
|
|
5
|
+
|
|
6
|
+
Schedules can trigger commands or investigations on a recurring (cron) or one-time basis.`;
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> schedules list',
|
|
9
|
+
'<%= config.bin %> schedules list --json',
|
|
10
|
+
];
|
|
11
|
+
static summary = 'List schedules';
|
|
12
|
+
async run() {
|
|
13
|
+
const result = await this.api('admin', 'schedules', { method: 'GET' });
|
|
14
|
+
if (!this.jsonEnabled()) {
|
|
15
|
+
const columns = [
|
|
16
|
+
{ key: 'name', label: 'NAME', width: 30 },
|
|
17
|
+
{ key: 'cron', label: 'CRON', width: 20 },
|
|
18
|
+
{ key: 'type', label: 'TYPE', width: 12 },
|
|
19
|
+
{ key: 'status', label: 'STATUS', width: 12 },
|
|
20
|
+
{ key: 'id', label: 'ID', width: 40 },
|
|
21
|
+
];
|
|
22
|
+
this.log(`\nSchedules (${this.env}):\n`);
|
|
23
|
+
this.log(formatTable(result.items ?? [], columns));
|
|
24
|
+
this.log('');
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/schedules/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAc,WAAW,EAAC,MAAM,yBAAyB,CAAA;AAEhE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAiC;IAC1E,MAAM,CAAU,WAAW,GAAG;;0FAE0D,CAAA;IAExF,MAAM,CAAU,QAAQ,GAAG;QACzB,kCAAkC;QAClC,yCAAyC;KAC1C,CAAA;IAED,MAAM,CAAU,OAAO,GAAG,gBAAgB,CAAA;IAEnC,KAAK,CAAC,GAAG;QACd,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAC3B,OAAO,EACP,WAAW,EACX,EAAC,MAAM,EAAE,KAAK,EAAC,CAChB,CAAA;QAED,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,MAAM,OAAO,GAAa;gBACxB,EAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAC;gBACvC,EAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAC;gBACvC,EAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAC;gBACvC,EAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAC;gBAC3C,EAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAC;aACpC,CAAA;YAED,IAAI,CAAC,GAAG,CAAC,gBAAgB,IAAI,CAAC,GAAG,MAAM,CAAC,CAAA;YACxC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA;YAClD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACd,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class SignalsCount extends BaseCommand<typeof SignalsCount> {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
end: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
start: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
};
|
|
9
|
+
static summary: string;
|
|
10
|
+
run(): Promise<{
|
|
11
|
+
counts: Record<string, number>;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
import { formatDetail } from '../../lib/formatters.js';
|
|
4
|
+
export default class SignalsCount extends BaseCommand {
|
|
5
|
+
static description = `Get counts of signals grouped by type.
|
|
6
|
+
|
|
7
|
+
Returns total counts and per-type breakdowns (manual, eventTrigger, schedule, slack).`;
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> signals count',
|
|
10
|
+
'<%= config.bin %> signals count --start 2026-01-01 --end 2026-02-01',
|
|
11
|
+
'<%= config.bin %> signals count --json',
|
|
12
|
+
];
|
|
13
|
+
static flags = {
|
|
14
|
+
end: Flags.string({
|
|
15
|
+
description: 'End time (ISO 8601)',
|
|
16
|
+
}),
|
|
17
|
+
start: Flags.string({
|
|
18
|
+
description: 'Start time (ISO 8601)',
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
static summary = 'Get signal counts by type';
|
|
22
|
+
async run() {
|
|
23
|
+
const body = {};
|
|
24
|
+
if (this.flags.start)
|
|
25
|
+
body.startTime = this.flags.start;
|
|
26
|
+
if (this.flags.end)
|
|
27
|
+
body.endTime = this.flags.end;
|
|
28
|
+
const result = await this.api('theopolis', 'signals/count', { body });
|
|
29
|
+
if (!this.jsonEnabled()) {
|
|
30
|
+
this.log(`\nSignal Counts (${this.env} environment):\n`);
|
|
31
|
+
this.log(formatDetail(result.counts ?? result, {
|
|
32
|
+
eventTrigger: 'Event Trigger',
|
|
33
|
+
manual: 'Manual',
|
|
34
|
+
schedule: 'Schedule',
|
|
35
|
+
slack: 'Slack',
|
|
36
|
+
total: 'Total',
|
|
37
|
+
}));
|
|
38
|
+
this.log('');
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=count.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"count.js","sourceRoot":"","sources":["../../../src/commands/signals/count.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAA;AAEpD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAgC;IACxE,MAAM,CAAU,WAAW,GAAG;;sFAEsD,CAAA;IAEpF,MAAM,CAAU,QAAQ,GAAG;QACzB,iCAAiC;QACjC,qEAAqE;QACrE,wCAAwC;KACzC,CAAA;IAED,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC;YAChB,WAAW,EAAE,qBAAqB;SACnC,CAAC;QACF,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;YAClB,WAAW,EAAE,uBAAuB;SACrC,CAAC;KACH,CAAA;IAED,MAAM,CAAU,OAAO,GAAG,2BAA2B,CAAA;IAE9C,KAAK,CAAC,GAAG;QACd,MAAM,IAAI,GAA4B,EAAE,CAAA;QACxC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK;YAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAA;QACvD,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG;YAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAA;QAEjD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAC3B,WAAW,EACX,eAAe,EACf,EAAC,IAAI,EAAC,CACP,CAAA;QAED,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,oBAAoB,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAA;YACxD,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,EAAE;gBAC7C,YAAY,EAAE,eAAe;gBAC7B,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE,UAAU;gBACpB,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,OAAO;aACf,CAAC,CAAC,CAAA;YACH,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACd,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class SignalsGet extends BaseCommand<typeof SignalsGet> {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
trace: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
static summary: string;
|
|
12
|
+
run(): Promise<Record<string, unknown>>;
|
|
13
|
+
}
|