@epilot/cli 0.1.0 → 0.1.2

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 (58) hide show
  1. package/README.md +91 -101
  2. package/dist/{access-token-OG5AR7UB.js → access-token-F2VH6TNQ.js} +4 -4
  3. package/dist/{address-QUSMK5GV.js → address-YBOAFFFH.js} +4 -4
  4. package/dist/{address-suggestions-E5SQNUS5.js → address-suggestions-ITPRYJSF.js} +4 -4
  5. package/dist/{ai-agents-PM42SJY3.js → ai-agents-EBWNYR5R.js} +4 -4
  6. package/dist/{app-YTM3XAJL.js → app-WOAQAMSE.js} +4 -4
  7. package/dist/{audit-logs-NXP7GFKX.js → audit-logs-OAUUPKTJ.js} +4 -4
  8. package/dist/{auth-CCBTXH5U.js → auth-NEBRZ66K.js} +4 -4
  9. package/dist/{auth-login-2ZIXM47J.js → auth-login-QQBH7BVA.js} +42 -39
  10. package/dist/{auth-token-OS4BEEVZ.js → auth-token-W6GXKHXB.js} +2 -2
  11. package/dist/{automation-TDJASTEV.js → automation-52ONEM6D.js} +4 -4
  12. package/dist/{billing-M4MRBLEK.js → billing-2RED3OVH.js} +4 -4
  13. package/dist/bin/epilot.js +162 -49
  14. package/dist/{blueprint-manifest-NQL7NRMV.js → blueprint-manifest-4VTVMR42.js} +4 -4
  15. package/dist/{chunk-RC3GCXCI.js → chunk-4VITQVW2.js} +2 -4
  16. package/dist/{chunk-57PPARIW.js → chunk-5CTRM3JQ.js} +24 -21
  17. package/dist/{chunk-IST42ZNL.js → chunk-PDMWUCWD.js} +1 -1
  18. package/dist/{chunk-5WUPDZ5D.js → chunk-RSA7K5HB.js} +1 -1
  19. package/dist/{consent-KQ7MJAS6.js → consent-25X3PFNT.js} +4 -4
  20. package/dist/{customer-portal-VUVSKWAQ.js → customer-portal-T6VNRPQY.js} +4 -4
  21. package/dist/{dashboard-GVR4XNGR.js → dashboard-MBTUKEVN.js} +4 -4
  22. package/dist/{data-management-2RD3DLOS.js → data-management-ZHPS67MI.js} +4 -4
  23. package/dist/{deduplication-PY77EINR.js → deduplication-L2UABHUX.js} +4 -4
  24. package/dist/{design-M4FP2K5R.js → design-ELKIZCND.js} +4 -4
  25. package/dist/{document-P4QA7LEZ.js → document-VF2C5OPK.js} +4 -4
  26. package/dist/{email-settings-7HGGRCCM.js → email-settings-TM6TIDZQ.js} +4 -4
  27. package/dist/{email-template-3HXQI4CH.js → email-template-S7NLUNON.js} +4 -4
  28. package/dist/{entity-XUESZBPJ.js → entity-5AAD2R3S.js} +4 -4
  29. package/dist/{entity-mapping-JBKWWBH2.js → entity-mapping-UOFXQLQ2.js} +4 -4
  30. package/dist/{environments-KKOS7ONY.js → environments-STU24LWT.js} +4 -4
  31. package/dist/{erp-integration-YTOWHCAW.js → erp-integration-DMPYQNVW.js} +4 -4
  32. package/dist/{event-catalog-UKLZUGC4.js → event-catalog-HGSD3RZW.js} +4 -4
  33. package/dist/{file-IFZNZ547.js → file-G355J7IL.js} +4 -4
  34. package/dist/{iban-X2IW2NWU.js → iban-FIL4TCSN.js} +4 -4
  35. package/dist/{interactive-46ICLQKL.js → interactive-RWCSFGXL.js} +1 -1
  36. package/dist/{journey-JU6X2KMX.js → journey-4IZDKDY7.js} +4 -4
  37. package/dist/{kanban-VHUU44PM.js → kanban-DNIP4AAI.js} +4 -4
  38. package/dist/{message-AOUWJ4YX.js → message-W4TZ32YH.js} +4 -4
  39. package/dist/{metering-RDS3XBD5.js → metering-GKGJZTDF.js} +4 -4
  40. package/dist/{notes-WE2UC75B.js → notes-AS7BD3B6.js} +4 -4
  41. package/dist/{notification-FKFNBHYZ.js → notification-N4ACDEK7.js} +4 -4
  42. package/dist/{organization-LMNFF6BX.js → organization-IYNBC4SB.js} +4 -4
  43. package/dist/{partner-directory-IIZVQDXJ.js → partner-directory-DZX32S4J.js} +4 -4
  44. package/dist/{permissions-AYCMVM7Y.js → permissions-Z7KVPSVL.js} +4 -4
  45. package/dist/{pricing-PS26FWBS.js → pricing-OLSQRQZN.js} +4 -4
  46. package/dist/{pricing-tier-FBXWQ6T3.js → pricing-tier-IP274TML.js} +4 -4
  47. package/dist/{profile-5Q5YARG7.js → profile-PPVSNNBG.js} +1 -1
  48. package/dist/{purpose-HE4E4SVU.js → purpose-YCIEYFCH.js} +4 -4
  49. package/dist/{sandbox-Z7BU4UAD.js → sandbox-AKFR5LEQ.js} +4 -4
  50. package/dist/{submission-MWVDF2ZB.js → submission-XONDJGXI.js} +4 -4
  51. package/dist/{targeting-7NM5GDJ6.js → targeting-QWHVJCWI.js} +4 -4
  52. package/dist/{template-variables-AJAR7PAV.js → template-variables-Q3J3IPSF.js} +4 -4
  53. package/dist/{user-A26XQXG3.js → user-QNPACYI3.js} +4 -4
  54. package/dist/{validation-rules-VZTISEG2.js → validation-rules-XT3SRBJ3.js} +4 -4
  55. package/dist/{webhooks-RXH67WZ3.js → webhooks-RH5VYEY6.js} +4 -4
  56. package/dist/{workflow-G4FUUGZQ.js → workflow-BKSEFDUM.js} +4 -4
  57. package/dist/{workflow-definition-LJYLMMGD.js → workflow-definition-DGEBEIGG.js} +4 -4
  58. package/package.json +4 -1
@@ -5,13 +5,14 @@ import {
5
5
 
6
6
  // bin/epilot.ts
7
7
  import { runMain } from "citty";
8
+ import { createRequire } from "module";
8
9
 
9
10
  // src/index.ts
10
11
  import { defineCommand } from "citty";
11
12
  var main = defineCommand({
12
13
  meta: {
13
14
  name: "epilot",
14
- version: "0.1.0",
15
+ version: "0.1.2",
15
16
  description: "CLI for epilot APIs"
16
17
  },
17
18
  args: {
@@ -24,59 +25,61 @@ var main = defineCommand({
24
25
  jsonata: { type: "string", description: "JSONata expression" }
25
26
  },
26
27
  subCommands: {
27
- auth: () => import("../auth-CCBTXH5U.js").then((m) => m.default),
28
- profile: () => import("../profile-5Q5YARG7.js").then((m) => m.default),
28
+ auth: () => import("../auth-NEBRZ66K.js").then((m) => m.default),
29
+ profile: () => import("../profile-PPVSNNBG.js").then((m) => m.default),
29
30
  completion: () => import("../completion-GRQM2FJQ.js").then((m) => m.default),
30
- "access-token": () => import("../access-token-OG5AR7UB.js").then((m) => m.default),
31
- "address": () => import("../address-QUSMK5GV.js").then((m) => m.default),
32
- "address-suggestions": () => import("../address-suggestions-E5SQNUS5.js").then((m) => m.default),
33
- "ai-agents": () => import("../ai-agents-PM42SJY3.js").then((m) => m.default),
34
- "app": () => import("../app-YTM3XAJL.js").then((m) => m.default),
35
- "audit-logs": () => import("../audit-logs-NXP7GFKX.js").then((m) => m.default),
36
- "automation": () => import("../automation-TDJASTEV.js").then((m) => m.default),
37
- "billing": () => import("../billing-M4MRBLEK.js").then((m) => m.default),
38
- "blueprint-manifest": () => import("../blueprint-manifest-NQL7NRMV.js").then((m) => m.default),
39
- "consent": () => import("../consent-KQ7MJAS6.js").then((m) => m.default),
40
- "customer-portal": () => import("../customer-portal-VUVSKWAQ.js").then((m) => m.default),
41
- "dashboard": () => import("../dashboard-GVR4XNGR.js").then((m) => m.default),
42
- "data-management": () => import("../data-management-2RD3DLOS.js").then((m) => m.default),
43
- "deduplication": () => import("../deduplication-PY77EINR.js").then((m) => m.default),
44
- "design": () => import("../design-M4FP2K5R.js").then((m) => m.default),
45
- "document": () => import("../document-P4QA7LEZ.js").then((m) => m.default),
46
- "email-settings": () => import("../email-settings-7HGGRCCM.js").then((m) => m.default),
47
- "email-template": () => import("../email-template-3HXQI4CH.js").then((m) => m.default),
48
- "entity": () => import("../entity-XUESZBPJ.js").then((m) => m.default),
49
- "entity-mapping": () => import("../entity-mapping-JBKWWBH2.js").then((m) => m.default),
50
- "environments": () => import("../environments-KKOS7ONY.js").then((m) => m.default),
51
- "erp-integration": () => import("../erp-integration-YTOWHCAW.js").then((m) => m.default),
52
- "event-catalog": () => import("../event-catalog-UKLZUGC4.js").then((m) => m.default),
53
- "file": () => import("../file-IFZNZ547.js").then((m) => m.default),
54
- "iban": () => import("../iban-X2IW2NWU.js").then((m) => m.default),
55
- "journey": () => import("../journey-JU6X2KMX.js").then((m) => m.default),
56
- "kanban": () => import("../kanban-VHUU44PM.js").then((m) => m.default),
57
- "message": () => import("../message-AOUWJ4YX.js").then((m) => m.default),
58
- "metering": () => import("../metering-RDS3XBD5.js").then((m) => m.default),
59
- "notes": () => import("../notes-WE2UC75B.js").then((m) => m.default),
60
- "notification": () => import("../notification-FKFNBHYZ.js").then((m) => m.default),
61
- "organization": () => import("../organization-LMNFF6BX.js").then((m) => m.default),
62
- "partner-directory": () => import("../partner-directory-IIZVQDXJ.js").then((m) => m.default),
63
- "permissions": () => import("../permissions-AYCMVM7Y.js").then((m) => m.default),
64
- "pricing": () => import("../pricing-PS26FWBS.js").then((m) => m.default),
65
- "pricing-tier": () => import("../pricing-tier-FBXWQ6T3.js").then((m) => m.default),
66
- "purpose": () => import("../purpose-HE4E4SVU.js").then((m) => m.default),
67
- "sandbox": () => import("../sandbox-Z7BU4UAD.js").then((m) => m.default),
68
- "submission": () => import("../submission-MWVDF2ZB.js").then((m) => m.default),
69
- "targeting": () => import("../targeting-7NM5GDJ6.js").then((m) => m.default),
70
- "template-variables": () => import("../template-variables-AJAR7PAV.js").then((m) => m.default),
71
- "user": () => import("../user-A26XQXG3.js").then((m) => m.default),
72
- "validation-rules": () => import("../validation-rules-VZTISEG2.js").then((m) => m.default),
73
- "webhooks": () => import("../webhooks-RXH67WZ3.js").then((m) => m.default),
74
- "workflow": () => import("../workflow-G4FUUGZQ.js").then((m) => m.default),
75
- "workflow-definition": () => import("../workflow-definition-LJYLMMGD.js").then((m) => m.default)
31
+ "access-token": () => import("../access-token-F2VH6TNQ.js").then((m) => m.default),
32
+ address: () => import("../address-YBOAFFFH.js").then((m) => m.default),
33
+ "address-suggestions": () => import("../address-suggestions-ITPRYJSF.js").then((m) => m.default),
34
+ "ai-agents": () => import("../ai-agents-EBWNYR5R.js").then((m) => m.default),
35
+ app: () => import("../app-WOAQAMSE.js").then((m) => m.default),
36
+ "audit-logs": () => import("../audit-logs-OAUUPKTJ.js").then((m) => m.default),
37
+ automation: () => import("../automation-52ONEM6D.js").then((m) => m.default),
38
+ billing: () => import("../billing-2RED3OVH.js").then((m) => m.default),
39
+ "blueprint-manifest": () => import("../blueprint-manifest-4VTVMR42.js").then((m) => m.default),
40
+ consent: () => import("../consent-25X3PFNT.js").then((m) => m.default),
41
+ "customer-portal": () => import("../customer-portal-T6VNRPQY.js").then((m) => m.default),
42
+ dashboard: () => import("../dashboard-MBTUKEVN.js").then((m) => m.default),
43
+ "data-management": () => import("../data-management-ZHPS67MI.js").then((m) => m.default),
44
+ deduplication: () => import("../deduplication-L2UABHUX.js").then((m) => m.default),
45
+ design: () => import("../design-ELKIZCND.js").then((m) => m.default),
46
+ document: () => import("../document-VF2C5OPK.js").then((m) => m.default),
47
+ "email-settings": () => import("../email-settings-TM6TIDZQ.js").then((m) => m.default),
48
+ "email-template": () => import("../email-template-S7NLUNON.js").then((m) => m.default),
49
+ entity: () => import("../entity-5AAD2R3S.js").then((m) => m.default),
50
+ "entity-mapping": () => import("../entity-mapping-UOFXQLQ2.js").then((m) => m.default),
51
+ environments: () => import("../environments-STU24LWT.js").then((m) => m.default),
52
+ "erp-integration": () => import("../erp-integration-DMPYQNVW.js").then((m) => m.default),
53
+ "event-catalog": () => import("../event-catalog-HGSD3RZW.js").then((m) => m.default),
54
+ file: () => import("../file-G355J7IL.js").then((m) => m.default),
55
+ iban: () => import("../iban-FIL4TCSN.js").then((m) => m.default),
56
+ journey: () => import("../journey-4IZDKDY7.js").then((m) => m.default),
57
+ kanban: () => import("../kanban-DNIP4AAI.js").then((m) => m.default),
58
+ message: () => import("../message-W4TZ32YH.js").then((m) => m.default),
59
+ metering: () => import("../metering-GKGJZTDF.js").then((m) => m.default),
60
+ notes: () => import("../notes-AS7BD3B6.js").then((m) => m.default),
61
+ notification: () => import("../notification-N4ACDEK7.js").then((m) => m.default),
62
+ organization: () => import("../organization-IYNBC4SB.js").then((m) => m.default),
63
+ "partner-directory": () => import("../partner-directory-DZX32S4J.js").then((m) => m.default),
64
+ permissions: () => import("../permissions-Z7KVPSVL.js").then((m) => m.default),
65
+ pricing: () => import("../pricing-OLSQRQZN.js").then((m) => m.default),
66
+ "pricing-tier": () => import("../pricing-tier-IP274TML.js").then((m) => m.default),
67
+ purpose: () => import("../purpose-YCIEYFCH.js").then((m) => m.default),
68
+ sandbox: () => import("../sandbox-AKFR5LEQ.js").then((m) => m.default),
69
+ submission: () => import("../submission-XONDJGXI.js").then((m) => m.default),
70
+ targeting: () => import("../targeting-QWHVJCWI.js").then((m) => m.default),
71
+ "template-variables": () => import("../template-variables-Q3J3IPSF.js").then((m) => m.default),
72
+ user: () => import("../user-QNPACYI3.js").then((m) => m.default),
73
+ "validation-rules": () => import("../validation-rules-XT3SRBJ3.js").then((m) => m.default),
74
+ webhooks: () => import("../webhooks-RH5VYEY6.js").then((m) => m.default),
75
+ workflow: () => import("../workflow-BKSEFDUM.js").then((m) => m.default),
76
+ "workflow-definition": () => import("../workflow-definition-DGEBEIGG.js").then((m) => m.default)
76
77
  }
77
78
  });
78
79
 
79
80
  // bin/epilot.ts
81
+ var require2 = createRequire(import.meta.url);
82
+ var VERSION = require2("../package.json").version;
80
83
  var args = process.argv.slice(2);
81
84
  var completionsIdx = args.indexOf("--_completions");
82
85
  if (completionsIdx >= 0) {
@@ -85,6 +88,17 @@ if (completionsIdx >= 0) {
85
88
  process.exit(0);
86
89
  }
87
90
  var hasHelp = args.includes("--help") || args.includes("-h");
91
+ var hasVersion = args.includes("--version") || args.includes("-V");
92
+ var hasNoSubcommand = args.filter((a) => !a.startsWith("-")).length === 0;
93
+ if (hasVersion && hasNoSubcommand) {
94
+ process.stdout.write(`${VERSION}
95
+ `);
96
+ process.exit(0);
97
+ }
98
+ if (hasNoSubcommand && (hasHelp || args.length === 0)) {
99
+ printRootHelp();
100
+ process.exit(0);
101
+ }
88
102
  if (hasHelp && args.length >= 2) {
89
103
  const apiArg = args.find((a) => !a.startsWith("-"));
90
104
  const isApi = apiArg && API_LIST.some((api) => api.kebabName === apiArg);
@@ -102,3 +116,102 @@ if (hasHelp && args.length >= 2) {
102
116
  }
103
117
  }
104
118
  runMain(main);
119
+ function printRootHelp() {
120
+ const DIM = "\x1B[2m";
121
+ const BOLD = "\x1B[1m";
122
+ const CYAN = "\x1B[36m";
123
+ const GREEN = "\x1B[32m";
124
+ const YELLOW = "\x1B[33m";
125
+ const R = "\x1B[0m";
126
+ const w = (s) => process.stdout.write(s);
127
+ w(`${BOLD}epilot${R} ${DIM}v${VERSION}${R} \u2014 CLI for epilot APIs
128
+ `);
129
+ w(`
130
+ `);
131
+ w(`${BOLD}USAGE${R}
132
+ `);
133
+ w(` ${CYAN}epilot${R} <api> <operationId> [params...] [flags]
134
+ `);
135
+ w(` ${CYAN}epilot${R} <api> ${DIM}List operations for an API${R}
136
+ `);
137
+ w(` ${CYAN}epilot${R} <api> <op> --help ${DIM}Show operation details${R}
138
+ `);
139
+ w(`
140
+ `);
141
+ w(`${BOLD}FLAGS${R}
142
+ `);
143
+ w(` ${GREEN}-t, --token${R} <token> Bearer token for authentication
144
+ `);
145
+ w(` ${GREEN}--profile${R} <name> Use a named profile ${DIM}(or EPILOT_PROFILE)${R}
146
+ `);
147
+ w(` ${GREEN}-s, --server${R} <url> Override server base URL
148
+ `);
149
+ w(` ${GREEN}--json${R} Output raw JSON (no formatting)
150
+ `);
151
+ w(` ${GREEN}-v, --verbose${R} Verbose output (show request details)
152
+ `);
153
+ w(` ${GREEN}--jsonata${R} <expr> JSONata expression to transform response
154
+ `);
155
+ w(` ${GREEN}--no-interactive${R} Disable interactive prompts
156
+ `);
157
+ w(`
158
+ `);
159
+ w(`${BOLD}PARAMETER FLAGS${R}
160
+ `);
161
+ w(` ${GREEN}-p${R} key=value Set a named parameter
162
+ `);
163
+ w(` ${GREEN}-d${R} '{...}' Request body JSON
164
+ `);
165
+ w(` ${GREEN}-H${R} 'Key: Value' Custom header
166
+ `);
167
+ w(` ${GREEN}-i, --include${R} Include response headers in output
168
+ `);
169
+ w(`
170
+ `);
171
+ w(`${BOLD}COMMANDS${R}
172
+ `);
173
+ w(` ${CYAN}auth login${R} Authenticate with epilot (browser)
174
+ `);
175
+ w(` ${CYAN}auth token${R} Store an API token directly
176
+ `);
177
+ w(` ${CYAN}auth status${R} Show authentication status
178
+ `);
179
+ w(` ${CYAN}auth logout${R} Remove stored credentials
180
+ `);
181
+ w(` ${CYAN}profile${R} Manage named profiles
182
+ `);
183
+ w(` ${CYAN}completion${R} Generate shell completion scripts
184
+ `);
185
+ w(`
186
+ `);
187
+ w(`${BOLD}APIs${R}
188
+ `);
189
+ const maxName = Math.max(...API_LIST.map((a) => a.kebabName.length));
190
+ for (const api of API_LIST) {
191
+ const padded = api.kebabName.padEnd(maxName + 2);
192
+ w(` ${CYAN}${padded}${R}${DIM}${api.title}${R}
193
+ `);
194
+ }
195
+ w(`
196
+ `);
197
+ w(`${BOLD}EXAMPLES${R}
198
+ `);
199
+ w(` ${YELLOW}$${R} epilot auth login
200
+ `);
201
+ w(` ${YELLOW}$${R} epilot user getMeV2
202
+ `);
203
+ w(` ${YELLOW}$${R} epilot entity getEntity contact abc123
204
+ `);
205
+ w(` ${YELLOW}$${R} epilot entity searchEntities -d '{"q":"*"}'
206
+ `);
207
+ w(` ${YELLOW}$${R} epilot entity searchEntities --jsonata 'results[0]._title'
208
+ `);
209
+ w(` ${YELLOW}$${R} echo '{"q":"*"}' | epilot entity searchEntities
210
+ `);
211
+ w(`
212
+ `);
213
+ w(`Run ${CYAN}epilot <api>${R} to list available operations.
214
+ `);
215
+ w(`Run ${CYAN}epilot <api> <operationId> --help${R} for operation details.
216
+ `);
217
+ }
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/blueprint-manifest.ts
@@ -57,10 +57,8 @@ var printOperationsTable = (apiName, operations) => {
57
57
  const method = op.method.toUpperCase().padEnd(7);
58
58
  const path = op.path;
59
59
  const summary = op.summary ? ` ${DIM}${op.summary}${RESET}` : "";
60
- process.stdout.write(
61
- ` ${color}${method}${RESET} ${path.padEnd(50)} ${op.operationId}${summary}
62
- `
63
- );
60
+ process.stdout.write(` ${color}${method}${RESET} ${path.padEnd(50)} ${op.operationId}${summary}
61
+ `);
64
62
  }
65
63
  process.stdout.write(`
66
64
  Run \`epilot ${apiName} <operationId> --help\` for details.
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  resolveToken
4
- } from "./chunk-5WUPDZ5D.js";
4
+ } from "./chunk-RSA7K5HB.js";
5
5
  import {
6
6
  getResolvedProfile
7
- } from "./chunk-IST42ZNL.js";
7
+ } from "./chunk-PDMWUCWD.js";
8
8
  import {
9
9
  isInteractive,
10
10
  pickOperation,
11
11
  printOperationsTable,
12
12
  promptParam
13
- } from "./chunk-RC3GCXCI.js";
13
+ } from "./chunk-4VITQVW2.js";
14
14
  import {
15
15
  BOLD,
16
16
  DIM,
@@ -298,10 +298,12 @@ var formatResponse = async (response, options) => {
298
298
  }
299
299
  if (data !== void 0 && data !== null) {
300
300
  if (typeof data === "string") {
301
- process.stdout.write(data + "\n");
301
+ process.stdout.write(`${data}
302
+ `);
302
303
  } else {
303
304
  const indent = json ? 0 : 2;
304
- process.stdout.write(JSON.stringify(data, null, indent) + "\n");
305
+ process.stdout.write(`${JSON.stringify(data, null, indent)}
306
+ `);
305
307
  }
306
308
  }
307
309
  };
@@ -333,8 +335,7 @@ var sampleParamValue = (p) => {
333
335
  if (schema?.example !== void 0) return String(schema.example);
334
336
  if (schema?.type === "boolean") return "true";
335
337
  if (schema?.type === "integer" || schema?.type === "number") return "1";
336
- if (p.name === "id" || p.name.endsWith("_id") || p.name.endsWith("Id"))
337
- return "123e4567-e89b-12d3-a456-426614174000";
338
+ if (p.name === "id" || p.name.endsWith("_id") || p.name.endsWith("Id")) return "123e4567-e89b-12d3-a456-426614174000";
338
339
  if (p.name === "slug") return "contact";
339
340
  if (p.name === "email") return "user@example.com";
340
341
  return "example";
@@ -454,7 +455,8 @@ ${BOLD}epilot ${apiName} ${operationId}${RESET}`);
454
455
  {
455
456
  const parts = [` ${GREEN}$${RESET} epilot ${apiName} ${operationId}`];
456
457
  for (const pf of pFlags) parts.push(pf);
457
- w(parts.join(" \\\n ") + "\n");
458
+ w(`${parts.join(" \\\n ")}
459
+ `);
458
460
  }
459
461
  w(`
460
462
  `);
@@ -488,14 +490,15 @@ ${BOLD}epilot ${apiName} ${operationId}${RESET}`);
488
490
  const parts = [` ${GREEN}$${RESET} epilot ${apiName} ${operationId}`];
489
491
  if (pFlags.length > 0) for (const pf of pFlags) parts.push(pf);
490
492
  parts.push(`-d '${pretty}'`);
491
- w(parts.join(" \\\n ") + "\n");
493
+ w(`${parts.join(" \\\n ")}
494
+ `);
492
495
  }
493
496
  w(`
494
497
  `);
495
498
  } catch {
496
499
  }
497
500
  }
498
- const pFlagsStr = pFlags.length > 0 ? " " + pFlags.join(" ") : "";
501
+ const pFlagsStr = pFlags.length > 0 ? ` ${pFlags.join(" ")}` : "";
499
502
  w(` ${DIM}# pipe from file${RESET}
500
503
  `);
501
504
  w(` ${GREEN}$${RESET} cat body.json | epilot ${apiName} ${operationId}${pFlagsStr}
@@ -504,7 +507,7 @@ ${BOLD}epilot ${apiName} ${operationId}${RESET}`);
504
507
  `);
505
508
  }
506
509
  {
507
- const pFlagsStr = pFlags.length > 0 ? " " + pFlags.join(" ") : "";
510
+ const pFlagsStr = pFlags.length > 0 ? ` ${pFlags.join(" ")}` : "";
508
511
  const jsonataExpr = guessJsonataExpr(op);
509
512
  w(` ${DIM}# filter response with JSONata${RESET}
510
513
  `);
@@ -514,7 +517,7 @@ ${BOLD}epilot ${apiName} ${operationId}${RESET}`);
514
517
  `);
515
518
  }
516
519
  {
517
- const pFlagsStr = pFlags.length > 0 ? " " + pFlags.join(" ") : "";
520
+ const pFlagsStr = pFlags.length > 0 ? ` ${pFlags.join(" ")}` : "";
518
521
  w(` ${DIM}# raw JSON for scripting${RESET}
519
522
  `);
520
523
  w(` ${GREEN}$${RESET} epilot ${apiName} ${operationId}${pFlagsStr} --json
@@ -575,10 +578,12 @@ var callApi = async (apiName, args) => {
575
578
  const spec = dereferenceSync(rawSpec);
576
579
  const operations = extractOperations(spec);
577
580
  if (!args.operation) {
578
- process.stdout.write(`
581
+ process.stdout.write(
582
+ `
579
583
  ${BOLD}epilot ${apiName}${RESET} - ${spec.info?.title || apiName}
580
584
 
581
- `);
585
+ `
586
+ );
582
587
  process.stdout.write(`${BOLD}Available operations:${RESET}
583
588
 
584
589
  `);
@@ -610,7 +615,7 @@ Available operations:
610
615
  let token = resolveToken(args.token, args.profile);
611
616
  if (!token) {
612
617
  if (isInteractive({ interactive: args.interactive })) {
613
- const { promptToken } = await import("./interactive-46ICLQKL.js");
618
+ const { promptToken } = await import("./interactive-RWCSFGXL.js");
614
619
  token = await promptToken();
615
620
  }
616
621
  if (!token) {
@@ -623,7 +628,7 @@ Available operations:
623
628
  }
624
629
  const opParams = getOperationParams(spec, operationId);
625
630
  const positionalArgs = args._args ?? [];
626
- let collected = collectParams(opParams, args.param, positionalArgs);
631
+ const collected = collectParams(opParams, args.param, positionalArgs);
627
632
  const missing = getMissingRequired(opParams, collected);
628
633
  if (missing.length > 0 && isInteractive({ interactive: args.interactive })) {
629
634
  for (const param of opParams) {
@@ -689,11 +694,9 @@ Available operations:
689
694
  process.exit(1);
690
695
  }
691
696
  try {
692
- const response = await operationFn(
693
- Object.keys(collected).length > 0 ? collected : null,
694
- body,
695
- { validateStatus: () => true }
696
- );
697
+ const response = await operationFn(Object.keys(collected).length > 0 ? collected : null, body, {
698
+ validateStatus: () => true
699
+ });
697
700
  await formatResponse(response, {
698
701
  json: args.json,
699
702
  include: args.include,
@@ -29,7 +29,7 @@ var resolveProfileName = (flagProfile) => {
29
29
  if (process.env.EPILOT_PROFILE) return process.env.EPILOT_PROFILE;
30
30
  const config = loadProfiles();
31
31
  if (config.active) return config.active;
32
- if (config.profiles["default"]) return "default";
32
+ if (config.profiles.default) return "default";
33
33
  return null;
34
34
  };
35
35
  var getResolvedProfile = (flagProfile) => {
@@ -3,7 +3,7 @@ import {
3
3
  getResolvedProfile,
4
4
  resolveProfileName,
5
5
  upsertProfile
6
- } from "./chunk-IST42ZNL.js";
6
+ } from "./chunk-PDMWUCWD.js";
7
7
 
8
8
  // src/lib/auth-store.ts
9
9
  import { existsSync, mkdirSync, readFileSync, writeFileSync, unlinkSync } from "fs";
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/consent.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/customer-portal.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/dashboard.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/data-management.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/deduplication.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/design.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/document.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/email-settings.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/email-template.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/entity.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/entity-mapping.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/environments.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-57PPARIW.js";
5
- import "./chunk-5WUPDZ5D.js";
6
- import "./chunk-IST42ZNL.js";
7
- import "./chunk-RC3GCXCI.js";
4
+ } from "./chunk-5CTRM3JQ.js";
5
+ import "./chunk-RSA7K5HB.js";
6
+ import "./chunk-PDMWUCWD.js";
7
+ import "./chunk-4VITQVW2.js";
8
8
  import "./chunk-TKZLQD2B.js";
9
9
 
10
10
  // src/commands/apis/erp-integration.ts