@trillboards/cli 0.1.5 → 0.1.7
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 +92 -135
- package/dist/commands/generated/generated-data-api-ad-sightings-history.d.ts +20 -0
- package/dist/commands/generated/generated-data-api-ad-sightings-history.js +53 -0
- package/dist/commands/generated/generated-data-api-ad-sightings.d.ts +23 -0
- package/dist/commands/generated/generated-data-api-ad-sightings.js +62 -0
- package/dist/commands/generated/generated-device-retained-cctv-review.d.ts +13 -0
- package/dist/commands/generated/generated-device-retained-cctv-review.js +32 -0
- package/oclif.manifest.json +433 -134
- package/package.json +2 -4
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class Dataapiadsightingshistory extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {};
|
|
6
|
+
static flags: {
|
|
7
|
+
brand: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
brand_id: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
market: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
from: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
to: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
grain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
limit: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
cursor: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
format: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// AUTO-GENERATED from OpenAPI spec (data-api) -- do not edit manually
|
|
2
|
+
// Regenerate with: npm run generate
|
|
3
|
+
import { 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 Dataapiadsightingshistory extends BaseCommand {
|
|
8
|
+
static description = "Outdoor creative history by brand, market and month, from the creative ledger.";
|
|
9
|
+
static examples = [`$ trillboards generated data-api-ad-sightings-history`];
|
|
10
|
+
static args = {};
|
|
11
|
+
static flags = {
|
|
12
|
+
...BaseCommand.baseFlags,
|
|
13
|
+
'brand': Flags.string({ description: 'A brand by name, repeatable (competitors). Resolved to its brand id the way the brand search does.' }),
|
|
14
|
+
'brand_id': Flags.string({ description: 'A resolved brand id, repeatable.' }),
|
|
15
|
+
'market': Flags.string({ description: 'A market as COUNTRY:CODE, repeatable.' }),
|
|
16
|
+
'from': Flags.string({ description: 'First month (YYYY-MM) or day. Default: 12 months before `to`.' }),
|
|
17
|
+
'to': Flags.string({ description: 'Last month (YYYY-MM, inclusive) or day. Default: this month.' }),
|
|
18
|
+
'grain': Flags.string({ description: 'market_month (default) or fleet_month.' }),
|
|
19
|
+
'limit': Flags.string({ description: 'Rows per page, 1..500 (default 100). The page limit is reserved; the rows returned are billed.' }),
|
|
20
|
+
'cursor': Flags.string({ description: 'The `next_cursor` of the previous page.' }),
|
|
21
|
+
};
|
|
22
|
+
async run() {
|
|
23
|
+
const { args, flags } = await this.parse(Dataapiadsightingshistory);
|
|
24
|
+
this.setParsedFlags(flags);
|
|
25
|
+
const apiKey = this.getApiKey();
|
|
26
|
+
if (!apiKey)
|
|
27
|
+
this.error('Not logged in. Run: trillboards login');
|
|
28
|
+
let urlPath = '/v1/data/ad-sightings/history';
|
|
29
|
+
const params = {};
|
|
30
|
+
if (flags['brand'])
|
|
31
|
+
params['brand'] = flags['brand'];
|
|
32
|
+
if (flags['brand_id'])
|
|
33
|
+
params['brand_id'] = flags['brand_id'];
|
|
34
|
+
if (flags['market'])
|
|
35
|
+
params['market'] = flags['market'];
|
|
36
|
+
if (flags['from'])
|
|
37
|
+
params['from'] = flags['from'];
|
|
38
|
+
if (flags['to'])
|
|
39
|
+
params['to'] = flags['to'];
|
|
40
|
+
if (flags['grain'])
|
|
41
|
+
params['grain'] = flags['grain'];
|
|
42
|
+
if (flags['limit'])
|
|
43
|
+
params['limit'] = flags['limit'];
|
|
44
|
+
if (flags['cursor'])
|
|
45
|
+
params['cursor'] = flags['cursor'];
|
|
46
|
+
const result = await apiRequest('GET', urlPath, {
|
|
47
|
+
apiKey,
|
|
48
|
+
baseUrl: flags['base-url'] ?? 'https://api.trillboards.com',
|
|
49
|
+
params: Object.keys(params).length > 0 ? params : undefined,
|
|
50
|
+
});
|
|
51
|
+
this.log(formatOutput(result, this.getFormat()));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class Dataapiadsightings extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {};
|
|
6
|
+
static flags: {
|
|
7
|
+
brand: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
brand_id: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
market: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
surface: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
board_id: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
creative_id: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
instrument: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
from: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
to: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
limit: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
cursor: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
format: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
};
|
|
22
|
+
run(): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// AUTO-GENERATED from OpenAPI spec (data-api) -- do not edit manually
|
|
2
|
+
// Regenerate with: npm run generate
|
|
3
|
+
import { 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 Dataapiadsightings extends BaseCommand {
|
|
8
|
+
static description = "Ad-sighting records: outdoor ads our cab cameras read, each with a signed photo link.";
|
|
9
|
+
static examples = [`$ trillboards generated data-api-ad-sightings`];
|
|
10
|
+
static args = {};
|
|
11
|
+
static flags = {
|
|
12
|
+
...BaseCommand.baseFlags,
|
|
13
|
+
'brand': Flags.string({ description: 'A brand, repeatable for a brand set (competitors). Matched however it is typed: "McDonald\'s", "mcdonalds" and "Mc Donalds" find the same records.' }),
|
|
14
|
+
'brand_id': Flags.string({ description: 'A resolved brand id, repeatable. Combined with `brand` as either-or.' }),
|
|
15
|
+
'market': Flags.string({ description: 'A market as COUNTRY:CODE (US DMA or CA CMA), repeatable.' }),
|
|
16
|
+
'surface': Flags.string({ description: 'The surface kind as read (billboard, storefront, bus_shelter, ...), repeatable.' }),
|
|
17
|
+
'board_id': Flags.string({ description: 'A board the sighting was matched to, repeatable.' }),
|
|
18
|
+
'creative_id': Flags.string({ description: 'A sighted creative (the campaign artwork), repeatable.' }),
|
|
19
|
+
'instrument': Flags.string({ description: 'The reading instrument (ssr-v2, ssr-v1, vlmtext-v1, edge_ocr_v1), repeatable.' }),
|
|
20
|
+
'from': Flags.string({ description: 'Start (inclusive), YYYY-MM-DD or an ISO-8601 instant. Default: 30 days before `to`.' }),
|
|
21
|
+
'to': Flags.string({ description: 'End (exclusive). Default: now. The span is at most 400 days.' }),
|
|
22
|
+
'limit': Flags.string({ description: 'Records per page, 1..500 (default 50). The page limit is reserved; the records returned are billed.' }),
|
|
23
|
+
'cursor': Flags.string({ description: 'The `next_cursor` of the previous page.' }),
|
|
24
|
+
};
|
|
25
|
+
async run() {
|
|
26
|
+
const { args, flags } = await this.parse(Dataapiadsightings);
|
|
27
|
+
this.setParsedFlags(flags);
|
|
28
|
+
const apiKey = this.getApiKey();
|
|
29
|
+
if (!apiKey)
|
|
30
|
+
this.error('Not logged in. Run: trillboards login');
|
|
31
|
+
let urlPath = '/v1/data/ad-sightings';
|
|
32
|
+
const params = {};
|
|
33
|
+
if (flags['brand'])
|
|
34
|
+
params['brand'] = flags['brand'];
|
|
35
|
+
if (flags['brand_id'])
|
|
36
|
+
params['brand_id'] = flags['brand_id'];
|
|
37
|
+
if (flags['market'])
|
|
38
|
+
params['market'] = flags['market'];
|
|
39
|
+
if (flags['surface'])
|
|
40
|
+
params['surface'] = flags['surface'];
|
|
41
|
+
if (flags['board_id'])
|
|
42
|
+
params['board_id'] = flags['board_id'];
|
|
43
|
+
if (flags['creative_id'])
|
|
44
|
+
params['creative_id'] = flags['creative_id'];
|
|
45
|
+
if (flags['instrument'])
|
|
46
|
+
params['instrument'] = flags['instrument'];
|
|
47
|
+
if (flags['from'])
|
|
48
|
+
params['from'] = flags['from'];
|
|
49
|
+
if (flags['to'])
|
|
50
|
+
params['to'] = flags['to'];
|
|
51
|
+
if (flags['limit'])
|
|
52
|
+
params['limit'] = flags['limit'];
|
|
53
|
+
if (flags['cursor'])
|
|
54
|
+
params['cursor'] = flags['cursor'];
|
|
55
|
+
const result = await apiRequest('GET', urlPath, {
|
|
56
|
+
apiKey,
|
|
57
|
+
baseUrl: flags['base-url'] ?? 'https://api.trillboards.com',
|
|
58
|
+
params: Object.keys(params).length > 0 ? params : undefined,
|
|
59
|
+
});
|
|
60
|
+
this.log(formatOutput(result, this.getFormat()));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class Deviceretainedcctvreview extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {};
|
|
6
|
+
static flags: {
|
|
7
|
+
data: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
format: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// AUTO-GENERATED from OpenAPI spec (device-api) -- do not edit manually
|
|
2
|
+
// Regenerate with: npm run generate
|
|
3
|
+
import { 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 Deviceretainedcctvreview extends BaseCommand {
|
|
8
|
+
static description = "Store original CCTV evidence and its completed local review.";
|
|
9
|
+
static examples = [`$ trillboards generated device-retained-cctv-review`];
|
|
10
|
+
static args = {};
|
|
11
|
+
static flags = {
|
|
12
|
+
...BaseCommand.baseFlags,
|
|
13
|
+
data: Flags.string({ description: 'JSON request body' }),
|
|
14
|
+
};
|
|
15
|
+
async run() {
|
|
16
|
+
const { args, flags } = await this.parse(Deviceretainedcctvreview);
|
|
17
|
+
this.setParsedFlags(flags);
|
|
18
|
+
const apiKey = this.getApiKey();
|
|
19
|
+
if (!apiKey)
|
|
20
|
+
this.error('Not logged in. Run: trillboards login');
|
|
21
|
+
let urlPath = '/v2/earner/cctv-retained/reviews';
|
|
22
|
+
const params = {};
|
|
23
|
+
const body = flags.data ? JSON.parse(flags.data) : undefined;
|
|
24
|
+
const result = await apiRequest('POST', urlPath, {
|
|
25
|
+
apiKey,
|
|
26
|
+
baseUrl: flags['base-url'] ?? 'https://api.trillboards.com',
|
|
27
|
+
params: Object.keys(params).length > 0 ? params : undefined,
|
|
28
|
+
body,
|
|
29
|
+
});
|
|
30
|
+
this.log(formatOutput(result, this.getFormat()));
|
|
31
|
+
}
|
|
32
|
+
}
|