@purpleturret/cli 0.3.0 → 0.4.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/cli.js CHANGED
@@ -9,7 +9,7 @@ import { existsSync } from "fs";
9
9
  import { join as join2 } from "path";
10
10
 
11
11
  // ../sdk/src/version.ts
12
- var SDK_VERSION = "0.3.0";
12
+ var SDK_VERSION = "0.4.0";
13
13
 
14
14
  // ../sdk/src/config/schema.ts
15
15
  import { z } from "zod";
@@ -560,7 +560,9 @@ function pixelsApi(client) {
560
560
  query: { ...rangeQuery(options), conversion: options.conversion, attribution: options.attribution }
561
561
  })
562
562
  ),
563
- people: async (id8, range4 = {}) => camelizeKeys(await client.request("GET", `${p(id8)}/people`, { query: rangeQuery(range4) })),
563
+ people: async (id8, options = {}) => camelizeKeys(
564
+ await client.request("GET", `${p(id8)}/people`, { query: { ...rangeQuery(options), offset: options.offset, limit: options.limit } })
565
+ ),
564
566
  session: async (id8, sid) => fromWireTimeline(await client.request("GET", `${p(id8)}/sessions/${encodeURIComponent(sid)}`)),
565
567
  person: async (id8, sid, options = {}) => fromWireTimeline(
566
568
  await client.request("GET", `${p(id8)}/people/${encodeURIComponent(sid)}`, { query: { sids: options.sids?.join(",") } })
@@ -1091,7 +1093,7 @@ function stripUndefined(value) {
1091
1093
  import dotenv from "dotenv";
1092
1094
 
1093
1095
  // src/version.ts
1094
- var CLI_VERSION = "0.3.0";
1096
+ var CLI_VERSION = "0.4.0";
1095
1097
 
1096
1098
  // src/lib/credentials.ts
1097
1099
  import { chmod, mkdir, readFile, rename, writeFile } from "fs/promises";
@@ -2293,9 +2295,19 @@ var ads = defineCommand7({
2293
2295
  });
2294
2296
  var people = defineCommand7({
2295
2297
  meta: { name: "people", description: "Identified visitors active in the range" },
2296
- args: { ...globalArgs, ...idArg, ...rangeArgs },
2298
+ args: {
2299
+ ...globalArgs,
2300
+ ...idArg,
2301
+ ...rangeArgs,
2302
+ offset: { type: "string", description: "People to skip (default 0)" },
2303
+ limit: { type: "string", description: "Page size, up to 100 (default 100)" }
2304
+ },
2297
2305
  run: defineRun(async (ctx, args) => {
2298
- const r = await ctx.client().pixels.people(args.id, range(args));
2306
+ const r = await ctx.client().pixels.people(args.id, {
2307
+ ...range(args),
2308
+ offset: args.offset ? Number(args.offset) : void 0,
2309
+ limit: args.limit ? Number(args.limit) : void 0
2310
+ });
2299
2311
  if (ctx.json) return ctx.out.printJson(r);
2300
2312
  printTable(
2301
2313
  ctx,
@@ -3699,8 +3711,13 @@ function registerPixelsTools(tool, client) {
3699
3711
  );
3700
3712
  tool(
3701
3713
  "get_pixel_people",
3702
- "Identified visitors (by external id, email or cookie) active in the range, with spend and recent sessions.",
3703
- z5.object({ id: id5, ...range2 }),
3714
+ "Identified visitors (by external id, email or cookie) active in the range, with spend and recent sessions. Paged: total counts everyone, offset/limit pick the page.",
3715
+ z5.object({
3716
+ id: id5,
3717
+ ...range2,
3718
+ offset: z5.number().int().min(0).optional().describe("People to skip, most recently seen first"),
3719
+ limit: z5.number().int().min(1).max(100).optional().describe("Page size; default 100")
3720
+ }),
3704
3721
  READ,
3705
3722
  ({ id: id8, ...r }) => client.pixels.people(id8, r)
3706
3723
  );
@@ -3914,7 +3931,7 @@ function registerTrackingTools(tool, client) {
3914
3931
  import { z as z8 } from "zod";
3915
3932
  var id6 = z8.string().describe("Domain id");
3916
3933
  function registerDomainsTools(tool, client) {
3917
- tool("list_domains", "List the seller's custom domains (at most 5) with status and DNS records.", z8.object({}), READ, () => client.domains.list());
3934
+ tool("list_domains", "List the seller's custom domains with status and DNS records.", z8.object({}), READ, () => client.domains.list());
3918
3935
  tool(
3919
3936
  "get_domain",
3920
3937
  "Get one custom domain, including the DNS records the seller must create.",