@drip-apex/apex-cli 0.21.0 → 0.21.1
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 +61 -0
- package/dist/cli.js +954 -286
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -742,8 +742,69 @@ Unavailable values print `–` (empty in CSV); `*` marks a denominator below 50.
|
|
|
742
742
|
`apex forms unmerge <key> <identity>` undoes it. `apex forms detect <url>` scans a shop page without returning values.
|
|
743
743
|
`apex tracking manifest [manifest]` includes the shop's form definitions in a schemaVersion 1 manifest.
|
|
744
744
|
|
|
745
|
+
Read sale and no-split campaign reports with `apex experiments results <id-or-slug> --sale`.
|
|
746
|
+
Use `--baseline auto|holdout|last_year|prior_period|manual` to override the saved
|
|
747
|
+
reporting preference for one read, or add `--json` for the unchanged API envelope.
|
|
748
|
+
This calls `/api/v1/experiments/{id}/commerce/sale-report`; ordinary results stay unchanged.
|
|
749
|
+
|
|
750
|
+
The report shows current campaign and pooled sale totals, labelled archived arms,
|
|
751
|
+
shop currency, launch-price markdown separately from Shopify amount-off/code allocations,
|
|
752
|
+
and baseline attempts with unavailable-data reasons. Holdout comparisons use observed
|
|
753
|
+
per-visitor order counts and money. Prior-period and manual comparisons are descriptive
|
|
754
|
+
(`not_randomised`), with no causal interval or winner. Last year currently returns
|
|
755
|
+
`last_year_unavailable` with `stored_coverage_unproven`; auto can fall back to a covered
|
|
756
|
+
prior period. Unknown values print as unavailable.
|
|
757
|
+
|
|
758
|
+
`--baseline` requires `--sale`. Sale reports reject `--currency`, audience segment
|
|
759
|
+
filters, `--explain`, `--by-channel`, `--ad-roas`, `--goal`, `--order`, `--samples`,
|
|
760
|
+
and an explicit `--wait`. Dates, environment, currency and population are fixed by
|
|
761
|
+
the experiment. A manual baseline can be saved through
|
|
762
|
+
`PUT /api/v1/experiments/{id}/commerce/sale-report/baseline` with the exact current
|
|
763
|
+
start, assignment epoch and manual revision. For running/paused campaigns, the saved
|
|
764
|
+
snapshot cutoff must be at or after start and at or before the current canonical
|
|
765
|
+
minute rounded down, never future seconds. The manual report pins both actuals and
|
|
766
|
+
baseline to that saved cutoff, shown in the report window, while computedAt stays
|
|
767
|
+
real now. Other baselines use the current window. Completed campaigns require their
|
|
768
|
+
exact completed end; refresh a running snapshot after completion. Missing/blank
|
|
769
|
+
order currencies assume shop currency in current and historical totals and visitor
|
|
770
|
+
moments; nonzero assumption counts are printed. Explicit foreign currencies are excluded.
|
|
771
|
+
|
|
745
772
|
Flag goals: `apex flags create --key banner --name "Banner" --goal <uuid> --goal <uuid> --primary-goal <uuid>`. The same options work on `flags update <id>`; `--goal` replaces the attached set. `flags get <id>` prints goals and marks the primary goal. JSON input can clear the set with `{"goal_ids":[]}`.
|
|
746
773
|
|
|
774
|
+
Flags support ordered audiences through the API and CLI. `apex flags get <flag>`
|
|
775
|
+
shows each audience's order, experience, rollout, stop setting and archive state.
|
|
776
|
+
|
|
777
|
+
```sh
|
|
778
|
+
apex flags experiences create <flag> --file experience.json
|
|
779
|
+
apex flags experiences update <flag> <experience> --file experience.json
|
|
780
|
+
apex flags rules set <flag> --file rules.json --expected-updated-at <parent-version>
|
|
781
|
+
apex flags rules reorder <flag> --file order.json
|
|
782
|
+
apex flags experiences delete <flag> <experience>
|
|
783
|
+
```
|
|
784
|
+
|
|
785
|
+
An experience file contains `key`, `name`, optional typed JSON `value`,
|
|
786
|
+
`mutations`, `custom_css`, `custom_js`, `reset_js`, `anti_flicker_selectors` and
|
|
787
|
+
`code_delivery_mode`. Update files contain only the fields to change. Code uses
|
|
788
|
+
the same validation and publication path as the flag's On version.
|
|
789
|
+
|
|
790
|
+
A rules file is an array (or an object with `rules`) of audience objects with
|
|
791
|
+
`id` (a stable UUID), `name`, `priority`, `order_index`, `variant_id`, `targeting`,
|
|
792
|
+
`rollout_percentage` and `stop_after_match`. A reorder file contains every live
|
|
793
|
+
rule's `id`, `priority` and `order_index`. The set command replaces the live set:
|
|
794
|
+
omitted audiences are archived with their history. An experience referenced by
|
|
795
|
+
any audience, including an archived one, cannot be deleted. The Off and On
|
|
796
|
+
versions keep their identities.
|
|
797
|
+
|
|
798
|
+
Every audience or experience write uses the parent `expected_updated_at`.
|
|
799
|
+
Supply it in the file or with `--expected-updated-at`; otherwise the CLI reads
|
|
800
|
+
the current flag version before saving. A stale version returns a conflict.
|
|
801
|
+
`apex personalizations` keeps its existing request and response format and
|
|
802
|
+
resolves migrated personalizations to their current flag data automatically.
|
|
803
|
+
|
|
804
|
+
Experience saves return `code_save` with artifact review and publication status.
|
|
805
|
+
A publication failure returns HTTP 502 with `error.details.saved: true`; the
|
|
806
|
+
experience is already saved. Read the flag before retrying.
|
|
807
|
+
|
|
747
808
|
### Ready to launch notifications
|
|
748
809
|
|
|
749
810
|
Use a user API key with `team:read` / `team:write` and the shop permission `members:manage`.
|