@wix/himalaya-cli 0.1668.0 → 0.1669.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.
@@ -30,7 +30,22 @@ export interface FrogTelemetryConfig {
30
30
  screenMap?: Record<string, ServedScreenMapEntry>;
31
31
  /** oneapp: the Wix API bridge BI rules (#4977), a successful Wix API call → its outcome event. */
32
32
  apiRules?: ServedWixApiRule[];
33
+ /** oneapp: the platform action map (#4979), a user's tap on a descriptor action → its RN tap event. */
34
+ actionMap?: ServedActionMapEntry[];
33
35
  }
36
+ export interface ServedActionMapEntry {
37
+ id: string;
38
+ actionId: string;
39
+ screenId?: string;
40
+ when?: Record<string, string>;
41
+ once?: "screen";
42
+ src: number;
43
+ evid: number;
44
+ endpoint?: string;
45
+ module?: string;
46
+ fields: Record<string, string | number>;
47
+ }
48
+ export declare function servedActionMap(app: string): ServedActionMapEntry[] | undefined;
34
49
  export interface ServedWixApiRule {
35
50
  id: string;
36
51
  method: string;
@@ -13,7 +13,27 @@ export declare const bi: {
13
13
  pageView(pageName: string): Promise<BiResult>;
14
14
  /** Click beacon (Frog evid 522). */
15
15
  click(buttonName: string, pageName?: string): Promise<BiResult>;
16
+ /**
17
+ * Send a typed `@wix/bi-logger-*` `/v2` event exactly as its generated function returns it:
18
+ * `bi.log(bookingsAppointmentBookedSrc16Evid526({ ... }))`. In an app whose BI runs in
19
+ * `commonParams: "oneapp"` mode (the Owner / Spaces / Branded lite apps) its own `src` and
20
+ * `endpoint` are honored (`''`, the frog root, as `"/"`); a `himi`-mode app stamps its own
21
+ * configured `src` on every beacon and sends the event's `endpoint` as a plain `endpoint` field, so
22
+ * use it in oneapp apps. A param that is not a string, number or boolean is left out. The host still owns every common and identity field, and drops one a worker names.
23
+ *
24
+ * Prefer the platform maps (screen map, Wix API rules, action map, epic #4973): they send the
25
+ * RN events without worker code. Use this only for an event whose fields exist only in the worker.
26
+ */
27
+ log(event: BiLogEvent): Promise<BiResult>;
16
28
  };
29
+ /** What a `@wix/bi-logger-*` `/v2` event function returns: `{ evid, src, endpoint, params }`. */
30
+ export interface BiLogEvent {
31
+ evid: number;
32
+ src: number;
33
+ /** The frog endpoint; `''` is the frog root. */
34
+ endpoint?: string;
35
+ params?: Record<string, unknown>;
36
+ }
17
37
  export interface ExperimentResult {
18
38
  spec: string;
19
39
  variant: string;
@@ -142,6 +142,27 @@ var bi = {
142
142
  /** Click beacon (Frog evid 522). */
143
143
  click(buttonName, pageName) {
144
144
  return bi.track(522, pageName ? { button_name: buttonName, page_name: pageName } : { button_name: buttonName });
145
+ },
146
+ /**
147
+ * Send a typed `@wix/bi-logger-*` `/v2` event exactly as its generated function returns it:
148
+ * `bi.log(bookingsAppointmentBookedSrc16Evid526({ ... }))`. In an app whose BI runs in
149
+ * `commonParams: "oneapp"` mode (the Owner / Spaces / Branded lite apps) its own `src` and
150
+ * `endpoint` are honored (`''`, the frog root, as `"/"`); a `himi`-mode app stamps its own
151
+ * configured `src` on every beacon and sends the event's `endpoint` as a plain `endpoint` field, so
152
+ * use it in oneapp apps. A param that is not a string, number or boolean is left out. The host still owns every common and identity field, and drops one a worker names.
153
+ *
154
+ * Prefer the platform maps (screen map, Wix API rules, action map, epic #4973): they send the
155
+ * RN events without worker code. Use this only for an event whose fields exist only in the worker.
156
+ */
157
+ log(event) {
158
+ const params = {};
159
+ for (const [k, v] of Object.entries(event.params ?? {})) {
160
+ if (typeof v === "string" || typeof v === "number" && Number.isFinite(v)) params[k] = v;
161
+ else if (typeof v === "boolean") params[k] = v ? "true" : "false";
162
+ }
163
+ params.src = event.src;
164
+ if (event.endpoint !== void 0) params.endpoint = event.endpoint === "" ? "/" : event.endpoint;
165
+ return bi.track(event.evid, params);
145
166
  }
146
167
  };
147
168
  var conductFlights = /* @__PURE__ */ new WeakMap();
@@ -2,7 +2,7 @@
2
2
  "files": [
3
3
  {
4
4
  "name": "sw.js",
5
- "bytes": 2514162
5
+ "bytes": 2518076
6
6
  },
7
7
  {
8
8
  "name": "host.html",
@@ -21,7 +21,7 @@
21
21
  "bytes": 23064
22
22
  },
23
23
  {
24
- "name": "preview-deferred/6eb8e06efae709dec91b845b9df5a93594d4a91d157b435e053cc7789d005253.bin",
24
+ "name": "preview-deferred/6eef5856f65113cbc7504d7f926fe7039c48f614b3b0daf20c0e6eea0315c923.bin",
25
25
  "bytes": 488215
26
26
  },
27
27
  {
@@ -79,10 +79,10 @@
79
79
  ],
80
80
  "deferred": [
81
81
  {
82
- "key": "assets/pdf-DyeKpiem.js",
82
+ "key": "assets/pdf-CaFRYMot.js",
83
83
  "contentType": "application/javascript; charset=utf-8",
84
- "sha256": "6eb8e06efae709dec91b845b9df5a93594d4a91d157b435e053cc7789d005253",
85
- "file": "preview-deferred/6eb8e06efae709dec91b845b9df5a93594d4a91d157b435e053cc7789d005253.bin"
84
+ "sha256": "6eef5856f65113cbc7504d7f926fe7039c48f614b3b0daf20c0e6eea0315c923",
85
+ "file": "preview-deferred/6eef5856f65113cbc7504d7f926fe7039c48f614b3b0daf20c0e6eea0315c923.bin"
86
86
  },
87
87
  {
88
88
  "key": "assets/pdf.worker.min-BGnVRhRG.js",