@marketrix.ai/widget 3.8.359 → 3.8.362

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 CHANGED
@@ -50,7 +50,7 @@ await mountWidget({
50
50
  });
51
51
  ```
52
52
 
53
- `mountWidget` auto-detects the credential mode (production / dev / preview) from the config you pass.
53
+ `mountWidget` auto-detects the credential mode (production / preview) from the config you pass.
54
54
 
55
55
  ---
56
56
 
@@ -136,7 +136,7 @@ import {
136
136
 
137
137
  ### `mountWidget(config): Promise<void>`
138
138
 
139
- Auto-detects the mode (preview / production / dev) from `config` and initializes the widget. The recommended entry point for programmatic use.
139
+ Auto-detects the mode (preview / production) from `config` and initializes the widget, throwing if neither `settings` nor `mtxId` + `mtxKey` is present. The recommended entry point for programmatic use.
140
140
 
141
141
  ```ts
142
142
  // Production
@@ -148,7 +148,7 @@ await mountWidget({ settings: { widget_enabled: true, widget_position: 'bottom_r
148
148
 
149
149
  ### `initWidget(config, container?): Promise<void>`
150
150
 
151
- Lower-level production/dev initializer. Validates credentials, fetches settings from the API, mounts into a closed Shadow DOM, and opens the event stream. Optionally mounts inside a specific `container`. Concurrent and duplicate calls are deduplicated; only one production widget runs per page.
151
+ Lower-level production initializer. Validates credentials, fetches settings from the API, mounts into a closed Shadow DOM, and opens the event stream. Optionally mounts inside a specific `container`. Concurrent and duplicate calls are deduplicated; only one production widget runs per page.
152
152
 
153
153
  ```ts
154
154
  await initWidget({ mtxId, mtxKey, mtxApiHost }, document.getElementById('my-container')!);
@@ -33,9 +33,8 @@ export declare const PaginationSchema: z.ZodObject<{
33
33
  offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
34
34
  }, z.core.$strip>;
35
35
  /**
36
- * Query-string boolean: 'true'/'false' (or a real boolean) boolean, anything else → undefined.
37
- * `z.coerce.boolean()` is WRONG for query strings it's `Boolean(val)`, so `Boolean('false') === true`
38
- * and `?enabled=false` would match enabled rows. Parse the two tokens explicitly instead.
36
+ * Query-string boolean. NOT `z.coerce.boolean()` that is `Boolean(val)`, so `Boolean('false') === true`
37
+ * and `?enabled=false` would match enabled rows. `.optional()` is outermost so the object key stays omittable.
39
38
  */
40
39
  export declare const booleanQueryParam: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>, z.ZodTransform<boolean | undefined, string | boolean>>>;
41
40
  /** Paginated list for unbounded queries — includes total/limit/offset for pagination */
@@ -218,7 +218,7 @@ export declare const SimulationEntitySchema: z.ZodObject<{
218
218
  direct: "direct";
219
219
  uxr: "uxr";
220
220
  survey: "survey";
221
- abtest: "abtest";
221
+ ab: "ab";
222
222
  qa: "qa";
223
223
  }>;
224
224
  pinned: z.ZodOptional<z.ZodBoolean>;
@@ -470,11 +470,11 @@ export declare const StateTriggerEntitySchema: z.ZodObject<{
470
470
  }, z.core.$strip>;
471
471
  export type StateTriggerData = z.infer<typeof StateTriggerEntitySchema>;
472
472
  /**
473
- * QA run status — first-class TEXT+CHECK column on qa_run (no longer derived).
474
- * `finalizing` = all sims terminal but per-journey outcomes still completing (QA has no
475
- * run-level rollup like studies). Canonical wire vocabulary.
473
+ * Run status — first-class TEXT+CHECK column on qa_run and study_run (no longer derived).
474
+ * `finalizing` = all sims terminal but the run-level fold still completing.
475
+ * Canonical wire vocabulary shared by QA runs and study runs.
476
476
  */
477
- export declare const QARunStatusSchema: z.ZodEnum<{
477
+ export declare const RunStatusSchema: z.ZodEnum<{
478
478
  created: "created";
479
479
  running: "running";
480
480
  completed: "completed";
@@ -482,6 +482,7 @@ export declare const QARunStatusSchema: z.ZodEnum<{
482
482
  stopped: "stopped";
483
483
  finalizing: "finalizing";
484
484
  }>;
485
+ export type RunStatus = z.infer<typeof RunStatusSchema>;
485
486
  /** QA outcome per (run, persona, journey, viewport) — DATA-derived by the api from qa_outcomes; NOT a wire status. */
486
487
  export declare const QARunOutcomeStatusSchema: z.ZodEnum<{
487
488
  failed: "failed";