@w6w/cli 0.5.0 → 0.9.8

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.
@@ -17,7 +17,7 @@
17
17
  /** The command tree, generated from the shared wrapper surface contract. */
18
18
  export const HELP_TREE = {
19
19
  "binary": "w6w",
20
- "contractVersion": "0.2.0",
20
+ "contractVersion": "0.6.0",
21
21
  "tagline": "command-line client for the w6w workflow platform",
22
22
  "usage": "w6w <command> [options]",
23
23
  "docsUrl": "https://w6w.dev/docs/cli",
@@ -72,7 +72,7 @@ export const HELP_TREE = {
72
72
  "name": "urn",
73
73
  "kind": "argument",
74
74
  "display": "<urn>",
75
- "description": "conn_… | wf_… | fn_… | ep_… (see: w6w connections list, w6w workflows list)",
75
+ "description": "conn_… | wf_… | fn_… | ep_… | an alias name (see: w6w connections list, w6w workflows list)",
76
76
  "required": true,
77
77
  },
78
78
  {
@@ -152,8 +152,8 @@ export const HELP_TREE = {
152
152
  },
153
153
  {
154
154
  "name": "workflows",
155
- "summary": "List and run workflows",
156
- "headline": "list and run workflows",
155
+ "summary": "List, run and edit workflows",
156
+ "headline": "list, run and edit workflows",
157
157
  "usage": "w6w workflows <command> [options]",
158
158
  "commands": [
159
159
  {
@@ -260,6 +260,248 @@ export const HELP_TREE = {
260
260
  'A run that finished with status "failed" exits 3, so --wait is usable in CI without parsing stdout.',
261
261
  ],
262
262
  },
263
+ {
264
+ "operation": "workflows.cancel",
265
+ "path": [
266
+ "workflows",
267
+ "cancel",
268
+ ],
269
+ "name": "cancel",
270
+ "aliases": [],
271
+ "summary": "Cancel a queued or running workflow run.",
272
+ "short": "Cancel a queued or running workflow run",
273
+ "headline": "cancel a queued or running workflow run",
274
+ "usage": "w6w workflows cancel <id> [options]",
275
+ "naming": "w6w workflows cancel <id>",
276
+ "status": "required",
277
+ "params": [
278
+ {
279
+ "name": "id",
280
+ "kind": "argument",
281
+ "display": "<id>",
282
+ "description": "Run id (see: w6w workflows run)",
283
+ "required": true,
284
+ },
285
+ {
286
+ "name": "json",
287
+ "kind": "flag",
288
+ "display": "--json",
289
+ "description": "Output raw JSON instead of a table",
290
+ "required": false,
291
+ },
292
+ ],
293
+ "examples": [
294
+ "w6w workflows cancel run_01HQ8N",
295
+ ],
296
+ "notes": [],
297
+ },
298
+ {
299
+ "operation": "workflows.get",
300
+ "path": [
301
+ "workflows",
302
+ "get",
303
+ ],
304
+ "name": "get",
305
+ "aliases": [],
306
+ "summary": "Fetch one workflow's stored definition.",
307
+ "short": "Fetch one workflow's stored definition",
308
+ "headline": "fetch one workflow's stored definition",
309
+ "usage": "w6w workflows get <id> [options]",
310
+ "naming": "w6w workflows get <id>",
311
+ "status": "required",
312
+ "params": [
313
+ {
314
+ "name": "id",
315
+ "kind": "argument",
316
+ "display": "<id>",
317
+ "description": "Workflow id (see: w6w workflows list)",
318
+ "required": true,
319
+ },
320
+ {
321
+ "name": "json",
322
+ "kind": "flag",
323
+ "display": "--json",
324
+ "description": "Output raw JSON instead of a table",
325
+ "required": false,
326
+ },
327
+ ],
328
+ "examples": [
329
+ "w6w workflows get wf_01HQ8N",
330
+ "w6w workflows get wf_01HQ8N --json",
331
+ ],
332
+ "notes": [],
333
+ },
334
+ {
335
+ "operation": "workflows.create",
336
+ "path": [
337
+ "workflows",
338
+ "create",
339
+ ],
340
+ "name": "create",
341
+ "aliases": [],
342
+ "summary": "Create a workflow definition.",
343
+ "short": "Create a workflow definition",
344
+ "headline": "create a workflow definition",
345
+ "usage": "w6w workflows create --definition <json> [options]",
346
+ "naming": "w6w workflows create --definition <json> [--project <id>]",
347
+ "status": "required",
348
+ "params": [
349
+ {
350
+ "name": "definition",
351
+ "kind": "flag",
352
+ "display": "--definition <json>",
353
+ "description": "The whole definition, as a JSON object",
354
+ "required": true,
355
+ },
356
+ {
357
+ "name": "project",
358
+ "kind": "flag",
359
+ "display": "--project <id>",
360
+ "description": "Project to scope to (default: the account's default project)",
361
+ "required": false,
362
+ },
363
+ {
364
+ "name": "json",
365
+ "kind": "flag",
366
+ "display": "--json",
367
+ "description": "Output raw JSON instead of a table",
368
+ "required": false,
369
+ },
370
+ ],
371
+ "examples": [
372
+ 'w6w workflows create --definition \'{"manifestVersion":"2","name":"nightly","steps":[]}\'',
373
+ 'w6w workflows create --definition "$(cat workflow.json)" --project prj_01HQ8N',
374
+ ],
375
+ "notes": [],
376
+ },
377
+ {
378
+ "operation": "workflows.update",
379
+ "path": [
380
+ "workflows",
381
+ "update",
382
+ ],
383
+ "name": "update",
384
+ "aliases": [],
385
+ "summary": "Overwrite a workflow definition.",
386
+ "short": "Overwrite a workflow definition",
387
+ "headline": "overwrite a workflow definition",
388
+ "usage": "w6w workflows update <id> --definition <json> [options]",
389
+ "naming": "w6w workflows update <id> --definition <json> [--project <id>] [--if-unmodified-since <ts>]",
390
+ "status": "required",
391
+ "params": [
392
+ {
393
+ "name": "id",
394
+ "kind": "argument",
395
+ "display": "<id>",
396
+ "description": "Workflow id (see: w6w workflows list)",
397
+ "required": true,
398
+ },
399
+ {
400
+ "name": "definition",
401
+ "kind": "flag",
402
+ "display": "--definition <json>",
403
+ "description": "The whole definition, as a JSON object",
404
+ "required": true,
405
+ },
406
+ {
407
+ "name": "project",
408
+ "kind": "flag",
409
+ "display": "--project <id>",
410
+ "description": "Project to scope to (default: the account's default project)",
411
+ "required": false,
412
+ },
413
+ {
414
+ "name": "ifUnmodifiedSince",
415
+ "kind": "flag",
416
+ "display": "--if-unmodified-since <ts>",
417
+ "description": "Refuse the write if the workflow changed since this updatedAt (see: w6w workflows get)",
418
+ "required": false,
419
+ },
420
+ {
421
+ "name": "json",
422
+ "kind": "flag",
423
+ "display": "--json",
424
+ "description": "Output raw JSON instead of a table",
425
+ "required": false,
426
+ },
427
+ ],
428
+ "examples": [
429
+ 'w6w workflows update wf_01HQ8N --definition "$(cat workflow.json)"',
430
+ 'w6w workflows update wf_01HQ8N --definition "$(cat workflow.json)" --if-unmodified-since 2026-08-22T09:00:00.000Z',
431
+ ],
432
+ "notes": [],
433
+ },
434
+ {
435
+ "operation": "workflows.archive",
436
+ "path": [
437
+ "workflows",
438
+ "archive",
439
+ ],
440
+ "name": "archive",
441
+ "aliases": [],
442
+ "summary": "Archive a workflow — the required step before deleting it.",
443
+ "short": "Archive a workflow",
444
+ "headline": "archive a workflow — the required step before deleting it",
445
+ "usage": "w6w workflows archive <id> [options]",
446
+ "naming": "w6w workflows archive <id>",
447
+ "status": "required",
448
+ "params": [
449
+ {
450
+ "name": "id",
451
+ "kind": "argument",
452
+ "display": "<id>",
453
+ "description": "Workflow id (see: w6w workflows list)",
454
+ "required": true,
455
+ },
456
+ {
457
+ "name": "json",
458
+ "kind": "flag",
459
+ "display": "--json",
460
+ "description": "Output raw JSON instead of a table",
461
+ "required": false,
462
+ },
463
+ ],
464
+ "examples": [
465
+ "w6w workflows archive wf_01HQ8N",
466
+ ],
467
+ "notes": [],
468
+ },
469
+ {
470
+ "operation": "workflows.delete",
471
+ "path": [
472
+ "workflows",
473
+ "delete",
474
+ ],
475
+ "name": "delete",
476
+ "aliases": [],
477
+ "summary": "Delete an archived workflow.",
478
+ "short": "Delete an archived workflow",
479
+ "headline": "delete an archived workflow",
480
+ "usage": "w6w workflows delete <id> [options]",
481
+ "naming": "w6w workflows delete <id>",
482
+ "status": "required",
483
+ "params": [
484
+ {
485
+ "name": "id",
486
+ "kind": "argument",
487
+ "display": "<id>",
488
+ "description": "Workflow id (see: w6w workflows list)",
489
+ "required": true,
490
+ },
491
+ {
492
+ "name": "json",
493
+ "kind": "flag",
494
+ "display": "--json",
495
+ "description": "Output raw JSON instead of a table",
496
+ "required": false,
497
+ },
498
+ ],
499
+ "examples": [
500
+ "w6w workflows archive wf_01HQ8N",
501
+ "w6w workflows delete wf_01HQ8N",
502
+ ],
503
+ "notes": [],
504
+ },
263
505
  ],
264
506
  "options": [],
265
507
  "examples": [
@@ -834,81 +1076,609 @@ export const HELP_TREE = {
834
1076
  "w6w vars create greeting --type string --value hello",
835
1077
  ],
836
1078
  },
837
- ],
838
- "globalFlags": [
839
- {
840
- "name": "--base-url",
841
- "alias": null,
842
- "type": "string",
843
- "env": "W6W_BASE_URL",
844
- "display": "--base-url <url>",
845
- "description": "API base URL (env: W6W_BASE_URL)",
846
- },
847
1079
  {
848
- "name": "--token",
849
- "alias": null,
850
- "type": "string",
851
- "env": "W6W_TOKEN",
852
- "display": "--token <token>",
853
- "description": "API token (env: W6W_TOKEN)",
854
- },
855
- {
856
- "name": "--json",
857
- "alias": null,
858
- "type": "boolean",
859
- "env": null,
860
- "display": "--json",
861
- "description": "Output raw JSON instead of a table",
862
- },
863
- {
864
- "name": "--no-color",
865
- "alias": null,
866
- "type": "boolean",
867
- "env": null,
868
- "display": "--no-color",
869
- "description": "Disable colored output",
870
- },
871
- {
872
- "name": "--version",
873
- "alias": "-v",
874
- "type": "boolean",
875
- "env": null,
876
- "display": "-v, --version",
877
- "description": "Print the CLI version",
878
- },
879
- {
880
- "name": "--help",
881
- "alias": "-h",
882
- "type": "boolean",
883
- "env": null,
884
- "display": "-h, --help",
885
- "description": "Show help for any command",
886
- },
887
- ],
888
- "examples": [
889
- "w6w me",
890
- "w6w workflows list",
891
- "w6w workflows run wf_01H… --wait",
892
- "w6w documents list",
893
- "w6w vars create greeting --type string --value hello",
894
- 'w6w run conn_01H… --action send_email --payload \'{"to":"a@b.com"}\'',
895
- ],
896
- };
897
- /** Every command path the parser may match, aliases included. */
898
- export const COMMAND_PATHS = [
899
- [
900
- "me",
901
- ],
902
- [
903
- "info",
904
- ],
905
- [
906
- "run",
907
- ],
908
- [
909
- "connections",
910
- "list",
911
- ],
1080
+ "name": "functions",
1081
+ "summary": "Run and edit functions",
1082
+ "headline": "run and edit functions",
1083
+ "usage": "w6w functions <command> [options]",
1084
+ "commands": [
1085
+ {
1086
+ "operation": "functions.run",
1087
+ "path": [
1088
+ "functions",
1089
+ "run",
1090
+ ],
1091
+ "name": "run",
1092
+ "aliases": [],
1093
+ "summary": "Run one Function by its key (or id) and return its output.",
1094
+ "short": "Run one Function by its key (or id) and return its output",
1095
+ "headline": "run one Function by its key (or id) and return its output",
1096
+ "usage": "w6w functions run --id-or-key <value> [options]",
1097
+ "naming": "w6w functions run <name> [--payload <json>]",
1098
+ "status": "required",
1099
+ "params": [
1100
+ {
1101
+ "name": "idOrKey",
1102
+ "kind": "flag",
1103
+ "display": "--id-or-key <value>",
1104
+ "description": "Function key or id (e.g. send-email)",
1105
+ "required": true,
1106
+ },
1107
+ {
1108
+ "name": "inputs",
1109
+ "kind": "flag",
1110
+ "display": "--inputs <value>",
1111
+ "description": "The Function's inputs, as a JSON object",
1112
+ "required": false,
1113
+ },
1114
+ {
1115
+ "name": "json",
1116
+ "kind": "flag",
1117
+ "display": "--json",
1118
+ "description": "Output raw JSON instead of a table",
1119
+ "required": false,
1120
+ },
1121
+ ],
1122
+ "examples": [
1123
+ "w6w functions run send-email",
1124
+ 'w6w functions run send-email --payload \'{"to":"a@b.com"}\'',
1125
+ "w6w functions run fn_01HQ8N --json",
1126
+ ],
1127
+ "notes": [],
1128
+ },
1129
+ {
1130
+ "operation": "functions.list",
1131
+ "path": [
1132
+ "functions",
1133
+ "list",
1134
+ ],
1135
+ "name": "list",
1136
+ "aliases": [],
1137
+ "summary": "List the caller's Function definitions.",
1138
+ "short": "List the caller's Function definitions",
1139
+ "headline": "list the caller's Function definitions",
1140
+ "usage": "w6w functions list [options]",
1141
+ "naming": "w6w functions list",
1142
+ "status": "required",
1143
+ "params": [
1144
+ {
1145
+ "name": "json",
1146
+ "kind": "flag",
1147
+ "display": "--json",
1148
+ "description": "Output raw JSON instead of a table",
1149
+ "required": false,
1150
+ },
1151
+ ],
1152
+ "examples": [
1153
+ "w6w functions list",
1154
+ "w6w functions list --json",
1155
+ ],
1156
+ "notes": [],
1157
+ },
1158
+ {
1159
+ "operation": "functions.get",
1160
+ "path": [
1161
+ "functions",
1162
+ "get",
1163
+ ],
1164
+ "name": "get",
1165
+ "aliases": [],
1166
+ "summary": "Fetch one Function's stored definition.",
1167
+ "short": "Fetch one Function's stored definition",
1168
+ "headline": "fetch one Function's stored definition",
1169
+ "usage": "w6w functions get <id> [options]",
1170
+ "naming": "w6w functions get <id>",
1171
+ "status": "required",
1172
+ "params": [
1173
+ {
1174
+ "name": "id",
1175
+ "kind": "argument",
1176
+ "display": "<id>",
1177
+ "description": "Function id or key (see: w6w functions list)",
1178
+ "required": true,
1179
+ },
1180
+ {
1181
+ "name": "json",
1182
+ "kind": "flag",
1183
+ "display": "--json",
1184
+ "description": "Output raw JSON instead of a table",
1185
+ "required": false,
1186
+ },
1187
+ ],
1188
+ "examples": [
1189
+ "w6w functions get send-email",
1190
+ "w6w functions get fn_01HQ8N --json",
1191
+ ],
1192
+ "notes": [],
1193
+ },
1194
+ {
1195
+ "operation": "functions.create",
1196
+ "path": [
1197
+ "functions",
1198
+ "create",
1199
+ ],
1200
+ "name": "create",
1201
+ "aliases": [],
1202
+ "summary": "Create a Function definition.",
1203
+ "short": "Create a Function definition",
1204
+ "headline": "create a Function definition",
1205
+ "usage": "w6w functions create --definition <json> [options]",
1206
+ "naming": "w6w functions create --definition <json>",
1207
+ "status": "required",
1208
+ "params": [
1209
+ {
1210
+ "name": "definition",
1211
+ "kind": "flag",
1212
+ "display": "--definition <json>",
1213
+ "description": "The whole definition, as a JSON object",
1214
+ "required": true,
1215
+ },
1216
+ {
1217
+ "name": "json",
1218
+ "kind": "flag",
1219
+ "display": "--json",
1220
+ "description": "Output raw JSON instead of a table",
1221
+ "required": false,
1222
+ },
1223
+ ],
1224
+ "examples": [
1225
+ 'w6w functions create --definition \'{"manifestVersion":"1","key":"send-email","inputs":[]}\'',
1226
+ 'w6w functions create --definition "$(cat function.json)"',
1227
+ ],
1228
+ "notes": [],
1229
+ },
1230
+ {
1231
+ "operation": "functions.update",
1232
+ "path": [
1233
+ "functions",
1234
+ "update",
1235
+ ],
1236
+ "name": "update",
1237
+ "aliases": [],
1238
+ "summary": "Overwrite a Function definition.",
1239
+ "short": "Overwrite a Function definition",
1240
+ "headline": "overwrite a Function definition",
1241
+ "usage": "w6w functions update <id> --definition <json> [options]",
1242
+ "naming": "w6w functions update <id> --definition <json>",
1243
+ "status": "required",
1244
+ "params": [
1245
+ {
1246
+ "name": "id",
1247
+ "kind": "argument",
1248
+ "display": "<id>",
1249
+ "description": "Function id or key (see: w6w functions list)",
1250
+ "required": true,
1251
+ },
1252
+ {
1253
+ "name": "definition",
1254
+ "kind": "flag",
1255
+ "display": "--definition <json>",
1256
+ "description": "The whole definition, as a JSON object",
1257
+ "required": true,
1258
+ },
1259
+ {
1260
+ "name": "json",
1261
+ "kind": "flag",
1262
+ "display": "--json",
1263
+ "description": "Output raw JSON instead of a table",
1264
+ "required": false,
1265
+ },
1266
+ ],
1267
+ "examples": [
1268
+ 'w6w functions update fn_01HQ8N --definition "$(cat function.json)"',
1269
+ ],
1270
+ "notes": [],
1271
+ },
1272
+ {
1273
+ "operation": "functions.delete",
1274
+ "path": [
1275
+ "functions",
1276
+ "delete",
1277
+ ],
1278
+ "name": "delete",
1279
+ "aliases": [],
1280
+ "summary": "Delete a Function.",
1281
+ "short": "Delete a Function",
1282
+ "headline": "delete a Function",
1283
+ "usage": "w6w functions delete <id> [options]",
1284
+ "naming": "w6w functions delete <id>",
1285
+ "status": "required",
1286
+ "params": [
1287
+ {
1288
+ "name": "id",
1289
+ "kind": "argument",
1290
+ "display": "<id>",
1291
+ "description": "Function id or key (see: w6w functions list)",
1292
+ "required": true,
1293
+ },
1294
+ {
1295
+ "name": "json",
1296
+ "kind": "flag",
1297
+ "display": "--json",
1298
+ "description": "Output raw JSON instead of a table",
1299
+ "required": false,
1300
+ },
1301
+ ],
1302
+ "examples": [
1303
+ "w6w functions delete fn_01HQ8N",
1304
+ ],
1305
+ "notes": [],
1306
+ },
1307
+ ],
1308
+ "options": [],
1309
+ "examples": [
1310
+ "w6w functions run send-email",
1311
+ ],
1312
+ },
1313
+ {
1314
+ "name": "endpoints",
1315
+ "summary": "Run endpoints by key or id",
1316
+ "headline": "run endpoints by key or id",
1317
+ "usage": "w6w endpoints <command> [options]",
1318
+ "commands": [
1319
+ {
1320
+ "operation": "endpoints.run",
1321
+ "path": [
1322
+ "endpoints",
1323
+ "run",
1324
+ ],
1325
+ "name": "run",
1326
+ "aliases": [],
1327
+ "summary": "Run one Endpoint by its key (or id); the envelope's kind says which arm answered.",
1328
+ "short": "Run one Endpoint by its key (or id); the envelope's kind says which arm answered",
1329
+ "headline": "run one Endpoint by its key (or id); the envelope's kind says which arm answered",
1330
+ "usage": "w6w endpoints run --id-or-key <value> [options]",
1331
+ "naming": "w6w endpoints run <name> [--payload <json>]",
1332
+ "status": "required",
1333
+ "params": [
1334
+ {
1335
+ "name": "idOrKey",
1336
+ "kind": "flag",
1337
+ "display": "--id-or-key <value>",
1338
+ "description": "Endpoint key or id (e.g. send-email)",
1339
+ "required": true,
1340
+ },
1341
+ {
1342
+ "name": "input",
1343
+ "kind": "flag",
1344
+ "display": "--input <value>",
1345
+ "description": "The Endpoint's input, as a JSON object",
1346
+ "required": false,
1347
+ },
1348
+ {
1349
+ "name": "json",
1350
+ "kind": "flag",
1351
+ "display": "--json",
1352
+ "description": "Output raw JSON instead of a table",
1353
+ "required": false,
1354
+ },
1355
+ ],
1356
+ "examples": [
1357
+ "w6w endpoints run send-email",
1358
+ 'w6w endpoints run send-email --payload \'{"to":"a@b.com"}\'',
1359
+ ],
1360
+ "notes": [],
1361
+ },
1362
+ ],
1363
+ "options": [
1364
+ {
1365
+ "name": "idOrKey",
1366
+ "kind": "flag",
1367
+ "display": "--id-or-key <value>",
1368
+ "description": "Endpoint key or id (e.g. send-email)",
1369
+ "required": true,
1370
+ },
1371
+ {
1372
+ "name": "input",
1373
+ "kind": "flag",
1374
+ "display": "--input <value>",
1375
+ "description": "The Endpoint's input, as a JSON object",
1376
+ "required": false,
1377
+ },
1378
+ ],
1379
+ "examples": [
1380
+ "w6w endpoints run send-email",
1381
+ ],
1382
+ },
1383
+ {
1384
+ "name": "team",
1385
+ "summary": "Invite, list and manage your account's team",
1386
+ "headline": "invite, list and manage your account's team",
1387
+ "usage": "w6w team <command> [options]",
1388
+ "commands": [
1389
+ {
1390
+ "operation": "team.members.list",
1391
+ "path": [
1392
+ "team",
1393
+ "members",
1394
+ ],
1395
+ "name": "members",
1396
+ "aliases": [],
1397
+ "summary": "List the caller's account team: every active member and their role.",
1398
+ "short": "List the caller's account team: every active member and their role",
1399
+ "headline": "list the caller's account team: every active member and their role",
1400
+ "usage": "w6w team members [options]",
1401
+ "naming": "w6w team members",
1402
+ "status": "required",
1403
+ "params": [
1404
+ {
1405
+ "name": "json",
1406
+ "kind": "flag",
1407
+ "display": "--json",
1408
+ "description": "Output raw JSON instead of a table",
1409
+ "required": false,
1410
+ },
1411
+ ],
1412
+ "examples": [
1413
+ "w6w team members",
1414
+ ],
1415
+ "notes": [],
1416
+ },
1417
+ {
1418
+ "operation": "team.invites.create",
1419
+ "path": [
1420
+ "team",
1421
+ "invite",
1422
+ ],
1423
+ "name": "invite",
1424
+ "aliases": [],
1425
+ "summary": "Invite someone to the caller's account, or mint an open, shareable invite link.",
1426
+ "short": "Invite someone to the caller's account, or mint an open, shareable invite link",
1427
+ "headline": "invite someone to the caller's account, or mint an open, shareable invite link",
1428
+ "usage": "w6w team invite [options]",
1429
+ "naming": "w6w team invite [--email <email>] [--role <role>]",
1430
+ "status": "required",
1431
+ "params": [
1432
+ {
1433
+ "name": "email",
1434
+ "kind": "flag",
1435
+ "display": "--email <email>",
1436
+ "description": "Address to invite (omit for an open, shareable invite link)",
1437
+ "required": false,
1438
+ },
1439
+ {
1440
+ "name": "role",
1441
+ "kind": "flag",
1442
+ "display": "--role <role>",
1443
+ "description": "Role to grant on redemption (default: member)",
1444
+ "required": false,
1445
+ },
1446
+ {
1447
+ "name": "json",
1448
+ "kind": "flag",
1449
+ "display": "--json",
1450
+ "description": "Output raw JSON instead of a table",
1451
+ "required": false,
1452
+ },
1453
+ ],
1454
+ "examples": [
1455
+ "w6w team invite --email new@example.com --role admin",
1456
+ "w6w team invite",
1457
+ ],
1458
+ "notes": [],
1459
+ },
1460
+ {
1461
+ "operation": "team.invites.list",
1462
+ "path": [
1463
+ "team",
1464
+ "invites",
1465
+ ],
1466
+ "name": "invites",
1467
+ "aliases": [],
1468
+ "summary": "List the caller's account's open (pending, unrevoked, unexpired) invites.",
1469
+ "short": "List the caller's account's open (pending, unrevoked, unexpired) invites",
1470
+ "headline": "list the caller's account's open (pending, unrevoked, unexpired) invites",
1471
+ "usage": "w6w team invites [options]",
1472
+ "naming": "w6w team invites",
1473
+ "status": "required",
1474
+ "params": [
1475
+ {
1476
+ "name": "json",
1477
+ "kind": "flag",
1478
+ "display": "--json",
1479
+ "description": "Output raw JSON instead of a table",
1480
+ "required": false,
1481
+ },
1482
+ ],
1483
+ "examples": [
1484
+ "w6w team invites",
1485
+ ],
1486
+ "notes": [],
1487
+ },
1488
+ {
1489
+ "operation": "team.invites.revoke",
1490
+ "path": [
1491
+ "team",
1492
+ "revoke-invite",
1493
+ ],
1494
+ "name": "revoke-invite",
1495
+ "aliases": [],
1496
+ "summary": "Revoke a pending invite before it is redeemed.",
1497
+ "short": "Revoke a pending invite before it is redeemed",
1498
+ "headline": "revoke a pending invite before it is redeemed",
1499
+ "usage": "w6w team revoke-invite <id> [options]",
1500
+ "naming": "w6w team revoke-invite <id>",
1501
+ "status": "required",
1502
+ "params": [
1503
+ {
1504
+ "name": "id",
1505
+ "kind": "argument",
1506
+ "display": "<id>",
1507
+ "description": "Invite id (see: w6w team invites)",
1508
+ "required": true,
1509
+ },
1510
+ {
1511
+ "name": "json",
1512
+ "kind": "flag",
1513
+ "display": "--json",
1514
+ "description": "Output raw JSON instead of a table",
1515
+ "required": false,
1516
+ },
1517
+ ],
1518
+ "examples": [
1519
+ "w6w team revoke-invite inv_01HQ8N",
1520
+ ],
1521
+ "notes": [],
1522
+ },
1523
+ {
1524
+ "operation": "team.members.updateRole",
1525
+ "path": [
1526
+ "team",
1527
+ "set-role",
1528
+ ],
1529
+ "name": "set-role",
1530
+ "aliases": [],
1531
+ "summary": "Change a team member's role.",
1532
+ "short": "Change a team member's role",
1533
+ "headline": "change a team member's role",
1534
+ "usage": "w6w team set-role <userId> --role <role> [options]",
1535
+ "naming": "w6w team set-role <userId> --role <role>",
1536
+ "status": "required",
1537
+ "params": [
1538
+ {
1539
+ "name": "userId",
1540
+ "kind": "argument",
1541
+ "display": "<userId>",
1542
+ "description": "Member's user id (see: w6w team members)",
1543
+ "required": true,
1544
+ },
1545
+ {
1546
+ "name": "role",
1547
+ "kind": "flag",
1548
+ "display": "--role <role>",
1549
+ "description": "Role to set: member|admin (owner is not settable)",
1550
+ "required": true,
1551
+ },
1552
+ {
1553
+ "name": "json",
1554
+ "kind": "flag",
1555
+ "display": "--json",
1556
+ "description": "Output raw JSON instead of a table",
1557
+ "required": false,
1558
+ },
1559
+ ],
1560
+ "examples": [
1561
+ "w6w team set-role usr_01HQ8N --role admin",
1562
+ ],
1563
+ "notes": [],
1564
+ },
1565
+ {
1566
+ "operation": "team.members.remove",
1567
+ "path": [
1568
+ "team",
1569
+ "remove-member",
1570
+ ],
1571
+ "name": "remove-member",
1572
+ "aliases": [],
1573
+ "summary": "Remove a member from the caller's account.",
1574
+ "short": "Remove a member from the caller's account",
1575
+ "headline": "remove a member from the caller's account",
1576
+ "usage": "w6w team remove-member <userId> [options]",
1577
+ "naming": "w6w team remove-member <userId>",
1578
+ "status": "required",
1579
+ "params": [
1580
+ {
1581
+ "name": "userId",
1582
+ "kind": "argument",
1583
+ "display": "<userId>",
1584
+ "description": "Member's user id (see: w6w team members)",
1585
+ "required": true,
1586
+ },
1587
+ {
1588
+ "name": "json",
1589
+ "kind": "flag",
1590
+ "display": "--json",
1591
+ "description": "Output raw JSON instead of a table",
1592
+ "required": false,
1593
+ },
1594
+ ],
1595
+ "examples": [
1596
+ "w6w team remove-member usr_01HQ8N",
1597
+ ],
1598
+ "notes": [],
1599
+ },
1600
+ ],
1601
+ "options": [],
1602
+ "examples": [
1603
+ "w6w team members",
1604
+ "w6w team invite --email new@example.com --role admin",
1605
+ ],
1606
+ },
1607
+ ],
1608
+ "globalFlags": [
1609
+ {
1610
+ "name": "--base-url",
1611
+ "alias": null,
1612
+ "type": "string",
1613
+ "env": "W6W_BASE_URL",
1614
+ "display": "--base-url <url>",
1615
+ "description": "API base URL (env: W6W_BASE_URL)",
1616
+ },
1617
+ {
1618
+ "name": "--token",
1619
+ "alias": null,
1620
+ "type": "string",
1621
+ "env": "W6W_TOKEN",
1622
+ "display": "--token <token>",
1623
+ "description": "API token (env: W6W_TOKEN)",
1624
+ },
1625
+ {
1626
+ "name": "--json",
1627
+ "alias": null,
1628
+ "type": "boolean",
1629
+ "env": null,
1630
+ "display": "--json",
1631
+ "description": "Output raw JSON instead of a table",
1632
+ },
1633
+ {
1634
+ "name": "--no-color",
1635
+ "alias": null,
1636
+ "type": "boolean",
1637
+ "env": null,
1638
+ "display": "--no-color",
1639
+ "description": "Disable colored output",
1640
+ },
1641
+ {
1642
+ "name": "--version",
1643
+ "alias": "-v",
1644
+ "type": "boolean",
1645
+ "env": null,
1646
+ "display": "-v, --version",
1647
+ "description": "Print the CLI version",
1648
+ },
1649
+ {
1650
+ "name": "--help",
1651
+ "alias": "-h",
1652
+ "type": "boolean",
1653
+ "env": null,
1654
+ "display": "-h, --help",
1655
+ "description": "Show help for any command",
1656
+ },
1657
+ ],
1658
+ "examples": [
1659
+ "w6w me",
1660
+ "w6w workflows list",
1661
+ "w6w workflows run wf_01H… --wait",
1662
+ "w6w documents list",
1663
+ "w6w vars create greeting --type string --value hello",
1664
+ 'w6w run conn_01H… --action send_email --payload \'{"to":"a@b.com"}\'',
1665
+ ],
1666
+ };
1667
+ /** Every command path the parser may match, aliases included. */
1668
+ export const COMMAND_PATHS = [
1669
+ [
1670
+ "me",
1671
+ ],
1672
+ [
1673
+ "info",
1674
+ ],
1675
+ [
1676
+ "run",
1677
+ ],
1678
+ [
1679
+ "connections",
1680
+ "list",
1681
+ ],
912
1682
  [
913
1683
  "workflows",
914
1684
  "list",
@@ -917,6 +1687,30 @@ export const COMMAND_PATHS = [
917
1687
  "workflows",
918
1688
  "run",
919
1689
  ],
1690
+ [
1691
+ "workflows",
1692
+ "cancel",
1693
+ ],
1694
+ [
1695
+ "workflows",
1696
+ "get",
1697
+ ],
1698
+ [
1699
+ "workflows",
1700
+ "create",
1701
+ ],
1702
+ [
1703
+ "workflows",
1704
+ "update",
1705
+ ],
1706
+ [
1707
+ "workflows",
1708
+ "archive",
1709
+ ],
1710
+ [
1711
+ "workflows",
1712
+ "delete",
1713
+ ],
920
1714
  [
921
1715
  "documents",
922
1716
  "list",
@@ -965,6 +1759,58 @@ export const COMMAND_PATHS = [
965
1759
  "vars",
966
1760
  "delete",
967
1761
  ],
1762
+ [
1763
+ "functions",
1764
+ "run",
1765
+ ],
1766
+ [
1767
+ "functions",
1768
+ "list",
1769
+ ],
1770
+ [
1771
+ "functions",
1772
+ "get",
1773
+ ],
1774
+ [
1775
+ "functions",
1776
+ "create",
1777
+ ],
1778
+ [
1779
+ "functions",
1780
+ "update",
1781
+ ],
1782
+ [
1783
+ "functions",
1784
+ "delete",
1785
+ ],
1786
+ [
1787
+ "endpoints",
1788
+ "run",
1789
+ ],
1790
+ [
1791
+ "team",
1792
+ "members",
1793
+ ],
1794
+ [
1795
+ "team",
1796
+ "invite",
1797
+ ],
1798
+ [
1799
+ "team",
1800
+ "invites",
1801
+ ],
1802
+ [
1803
+ "team",
1804
+ "revoke-invite",
1805
+ ],
1806
+ [
1807
+ "team",
1808
+ "set-role",
1809
+ ],
1810
+ [
1811
+ "team",
1812
+ "remove-member",
1813
+ ],
968
1814
  ];
969
1815
  /** The exit-code contract, verbatim from the shared contract's `cli.exitCodes`. */
970
1816
  export const EXIT_CODES = [