@koda-sl/baker-cli 0.273.0 → 0.274.0-dev.bbba3d7fc

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
@@ -58,7 +58,7 @@ import {
58
58
  ulid,
59
59
  validateCanvasDeep,
60
60
  ytDlpBlockSignal
61
- } from "./chunk-36KVUYVL.js";
61
+ } from "./chunk-VWLNPPC6.js";
62
62
  import {
63
63
  csvOrJson,
64
64
  daysAgoIso,
@@ -12459,7 +12459,22 @@ var ANALYTICS_EVENT_TYPES = [
12459
12459
  * know who this was" unanswerable.
12460
12460
  */
12461
12461
  "identify",
12462
- /** Escape hatch for a page-specific event. */
12462
+ /**
12463
+ * A named event: an escape hatch a page defines, or one a client's own server
12464
+ * posted to `POST /v1/events`.
12465
+ *
12466
+ * One type for both, deliberately. There was briefly a `server_event`, and
12467
+ * the type was the mistake: every report that shows named events whitelists
12468
+ * `custom`, so a server-sent "Deal won" was structurally invisible on the
12469
+ * Page events card, in Top pages and in the events catalogue — the three
12470
+ * screens somebody would look at after being told it had arrived. GA4 makes
12471
+ * the same call for the same reason: a Measurement Protocol event is just an
12472
+ * event, and the transport is a property.
12473
+ *
12474
+ * Which collector wrote it is {@link ANALYTICS_SOURCES} — `client` for a
12475
+ * page, `ingest` for a third party's server — and every report that needs to
12476
+ * tell them apart filters on that.
12477
+ */
12463
12478
  "custom"
12464
12479
  ];
12465
12480
  var ANALYTICS_DEVICE_TYPES = ["desktop", "mobile", "tablet", "bot", "unknown"];
@@ -12982,6 +12997,19 @@ var analyticsQueryRequestSchema = z25.object({
12982
12997
  * superset and the right default for "how is paid doing".
12983
12998
  */
12984
12999
  adPlatform: z25.enum(AD_PLATFORMS).optional(),
13000
+ /**
13001
+ * Read only what one collector produced: `site` for everything Baker
13002
+ * measured itself, `systems` for what a client's own server posted to
13003
+ * `POST /v1/events`.
13004
+ *
13005
+ * Omit it for all of it, which is the default and the honest superset.
13006
+ * Only the reads where the split is a question somebody asks honour it —
13007
+ * the totals, the trend, the two page-event reads, the conversion
13008
+ * breakdown and the events catalogue. A session-scoped report cannot: an
13009
+ * ingest row carries no `session_id`, deliberately, so there is no visit
13010
+ * for it to be counted in.
13011
+ */
13012
+ eventOrigin: z25.enum(["site", "systems"]).optional(),
12985
13013
  /** Return the long breakdowns and the per-day trend. */
12986
13014
  full: z25.boolean().optional(),
12987
13015
  /**
@@ -13254,6 +13282,7 @@ var analyticsTagRowSchema = z25.object({
13254
13282
  /** Converting visits per entrance. */
13255
13283
  conversionRate: z25.number().min(0).max(1).nullable()
13256
13284
  });
13285
+ var ANALYTICS_EVENT_ORIGINS = ["site", "systems", "both"];
13257
13286
  var analyticsCustomEventRowSchema = z25.object({
13258
13287
  eventName: z25.string(),
13259
13288
  events: z25.number().int().nonnegative(),
@@ -13269,7 +13298,9 @@ var analyticsCustomEventRowSchema = z25.object({
13269
13298
  */
13270
13299
  propertyKeys: z25.array(z25.string()),
13271
13300
  valueTotal: z25.number(),
13272
- landings: z25.array(z25.string())
13301
+ landings: z25.array(z25.string()),
13302
+ /** Which collector produced this name — and `both` when more than one did. */
13303
+ origin: z25.enum(ANALYTICS_EVENT_ORIGINS)
13273
13304
  });
13274
13305
  var analyticsEventBreakdownRowSchema = z25.object({
13275
13306
  value: z25.string(),
@@ -13604,6 +13635,16 @@ var analyticsConversionRowSchema = z25.object({
13604
13635
  var analyticsEventCatalogRowSchema = z25.object({
13605
13636
  /** `form:…` | `submit:…` | `page:…` | `exit:…` — parse with `parseEventKey`. */
13606
13637
  eventKey: z25.string(),
13638
+ /**
13639
+ * Which collector produced this key — and `both` when more than one did.
13640
+ *
13641
+ * On the row rather than in the key, which is the whole shape of the change
13642
+ * that removed the `server:` family: a picker can say where an event came
13643
+ * from without a filter round-trip, and a report can still separate the two
13644
+ * populations at any grain, but nothing downstream has to learn a second
13645
+ * vocabulary to count one.
13646
+ */
13647
+ origin: z25.enum(ANALYTICS_EVENT_ORIGINS),
13607
13648
  events: z25.number(),
13608
13649
  sessions: z25.number(),
13609
13650
  /** The Form node's kind, for a `form:` key. Empty otherwise. */