@iterable/cli 0.4.0 → 0.5.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/COMMANDS.md CHANGED
@@ -1,4 +1,4 @@
1
- # Available Commands (111)
1
+ # Available Commands (120)
2
2
 
3
3
  All commands follow the pattern: `iterable <category> <command> [options]`
4
4
 
@@ -432,7 +432,72 @@ iterable events track-bulk --events <events...>
432
432
  | `--events` | json[] | **yes** | |
433
433
 
434
434
 
435
- ## experiments (4)
435
+ ## experiments (13)
436
+
437
+ ### cancel
438
+
439
+ Cancel a running or winner-found campaign experiment without declaring a winner
440
+
441
+ ```
442
+ iterable experiments cancel <experimentId>
443
+ ```
444
+
445
+ | Option | Type | Required | Description |
446
+ |--------|------|----------|-------------|
447
+ | `experimentId` | number | **yes** | Experiment ID |
448
+
449
+ ### copy-variant
450
+
451
+ Copy a template into a new variant on a draft or ready campaign experiment
452
+
453
+ ```
454
+ iterable experiments copy-variant --copyFromTemplateId <copyFromTemplateId> --experimentId <experimentId>
455
+ ```
456
+
457
+ | Option | Type | Required | Description |
458
+ |--------|------|----------|-------------|
459
+ | `--copyFromTemplateId` | number | **yes** | Template ID to copy into a new variant |
460
+ | `--experimentId` | number | **yes** | Experiment ID |
461
+ | `--name` | string | no | Display name for the new variant |
462
+
463
+ ### create
464
+
465
+ Create a draft campaign experiment. The campaign template becomes the control.
466
+
467
+ ```
468
+ iterable experiments create --campaignId <campaignId> --experimentType <experimentType>
469
+ ```
470
+
471
+ | Option | Type | Required | Description |
472
+ |--------|------|----------|-------------|
473
+ | `--campaignId` | number | **yes** | Campaign ID |
474
+ | `--experimentType` | `SubjectLine` \| `PreheaderText` \| `FromNameAndSender` \| `EmailBody` \| `WholeEmail` | **yes** | What to test. Send-time, send-time optimization, and frequency optimization are not supported. |
475
+ | `--name` | string | no | Display name. If omitted, Iterable uses '{campaign name} Experiment'. |
476
+
477
+ ### declare-winner
478
+
479
+ Declare a winning variant and end a running or winner-found campaign experiment
480
+
481
+ ```
482
+ iterable experiments declare-winner --experimentId <experimentId> --variantId <variantId>
483
+ ```
484
+
485
+ | Option | Type | Required | Description |
486
+ |--------|------|----------|-------------|
487
+ | `--experimentId` | number | **yes** | Experiment ID |
488
+ | `--variantId` | number | **yes** | Variant ID to declare as the winner. The holdout group cannot be selected. |
489
+
490
+ ### delete
491
+
492
+ Delete a draft, ready, or errored campaign experiment
493
+
494
+ ```
495
+ iterable experiments delete <experimentId>
496
+ ```
497
+
498
+ | Option | Type | Required | Description |
499
+ |--------|------|----------|-------------|
500
+ | `experimentId` | number | **yes** | Experiment ID |
436
501
 
437
502
  ### get
438
503
 
@@ -461,6 +526,32 @@ iterable experiments get-metrics
461
526
  | `--experimentId` | number[] | no | Experiment IDs to export (can specify multiple) |
462
527
  | `--startDateTime` | string | no | Export starting from (ISO 8601 format) |
463
528
 
529
+ ### get-totals
530
+
531
+ Get lifetime send and conversion totals for a campaign experiment
532
+
533
+ ```
534
+ iterable experiments get-totals <experimentId>
535
+ ```
536
+
537
+ | Option | Type | Required | Description |
538
+ |--------|------|----------|-------------|
539
+ | `experimentId` | number | **yes** | Experiment ID |
540
+
541
+ ### get-trends
542
+
543
+ Get the performance time series for a campaign experiment. Provide both start and end times, or omit both to use the run window.
544
+
545
+ ```
546
+ iterable experiments get-trends <experimentId>
547
+ ```
548
+
549
+ | Option | Type | Required | Description |
550
+ |--------|------|----------|-------------|
551
+ | `experimentId` | number | **yes** | Experiment ID |
552
+ | `--endDateTime` | string | no | Series end (ISO 8601). Required when startDateTime is set. |
553
+ | `--startDateTime` | string | no | Series start (ISO 8601). Required when endDateTime is set. |
554
+
464
555
  ### get-variants
465
556
 
466
557
  Get variant content for an experiment, including subject lines, preheaders, HTML source, and plain text
@@ -490,6 +581,35 @@ iterable experiments list
490
581
  | `--startDate` | string | no | Filter experiments starting from this date (ISO 8601 format) |
491
582
  | `--status` | `draft` \| `running` \| `finished` | no | Filter by status (draft, running, finished) |
492
583
 
584
+ ### start
585
+
586
+ Start a draft or ready campaign experiment
587
+
588
+ ```
589
+ iterable experiments start <experimentId>
590
+ ```
591
+
592
+ | Option | Type | Required | Description |
593
+ |--------|------|----------|-------------|
594
+ | `experimentId` | number | **yes** | Experiment ID |
595
+
596
+ ### update-settings
597
+
598
+ Update settings on a draft or ready campaign experiment. Omit a field to leave it unchanged.
599
+
600
+ ```
601
+ iterable experiments update-settings <experimentId>
602
+ ```
603
+
604
+ | Option | Type | Required | Description |
605
+ |--------|------|----------|-------------|
606
+ | `experimentId` | number | **yes** | Experiment ID |
607
+ | `--conversionEventSettings` | json | no | Conversion settings. Omit to leave unchanged. (JSON: {systemConversionEventType, customConversionId}) |
608
+ | `--evenlySplitVariations` | boolean | no | Set true to split traffic evenly and clear blast and trigger settings. false is rejected. Omit to leave allocation unchanged. |
609
+ | `--explorationBlastSettings` | json | no | Blast exploration settings. Null removes them. Omit to leave unchanged. (JSON: {testSizePercentage, testDurationMinutes}) |
610
+ | `--explorationTriggerSettings` | json | no | Trigger exploration settings. Null removes them. Omit to leave unchanged. (JSON: {testSendsPerVariation}) |
611
+ | `--holdoutSettings` | json | no | Holdout settings. Null removes them. Omit to leave unchanged. (JSON: {holdOutGroupSize, attributionPeriodHours}) |
612
+
493
613
 
494
614
  ## export (4)
495
615
 
@@ -1 +1 @@
1
- {"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../src/commands/experiments.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGpD,eAAO,MAAM,kBAAkB,EAAE,iBAAiB,EA+BjD,CAAC"}
1
+ {"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../src/commands/experiments.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGpD,eAAO,MAAM,kBAAkB,EAAE,iBAAiB,EAsGjD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { GetExperimentMetricsParamsSchema, GetExperimentParamsSchema, GetExperimentVariantsParamsSchema, ListExperimentsParamsSchema, } from "@iterable/api";
1
+ import { CopyExperimentVariantParamsSchema, CreateExperimentParamsSchema, DeclareExperimentWinnerParamsSchema, ExperimentIdParamsSchema, GetExperimentMetricsParamsSchema, GetExperimentParamsSchema, GetExperimentTrendsParamsSchema, GetExperimentVariantsParamsSchema, ListExperimentsParamsSchema, UpdateExperimentSettingsParamsSchema, } from "@iterable/api";
2
2
  import { defineCommand } from "./types.js";
3
3
  export const experimentCommands = [
4
4
  defineCommand({
@@ -29,5 +29,69 @@ export const experimentCommands = [
29
29
  clientMethod: "getExperimentVariants",
30
30
  schema: GetExperimentVariantsParamsSchema,
31
31
  }),
32
+ defineCommand({
33
+ category: "experiments",
34
+ name: "get-totals",
35
+ description: "Get lifetime send and conversion totals for a campaign experiment",
36
+ clientMethod: "getExperimentTotals",
37
+ schema: ExperimentIdParamsSchema,
38
+ }),
39
+ defineCommand({
40
+ category: "experiments",
41
+ name: "get-trends",
42
+ description: "Get the performance time series for a campaign experiment. Provide both start and end times, or omit both to use the run window.",
43
+ clientMethod: "getExperimentTrends",
44
+ schema: GetExperimentTrendsParamsSchema,
45
+ }),
46
+ defineCommand({
47
+ category: "experiments",
48
+ name: "create",
49
+ description: "Create a draft campaign experiment. The campaign template becomes the control.",
50
+ clientMethod: "createExperiment",
51
+ schema: CreateExperimentParamsSchema,
52
+ }),
53
+ defineCommand({
54
+ category: "experiments",
55
+ name: "copy-variant",
56
+ description: "Copy a template into a new variant on a draft or ready campaign experiment",
57
+ clientMethod: "copyExperimentVariant",
58
+ schema: CopyExperimentVariantParamsSchema,
59
+ }),
60
+ defineCommand({
61
+ category: "experiments",
62
+ name: "update-settings",
63
+ description: "Update settings on a draft or ready campaign experiment. Omit a field to leave it unchanged.",
64
+ clientMethod: "updateExperimentSettings",
65
+ schema: UpdateExperimentSettingsParamsSchema,
66
+ }),
67
+ defineCommand({
68
+ category: "experiments",
69
+ name: "start",
70
+ description: "Start a draft or ready campaign experiment",
71
+ clientMethod: "startExperiment",
72
+ schema: ExperimentIdParamsSchema,
73
+ }),
74
+ defineCommand({
75
+ category: "experiments",
76
+ name: "cancel",
77
+ description: "Cancel a running or winner-found campaign experiment without declaring a winner",
78
+ clientMethod: "cancelExperiment",
79
+ schema: ExperimentIdParamsSchema,
80
+ }),
81
+ defineCommand({
82
+ category: "experiments",
83
+ name: "declare-winner",
84
+ description: "Declare a winning variant and end a running or winner-found campaign experiment",
85
+ clientMethod: "declareExperimentWinner",
86
+ schema: DeclareExperimentWinnerParamsSchema,
87
+ }),
88
+ defineCommand({
89
+ category: "experiments",
90
+ name: "delete",
91
+ description: "Delete a draft, ready, or errored campaign experiment",
92
+ clientMethod: "deleteExperiment",
93
+ schema: ExperimentIdParamsSchema,
94
+ destructive: true,
95
+ }),
32
96
  ];
33
97
  //# sourceMappingURL=experiments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"experiments.js","sourceRoot":"","sources":["../../src/commands/experiments.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,yBAAyB,EACzB,iCAAiC,EACjC,2BAA2B,GAC5B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAwB;IACrD,aAAa,CAAC;QACZ,QAAQ,EAAE,aAAa;QACvB,IAAI,EAAE,MAAM;QACZ,WAAW,EACT,8EAA8E;QAChF,YAAY,EAAE,iBAAiB;QAC/B,MAAM,EAAE,2BAA2B;KACpC,CAAC;IACF,aAAa,CAAC;QACZ,QAAQ,EAAE,aAAa;QACvB,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,4DAA4D;QACzE,YAAY,EAAE,eAAe;QAC7B,MAAM,EAAE,yBAAyB;KAClC,CAAC;IACF,aAAa,CAAC;QACZ,QAAQ,EAAE,aAAa;QACvB,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,i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AAmC;KAC5C,CAAC;IACF,aAAa,CAAC;QACZ,QAAQ,EAAE,aAAa;QACvB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,uDAAuD;QACpE,YAAY,EAAE,kBAAkB;QAChC,MAAM,EAAE,wBAAwB;QAChC,WAAW,EAAE,IAAI;KAClB,CAAC;CACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iterable/cli",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Command-line interface for the Iterable API",
5
5
  "keywords": [
6
6
  "iterable",
@@ -60,7 +60,7 @@
60
60
  "update-commands": "node scripts/update-commands.js"
61
61
  },
62
62
  "dependencies": {
63
- "@iterable/api": "0.12.0",
63
+ "@iterable/api": "0.13.1",
64
64
  "@primno/dpapi": "2.0.1",
65
65
  "boxen": "8.0.1",
66
66
  "chalk": "5.6.2",
@@ -70,7 +70,7 @@
70
70
  "ora": "9.3.0",
71
71
  "package-manager-detector": "1.6.0",
72
72
  "semver": "7.7.4",
73
- "zod": "4.3.6",
73
+ "zod": "4.6.7",
74
74
  "zod-opts": "1.0.0"
75
75
  },
76
76
  "devDependencies": {