@epilot/cli 0.1.5 → 0.1.7

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 (59) hide show
  1. package/README.md +2 -2
  2. package/dist/{access-token-BDNU3ZFC.js → access-token-BV7OAX75.js} +6 -4
  3. package/dist/{address-ZCYZYRP4.js → address-4Z6WADBJ.js} +6 -4
  4. package/dist/{address-suggestions-RP5N7NVQ.js → address-suggestions-7BXTJCZH.js} +6 -4
  5. package/dist/{ai-agents-PLUGVZTI.js → ai-agents-VB2WGMIZ.js} +6 -4
  6. package/dist/{app-HZECIN6N.js → app-DXDK7UZX.js} +6 -4
  7. package/dist/{audit-logs-JWKGNHPP.js → audit-logs-5ZEZNO5T.js} +6 -4
  8. package/dist/{auth-O5LQZAG7.js → auth-AAF6Z5WZ.js} +3 -3
  9. package/dist/{auth-login-NM74PQRP.js → auth-login-AJ6F5GPQ.js} +14 -20
  10. package/dist/{auth-token-VSNRXUBI.js → auth-token-J4FI2RMT.js} +1 -1
  11. package/dist/{automation-73BC4PYK.js → automation-V5CN2KUO.js} +6 -4
  12. package/dist/{billing-GQDSK4H2.js → billing-FKPDTZ6G.js} +6 -4
  13. package/dist/bin/epilot.js +62 -54
  14. package/dist/{blueprint-manifest-4M7DNWYE.js → blueprint-manifest-2CINVMTI.js} +6 -4
  15. package/dist/{chunk-6RBLA5YE.js → chunk-7ZQ666ZQ.js} +44 -1
  16. package/dist/{chunk-HN4QDJOJ.js → chunk-AMOFZJ5W.js} +8 -9
  17. package/dist/{chunk-BJOXXFMA.js → chunk-EU2A2ORP.js} +156 -52
  18. package/dist/{completion-RCVUCEMM.js → completion-EKFXGPNK.js} +1 -1
  19. package/dist/{consent-OJBGOI54.js → consent-HZ7EVD4I.js} +6 -4
  20. package/dist/{customer-portal-BDKNWKHA.js → customer-portal-XHM7X235.js} +6 -4
  21. package/dist/{dashboard-IAEU3JFY.js → dashboard-NVP6FMOH.js} +6 -4
  22. package/dist/{data-management-UEDSGAKB.js → data-management-JGDAGO75.js} +6 -4
  23. package/dist/{deduplication-JJS3TOJ2.js → deduplication-DTY4VICH.js} +6 -4
  24. package/dist/{design-WKSDZFBJ.js → design-72XM3PQR.js} +6 -4
  25. package/dist/{document-P5OL4NYY.js → document-OH4T743T.js} +6 -4
  26. package/dist/{email-settings-743JHCKS.js → email-settings-BSU45CNC.js} +6 -4
  27. package/dist/{email-template-MW4IVDPM.js → email-template-VHUF3OYL.js} +6 -4
  28. package/dist/{entity-K5X6FWJI.js → entity-RBMVRPDS.js} +6 -4
  29. package/dist/{entity-mapping-QBJ2I2VR.js → entity-mapping-7QUMDAQO.js} +6 -4
  30. package/dist/{environments-VUR7ME42.js → environments-RM333MM3.js} +6 -4
  31. package/dist/{erp-integration-A2KAIXUQ.js → erp-integration-RBW2CSPM.js} +6 -4
  32. package/dist/{event-catalog-6YEG5CEM.js → event-catalog-APQS5GOU.js} +6 -4
  33. package/dist/{file-J6PHZ447.js → file-SU2T5RF6.js} +6 -4
  34. package/dist/{iban-DJSUCRU6.js → iban-XRAJ3QJA.js} +6 -4
  35. package/dist/{interactive-XXYFAJEI.js → interactive-CD3I3Q5X.js} +4 -4
  36. package/dist/{journey-QJZKU3PZ.js → journey-SRK5MDRQ.js} +6 -4
  37. package/dist/{kanban-ZF4IIG7Q.js → kanban-2IDQXJ4R.js} +6 -4
  38. package/dist/{message-WH4GD5SC.js → message-TV7TZI2Y.js} +6 -4
  39. package/dist/{metering-FCWUZ2TC.js → metering-LHBESUA2.js} +6 -4
  40. package/dist/{notes-KKVPGK7K.js → notes-3KTVUFIQ.js} +6 -4
  41. package/dist/{notification-4MVAZTRP.js → notification-6FHJXYCH.js} +6 -4
  42. package/dist/{organization-2UT2KFMB.js → organization-MBRTAROH.js} +6 -4
  43. package/dist/{partner-directory-SUNW4XN7.js → partner-directory-NUWSXNVD.js} +6 -4
  44. package/dist/{permissions-36VGB4BQ.js → permissions-CD2OPGOC.js} +6 -4
  45. package/dist/{pricing-RCNFEEHO.js → pricing-6C6LWKER.js} +6 -4
  46. package/dist/{pricing-tier-MNCLLXD5.js → pricing-tier-U67UYOP5.js} +6 -4
  47. package/dist/{profile-MZ3VK7PO.js → profile-EK4HSQ57.js} +1 -1
  48. package/dist/{purpose-3JN63WTQ.js → purpose-3UTD6PG2.js} +6 -4
  49. package/dist/{sandbox-C676YDRV.js → sandbox-AU5TUO7G.js} +6 -4
  50. package/dist/{submission-5XTNMMCK.js → submission-LXDAZTAB.js} +6 -4
  51. package/dist/{targeting-C52KV6IW.js → targeting-YDU2O744.js} +6 -4
  52. package/dist/{template-variables-5SKJEJF4.js → template-variables-MLSMLLYA.js} +6 -4
  53. package/dist/{upgrade-VJCKIUNZ.js → upgrade-KIOCOPB7.js} +2 -2
  54. package/dist/{user-DYAR3N6L.js → user-WMSSXQHK.js} +6 -4
  55. package/dist/{validation-rules-LDAOUPOO.js → validation-rules-W7A4DMWK.js} +6 -4
  56. package/dist/{webhooks-MT2P33A2.js → webhooks-QSYAFFQ2.js} +6 -4
  57. package/dist/{workflow-YGWGE6L4.js → workflow-KKAMUHYE.js} +6 -4
  58. package/dist/{workflow-definition-JG54ZWGL.js → workflow-definition-ECXHF425.js} +6 -4
  59. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/lib/utils.ts
4
+ import { spawnSync } from "child_process";
4
5
  var isValidJson = (str) => {
5
6
  try {
6
7
  JSON.parse(str);
@@ -51,6 +52,29 @@ var methodColor = (method) => {
51
52
  return "\x1B[37m";
52
53
  }
53
54
  };
55
+ var pager = (content) => {
56
+ if (!process.stdout.isTTY) {
57
+ process.stdout.write(content);
58
+ return;
59
+ }
60
+ const lines = content.split("\n").length;
61
+ const rows = process.stdout.rows || 24;
62
+ if (lines <= rows) {
63
+ process.stdout.write(content);
64
+ return;
65
+ }
66
+ try {
67
+ const result = spawnSync("less", ["-R", "-F", "-X"], {
68
+ input: content,
69
+ stdio: ["pipe", "inherit", "inherit"]
70
+ });
71
+ if (result.status !== 0 && result.status !== null) {
72
+ process.stdout.write(content);
73
+ }
74
+ } catch {
75
+ process.stdout.write(content);
76
+ }
77
+ };
54
78
  var RESET = "\x1B[0m";
55
79
  var BOLD = "\x1B[1m";
56
80
  var DIM = "\x1B[2m";
@@ -58,17 +82,36 @@ var GREEN = "\x1B[32m";
58
82
  var RED = "\x1B[31m";
59
83
  var YELLOW = "\x1B[33m";
60
84
  var CYAN = "\x1B[36m";
85
+ var WHITE = "\x1B[37m";
86
+ var BG_GREEN = "\x1B[42m";
87
+ var BG_RED = "\x1B[41m";
88
+ var MAGENTA = "\x1B[35m";
89
+ var highlightJson = (jsonStr) => jsonStr.replace(
90
+ /("(?:\\.|[^"\\])*")\s*(:)?|(\b(?:true|false|null)\b)|(-?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)/g,
91
+ (match, str, colon, bool, num) => {
92
+ if (str && colon) return `${CYAN}${str}${RESET}${colon}`;
93
+ if (str) return `${GREEN}${str}${RESET}`;
94
+ if (bool) return `${MAGENTA}${bool}${RESET}`;
95
+ if (num) return `${YELLOW}${num}${RESET}`;
96
+ return match;
97
+ }
98
+ );
61
99
 
62
100
  export {
63
101
  isValidJson,
64
102
  parseKeyValue,
65
103
  parseParamValue,
66
104
  methodColor,
105
+ pager,
67
106
  RESET,
68
107
  BOLD,
69
108
  DIM,
70
109
  GREEN,
71
110
  RED,
72
111
  YELLOW,
73
- CYAN
112
+ CYAN,
113
+ WHITE,
114
+ BG_GREEN,
115
+ BG_RED,
116
+ highlightJson
74
117
  };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  DIM,
4
4
  RESET
5
- } from "./chunk-6RBLA5YE.js";
5
+ } from "./chunk-7ZQ666ZQ.js";
6
6
 
7
7
  // src/lib/interactive.ts
8
8
  var isInteractive = (flags) => {
@@ -21,9 +21,7 @@ var pickOperation = async (operations) => {
21
21
  source: (input) => {
22
22
  if (!input) return choices;
23
23
  const term = input.toLowerCase();
24
- return choices.filter(
25
- (c) => c.value.toLowerCase().includes(term) || c.name.toLowerCase().includes(term)
26
- );
24
+ return choices.filter((c) => c.value.toLowerCase().includes(term) || c.name.toLowerCase().includes(term));
27
25
  },
28
26
  pageSize: 20
29
27
  });
@@ -57,15 +55,16 @@ var promptToken = async () => {
57
55
  });
58
56
  return token || null;
59
57
  };
60
- var printOperationsTable = (apiName, operations) => {
58
+ var formatOperationsTable = (apiName, operations) => {
59
+ const lines = [];
61
60
  for (const op of operations) {
62
61
  const desc = op.description ? ` \u2013 ${op.description}` : "";
63
- process.stdout.write(` ${op.operationId} ${DIM}${op.method.toUpperCase()} ${op.path}${desc}${RESET}
64
- `);
62
+ lines.push(` ${op.operationId} ${DIM}${op.method.toUpperCase()} ${op.path}${desc}${RESET}`);
65
63
  }
66
- process.stdout.write(`
64
+ lines.push(`
67
65
  Run \`epilot ${apiName} <operationId> --help\` for details.
68
66
  `);
67
+ return lines.join("\n");
69
68
  };
70
69
 
71
70
  export {
@@ -73,5 +72,5 @@ export {
73
72
  pickOperation,
74
73
  promptParam,
75
74
  promptToken,
76
- printOperationsTable
75
+ formatOperationsTable
77
76
  };
@@ -6,23 +6,28 @@ import {
6
6
  getResolvedProfile
7
7
  } from "./chunk-PDMWUCWD.js";
8
8
  import {
9
+ formatOperationsTable,
9
10
  isInteractive,
10
11
  pickOperation,
11
- printOperationsTable,
12
12
  promptParam
13
- } from "./chunk-HN4QDJOJ.js";
13
+ } from "./chunk-AMOFZJ5W.js";
14
14
  import {
15
+ BG_GREEN,
16
+ BG_RED,
15
17
  BOLD,
16
18
  DIM,
17
19
  GREEN,
18
20
  RED,
19
21
  RESET,
22
+ WHITE,
20
23
  YELLOW,
24
+ highlightJson,
21
25
  isValidJson,
22
26
  methodColor,
27
+ pager,
23
28
  parseKeyValue,
24
29
  parseParamValue
25
- } from "./chunk-6RBLA5YE.js";
30
+ } from "./chunk-7ZQ666ZQ.js";
26
31
 
27
32
  // src/lib/call.ts
28
33
  import OpenAPIClientAxiosModule from "openapi-client-axios";
@@ -253,40 +258,73 @@ var readStdin = () => {
253
258
  };
254
259
 
255
260
  // src/lib/response-formatter.ts
261
+ var statusBg = (code) => {
262
+ if (code >= 400) return BG_RED;
263
+ return BG_GREEN;
264
+ };
256
265
  var formatResponse = async (response, options) => {
257
- const { json, include, verbose, jsonata } = options;
266
+ const { json, include, verbose, jsonata, interactive, operationId } = options;
267
+ const isTTY = process.stdout.isTTY && process.stderr.isTTY;
268
+ const usePager = !json && isTTY && interactive !== false;
269
+ let buf = "";
270
+ const meta = (text) => {
271
+ if (usePager) {
272
+ buf += text;
273
+ } else {
274
+ process.stderr.write(text);
275
+ }
276
+ };
277
+ const req = response.config;
278
+ const method = (req.method || "GET").toUpperCase();
279
+ const baseURL = req.baseURL || "";
280
+ const reqUrl = req.url || "";
281
+ const url = reqUrl.startsWith("http") ? reqUrl : `${baseURL.replace(/\/$/, "")}${reqUrl.startsWith("/") ? "" : "/"}${reqUrl}`;
258
282
  if (verbose) {
259
- const req = response.config;
260
- process.stderr.write(`${DIM}${req.method?.toUpperCase()} ${req.url}${RESET}
261
- `);
283
+ meta(`${DIM}REQUEST META:${RESET}
284
+ `);
285
+ const requestMeta = {
286
+ operationId,
287
+ method,
288
+ url
289
+ };
290
+ if (req.params && Object.keys(req.params).length > 0) {
291
+ requestMeta.params = req.params;
292
+ }
262
293
  if (req.headers) {
294
+ const headers = {};
263
295
  for (const [key, value] of Object.entries(req.headers)) {
264
- if (typeof value === "string" && key.toLowerCase() !== "authorization") {
265
- process.stderr.write(`${DIM}> ${key}: ${value}${RESET}
266
- `);
267
- } else if (key.toLowerCase() === "authorization") {
268
- process.stderr.write(`${DIM}> ${key}: Bearer ***${RESET}
269
- `);
296
+ if (key.toLowerCase() === "authorization") {
297
+ headers[key] = "Bearer ***";
298
+ } else if (typeof value === "string") {
299
+ headers[key] = value;
270
300
  }
271
301
  }
302
+ requestMeta.headers = headers;
272
303
  }
273
- process.stderr.write("\n");
274
- }
275
- if (!json && !include && process.stdout.isTTY && process.stderr.isTTY) {
276
- const statusColor = response.status >= 200 && response.status < 300 ? GREEN : response.status >= 400 ? RED : YELLOW;
277
- process.stderr.write(
278
- `${statusColor}${BOLD}${response.status}${RESET} ${statusColor}${response.statusText}${RESET}
279
- `
280
- );
281
- }
282
- if (include) {
283
- process.stderr.write(`${DIM}HTTP/${response.status} ${response.statusText}${RESET}
304
+ meta(`${DIM}${JSON.stringify(requestMeta, null, 2)}${RESET}
305
+
284
306
  `);
285
- for (const [key, value] of Object.entries(response.headers)) {
286
- process.stderr.write(`${DIM}${key}: ${value}${RESET}
307
+ }
308
+ if (verbose || include) {
309
+ meta(`${DIM}RESPONSE META:${RESET}
287
310
  `);
311
+ const responseMeta = {
312
+ code: response.status,
313
+ status: response.statusText
314
+ };
315
+ if (include) {
316
+ responseMeta.headers = response.headers;
288
317
  }
289
- process.stderr.write("\n");
318
+ meta(`${DIM}${JSON.stringify(responseMeta, null, 2)}${RESET}
319
+
320
+ `);
321
+ } else if (!json && isTTY) {
322
+ const mColor = methodColor(method);
323
+ meta(`${mColor}${BOLD}${method}${RESET} ${url}
324
+ `);
325
+ const bg = statusBg(response.status);
326
+ meta(`${bg}${WHITE}${BOLD} ${response.status} ${RESET} ${response.statusText}
327
+ `);
290
328
  }
291
329
  let data = response.data;
292
330
  if (jsonata && data) {
@@ -301,13 +339,33 @@ var formatResponse = async (response, options) => {
301
339
  }
302
340
  }
303
341
  if (data !== void 0 && data !== null) {
304
- if (typeof data === "string") {
305
- process.stdout.write(`${data}
342
+ if (verbose || include) {
343
+ meta(`${DIM}RESPONSE BODY:${RESET}
306
344
  `);
345
+ }
346
+ let body;
347
+ if (typeof data === "string") {
348
+ body = `${data}
349
+ `;
350
+ } else if (json) {
351
+ body = `${JSON.stringify(data)}
352
+ `;
307
353
  } else {
308
- const indent = json ? 0 : 2;
309
- process.stdout.write(`${JSON.stringify(data, null, indent)}
354
+ const pretty = JSON.stringify(data, null, 2);
355
+ body = isTTY ? `${highlightJson(pretty)}
356
+ ` : `${pretty}
357
+ `;
358
+ }
359
+ if (usePager) {
360
+ pager(buf + body);
361
+ } else {
362
+ process.stdout.write(body);
363
+ }
364
+ } else {
365
+ meta(`${DIM}(empty response)${RESET}
310
366
  `);
367
+ if (usePager && buf) {
368
+ pager(buf);
311
369
  }
312
370
  }
313
371
  };
@@ -363,7 +421,6 @@ var mockFromSchema = (schema) => {
363
421
  return mock(schema);
364
422
  };
365
423
  var { dereferenceSync } = dereferenceJsonSchema;
366
- var w = (text) => process.stdout.write(text);
367
424
  var getBodySchema = (spec, operationId) => {
368
425
  const paths = spec.paths ?? {};
369
426
  for (const methods of Object.values(paths)) {
@@ -379,7 +436,11 @@ var getBodySchema = (spec, operationId) => {
379
436
  }
380
437
  return void 0;
381
438
  };
382
- var printOperationHelp = (apiName, operationId, spec) => {
439
+ var formatOperationHelp = (apiName, operationId, spec) => {
440
+ let out = "";
441
+ const w = (text) => {
442
+ out += text;
443
+ };
383
444
  for (const [path, methods] of Object.entries(spec.paths ?? {})) {
384
445
  if (!methods) continue;
385
446
  for (const method of ["get", "post", "put", "patch", "delete", "head", "options"]) {
@@ -432,15 +493,15 @@ ${BOLD}epilot ${apiName} ${operationId}${RESET}`);
432
493
  if (bodySchema) {
433
494
  try {
434
495
  const mockBody = truncateJson(mockFromSchema(bodySchema));
435
- const bodyStr = JSON.stringify(mockBody, null, 2);
496
+ const bodyStr = highlightJson(JSON.stringify(mockBody, null, 2));
436
497
  const lines = bodyStr.split("\n");
437
498
  w(`
438
499
  `);
439
500
  if (lines.length <= MAX_BODY_LINES) {
440
- for (const line of lines) w(` ${DIM}${line}${RESET}
501
+ for (const line of lines) w(` ${line}
441
502
  `);
442
503
  } else {
443
- for (const line of lines.slice(0, MAX_BODY_LINES)) w(` ${DIM}${line}${RESET}
504
+ for (const line of lines.slice(0, MAX_BODY_LINES)) w(` ${line}
444
505
  `);
445
506
  w(` ${DIM} ...${RESET}
446
507
  `);
@@ -451,6 +512,35 @@ ${BOLD}epilot ${apiName} ${operationId}${RESET}`);
451
512
  w(`
452
513
  `);
453
514
  }
515
+ w(`${BOLD}FLAGS${RESET}
516
+
517
+ `);
518
+ w(` ${GREEN}-p${RESET} key=value Set a named parameter
519
+ `);
520
+ w(` ${GREEN}-d${RESET} '{...}' Request body JSON
521
+ `);
522
+ w(` ${GREEN}-H${RESET} 'Key: Value' Custom header
523
+ `);
524
+ w(` ${GREEN}-t, --token${RESET} <token> Bearer token for authentication
525
+ `);
526
+ w(` ${GREEN}--profile${RESET} <name> Use a named profile
527
+ `);
528
+ w(` ${GREEN}-s, --server${RESET} <url> Override server base URL
529
+ `);
530
+ w(` ${GREEN}-i, --include${RESET} Include response headers in output
531
+ `);
532
+ w(` ${GREEN}--json${RESET} Output raw JSON (no formatting)
533
+ `);
534
+ w(` ${GREEN}-v, --verbose${RESET} Verbose output (show request details)
535
+ `);
536
+ w(` ${GREEN}--jsonata${RESET} <expr> JSONata expression to transform response
537
+ `);
538
+ w(` ${GREEN}--definition${RESET} <file> Override OpenAPI spec file/URL
539
+ `);
540
+ w(` ${GREEN}--no-interactive${RESET} Disable interactive prompts
541
+ `);
542
+ w(`
543
+ `);
454
544
  w(`${BOLD}EXAMPLES${RESET}
455
545
 
456
546
  `);
@@ -544,7 +634,8 @@ ${BOLD}epilot ${apiName} ${operationId}${RESET}`);
544
634
  `);
545
635
  const limit = 40;
546
636
  const shown = lines.length <= limit ? lines : lines.slice(0, limit);
547
- for (const line of shown) w(` ${DIM}${line}${RESET}
637
+ const highlighted = highlightJson(shown.join("\n"));
638
+ for (const hLine of highlighted.split("\n")) w(` ${hLine}
548
639
  `);
549
640
  if (lines.length > limit) w(` ${DIM} ... (${lines.length - limit} more lines)${RESET}
550
641
  `);
@@ -554,12 +645,10 @@ ${BOLD}epilot ${apiName} ${operationId}${RESET}`);
554
645
  }
555
646
  }
556
647
  }
557
- return;
648
+ return out;
558
649
  }
559
650
  }
560
- process.stderr.write(`${RED}Operation "${operationId}" not found.${RESET}
561
- `);
562
- process.exit(1);
651
+ return null;
563
652
  };
564
653
  var guessJsonataExpr = (op) => {
565
654
  const successResp = op.responses?.["200"] || op.responses?.["201"];
@@ -583,25 +672,38 @@ var callApi = async (apiName, args) => {
583
672
  const spec = dereferenceSync(rawSpec);
584
673
  const operations = extractOperations(spec);
585
674
  if (!args.operation) {
586
- process.stdout.write(
587
- `
675
+ const header = `
588
676
  ${BOLD}epilot ${apiName}${RESET} - ${spec.info?.title || apiName}
589
677
 
590
- `
591
- );
592
- process.stdout.write(`${BOLD}Available operations:${RESET}
678
+ ${BOLD}Available operations:${RESET}
593
679
 
594
- `);
595
- if (isInteractive({ interactive: args.interactive })) {
680
+ `;
681
+ if (!args._apihelp && isInteractive({ interactive: args.interactive })) {
682
+ process.stdout.write(header);
596
683
  const operationId2 = await pickOperation(operations);
597
684
  return callApi(apiName, { ...args, operation: operationId2 });
598
685
  }
599
- printOperationsTable(apiName, operations);
686
+ if (args.interactive === false) {
687
+ process.stdout.write(header + formatOperationsTable(apiName, operations));
688
+ } else {
689
+ pager(header + formatOperationsTable(apiName, operations));
690
+ }
600
691
  return;
601
692
  }
602
693
  const operationId = args.operation;
603
694
  if (args.help) {
604
- printOperationHelp(apiName, operationId, spec);
695
+ const helpText = formatOperationHelp(apiName, operationId, spec);
696
+ if (helpText) {
697
+ if (args.interactive === false) {
698
+ process.stdout.write(helpText);
699
+ } else {
700
+ pager(helpText);
701
+ }
702
+ } else {
703
+ process.stderr.write(`${RED}Operation "${operationId}" not found.${RESET}
704
+ `);
705
+ process.exit(1);
706
+ }
605
707
  return;
606
708
  }
607
709
  const opExists = operations.some((op) => op.operationId === operationId);
@@ -616,7 +718,7 @@ ${BOLD}epilot ${apiName}${RESET} - ${spec.info?.title || apiName}
616
718
  let token = resolveToken(args.token, args.profile);
617
719
  if (!token) {
618
720
  if (isInteractive({ interactive: args.interactive })) {
619
- const { promptToken } = await import("./interactive-XXYFAJEI.js");
721
+ const { promptToken } = await import("./interactive-CD3I3Q5X.js");
620
722
  token = await promptToken();
621
723
  }
622
724
  if (!token) {
@@ -702,7 +804,9 @@ ${BOLD}epilot ${apiName}${RESET} - ${spec.info?.title || apiName}
702
804
  json: args.json,
703
805
  include: args.include,
704
806
  verbose: args.verbose,
705
- jsonata: args.jsonata
807
+ jsonata: args.jsonata,
808
+ interactive: args.interactive,
809
+ operationId
706
810
  });
707
811
  if (response.status >= 400) {
708
812
  process.exit(1);
@@ -8,7 +8,7 @@ import {
8
8
  RED,
9
9
  RESET,
10
10
  YELLOW
11
- } from "./chunk-6RBLA5YE.js";
11
+ } from "./chunk-7ZQ666ZQ.js";
12
12
 
13
13
  // src/commands/completion.ts
14
14
  import { defineCommand } from "citty";
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BJOXXFMA.js";
4
+ } from "./chunk-EU2A2ORP.js";
5
5
  import "./chunk-RSA7K5HB.js";
6
6
  import "./chunk-PDMWUCWD.js";
7
- import "./chunk-HN4QDJOJ.js";
8
- import "./chunk-6RBLA5YE.js";
7
+ import "./chunk-AMOFZJ5W.js";
8
+ import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/consent.ts
11
11
  import { defineCommand } from "citty";
@@ -25,7 +25,8 @@ var consent_default = defineCommand({
25
25
  verbose: { type: "boolean", alias: "v", description: "Verbose output" },
26
26
  interactive: { type: "boolean", description: "Interactive mode" },
27
27
  jsonata: { type: "string", description: "JSONata expression to transform response" },
28
- _ophelp: { type: "boolean", description: "Show operation help", required: false }
28
+ _ophelp: { type: "boolean", description: "Show operation help", required: false },
29
+ _apihelp: { type: "boolean", description: "Show API help", required: false }
29
30
  },
30
31
  run: ({ args, rawArgs }) => {
31
32
  const positionalArgs = [];
@@ -42,6 +43,7 @@ var consent_default = defineCommand({
42
43
  return callApi("consent", {
43
44
  ...args,
44
45
  help: !!args._ophelp,
46
+ _apihelp: !!args._apihelp,
45
47
  _args: positionalArgs
46
48
  });
47
49
  }
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BJOXXFMA.js";
4
+ } from "./chunk-EU2A2ORP.js";
5
5
  import "./chunk-RSA7K5HB.js";
6
6
  import "./chunk-PDMWUCWD.js";
7
- import "./chunk-HN4QDJOJ.js";
8
- import "./chunk-6RBLA5YE.js";
7
+ import "./chunk-AMOFZJ5W.js";
8
+ import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/customer-portal.ts
11
11
  import { defineCommand } from "citty";
@@ -25,7 +25,8 @@ var customer_portal_default = defineCommand({
25
25
  verbose: { type: "boolean", alias: "v", description: "Verbose output" },
26
26
  interactive: { type: "boolean", description: "Interactive mode" },
27
27
  jsonata: { type: "string", description: "JSONata expression to transform response" },
28
- _ophelp: { type: "boolean", description: "Show operation help", required: false }
28
+ _ophelp: { type: "boolean", description: "Show operation help", required: false },
29
+ _apihelp: { type: "boolean", description: "Show API help", required: false }
29
30
  },
30
31
  run: ({ args, rawArgs }) => {
31
32
  const positionalArgs = [];
@@ -42,6 +43,7 @@ var customer_portal_default = defineCommand({
42
43
  return callApi("customer-portal", {
43
44
  ...args,
44
45
  help: !!args._ophelp,
46
+ _apihelp: !!args._apihelp,
45
47
  _args: positionalArgs
46
48
  });
47
49
  }
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BJOXXFMA.js";
4
+ } from "./chunk-EU2A2ORP.js";
5
5
  import "./chunk-RSA7K5HB.js";
6
6
  import "./chunk-PDMWUCWD.js";
7
- import "./chunk-HN4QDJOJ.js";
8
- import "./chunk-6RBLA5YE.js";
7
+ import "./chunk-AMOFZJ5W.js";
8
+ import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/dashboard.ts
11
11
  import { defineCommand } from "citty";
@@ -25,7 +25,8 @@ var dashboard_default = defineCommand({
25
25
  verbose: { type: "boolean", alias: "v", description: "Verbose output" },
26
26
  interactive: { type: "boolean", description: "Interactive mode" },
27
27
  jsonata: { type: "string", description: "JSONata expression to transform response" },
28
- _ophelp: { type: "boolean", description: "Show operation help", required: false }
28
+ _ophelp: { type: "boolean", description: "Show operation help", required: false },
29
+ _apihelp: { type: "boolean", description: "Show API help", required: false }
29
30
  },
30
31
  run: ({ args, rawArgs }) => {
31
32
  const positionalArgs = [];
@@ -42,6 +43,7 @@ var dashboard_default = defineCommand({
42
43
  return callApi("dashboard", {
43
44
  ...args,
44
45
  help: !!args._ophelp,
46
+ _apihelp: !!args._apihelp,
45
47
  _args: positionalArgs
46
48
  });
47
49
  }
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BJOXXFMA.js";
4
+ } from "./chunk-EU2A2ORP.js";
5
5
  import "./chunk-RSA7K5HB.js";
6
6
  import "./chunk-PDMWUCWD.js";
7
- import "./chunk-HN4QDJOJ.js";
8
- import "./chunk-6RBLA5YE.js";
7
+ import "./chunk-AMOFZJ5W.js";
8
+ import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/data-management.ts
11
11
  import { defineCommand } from "citty";
@@ -25,7 +25,8 @@ var data_management_default = defineCommand({
25
25
  verbose: { type: "boolean", alias: "v", description: "Verbose output" },
26
26
  interactive: { type: "boolean", description: "Interactive mode" },
27
27
  jsonata: { type: "string", description: "JSONata expression to transform response" },
28
- _ophelp: { type: "boolean", description: "Show operation help", required: false }
28
+ _ophelp: { type: "boolean", description: "Show operation help", required: false },
29
+ _apihelp: { type: "boolean", description: "Show API help", required: false }
29
30
  },
30
31
  run: ({ args, rawArgs }) => {
31
32
  const positionalArgs = [];
@@ -42,6 +43,7 @@ var data_management_default = defineCommand({
42
43
  return callApi("data-management", {
43
44
  ...args,
44
45
  help: !!args._ophelp,
46
+ _apihelp: !!args._apihelp,
45
47
  _args: positionalArgs
46
48
  });
47
49
  }
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BJOXXFMA.js";
4
+ } from "./chunk-EU2A2ORP.js";
5
5
  import "./chunk-RSA7K5HB.js";
6
6
  import "./chunk-PDMWUCWD.js";
7
- import "./chunk-HN4QDJOJ.js";
8
- import "./chunk-6RBLA5YE.js";
7
+ import "./chunk-AMOFZJ5W.js";
8
+ import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/deduplication.ts
11
11
  import { defineCommand } from "citty";
@@ -25,7 +25,8 @@ var deduplication_default = defineCommand({
25
25
  verbose: { type: "boolean", alias: "v", description: "Verbose output" },
26
26
  interactive: { type: "boolean", description: "Interactive mode" },
27
27
  jsonata: { type: "string", description: "JSONata expression to transform response" },
28
- _ophelp: { type: "boolean", description: "Show operation help", required: false }
28
+ _ophelp: { type: "boolean", description: "Show operation help", required: false },
29
+ _apihelp: { type: "boolean", description: "Show API help", required: false }
29
30
  },
30
31
  run: ({ args, rawArgs }) => {
31
32
  const positionalArgs = [];
@@ -42,6 +43,7 @@ var deduplication_default = defineCommand({
42
43
  return callApi("deduplication", {
43
44
  ...args,
44
45
  help: !!args._ophelp,
46
+ _apihelp: !!args._apihelp,
45
47
  _args: positionalArgs
46
48
  });
47
49
  }
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BJOXXFMA.js";
4
+ } from "./chunk-EU2A2ORP.js";
5
5
  import "./chunk-RSA7K5HB.js";
6
6
  import "./chunk-PDMWUCWD.js";
7
- import "./chunk-HN4QDJOJ.js";
8
- import "./chunk-6RBLA5YE.js";
7
+ import "./chunk-AMOFZJ5W.js";
8
+ import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/design.ts
11
11
  import { defineCommand } from "citty";
@@ -25,7 +25,8 @@ var design_default = defineCommand({
25
25
  verbose: { type: "boolean", alias: "v", description: "Verbose output" },
26
26
  interactive: { type: "boolean", description: "Interactive mode" },
27
27
  jsonata: { type: "string", description: "JSONata expression to transform response" },
28
- _ophelp: { type: "boolean", description: "Show operation help", required: false }
28
+ _ophelp: { type: "boolean", description: "Show operation help", required: false },
29
+ _apihelp: { type: "boolean", description: "Show API help", required: false }
29
30
  },
30
31
  run: ({ args, rawArgs }) => {
31
32
  const positionalArgs = [];
@@ -42,6 +43,7 @@ var design_default = defineCommand({
42
43
  return callApi("design", {
43
44
  ...args,
44
45
  help: !!args._ophelp,
46
+ _apihelp: !!args._apihelp,
45
47
  _args: positionalArgs
46
48
  });
47
49
  }