@knocklabs/cli 0.3.1 → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +258 -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/pull.js +5 -6
  8. package/dist/commands/guide/push.js +1 -1
  9. package/dist/commands/guide/validate.js +1 -1
  10. package/dist/commands/init.js +108 -0
  11. package/dist/commands/layout/new.js +228 -0
  12. package/dist/commands/layout/pull.js +5 -6
  13. package/dist/commands/layout/push.js +1 -1
  14. package/dist/commands/layout/validate.js +1 -1
  15. package/dist/commands/message-type/new.js +228 -0
  16. package/dist/commands/message-type/pull.js +5 -6
  17. package/dist/commands/message-type/push.js +1 -1
  18. package/dist/commands/message-type/validate.js +1 -1
  19. package/dist/commands/partial/new.js +274 -0
  20. package/dist/commands/partial/pull.js +5 -6
  21. package/dist/commands/partial/push.js +1 -1
  22. package/dist/commands/partial/validate.js +1 -1
  23. package/dist/commands/pull.js +7 -2
  24. package/dist/commands/push.js +6 -4
  25. package/dist/commands/translation/pull.js +1 -1
  26. package/dist/commands/translation/push.js +1 -1
  27. package/dist/commands/translation/validate.js +1 -1
  28. package/dist/commands/workflow/new.js +179 -54
  29. package/dist/commands/workflow/pull.js +6 -8
  30. package/dist/commands/workflow/push.js +1 -1
  31. package/dist/commands/workflow/validate.js +1 -1
  32. package/dist/lib/api-v1.js +23 -2
  33. package/dist/lib/auth.js +1 -1
  34. package/dist/lib/base-command.js +18 -15
  35. package/dist/lib/helpers/project-config.js +158 -0
  36. package/dist/lib/helpers/request.js +1 -2
  37. package/dist/lib/helpers/string.js +4 -4
  38. package/dist/lib/helpers/typegen.js +1 -1
  39. package/dist/lib/marshal/email-layout/generator.js +152 -0
  40. package/dist/lib/marshal/email-layout/helpers.js +6 -9
  41. package/dist/lib/marshal/email-layout/index.js +1 -0
  42. package/dist/lib/marshal/email-layout/writer.js +15 -3
  43. package/dist/lib/marshal/guide/generator.js +163 -0
  44. package/dist/lib/marshal/guide/helpers.js +6 -10
  45. package/dist/lib/marshal/guide/index.js +1 -0
  46. package/dist/lib/marshal/guide/writer.js +5 -9
  47. package/dist/lib/marshal/message-type/generator.js +139 -0
  48. package/dist/lib/marshal/message-type/helpers.js +6 -10
  49. package/dist/lib/marshal/message-type/index.js +1 -0
  50. package/dist/lib/marshal/message-type/writer.js +5 -1
  51. package/dist/lib/marshal/partial/generator.js +159 -0
  52. package/dist/lib/marshal/partial/helpers.js +6 -10
  53. package/dist/lib/marshal/partial/index.js +1 -0
  54. package/dist/lib/marshal/partial/writer.js +3 -0
  55. package/dist/lib/marshal/translation/helpers.js +6 -10
  56. package/dist/lib/marshal/translation/processor.isomorphic.js +4 -4
  57. package/dist/lib/marshal/translation/writer.js +2 -2
  58. package/dist/lib/marshal/workflow/generator.js +175 -19
  59. package/dist/lib/marshal/workflow/helpers.js +7 -10
  60. package/dist/lib/run-context/loader.js +5 -0
  61. package/dist/lib/templates.js +131 -0
  62. package/oclif.manifest.json +1075 -471
  63. package/package.json +10 -8
@@ -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,52 @@
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
+ },
582
724
  "commit:get": {
583
725
  "aliases": [],
584
726
  "args": {
@@ -870,6 +1012,52 @@
870
1012
  "promote.js"
871
1013
  ]
872
1014
  },
1015
+ "environment:list": {
1016
+ "aliases": [],
1017
+ "args": {},
1018
+ "flags": {
1019
+ "json": {
1020
+ "description": "Format output as json.",
1021
+ "helpGroup": "GLOBAL",
1022
+ "name": "json",
1023
+ "allowNo": false,
1024
+ "type": "boolean"
1025
+ },
1026
+ "service-token": {
1027
+ "env": "KNOCK_SERVICE_TOKEN",
1028
+ "name": "service-token",
1029
+ "required": false,
1030
+ "summary": "The service token to authenticate with.",
1031
+ "hasDynamicHelp": false,
1032
+ "multiple": false,
1033
+ "type": "option"
1034
+ },
1035
+ "api-origin": {
1036
+ "hidden": true,
1037
+ "name": "api-origin",
1038
+ "required": false,
1039
+ "hasDynamicHelp": false,
1040
+ "multiple": false,
1041
+ "type": "option"
1042
+ }
1043
+ },
1044
+ "hasDynamicHelp": false,
1045
+ "hiddenAliases": [],
1046
+ "id": "environment:list",
1047
+ "pluginAlias": "@knocklabs/cli",
1048
+ "pluginName": "@knocklabs/cli",
1049
+ "pluginType": "core",
1050
+ "strict": true,
1051
+ "summary": "Display all environments configured for the account.",
1052
+ "enableJsonFlag": true,
1053
+ "isESM": false,
1054
+ "relativePath": [
1055
+ "dist",
1056
+ "commands",
1057
+ "environment",
1058
+ "list.js"
1059
+ ]
1060
+ },
873
1061
  "guide:activate": {
874
1062
  "aliases": [],
875
1063
  "args": {
@@ -1193,6 +1381,105 @@
1193
1381
  "list.js"
1194
1382
  ]
1195
1383
  },
1384
+ "guide:new": {
1385
+ "aliases": [],
1386
+ "args": {},
1387
+ "flags": {
1388
+ "service-token": {
1389
+ "env": "KNOCK_SERVICE_TOKEN",
1390
+ "name": "service-token",
1391
+ "required": false,
1392
+ "summary": "The service token to authenticate with.",
1393
+ "hasDynamicHelp": false,
1394
+ "multiple": false,
1395
+ "type": "option"
1396
+ },
1397
+ "api-origin": {
1398
+ "hidden": true,
1399
+ "name": "api-origin",
1400
+ "required": false,
1401
+ "hasDynamicHelp": false,
1402
+ "multiple": false,
1403
+ "type": "option"
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
+ },
1429
+ "environment": {
1430
+ "name": "environment",
1431
+ "summary": "The environment to create the guide in. Defaults to development.",
1432
+ "default": "development",
1433
+ "hasDynamicHelp": false,
1434
+ "multiple": false,
1435
+ "type": "option"
1436
+ },
1437
+ "branch": {
1438
+ "name": "branch",
1439
+ "summary": "The slug of the branch to use.",
1440
+ "hasDynamicHelp": false,
1441
+ "multiple": false,
1442
+ "type": "option"
1443
+ },
1444
+ "force": {
1445
+ "name": "force",
1446
+ "summary": "Force the creation of the guide directory without confirmation.",
1447
+ "allowNo": false,
1448
+ "type": "boolean"
1449
+ },
1450
+ "push": {
1451
+ "char": "p",
1452
+ "name": "push",
1453
+ "summary": "Whether or not to push the guide to Knock after creation.",
1454
+ "allowNo": false,
1455
+ "type": "boolean"
1456
+ },
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"
1464
+ }
1465
+ },
1466
+ "hasDynamicHelp": false,
1467
+ "hiddenAliases": [],
1468
+ "id": "guide:new",
1469
+ "pluginAlias": "@knocklabs/cli",
1470
+ "pluginName": "@knocklabs/cli",
1471
+ "pluginType": "core",
1472
+ "strict": true,
1473
+ "summary": "Create a new guide with a minimal configuration.",
1474
+ "enableJsonFlag": false,
1475
+ "isESM": false,
1476
+ "relativePath": [
1477
+ "dist",
1478
+ "commands",
1479
+ "guide",
1480
+ "new.js"
1481
+ ]
1482
+ },
1196
1483
  "guide:pull": {
1197
1484
  "aliases": [],
1198
1485
  "args": {
@@ -1607,14 +1894,9 @@
1607
1894
  "list.js"
1608
1895
  ]
1609
1896
  },
1610
- "layout:pull": {
1897
+ "layout:new": {
1611
1898
  "aliases": [],
1612
- "args": {
1613
- "emailLayoutKey": {
1614
- "name": "emailLayoutKey",
1615
- "required": false
1616
- }
1617
- },
1899
+ "args": {},
1618
1900
  "flags": {
1619
1901
  "service-token": {
1620
1902
  "env": "KNOCK_SERVICE_TOKEN",
@@ -1633,8 +1915,103 @@
1633
1915
  "multiple": false,
1634
1916
  "type": "option"
1635
1917
  },
1636
- "environment": {
1637
- "name": "environment",
1918
+ "name": {
1919
+ "char": "n",
1920
+ "name": "name",
1921
+ "summary": "The name of the email layout",
1922
+ "hasDynamicHelp": false,
1923
+ "multiple": false,
1924
+ "type": "option"
1925
+ },
1926
+ "key": {
1927
+ "char": "k",
1928
+ "name": "key",
1929
+ "summary": "The key of the email layout",
1930
+ "hasDynamicHelp": false,
1931
+ "multiple": false,
1932
+ "type": "option"
1933
+ },
1934
+ "environment": {
1935
+ "name": "environment",
1936
+ "summary": "The environment to create the email layout in. Defaults to development.",
1937
+ "default": "development",
1938
+ "hasDynamicHelp": false,
1939
+ "multiple": false,
1940
+ "type": "option"
1941
+ },
1942
+ "branch": {
1943
+ "name": "branch",
1944
+ "summary": "The slug of the branch to use.",
1945
+ "hasDynamicHelp": false,
1946
+ "multiple": false,
1947
+ "type": "option"
1948
+ },
1949
+ "force": {
1950
+ "name": "force",
1951
+ "summary": "Force the creation of the email layout directory without confirmation.",
1952
+ "allowNo": false,
1953
+ "type": "boolean"
1954
+ },
1955
+ "push": {
1956
+ "char": "p",
1957
+ "name": "push",
1958
+ "summary": "Whether or not to push the email layout to Knock after creation.",
1959
+ "allowNo": false,
1960
+ "type": "boolean"
1961
+ },
1962
+ "template": {
1963
+ "name": "template",
1964
+ "summary": "The template to use for the email layout. Should be `email-layouts/{key}`.",
1965
+ "hasDynamicHelp": false,
1966
+ "multiple": false,
1967
+ "type": "option"
1968
+ }
1969
+ },
1970
+ "hasDynamicHelp": false,
1971
+ "hiddenAliases": [],
1972
+ "id": "layout:new",
1973
+ "pluginAlias": "@knocklabs/cli",
1974
+ "pluginName": "@knocklabs/cli",
1975
+ "pluginType": "core",
1976
+ "strict": true,
1977
+ "summary": "Create a new email layout with a minimal configuration.",
1978
+ "enableJsonFlag": false,
1979
+ "isESM": false,
1980
+ "relativePath": [
1981
+ "dist",
1982
+ "commands",
1983
+ "layout",
1984
+ "new.js"
1985
+ ]
1986
+ },
1987
+ "layout:pull": {
1988
+ "aliases": [],
1989
+ "args": {
1990
+ "emailLayoutKey": {
1991
+ "name": "emailLayoutKey",
1992
+ "required": false
1993
+ }
1994
+ },
1995
+ "flags": {
1996
+ "service-token": {
1997
+ "env": "KNOCK_SERVICE_TOKEN",
1998
+ "name": "service-token",
1999
+ "required": false,
2000
+ "summary": "The service token to authenticate with.",
2001
+ "hasDynamicHelp": false,
2002
+ "multiple": false,
2003
+ "type": "option"
2004
+ },
2005
+ "api-origin": {
2006
+ "hidden": true,
2007
+ "name": "api-origin",
2008
+ "required": false,
2009
+ "hasDynamicHelp": false,
2010
+ "multiple": false,
2011
+ "type": "option"
2012
+ },
2013
+ "environment": {
2014
+ "name": "environment",
1638
2015
  "summary": "The environment to use.",
1639
2016
  "default": "development",
1640
2017
  "hasDynamicHelp": false,
@@ -1876,11 +2253,11 @@
1876
2253
  "validate.js"
1877
2254
  ]
1878
2255
  },
1879
- "message-type:get": {
2256
+ "partial:get": {
1880
2257
  "aliases": [],
1881
2258
  "args": {
1882
- "messageTypeKey": {
1883
- "name": "messageTypeKey",
2259
+ "partialKey": {
2260
+ "name": "partialKey",
1884
2261
  "required": true
1885
2262
  }
1886
2263
  },
@@ -1933,22 +2310,22 @@
1933
2310
  },
1934
2311
  "hasDynamicHelp": false,
1935
2312
  "hiddenAliases": [],
1936
- "id": "message-type:get",
2313
+ "id": "partial:get",
1937
2314
  "pluginAlias": "@knocklabs/cli",
1938
2315
  "pluginName": "@knocklabs/cli",
1939
2316
  "pluginType": "core",
1940
2317
  "strict": true,
1941
- "summary": "Display a single in-app message type from an environment.",
2318
+ "summary": "Display a single partial from an environment.",
1942
2319
  "enableJsonFlag": true,
1943
2320
  "isESM": false,
1944
2321
  "relativePath": [
1945
2322
  "dist",
1946
2323
  "commands",
1947
- "message-type",
2324
+ "partial",
1948
2325
  "get.js"
1949
2326
  ]
1950
2327
  },
1951
- "message-type:list": {
2328
+ "partial:list": {
1952
2329
  "aliases": [],
1953
2330
  "args": {},
1954
2331
  "flags": {
@@ -2021,26 +2398,130 @@
2021
2398
  },
2022
2399
  "hasDynamicHelp": false,
2023
2400
  "hiddenAliases": [],
2024
- "id": "message-type:list",
2401
+ "id": "partial:list",
2025
2402
  "pluginAlias": "@knocklabs/cli",
2026
2403
  "pluginName": "@knocklabs/cli",
2027
2404
  "pluginType": "core",
2028
2405
  "strict": true,
2029
- "summary": "Display all in-app message types for an environment.",
2406
+ "summary": "Display all partials for an environment.",
2030
2407
  "enableJsonFlag": true,
2031
2408
  "isESM": false,
2032
2409
  "relativePath": [
2033
2410
  "dist",
2034
2411
  "commands",
2035
- "message-type",
2412
+ "partial",
2036
2413
  "list.js"
2037
2414
  ]
2038
2415
  },
2039
- "message-type:pull": {
2416
+ "partial:new": {
2417
+ "aliases": [],
2418
+ "args": {},
2419
+ "flags": {
2420
+ "service-token": {
2421
+ "env": "KNOCK_SERVICE_TOKEN",
2422
+ "name": "service-token",
2423
+ "required": false,
2424
+ "summary": "The service token to authenticate with.",
2425
+ "hasDynamicHelp": false,
2426
+ "multiple": false,
2427
+ "type": "option"
2428
+ },
2429
+ "api-origin": {
2430
+ "hidden": true,
2431
+ "name": "api-origin",
2432
+ "required": false,
2433
+ "hasDynamicHelp": false,
2434
+ "multiple": false,
2435
+ "type": "option"
2436
+ },
2437
+ "name": {
2438
+ "char": "n",
2439
+ "name": "name",
2440
+ "summary": "The name of the partial",
2441
+ "hasDynamicHelp": false,
2442
+ "multiple": false,
2443
+ "type": "option"
2444
+ },
2445
+ "key": {
2446
+ "char": "k",
2447
+ "name": "key",
2448
+ "summary": "The key of the partial",
2449
+ "hasDynamicHelp": false,
2450
+ "multiple": false,
2451
+ "type": "option"
2452
+ },
2453
+ "type": {
2454
+ "char": "t",
2455
+ "name": "type",
2456
+ "summary": "The type of the partial (html, json, markdown, text). You cannot use this flag with --template.",
2457
+ "hasDynamicHelp": false,
2458
+ "multiple": false,
2459
+ "options": [
2460
+ "html",
2461
+ "json",
2462
+ "markdown",
2463
+ "text"
2464
+ ],
2465
+ "type": "option"
2466
+ },
2467
+ "environment": {
2468
+ "name": "environment",
2469
+ "summary": "The environment to create the partial in. Defaults to development.",
2470
+ "default": "development",
2471
+ "hasDynamicHelp": false,
2472
+ "multiple": false,
2473
+ "type": "option"
2474
+ },
2475
+ "branch": {
2476
+ "name": "branch",
2477
+ "summary": "The slug of the branch to use.",
2478
+ "hasDynamicHelp": false,
2479
+ "multiple": false,
2480
+ "type": "option"
2481
+ },
2482
+ "force": {
2483
+ "name": "force",
2484
+ "summary": "Force the creation of the partial directory without confirmation.",
2485
+ "allowNo": false,
2486
+ "type": "boolean"
2487
+ },
2488
+ "push": {
2489
+ "char": "p",
2490
+ "name": "push",
2491
+ "summary": "Whether or not to push the partial to Knock after creation.",
2492
+ "allowNo": false,
2493
+ "type": "boolean"
2494
+ },
2495
+ "template": {
2496
+ "name": "template",
2497
+ "summary": "The template to use for the partial. Should be `partials/{key}`. You cannot use this flag with --type.",
2498
+ "hasDynamicHelp": false,
2499
+ "multiple": false,
2500
+ "type": "option"
2501
+ }
2502
+ },
2503
+ "hasDynamicHelp": false,
2504
+ "hiddenAliases": [],
2505
+ "id": "partial:new",
2506
+ "pluginAlias": "@knocklabs/cli",
2507
+ "pluginName": "@knocklabs/cli",
2508
+ "pluginType": "core",
2509
+ "strict": true,
2510
+ "summary": "Create a new partial with a minimal configuration.",
2511
+ "enableJsonFlag": false,
2512
+ "isESM": false,
2513
+ "relativePath": [
2514
+ "dist",
2515
+ "commands",
2516
+ "partial",
2517
+ "new.js"
2518
+ ]
2519
+ },
2520
+ "partial:pull": {
2040
2521
  "aliases": [],
2041
2522
  "args": {
2042
- "messageTypeKey": {
2043
- "name": "messageTypeKey",
2523
+ "partialKey": {
2524
+ "name": "partialKey",
2044
2525
  "required": false
2045
2526
  }
2046
2527
  },
@@ -2079,16 +2560,16 @@
2079
2560
  },
2080
2561
  "all": {
2081
2562
  "name": "all",
2082
- "summary": "Whether to pull all in-app message types from the specified environment.",
2563
+ "summary": "Whether to pull all partials from the specified environment.",
2083
2564
  "allowNo": false,
2084
2565
  "type": "boolean"
2085
2566
  },
2086
- "message-types-dir": {
2567
+ "partials-dir": {
2087
2568
  "dependsOn": [
2088
2569
  "all"
2089
2570
  ],
2090
- "name": "message-types-dir",
2091
- "summary": "The target directory path to pull all in-app message types into.",
2571
+ "name": "partials-dir",
2572
+ "summary": "The target directory path to pull all partials into.",
2092
2573
  "hasDynamicHelp": false,
2093
2574
  "multiple": false,
2094
2575
  "type": "option"
@@ -2108,26 +2589,26 @@
2108
2589
  },
2109
2590
  "hasDynamicHelp": false,
2110
2591
  "hiddenAliases": [],
2111
- "id": "message-type:pull",
2592
+ "id": "partial:pull",
2112
2593
  "pluginAlias": "@knocklabs/cli",
2113
2594
  "pluginName": "@knocklabs/cli",
2114
2595
  "pluginType": "core",
2115
2596
  "strict": true,
2116
- "summary": "Pull one or more in-app message types from an environment into a local file system.",
2597
+ "summary": "Pull one or more partial from an environment into a local file system.",
2117
2598
  "enableJsonFlag": false,
2118
2599
  "isESM": false,
2119
2600
  "relativePath": [
2120
2601
  "dist",
2121
2602
  "commands",
2122
- "message-type",
2603
+ "partial",
2123
2604
  "pull.js"
2124
2605
  ]
2125
2606
  },
2126
- "message-type:push": {
2607
+ "partial:push": {
2127
2608
  "aliases": [],
2128
2609
  "args": {
2129
- "messageTypeKey": {
2130
- "name": "messageTypeKey",
2610
+ "partialKey": {
2611
+ "name": "partialKey",
2131
2612
  "required": false
2132
2613
  }
2133
2614
  },
@@ -2151,7 +2632,7 @@
2151
2632
  },
2152
2633
  "environment": {
2153
2634
  "name": "environment",
2154
- "summary": "Pushing a message type is only allowed in the development environment",
2635
+ "summary": "Pushing a partial is only allowed in the development environment",
2155
2636
  "default": "development",
2156
2637
  "hasDynamicHelp": false,
2157
2638
  "multiple": false,
@@ -2169,23 +2650,23 @@
2169
2650
  },
2170
2651
  "all": {
2171
2652
  "name": "all",
2172
- "summary": "Whether to push all message types from the target directory.",
2653
+ "summary": "Whether to push all partials from the target directory.",
2173
2654
  "allowNo": false,
2174
2655
  "type": "boolean"
2175
2656
  },
2176
- "message-types-dir": {
2657
+ "partials-dir": {
2177
2658
  "dependsOn": [
2178
2659
  "all"
2179
2660
  ],
2180
- "name": "message-types-dir",
2181
- "summary": "The target directory path to find all message types to push.",
2661
+ "name": "partials-dir",
2662
+ "summary": "The target directory path to find all partials to push.",
2182
2663
  "hasDynamicHelp": false,
2183
2664
  "multiple": false,
2184
2665
  "type": "option"
2185
2666
  },
2186
2667
  "commit": {
2187
2668
  "name": "commit",
2188
- "summary": "Push and commit the message type(s) at the same time",
2669
+ "summary": "Push and commit the partial(s) at the same time",
2189
2670
  "allowNo": false,
2190
2671
  "type": "boolean"
2191
2672
  },
@@ -2203,26 +2684,26 @@
2203
2684
  },
2204
2685
  "hasDynamicHelp": false,
2205
2686
  "hiddenAliases": [],
2206
- "id": "message-type:push",
2687
+ "id": "partial:push",
2207
2688
  "pluginAlias": "@knocklabs/cli",
2208
2689
  "pluginName": "@knocklabs/cli",
2209
2690
  "pluginType": "core",
2210
2691
  "strict": true,
2211
- "summary": "Push one or more message types from a local file system to Knock.",
2692
+ "summary": "Push one or more partials from a local file system to Knock.",
2212
2693
  "enableJsonFlag": false,
2213
2694
  "isESM": false,
2214
2695
  "relativePath": [
2215
2696
  "dist",
2216
2697
  "commands",
2217
- "message-type",
2698
+ "partial",
2218
2699
  "push.js"
2219
2700
  ]
2220
2701
  },
2221
- "message-type:validate": {
2702
+ "partial:validate": {
2222
2703
  "aliases": [],
2223
2704
  "args": {
2224
- "messageTypeKey": {
2225
- "name": "messageTypeKey",
2705
+ "partialKey": {
2706
+ "name": "partialKey",
2226
2707
  "required": false
2227
2708
  }
2228
2709
  },
@@ -2246,7 +2727,7 @@
2246
2727
  },
2247
2728
  "environment": {
2248
2729
  "name": "environment",
2249
- "summary": "Validating a message type is only done in the development environment",
2730
+ "summary": "Validating a partial is only done in the development environment",
2250
2731
  "default": "development",
2251
2732
  "hasDynamicHelp": false,
2252
2733
  "multiple": false,
@@ -2264,16 +2745,16 @@
2264
2745
  },
2265
2746
  "all": {
2266
2747
  "name": "all",
2267
- "summary": "Whether to validate all message types from the target directory.",
2748
+ "summary": "Whether to validate all partials from the target directory.",
2268
2749
  "allowNo": false,
2269
2750
  "type": "boolean"
2270
2751
  },
2271
- "message-types-dir": {
2752
+ "partials-dir": {
2272
2753
  "dependsOn": [
2273
2754
  "all"
2274
2755
  ],
2275
- "name": "message-types-dir",
2276
- "summary": "The target directory path to find all message types to validate.",
2756
+ "name": "partials-dir",
2757
+ "summary": "The target directory path to find all partials to validate.",
2277
2758
  "hasDynamicHelp": false,
2278
2759
  "multiple": false,
2279
2760
  "type": "option"
@@ -2281,26 +2762,27 @@
2281
2762
  },
2282
2763
  "hasDynamicHelp": false,
2283
2764
  "hiddenAliases": [],
2284
- "id": "message-type:validate",
2765
+ "id": "partial:validate",
2285
2766
  "pluginAlias": "@knocklabs/cli",
2286
2767
  "pluginName": "@knocklabs/cli",
2287
2768
  "pluginType": "core",
2288
2769
  "strict": true,
2289
- "summary": "Validate one or more message types from a local file system.",
2770
+ "summary": "Validate one or more partials from a local file system.",
2290
2771
  "enableJsonFlag": false,
2291
2772
  "isESM": false,
2292
2773
  "relativePath": [
2293
2774
  "dist",
2294
2775
  "commands",
2295
- "message-type",
2776
+ "partial",
2296
2777
  "validate.js"
2297
2778
  ]
2298
2779
  },
2299
- "partial:get": {
2780
+ "translation:get": {
2300
2781
  "aliases": [],
2301
2782
  "args": {
2302
- "partialKey": {
2303
- "name": "partialKey",
2783
+ "translationRef": {
2784
+ "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`.",
2785
+ "name": "translationRef",
2304
2786
  "required": true
2305
2787
  }
2306
2788
  },
@@ -2349,26 +2831,39 @@
2349
2831
  "summary": "Hide any uncommitted changes.",
2350
2832
  "allowNo": false,
2351
2833
  "type": "boolean"
2352
- }
2353
- },
2354
- "hasDynamicHelp": false,
2355
- "hiddenAliases": [],
2356
- "id": "partial:get",
2357
- "pluginAlias": "@knocklabs/cli",
2358
- "pluginName": "@knocklabs/cli",
2359
- "pluginType": "core",
2834
+ },
2835
+ "format": {
2836
+ "name": "format",
2837
+ "summary": "Specify the output format of the returned translations.",
2838
+ "default": "json",
2839
+ "hasDynamicHelp": false,
2840
+ "multiple": false,
2841
+ "options": [
2842
+ "json",
2843
+ "po"
2844
+ ],
2845
+ "type": "option"
2846
+ }
2847
+ },
2848
+ "hasDynamicHelp": false,
2849
+ "hiddenAliases": [],
2850
+ "id": "translation:get",
2851
+ "pluginAlias": "@knocklabs/cli",
2852
+ "pluginName": "@knocklabs/cli",
2853
+ "pluginType": "core",
2360
2854
  "strict": true,
2361
- "summary": "Display a single partial from an environment.",
2855
+ "summary": "Display a single translation from an environment.",
2362
2856
  "enableJsonFlag": true,
2857
+ "verifyFeatureEnabled": "translations",
2363
2858
  "isESM": false,
2364
2859
  "relativePath": [
2365
2860
  "dist",
2366
2861
  "commands",
2367
- "partial",
2862
+ "translation",
2368
2863
  "get.js"
2369
2864
  ]
2370
2865
  },
2371
- "partial:list": {
2866
+ "translation:list": {
2372
2867
  "aliases": [],
2373
2868
  "args": {},
2374
2869
  "flags": {
@@ -2441,26 +2936,28 @@
2441
2936
  },
2442
2937
  "hasDynamicHelp": false,
2443
2938
  "hiddenAliases": [],
2444
- "id": "partial:list",
2939
+ "id": "translation:list",
2445
2940
  "pluginAlias": "@knocklabs/cli",
2446
2941
  "pluginName": "@knocklabs/cli",
2447
2942
  "pluginType": "core",
2448
2943
  "strict": true,
2449
- "summary": "Display all partials for an environment.",
2944
+ "summary": "Display all translations for an environment.",
2450
2945
  "enableJsonFlag": true,
2946
+ "verifyFeatureEnabled": "translations",
2451
2947
  "isESM": false,
2452
2948
  "relativePath": [
2453
2949
  "dist",
2454
2950
  "commands",
2455
- "partial",
2951
+ "translation",
2456
2952
  "list.js"
2457
2953
  ]
2458
2954
  },
2459
- "partial:pull": {
2955
+ "translation:pull": {
2460
2956
  "aliases": [],
2461
2957
  "args": {
2462
- "partialKey": {
2463
- "name": "partialKey",
2958
+ "translationRef": {
2959
+ "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`.",
2960
+ "name": "translationRef",
2464
2961
  "required": false
2465
2962
  }
2466
2963
  },
@@ -2499,16 +2996,16 @@
2499
2996
  },
2500
2997
  "all": {
2501
2998
  "name": "all",
2502
- "summary": "Whether to pull all partials from the specified environment.",
2999
+ "summary": "Whether to pull all translations from the specified environment.",
2503
3000
  "allowNo": false,
2504
3001
  "type": "boolean"
2505
3002
  },
2506
- "partials-dir": {
3003
+ "translations-dir": {
2507
3004
  "dependsOn": [
2508
3005
  "all"
2509
3006
  ],
2510
- "name": "partials-dir",
2511
- "summary": "The target directory path to pull all partials into.",
3007
+ "name": "translations-dir",
3008
+ "summary": "The target directory path to pull all translations into.",
2512
3009
  "hasDynamicHelp": false,
2513
3010
  "multiple": false,
2514
3011
  "type": "option"
@@ -2524,30 +3021,44 @@
2524
3021
  "summary": "Remove the confirmation prompt.",
2525
3022
  "allowNo": false,
2526
3023
  "type": "boolean"
3024
+ },
3025
+ "format": {
3026
+ "name": "format",
3027
+ "summary": "Specify the output format of the returned translations.",
3028
+ "default": "json",
3029
+ "hasDynamicHelp": false,
3030
+ "multiple": false,
3031
+ "options": [
3032
+ "json",
3033
+ "po"
3034
+ ],
3035
+ "type": "option"
2527
3036
  }
2528
3037
  },
2529
3038
  "hasDynamicHelp": false,
2530
3039
  "hiddenAliases": [],
2531
- "id": "partial:pull",
3040
+ "id": "translation:pull",
2532
3041
  "pluginAlias": "@knocklabs/cli",
2533
3042
  "pluginName": "@knocklabs/cli",
2534
3043
  "pluginType": "core",
2535
3044
  "strict": true,
2536
- "summary": "Pull one or more partial from an environment into a local file system.",
3045
+ "summary": "Pull one or more translations from an environment into a local file system.",
2537
3046
  "enableJsonFlag": false,
3047
+ "verifyFeatureEnabled": "translations",
2538
3048
  "isESM": false,
2539
3049
  "relativePath": [
2540
3050
  "dist",
2541
3051
  "commands",
2542
- "partial",
3052
+ "translation",
2543
3053
  "pull.js"
2544
3054
  ]
2545
3055
  },
2546
- "partial:push": {
3056
+ "translation:push": {
2547
3057
  "aliases": [],
2548
3058
  "args": {
2549
- "partialKey": {
2550
- "name": "partialKey",
3059
+ "translationRef": {
3060
+ "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`.",
3061
+ "name": "translationRef",
2551
3062
  "required": false
2552
3063
  }
2553
3064
  },
@@ -2571,7 +3082,7 @@
2571
3082
  },
2572
3083
  "environment": {
2573
3084
  "name": "environment",
2574
- "summary": "Pushing a partial is only allowed in the development environment",
3085
+ "summary": "Pushing a translation is only allowed in the development environment",
2575
3086
  "default": "development",
2576
3087
  "hasDynamicHelp": false,
2577
3088
  "multiple": false,
@@ -2589,23 +3100,23 @@
2589
3100
  },
2590
3101
  "all": {
2591
3102
  "name": "all",
2592
- "summary": "Whether to push all partials from the target directory.",
3103
+ "summary": "Whether to push all translations from the target directory.",
2593
3104
  "allowNo": false,
2594
3105
  "type": "boolean"
2595
3106
  },
2596
- "partials-dir": {
3107
+ "translations-dir": {
2597
3108
  "dependsOn": [
2598
3109
  "all"
2599
3110
  ],
2600
- "name": "partials-dir",
2601
- "summary": "The target directory path to find all partials to push.",
3111
+ "name": "translations-dir",
3112
+ "summary": "The target directory path to find all translations to push.",
2602
3113
  "hasDynamicHelp": false,
2603
3114
  "multiple": false,
2604
3115
  "type": "option"
2605
3116
  },
2606
3117
  "commit": {
2607
3118
  "name": "commit",
2608
- "summary": "Push and commit the partial(s) at the same time",
3119
+ "summary": "Push and commit the translation(s) at the same time",
2609
3120
  "allowNo": false,
2610
3121
  "type": "boolean"
2611
3122
  },
@@ -2623,26 +3134,28 @@
2623
3134
  },
2624
3135
  "hasDynamicHelp": false,
2625
3136
  "hiddenAliases": [],
2626
- "id": "partial:push",
3137
+ "id": "translation:push",
2627
3138
  "pluginAlias": "@knocklabs/cli",
2628
3139
  "pluginName": "@knocklabs/cli",
2629
3140
  "pluginType": "core",
2630
3141
  "strict": true,
2631
- "summary": "Push one or more partials from a local file system to Knock.",
3142
+ "summary": "Push one or more translations from a local file system to Knock.",
2632
3143
  "enableJsonFlag": false,
3144
+ "verifyFeatureEnabled": "translations",
2633
3145
  "isESM": false,
2634
3146
  "relativePath": [
2635
3147
  "dist",
2636
3148
  "commands",
2637
- "partial",
3149
+ "translation",
2638
3150
  "push.js"
2639
3151
  ]
2640
3152
  },
2641
- "partial:validate": {
3153
+ "translation:validate": {
2642
3154
  "aliases": [],
2643
3155
  "args": {
2644
- "partialKey": {
2645
- "name": "partialKey",
3156
+ "translationRef": {
3157
+ "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`.",
3158
+ "name": "translationRef",
2646
3159
  "required": false
2647
3160
  }
2648
3161
  },
@@ -2666,7 +3179,7 @@
2666
3179
  },
2667
3180
  "environment": {
2668
3181
  "name": "environment",
2669
- "summary": "Validating a partial is only done in the development environment",
3182
+ "summary": "Validating a translation is only done in the development environment",
2670
3183
  "default": "development",
2671
3184
  "hasDynamicHelp": false,
2672
3185
  "multiple": false,
@@ -2684,16 +3197,16 @@
2684
3197
  },
2685
3198
  "all": {
2686
3199
  "name": "all",
2687
- "summary": "Whether to validate all partials from the target directory.",
3200
+ "summary": "Whether to validate all translations from the target directory.",
2688
3201
  "allowNo": false,
2689
3202
  "type": "boolean"
2690
3203
  },
2691
- "partials-dir": {
3204
+ "translations-dir": {
2692
3205
  "dependsOn": [
2693
3206
  "all"
2694
3207
  ],
2695
- "name": "partials-dir",
2696
- "summary": "The target directory path to find all partials to validate.",
3208
+ "name": "translations-dir",
3209
+ "summary": "The target directory path to find all translations to validate.",
2697
3210
  "hasDynamicHelp": false,
2698
3211
  "multiple": false,
2699
3212
  "type": "option"
@@ -2701,31 +3214,38 @@
2701
3214
  },
2702
3215
  "hasDynamicHelp": false,
2703
3216
  "hiddenAliases": [],
2704
- "id": "partial:validate",
3217
+ "id": "translation:validate",
2705
3218
  "pluginAlias": "@knocklabs/cli",
2706
3219
  "pluginName": "@knocklabs/cli",
2707
3220
  "pluginType": "core",
2708
3221
  "strict": true,
2709
- "summary": "Validate one or more partials from a local file system.",
3222
+ "summary": "Validate one or more translations from a local file system.",
2710
3223
  "enableJsonFlag": false,
3224
+ "verifyFeatureEnabled": "translations",
2711
3225
  "isESM": false,
2712
3226
  "relativePath": [
2713
3227
  "dist",
2714
3228
  "commands",
2715
- "partial",
3229
+ "translation",
2716
3230
  "validate.js"
2717
3231
  ]
2718
3232
  },
2719
- "workflow:activate": {
3233
+ "message-type:get": {
2720
3234
  "aliases": [],
2721
3235
  "args": {
2722
- "workflowKey": {
2723
- "name": "workflowKey",
3236
+ "messageTypeKey": {
3237
+ "name": "messageTypeKey",
2724
3238
  "required": true
2725
3239
  }
2726
3240
  },
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
3241
  "flags": {
3242
+ "json": {
3243
+ "description": "Format output as json.",
3244
+ "helpGroup": "GLOBAL",
3245
+ "name": "json",
3246
+ "allowNo": false,
3247
+ "type": "boolean"
3248
+ },
2729
3249
  "service-token": {
2730
3250
  "env": "KNOCK_SERVICE_TOKEN",
2731
3251
  "name": "service-token",
@@ -2745,8 +3265,8 @@
2745
3265
  },
2746
3266
  "environment": {
2747
3267
  "name": "environment",
2748
- "required": true,
2749
3268
  "summary": "The environment to use.",
3269
+ "default": "development",
2750
3270
  "hasDynamicHelp": false,
2751
3271
  "multiple": false,
2752
3272
  "type": "option"
@@ -2758,47 +3278,41 @@
2758
3278
  "multiple": false,
2759
3279
  "type": "option"
2760
3280
  },
2761
- "status": {
2762
- "name": "status",
2763
- "summary": "The workflow active status to set.",
2764
- "default": true,
2765
- "hasDynamicHelp": false,
2766
- "multiple": false,
2767
- "options": [
2768
- "true",
2769
- "false"
2770
- ],
2771
- "type": "option"
2772
- },
2773
- "force": {
2774
- "name": "force",
2775
- "summary": "Remove the confirmation prompt.",
3281
+ "hide-uncommitted-changes": {
3282
+ "name": "hide-uncommitted-changes",
3283
+ "summary": "Hide any uncommitted changes.",
2776
3284
  "allowNo": false,
2777
3285
  "type": "boolean"
2778
3286
  }
2779
3287
  },
2780
3288
  "hasDynamicHelp": false,
2781
3289
  "hiddenAliases": [],
2782
- "id": "workflow:activate",
3290
+ "id": "message-type:get",
2783
3291
  "pluginAlias": "@knocklabs/cli",
2784
3292
  "pluginName": "@knocklabs/cli",
2785
3293
  "pluginType": "core",
2786
3294
  "strict": true,
2787
- "summary": "Activate or deactivate a workflow in a given environment.",
2788
- "enableJsonFlag": false,
3295
+ "summary": "Display a single in-app message type from an environment.",
3296
+ "enableJsonFlag": true,
2789
3297
  "isESM": false,
2790
3298
  "relativePath": [
2791
3299
  "dist",
2792
3300
  "commands",
2793
- "workflow",
2794
- "activate.js"
3301
+ "message-type",
3302
+ "get.js"
2795
3303
  ]
2796
3304
  },
2797
- "workflow:generate-types": {
3305
+ "message-type:list": {
2798
3306
  "aliases": [],
2799
3307
  "args": {},
2800
- "description": "Generate types for all workflows in an environment and write them to a file.",
2801
3308
  "flags": {
3309
+ "json": {
3310
+ "description": "Format output as json.",
3311
+ "helpGroup": "GLOBAL",
3312
+ "name": "json",
3313
+ "allowNo": false,
3314
+ "type": "boolean"
3315
+ },
2802
3316
  "service-token": {
2803
3317
  "env": "KNOCK_SERVICE_TOKEN",
2804
3318
  "name": "service-token",
@@ -2818,7 +3332,7 @@
2818
3332
  },
2819
3333
  "environment": {
2820
3334
  "name": "environment",
2821
- "summary": "Select the environment to generate types for.",
3335
+ "summary": "The environment to use.",
2822
3336
  "default": "development",
2823
3337
  "hasDynamicHelp": false,
2824
3338
  "multiple": false,
@@ -2831,10 +3345,29 @@
2831
3345
  "multiple": false,
2832
3346
  "type": "option"
2833
3347
  },
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.",
3348
+ "hide-uncommitted-changes": {
3349
+ "name": "hide-uncommitted-changes",
3350
+ "summary": "Hide any uncommitted changes.",
3351
+ "allowNo": false,
3352
+ "type": "boolean"
3353
+ },
3354
+ "after": {
3355
+ "name": "after",
3356
+ "summary": "The cursor after which to fetch the next page.",
3357
+ "hasDynamicHelp": false,
3358
+ "multiple": false,
3359
+ "type": "option"
3360
+ },
3361
+ "before": {
3362
+ "name": "before",
3363
+ "summary": "The cursor before which to fetch the previous page.",
3364
+ "hasDynamicHelp": false,
3365
+ "multiple": false,
3366
+ "type": "option"
3367
+ },
3368
+ "limit": {
3369
+ "name": "limit",
3370
+ "summary": "The total number of entries to fetch per page.",
2838
3371
  "hasDynamicHelp": false,
2839
3372
  "multiple": false,
2840
3373
  "type": "option"
@@ -2842,36 +3375,25 @@
2842
3375
  },
2843
3376
  "hasDynamicHelp": false,
2844
3377
  "hiddenAliases": [],
2845
- "id": "workflow:generate-types",
3378
+ "id": "message-type:list",
2846
3379
  "pluginAlias": "@knocklabs/cli",
2847
3380
  "pluginName": "@knocklabs/cli",
2848
3381
  "pluginType": "core",
2849
3382
  "strict": true,
2850
- "enableJsonFlag": false,
3383
+ "summary": "Display all in-app message types for an environment.",
3384
+ "enableJsonFlag": true,
2851
3385
  "isESM": false,
2852
3386
  "relativePath": [
2853
3387
  "dist",
2854
3388
  "commands",
2855
- "workflow",
2856
- "generate-types.js"
3389
+ "message-type",
3390
+ "list.js"
2857
3391
  ]
2858
3392
  },
2859
- "workflow:get": {
3393
+ "message-type:new": {
2860
3394
  "aliases": [],
2861
- "args": {
2862
- "workflowKey": {
2863
- "name": "workflowKey",
2864
- "required": true
2865
- }
2866
- },
3395
+ "args": {},
2867
3396
  "flags": {
2868
- "json": {
2869
- "description": "Format output as json.",
2870
- "helpGroup": "GLOBAL",
2871
- "name": "json",
2872
- "allowNo": false,
2873
- "type": "boolean"
2874
- },
2875
3397
  "service-token": {
2876
3398
  "env": "KNOCK_SERVICE_TOKEN",
2877
3399
  "name": "service-token",
@@ -2889,9 +3411,25 @@
2889
3411
  "multiple": false,
2890
3412
  "type": "option"
2891
3413
  },
3414
+ "name": {
3415
+ "char": "n",
3416
+ "name": "name",
3417
+ "summary": "The name of the message type",
3418
+ "hasDynamicHelp": false,
3419
+ "multiple": false,
3420
+ "type": "option"
3421
+ },
3422
+ "key": {
3423
+ "char": "k",
3424
+ "name": "key",
3425
+ "summary": "The key of the message type",
3426
+ "hasDynamicHelp": false,
3427
+ "multiple": false,
3428
+ "type": "option"
3429
+ },
2892
3430
  "environment": {
2893
3431
  "name": "environment",
2894
- "summary": "The environment to use.",
3432
+ "summary": "The environment to create the message type in. Defaults to development.",
2895
3433
  "default": "development",
2896
3434
  "hasDynamicHelp": false,
2897
3435
  "multiple": false,
@@ -2904,41 +3442,53 @@
2904
3442
  "multiple": false,
2905
3443
  "type": "option"
2906
3444
  },
2907
- "hide-uncommitted-changes": {
2908
- "name": "hide-uncommitted-changes",
2909
- "summary": "Hide any uncommitted changes.",
3445
+ "force": {
3446
+ "name": "force",
3447
+ "summary": "Force the creation of the message type directory without confirmation.",
3448
+ "allowNo": false,
3449
+ "type": "boolean"
3450
+ },
3451
+ "push": {
3452
+ "char": "p",
3453
+ "name": "push",
3454
+ "summary": "Whether or not to push the message type to Knock after creation.",
2910
3455
  "allowNo": false,
2911
3456
  "type": "boolean"
3457
+ },
3458
+ "template": {
3459
+ "name": "template",
3460
+ "summary": "The template to use for the message type. Should be `message-types/{key}`.",
3461
+ "hasDynamicHelp": false,
3462
+ "multiple": false,
3463
+ "type": "option"
2912
3464
  }
2913
3465
  },
2914
3466
  "hasDynamicHelp": false,
2915
3467
  "hiddenAliases": [],
2916
- "id": "workflow:get",
3468
+ "id": "message-type:new",
2917
3469
  "pluginAlias": "@knocklabs/cli",
2918
3470
  "pluginName": "@knocklabs/cli",
2919
3471
  "pluginType": "core",
2920
3472
  "strict": true,
2921
- "summary": "Display a single workflow from an environment.",
2922
- "enableJsonFlag": true,
3473
+ "summary": "Create a new message type with a minimal configuration.",
3474
+ "enableJsonFlag": false,
2923
3475
  "isESM": false,
2924
3476
  "relativePath": [
2925
3477
  "dist",
2926
3478
  "commands",
2927
- "workflow",
2928
- "get.js"
3479
+ "message-type",
3480
+ "new.js"
2929
3481
  ]
2930
3482
  },
2931
- "workflow:list": {
3483
+ "message-type:pull": {
2932
3484
  "aliases": [],
2933
- "args": {},
3485
+ "args": {
3486
+ "messageTypeKey": {
3487
+ "name": "messageTypeKey",
3488
+ "required": false
3489
+ }
3490
+ },
2934
3491
  "flags": {
2935
- "json": {
2936
- "description": "Format output as json.",
2937
- "helpGroup": "GLOBAL",
2938
- "name": "json",
2939
- "allowNo": false,
2940
- "type": "boolean"
2941
- },
2942
3492
  "service-token": {
2943
3493
  "env": "KNOCK_SERVICE_TOKEN",
2944
3494
  "name": "service-token",
@@ -2971,57 +3521,58 @@
2971
3521
  "multiple": false,
2972
3522
  "type": "option"
2973
3523
  },
2974
- "hide-uncommitted-changes": {
2975
- "name": "hide-uncommitted-changes",
2976
- "summary": "Hide any uncommitted changes.",
3524
+ "all": {
3525
+ "name": "all",
3526
+ "summary": "Whether to pull all in-app message types from the specified environment.",
2977
3527
  "allowNo": false,
2978
3528
  "type": "boolean"
2979
3529
  },
2980
- "after": {
2981
- "name": "after",
2982
- "summary": "The cursor after which to fetch the next page.",
3530
+ "message-types-dir": {
3531
+ "dependsOn": [
3532
+ "all"
3533
+ ],
3534
+ "name": "message-types-dir",
3535
+ "summary": "The target directory path to pull all in-app message types into.",
2983
3536
  "hasDynamicHelp": false,
2984
3537
  "multiple": false,
2985
3538
  "type": "option"
2986
3539
  },
2987
- "before": {
2988
- "name": "before",
2989
- "summary": "The cursor before which to fetch the previous page.",
2990
- "hasDynamicHelp": false,
2991
- "multiple": false,
2992
- "type": "option"
3540
+ "hide-uncommitted-changes": {
3541
+ "name": "hide-uncommitted-changes",
3542
+ "summary": "Hide any uncommitted changes.",
3543
+ "allowNo": false,
3544
+ "type": "boolean"
2993
3545
  },
2994
- "limit": {
2995
- "name": "limit",
2996
- "summary": "The total number of entries to fetch per page.",
2997
- "hasDynamicHelp": false,
2998
- "multiple": false,
2999
- "type": "option"
3546
+ "force": {
3547
+ "name": "force",
3548
+ "summary": "Remove the confirmation prompt.",
3549
+ "allowNo": false,
3550
+ "type": "boolean"
3000
3551
  }
3001
3552
  },
3002
3553
  "hasDynamicHelp": false,
3003
3554
  "hiddenAliases": [],
3004
- "id": "workflow:list",
3555
+ "id": "message-type:pull",
3005
3556
  "pluginAlias": "@knocklabs/cli",
3006
3557
  "pluginName": "@knocklabs/cli",
3007
3558
  "pluginType": "core",
3008
3559
  "strict": true,
3009
- "summary": "Display all workflows for an environment.",
3010
- "enableJsonFlag": true,
3560
+ "summary": "Pull one or more in-app message types from an environment into a local file system.",
3561
+ "enableJsonFlag": false,
3011
3562
  "isESM": false,
3012
3563
  "relativePath": [
3013
3564
  "dist",
3014
3565
  "commands",
3015
- "workflow",
3016
- "list.js"
3566
+ "message-type",
3567
+ "pull.js"
3017
3568
  ]
3018
3569
  },
3019
- "workflow:new": {
3570
+ "message-type:push": {
3020
3571
  "aliases": [],
3021
3572
  "args": {
3022
- "workflowKey": {
3023
- "name": "workflowKey",
3024
- "required": true
3573
+ "messageTypeKey": {
3574
+ "name": "messageTypeKey",
3575
+ "required": false
3025
3576
  }
3026
3577
  },
3027
3578
  "flags": {
@@ -3042,51 +3593,80 @@
3042
3593
  "multiple": false,
3043
3594
  "type": "option"
3044
3595
  },
3045
- "steps": {
3046
- "aliases": [
3047
- "step"
3596
+ "environment": {
3597
+ "name": "environment",
3598
+ "summary": "Pushing a message type is only allowed in the development environment",
3599
+ "default": "development",
3600
+ "hasDynamicHelp": false,
3601
+ "multiple": false,
3602
+ "options": [
3603
+ "development"
3048
3604
  ],
3049
- "name": "steps",
3605
+ "type": "option"
3606
+ },
3607
+ "branch": {
3608
+ "name": "branch",
3609
+ "summary": "The slug of the branch to use.",
3050
3610
  "hasDynamicHelp": false,
3051
3611
  "multiple": false,
3052
3612
  "type": "option"
3053
3613
  },
3054
- "force": {
3055
- "name": "force",
3614
+ "all": {
3615
+ "name": "all",
3616
+ "summary": "Whether to push all message types from the target directory.",
3056
3617
  "allowNo": false,
3057
3618
  "type": "boolean"
3058
3619
  },
3059
- "environment": {
3060
- "hidden": true,
3061
- "name": "environment",
3062
- "default": "development",
3620
+ "message-types-dir": {
3621
+ "dependsOn": [
3622
+ "all"
3623
+ ],
3624
+ "name": "message-types-dir",
3625
+ "summary": "The target directory path to find all message types to push.",
3626
+ "hasDynamicHelp": false,
3627
+ "multiple": false,
3628
+ "type": "option"
3629
+ },
3630
+ "commit": {
3631
+ "name": "commit",
3632
+ "summary": "Push and commit the message type(s) at the same time",
3633
+ "allowNo": false,
3634
+ "type": "boolean"
3635
+ },
3636
+ "commit-message": {
3637
+ "char": "m",
3638
+ "dependsOn": [
3639
+ "commit"
3640
+ ],
3641
+ "name": "commit-message",
3642
+ "summary": "Use the given value as the commit message",
3063
3643
  "hasDynamicHelp": false,
3064
3644
  "multiple": false,
3065
3645
  "type": "option"
3066
3646
  }
3067
3647
  },
3068
3648
  "hasDynamicHelp": false,
3069
- "hidden": true,
3070
3649
  "hiddenAliases": [],
3071
- "id": "workflow:new",
3650
+ "id": "message-type:push",
3072
3651
  "pluginAlias": "@knocklabs/cli",
3073
3652
  "pluginName": "@knocklabs/cli",
3074
3653
  "pluginType": "core",
3075
3654
  "strict": true,
3655
+ "summary": "Push one or more message types from a local file system to Knock.",
3076
3656
  "enableJsonFlag": false,
3077
3657
  "isESM": false,
3078
3658
  "relativePath": [
3079
3659
  "dist",
3080
3660
  "commands",
3081
- "workflow",
3082
- "new.js"
3661
+ "message-type",
3662
+ "push.js"
3083
3663
  ]
3084
3664
  },
3085
- "workflow:pull": {
3665
+ "message-type:validate": {
3086
3666
  "aliases": [],
3087
3667
  "args": {
3088
- "workflowKey": {
3089
- "name": "workflowKey",
3668
+ "messageTypeKey": {
3669
+ "name": "messageTypeKey",
3090
3670
  "required": false
3091
3671
  }
3092
3672
  },
@@ -3110,10 +3690,13 @@
3110
3690
  },
3111
3691
  "environment": {
3112
3692
  "name": "environment",
3113
- "summary": "The environment to use.",
3693
+ "summary": "Validating a message type is only done in the development environment",
3114
3694
  "default": "development",
3115
3695
  "hasDynamicHelp": false,
3116
3696
  "multiple": false,
3697
+ "options": [
3698
+ "development"
3699
+ ],
3117
3700
  "type": "option"
3118
3701
  },
3119
3702
  "branch": {
@@ -3125,58 +3708,47 @@
3125
3708
  },
3126
3709
  "all": {
3127
3710
  "name": "all",
3128
- "summary": "Whether to pull all workflows from the specified environment.",
3711
+ "summary": "Whether to validate all message types from the target directory.",
3129
3712
  "allowNo": false,
3130
3713
  "type": "boolean"
3131
3714
  },
3132
- "workflows-dir": {
3715
+ "message-types-dir": {
3133
3716
  "dependsOn": [
3134
3717
  "all"
3135
3718
  ],
3136
- "name": "workflows-dir",
3137
- "summary": "The target directory path to pull all workflows into.",
3719
+ "name": "message-types-dir",
3720
+ "summary": "The target directory path to find all message types to validate.",
3138
3721
  "hasDynamicHelp": false,
3139
3722
  "multiple": false,
3140
3723
  "type": "option"
3141
- },
3142
- "hide-uncommitted-changes": {
3143
- "name": "hide-uncommitted-changes",
3144
- "summary": "Hide any uncommitted changes.",
3145
- "allowNo": false,
3146
- "type": "boolean"
3147
- },
3148
- "force": {
3149
- "name": "force",
3150
- "summary": "Remove the confirmation prompt.",
3151
- "allowNo": false,
3152
- "type": "boolean"
3153
3724
  }
3154
3725
  },
3155
3726
  "hasDynamicHelp": false,
3156
3727
  "hiddenAliases": [],
3157
- "id": "workflow:pull",
3728
+ "id": "message-type:validate",
3158
3729
  "pluginAlias": "@knocklabs/cli",
3159
3730
  "pluginName": "@knocklabs/cli",
3160
3731
  "pluginType": "core",
3161
3732
  "strict": true,
3162
- "summary": "Pull one or more workflows from an environment into a local file system.",
3733
+ "summary": "Validate one or more message types from a local file system.",
3163
3734
  "enableJsonFlag": false,
3164
3735
  "isESM": false,
3165
3736
  "relativePath": [
3166
3737
  "dist",
3167
3738
  "commands",
3168
- "workflow",
3169
- "pull.js"
3739
+ "message-type",
3740
+ "validate.js"
3170
3741
  ]
3171
3742
  },
3172
- "workflow:push": {
3743
+ "workflow:activate": {
3173
3744
  "aliases": [],
3174
3745
  "args": {
3175
3746
  "workflowKey": {
3176
3747
  "name": "workflowKey",
3177
- "required": false
3748
+ "required": true
3178
3749
  }
3179
3750
  },
3751
+ "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.",
3180
3752
  "flags": {
3181
3753
  "service-token": {
3182
3754
  "env": "KNOCK_SERVICE_TOKEN",
@@ -3197,8 +3769,8 @@
3197
3769
  },
3198
3770
  "environment": {
3199
3771
  "name": "environment",
3200
- "summary": "The environment to push the workflow to. Defaults to development.",
3201
- "default": "development",
3772
+ "required": true,
3773
+ "summary": "The environment to use.",
3202
3774
  "hasDynamicHelp": false,
3203
3775
  "multiple": false,
3204
3776
  "type": "option"
@@ -3210,65 +3782,46 @@
3210
3782
  "multiple": false,
3211
3783
  "type": "option"
3212
3784
  },
3213
- "all": {
3214
- "name": "all",
3215
- "summary": "Whether to push all workflows from the target directory.",
3216
- "allowNo": false,
3217
- "type": "boolean"
3218
- },
3219
- "workflows-dir": {
3220
- "dependsOn": [
3221
- "all"
3222
- ],
3223
- "name": "workflows-dir",
3224
- "summary": "The target directory path to find all workflows to push.",
3785
+ "status": {
3786
+ "name": "status",
3787
+ "summary": "The workflow active status to set.",
3788
+ "default": true,
3225
3789
  "hasDynamicHelp": false,
3226
3790
  "multiple": false,
3791
+ "options": [
3792
+ "true",
3793
+ "false"
3794
+ ],
3227
3795
  "type": "option"
3228
3796
  },
3229
- "commit": {
3230
- "name": "commit",
3231
- "summary": "Push and commit the workflow(s) at the same time",
3797
+ "force": {
3798
+ "name": "force",
3799
+ "summary": "Remove the confirmation prompt.",
3232
3800
  "allowNo": false,
3233
3801
  "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",
3242
- "hasDynamicHelp": false,
3243
- "multiple": false,
3244
- "type": "option"
3245
3802
  }
3246
3803
  },
3247
3804
  "hasDynamicHelp": false,
3248
3805
  "hiddenAliases": [],
3249
- "id": "workflow:push",
3806
+ "id": "workflow:activate",
3250
3807
  "pluginAlias": "@knocklabs/cli",
3251
3808
  "pluginName": "@knocklabs/cli",
3252
3809
  "pluginType": "core",
3253
3810
  "strict": true,
3254
- "summary": "Push one or more workflows from a local file system to Knock.",
3811
+ "summary": "Activate or deactivate a workflow in a given environment.",
3255
3812
  "enableJsonFlag": false,
3256
3813
  "isESM": false,
3257
3814
  "relativePath": [
3258
3815
  "dist",
3259
3816
  "commands",
3260
3817
  "workflow",
3261
- "push.js"
3818
+ "activate.js"
3262
3819
  ]
3263
3820
  },
3264
- "workflow:run": {
3821
+ "workflow:generate-types": {
3265
3822
  "aliases": [],
3266
- "args": {
3267
- "workflowKey": {
3268
- "name": "workflowKey",
3269
- "required": true
3270
- }
3271
- },
3823
+ "args": {},
3824
+ "description": "Generate types for all workflows in an environment and write them to a file.",
3272
3825
  "flags": {
3273
3826
  "service-token": {
3274
3827
  "env": "KNOCK_SERVICE_TOKEN",
@@ -3289,7 +3842,7 @@
3289
3842
  },
3290
3843
  "environment": {
3291
3844
  "name": "environment",
3292
- "summary": "The environment in which to run the workflow",
3845
+ "summary": "Select the environment to generate types for.",
3293
3846
  "default": "development",
3294
3847
  "hasDynamicHelp": false,
3295
3848
  "multiple": false,
@@ -3302,65 +3855,114 @@
3302
3855
  "multiple": false,
3303
3856
  "type": "option"
3304
3857
  },
3305
- "recipients": {
3306
- "aliases": [
3307
- "recipient"
3308
- ],
3309
- "name": "recipients",
3858
+ "output-file": {
3859
+ "name": "output-file",
3310
3860
  "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.",
3861
+ "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.",
3312
3862
  "hasDynamicHelp": false,
3313
3863
  "multiple": false,
3314
3864
  "type": "option"
3865
+ }
3866
+ },
3867
+ "hasDynamicHelp": false,
3868
+ "hiddenAliases": [],
3869
+ "id": "workflow:generate-types",
3870
+ "pluginAlias": "@knocklabs/cli",
3871
+ "pluginName": "@knocklabs/cli",
3872
+ "pluginType": "core",
3873
+ "strict": true,
3874
+ "enableJsonFlag": false,
3875
+ "isESM": false,
3876
+ "relativePath": [
3877
+ "dist",
3878
+ "commands",
3879
+ "workflow",
3880
+ "generate-types.js"
3881
+ ]
3882
+ },
3883
+ "workflow:get": {
3884
+ "aliases": [],
3885
+ "args": {
3886
+ "workflowKey": {
3887
+ "name": "workflowKey",
3888
+ "required": true
3889
+ }
3890
+ },
3891
+ "flags": {
3892
+ "json": {
3893
+ "description": "Format output as json.",
3894
+ "helpGroup": "GLOBAL",
3895
+ "name": "json",
3896
+ "allowNo": false,
3897
+ "type": "boolean"
3315
3898
  },
3316
- "actor": {
3317
- "name": "actor",
3318
- "summary": "An actor id, or a JSON string of an actor object reference for the workflow run.",
3899
+ "service-token": {
3900
+ "env": "KNOCK_SERVICE_TOKEN",
3901
+ "name": "service-token",
3902
+ "required": false,
3903
+ "summary": "The service token to authenticate with.",
3319
3904
  "hasDynamicHelp": false,
3320
3905
  "multiple": false,
3321
3906
  "type": "option"
3322
3907
  },
3323
- "tenant": {
3324
- "name": "tenant",
3325
- "summary": "A tenant id for the workflow run.",
3908
+ "api-origin": {
3909
+ "hidden": true,
3910
+ "name": "api-origin",
3911
+ "required": false,
3326
3912
  "hasDynamicHelp": false,
3327
3913
  "multiple": false,
3328
3914
  "type": "option"
3329
3915
  },
3330
- "data": {
3331
- "name": "data",
3332
- "summary": "A JSON string of the data for this workflow",
3916
+ "environment": {
3917
+ "name": "environment",
3918
+ "summary": "The environment to use.",
3919
+ "default": "development",
3920
+ "hasDynamicHelp": false,
3921
+ "multiple": false,
3922
+ "type": "option"
3923
+ },
3924
+ "branch": {
3925
+ "name": "branch",
3926
+ "summary": "The slug of the branch to use.",
3333
3927
  "hasDynamicHelp": false,
3334
3928
  "multiple": false,
3335
3929
  "type": "option"
3930
+ },
3931
+ "hide-uncommitted-changes": {
3932
+ "name": "hide-uncommitted-changes",
3933
+ "summary": "Hide any uncommitted changes.",
3934
+ "allowNo": false,
3935
+ "type": "boolean"
3336
3936
  }
3337
3937
  },
3338
3938
  "hasDynamicHelp": false,
3339
3939
  "hiddenAliases": [],
3340
- "id": "workflow:run",
3940
+ "id": "workflow:get",
3341
3941
  "pluginAlias": "@knocklabs/cli",
3342
3942
  "pluginName": "@knocklabs/cli",
3343
3943
  "pluginType": "core",
3344
3944
  "strict": true,
3345
- "summary": "Test run a workflow using the latest version from Knock.",
3346
- "enableJsonFlag": false,
3945
+ "summary": "Display a single workflow from an environment.",
3946
+ "enableJsonFlag": true,
3347
3947
  "isESM": false,
3348
3948
  "relativePath": [
3349
3949
  "dist",
3350
3950
  "commands",
3351
3951
  "workflow",
3352
- "run.js"
3952
+ "get.js"
3353
3953
  ]
3354
3954
  },
3355
- "workflow:validate": {
3955
+ "workflow:list": {
3356
3956
  "aliases": [],
3357
- "args": {
3358
- "workflowKey": {
3359
- "name": "workflowKey",
3360
- "required": false
3361
- }
3362
- },
3957
+ "args": {},
3363
3958
  "flags": {
3959
+ "json": {
3960
+ "description": "Format output as json.",
3961
+ "helpGroup": "GLOBAL",
3962
+ "name": "json",
3963
+ "allowNo": false,
3964
+ "type": "boolean"
3965
+ },
3364
3966
  "service-token": {
3365
3967
  "env": "KNOCK_SERVICE_TOKEN",
3366
3968
  "name": "service-token",
@@ -3380,7 +3982,7 @@
3380
3982
  },
3381
3983
  "environment": {
3382
3984
  "name": "environment",
3383
- "summary": "The environment to validate the workflow in. Defaults to development.",
3985
+ "summary": "The environment to use.",
3384
3986
  "default": "development",
3385
3987
  "hasDynamicHelp": false,
3386
3988
  "multiple": false,
@@ -3393,18 +3995,29 @@
3393
3995
  "multiple": false,
3394
3996
  "type": "option"
3395
3997
  },
3396
- "all": {
3397
- "name": "all",
3398
- "summary": "Whether to validate all workflows from the target directory.",
3998
+ "hide-uncommitted-changes": {
3999
+ "name": "hide-uncommitted-changes",
4000
+ "summary": "Hide any uncommitted changes.",
3399
4001
  "allowNo": false,
3400
4002
  "type": "boolean"
3401
4003
  },
3402
- "workflows-dir": {
3403
- "dependsOn": [
3404
- "all"
3405
- ],
3406
- "name": "workflows-dir",
3407
- "summary": "The target directory path to find all workflows to validate.",
4004
+ "after": {
4005
+ "name": "after",
4006
+ "summary": "The cursor after which to fetch the next page.",
4007
+ "hasDynamicHelp": false,
4008
+ "multiple": false,
4009
+ "type": "option"
4010
+ },
4011
+ "before": {
4012
+ "name": "before",
4013
+ "summary": "The cursor before which to fetch the previous page.",
4014
+ "hasDynamicHelp": false,
4015
+ "multiple": false,
4016
+ "type": "option"
4017
+ },
4018
+ "limit": {
4019
+ "name": "limit",
4020
+ "summary": "The total number of entries to fetch per page.",
3408
4021
  "hasDynamicHelp": false,
3409
4022
  "multiple": false,
3410
4023
  "type": "option"
@@ -3412,38 +4025,25 @@
3412
4025
  },
3413
4026
  "hasDynamicHelp": false,
3414
4027
  "hiddenAliases": [],
3415
- "id": "workflow:validate",
4028
+ "id": "workflow:list",
3416
4029
  "pluginAlias": "@knocklabs/cli",
3417
4030
  "pluginName": "@knocklabs/cli",
3418
4031
  "pluginType": "core",
3419
4032
  "strict": true,
3420
- "summary": "Validate one or more workflows from a local file system.",
3421
- "enableJsonFlag": false,
4033
+ "summary": "Display all workflows for an environment.",
4034
+ "enableJsonFlag": true,
3422
4035
  "isESM": false,
3423
4036
  "relativePath": [
3424
4037
  "dist",
3425
4038
  "commands",
3426
4039
  "workflow",
3427
- "validate.js"
4040
+ "list.js"
3428
4041
  ]
3429
4042
  },
3430
- "translation:get": {
3431
- "aliases": [],
3432
- "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",
3436
- "required": true
3437
- }
3438
- },
3439
- "flags": {
3440
- "json": {
3441
- "description": "Format output as json.",
3442
- "helpGroup": "GLOBAL",
3443
- "name": "json",
3444
- "allowNo": false,
3445
- "type": "boolean"
3446
- },
4043
+ "workflow:new": {
4044
+ "aliases": [],
4045
+ "args": {},
4046
+ "flags": {
3447
4047
  "service-token": {
3448
4048
  "env": "KNOCK_SERVICE_TOKEN",
3449
4049
  "name": "service-token",
@@ -3461,9 +4061,33 @@
3461
4061
  "multiple": false,
3462
4062
  "type": "option"
3463
4063
  },
4064
+ "name": {
4065
+ "char": "n",
4066
+ "name": "name",
4067
+ "summary": "The name of the workflow",
4068
+ "hasDynamicHelp": false,
4069
+ "multiple": false,
4070
+ "type": "option"
4071
+ },
4072
+ "key": {
4073
+ "char": "k",
4074
+ "name": "key",
4075
+ "summary": "The key of the workflow",
4076
+ "hasDynamicHelp": false,
4077
+ "multiple": false,
4078
+ "type": "option"
4079
+ },
4080
+ "steps": {
4081
+ "char": "s",
4082
+ "name": "steps",
4083
+ "summary": "Comma-separated list of step types to include in the workflow",
4084
+ "hasDynamicHelp": false,
4085
+ "multiple": false,
4086
+ "type": "option"
4087
+ },
3464
4088
  "environment": {
3465
4089
  "name": "environment",
3466
- "summary": "The environment to use.",
4090
+ "summary": "The environment to create the workflow in. Defaults to development.",
3467
4091
  "default": "development",
3468
4092
  "hasDynamicHelp": false,
3469
4093
  "multiple": false,
@@ -3476,54 +4100,54 @@
3476
4100
  "multiple": false,
3477
4101
  "type": "option"
3478
4102
  },
3479
- "hide-uncommitted-changes": {
3480
- "name": "hide-uncommitted-changes",
3481
- "summary": "Hide any uncommitted changes.",
4103
+ "force": {
4104
+ "name": "force",
4105
+ "summary": "Force the creation of the workflow directory without confirmation.",
3482
4106
  "allowNo": false,
3483
4107
  "type": "boolean"
3484
4108
  },
3485
- "format": {
3486
- "name": "format",
3487
- "summary": "Specify the output format of the returned translations.",
3488
- "default": "json",
4109
+ "push": {
4110
+ "char": "p",
4111
+ "name": "push",
4112
+ "summary": "Whether or not to push the workflow to Knock after creation.",
4113
+ "allowNo": false,
4114
+ "type": "boolean"
4115
+ },
4116
+ "template": {
4117
+ "char": "t",
4118
+ "name": "template",
4119
+ "summary": "The template repository to use for the workflow. Should be `workflows/{type}`. You cannot use this flag with --steps.",
3489
4120
  "hasDynamicHelp": false,
3490
4121
  "multiple": false,
3491
- "options": [
3492
- "json",
3493
- "po"
3494
- ],
3495
4122
  "type": "option"
3496
4123
  }
3497
4124
  },
3498
4125
  "hasDynamicHelp": false,
3499
4126
  "hiddenAliases": [],
3500
- "id": "translation:get",
4127
+ "id": "workflow:new",
3501
4128
  "pluginAlias": "@knocklabs/cli",
3502
4129
  "pluginName": "@knocklabs/cli",
3503
4130
  "pluginType": "core",
3504
4131
  "strict": true,
3505
- "summary": "Display a single translation from an environment.",
3506
- "enableJsonFlag": true,
3507
- "verifyFeatureEnabled": "translations",
4132
+ "summary": "Create a new workflow with a minimal configuration.",
4133
+ "enableJsonFlag": false,
3508
4134
  "isESM": false,
3509
4135
  "relativePath": [
3510
4136
  "dist",
3511
4137
  "commands",
3512
- "translation",
3513
- "get.js"
4138
+ "workflow",
4139
+ "new.js"
3514
4140
  ]
3515
4141
  },
3516
- "translation:list": {
4142
+ "workflow:pull": {
3517
4143
  "aliases": [],
3518
- "args": {},
4144
+ "args": {
4145
+ "workflowKey": {
4146
+ "name": "workflowKey",
4147
+ "required": false
4148
+ }
4149
+ },
3519
4150
  "flags": {
3520
- "json": {
3521
- "description": "Format output as json.",
3522
- "helpGroup": "GLOBAL",
3523
- "name": "json",
3524
- "allowNo": false,
3525
- "type": "boolean"
3526
- },
3527
4151
  "service-token": {
3528
4152
  "env": "KNOCK_SERVICE_TOKEN",
3529
4153
  "name": "service-token",
@@ -3556,58 +4180,57 @@
3556
4180
  "multiple": false,
3557
4181
  "type": "option"
3558
4182
  },
3559
- "hide-uncommitted-changes": {
3560
- "name": "hide-uncommitted-changes",
3561
- "summary": "Hide any uncommitted changes.",
4183
+ "all": {
4184
+ "name": "all",
4185
+ "summary": "Whether to pull all workflows from the specified environment.",
3562
4186
  "allowNo": false,
3563
4187
  "type": "boolean"
3564
4188
  },
3565
- "after": {
3566
- "name": "after",
3567
- "summary": "The cursor after which to fetch the next page.",
4189
+ "workflows-dir": {
4190
+ "dependsOn": [
4191
+ "all"
4192
+ ],
4193
+ "name": "workflows-dir",
4194
+ "summary": "The target directory path to pull all workflows into.",
3568
4195
  "hasDynamicHelp": false,
3569
4196
  "multiple": false,
3570
4197
  "type": "option"
3571
4198
  },
3572
- "before": {
3573
- "name": "before",
3574
- "summary": "The cursor before which to fetch the previous page.",
3575
- "hasDynamicHelp": false,
3576
- "multiple": false,
3577
- "type": "option"
4199
+ "hide-uncommitted-changes": {
4200
+ "name": "hide-uncommitted-changes",
4201
+ "summary": "Hide any uncommitted changes.",
4202
+ "allowNo": false,
4203
+ "type": "boolean"
3578
4204
  },
3579
- "limit": {
3580
- "name": "limit",
3581
- "summary": "The total number of entries to fetch per page.",
3582
- "hasDynamicHelp": false,
3583
- "multiple": false,
3584
- "type": "option"
4205
+ "force": {
4206
+ "name": "force",
4207
+ "summary": "Remove the confirmation prompt.",
4208
+ "allowNo": false,
4209
+ "type": "boolean"
3585
4210
  }
3586
4211
  },
3587
4212
  "hasDynamicHelp": false,
3588
4213
  "hiddenAliases": [],
3589
- "id": "translation:list",
4214
+ "id": "workflow:pull",
3590
4215
  "pluginAlias": "@knocklabs/cli",
3591
4216
  "pluginName": "@knocklabs/cli",
3592
4217
  "pluginType": "core",
3593
4218
  "strict": true,
3594
- "summary": "Display all translations for an environment.",
3595
- "enableJsonFlag": true,
3596
- "verifyFeatureEnabled": "translations",
4219
+ "summary": "Pull one or more workflows from an environment into a local file system.",
4220
+ "enableJsonFlag": false,
3597
4221
  "isESM": false,
3598
4222
  "relativePath": [
3599
4223
  "dist",
3600
4224
  "commands",
3601
- "translation",
3602
- "list.js"
4225
+ "workflow",
4226
+ "pull.js"
3603
4227
  ]
3604
4228
  },
3605
- "translation:pull": {
4229
+ "workflow:push": {
3606
4230
  "aliases": [],
3607
4231
  "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",
4232
+ "workflowKey": {
4233
+ "name": "workflowKey",
3611
4234
  "required": false
3612
4235
  }
3613
4236
  },
@@ -3631,7 +4254,7 @@
3631
4254
  },
3632
4255
  "environment": {
3633
4256
  "name": "environment",
3634
- "summary": "The environment to use.",
4257
+ "summary": "The environment to push the workflow to. Defaults to development.",
3635
4258
  "default": "development",
3636
4259
  "hasDynamicHelp": false,
3637
4260
  "multiple": false,
@@ -3646,70 +4269,61 @@
3646
4269
  },
3647
4270
  "all": {
3648
4271
  "name": "all",
3649
- "summary": "Whether to pull all translations from the specified environment.",
4272
+ "summary": "Whether to push all workflows from the target directory.",
3650
4273
  "allowNo": false,
3651
4274
  "type": "boolean"
3652
4275
  },
3653
- "translations-dir": {
4276
+ "workflows-dir": {
3654
4277
  "dependsOn": [
3655
4278
  "all"
3656
4279
  ],
3657
- "name": "translations-dir",
3658
- "summary": "The target directory path to pull all translations into.",
4280
+ "name": "workflows-dir",
4281
+ "summary": "The target directory path to find all workflows to push.",
3659
4282
  "hasDynamicHelp": false,
3660
4283
  "multiple": false,
3661
4284
  "type": "option"
3662
4285
  },
3663
- "hide-uncommitted-changes": {
3664
- "name": "hide-uncommitted-changes",
3665
- "summary": "Hide any uncommitted changes.",
3666
- "allowNo": false,
3667
- "type": "boolean"
3668
- },
3669
- "force": {
3670
- "name": "force",
3671
- "summary": "Remove the confirmation prompt.",
4286
+ "commit": {
4287
+ "name": "commit",
4288
+ "summary": "Push and commit the workflow(s) at the same time",
3672
4289
  "allowNo": false,
3673
4290
  "type": "boolean"
3674
4291
  },
3675
- "format": {
3676
- "name": "format",
3677
- "summary": "Specify the output format of the returned translations.",
3678
- "default": "json",
4292
+ "commit-message": {
4293
+ "char": "m",
4294
+ "dependsOn": [
4295
+ "commit"
4296
+ ],
4297
+ "name": "commit-message",
4298
+ "summary": "Use the given value as the commit message",
3679
4299
  "hasDynamicHelp": false,
3680
4300
  "multiple": false,
3681
- "options": [
3682
- "json",
3683
- "po"
3684
- ],
3685
4301
  "type": "option"
3686
4302
  }
3687
4303
  },
3688
4304
  "hasDynamicHelp": false,
3689
4305
  "hiddenAliases": [],
3690
- "id": "translation:pull",
4306
+ "id": "workflow:push",
3691
4307
  "pluginAlias": "@knocklabs/cli",
3692
4308
  "pluginName": "@knocklabs/cli",
3693
4309
  "pluginType": "core",
3694
4310
  "strict": true,
3695
- "summary": "Pull one or more translations from an environment into a local file system.",
4311
+ "summary": "Push one or more workflows from a local file system to Knock.",
3696
4312
  "enableJsonFlag": false,
3697
- "verifyFeatureEnabled": "translations",
3698
4313
  "isESM": false,
3699
4314
  "relativePath": [
3700
4315
  "dist",
3701
4316
  "commands",
3702
- "translation",
3703
- "pull.js"
4317
+ "workflow",
4318
+ "push.js"
3704
4319
  ]
3705
4320
  },
3706
- "translation:push": {
4321
+ "workflow:run": {
3707
4322
  "aliases": [],
3708
4323
  "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",
3712
- "required": false
4324
+ "workflowKey": {
4325
+ "name": "workflowKey",
4326
+ "required": true
3713
4327
  }
3714
4328
  },
3715
4329
  "flags": {
@@ -3732,13 +4346,10 @@
3732
4346
  },
3733
4347
  "environment": {
3734
4348
  "name": "environment",
3735
- "summary": "Pushing a translation is only allowed in the development environment",
4349
+ "summary": "The environment in which to run the workflow",
3736
4350
  "default": "development",
3737
4351
  "hasDynamicHelp": false,
3738
4352
  "multiple": false,
3739
- "options": [
3740
- "development"
3741
- ],
3742
4353
  "type": "option"
3743
4354
  },
3744
4355
  "branch": {
@@ -3748,35 +4359,34 @@
3748
4359
  "multiple": false,
3749
4360
  "type": "option"
3750
4361
  },
3751
- "all": {
3752
- "name": "all",
3753
- "summary": "Whether to push all translations from the target directory.",
3754
- "allowNo": false,
3755
- "type": "boolean"
3756
- },
3757
- "translations-dir": {
3758
- "dependsOn": [
3759
- "all"
4362
+ "recipients": {
4363
+ "aliases": [
4364
+ "recipient"
3760
4365
  ],
3761
- "name": "translations-dir",
3762
- "summary": "The target directory path to find all translations to push.",
4366
+ "name": "recipients",
4367
+ "required": true,
4368
+ "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.",
3763
4369
  "hasDynamicHelp": false,
3764
4370
  "multiple": false,
3765
4371
  "type": "option"
3766
4372
  },
3767
- "commit": {
3768
- "name": "commit",
3769
- "summary": "Push and commit the translation(s) at the same time",
3770
- "allowNo": false,
3771
- "type": "boolean"
4373
+ "actor": {
4374
+ "name": "actor",
4375
+ "summary": "An actor id, or a JSON string of an actor object reference for the workflow run.",
4376
+ "hasDynamicHelp": false,
4377
+ "multiple": false,
4378
+ "type": "option"
3772
4379
  },
3773
- "commit-message": {
3774
- "char": "m",
3775
- "dependsOn": [
3776
- "commit"
3777
- ],
3778
- "name": "commit-message",
3779
- "summary": "Use the given value as the commit message",
4380
+ "tenant": {
4381
+ "name": "tenant",
4382
+ "summary": "A tenant id for the workflow run.",
4383
+ "hasDynamicHelp": false,
4384
+ "multiple": false,
4385
+ "type": "option"
4386
+ },
4387
+ "data": {
4388
+ "name": "data",
4389
+ "summary": "A JSON string of the data for this workflow",
3780
4390
  "hasDynamicHelp": false,
3781
4391
  "multiple": false,
3782
4392
  "type": "option"
@@ -3784,28 +4394,26 @@
3784
4394
  },
3785
4395
  "hasDynamicHelp": false,
3786
4396
  "hiddenAliases": [],
3787
- "id": "translation:push",
4397
+ "id": "workflow:run",
3788
4398
  "pluginAlias": "@knocklabs/cli",
3789
4399
  "pluginName": "@knocklabs/cli",
3790
4400
  "pluginType": "core",
3791
4401
  "strict": true,
3792
- "summary": "Push one or more translations from a local file system to Knock.",
4402
+ "summary": "Test run a workflow using the latest version from Knock.",
3793
4403
  "enableJsonFlag": false,
3794
- "verifyFeatureEnabled": "translations",
3795
4404
  "isESM": false,
3796
4405
  "relativePath": [
3797
4406
  "dist",
3798
4407
  "commands",
3799
- "translation",
3800
- "push.js"
4408
+ "workflow",
4409
+ "run.js"
3801
4410
  ]
3802
4411
  },
3803
- "translation:validate": {
4412
+ "workflow:validate": {
3804
4413
  "aliases": [],
3805
4414
  "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",
4415
+ "workflowKey": {
4416
+ "name": "workflowKey",
3809
4417
  "required": false
3810
4418
  }
3811
4419
  },
@@ -3829,13 +4437,10 @@
3829
4437
  },
3830
4438
  "environment": {
3831
4439
  "name": "environment",
3832
- "summary": "Validating a translation is only done in the development environment",
4440
+ "summary": "The environment to validate the workflow in. Defaults to development.",
3833
4441
  "default": "development",
3834
4442
  "hasDynamicHelp": false,
3835
4443
  "multiple": false,
3836
- "options": [
3837
- "development"
3838
- ],
3839
4444
  "type": "option"
3840
4445
  },
3841
4446
  "branch": {
@@ -3847,16 +4452,16 @@
3847
4452
  },
3848
4453
  "all": {
3849
4454
  "name": "all",
3850
- "summary": "Whether to validate all translations from the target directory.",
4455
+ "summary": "Whether to validate all workflows from the target directory.",
3851
4456
  "allowNo": false,
3852
4457
  "type": "boolean"
3853
4458
  },
3854
- "translations-dir": {
4459
+ "workflows-dir": {
3855
4460
  "dependsOn": [
3856
4461
  "all"
3857
4462
  ],
3858
- "name": "translations-dir",
3859
- "summary": "The target directory path to find all translations to validate.",
4463
+ "name": "workflows-dir",
4464
+ "summary": "The target directory path to find all workflows to validate.",
3860
4465
  "hasDynamicHelp": false,
3861
4466
  "multiple": false,
3862
4467
  "type": "option"
@@ -3864,22 +4469,21 @@
3864
4469
  },
3865
4470
  "hasDynamicHelp": false,
3866
4471
  "hiddenAliases": [],
3867
- "id": "translation:validate",
4472
+ "id": "workflow:validate",
3868
4473
  "pluginAlias": "@knocklabs/cli",
3869
4474
  "pluginName": "@knocklabs/cli",
3870
4475
  "pluginType": "core",
3871
4476
  "strict": true,
3872
- "summary": "Validate one or more translations from a local file system.",
4477
+ "summary": "Validate one or more workflows from a local file system.",
3873
4478
  "enableJsonFlag": false,
3874
- "verifyFeatureEnabled": "translations",
3875
4479
  "isESM": false,
3876
4480
  "relativePath": [
3877
4481
  "dist",
3878
4482
  "commands",
3879
- "translation",
4483
+ "workflow",
3880
4484
  "validate.js"
3881
4485
  ]
3882
4486
  }
3883
4487
  },
3884
- "version": "0.3.1"
4488
+ "version": "1.0.0-rc.1"
3885
4489
  }