@epilot/cli 0.1.6 → 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.
- package/README.md +2 -2
- package/dist/{access-token-BDNU3ZFC.js → access-token-BV7OAX75.js} +6 -4
- package/dist/{address-ZCYZYRP4.js → address-4Z6WADBJ.js} +6 -4
- package/dist/{address-suggestions-RP5N7NVQ.js → address-suggestions-7BXTJCZH.js} +6 -4
- package/dist/{ai-agents-PLUGVZTI.js → ai-agents-VB2WGMIZ.js} +6 -4
- package/dist/{app-HZECIN6N.js → app-DXDK7UZX.js} +6 -4
- package/dist/{audit-logs-JWKGNHPP.js → audit-logs-5ZEZNO5T.js} +6 -4
- package/dist/{auth-JRW6QLKR.js → auth-AAF6Z5WZ.js} +3 -3
- package/dist/{auth-login-7B4GCQWY.js → auth-login-AJ6F5GPQ.js} +12 -11
- package/dist/{auth-token-VSNRXUBI.js → auth-token-J4FI2RMT.js} +1 -1
- package/dist/{automation-73BC4PYK.js → automation-V5CN2KUO.js} +6 -4
- package/dist/{billing-GQDSK4H2.js → billing-FKPDTZ6G.js} +6 -4
- package/dist/bin/epilot.js +62 -54
- package/dist/{blueprint-manifest-4M7DNWYE.js → blueprint-manifest-2CINVMTI.js} +6 -4
- package/dist/{chunk-6RBLA5YE.js → chunk-7ZQ666ZQ.js} +44 -1
- package/dist/{chunk-HN4QDJOJ.js → chunk-AMOFZJ5W.js} +8 -9
- package/dist/{chunk-BJOXXFMA.js → chunk-EU2A2ORP.js} +156 -52
- package/dist/{completion-RCVUCEMM.js → completion-EKFXGPNK.js} +1 -1
- package/dist/{consent-OJBGOI54.js → consent-HZ7EVD4I.js} +6 -4
- package/dist/{customer-portal-BDKNWKHA.js → customer-portal-XHM7X235.js} +6 -4
- package/dist/{dashboard-IAEU3JFY.js → dashboard-NVP6FMOH.js} +6 -4
- package/dist/{data-management-UEDSGAKB.js → data-management-JGDAGO75.js} +6 -4
- package/dist/{deduplication-JJS3TOJ2.js → deduplication-DTY4VICH.js} +6 -4
- package/dist/{design-WKSDZFBJ.js → design-72XM3PQR.js} +6 -4
- package/dist/{document-P5OL4NYY.js → document-OH4T743T.js} +6 -4
- package/dist/{email-settings-743JHCKS.js → email-settings-BSU45CNC.js} +6 -4
- package/dist/{email-template-MW4IVDPM.js → email-template-VHUF3OYL.js} +6 -4
- package/dist/{entity-K5X6FWJI.js → entity-RBMVRPDS.js} +6 -4
- package/dist/{entity-mapping-QBJ2I2VR.js → entity-mapping-7QUMDAQO.js} +6 -4
- package/dist/{environments-VUR7ME42.js → environments-RM333MM3.js} +6 -4
- package/dist/{erp-integration-A2KAIXUQ.js → erp-integration-RBW2CSPM.js} +6 -4
- package/dist/{event-catalog-6YEG5CEM.js → event-catalog-APQS5GOU.js} +6 -4
- package/dist/{file-J6PHZ447.js → file-SU2T5RF6.js} +6 -4
- package/dist/{iban-DJSUCRU6.js → iban-XRAJ3QJA.js} +6 -4
- package/dist/{interactive-XXYFAJEI.js → interactive-CD3I3Q5X.js} +4 -4
- package/dist/{journey-QJZKU3PZ.js → journey-SRK5MDRQ.js} +6 -4
- package/dist/{kanban-ZF4IIG7Q.js → kanban-2IDQXJ4R.js} +6 -4
- package/dist/{message-WH4GD5SC.js → message-TV7TZI2Y.js} +6 -4
- package/dist/{metering-FCWUZ2TC.js → metering-LHBESUA2.js} +6 -4
- package/dist/{notes-KKVPGK7K.js → notes-3KTVUFIQ.js} +6 -4
- package/dist/{notification-4MVAZTRP.js → notification-6FHJXYCH.js} +6 -4
- package/dist/{organization-2UT2KFMB.js → organization-MBRTAROH.js} +6 -4
- package/dist/{partner-directory-SUNW4XN7.js → partner-directory-NUWSXNVD.js} +6 -4
- package/dist/{permissions-36VGB4BQ.js → permissions-CD2OPGOC.js} +6 -4
- package/dist/{pricing-RCNFEEHO.js → pricing-6C6LWKER.js} +6 -4
- package/dist/{pricing-tier-MNCLLXD5.js → pricing-tier-U67UYOP5.js} +6 -4
- package/dist/{profile-MZ3VK7PO.js → profile-EK4HSQ57.js} +1 -1
- package/dist/{purpose-3JN63WTQ.js → purpose-3UTD6PG2.js} +6 -4
- package/dist/{sandbox-C676YDRV.js → sandbox-AU5TUO7G.js} +6 -4
- package/dist/{submission-5XTNMMCK.js → submission-LXDAZTAB.js} +6 -4
- package/dist/{targeting-C52KV6IW.js → targeting-YDU2O744.js} +6 -4
- package/dist/{template-variables-5SKJEJF4.js → template-variables-MLSMLLYA.js} +6 -4
- package/dist/{upgrade-GSUVIXOB.js → upgrade-KIOCOPB7.js} +2 -2
- package/dist/{user-DYAR3N6L.js → user-WMSSXQHK.js} +6 -4
- package/dist/{validation-rules-LDAOUPOO.js → validation-rules-W7A4DMWK.js} +6 -4
- package/dist/{webhooks-MT2P33A2.js → webhooks-QSYAFFQ2.js} +6 -4
- package/dist/{workflow-YGWGE6L4.js → workflow-KKAMUHYE.js} +6 -4
- package/dist/{workflow-definition-JG54ZWGL.js → workflow-definition-ECXHF425.js} +6 -4
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
DIM,
|
|
4
4
|
RESET
|
|
5
|
-
} from "./chunk-
|
|
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
|
|
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
|
-
|
|
64
|
-
`);
|
|
62
|
+
lines.push(` ${op.operationId} ${DIM}${op.method.toUpperCase()} ${op.path}${desc}${RESET}`);
|
|
65
63
|
}
|
|
66
|
-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
260
|
-
|
|
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 (
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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
|
-
|
|
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
|
-
|
|
286
|
-
|
|
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
|
-
|
|
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 (
|
|
305
|
-
|
|
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
|
|
309
|
-
|
|
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
|
|
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(` ${
|
|
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(` ${
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
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);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EU2A2ORP.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
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-
|
|
4
|
+
} from "./chunk-EU2A2ORP.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
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-
|
|
4
|
+
} from "./chunk-EU2A2ORP.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
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-
|
|
4
|
+
} from "./chunk-EU2A2ORP.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
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-
|
|
4
|
+
} from "./chunk-EU2A2ORP.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
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-
|
|
4
|
+
} from "./chunk-EU2A2ORP.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
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
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EU2A2ORP.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-AMOFZJ5W.js";
|
|
8
|
+
import "./chunk-7ZQ666ZQ.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/apis/document.ts
|
|
11
11
|
import { defineCommand } from "citty";
|
|
@@ -25,7 +25,8 @@ var document_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 document_default = defineCommand({
|
|
|
42
43
|
return callApi("document", {
|
|
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-
|
|
4
|
+
} from "./chunk-EU2A2ORP.js";
|
|
5
5
|
import "./chunk-RSA7K5HB.js";
|
|
6
6
|
import "./chunk-PDMWUCWD.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-AMOFZJ5W.js";
|
|
8
|
+
import "./chunk-7ZQ666ZQ.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/apis/email-settings.ts
|
|
11
11
|
import { defineCommand } from "citty";
|
|
@@ -25,7 +25,8 @@ var email_settings_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 email_settings_default = defineCommand({
|
|
|
42
43
|
return callApi("email-settings", {
|
|
43
44
|
...args,
|
|
44
45
|
help: !!args._ophelp,
|
|
46
|
+
_apihelp: !!args._apihelp,
|
|
45
47
|
_args: positionalArgs
|
|
46
48
|
});
|
|
47
49
|
}
|