@drip-apex/apex-cli 0.18.0 → 0.19.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/README.md CHANGED
@@ -185,7 +185,10 @@ including every subcommand, argument, option, and alias.
185
185
  - `apex triggers disable-capture` — disable setup capture and clear its expiry.
186
186
  - `apex domains` — manage install domains, and landing-page domains (`claim`, `register`, `status`, `unclaim`; registering asks for a price confirmation).
187
187
  - `apex handover` — manage cross-domain identity handover.
188
- - `apex install` — generate storefront installation snippets.
188
+ - `apex install` — check storefront installation and generate a client guide.
189
+ - `apex install kit` — print a ready-to-send installation guide as Markdown or JSON.
190
+ - `apex install check` — verify the snippet, served config, and recent tracking.
191
+ - `apex install steps` — show each installation step with when Apex first and last saw it (`--live` also checks the page and firewall access).
189
192
  - `apex funnels` — manage analytics funnels.
190
193
  - `apex webhooks` — manage shop webhooks.
191
194
  - `apex simulate` — simulate data-layer triggers without emitting events.
@@ -201,6 +204,38 @@ including every subcommand, argument, option, and alias.
201
204
  - `apex workspace` — check out, preview, and publish draft workspace files.
202
205
  - `apex goals` — manage conversion and revenue goals. Create/update accept `--page-id <id>` (UUID only, no lookup) or `--page <id-or-key>` (keys need `pages:read` for lookup); use one option.
203
206
  - `apex flags` — manage feature flags.
207
+ - `apex surveys` — list, get, create, update, start, pause, complete, duplicate, and delete surveys.
208
+ Use `apex surveys list --status live` to filter, and `apex surveys create @survey.json`
209
+ or `apex surveys update <id> <body>` with inline JSON, `@file`, or a file path.
210
+ Both create and update also accept `--file survey.json` instead of a positional body;
211
+ providing both is an error. Their `--help` pages include the example and field defaults below.
212
+ `--json` returns the server body unchanged under `data`; publication warnings go to stderr.
213
+ Deleting a live or paused survey returns conflict exit code 5. Complete it before deleting.
214
+
215
+ Example `survey.json` for `apex surveys create --file survey.json` or
216
+ `apex surveys update <id> --file survey.json`:
217
+
218
+ ```json
219
+ {
220
+ "name": "Product feedback",
221
+ "questions": [{
222
+ "type": "single_choice",
223
+ "prompt": "What would help you decide?",
224
+ "options": [{"label": "More details"}, {"label": "Reviews"}, {"label": "Delivery info"}]
225
+ }],
226
+ "targeting": {"url": [{"type": "simple", "pattern": "/products/", "matchType": "contains"}]},
227
+ "sampling_rate": 0.5,
228
+ "frequency_cap": "once_per_visitor",
229
+ "card_style": "quiet",
230
+ "answer_goal": 100
231
+ }
232
+ ```
233
+
234
+ On create, `name` is required. Server defaults: `questions: []` (each question's
235
+ `required: true`), `targeting: null` (all pages/visitors), `sampling_rate: 1`,
236
+ `frequency_cap: "once_per_visitor"`, `card_style: "quiet"`, `answer_goal: null`,
237
+ `environment_key: "production"`, `placement: "sdk_page"`, `active_from: null`,
238
+ and `active_to: null`. Update accepts a partial body and keeps omitted fields unchanged.
204
239
  - `apex personalizations` — manage personalization deliveries.
205
240
  - `apex backlog` — manage experiment backlog items.
206
241
  - `apex signals` — inspect research and opportunity signals.
@@ -212,7 +247,7 @@ including every subcommand, argument, option, and alias.
212
247
  - `apex events export` — export all raw events in a fixed ISO 8601 window with automatic pagination.
213
248
  - `apex environments` — inspect delivery environments.
214
249
  - `apex analytics` — read shop analytics.
215
- - `apex pages` — manage page targeting resources.
250
+ - `apex pages` — manage page targeting resources. Body keys are listed in `apex pages create --help` (and `update --help`); the CLI refuses a `url_pattern` or rule pattern whose shape contradicts `match_type` (`match_type_mismatch`) unless `--literal` is passed. `apex schema --json` carries the body schema.
216
251
  - `apex segments` — manage audience segments.
217
252
  - `apex exclusion-groups` — manage mutually exclusive experiment groups.
218
253
  - `apex targeting` — inspect targeting evaluation and coverage.
@@ -608,3 +643,7 @@ store ID (or null), invitation results and partial delivery status.
608
643
  ## Import past results
609
644
 
610
645
  Upload CSV or JSON exports with `apex results import --file results.csv --dry-run`. Apex suggests column and outcome-value mappings from the file; use repeated `--map 'Column=field'` and `--outcome-value 'Source value=won|lost|inconclusive'` overrides, then pass `--yes` for non-interactive confirmation. Files are inspected and previewed before any rows are written. `--source <name>` applies to the confirmed rows; the preview shows the uploaded file name.
646
+
647
+ ### Tracking health
648
+
649
+ `apex tracking health [--json]` reads one tracking-health report for the current shop: every check with pass, warn, fail or unknown, a plain summary and the deciding numbers, plus each running test's first-hour verdict and traffic split overall and per device (`--json` carries visitors per arm per day). Exit code 0 is pass, 1 is warn or fail, 3 is unknown.