@trillboards/cli 0.1.1 → 0.1.4
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 +128 -102
- package/dist/commands/generated/{generated-post-device-heartbeat.d.ts → generated-csi-venue-history.d.ts} +3 -3
- package/dist/commands/generated/generated-csi-venue-history.js +35 -0
- package/dist/commands/generated/{generated-device-heartbeat-get.d.ts → generated-csi-venue-occupancy.d.ts} +2 -2
- package/dist/commands/generated/{generated-device-heartbeat-get.js → generated-csi-venue-occupancy.js} +8 -8
- package/dist/commands/generated/generated-device-sensing-profile.d.ts +12 -0
- package/dist/commands/generated/generated-device-sensing-profile.js +26 -0
- package/dist/format-helpers.d.ts +31 -0
- package/dist/format-helpers.js +31 -0
- package/dist/pty-wrapper.d.ts +42 -0
- package/dist/pty-wrapper.js +42 -0
- package/oclif.manifest.json +535 -482
- package/package.json +1 -1
- package/dist/commands/generated/generated-post-device-heartbeat.js +0 -35
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// AUTO-GENERATED from OpenAPI spec (device-api) -- do not edit manually
|
|
2
|
-
// Regenerate with: npm run generate
|
|
3
|
-
import { Args, Flags } from '@oclif/core';
|
|
4
|
-
import { BaseCommand } from '../../base-command.js';
|
|
5
|
-
import { apiRequest } from '../../http.js';
|
|
6
|
-
import { formatOutput } from '../../output.js';
|
|
7
|
-
export default class Postdeviceheartbeat extends BaseCommand {
|
|
8
|
-
static description = "Submit a device heartbeat.";
|
|
9
|
-
static examples = [`$ trillboards generated post-device-heartbeat`];
|
|
10
|
-
static args = {
|
|
11
|
-
deviceId: Args.string({ description: 'Device fingerprint or external device ID.', required: true }),
|
|
12
|
-
};
|
|
13
|
-
static flags = {
|
|
14
|
-
...BaseCommand.baseFlags,
|
|
15
|
-
data: Flags.string({ description: 'JSON request body' }),
|
|
16
|
-
};
|
|
17
|
-
async run() {
|
|
18
|
-
const { args, flags } = await this.parse(Postdeviceheartbeat);
|
|
19
|
-
this.setParsedFlags(flags);
|
|
20
|
-
const apiKey = this.getApiKey();
|
|
21
|
-
if (!apiKey)
|
|
22
|
-
this.error('Not logged in. Run: trillboards login');
|
|
23
|
-
let urlPath = '/v1/partner/device/{deviceId}/heartbeat';
|
|
24
|
-
urlPath = urlPath.replace('{deviceId}', args['deviceId']);
|
|
25
|
-
const params = {};
|
|
26
|
-
const body = flags.data ? JSON.parse(flags.data) : undefined;
|
|
27
|
-
const result = await apiRequest('POST', urlPath, {
|
|
28
|
-
apiKey,
|
|
29
|
-
baseUrl: flags['base-url'] ?? 'https://api.trillboards.com',
|
|
30
|
-
params: Object.keys(params).length > 0 ? params : undefined,
|
|
31
|
-
body,
|
|
32
|
-
});
|
|
33
|
-
this.log(formatOutput(result, this.getFormat()));
|
|
34
|
-
}
|
|
35
|
-
}
|