@knocklabs/cli 0.3.1 → 1.0.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.
Files changed (69) hide show
  1. package/README.md +343 -55
  2. package/dist/commands/branch/delete.js +4 -1
  3. package/dist/commands/branch/merge.js +82 -0
  4. package/dist/commands/channel/list.js +73 -0
  5. package/dist/commands/environment/list.js +73 -0
  6. package/dist/commands/guide/new.js +276 -0
  7. package/dist/commands/guide/open.js +106 -0
  8. package/dist/commands/guide/pull.js +5 -6
  9. package/dist/commands/guide/push.js +1 -1
  10. package/dist/commands/guide/validate.js +1 -1
  11. package/dist/commands/init.js +108 -0
  12. package/dist/commands/layout/new.js +228 -0
  13. package/dist/commands/layout/open.js +106 -0
  14. package/dist/commands/layout/pull.js +5 -6
  15. package/dist/commands/layout/push.js +1 -1
  16. package/dist/commands/layout/validate.js +1 -1
  17. package/dist/commands/message-type/new.js +228 -0
  18. package/dist/commands/message-type/open.js +106 -0
  19. package/dist/commands/message-type/pull.js +5 -6
  20. package/dist/commands/message-type/push.js +1 -1
  21. package/dist/commands/message-type/validate.js +1 -1
  22. package/dist/commands/partial/new.js +274 -0
  23. package/dist/commands/partial/open.js +106 -0
  24. package/dist/commands/partial/pull.js +5 -6
  25. package/dist/commands/partial/push.js +1 -1
  26. package/dist/commands/partial/validate.js +1 -1
  27. package/dist/commands/pull.js +7 -2
  28. package/dist/commands/push.js +6 -4
  29. package/dist/commands/translation/pull.js +1 -1
  30. package/dist/commands/translation/push.js +1 -1
  31. package/dist/commands/translation/validate.js +1 -1
  32. package/dist/commands/workflow/new.js +179 -54
  33. package/dist/commands/workflow/open.js +106 -0
  34. package/dist/commands/workflow/pull.js +6 -8
  35. package/dist/commands/workflow/push.js +1 -1
  36. package/dist/commands/workflow/validate.js +1 -1
  37. package/dist/lib/api-v1.js +23 -2
  38. package/dist/lib/auth.js +1 -1
  39. package/dist/lib/base-command.js +18 -15
  40. package/dist/lib/helpers/project-config.js +158 -0
  41. package/dist/lib/helpers/request.js +1 -2
  42. package/dist/lib/helpers/string.js +4 -4
  43. package/dist/lib/helpers/typegen.js +1 -1
  44. package/dist/lib/marshal/email-layout/generator.js +152 -0
  45. package/dist/lib/marshal/email-layout/helpers.js +6 -9
  46. package/dist/lib/marshal/email-layout/index.js +1 -0
  47. package/dist/lib/marshal/email-layout/writer.js +15 -3
  48. package/dist/lib/marshal/guide/generator.js +163 -0
  49. package/dist/lib/marshal/guide/helpers.js +6 -10
  50. package/dist/lib/marshal/guide/index.js +1 -0
  51. package/dist/lib/marshal/guide/writer.js +5 -9
  52. package/dist/lib/marshal/message-type/generator.js +139 -0
  53. package/dist/lib/marshal/message-type/helpers.js +6 -10
  54. package/dist/lib/marshal/message-type/index.js +1 -0
  55. package/dist/lib/marshal/message-type/writer.js +5 -1
  56. package/dist/lib/marshal/partial/generator.js +159 -0
  57. package/dist/lib/marshal/partial/helpers.js +6 -10
  58. package/dist/lib/marshal/partial/index.js +1 -0
  59. package/dist/lib/marshal/partial/writer.js +3 -0
  60. package/dist/lib/marshal/translation/helpers.js +6 -10
  61. package/dist/lib/marshal/translation/processor.isomorphic.js +4 -4
  62. package/dist/lib/marshal/translation/writer.js +2 -2
  63. package/dist/lib/marshal/workflow/generator.js +175 -19
  64. package/dist/lib/marshal/workflow/helpers.js +7 -10
  65. package/dist/lib/run-context/loader.js +5 -0
  66. package/dist/lib/templates.js +131 -0
  67. package/dist/lib/urls.js +16 -0
  68. package/oclif.manifest.json +1446 -547
  69. package/package.json +11 -9
@@ -1,5 +1,44 @@
1
1
  {
2
2
  "commands": {
3
+ "init": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Creates a knock.json configuration file in the current directory to store project-level settings like the knock resources directory.",
7
+ "flags": {
8
+ "service-token": {
9
+ "env": "KNOCK_SERVICE_TOKEN",
10
+ "name": "service-token",
11
+ "required": false,
12
+ "summary": "The service token to authenticate with.",
13
+ "hasDynamicHelp": false,
14
+ "multiple": false,
15
+ "type": "option"
16
+ },
17
+ "api-origin": {
18
+ "hidden": true,
19
+ "name": "api-origin",
20
+ "required": false,
21
+ "hasDynamicHelp": false,
22
+ "multiple": false,
23
+ "type": "option"
24
+ }
25
+ },
26
+ "hasDynamicHelp": false,
27
+ "hiddenAliases": [],
28
+ "id": "init",
29
+ "pluginAlias": "@knocklabs/cli",
30
+ "pluginName": "@knocklabs/cli",
31
+ "pluginType": "core",
32
+ "strict": true,
33
+ "summary": "Initialize a new Knock project with a knock.json configuration file.",
34
+ "enableJsonFlag": false,
35
+ "isESM": false,
36
+ "relativePath": [
37
+ "dist",
38
+ "commands",
39
+ "init.js"
40
+ ]
41
+ },
3
42
  "knock": {
4
43
  "aliases": [],
5
44
  "args": {},
@@ -152,7 +191,7 @@
152
191
  },
153
192
  "knock-dir": {
154
193
  "name": "knock-dir",
155
- "required": true,
194
+ "required": false,
156
195
  "summary": "The target directory path to pull all resources into.",
157
196
  "hasDynamicHelp": false,
158
197
  "multiple": false,
@@ -228,7 +267,7 @@
228
267
  },
229
268
  "knock-dir": {
230
269
  "name": "knock-dir",
231
- "required": true,
270
+ "required": false,
232
271
  "summary": "The target directory path to find all resources to push.",
233
272
  "hasDynamicHelp": false,
234
273
  "multiple": false,
@@ -522,6 +561,63 @@
522
561
  "list.js"
523
562
  ]
524
563
  },
564
+ "branch:merge": {
565
+ "aliases": [],
566
+ "args": {
567
+ "slug": {
568
+ "description": "The slug of the branch to merge",
569
+ "name": "slug",
570
+ "required": true
571
+ }
572
+ },
573
+ "flags": {
574
+ "service-token": {
575
+ "env": "KNOCK_SERVICE_TOKEN",
576
+ "name": "service-token",
577
+ "required": false,
578
+ "summary": "The service token to authenticate with.",
579
+ "hasDynamicHelp": false,
580
+ "multiple": false,
581
+ "type": "option"
582
+ },
583
+ "api-origin": {
584
+ "hidden": true,
585
+ "name": "api-origin",
586
+ "required": false,
587
+ "hasDynamicHelp": false,
588
+ "multiple": false,
589
+ "type": "option"
590
+ },
591
+ "force": {
592
+ "name": "force",
593
+ "summary": "Remove the confirmation prompt.",
594
+ "allowNo": false,
595
+ "type": "boolean"
596
+ },
597
+ "delete": {
598
+ "name": "delete",
599
+ "summary": "Delete the branch after merging.",
600
+ "allowNo": true,
601
+ "type": "boolean"
602
+ }
603
+ },
604
+ "hasDynamicHelp": false,
605
+ "hiddenAliases": [],
606
+ "id": "branch:merge",
607
+ "pluginAlias": "@knocklabs/cli",
608
+ "pluginName": "@knocklabs/cli",
609
+ "pluginType": "core",
610
+ "strict": true,
611
+ "summary": "Merges a branch into the development environment.",
612
+ "enableJsonFlag": false,
613
+ "isESM": false,
614
+ "relativePath": [
615
+ "dist",
616
+ "commands",
617
+ "branch",
618
+ "merge.js"
619
+ ]
620
+ },
525
621
  "branch:switch": {
526
622
  "aliases": [],
527
623
  "args": {
@@ -579,6 +675,98 @@
579
675
  "switch.js"
580
676
  ]
581
677
  },
678
+ "channel:list": {
679
+ "aliases": [],
680
+ "args": {},
681
+ "flags": {
682
+ "json": {
683
+ "description": "Format output as json.",
684
+ "helpGroup": "GLOBAL",
685
+ "name": "json",
686
+ "allowNo": false,
687
+ "type": "boolean"
688
+ },
689
+ "service-token": {
690
+ "env": "KNOCK_SERVICE_TOKEN",
691
+ "name": "service-token",
692
+ "required": false,
693
+ "summary": "The service token to authenticate with.",
694
+ "hasDynamicHelp": false,
695
+ "multiple": false,
696
+ "type": "option"
697
+ },
698
+ "api-origin": {
699
+ "hidden": true,
700
+ "name": "api-origin",
701
+ "required": false,
702
+ "hasDynamicHelp": false,
703
+ "multiple": false,
704
+ "type": "option"
705
+ }
706
+ },
707
+ "hasDynamicHelp": false,
708
+ "hiddenAliases": [],
709
+ "id": "channel:list",
710
+ "pluginAlias": "@knocklabs/cli",
711
+ "pluginName": "@knocklabs/cli",
712
+ "pluginType": "core",
713
+ "strict": true,
714
+ "summary": "Display all channels configured for the account.",
715
+ "enableJsonFlag": true,
716
+ "isESM": false,
717
+ "relativePath": [
718
+ "dist",
719
+ "commands",
720
+ "channel",
721
+ "list.js"
722
+ ]
723
+ },
724
+ "environment:list": {
725
+ "aliases": [],
726
+ "args": {},
727
+ "flags": {
728
+ "json": {
729
+ "description": "Format output as json.",
730
+ "helpGroup": "GLOBAL",
731
+ "name": "json",
732
+ "allowNo": false,
733
+ "type": "boolean"
734
+ },
735
+ "service-token": {
736
+ "env": "KNOCK_SERVICE_TOKEN",
737
+ "name": "service-token",
738
+ "required": false,
739
+ "summary": "The service token to authenticate with.",
740
+ "hasDynamicHelp": false,
741
+ "multiple": false,
742
+ "type": "option"
743
+ },
744
+ "api-origin": {
745
+ "hidden": true,
746
+ "name": "api-origin",
747
+ "required": false,
748
+ "hasDynamicHelp": false,
749
+ "multiple": false,
750
+ "type": "option"
751
+ }
752
+ },
753
+ "hasDynamicHelp": false,
754
+ "hiddenAliases": [],
755
+ "id": "environment:list",
756
+ "pluginAlias": "@knocklabs/cli",
757
+ "pluginName": "@knocklabs/cli",
758
+ "pluginType": "core",
759
+ "strict": true,
760
+ "summary": "Display all environments configured for the account.",
761
+ "enableJsonFlag": true,
762
+ "isESM": false,
763
+ "relativePath": [
764
+ "dist",
765
+ "commands",
766
+ "environment",
767
+ "list.js"
768
+ ]
769
+ },
582
770
  "commit:get": {
583
771
  "aliases": [],
584
772
  "args": {
@@ -1193,14 +1381,9 @@
1193
1381
  "list.js"
1194
1382
  ]
1195
1383
  },
1196
- "guide:pull": {
1384
+ "guide:new": {
1197
1385
  "aliases": [],
1198
- "args": {
1199
- "guideKey": {
1200
- "name": "guideKey",
1201
- "required": false
1202
- }
1203
- },
1386
+ "args": {},
1204
1387
  "flags": {
1205
1388
  "service-token": {
1206
1389
  "env": "KNOCK_SERVICE_TOKEN",
@@ -1219,9 +1402,33 @@
1219
1402
  "multiple": false,
1220
1403
  "type": "option"
1221
1404
  },
1405
+ "name": {
1406
+ "char": "n",
1407
+ "name": "name",
1408
+ "summary": "The name of the guide",
1409
+ "hasDynamicHelp": false,
1410
+ "multiple": false,
1411
+ "type": "option"
1412
+ },
1413
+ "key": {
1414
+ "char": "k",
1415
+ "name": "key",
1416
+ "summary": "The key of the guide",
1417
+ "hasDynamicHelp": false,
1418
+ "multiple": false,
1419
+ "type": "option"
1420
+ },
1421
+ "message-type": {
1422
+ "char": "m",
1423
+ "name": "message-type",
1424
+ "summary": "The message type key to use for the guide. You cannot use this flag with --template.",
1425
+ "hasDynamicHelp": false,
1426
+ "multiple": false,
1427
+ "type": "option"
1428
+ },
1222
1429
  "environment": {
1223
1430
  "name": "environment",
1224
- "summary": "The environment to use.",
1431
+ "summary": "The environment to create the guide in. Defaults to development.",
1225
1432
  "default": "development",
1226
1433
  "hasDynamicHelp": false,
1227
1434
  "multiple": false,
@@ -1234,58 +1441,51 @@
1234
1441
  "multiple": false,
1235
1442
  "type": "option"
1236
1443
  },
1237
- "all": {
1238
- "name": "all",
1239
- "summary": "Whether to pull all guides from the specified environment.",
1444
+ "force": {
1445
+ "name": "force",
1446
+ "summary": "Force the creation of the guide directory without confirmation.",
1240
1447
  "allowNo": false,
1241
1448
  "type": "boolean"
1242
1449
  },
1243
- "guides-dir": {
1244
- "dependsOn": [
1245
- "all"
1246
- ],
1247
- "name": "guides-dir",
1248
- "summary": "The target directory path to pull all guides into.",
1249
- "hasDynamicHelp": false,
1250
- "multiple": false,
1251
- "type": "option"
1252
- },
1253
- "hide-uncommitted-changes": {
1254
- "name": "hide-uncommitted-changes",
1255
- "summary": "Hide any uncommitted changes.",
1450
+ "push": {
1451
+ "char": "p",
1452
+ "name": "push",
1453
+ "summary": "Whether or not to push the guide to Knock after creation.",
1256
1454
  "allowNo": false,
1257
1455
  "type": "boolean"
1258
1456
  },
1259
- "force": {
1260
- "name": "force",
1261
- "summary": "Remove the confirmation prompt.",
1262
- "allowNo": false,
1263
- "type": "boolean"
1457
+ "template": {
1458
+ "char": "t",
1459
+ "name": "template",
1460
+ "summary": "The template to use for the guide. Should be `guides/{key}`. You cannot use this flag with --message-type.",
1461
+ "hasDynamicHelp": false,
1462
+ "multiple": false,
1463
+ "type": "option"
1264
1464
  }
1265
1465
  },
1266
1466
  "hasDynamicHelp": false,
1267
1467
  "hiddenAliases": [],
1268
- "id": "guide:pull",
1468
+ "id": "guide:new",
1269
1469
  "pluginAlias": "@knocklabs/cli",
1270
1470
  "pluginName": "@knocklabs/cli",
1271
1471
  "pluginType": "core",
1272
1472
  "strict": true,
1273
- "summary": "Pull one or more guides from an environment into a local file system.",
1473
+ "summary": "Create a new guide with a minimal configuration.",
1274
1474
  "enableJsonFlag": false,
1275
1475
  "isESM": false,
1276
1476
  "relativePath": [
1277
1477
  "dist",
1278
1478
  "commands",
1279
1479
  "guide",
1280
- "pull.js"
1480
+ "new.js"
1281
1481
  ]
1282
1482
  },
1283
- "guide:push": {
1483
+ "guide:open": {
1284
1484
  "aliases": [],
1285
1485
  "args": {
1286
1486
  "guideKey": {
1287
1487
  "name": "guideKey",
1288
- "required": false
1488
+ "required": true
1289
1489
  }
1290
1490
  },
1291
1491
  "flags": {
@@ -1308,7 +1508,7 @@
1308
1508
  },
1309
1509
  "environment": {
1310
1510
  "name": "environment",
1311
- "summary": "The environment to push the guide to. Defaults to development.",
1511
+ "summary": "The environment to use.",
1312
1512
  "default": "development",
1313
1513
  "hasDynamicHelp": false,
1314
1514
  "multiple": false,
@@ -1320,34 +1520,180 @@
1320
1520
  "hasDynamicHelp": false,
1321
1521
  "multiple": false,
1322
1522
  "type": "option"
1323
- },
1324
- "all": {
1325
- "name": "all",
1326
- "summary": "Whether to push all guides from the target directory.",
1327
- "allowNo": false,
1328
- "type": "boolean"
1329
- },
1330
- "guides-dir": {
1331
- "dependsOn": [
1332
- "all"
1333
- ],
1334
- "name": "guides-dir",
1335
- "summary": "The target directory path to find all guides to push.",
1336
- "hasDynamicHelp": false,
1337
- "multiple": false,
1338
- "type": "option"
1339
- },
1340
- "commit": {
1341
- "name": "commit",
1342
- "summary": "Push and commit the guide(s) at the same time",
1343
- "allowNo": false,
1344
- "type": "boolean"
1345
- },
1346
- "commit-message": {
1347
- "char": "m",
1348
- "dependsOn": [
1349
- "commit"
1350
- ],
1523
+ }
1524
+ },
1525
+ "hasDynamicHelp": false,
1526
+ "hiddenAliases": [],
1527
+ "id": "guide:open",
1528
+ "pluginAlias": "@knocklabs/cli",
1529
+ "pluginName": "@knocklabs/cli",
1530
+ "pluginType": "core",
1531
+ "strict": true,
1532
+ "summary": "Open a guide in the Knock dashboard.",
1533
+ "enableJsonFlag": false,
1534
+ "isESM": false,
1535
+ "relativePath": [
1536
+ "dist",
1537
+ "commands",
1538
+ "guide",
1539
+ "open.js"
1540
+ ]
1541
+ },
1542
+ "guide:pull": {
1543
+ "aliases": [],
1544
+ "args": {
1545
+ "guideKey": {
1546
+ "name": "guideKey",
1547
+ "required": false
1548
+ }
1549
+ },
1550
+ "flags": {
1551
+ "service-token": {
1552
+ "env": "KNOCK_SERVICE_TOKEN",
1553
+ "name": "service-token",
1554
+ "required": false,
1555
+ "summary": "The service token to authenticate with.",
1556
+ "hasDynamicHelp": false,
1557
+ "multiple": false,
1558
+ "type": "option"
1559
+ },
1560
+ "api-origin": {
1561
+ "hidden": true,
1562
+ "name": "api-origin",
1563
+ "required": false,
1564
+ "hasDynamicHelp": false,
1565
+ "multiple": false,
1566
+ "type": "option"
1567
+ },
1568
+ "environment": {
1569
+ "name": "environment",
1570
+ "summary": "The environment to use.",
1571
+ "default": "development",
1572
+ "hasDynamicHelp": false,
1573
+ "multiple": false,
1574
+ "type": "option"
1575
+ },
1576
+ "branch": {
1577
+ "name": "branch",
1578
+ "summary": "The slug of the branch to use.",
1579
+ "hasDynamicHelp": false,
1580
+ "multiple": false,
1581
+ "type": "option"
1582
+ },
1583
+ "all": {
1584
+ "name": "all",
1585
+ "summary": "Whether to pull all guides from the specified environment.",
1586
+ "allowNo": false,
1587
+ "type": "boolean"
1588
+ },
1589
+ "guides-dir": {
1590
+ "dependsOn": [
1591
+ "all"
1592
+ ],
1593
+ "name": "guides-dir",
1594
+ "summary": "The target directory path to pull all guides into.",
1595
+ "hasDynamicHelp": false,
1596
+ "multiple": false,
1597
+ "type": "option"
1598
+ },
1599
+ "hide-uncommitted-changes": {
1600
+ "name": "hide-uncommitted-changes",
1601
+ "summary": "Hide any uncommitted changes.",
1602
+ "allowNo": false,
1603
+ "type": "boolean"
1604
+ },
1605
+ "force": {
1606
+ "name": "force",
1607
+ "summary": "Remove the confirmation prompt.",
1608
+ "allowNo": false,
1609
+ "type": "boolean"
1610
+ }
1611
+ },
1612
+ "hasDynamicHelp": false,
1613
+ "hiddenAliases": [],
1614
+ "id": "guide:pull",
1615
+ "pluginAlias": "@knocklabs/cli",
1616
+ "pluginName": "@knocklabs/cli",
1617
+ "pluginType": "core",
1618
+ "strict": true,
1619
+ "summary": "Pull one or more guides from an environment into a local file system.",
1620
+ "enableJsonFlag": false,
1621
+ "isESM": false,
1622
+ "relativePath": [
1623
+ "dist",
1624
+ "commands",
1625
+ "guide",
1626
+ "pull.js"
1627
+ ]
1628
+ },
1629
+ "guide:push": {
1630
+ "aliases": [],
1631
+ "args": {
1632
+ "guideKey": {
1633
+ "name": "guideKey",
1634
+ "required": false
1635
+ }
1636
+ },
1637
+ "flags": {
1638
+ "service-token": {
1639
+ "env": "KNOCK_SERVICE_TOKEN",
1640
+ "name": "service-token",
1641
+ "required": false,
1642
+ "summary": "The service token to authenticate with.",
1643
+ "hasDynamicHelp": false,
1644
+ "multiple": false,
1645
+ "type": "option"
1646
+ },
1647
+ "api-origin": {
1648
+ "hidden": true,
1649
+ "name": "api-origin",
1650
+ "required": false,
1651
+ "hasDynamicHelp": false,
1652
+ "multiple": false,
1653
+ "type": "option"
1654
+ },
1655
+ "environment": {
1656
+ "name": "environment",
1657
+ "summary": "The environment to push the guide to. Defaults to development.",
1658
+ "default": "development",
1659
+ "hasDynamicHelp": false,
1660
+ "multiple": false,
1661
+ "type": "option"
1662
+ },
1663
+ "branch": {
1664
+ "name": "branch",
1665
+ "summary": "The slug of the branch to use.",
1666
+ "hasDynamicHelp": false,
1667
+ "multiple": false,
1668
+ "type": "option"
1669
+ },
1670
+ "all": {
1671
+ "name": "all",
1672
+ "summary": "Whether to push all guides from the target directory.",
1673
+ "allowNo": false,
1674
+ "type": "boolean"
1675
+ },
1676
+ "guides-dir": {
1677
+ "dependsOn": [
1678
+ "all"
1679
+ ],
1680
+ "name": "guides-dir",
1681
+ "summary": "The target directory path to find all guides to push.",
1682
+ "hasDynamicHelp": false,
1683
+ "multiple": false,
1684
+ "type": "option"
1685
+ },
1686
+ "commit": {
1687
+ "name": "commit",
1688
+ "summary": "Push and commit the guide(s) at the same time",
1689
+ "allowNo": false,
1690
+ "type": "boolean"
1691
+ },
1692
+ "commit-message": {
1693
+ "char": "m",
1694
+ "dependsOn": [
1695
+ "commit"
1696
+ ],
1351
1697
  "name": "commit-message",
1352
1698
  "summary": "Use the given value as the commit message",
1353
1699
  "hasDynamicHelp": false,
@@ -1607,14 +1953,9 @@
1607
1953
  "list.js"
1608
1954
  ]
1609
1955
  },
1610
- "layout:pull": {
1956
+ "layout:new": {
1611
1957
  "aliases": [],
1612
- "args": {
1613
- "emailLayoutKey": {
1614
- "name": "emailLayoutKey",
1615
- "required": false
1616
- }
1617
- },
1958
+ "args": {},
1618
1959
  "flags": {
1619
1960
  "service-token": {
1620
1961
  "env": "KNOCK_SERVICE_TOKEN",
@@ -1633,9 +1974,25 @@
1633
1974
  "multiple": false,
1634
1975
  "type": "option"
1635
1976
  },
1977
+ "name": {
1978
+ "char": "n",
1979
+ "name": "name",
1980
+ "summary": "The name of the email layout",
1981
+ "hasDynamicHelp": false,
1982
+ "multiple": false,
1983
+ "type": "option"
1984
+ },
1985
+ "key": {
1986
+ "char": "k",
1987
+ "name": "key",
1988
+ "summary": "The key of the email layout",
1989
+ "hasDynamicHelp": false,
1990
+ "multiple": false,
1991
+ "type": "option"
1992
+ },
1636
1993
  "environment": {
1637
1994
  "name": "environment",
1638
- "summary": "The environment to use.",
1995
+ "summary": "The environment to create the email layout in. Defaults to development.",
1639
1996
  "default": "development",
1640
1997
  "hasDynamicHelp": false,
1641
1998
  "multiple": false,
@@ -1648,61 +2005,50 @@
1648
2005
  "multiple": false,
1649
2006
  "type": "option"
1650
2007
  },
1651
- "all": {
1652
- "name": "all",
1653
- "summary": "Whether to pull all email layouts from the specified environment.",
2008
+ "force": {
2009
+ "name": "force",
2010
+ "summary": "Force the creation of the email layout directory without confirmation.",
1654
2011
  "allowNo": false,
1655
2012
  "type": "boolean"
1656
2013
  },
1657
- "layouts-dir": {
1658
- "aliases": [
1659
- "email-layouts-dir"
1660
- ],
1661
- "dependsOn": [
1662
- "all"
1663
- ],
1664
- "name": "layouts-dir",
1665
- "summary": "The target directory path to pull all email layouts into.",
1666
- "hasDynamicHelp": false,
1667
- "multiple": false,
1668
- "type": "option"
1669
- },
1670
- "hide-uncommitted-changes": {
1671
- "name": "hide-uncommitted-changes",
1672
- "summary": "Hide any uncommitted changes.",
2014
+ "push": {
2015
+ "char": "p",
2016
+ "name": "push",
2017
+ "summary": "Whether or not to push the email layout to Knock after creation.",
1673
2018
  "allowNo": false,
1674
2019
  "type": "boolean"
1675
2020
  },
1676
- "force": {
1677
- "name": "force",
1678
- "summary": "Remove the confirmation prompt.",
1679
- "allowNo": false,
1680
- "type": "boolean"
2021
+ "template": {
2022
+ "name": "template",
2023
+ "summary": "The template to use for the email layout. Should be `email-layouts/{key}`.",
2024
+ "hasDynamicHelp": false,
2025
+ "multiple": false,
2026
+ "type": "option"
1681
2027
  }
1682
2028
  },
1683
2029
  "hasDynamicHelp": false,
1684
2030
  "hiddenAliases": [],
1685
- "id": "layout:pull",
2031
+ "id": "layout:new",
1686
2032
  "pluginAlias": "@knocklabs/cli",
1687
2033
  "pluginName": "@knocklabs/cli",
1688
2034
  "pluginType": "core",
1689
2035
  "strict": true,
1690
- "summary": "Pull one or more email layouts from an environment into a local file system.",
2036
+ "summary": "Create a new email layout with a minimal configuration.",
1691
2037
  "enableJsonFlag": false,
1692
2038
  "isESM": false,
1693
2039
  "relativePath": [
1694
2040
  "dist",
1695
2041
  "commands",
1696
2042
  "layout",
1697
- "pull.js"
2043
+ "new.js"
1698
2044
  ]
1699
2045
  },
1700
- "layout:push": {
2046
+ "layout:open": {
1701
2047
  "aliases": [],
1702
2048
  "args": {
1703
- "emailLayoutKey": {
1704
- "name": "emailLayoutKey",
1705
- "required": false
2049
+ "layoutKey": {
2050
+ "name": "layoutKey",
2051
+ "required": true
1706
2052
  }
1707
2053
  },
1708
2054
  "flags": {
@@ -1725,13 +2071,10 @@
1725
2071
  },
1726
2072
  "environment": {
1727
2073
  "name": "environment",
1728
- "summary": "Pushing an email layout is only allowed in the development environment",
2074
+ "summary": "The environment to use.",
1729
2075
  "default": "development",
1730
2076
  "hasDynamicHelp": false,
1731
2077
  "multiple": false,
1732
- "options": [
1733
- "development"
1734
- ],
1735
2078
  "type": "option"
1736
2079
  },
1737
2080
  "branch": {
@@ -1740,32 +2083,184 @@
1740
2083
  "hasDynamicHelp": false,
1741
2084
  "multiple": false,
1742
2085
  "type": "option"
2086
+ }
2087
+ },
2088
+ "hasDynamicHelp": false,
2089
+ "hiddenAliases": [],
2090
+ "id": "layout:open",
2091
+ "pluginAlias": "@knocklabs/cli",
2092
+ "pluginName": "@knocklabs/cli",
2093
+ "pluginType": "core",
2094
+ "strict": true,
2095
+ "summary": "Open a layout in the Knock dashboard.",
2096
+ "enableJsonFlag": false,
2097
+ "isESM": false,
2098
+ "relativePath": [
2099
+ "dist",
2100
+ "commands",
2101
+ "layout",
2102
+ "open.js"
2103
+ ]
2104
+ },
2105
+ "layout:pull": {
2106
+ "aliases": [],
2107
+ "args": {
2108
+ "emailLayoutKey": {
2109
+ "name": "emailLayoutKey",
2110
+ "required": false
2111
+ }
2112
+ },
2113
+ "flags": {
2114
+ "service-token": {
2115
+ "env": "KNOCK_SERVICE_TOKEN",
2116
+ "name": "service-token",
2117
+ "required": false,
2118
+ "summary": "The service token to authenticate with.",
2119
+ "hasDynamicHelp": false,
2120
+ "multiple": false,
2121
+ "type": "option"
2122
+ },
2123
+ "api-origin": {
2124
+ "hidden": true,
2125
+ "name": "api-origin",
2126
+ "required": false,
2127
+ "hasDynamicHelp": false,
2128
+ "multiple": false,
2129
+ "type": "option"
2130
+ },
2131
+ "environment": {
2132
+ "name": "environment",
2133
+ "summary": "The environment to use.",
2134
+ "default": "development",
2135
+ "hasDynamicHelp": false,
2136
+ "multiple": false,
2137
+ "type": "option"
2138
+ },
2139
+ "branch": {
2140
+ "name": "branch",
2141
+ "summary": "The slug of the branch to use.",
2142
+ "hasDynamicHelp": false,
2143
+ "multiple": false,
2144
+ "type": "option"
2145
+ },
2146
+ "all": {
2147
+ "name": "all",
2148
+ "summary": "Whether to pull all email layouts from the specified environment.",
2149
+ "allowNo": false,
2150
+ "type": "boolean"
2151
+ },
2152
+ "layouts-dir": {
2153
+ "aliases": [
2154
+ "email-layouts-dir"
2155
+ ],
2156
+ "dependsOn": [
2157
+ "all"
2158
+ ],
2159
+ "name": "layouts-dir",
2160
+ "summary": "The target directory path to pull all email layouts into.",
2161
+ "hasDynamicHelp": false,
2162
+ "multiple": false,
2163
+ "type": "option"
2164
+ },
2165
+ "hide-uncommitted-changes": {
2166
+ "name": "hide-uncommitted-changes",
2167
+ "summary": "Hide any uncommitted changes.",
2168
+ "allowNo": false,
2169
+ "type": "boolean"
2170
+ },
2171
+ "force": {
2172
+ "name": "force",
2173
+ "summary": "Remove the confirmation prompt.",
2174
+ "allowNo": false,
2175
+ "type": "boolean"
2176
+ }
2177
+ },
2178
+ "hasDynamicHelp": false,
2179
+ "hiddenAliases": [],
2180
+ "id": "layout:pull",
2181
+ "pluginAlias": "@knocklabs/cli",
2182
+ "pluginName": "@knocklabs/cli",
2183
+ "pluginType": "core",
2184
+ "strict": true,
2185
+ "summary": "Pull one or more email layouts from an environment into a local file system.",
2186
+ "enableJsonFlag": false,
2187
+ "isESM": false,
2188
+ "relativePath": [
2189
+ "dist",
2190
+ "commands",
2191
+ "layout",
2192
+ "pull.js"
2193
+ ]
2194
+ },
2195
+ "layout:push": {
2196
+ "aliases": [],
2197
+ "args": {
2198
+ "emailLayoutKey": {
2199
+ "name": "emailLayoutKey",
2200
+ "required": false
2201
+ }
2202
+ },
2203
+ "flags": {
2204
+ "service-token": {
2205
+ "env": "KNOCK_SERVICE_TOKEN",
2206
+ "name": "service-token",
2207
+ "required": false,
2208
+ "summary": "The service token to authenticate with.",
2209
+ "hasDynamicHelp": false,
2210
+ "multiple": false,
2211
+ "type": "option"
2212
+ },
2213
+ "api-origin": {
2214
+ "hidden": true,
2215
+ "name": "api-origin",
2216
+ "required": false,
2217
+ "hasDynamicHelp": false,
2218
+ "multiple": false,
2219
+ "type": "option"
2220
+ },
2221
+ "environment": {
2222
+ "name": "environment",
2223
+ "summary": "Pushing an email layout is only allowed in the development environment",
2224
+ "default": "development",
2225
+ "hasDynamicHelp": false,
2226
+ "multiple": false,
2227
+ "options": [
2228
+ "development"
2229
+ ],
2230
+ "type": "option"
2231
+ },
2232
+ "branch": {
2233
+ "name": "branch",
2234
+ "summary": "The slug of the branch to use.",
2235
+ "hasDynamicHelp": false,
2236
+ "multiple": false,
2237
+ "type": "option"
2238
+ },
2239
+ "all": {
2240
+ "name": "all",
2241
+ "summary": "Whether to push all layouts from the target directory.",
2242
+ "allowNo": false,
2243
+ "type": "boolean"
2244
+ },
2245
+ "layouts-dir": {
2246
+ "aliases": [
2247
+ "email-layouts-dir"
2248
+ ],
2249
+ "dependsOn": [
2250
+ "all"
2251
+ ],
2252
+ "name": "layouts-dir",
2253
+ "summary": "The target directory path to find all layouts to push.",
2254
+ "hasDynamicHelp": false,
2255
+ "multiple": false,
2256
+ "type": "option"
2257
+ },
2258
+ "commit": {
2259
+ "name": "commit",
2260
+ "summary": "Push and commit the layout(s) at the same time",
2261
+ "allowNo": false,
2262
+ "type": "boolean"
1743
2263
  },
1744
- "all": {
1745
- "name": "all",
1746
- "summary": "Whether to push all layouts from the target directory.",
1747
- "allowNo": false,
1748
- "type": "boolean"
1749
- },
1750
- "layouts-dir": {
1751
- "aliases": [
1752
- "email-layouts-dir"
1753
- ],
1754
- "dependsOn": [
1755
- "all"
1756
- ],
1757
- "name": "layouts-dir",
1758
- "summary": "The target directory path to find all layouts to push.",
1759
- "hasDynamicHelp": false,
1760
- "multiple": false,
1761
- "type": "option"
1762
- },
1763
- "commit": {
1764
- "name": "commit",
1765
- "summary": "Push and commit the layout(s) at the same time",
1766
- "allowNo": false,
1767
- "type": "boolean"
1768
- },
1769
2264
  "commit-message": {
1770
2265
  "char": "m",
1771
2266
  "dependsOn": [
@@ -2036,14 +2531,9 @@
2036
2531
  "list.js"
2037
2532
  ]
2038
2533
  },
2039
- "message-type:pull": {
2534
+ "message-type:new": {
2040
2535
  "aliases": [],
2041
- "args": {
2042
- "messageTypeKey": {
2043
- "name": "messageTypeKey",
2044
- "required": false
2045
- }
2046
- },
2536
+ "args": {},
2047
2537
  "flags": {
2048
2538
  "service-token": {
2049
2539
  "env": "KNOCK_SERVICE_TOKEN",
@@ -2062,9 +2552,25 @@
2062
2552
  "multiple": false,
2063
2553
  "type": "option"
2064
2554
  },
2555
+ "name": {
2556
+ "char": "n",
2557
+ "name": "name",
2558
+ "summary": "The name of the message type",
2559
+ "hasDynamicHelp": false,
2560
+ "multiple": false,
2561
+ "type": "option"
2562
+ },
2563
+ "key": {
2564
+ "char": "k",
2565
+ "name": "key",
2566
+ "summary": "The key of the message type",
2567
+ "hasDynamicHelp": false,
2568
+ "multiple": false,
2569
+ "type": "option"
2570
+ },
2065
2571
  "environment": {
2066
2572
  "name": "environment",
2067
- "summary": "The environment to use.",
2573
+ "summary": "The environment to create the message type in. Defaults to development.",
2068
2574
  "default": "development",
2069
2575
  "hasDynamicHelp": false,
2070
2576
  "multiple": false,
@@ -2077,58 +2583,50 @@
2077
2583
  "multiple": false,
2078
2584
  "type": "option"
2079
2585
  },
2080
- "all": {
2081
- "name": "all",
2082
- "summary": "Whether to pull all in-app message types from the specified environment.",
2586
+ "force": {
2587
+ "name": "force",
2588
+ "summary": "Force the creation of the message type directory without confirmation.",
2083
2589
  "allowNo": false,
2084
2590
  "type": "boolean"
2085
2591
  },
2086
- "message-types-dir": {
2087
- "dependsOn": [
2088
- "all"
2089
- ],
2090
- "name": "message-types-dir",
2091
- "summary": "The target directory path to pull all in-app message types into.",
2092
- "hasDynamicHelp": false,
2093
- "multiple": false,
2094
- "type": "option"
2095
- },
2096
- "hide-uncommitted-changes": {
2097
- "name": "hide-uncommitted-changes",
2098
- "summary": "Hide any uncommitted changes.",
2592
+ "push": {
2593
+ "char": "p",
2594
+ "name": "push",
2595
+ "summary": "Whether or not to push the message type to Knock after creation.",
2099
2596
  "allowNo": false,
2100
2597
  "type": "boolean"
2101
2598
  },
2102
- "force": {
2103
- "name": "force",
2104
- "summary": "Remove the confirmation prompt.",
2105
- "allowNo": false,
2106
- "type": "boolean"
2599
+ "template": {
2600
+ "name": "template",
2601
+ "summary": "The template to use for the message type. Should be `message-types/{key}`.",
2602
+ "hasDynamicHelp": false,
2603
+ "multiple": false,
2604
+ "type": "option"
2107
2605
  }
2108
2606
  },
2109
2607
  "hasDynamicHelp": false,
2110
2608
  "hiddenAliases": [],
2111
- "id": "message-type:pull",
2609
+ "id": "message-type:new",
2112
2610
  "pluginAlias": "@knocklabs/cli",
2113
2611
  "pluginName": "@knocklabs/cli",
2114
2612
  "pluginType": "core",
2115
2613
  "strict": true,
2116
- "summary": "Pull one or more in-app message types from an environment into a local file system.",
2614
+ "summary": "Create a new message type with a minimal configuration.",
2117
2615
  "enableJsonFlag": false,
2118
2616
  "isESM": false,
2119
2617
  "relativePath": [
2120
2618
  "dist",
2121
2619
  "commands",
2122
2620
  "message-type",
2123
- "pull.js"
2621
+ "new.js"
2124
2622
  ]
2125
2623
  },
2126
- "message-type:push": {
2624
+ "message-type:open": {
2127
2625
  "aliases": [],
2128
2626
  "args": {
2129
2627
  "messageTypeKey": {
2130
2628
  "name": "messageTypeKey",
2131
- "required": false
2629
+ "required": true
2132
2630
  }
2133
2631
  },
2134
2632
  "flags": {
@@ -2151,13 +2649,10 @@
2151
2649
  },
2152
2650
  "environment": {
2153
2651
  "name": "environment",
2154
- "summary": "Pushing a message type is only allowed in the development environment",
2652
+ "summary": "The environment to use.",
2155
2653
  "default": "development",
2156
2654
  "hasDynamicHelp": false,
2157
2655
  "multiple": false,
2158
- "options": [
2159
- "development"
2160
- ],
2161
2656
  "type": "option"
2162
2657
  },
2163
2658
  "branch": {
@@ -2166,33 +2661,182 @@
2166
2661
  "hasDynamicHelp": false,
2167
2662
  "multiple": false,
2168
2663
  "type": "option"
2169
- },
2170
- "all": {
2171
- "name": "all",
2172
- "summary": "Whether to push all message types from the target directory.",
2173
- "allowNo": false,
2174
- "type": "boolean"
2175
- },
2176
- "message-types-dir": {
2177
- "dependsOn": [
2178
- "all"
2179
- ],
2180
- "name": "message-types-dir",
2181
- "summary": "The target directory path to find all message types to push.",
2182
- "hasDynamicHelp": false,
2183
- "multiple": false,
2184
- "type": "option"
2185
- },
2186
- "commit": {
2187
- "name": "commit",
2188
- "summary": "Push and commit the message type(s) at the same time",
2189
- "allowNo": false,
2190
- "type": "boolean"
2191
- },
2192
- "commit-message": {
2193
- "char": "m",
2194
- "dependsOn": [
2195
- "commit"
2664
+ }
2665
+ },
2666
+ "hasDynamicHelp": false,
2667
+ "hiddenAliases": [],
2668
+ "id": "message-type:open",
2669
+ "pluginAlias": "@knocklabs/cli",
2670
+ "pluginName": "@knocklabs/cli",
2671
+ "pluginType": "core",
2672
+ "strict": true,
2673
+ "summary": "Open a message type in the Knock dashboard.",
2674
+ "enableJsonFlag": false,
2675
+ "isESM": false,
2676
+ "relativePath": [
2677
+ "dist",
2678
+ "commands",
2679
+ "message-type",
2680
+ "open.js"
2681
+ ]
2682
+ },
2683
+ "message-type:pull": {
2684
+ "aliases": [],
2685
+ "args": {
2686
+ "messageTypeKey": {
2687
+ "name": "messageTypeKey",
2688
+ "required": false
2689
+ }
2690
+ },
2691
+ "flags": {
2692
+ "service-token": {
2693
+ "env": "KNOCK_SERVICE_TOKEN",
2694
+ "name": "service-token",
2695
+ "required": false,
2696
+ "summary": "The service token to authenticate with.",
2697
+ "hasDynamicHelp": false,
2698
+ "multiple": false,
2699
+ "type": "option"
2700
+ },
2701
+ "api-origin": {
2702
+ "hidden": true,
2703
+ "name": "api-origin",
2704
+ "required": false,
2705
+ "hasDynamicHelp": false,
2706
+ "multiple": false,
2707
+ "type": "option"
2708
+ },
2709
+ "environment": {
2710
+ "name": "environment",
2711
+ "summary": "The environment to use.",
2712
+ "default": "development",
2713
+ "hasDynamicHelp": false,
2714
+ "multiple": false,
2715
+ "type": "option"
2716
+ },
2717
+ "branch": {
2718
+ "name": "branch",
2719
+ "summary": "The slug of the branch to use.",
2720
+ "hasDynamicHelp": false,
2721
+ "multiple": false,
2722
+ "type": "option"
2723
+ },
2724
+ "all": {
2725
+ "name": "all",
2726
+ "summary": "Whether to pull all in-app message types from the specified environment.",
2727
+ "allowNo": false,
2728
+ "type": "boolean"
2729
+ },
2730
+ "message-types-dir": {
2731
+ "dependsOn": [
2732
+ "all"
2733
+ ],
2734
+ "name": "message-types-dir",
2735
+ "summary": "The target directory path to pull all in-app message types into.",
2736
+ "hasDynamicHelp": false,
2737
+ "multiple": false,
2738
+ "type": "option"
2739
+ },
2740
+ "hide-uncommitted-changes": {
2741
+ "name": "hide-uncommitted-changes",
2742
+ "summary": "Hide any uncommitted changes.",
2743
+ "allowNo": false,
2744
+ "type": "boolean"
2745
+ },
2746
+ "force": {
2747
+ "name": "force",
2748
+ "summary": "Remove the confirmation prompt.",
2749
+ "allowNo": false,
2750
+ "type": "boolean"
2751
+ }
2752
+ },
2753
+ "hasDynamicHelp": false,
2754
+ "hiddenAliases": [],
2755
+ "id": "message-type:pull",
2756
+ "pluginAlias": "@knocklabs/cli",
2757
+ "pluginName": "@knocklabs/cli",
2758
+ "pluginType": "core",
2759
+ "strict": true,
2760
+ "summary": "Pull one or more in-app message types from an environment into a local file system.",
2761
+ "enableJsonFlag": false,
2762
+ "isESM": false,
2763
+ "relativePath": [
2764
+ "dist",
2765
+ "commands",
2766
+ "message-type",
2767
+ "pull.js"
2768
+ ]
2769
+ },
2770
+ "message-type:push": {
2771
+ "aliases": [],
2772
+ "args": {
2773
+ "messageTypeKey": {
2774
+ "name": "messageTypeKey",
2775
+ "required": false
2776
+ }
2777
+ },
2778
+ "flags": {
2779
+ "service-token": {
2780
+ "env": "KNOCK_SERVICE_TOKEN",
2781
+ "name": "service-token",
2782
+ "required": false,
2783
+ "summary": "The service token to authenticate with.",
2784
+ "hasDynamicHelp": false,
2785
+ "multiple": false,
2786
+ "type": "option"
2787
+ },
2788
+ "api-origin": {
2789
+ "hidden": true,
2790
+ "name": "api-origin",
2791
+ "required": false,
2792
+ "hasDynamicHelp": false,
2793
+ "multiple": false,
2794
+ "type": "option"
2795
+ },
2796
+ "environment": {
2797
+ "name": "environment",
2798
+ "summary": "Pushing a message type is only allowed in the development environment",
2799
+ "default": "development",
2800
+ "hasDynamicHelp": false,
2801
+ "multiple": false,
2802
+ "options": [
2803
+ "development"
2804
+ ],
2805
+ "type": "option"
2806
+ },
2807
+ "branch": {
2808
+ "name": "branch",
2809
+ "summary": "The slug of the branch to use.",
2810
+ "hasDynamicHelp": false,
2811
+ "multiple": false,
2812
+ "type": "option"
2813
+ },
2814
+ "all": {
2815
+ "name": "all",
2816
+ "summary": "Whether to push all message types from the target directory.",
2817
+ "allowNo": false,
2818
+ "type": "boolean"
2819
+ },
2820
+ "message-types-dir": {
2821
+ "dependsOn": [
2822
+ "all"
2823
+ ],
2824
+ "name": "message-types-dir",
2825
+ "summary": "The target directory path to find all message types to push.",
2826
+ "hasDynamicHelp": false,
2827
+ "multiple": false,
2828
+ "type": "option"
2829
+ },
2830
+ "commit": {
2831
+ "name": "commit",
2832
+ "summary": "Push and commit the message type(s) at the same time",
2833
+ "allowNo": false,
2834
+ "type": "boolean"
2835
+ },
2836
+ "commit-message": {
2837
+ "char": "m",
2838
+ "dependsOn": [
2839
+ "commit"
2196
2840
  ],
2197
2841
  "name": "commit-message",
2198
2842
  "summary": "Use the given value as the commit message",
@@ -2456,14 +3100,9 @@
2456
3100
  "list.js"
2457
3101
  ]
2458
3102
  },
2459
- "partial:pull": {
3103
+ "partial:new": {
2460
3104
  "aliases": [],
2461
- "args": {
2462
- "partialKey": {
2463
- "name": "partialKey",
2464
- "required": false
2465
- }
2466
- },
3105
+ "args": {},
2467
3106
  "flags": {
2468
3107
  "service-token": {
2469
3108
  "env": "KNOCK_SERVICE_TOKEN",
@@ -2482,9 +3121,39 @@
2482
3121
  "multiple": false,
2483
3122
  "type": "option"
2484
3123
  },
3124
+ "name": {
3125
+ "char": "n",
3126
+ "name": "name",
3127
+ "summary": "The name of the partial",
3128
+ "hasDynamicHelp": false,
3129
+ "multiple": false,
3130
+ "type": "option"
3131
+ },
3132
+ "key": {
3133
+ "char": "k",
3134
+ "name": "key",
3135
+ "summary": "The key of the partial",
3136
+ "hasDynamicHelp": false,
3137
+ "multiple": false,
3138
+ "type": "option"
3139
+ },
3140
+ "type": {
3141
+ "char": "t",
3142
+ "name": "type",
3143
+ "summary": "The type of the partial (html, json, markdown, text). You cannot use this flag with --template.",
3144
+ "hasDynamicHelp": false,
3145
+ "multiple": false,
3146
+ "options": [
3147
+ "html",
3148
+ "json",
3149
+ "markdown",
3150
+ "text"
3151
+ ],
3152
+ "type": "option"
3153
+ },
2485
3154
  "environment": {
2486
3155
  "name": "environment",
2487
- "summary": "The environment to use.",
3156
+ "summary": "The environment to create the partial in. Defaults to development.",
2488
3157
  "default": "development",
2489
3158
  "hasDynamicHelp": false,
2490
3159
  "multiple": false,
@@ -2497,58 +3166,50 @@
2497
3166
  "multiple": false,
2498
3167
  "type": "option"
2499
3168
  },
2500
- "all": {
2501
- "name": "all",
2502
- "summary": "Whether to pull all partials from the specified environment.",
3169
+ "force": {
3170
+ "name": "force",
3171
+ "summary": "Force the creation of the partial directory without confirmation.",
2503
3172
  "allowNo": false,
2504
3173
  "type": "boolean"
2505
3174
  },
2506
- "partials-dir": {
2507
- "dependsOn": [
2508
- "all"
2509
- ],
2510
- "name": "partials-dir",
2511
- "summary": "The target directory path to pull all partials into.",
2512
- "hasDynamicHelp": false,
2513
- "multiple": false,
2514
- "type": "option"
2515
- },
2516
- "hide-uncommitted-changes": {
2517
- "name": "hide-uncommitted-changes",
2518
- "summary": "Hide any uncommitted changes.",
3175
+ "push": {
3176
+ "char": "p",
3177
+ "name": "push",
3178
+ "summary": "Whether or not to push the partial to Knock after creation.",
2519
3179
  "allowNo": false,
2520
3180
  "type": "boolean"
2521
3181
  },
2522
- "force": {
2523
- "name": "force",
2524
- "summary": "Remove the confirmation prompt.",
2525
- "allowNo": false,
2526
- "type": "boolean"
3182
+ "template": {
3183
+ "name": "template",
3184
+ "summary": "The template to use for the partial. Should be `partials/{key}`. You cannot use this flag with --type.",
3185
+ "hasDynamicHelp": false,
3186
+ "multiple": false,
3187
+ "type": "option"
2527
3188
  }
2528
3189
  },
2529
3190
  "hasDynamicHelp": false,
2530
3191
  "hiddenAliases": [],
2531
- "id": "partial:pull",
3192
+ "id": "partial:new",
2532
3193
  "pluginAlias": "@knocklabs/cli",
2533
3194
  "pluginName": "@knocklabs/cli",
2534
3195
  "pluginType": "core",
2535
3196
  "strict": true,
2536
- "summary": "Pull one or more partial from an environment into a local file system.",
3197
+ "summary": "Create a new partial with a minimal configuration.",
2537
3198
  "enableJsonFlag": false,
2538
3199
  "isESM": false,
2539
3200
  "relativePath": [
2540
3201
  "dist",
2541
3202
  "commands",
2542
3203
  "partial",
2543
- "pull.js"
3204
+ "new.js"
2544
3205
  ]
2545
3206
  },
2546
- "partial:push": {
3207
+ "partial:open": {
2547
3208
  "aliases": [],
2548
3209
  "args": {
2549
3210
  "partialKey": {
2550
3211
  "name": "partialKey",
2551
- "required": false
3212
+ "required": true
2552
3213
  }
2553
3214
  },
2554
3215
  "flags": {
@@ -2571,13 +3232,10 @@
2571
3232
  },
2572
3233
  "environment": {
2573
3234
  "name": "environment",
2574
- "summary": "Pushing a partial is only allowed in the development environment",
3235
+ "summary": "The environment to use.",
2575
3236
  "default": "development",
2576
3237
  "hasDynamicHelp": false,
2577
3238
  "multiple": false,
2578
- "options": [
2579
- "development"
2580
- ],
2581
3239
  "type": "option"
2582
3240
  },
2583
3241
  "branch": {
@@ -2586,59 +3244,26 @@
2586
3244
  "hasDynamicHelp": false,
2587
3245
  "multiple": false,
2588
3246
  "type": "option"
2589
- },
2590
- "all": {
2591
- "name": "all",
2592
- "summary": "Whether to push all partials from the target directory.",
2593
- "allowNo": false,
2594
- "type": "boolean"
2595
- },
2596
- "partials-dir": {
2597
- "dependsOn": [
2598
- "all"
2599
- ],
2600
- "name": "partials-dir",
2601
- "summary": "The target directory path to find all partials to push.",
2602
- "hasDynamicHelp": false,
2603
- "multiple": false,
2604
- "type": "option"
2605
- },
2606
- "commit": {
2607
- "name": "commit",
2608
- "summary": "Push and commit the partial(s) at the same time",
2609
- "allowNo": false,
2610
- "type": "boolean"
2611
- },
2612
- "commit-message": {
2613
- "char": "m",
2614
- "dependsOn": [
2615
- "commit"
2616
- ],
2617
- "name": "commit-message",
2618
- "summary": "Use the given value as the commit message",
2619
- "hasDynamicHelp": false,
2620
- "multiple": false,
2621
- "type": "option"
2622
3247
  }
2623
3248
  },
2624
3249
  "hasDynamicHelp": false,
2625
3250
  "hiddenAliases": [],
2626
- "id": "partial:push",
3251
+ "id": "partial:open",
2627
3252
  "pluginAlias": "@knocklabs/cli",
2628
3253
  "pluginName": "@knocklabs/cli",
2629
3254
  "pluginType": "core",
2630
3255
  "strict": true,
2631
- "summary": "Push one or more partials from a local file system to Knock.",
3256
+ "summary": "Open a partial in the Knock dashboard.",
2632
3257
  "enableJsonFlag": false,
2633
3258
  "isESM": false,
2634
3259
  "relativePath": [
2635
3260
  "dist",
2636
3261
  "commands",
2637
3262
  "partial",
2638
- "push.js"
3263
+ "open.js"
2639
3264
  ]
2640
3265
  },
2641
- "partial:validate": {
3266
+ "partial:pull": {
2642
3267
  "aliases": [],
2643
3268
  "args": {
2644
3269
  "partialKey": {
@@ -2666,13 +3291,10 @@
2666
3291
  },
2667
3292
  "environment": {
2668
3293
  "name": "environment",
2669
- "summary": "Validating a partial is only done in the development environment",
3294
+ "summary": "The environment to use.",
2670
3295
  "default": "development",
2671
3296
  "hasDynamicHelp": false,
2672
3297
  "multiple": false,
2673
- "options": [
2674
- "development"
2675
- ],
2676
3298
  "type": "option"
2677
3299
  },
2678
3300
  "branch": {
@@ -2684,7 +3306,7 @@
2684
3306
  },
2685
3307
  "all": {
2686
3308
  "name": "all",
2687
- "summary": "Whether to validate all partials from the target directory.",
3309
+ "summary": "Whether to pull all partials from the specified environment.",
2688
3310
  "allowNo": false,
2689
3311
  "type": "boolean"
2690
3312
  },
@@ -2693,38 +3315,49 @@
2693
3315
  "all"
2694
3316
  ],
2695
3317
  "name": "partials-dir",
2696
- "summary": "The target directory path to find all partials to validate.",
3318
+ "summary": "The target directory path to pull all partials into.",
2697
3319
  "hasDynamicHelp": false,
2698
3320
  "multiple": false,
2699
3321
  "type": "option"
3322
+ },
3323
+ "hide-uncommitted-changes": {
3324
+ "name": "hide-uncommitted-changes",
3325
+ "summary": "Hide any uncommitted changes.",
3326
+ "allowNo": false,
3327
+ "type": "boolean"
3328
+ },
3329
+ "force": {
3330
+ "name": "force",
3331
+ "summary": "Remove the confirmation prompt.",
3332
+ "allowNo": false,
3333
+ "type": "boolean"
2700
3334
  }
2701
3335
  },
2702
3336
  "hasDynamicHelp": false,
2703
3337
  "hiddenAliases": [],
2704
- "id": "partial:validate",
3338
+ "id": "partial:pull",
2705
3339
  "pluginAlias": "@knocklabs/cli",
2706
3340
  "pluginName": "@knocklabs/cli",
2707
3341
  "pluginType": "core",
2708
3342
  "strict": true,
2709
- "summary": "Validate one or more partials from a local file system.",
3343
+ "summary": "Pull one or more partial from an environment into a local file system.",
2710
3344
  "enableJsonFlag": false,
2711
3345
  "isESM": false,
2712
3346
  "relativePath": [
2713
3347
  "dist",
2714
3348
  "commands",
2715
3349
  "partial",
2716
- "validate.js"
3350
+ "pull.js"
2717
3351
  ]
2718
3352
  },
2719
- "workflow:activate": {
3353
+ "partial:push": {
2720
3354
  "aliases": [],
2721
3355
  "args": {
2722
- "workflowKey": {
2723
- "name": "workflowKey",
2724
- "required": true
3356
+ "partialKey": {
3357
+ "name": "partialKey",
3358
+ "required": false
2725
3359
  }
2726
3360
  },
2727
- "description": "This immediately enables or disables a workflow in a given environment without\nneeding to go through environment promotion.\n\nBy default, this command activates a given workflow. Pass in the --status flag\nwith `false` in order to deactivate it.",
2728
3361
  "flags": {
2729
3362
  "service-token": {
2730
3363
  "env": "KNOCK_SERVICE_TOKEN",
@@ -2745,10 +3378,13 @@
2745
3378
  },
2746
3379
  "environment": {
2747
3380
  "name": "environment",
2748
- "required": true,
2749
- "summary": "The environment to use.",
3381
+ "summary": "Pushing a partial is only allowed in the development environment",
3382
+ "default": "development",
2750
3383
  "hasDynamicHelp": false,
2751
3384
  "multiple": false,
3385
+ "options": [
3386
+ "development"
3387
+ ],
2752
3388
  "type": "option"
2753
3389
  },
2754
3390
  "branch": {
@@ -2758,46 +3394,65 @@
2758
3394
  "multiple": false,
2759
3395
  "type": "option"
2760
3396
  },
2761
- "status": {
2762
- "name": "status",
2763
- "summary": "The workflow active status to set.",
2764
- "default": true,
3397
+ "all": {
3398
+ "name": "all",
3399
+ "summary": "Whether to push all partials from the target directory.",
3400
+ "allowNo": false,
3401
+ "type": "boolean"
3402
+ },
3403
+ "partials-dir": {
3404
+ "dependsOn": [
3405
+ "all"
3406
+ ],
3407
+ "name": "partials-dir",
3408
+ "summary": "The target directory path to find all partials to push.",
2765
3409
  "hasDynamicHelp": false,
2766
3410
  "multiple": false,
2767
- "options": [
2768
- "true",
2769
- "false"
2770
- ],
2771
3411
  "type": "option"
2772
3412
  },
2773
- "force": {
2774
- "name": "force",
2775
- "summary": "Remove the confirmation prompt.",
3413
+ "commit": {
3414
+ "name": "commit",
3415
+ "summary": "Push and commit the partial(s) at the same time",
2776
3416
  "allowNo": false,
2777
3417
  "type": "boolean"
3418
+ },
3419
+ "commit-message": {
3420
+ "char": "m",
3421
+ "dependsOn": [
3422
+ "commit"
3423
+ ],
3424
+ "name": "commit-message",
3425
+ "summary": "Use the given value as the commit message",
3426
+ "hasDynamicHelp": false,
3427
+ "multiple": false,
3428
+ "type": "option"
2778
3429
  }
2779
3430
  },
2780
3431
  "hasDynamicHelp": false,
2781
3432
  "hiddenAliases": [],
2782
- "id": "workflow:activate",
3433
+ "id": "partial:push",
2783
3434
  "pluginAlias": "@knocklabs/cli",
2784
3435
  "pluginName": "@knocklabs/cli",
2785
3436
  "pluginType": "core",
2786
3437
  "strict": true,
2787
- "summary": "Activate or deactivate a workflow in a given environment.",
3438
+ "summary": "Push one or more partials from a local file system to Knock.",
2788
3439
  "enableJsonFlag": false,
2789
3440
  "isESM": false,
2790
3441
  "relativePath": [
2791
3442
  "dist",
2792
3443
  "commands",
2793
- "workflow",
2794
- "activate.js"
3444
+ "partial",
3445
+ "push.js"
2795
3446
  ]
2796
3447
  },
2797
- "workflow:generate-types": {
3448
+ "partial:validate": {
2798
3449
  "aliases": [],
2799
- "args": {},
2800
- "description": "Generate types for all workflows in an environment and write them to a file.",
3450
+ "args": {
3451
+ "partialKey": {
3452
+ "name": "partialKey",
3453
+ "required": false
3454
+ }
3455
+ },
2801
3456
  "flags": {
2802
3457
  "service-token": {
2803
3458
  "env": "KNOCK_SERVICE_TOKEN",
@@ -2818,10 +3473,13 @@
2818
3473
  },
2819
3474
  "environment": {
2820
3475
  "name": "environment",
2821
- "summary": "Select the environment to generate types for.",
3476
+ "summary": "Validating a partial is only done in the development environment",
2822
3477
  "default": "development",
2823
3478
  "hasDynamicHelp": false,
2824
3479
  "multiple": false,
3480
+ "options": [
3481
+ "development"
3482
+ ],
2825
3483
  "type": "option"
2826
3484
  },
2827
3485
  "branch": {
@@ -2831,10 +3489,18 @@
2831
3489
  "multiple": false,
2832
3490
  "type": "option"
2833
3491
  },
2834
- "output-file": {
2835
- "name": "output-file",
2836
- "required": true,
2837
- "summary": "The output file to write the generated types to. We currently support .ts, .rb, .go, .py files only. Your file extension will determine the target language for the generated types.",
3492
+ "all": {
3493
+ "name": "all",
3494
+ "summary": "Whether to validate all partials from the target directory.",
3495
+ "allowNo": false,
3496
+ "type": "boolean"
3497
+ },
3498
+ "partials-dir": {
3499
+ "dependsOn": [
3500
+ "all"
3501
+ ],
3502
+ "name": "partials-dir",
3503
+ "summary": "The target directory path to find all partials to validate.",
2838
3504
  "hasDynamicHelp": false,
2839
3505
  "multiple": false,
2840
3506
  "type": "option"
@@ -2842,25 +3508,27 @@
2842
3508
  },
2843
3509
  "hasDynamicHelp": false,
2844
3510
  "hiddenAliases": [],
2845
- "id": "workflow:generate-types",
3511
+ "id": "partial:validate",
2846
3512
  "pluginAlias": "@knocklabs/cli",
2847
3513
  "pluginName": "@knocklabs/cli",
2848
3514
  "pluginType": "core",
2849
3515
  "strict": true,
3516
+ "summary": "Validate one or more partials from a local file system.",
2850
3517
  "enableJsonFlag": false,
2851
3518
  "isESM": false,
2852
3519
  "relativePath": [
2853
3520
  "dist",
2854
3521
  "commands",
2855
- "workflow",
2856
- "generate-types.js"
3522
+ "partial",
3523
+ "validate.js"
2857
3524
  ]
2858
3525
  },
2859
- "workflow:get": {
3526
+ "translation:get": {
2860
3527
  "aliases": [],
2861
3528
  "args": {
2862
- "workflowKey": {
2863
- "name": "workflowKey",
3529
+ "translationRef": {
3530
+ "description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
3531
+ "name": "translationRef",
2864
3532
  "required": true
2865
3533
  }
2866
3534
  },
@@ -2909,26 +3577,39 @@
2909
3577
  "summary": "Hide any uncommitted changes.",
2910
3578
  "allowNo": false,
2911
3579
  "type": "boolean"
3580
+ },
3581
+ "format": {
3582
+ "name": "format",
3583
+ "summary": "Specify the output format of the returned translations.",
3584
+ "default": "json",
3585
+ "hasDynamicHelp": false,
3586
+ "multiple": false,
3587
+ "options": [
3588
+ "json",
3589
+ "po"
3590
+ ],
3591
+ "type": "option"
2912
3592
  }
2913
3593
  },
2914
3594
  "hasDynamicHelp": false,
2915
3595
  "hiddenAliases": [],
2916
- "id": "workflow:get",
3596
+ "id": "translation:get",
2917
3597
  "pluginAlias": "@knocklabs/cli",
2918
3598
  "pluginName": "@knocklabs/cli",
2919
3599
  "pluginType": "core",
2920
3600
  "strict": true,
2921
- "summary": "Display a single workflow from an environment.",
3601
+ "summary": "Display a single translation from an environment.",
2922
3602
  "enableJsonFlag": true,
3603
+ "verifyFeatureEnabled": "translations",
2923
3604
  "isESM": false,
2924
3605
  "relativePath": [
2925
3606
  "dist",
2926
3607
  "commands",
2927
- "workflow",
3608
+ "translation",
2928
3609
  "get.js"
2929
3610
  ]
2930
3611
  },
2931
- "workflow:list": {
3612
+ "translation:list": {
2932
3613
  "aliases": [],
2933
3614
  "args": {},
2934
3615
  "flags": {
@@ -3001,27 +3682,29 @@
3001
3682
  },
3002
3683
  "hasDynamicHelp": false,
3003
3684
  "hiddenAliases": [],
3004
- "id": "workflow:list",
3685
+ "id": "translation:list",
3005
3686
  "pluginAlias": "@knocklabs/cli",
3006
3687
  "pluginName": "@knocklabs/cli",
3007
3688
  "pluginType": "core",
3008
3689
  "strict": true,
3009
- "summary": "Display all workflows for an environment.",
3690
+ "summary": "Display all translations for an environment.",
3010
3691
  "enableJsonFlag": true,
3692
+ "verifyFeatureEnabled": "translations",
3011
3693
  "isESM": false,
3012
3694
  "relativePath": [
3013
3695
  "dist",
3014
3696
  "commands",
3015
- "workflow",
3697
+ "translation",
3016
3698
  "list.js"
3017
3699
  ]
3018
3700
  },
3019
- "workflow:new": {
3701
+ "translation:pull": {
3020
3702
  "aliases": [],
3021
3703
  "args": {
3022
- "workflowKey": {
3023
- "name": "workflowKey",
3024
- "required": true
3704
+ "translationRef": {
3705
+ "description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
3706
+ "name": "translationRef",
3707
+ "required": false
3025
3708
  }
3026
3709
  },
3027
3710
  "flags": {
@@ -3042,51 +3725,86 @@
3042
3725
  "multiple": false,
3043
3726
  "type": "option"
3044
3727
  },
3045
- "steps": {
3046
- "aliases": [
3047
- "step"
3728
+ "environment": {
3729
+ "name": "environment",
3730
+ "summary": "The environment to use.",
3731
+ "default": "development",
3732
+ "hasDynamicHelp": false,
3733
+ "multiple": false,
3734
+ "type": "option"
3735
+ },
3736
+ "branch": {
3737
+ "name": "branch",
3738
+ "summary": "The slug of the branch to use.",
3739
+ "hasDynamicHelp": false,
3740
+ "multiple": false,
3741
+ "type": "option"
3742
+ },
3743
+ "all": {
3744
+ "name": "all",
3745
+ "summary": "Whether to pull all translations from the specified environment.",
3746
+ "allowNo": false,
3747
+ "type": "boolean"
3748
+ },
3749
+ "translations-dir": {
3750
+ "dependsOn": [
3751
+ "all"
3048
3752
  ],
3049
- "name": "steps",
3753
+ "name": "translations-dir",
3754
+ "summary": "The target directory path to pull all translations into.",
3050
3755
  "hasDynamicHelp": false,
3051
3756
  "multiple": false,
3052
3757
  "type": "option"
3053
3758
  },
3759
+ "hide-uncommitted-changes": {
3760
+ "name": "hide-uncommitted-changes",
3761
+ "summary": "Hide any uncommitted changes.",
3762
+ "allowNo": false,
3763
+ "type": "boolean"
3764
+ },
3054
3765
  "force": {
3055
3766
  "name": "force",
3767
+ "summary": "Remove the confirmation prompt.",
3056
3768
  "allowNo": false,
3057
3769
  "type": "boolean"
3058
3770
  },
3059
- "environment": {
3060
- "hidden": true,
3061
- "name": "environment",
3062
- "default": "development",
3771
+ "format": {
3772
+ "name": "format",
3773
+ "summary": "Specify the output format of the returned translations.",
3774
+ "default": "json",
3063
3775
  "hasDynamicHelp": false,
3064
3776
  "multiple": false,
3777
+ "options": [
3778
+ "json",
3779
+ "po"
3780
+ ],
3065
3781
  "type": "option"
3066
3782
  }
3067
3783
  },
3068
3784
  "hasDynamicHelp": false,
3069
- "hidden": true,
3070
3785
  "hiddenAliases": [],
3071
- "id": "workflow:new",
3786
+ "id": "translation:pull",
3072
3787
  "pluginAlias": "@knocklabs/cli",
3073
3788
  "pluginName": "@knocklabs/cli",
3074
3789
  "pluginType": "core",
3075
3790
  "strict": true,
3791
+ "summary": "Pull one or more translations from an environment into a local file system.",
3076
3792
  "enableJsonFlag": false,
3793
+ "verifyFeatureEnabled": "translations",
3077
3794
  "isESM": false,
3078
3795
  "relativePath": [
3079
3796
  "dist",
3080
3797
  "commands",
3081
- "workflow",
3082
- "new.js"
3798
+ "translation",
3799
+ "pull.js"
3083
3800
  ]
3084
3801
  },
3085
- "workflow:pull": {
3802
+ "translation:push": {
3086
3803
  "aliases": [],
3087
3804
  "args": {
3088
- "workflowKey": {
3089
- "name": "workflowKey",
3805
+ "translationRef": {
3806
+ "description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
3807
+ "name": "translationRef",
3090
3808
  "required": false
3091
3809
  }
3092
3810
  },
@@ -3110,10 +3828,13 @@
3110
3828
  },
3111
3829
  "environment": {
3112
3830
  "name": "environment",
3113
- "summary": "The environment to use.",
3831
+ "summary": "Pushing a translation is only allowed in the development environment",
3114
3832
  "default": "development",
3115
3833
  "hasDynamicHelp": false,
3116
3834
  "multiple": false,
3835
+ "options": [
3836
+ "development"
3837
+ ],
3117
3838
  "type": "option"
3118
3839
  },
3119
3840
  "branch": {
@@ -3125,55 +3846,62 @@
3125
3846
  },
3126
3847
  "all": {
3127
3848
  "name": "all",
3128
- "summary": "Whether to pull all workflows from the specified environment.",
3849
+ "summary": "Whether to push all translations from the target directory.",
3129
3850
  "allowNo": false,
3130
3851
  "type": "boolean"
3131
3852
  },
3132
- "workflows-dir": {
3853
+ "translations-dir": {
3133
3854
  "dependsOn": [
3134
3855
  "all"
3135
3856
  ],
3136
- "name": "workflows-dir",
3137
- "summary": "The target directory path to pull all workflows into.",
3857
+ "name": "translations-dir",
3858
+ "summary": "The target directory path to find all translations to push.",
3138
3859
  "hasDynamicHelp": false,
3139
3860
  "multiple": false,
3140
3861
  "type": "option"
3141
3862
  },
3142
- "hide-uncommitted-changes": {
3143
- "name": "hide-uncommitted-changes",
3144
- "summary": "Hide any uncommitted changes.",
3863
+ "commit": {
3864
+ "name": "commit",
3865
+ "summary": "Push and commit the translation(s) at the same time",
3145
3866
  "allowNo": false,
3146
3867
  "type": "boolean"
3147
3868
  },
3148
- "force": {
3149
- "name": "force",
3150
- "summary": "Remove the confirmation prompt.",
3151
- "allowNo": false,
3152
- "type": "boolean"
3869
+ "commit-message": {
3870
+ "char": "m",
3871
+ "dependsOn": [
3872
+ "commit"
3873
+ ],
3874
+ "name": "commit-message",
3875
+ "summary": "Use the given value as the commit message",
3876
+ "hasDynamicHelp": false,
3877
+ "multiple": false,
3878
+ "type": "option"
3153
3879
  }
3154
3880
  },
3155
3881
  "hasDynamicHelp": false,
3156
3882
  "hiddenAliases": [],
3157
- "id": "workflow:pull",
3883
+ "id": "translation:push",
3158
3884
  "pluginAlias": "@knocklabs/cli",
3159
3885
  "pluginName": "@knocklabs/cli",
3160
3886
  "pluginType": "core",
3161
3887
  "strict": true,
3162
- "summary": "Pull one or more workflows from an environment into a local file system.",
3888
+ "summary": "Push one or more translations from a local file system to Knock.",
3163
3889
  "enableJsonFlag": false,
3890
+ "verifyFeatureEnabled": "translations",
3164
3891
  "isESM": false,
3165
3892
  "relativePath": [
3166
3893
  "dist",
3167
3894
  "commands",
3168
- "workflow",
3169
- "pull.js"
3895
+ "translation",
3896
+ "push.js"
3170
3897
  ]
3171
3898
  },
3172
- "workflow:push": {
3899
+ "translation:validate": {
3173
3900
  "aliases": [],
3174
3901
  "args": {
3175
- "workflowKey": {
3176
- "name": "workflowKey",
3902
+ "translationRef": {
3903
+ "description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
3904
+ "name": "translationRef",
3177
3905
  "required": false
3178
3906
  }
3179
3907
  },
@@ -3197,10 +3925,13 @@
3197
3925
  },
3198
3926
  "environment": {
3199
3927
  "name": "environment",
3200
- "summary": "The environment to push the workflow to. Defaults to development.",
3928
+ "summary": "Validating a translation is only done in the development environment",
3201
3929
  "default": "development",
3202
3930
  "hasDynamicHelp": false,
3203
3931
  "multiple": false,
3932
+ "options": [
3933
+ "development"
3934
+ ],
3204
3935
  "type": "option"
3205
3936
  },
3206
3937
  "branch": {
@@ -3212,33 +3943,16 @@
3212
3943
  },
3213
3944
  "all": {
3214
3945
  "name": "all",
3215
- "summary": "Whether to push all workflows from the target directory.",
3946
+ "summary": "Whether to validate all translations from the target directory.",
3216
3947
  "allowNo": false,
3217
3948
  "type": "boolean"
3218
3949
  },
3219
- "workflows-dir": {
3950
+ "translations-dir": {
3220
3951
  "dependsOn": [
3221
3952
  "all"
3222
3953
  ],
3223
- "name": "workflows-dir",
3224
- "summary": "The target directory path to find all workflows to push.",
3225
- "hasDynamicHelp": false,
3226
- "multiple": false,
3227
- "type": "option"
3228
- },
3229
- "commit": {
3230
- "name": "commit",
3231
- "summary": "Push and commit the workflow(s) at the same time",
3232
- "allowNo": false,
3233
- "type": "boolean"
3234
- },
3235
- "commit-message": {
3236
- "char": "m",
3237
- "dependsOn": [
3238
- "commit"
3239
- ],
3240
- "name": "commit-message",
3241
- "summary": "Use the given value as the commit message",
3954
+ "name": "translations-dir",
3955
+ "summary": "The target directory path to find all translations to validate.",
3242
3956
  "hasDynamicHelp": false,
3243
3957
  "multiple": false,
3244
3958
  "type": "option"
@@ -3246,22 +3960,23 @@
3246
3960
  },
3247
3961
  "hasDynamicHelp": false,
3248
3962
  "hiddenAliases": [],
3249
- "id": "workflow:push",
3963
+ "id": "translation:validate",
3250
3964
  "pluginAlias": "@knocklabs/cli",
3251
3965
  "pluginName": "@knocklabs/cli",
3252
3966
  "pluginType": "core",
3253
3967
  "strict": true,
3254
- "summary": "Push one or more workflows from a local file system to Knock.",
3968
+ "summary": "Validate one or more translations from a local file system.",
3255
3969
  "enableJsonFlag": false,
3970
+ "verifyFeatureEnabled": "translations",
3256
3971
  "isESM": false,
3257
3972
  "relativePath": [
3258
3973
  "dist",
3259
3974
  "commands",
3260
- "workflow",
3261
- "push.js"
3975
+ "translation",
3976
+ "validate.js"
3262
3977
  ]
3263
3978
  },
3264
- "workflow:run": {
3979
+ "workflow:activate": {
3265
3980
  "aliases": [],
3266
3981
  "args": {
3267
3982
  "workflowKey": {
@@ -3269,6 +3984,7 @@
3269
3984
  "required": true
3270
3985
  }
3271
3986
  },
3987
+ "description": "This immediately enables or disables a workflow in a given environment without\nneeding to go through environment promotion.\n\nBy default, this command activates a given workflow. Pass in the --status flag\nwith `false` in order to deactivate it.",
3272
3988
  "flags": {
3273
3989
  "service-token": {
3274
3990
  "env": "KNOCK_SERVICE_TOKEN",
@@ -3289,8 +4005,8 @@
3289
4005
  },
3290
4006
  "environment": {
3291
4007
  "name": "environment",
3292
- "summary": "The environment in which to run the workflow",
3293
- "default": "development",
4008
+ "required": true,
4009
+ "summary": "The environment to use.",
3294
4010
  "hasDynamicHelp": false,
3295
4011
  "multiple": false,
3296
4012
  "type": "option"
@@ -3302,64 +4018,46 @@
3302
4018
  "multiple": false,
3303
4019
  "type": "option"
3304
4020
  },
3305
- "recipients": {
3306
- "aliases": [
3307
- "recipient"
3308
- ],
3309
- "name": "recipients",
3310
- "required": true,
3311
- "summary": "One or more recipient user ids separated by comma, or a JSON string containing one or more recipient object references for this workflow run.",
3312
- "hasDynamicHelp": false,
3313
- "multiple": false,
3314
- "type": "option"
3315
- },
3316
- "actor": {
3317
- "name": "actor",
3318
- "summary": "An actor id, or a JSON string of an actor object reference for the workflow run.",
3319
- "hasDynamicHelp": false,
3320
- "multiple": false,
3321
- "type": "option"
3322
- },
3323
- "tenant": {
3324
- "name": "tenant",
3325
- "summary": "A tenant id for the workflow run.",
4021
+ "status": {
4022
+ "name": "status",
4023
+ "summary": "The workflow active status to set.",
4024
+ "default": true,
3326
4025
  "hasDynamicHelp": false,
3327
4026
  "multiple": false,
4027
+ "options": [
4028
+ "true",
4029
+ "false"
4030
+ ],
3328
4031
  "type": "option"
3329
4032
  },
3330
- "data": {
3331
- "name": "data",
3332
- "summary": "A JSON string of the data for this workflow",
3333
- "hasDynamicHelp": false,
3334
- "multiple": false,
3335
- "type": "option"
4033
+ "force": {
4034
+ "name": "force",
4035
+ "summary": "Remove the confirmation prompt.",
4036
+ "allowNo": false,
4037
+ "type": "boolean"
3336
4038
  }
3337
4039
  },
3338
4040
  "hasDynamicHelp": false,
3339
4041
  "hiddenAliases": [],
3340
- "id": "workflow:run",
4042
+ "id": "workflow:activate",
3341
4043
  "pluginAlias": "@knocklabs/cli",
3342
4044
  "pluginName": "@knocklabs/cli",
3343
4045
  "pluginType": "core",
3344
4046
  "strict": true,
3345
- "summary": "Test run a workflow using the latest version from Knock.",
4047
+ "summary": "Activate or deactivate a workflow in a given environment.",
3346
4048
  "enableJsonFlag": false,
3347
4049
  "isESM": false,
3348
4050
  "relativePath": [
3349
4051
  "dist",
3350
4052
  "commands",
3351
4053
  "workflow",
3352
- "run.js"
4054
+ "activate.js"
3353
4055
  ]
3354
4056
  },
3355
- "workflow:validate": {
4057
+ "workflow:generate-types": {
3356
4058
  "aliases": [],
3357
- "args": {
3358
- "workflowKey": {
3359
- "name": "workflowKey",
3360
- "required": false
3361
- }
3362
- },
4059
+ "args": {},
4060
+ "description": "Generate types for all workflows in an environment and write them to a file.",
3363
4061
  "flags": {
3364
4062
  "service-token": {
3365
4063
  "env": "KNOCK_SERVICE_TOKEN",
@@ -3380,7 +4078,7 @@
3380
4078
  },
3381
4079
  "environment": {
3382
4080
  "name": "environment",
3383
- "summary": "The environment to validate the workflow in. Defaults to development.",
4081
+ "summary": "Select the environment to generate types for.",
3384
4082
  "default": "development",
3385
4083
  "hasDynamicHelp": false,
3386
4084
  "multiple": false,
@@ -3393,18 +4091,10 @@
3393
4091
  "multiple": false,
3394
4092
  "type": "option"
3395
4093
  },
3396
- "all": {
3397
- "name": "all",
3398
- "summary": "Whether to validate all workflows from the target directory.",
3399
- "allowNo": false,
3400
- "type": "boolean"
3401
- },
3402
- "workflows-dir": {
3403
- "dependsOn": [
3404
- "all"
3405
- ],
3406
- "name": "workflows-dir",
3407
- "summary": "The target directory path to find all workflows to validate.",
4094
+ "output-file": {
4095
+ "name": "output-file",
4096
+ "required": true,
4097
+ "summary": "The output file to write the generated types to. We currently support .ts, .rb, .go, .py files only. Your file extension will determine the target language for the generated types.",
3408
4098
  "hasDynamicHelp": false,
3409
4099
  "multiple": false,
3410
4100
  "type": "option"
@@ -3412,27 +4102,25 @@
3412
4102
  },
3413
4103
  "hasDynamicHelp": false,
3414
4104
  "hiddenAliases": [],
3415
- "id": "workflow:validate",
4105
+ "id": "workflow:generate-types",
3416
4106
  "pluginAlias": "@knocklabs/cli",
3417
4107
  "pluginName": "@knocklabs/cli",
3418
4108
  "pluginType": "core",
3419
4109
  "strict": true,
3420
- "summary": "Validate one or more workflows from a local file system.",
3421
4110
  "enableJsonFlag": false,
3422
4111
  "isESM": false,
3423
4112
  "relativePath": [
3424
4113
  "dist",
3425
4114
  "commands",
3426
4115
  "workflow",
3427
- "validate.js"
4116
+ "generate-types.js"
3428
4117
  ]
3429
4118
  },
3430
- "translation:get": {
4119
+ "workflow:get": {
3431
4120
  "aliases": [],
3432
4121
  "args": {
3433
- "translationRef": {
3434
- "description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
3435
- "name": "translationRef",
4122
+ "workflowKey": {
4123
+ "name": "workflowKey",
3436
4124
  "required": true
3437
4125
  }
3438
4126
  },
@@ -3481,39 +4169,26 @@
3481
4169
  "summary": "Hide any uncommitted changes.",
3482
4170
  "allowNo": false,
3483
4171
  "type": "boolean"
3484
- },
3485
- "format": {
3486
- "name": "format",
3487
- "summary": "Specify the output format of the returned translations.",
3488
- "default": "json",
3489
- "hasDynamicHelp": false,
3490
- "multiple": false,
3491
- "options": [
3492
- "json",
3493
- "po"
3494
- ],
3495
- "type": "option"
3496
4172
  }
3497
4173
  },
3498
4174
  "hasDynamicHelp": false,
3499
4175
  "hiddenAliases": [],
3500
- "id": "translation:get",
4176
+ "id": "workflow:get",
3501
4177
  "pluginAlias": "@knocklabs/cli",
3502
4178
  "pluginName": "@knocklabs/cli",
3503
4179
  "pluginType": "core",
3504
4180
  "strict": true,
3505
- "summary": "Display a single translation from an environment.",
4181
+ "summary": "Display a single workflow from an environment.",
3506
4182
  "enableJsonFlag": true,
3507
- "verifyFeatureEnabled": "translations",
3508
4183
  "isESM": false,
3509
4184
  "relativePath": [
3510
4185
  "dist",
3511
4186
  "commands",
3512
- "translation",
4187
+ "workflow",
3513
4188
  "get.js"
3514
4189
  ]
3515
4190
  },
3516
- "translation:list": {
4191
+ "workflow:list": {
3517
4192
  "aliases": [],
3518
4193
  "args": {},
3519
4194
  "flags": {
@@ -3586,31 +4261,24 @@
3586
4261
  },
3587
4262
  "hasDynamicHelp": false,
3588
4263
  "hiddenAliases": [],
3589
- "id": "translation:list",
4264
+ "id": "workflow:list",
3590
4265
  "pluginAlias": "@knocklabs/cli",
3591
4266
  "pluginName": "@knocklabs/cli",
3592
4267
  "pluginType": "core",
3593
4268
  "strict": true,
3594
- "summary": "Display all translations for an environment.",
4269
+ "summary": "Display all workflows for an environment.",
3595
4270
  "enableJsonFlag": true,
3596
- "verifyFeatureEnabled": "translations",
3597
4271
  "isESM": false,
3598
4272
  "relativePath": [
3599
4273
  "dist",
3600
4274
  "commands",
3601
- "translation",
4275
+ "workflow",
3602
4276
  "list.js"
3603
4277
  ]
3604
4278
  },
3605
- "translation:pull": {
4279
+ "workflow:new": {
3606
4280
  "aliases": [],
3607
- "args": {
3608
- "translationRef": {
3609
- "description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
3610
- "name": "translationRef",
3611
- "required": false
3612
- }
3613
- },
4281
+ "args": {},
3614
4282
  "flags": {
3615
4283
  "service-token": {
3616
4284
  "env": "KNOCK_SERVICE_TOKEN",
@@ -3629,9 +4297,33 @@
3629
4297
  "multiple": false,
3630
4298
  "type": "option"
3631
4299
  },
4300
+ "name": {
4301
+ "char": "n",
4302
+ "name": "name",
4303
+ "summary": "The name of the workflow",
4304
+ "hasDynamicHelp": false,
4305
+ "multiple": false,
4306
+ "type": "option"
4307
+ },
4308
+ "key": {
4309
+ "char": "k",
4310
+ "name": "key",
4311
+ "summary": "The key of the workflow",
4312
+ "hasDynamicHelp": false,
4313
+ "multiple": false,
4314
+ "type": "option"
4315
+ },
4316
+ "steps": {
4317
+ "char": "s",
4318
+ "name": "steps",
4319
+ "summary": "Comma-separated list of step types to include in the workflow",
4320
+ "hasDynamicHelp": false,
4321
+ "multiple": false,
4322
+ "type": "option"
4323
+ },
3632
4324
  "environment": {
3633
4325
  "name": "environment",
3634
- "summary": "The environment to use.",
4326
+ "summary": "The environment to create the workflow in. Defaults to development.",
3635
4327
  "default": "development",
3636
4328
  "hasDynamicHelp": false,
3637
4329
  "multiple": false,
@@ -3644,71 +4336,196 @@
3644
4336
  "multiple": false,
3645
4337
  "type": "option"
3646
4338
  },
3647
- "all": {
3648
- "name": "all",
3649
- "summary": "Whether to pull all translations from the specified environment.",
3650
- "allowNo": false,
3651
- "type": "boolean"
3652
- },
3653
- "translations-dir": {
3654
- "dependsOn": [
3655
- "all"
3656
- ],
3657
- "name": "translations-dir",
3658
- "summary": "The target directory path to pull all translations into.",
3659
- "hasDynamicHelp": false,
3660
- "multiple": false,
3661
- "type": "option"
3662
- },
3663
- "hide-uncommitted-changes": {
3664
- "name": "hide-uncommitted-changes",
3665
- "summary": "Hide any uncommitted changes.",
4339
+ "force": {
4340
+ "name": "force",
4341
+ "summary": "Force the creation of the workflow directory without confirmation.",
3666
4342
  "allowNo": false,
3667
4343
  "type": "boolean"
3668
4344
  },
3669
- "force": {
3670
- "name": "force",
3671
- "summary": "Remove the confirmation prompt.",
4345
+ "push": {
4346
+ "char": "p",
4347
+ "name": "push",
4348
+ "summary": "Whether or not to push the workflow to Knock after creation.",
3672
4349
  "allowNo": false,
3673
4350
  "type": "boolean"
3674
4351
  },
3675
- "format": {
3676
- "name": "format",
3677
- "summary": "Specify the output format of the returned translations.",
3678
- "default": "json",
4352
+ "template": {
4353
+ "char": "t",
4354
+ "name": "template",
4355
+ "summary": "The template repository to use for the workflow. Should be `workflows/{type}`. You cannot use this flag with --steps.",
3679
4356
  "hasDynamicHelp": false,
3680
4357
  "multiple": false,
3681
- "options": [
3682
- "json",
3683
- "po"
4358
+ "type": "option"
4359
+ }
4360
+ },
4361
+ "hasDynamicHelp": false,
4362
+ "hiddenAliases": [],
4363
+ "id": "workflow:new",
4364
+ "pluginAlias": "@knocklabs/cli",
4365
+ "pluginName": "@knocklabs/cli",
4366
+ "pluginType": "core",
4367
+ "strict": true,
4368
+ "summary": "Create a new workflow with a minimal configuration.",
4369
+ "enableJsonFlag": false,
4370
+ "isESM": false,
4371
+ "relativePath": [
4372
+ "dist",
4373
+ "commands",
4374
+ "workflow",
4375
+ "new.js"
4376
+ ]
4377
+ },
4378
+ "workflow:open": {
4379
+ "aliases": [],
4380
+ "args": {
4381
+ "workflowKey": {
4382
+ "name": "workflowKey",
4383
+ "required": true
4384
+ }
4385
+ },
4386
+ "flags": {
4387
+ "service-token": {
4388
+ "env": "KNOCK_SERVICE_TOKEN",
4389
+ "name": "service-token",
4390
+ "required": false,
4391
+ "summary": "The service token to authenticate with.",
4392
+ "hasDynamicHelp": false,
4393
+ "multiple": false,
4394
+ "type": "option"
4395
+ },
4396
+ "api-origin": {
4397
+ "hidden": true,
4398
+ "name": "api-origin",
4399
+ "required": false,
4400
+ "hasDynamicHelp": false,
4401
+ "multiple": false,
4402
+ "type": "option"
4403
+ },
4404
+ "environment": {
4405
+ "name": "environment",
4406
+ "summary": "The environment to use.",
4407
+ "default": "development",
4408
+ "hasDynamicHelp": false,
4409
+ "multiple": false,
4410
+ "type": "option"
4411
+ },
4412
+ "branch": {
4413
+ "name": "branch",
4414
+ "summary": "The slug of the branch to use.",
4415
+ "hasDynamicHelp": false,
4416
+ "multiple": false,
4417
+ "type": "option"
4418
+ }
4419
+ },
4420
+ "hasDynamicHelp": false,
4421
+ "hiddenAliases": [],
4422
+ "id": "workflow:open",
4423
+ "pluginAlias": "@knocklabs/cli",
4424
+ "pluginName": "@knocklabs/cli",
4425
+ "pluginType": "core",
4426
+ "strict": true,
4427
+ "summary": "Open a workflow in the Knock dashboard.",
4428
+ "enableJsonFlag": false,
4429
+ "isESM": false,
4430
+ "relativePath": [
4431
+ "dist",
4432
+ "commands",
4433
+ "workflow",
4434
+ "open.js"
4435
+ ]
4436
+ },
4437
+ "workflow:pull": {
4438
+ "aliases": [],
4439
+ "args": {
4440
+ "workflowKey": {
4441
+ "name": "workflowKey",
4442
+ "required": false
4443
+ }
4444
+ },
4445
+ "flags": {
4446
+ "service-token": {
4447
+ "env": "KNOCK_SERVICE_TOKEN",
4448
+ "name": "service-token",
4449
+ "required": false,
4450
+ "summary": "The service token to authenticate with.",
4451
+ "hasDynamicHelp": false,
4452
+ "multiple": false,
4453
+ "type": "option"
4454
+ },
4455
+ "api-origin": {
4456
+ "hidden": true,
4457
+ "name": "api-origin",
4458
+ "required": false,
4459
+ "hasDynamicHelp": false,
4460
+ "multiple": false,
4461
+ "type": "option"
4462
+ },
4463
+ "environment": {
4464
+ "name": "environment",
4465
+ "summary": "The environment to use.",
4466
+ "default": "development",
4467
+ "hasDynamicHelp": false,
4468
+ "multiple": false,
4469
+ "type": "option"
4470
+ },
4471
+ "branch": {
4472
+ "name": "branch",
4473
+ "summary": "The slug of the branch to use.",
4474
+ "hasDynamicHelp": false,
4475
+ "multiple": false,
4476
+ "type": "option"
4477
+ },
4478
+ "all": {
4479
+ "name": "all",
4480
+ "summary": "Whether to pull all workflows from the specified environment.",
4481
+ "allowNo": false,
4482
+ "type": "boolean"
4483
+ },
4484
+ "workflows-dir": {
4485
+ "dependsOn": [
4486
+ "all"
3684
4487
  ],
4488
+ "name": "workflows-dir",
4489
+ "summary": "The target directory path to pull all workflows into.",
4490
+ "hasDynamicHelp": false,
4491
+ "multiple": false,
3685
4492
  "type": "option"
4493
+ },
4494
+ "hide-uncommitted-changes": {
4495
+ "name": "hide-uncommitted-changes",
4496
+ "summary": "Hide any uncommitted changes.",
4497
+ "allowNo": false,
4498
+ "type": "boolean"
4499
+ },
4500
+ "force": {
4501
+ "name": "force",
4502
+ "summary": "Remove the confirmation prompt.",
4503
+ "allowNo": false,
4504
+ "type": "boolean"
3686
4505
  }
3687
4506
  },
3688
4507
  "hasDynamicHelp": false,
3689
4508
  "hiddenAliases": [],
3690
- "id": "translation:pull",
4509
+ "id": "workflow:pull",
3691
4510
  "pluginAlias": "@knocklabs/cli",
3692
4511
  "pluginName": "@knocklabs/cli",
3693
4512
  "pluginType": "core",
3694
4513
  "strict": true,
3695
- "summary": "Pull one or more translations from an environment into a local file system.",
4514
+ "summary": "Pull one or more workflows from an environment into a local file system.",
3696
4515
  "enableJsonFlag": false,
3697
- "verifyFeatureEnabled": "translations",
3698
4516
  "isESM": false,
3699
4517
  "relativePath": [
3700
4518
  "dist",
3701
4519
  "commands",
3702
- "translation",
4520
+ "workflow",
3703
4521
  "pull.js"
3704
4522
  ]
3705
4523
  },
3706
- "translation:push": {
4524
+ "workflow:push": {
3707
4525
  "aliases": [],
3708
4526
  "args": {
3709
- "translationRef": {
3710
- "description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
3711
- "name": "translationRef",
4527
+ "workflowKey": {
4528
+ "name": "workflowKey",
3712
4529
  "required": false
3713
4530
  }
3714
4531
  },
@@ -3732,13 +4549,10 @@
3732
4549
  },
3733
4550
  "environment": {
3734
4551
  "name": "environment",
3735
- "summary": "Pushing a translation is only allowed in the development environment",
4552
+ "summary": "The environment to push the workflow to. Defaults to development.",
3736
4553
  "default": "development",
3737
4554
  "hasDynamicHelp": false,
3738
4555
  "multiple": false,
3739
- "options": [
3740
- "development"
3741
- ],
3742
4556
  "type": "option"
3743
4557
  },
3744
4558
  "branch": {
@@ -3750,23 +4564,23 @@
3750
4564
  },
3751
4565
  "all": {
3752
4566
  "name": "all",
3753
- "summary": "Whether to push all translations from the target directory.",
4567
+ "summary": "Whether to push all workflows from the target directory.",
3754
4568
  "allowNo": false,
3755
4569
  "type": "boolean"
3756
4570
  },
3757
- "translations-dir": {
4571
+ "workflows-dir": {
3758
4572
  "dependsOn": [
3759
4573
  "all"
3760
4574
  ],
3761
- "name": "translations-dir",
3762
- "summary": "The target directory path to find all translations to push.",
4575
+ "name": "workflows-dir",
4576
+ "summary": "The target directory path to find all workflows to push.",
3763
4577
  "hasDynamicHelp": false,
3764
4578
  "multiple": false,
3765
4579
  "type": "option"
3766
4580
  },
3767
4581
  "commit": {
3768
4582
  "name": "commit",
3769
- "summary": "Push and commit the translation(s) at the same time",
4583
+ "summary": "Push and commit the workflow(s) at the same time",
3770
4584
  "allowNo": false,
3771
4585
  "type": "boolean"
3772
4586
  },
@@ -3784,29 +4598,27 @@
3784
4598
  },
3785
4599
  "hasDynamicHelp": false,
3786
4600
  "hiddenAliases": [],
3787
- "id": "translation:push",
4601
+ "id": "workflow:push",
3788
4602
  "pluginAlias": "@knocklabs/cli",
3789
4603
  "pluginName": "@knocklabs/cli",
3790
4604
  "pluginType": "core",
3791
4605
  "strict": true,
3792
- "summary": "Push one or more translations from a local file system to Knock.",
4606
+ "summary": "Push one or more workflows from a local file system to Knock.",
3793
4607
  "enableJsonFlag": false,
3794
- "verifyFeatureEnabled": "translations",
3795
4608
  "isESM": false,
3796
4609
  "relativePath": [
3797
4610
  "dist",
3798
4611
  "commands",
3799
- "translation",
4612
+ "workflow",
3800
4613
  "push.js"
3801
4614
  ]
3802
4615
  },
3803
- "translation:validate": {
4616
+ "workflow:run": {
3804
4617
  "aliases": [],
3805
4618
  "args": {
3806
- "translationRef": {
3807
- "description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
3808
- "name": "translationRef",
3809
- "required": false
4619
+ "workflowKey": {
4620
+ "name": "workflowKey",
4621
+ "required": true
3810
4622
  }
3811
4623
  },
3812
4624
  "flags": {
@@ -3829,13 +4641,101 @@
3829
4641
  },
3830
4642
  "environment": {
3831
4643
  "name": "environment",
3832
- "summary": "Validating a translation is only done in the development environment",
4644
+ "summary": "The environment in which to run the workflow",
3833
4645
  "default": "development",
3834
4646
  "hasDynamicHelp": false,
3835
4647
  "multiple": false,
3836
- "options": [
3837
- "development"
4648
+ "type": "option"
4649
+ },
4650
+ "branch": {
4651
+ "name": "branch",
4652
+ "summary": "The slug of the branch to use.",
4653
+ "hasDynamicHelp": false,
4654
+ "multiple": false,
4655
+ "type": "option"
4656
+ },
4657
+ "recipients": {
4658
+ "aliases": [
4659
+ "recipient"
3838
4660
  ],
4661
+ "name": "recipients",
4662
+ "required": true,
4663
+ "summary": "One or more recipient user ids separated by comma, or a JSON string containing one or more recipient object references for this workflow run.",
4664
+ "hasDynamicHelp": false,
4665
+ "multiple": false,
4666
+ "type": "option"
4667
+ },
4668
+ "actor": {
4669
+ "name": "actor",
4670
+ "summary": "An actor id, or a JSON string of an actor object reference for the workflow run.",
4671
+ "hasDynamicHelp": false,
4672
+ "multiple": false,
4673
+ "type": "option"
4674
+ },
4675
+ "tenant": {
4676
+ "name": "tenant",
4677
+ "summary": "A tenant id for the workflow run.",
4678
+ "hasDynamicHelp": false,
4679
+ "multiple": false,
4680
+ "type": "option"
4681
+ },
4682
+ "data": {
4683
+ "name": "data",
4684
+ "summary": "A JSON string of the data for this workflow",
4685
+ "hasDynamicHelp": false,
4686
+ "multiple": false,
4687
+ "type": "option"
4688
+ }
4689
+ },
4690
+ "hasDynamicHelp": false,
4691
+ "hiddenAliases": [],
4692
+ "id": "workflow:run",
4693
+ "pluginAlias": "@knocklabs/cli",
4694
+ "pluginName": "@knocklabs/cli",
4695
+ "pluginType": "core",
4696
+ "strict": true,
4697
+ "summary": "Test run a workflow using the latest version from Knock.",
4698
+ "enableJsonFlag": false,
4699
+ "isESM": false,
4700
+ "relativePath": [
4701
+ "dist",
4702
+ "commands",
4703
+ "workflow",
4704
+ "run.js"
4705
+ ]
4706
+ },
4707
+ "workflow:validate": {
4708
+ "aliases": [],
4709
+ "args": {
4710
+ "workflowKey": {
4711
+ "name": "workflowKey",
4712
+ "required": false
4713
+ }
4714
+ },
4715
+ "flags": {
4716
+ "service-token": {
4717
+ "env": "KNOCK_SERVICE_TOKEN",
4718
+ "name": "service-token",
4719
+ "required": false,
4720
+ "summary": "The service token to authenticate with.",
4721
+ "hasDynamicHelp": false,
4722
+ "multiple": false,
4723
+ "type": "option"
4724
+ },
4725
+ "api-origin": {
4726
+ "hidden": true,
4727
+ "name": "api-origin",
4728
+ "required": false,
4729
+ "hasDynamicHelp": false,
4730
+ "multiple": false,
4731
+ "type": "option"
4732
+ },
4733
+ "environment": {
4734
+ "name": "environment",
4735
+ "summary": "The environment to validate the workflow in. Defaults to development.",
4736
+ "default": "development",
4737
+ "hasDynamicHelp": false,
4738
+ "multiple": false,
3839
4739
  "type": "option"
3840
4740
  },
3841
4741
  "branch": {
@@ -3847,16 +4747,16 @@
3847
4747
  },
3848
4748
  "all": {
3849
4749
  "name": "all",
3850
- "summary": "Whether to validate all translations from the target directory.",
4750
+ "summary": "Whether to validate all workflows from the target directory.",
3851
4751
  "allowNo": false,
3852
4752
  "type": "boolean"
3853
4753
  },
3854
- "translations-dir": {
4754
+ "workflows-dir": {
3855
4755
  "dependsOn": [
3856
4756
  "all"
3857
4757
  ],
3858
- "name": "translations-dir",
3859
- "summary": "The target directory path to find all translations to validate.",
4758
+ "name": "workflows-dir",
4759
+ "summary": "The target directory path to find all workflows to validate.",
3860
4760
  "hasDynamicHelp": false,
3861
4761
  "multiple": false,
3862
4762
  "type": "option"
@@ -3864,22 +4764,21 @@
3864
4764
  },
3865
4765
  "hasDynamicHelp": false,
3866
4766
  "hiddenAliases": [],
3867
- "id": "translation:validate",
4767
+ "id": "workflow:validate",
3868
4768
  "pluginAlias": "@knocklabs/cli",
3869
4769
  "pluginName": "@knocklabs/cli",
3870
4770
  "pluginType": "core",
3871
4771
  "strict": true,
3872
- "summary": "Validate one or more translations from a local file system.",
4772
+ "summary": "Validate one or more workflows from a local file system.",
3873
4773
  "enableJsonFlag": false,
3874
- "verifyFeatureEnabled": "translations",
3875
4774
  "isESM": false,
3876
4775
  "relativePath": [
3877
4776
  "dist",
3878
4777
  "commands",
3879
- "translation",
4778
+ "workflow",
3880
4779
  "validate.js"
3881
4780
  ]
3882
4781
  }
3883
4782
  },
3884
- "version": "0.3.1"
4783
+ "version": "1.0.0"
3885
4784
  }