@epilot/cli 0.1.0

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 (108) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +354 -0
  3. package/definitions/access-token.json +663 -0
  4. package/definitions/address-suggestions.json +582 -0
  5. package/definitions/address.json +578 -0
  6. package/definitions/ai-agents.json +1711 -0
  7. package/definitions/app.json +4443 -0
  8. package/definitions/audit-logs.json +305 -0
  9. package/definitions/automation.json +4815 -0
  10. package/definitions/billing.json +837 -0
  11. package/definitions/blueprint-manifest.json +3376 -0
  12. package/definitions/consent.json +344 -0
  13. package/definitions/customer-portal.json +15000 -0
  14. package/definitions/dashboard.json +484 -0
  15. package/definitions/data-management.json +962 -0
  16. package/definitions/deduplication.json +183 -0
  17. package/definitions/design.json +1423 -0
  18. package/definitions/document.json +758 -0
  19. package/definitions/email-settings.json +2627 -0
  20. package/definitions/email-template.json +1419 -0
  21. package/definitions/entity-mapping.json +1642 -0
  22. package/definitions/entity.json +10074 -0
  23. package/definitions/environments.json +363 -0
  24. package/definitions/erp-integration.json +5845 -0
  25. package/definitions/event-catalog.json +1051 -0
  26. package/definitions/file.json +2842 -0
  27. package/definitions/iban.json +132 -0
  28. package/definitions/journey.json +2341 -0
  29. package/definitions/kanban.json +929 -0
  30. package/definitions/message.json +2660 -0
  31. package/definitions/metering.json +2321 -0
  32. package/definitions/notes.json +1531 -0
  33. package/definitions/notification.json +1425 -0
  34. package/definitions/organization.json +629 -0
  35. package/definitions/partner-directory.json +1718 -0
  36. package/definitions/permissions.json +1480 -0
  37. package/definitions/pricing-tier.json +105 -0
  38. package/definitions/pricing.json +9884 -0
  39. package/definitions/purpose.json +524 -0
  40. package/definitions/sandbox.json +453 -0
  41. package/definitions/submission.json +313 -0
  42. package/definitions/targeting.json +1474 -0
  43. package/definitions/template-variables.json +1408 -0
  44. package/definitions/user.json +2408 -0
  45. package/definitions/validation-rules.json +1491 -0
  46. package/definitions/webhooks.json +1525 -0
  47. package/definitions/workflow-definition.json +3417 -0
  48. package/definitions/workflow.json +4106 -0
  49. package/dist/access-token-OG5AR7UB.js +51 -0
  50. package/dist/address-QUSMK5GV.js +51 -0
  51. package/dist/address-suggestions-E5SQNUS5.js +51 -0
  52. package/dist/ai-agents-PM42SJY3.js +51 -0
  53. package/dist/app-YTM3XAJL.js +51 -0
  54. package/dist/audit-logs-NXP7GFKX.js +51 -0
  55. package/dist/auth-CCBTXH5U.js +113 -0
  56. package/dist/auth-login-2ZIXM47J.js +137 -0
  57. package/dist/auth-token-OS4BEEVZ.js +43 -0
  58. package/dist/automation-TDJASTEV.js +51 -0
  59. package/dist/billing-M4MRBLEK.js +51 -0
  60. package/dist/bin/epilot.js +104 -0
  61. package/dist/blueprint-manifest-NQL7NRMV.js +51 -0
  62. package/dist/chunk-57PPARIW.js +715 -0
  63. package/dist/chunk-5WUPDZ5D.js +76 -0
  64. package/dist/chunk-IST42ZNL.js +78 -0
  65. package/dist/chunk-RC3GCXCI.js +76 -0
  66. package/dist/chunk-TKZLQD2B.js +72 -0
  67. package/dist/chunk-UJ6TU34M.js +56 -0
  68. package/dist/completion-GRQM2FJQ.js +168 -0
  69. package/dist/consent-KQ7MJAS6.js +51 -0
  70. package/dist/customer-portal-VUVSKWAQ.js +51 -0
  71. package/dist/dashboard-GVR4XNGR.js +51 -0
  72. package/dist/data-management-2RD3DLOS.js +51 -0
  73. package/dist/deduplication-PY77EINR.js +51 -0
  74. package/dist/design-M4FP2K5R.js +51 -0
  75. package/dist/document-P4QA7LEZ.js +51 -0
  76. package/dist/email-settings-7HGGRCCM.js +51 -0
  77. package/dist/email-template-3HXQI4CH.js +51 -0
  78. package/dist/entity-XUESZBPJ.js +51 -0
  79. package/dist/entity-mapping-JBKWWBH2.js +51 -0
  80. package/dist/environments-KKOS7ONY.js +51 -0
  81. package/dist/erp-integration-YTOWHCAW.js +51 -0
  82. package/dist/event-catalog-UKLZUGC4.js +51 -0
  83. package/dist/file-IFZNZ547.js +51 -0
  84. package/dist/iban-X2IW2NWU.js +51 -0
  85. package/dist/interactive-46ICLQKL.js +16 -0
  86. package/dist/journey-JU6X2KMX.js +51 -0
  87. package/dist/kanban-VHUU44PM.js +51 -0
  88. package/dist/message-AOUWJ4YX.js +51 -0
  89. package/dist/metering-RDS3XBD5.js +51 -0
  90. package/dist/notes-WE2UC75B.js +51 -0
  91. package/dist/notification-FKFNBHYZ.js +51 -0
  92. package/dist/organization-LMNFF6BX.js +51 -0
  93. package/dist/partner-directory-IIZVQDXJ.js +51 -0
  94. package/dist/permissions-AYCMVM7Y.js +51 -0
  95. package/dist/pricing-PS26FWBS.js +51 -0
  96. package/dist/pricing-tier-FBXWQ6T3.js +51 -0
  97. package/dist/profile-5Q5YARG7.js +135 -0
  98. package/dist/purpose-HE4E4SVU.js +51 -0
  99. package/dist/sandbox-Z7BU4UAD.js +51 -0
  100. package/dist/submission-MWVDF2ZB.js +51 -0
  101. package/dist/targeting-7NM5GDJ6.js +51 -0
  102. package/dist/template-variables-AJAR7PAV.js +51 -0
  103. package/dist/user-A26XQXG3.js +51 -0
  104. package/dist/validation-rules-VZTISEG2.js +51 -0
  105. package/dist/webhooks-RXH67WZ3.js +51 -0
  106. package/dist/workflow-G4FUUGZQ.js +51 -0
  107. package/dist/workflow-definition-LJYLMMGD.js +51 -0
  108. package/package.json +62 -0
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ getResolvedProfile,
4
+ resolveProfileName,
5
+ upsertProfile
6
+ } from "./chunk-IST42ZNL.js";
7
+
8
+ // src/lib/auth-store.ts
9
+ import { existsSync, mkdirSync, readFileSync, writeFileSync, unlinkSync } from "fs";
10
+ import { homedir } from "os";
11
+ import { join } from "path";
12
+ var getConfigDir = () => {
13
+ const xdgConfig = process.env.XDG_CONFIG_HOME;
14
+ const base = xdgConfig || join(homedir(), ".config");
15
+ return join(base, "epilot");
16
+ };
17
+ var getCredentialsPath = () => {
18
+ return join(getConfigDir(), "credentials.json");
19
+ };
20
+ var loadCredentials = () => {
21
+ const path = getCredentialsPath();
22
+ if (!existsSync(path)) return null;
23
+ try {
24
+ const raw = readFileSync(path, "utf-8");
25
+ const creds = JSON.parse(raw);
26
+ if (creds.expires_at) {
27
+ const expiry = new Date(creds.expires_at);
28
+ if (expiry < /* @__PURE__ */ new Date()) return null;
29
+ }
30
+ return creds;
31
+ } catch {
32
+ return null;
33
+ }
34
+ };
35
+ var saveCredentials = (creds, profileName) => {
36
+ const targetProfile = profileName || resolveProfileName();
37
+ if (targetProfile) {
38
+ upsertProfile(targetProfile, {
39
+ token: creds.token,
40
+ org_id: creds.org_id,
41
+ user_id: creds.user_id,
42
+ expires_at: creds.expires_at
43
+ });
44
+ }
45
+ const dir = getConfigDir();
46
+ mkdirSync(dir, { recursive: true });
47
+ writeFileSync(getCredentialsPath(), JSON.stringify(creds, null, 2), { mode: 384 });
48
+ };
49
+ var removeCredentials = () => {
50
+ const path = getCredentialsPath();
51
+ if (!existsSync(path)) return false;
52
+ unlinkSync(path);
53
+ return true;
54
+ };
55
+ var resolveToken = (flagToken, flagProfile) => {
56
+ if (flagToken) return flagToken;
57
+ const envToken = process.env.EPILOT_TOKEN;
58
+ if (envToken) return envToken;
59
+ const profile = getResolvedProfile(flagProfile);
60
+ if (profile?.token) {
61
+ if (profile.expires_at) {
62
+ const expiry = new Date(profile.expires_at);
63
+ if (expiry < /* @__PURE__ */ new Date()) return null;
64
+ }
65
+ return profile.token;
66
+ }
67
+ const creds = loadCredentials();
68
+ return creds?.token ?? null;
69
+ };
70
+
71
+ export {
72
+ loadCredentials,
73
+ saveCredentials,
74
+ removeCredentials,
75
+ resolveToken
76
+ };
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/lib/profiles.ts
4
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
5
+ import { homedir } from "os";
6
+ import { join } from "path";
7
+ var getConfigDir = () => {
8
+ const xdgConfig = process.env.XDG_CONFIG_HOME;
9
+ const base = xdgConfig || join(homedir(), ".config");
10
+ return join(base, "epilot");
11
+ };
12
+ var getProfilesPath = () => join(getConfigDir(), "profiles.json");
13
+ var loadProfiles = () => {
14
+ const path = getProfilesPath();
15
+ if (!existsSync(path)) return { profiles: {} };
16
+ try {
17
+ return JSON.parse(readFileSync(path, "utf-8"));
18
+ } catch {
19
+ return { profiles: {} };
20
+ }
21
+ };
22
+ var saveProfiles = (config) => {
23
+ const dir = getConfigDir();
24
+ mkdirSync(dir, { recursive: true });
25
+ writeFileSync(getProfilesPath(), JSON.stringify(config, null, 2), { mode: 384 });
26
+ };
27
+ var resolveProfileName = (flagProfile) => {
28
+ if (flagProfile) return flagProfile;
29
+ if (process.env.EPILOT_PROFILE) return process.env.EPILOT_PROFILE;
30
+ const config = loadProfiles();
31
+ if (config.active) return config.active;
32
+ if (config.profiles["default"]) return "default";
33
+ return null;
34
+ };
35
+ var getResolvedProfile = (flagProfile) => {
36
+ const name = resolveProfileName(flagProfile);
37
+ if (!name) return null;
38
+ const config = loadProfiles();
39
+ return config.profiles[name] ?? null;
40
+ };
41
+ var setActiveProfile = (name) => {
42
+ const config = loadProfiles();
43
+ if (!config.profiles[name]) return false;
44
+ config.active = name;
45
+ saveProfiles(config);
46
+ return true;
47
+ };
48
+ var upsertProfile = (name, profile) => {
49
+ const config = loadProfiles();
50
+ config.profiles[name] = { name, ...config.profiles[name], ...profile };
51
+ saveProfiles(config);
52
+ };
53
+ var deleteProfile = (name) => {
54
+ const config = loadProfiles();
55
+ if (!config.profiles[name]) return false;
56
+ delete config.profiles[name];
57
+ if (config.active === name) config.active = void 0;
58
+ saveProfiles(config);
59
+ return true;
60
+ };
61
+ var listProfiles = () => {
62
+ const config = loadProfiles();
63
+ return Object.entries(config.profiles).map(([name, profile]) => ({
64
+ name,
65
+ profile,
66
+ active: config.active === name
67
+ }));
68
+ };
69
+
70
+ export {
71
+ loadProfiles,
72
+ resolveProfileName,
73
+ getResolvedProfile,
74
+ setActiveProfile,
75
+ upsertProfile,
76
+ deleteProfile,
77
+ listProfiles
78
+ };
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ DIM,
4
+ RESET,
5
+ methodColor
6
+ } from "./chunk-TKZLQD2B.js";
7
+
8
+ // src/lib/interactive.ts
9
+ var isInteractive = (flags) => {
10
+ if (flags?.interactive === false) return false;
11
+ return !!process.stdout.isTTY;
12
+ };
13
+ var pickOperation = async (operations) => {
14
+ const { select } = await import("@inquirer/prompts");
15
+ const result = await select({
16
+ message: "Select an operation:",
17
+ choices: operations.map((op) => ({
18
+ name: `${op.method.padEnd(7)} ${op.path} ${DIM}${op.summary}${RESET}`,
19
+ value: op.operationId,
20
+ description: op.operationId
21
+ })),
22
+ pageSize: 20
23
+ });
24
+ return result;
25
+ };
26
+ var promptParam = async (name, param) => {
27
+ const { input } = await import("@inquirer/prompts");
28
+ const schema = param.schema;
29
+ const defaultValue = schema?.default != null ? String(schema.default) : void 0;
30
+ const result = await input({
31
+ message: `${name}${param.required ? " (required)" : ""}:`,
32
+ default: defaultValue,
33
+ validate: (value) => {
34
+ if (param.required && !value.trim()) {
35
+ return `${name} is required`;
36
+ }
37
+ return true;
38
+ }
39
+ });
40
+ return result;
41
+ };
42
+ var promptToken = async () => {
43
+ const { password } = await import("@inquirer/prompts");
44
+ const token = await password({
45
+ message: "No token found. Paste a bearer token (or run `epilot auth login`):",
46
+ mask: "*",
47
+ validate: (value) => {
48
+ if (!value.trim()) return "Token is required";
49
+ return true;
50
+ }
51
+ });
52
+ return token || null;
53
+ };
54
+ var printOperationsTable = (apiName, operations) => {
55
+ for (const op of operations) {
56
+ const color = methodColor(op.method);
57
+ const method = op.method.toUpperCase().padEnd(7);
58
+ const path = op.path;
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
+ );
64
+ }
65
+ process.stdout.write(`
66
+ Run \`epilot ${apiName} <operationId> --help\` for details.
67
+ `);
68
+ };
69
+
70
+ export {
71
+ isInteractive,
72
+ pickOperation,
73
+ promptParam,
74
+ promptToken,
75
+ printOperationsTable
76
+ };
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/lib/utils.ts
4
+ var isValidJson = (str) => {
5
+ try {
6
+ JSON.parse(str);
7
+ return true;
8
+ } catch {
9
+ return false;
10
+ }
11
+ };
12
+ var parseKeyValue = (str) => {
13
+ const idx = str.indexOf("=");
14
+ if (idx === -1) return [str, ""];
15
+ return [str.substring(0, idx), str.substring(idx + 1)];
16
+ };
17
+ var parseParamValue = (value) => {
18
+ if (value === "true") return true;
19
+ if (value === "false") return false;
20
+ if (value === "null") return null;
21
+ if (/^\d+$/.test(value)) return Number(value);
22
+ if (/^\d+\.\d+$/.test(value)) return Number(value);
23
+ if (value.startsWith("{") || value.startsWith("[")) {
24
+ try {
25
+ return JSON.parse(value);
26
+ } catch {
27
+ return value;
28
+ }
29
+ }
30
+ return value;
31
+ };
32
+ var methodColor = (method) => {
33
+ const m = method.toUpperCase();
34
+ switch (m) {
35
+ case "GET":
36
+ return "\x1B[32m";
37
+ // green
38
+ case "POST":
39
+ return "\x1B[33m";
40
+ // yellow
41
+ case "PUT":
42
+ return "\x1B[34m";
43
+ // blue
44
+ case "PATCH":
45
+ return "\x1B[36m";
46
+ // cyan
47
+ case "DELETE":
48
+ return "\x1B[31m";
49
+ // red
50
+ default:
51
+ return "\x1B[37m";
52
+ }
53
+ };
54
+ var RESET = "\x1B[0m";
55
+ var BOLD = "\x1B[1m";
56
+ var DIM = "\x1B[2m";
57
+ var GREEN = "\x1B[32m";
58
+ var RED = "\x1B[31m";
59
+ var YELLOW = "\x1B[33m";
60
+
61
+ export {
62
+ isValidJson,
63
+ parseKeyValue,
64
+ parseParamValue,
65
+ methodColor,
66
+ RESET,
67
+ BOLD,
68
+ DIM,
69
+ GREEN,
70
+ RED,
71
+ YELLOW
72
+ };
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/generated/api-list.ts
4
+ var API_LIST = [
5
+ { apiName: "accessToken", kebabName: "access-token", title: "Access Token API", serverUrl: "https://access-token.sls.epilot.io", operationCount: 7, operationIds: ["listAccessTokens", "createAccessToken", "revokeAccessToken", "getAccessTokenJwks", "getAccessTokenOIDC", "getPublicTokenJwks", "getPublicTokenOIDC"] },
6
+ { apiName: "address", kebabName: "address", title: "Address API", serverUrl: "https://address.sls.epilot.io", operationCount: 3, operationIds: ["getAddressSuggestions", "availabilityCheck", "validateAvailabilityFile"] },
7
+ { apiName: "addressSuggestions", kebabName: "address-suggestions", title: "Address Suggestions API", serverUrl: "https://address-suggestions-api.sls.epilot.io", operationCount: 4, operationIds: ["getAddresses", "validateAddresses", "checkAvailability", "validateAddressesFile"] },
8
+ { apiName: "aiAgents", kebabName: "ai-agents", title: "AI Agents API - OpenAPI 3.0", serverUrl: "https://ai-agents.sls.epilot.io", operationCount: 12, operationIds: ["listAgents", "createAgent", "getAgentById", "updateAgentById", "deleteAgentById", "executeAgent", "listExecutions", "getExecution", "cancelExecution", "getExecutionTrace", "approveExecution", "rejectExecution"] },
9
+ { apiName: "app", kebabName: "app", title: "App API", serverUrl: "https://app.sls.epilot.io", operationCount: 30, operationIds: ["getPublicFacingComponent", "listConfigurations", "createConfiguration", "listPublicConfigurations", "getPublicConfiguration", "getConfiguration", "patchMetadata", "deleteConfiguration", "queryEvents", "createBundleUploadUrl", "createZipUploadUrl", "createLogoUploadUrl", "deleteLogo", "listVersions", "getVersion", "patchVersion", "deleteVersion", "getReview", "createReview", "createComponent", "patchComponent", "deleteComponent", "cloneVersion", "listInstallations", "getInstallation", "install", "patchInstallation", "uninstall", "promoteVersion", "ingestEvent"] },
10
+ { apiName: "auditLogs", kebabName: "audit-logs", title: "Audit Log", serverUrl: "https://audit-logs.sls.epilot.io", operationCount: 2, operationIds: ["getLogs", "getLogById"] },
11
+ { apiName: "automation", kebabName: "automation", title: "Automation API", serverUrl: "https://automation.sls.epilot.io", operationCount: 16, operationIds: ["searchFlows", "createFlow", "batchGetFlows", "getFlow", "putFlow", "deleteFlow", "getExecutions", "startExecution", "bulkTriggerExecutions", "getBulkJob", "patchBulkJob", "getExecution", "cancelExecution", "retriggerAction", "resumeExecutionWithToken", "cancelSchedule"] },
12
+ { apiName: "billing", kebabName: "billing", title: "Billing API", serverUrl: "https://billing.sls.epilot.io", operationCount: 10, operationIds: ["getBillingEvents", "createBillingEvent", "getBillingEvent", "updateBillingEvent", "deleteBillingEvent", "getBillingEventByExternalId", "createContractEntity", "updateContractEntity", "deleteContractEntity", "getCustomerBalance"] },
13
+ { apiName: "blueprintManifest", kebabName: "blueprint-manifest", title: "Blueprint Manifest API", serverUrl: "https://blueprint-manifest.sls.epilot.io", operationCount: 33, operationIds: ["getJob", "createExport", "exportManifest", "uploadManifest", "createPlan", "applyPlan", "listInstalledManifests", "getManifest", "updateManifest", "deleteManifest", "listBlueprints", "createBlueprint", "listInstalledMarketplaceBlueprints", "preInstallBlueprint", "getBlueprintPreview", "installBlueprint", "getBlueprint", "updateBlueprint", "deleteBlueprint", "validateBlueprint", "exportBlueprint", "formatBlueprintDescription", "addBlueprintResource", "syncDependencies", "bulkAddBlueprintResources", "bulkUpdateBlueprintResources", "bulkDeleteBlueprintResources", "updateBlueprintResource", "deleteBlueprintResource", "listBlueprintJobs", "getBlueprintJob", "continueInstallationJob", "cancelBlueprintJob"] },
14
+ { apiName: "consent", kebabName: "consent", title: "Consent API", serverUrl: "https://consent.sls.epilot.io", operationCount: 3, operationIds: ["publishConsentEvent", "listConsentEvents", "handleOptInWithToken"] },
15
+ { apiName: "customerPortal", kebabName: "customer-portal", title: "Portal API", serverUrl: "https://customer-portal-api.sls.epilot.io", operationCount: 134, operationIds: ["upsertPortal", "createUser", "createUserV3", "validateToken", "revokeToken", "getPortalConfigByDomain", "getPortalConfig", "deletePortal", "getPortalExtensions", "getPublicPortalExtensionDetails", "getPortalExtensionsV3", "getPublicPortalExtensionDetailsV3", "getConsumption", "getCosts", "getPrices", "getExternalLinks", "getResolvedExternalLink", "getExternalLinksV3", "getResolvedExternalLinkV3", "getResolvedSeamlessLink", "getPublicPortalConfig", "getOrgPortalConfig", "getPublicPortalConfigV3", "getOrgPortalConfigV3", "getAllPortalConfigs", "getEmailTemplates", "upsertEmailTemplates", "getEmailTemplatesByPortalId", "upsertEmailTemplatesByPortalId", "getPublicPortalWidgets", "getPortalWidgets", "upsertPortalWidget", "replaceECPTemplateVariables", "getOrganizationSettings", "getSchemas", "getSchemasByDomain", "getOrganizationSettingsByDomain", "extraPermissionAttributes", "validateCaaRecords", "validateCaaRecordsV3", "getContact", "updateContact", "getECPContact", "checkContactExists", "checkContactExistsV3", "getValidSecondaryAttributes", "getPortalUser", "updatePortalUser", "deletePortalUser", "updatePortalUserEmail", "resendConfirmationEmail", "fetchPortalUsersByRelatedEntity", "confirmUser", "confirmUserWithUserId", "userExists", "userExistsV3", "getRecipientsToNotifyOnAutomation", "configureDistribution", "configureDistributionV3", "getAllOrders", "postOrderAcceptance", "getOrder", "updateOrder", "getAllOpportunities", "getSearchableAttributesForOpportunities", "getSearchResultsForOpportunities", "getOpportunity", "updateOpportunity", "getAllRequests", "getAllContracts", "getContract", "updateContract", "addContractByIdentifiers", "getEntityIdentifiers", "getEntityActivityFeed", "validateCadenceEntityEditRules", "searchPaymentRelationsInEntities", "createCustomEntityActivity", "saveEntityFile", "deleteEntityFile", "savePortalFiles", "getRegistrationIdentifiers", "getAllFiles", "getFileById", "trackFileDownloaded", "getFilesCountByEntity", "getBillingEvents", "getCustomerBalance", "getBillingAccount", "loginToPortalAsUser", "triggerEntityAccessEvent", "triggerEntityAccessEventV3", "getPortalUserEntity", "searchPortalUserEntities", "canTriggerPortalFlow", "getAutomationContext", "updateWorkflowStepAsDone", "getEntityWorkflows", "uploadMeterReadingPhoto", "createMeterReading", "getAllowedMeterReadingRange", "ssoLogin", "ssoLoginV3", "ssoRedirect", "ssoCallback", "getPortalPage", "updatePortalPage", "deletePortalPage", "getPortalPages", "createPortalPage", "getPublicPages", "getDefaultPages", "getPortalPageBlocks", "createPortalPageBlock", "getPortalPageBlock", "updatePortalPageBlock", "deletePortalPageBlock", "getUserEntryPoint", "updateCampaignPortalBlockStatus", "updateNotificationsStatus", "deRegisterMLoginUser", "notifyMLoginInterestChange", "createPortalConfig", "getPortalConfigV3", "putPortalConfig", "deletePortalConfig", "listAllPortalConfigs", "swapPortalConfig", "invitePartner", "listBusinessPartners", "resendPartnerInvitation", "revokePartner", "disablePartner", "enablePartner"] },
16
+ { apiName: "dashboard", kebabName: "dashboard", title: "Dashboard API", serverUrl: "https://dashboard.sls.epilot.io", operationCount: 7, operationIds: ["listDashboards", "createDashboard", "getDashboard", "putDashboard", "deleteDashboard", "listAvailableVisualisations", "listAvailableExamples"] },
17
+ { apiName: "dataManagement", kebabName: "data-management", title: "Data Management API", serverUrl: "https://data-management.sls.epilot.io", operationCount: 10, operationIds: ["queryEntities", "createJob", "updateJob", "getJob", "getJobReportUrl", "getConfig", "createJobForConfig", "upsertConfig", "listConfigs", "listJobs"] },
18
+ { apiName: "deduplication", kebabName: "deduplication", title: "Deduplication API", serverUrl: "https://deduplication.sls.epilot.io", operationCount: 1, operationIds: ["deduplicate"] },
19
+ { apiName: "design", kebabName: "design", title: "Design Builder API v2", serverUrl: "https://design-builder-api.epilot.io", operationCount: 13, operationIds: ["getAllDesigns", "addDesign", "getDesign", "updateDesign", "deleteDesign", "getThemeFromDesign", "getFiles", "uploadFile", "getLimit", "getBrands", "getConsumerDesign", "addConsumer", "removeConsumer"] },
20
+ { apiName: "document", kebabName: "document", title: "Document API", serverUrl: "https://document.sls.epilot.io", operationCount: 3, operationIds: ["getTemplateMeta", "generateDocumentV2", "convertDocument"] },
21
+ { apiName: "emailSettings", kebabName: "email-settings", title: "Messaging Settings API", serverUrl: "https://email-settings.sls.epilot.io", operationCount: 31, operationIds: ["provisionEpilotEmailAddress", "setEmailAddressPrimary", "getEmailAddress", "updateEmailAddress", "deleteEmailAddress", "listEmailAddresses", "addEmailAddress", "getSharedInbox", "updateSharedInbox", "deleteSharedInbox", "listSharedInboxes", "addSharedInbox", "listInboxBuckets", "connectOutlook", "getOutlookConnectionStatus", "disconnectOutlook", "connectOutlookMailbox", "disconnectOutlookMailbox", "startMailboxSync", "getMailboxSyncStatus", "retryMailboxSync", "getConnectedOutlookEmails", "outlookOAuthCallback", "getSettings", "addSetting", "deleteSetting", "updateSetting", "addDomain", "deleteDomain", "verifyNameServers", "verifyDomain"] },
22
+ { apiName: "emailTemplate", kebabName: "email-template", title: "Email template API", serverUrl: "https://email-template.sls.epilot.io", operationCount: 7, operationIds: ["saveTemplate", "getTemplateDetail", "updateTemplateDetail", "replaceVariables", "replaceVariablesAsync", "bulkSendMessage", "revertToOriginalTemplate"] },
23
+ { apiName: "entity", kebabName: "entity", title: "Entity API", serverUrl: "https://entity.sls.epilot.io", operationCount: 81, operationIds: ["listSchemas", "getSchema", "putSchema", "deleteSchema", "getJsonSchema", "getSchemaExample", "getSchemaVersions", "listAvailableCapabilities", "listSchemaBlueprints", "searchEntities", "listEntities", "queryEntityGraph", "createEntity", "validateEntity", "validateEntityV2", "upsertEntity", "getEntityV2", "restoreEntity", "reindexEntity", "getEntity", "updateEntity", "patchEntity", "deleteEntity", "autocomplete", "wipeAllEntities", "createActivity", "getActivity", "attachActivity", "getEntityActivityFeed", "getRelations", "addRelations", "removeRelations", "getRelationsV2", "getRelationsV3", "getRelatedEntitiesCount", "updateRelation", "deleteRelation", "exportEntities", "importEntities", "listSavedViews", "createSavedView", "getSavedView", "updateSavedView", "patchSavedView", "deleteSavedView", "listFavoriteViewsForUser", "listTaxonomies", "createTaxonomy", "getTaxonomy", "updateTaxonomy", "deleteTaxonomy", "updateClassificationsForTaxonomy", "createTaxonomyClassification", "getTaxonomyClassification", "updateTaxonomyClassification", "deleteTaxonomyClassification", "taxonomyAutocomplete", "taxonomiesClassificationsSearch", "listTaxonomyClassificationsForSchema", "getTaxonomyBulkActionJobs", "getTaxonomyBulkActionJobById", "cancelBulkAction", "bulkMoveClassifications", "bulkMergeClassifications", "bulkDeleteClassifications", "createSchemaAttribute", "getSchemaAttribute", "putSchemaAttribute", "deleteSchemaAttribute", "createSchemaCapability", "getSchemaCapability", "putSchemaCapability", "deleteSchemaCapability", "createSchemaGroup", "getSchemaGroup", "putSchemaGroup", "deleteSchemaGroup", "createSchemaGroupHeadline", "getSchemaGroupHeadline", "putSchemaGroupHeadline", "deleteSchemaGroupHeadline"] },
24
+ { apiName: "entityMapping", kebabName: "entity-mapping", title: "Entity Mapping API", serverUrl: "https://entity-mapping.sls.epilot.io", operationCount: 12, operationIds: ["storeConfig", "getConfig", "deleteConfig", "getAllVersions", "storeNewVersion", "getConfigVersion", "executeMapping", "searchConfigs", "queryMappingHistory", "executeRelations", "getMappingConfig", "putMappingConfig"] },
25
+ { apiName: "environments", kebabName: "environments", title: "Environments API", serverUrl: "https://environments.sls.epilot.io", operationCount: 5, operationIds: ["listEnvironmentVariables", "createEnvironmentVariable", "getEnvironmentVariable", "updateEnvironmentVariable", "deleteEnvironmentVariable"] },
26
+ { apiName: "erpIntegration", kebabName: "erp-integration", title: "ERP Integration API", serverUrl: "https://erp-integration-api.sls.epilot.io", operationCount: 33, operationIds: ["acknowledgeTracking", "triggerErp", "processErpUpdatesEvents", "processErpUpdatesEventsV2", "processErpUpdatesEventsV3", "simulateMappingV2", "simulateMapping", "listIntegrations", "createIntegration", "getIntegration", "updateIntegration", "deleteIntegration", "queryEvents", "replayEvents", "listUseCases", "createUseCase", "getUseCase", "updateUseCase", "deleteUseCase", "listUseCaseHistory", "listIntegrationsV2", "createIntegrationV2", "getIntegrationV2", "updateIntegrationV2", "deleteIntegrationV2", "setIntegrationAppMapping", "deleteIntegrationAppMapping", "queryInboundMonitoringEvents", "getMonitoringStats", "getMonitoringTimeSeries", "getOutboundStatus", "queryAccessLogs", "queryOutboundMonitoringEvents"] },
27
+ { apiName: "eventCatalog", kebabName: "event-catalog", title: "Event Catalog API", serverUrl: "https://event-catalog.sls.epilot.io", operationCount: 7, operationIds: ["listEvents", "getEvent", "patchEvent", "getEventJSONSchema", "getEventExample", "searchEventHistory", "triggerEvent"] },
28
+ { apiName: "file", kebabName: "file", title: "File API", serverUrl: "https://file.sls.epilot.io", operationCount: 27, operationIds: ["uploadFileV2", "saveFileV2", "uploadFile", "saveFile", "getFile", "deleteFile", "downloadFile", "downloadS3File", "downloadFiles", "previewFile", "previewS3FileGet", "previewS3File", "previewPublicFile", "getSession", "deleteSession", "listPublicLinksForFile", "generatePublicLink", "accessPublicLink", "revokePublicLink", "verifyCustomDownloadUrl", "uploadFilePublic", "getUserSchemaFileCollections", "createUserSchemaFileCollection", "updateUserSchemaFileCollection", "deleteUserSchemaFileCollection", "getFilesInCollection", "getGlobalFileCollections"] },
29
+ { apiName: "iban", kebabName: "iban", title: "Iban API", serverUrl: "https://iban-api.sls.epilot.io", operationCount: 1, operationIds: ["validateIban"] },
30
+ { apiName: "journey", kebabName: "journey", title: "Journey API", serverUrl: "https://journey-config.sls.epilot.io", operationCount: 16, operationIds: ["getJourneysByOrgId", "getJourney", "removeJourney", "getJourneyProducts", "createJourney", "updateJourney", "patchUpdateJourney", "searchJourneys", "generateDocument", "createJourneyV2", "updateJourneyV2", "patchUpdateJourneyV2", "getJourneyV2", "removeJourneyV2", "getSettingsForJourney", "getButtonOptions"] },
31
+ { apiName: "kanban", kebabName: "kanban", title: "Kanban API", serverUrl: "https://kanban.sls.epilot.io", operationCount: 10, operationIds: ["createKanbanBoard", "getKanbanBoards", "getKanbanBoard", "updateKanbanBoard", "patchKanbanBoard", "deleteKanbanBoard", "setDefaultKanbanBoard", "clearDefaultKanbanBoard", "flowsAutocomplete", "executeFlowsQuery"] },
32
+ { apiName: "message", kebabName: "message", title: "Message API", serverUrl: "https://message.sls.epilot.io", operationCount: 46, operationIds: ["sendMessage", "updateMessage", "getMessage", "deleteMessage", "getMessageEml", "searchMessages", "trashMessage", "untrashMessage", "markReadMessage", "markReadMessageV2", "markUnreadMessage", "getUnread", "markUnreadMessageV2", "searchThreads", "searchThreadsV2", "searchIds", "updateThread", "deleteThread", "moveThread", "markThreadAsDone", "markThreadAsOpen", "getThreadTimeline", "trashThread", "untrashThread", "threadBulkActionsRead", "threadBulkActionsUnread", "threadBulkActionsFavorite", "threadBulkActionsUnfavorite", "threadBulkActionsTrash", "threadBulkActionsUntrash", "threadBulkActionsDelete", "threadBulkActionsDone", "threadBulkActionsOpen", "markReadThread", "markReadThreadV2", "markUnreadThread", "markUnreadThreadV2", "assignThread", "unassignThread", "assignUsers", "assignUsersV2", "pinThread", "unpinThread", "createDraft", "sendDraft", "getMessageV2"] },
33
+ { apiName: "metering", kebabName: "metering", title: "Metering API", serverUrl: "https://metering.sls.epilot.io", operationCount: 16, operationIds: ["getCustomerMeters", "getMetersByContractId", "getMeter", "updateMeter", "getMeterCounters", "getCounterDetails", "createMeterReading", "createMeterReadings", "createPortalMeterReadings", "batchWriteMeterReadings", "createMeterReadingFromSubmission", "getAllowedReadingForMeter", "createReadingWithMeter", "getReadingsByInterval", "updateMeterReading", "deleteMeterReading"] },
34
+ { apiName: "notes", kebabName: "notes", title: "Notes API", serverUrl: "https://notes.sls.epilot.io", operationCount: 12, operationIds: ["createNote", "getNote", "updateNote", "patchNote", "deleteNote", "searchNotesByContext", "getNotesByContext", "pinNote", "getNoteContexts", "addNoteReaction", "removeNoteReaction", "toggleNoteReactions"] },
35
+ { apiName: "notification", kebabName: "notification", title: "Notification API", serverUrl: "https://notification.sls.epilot.io", operationCount: 14, operationIds: ["getNotificationsV2", "getNotifications", "createNotification", "getNotification", "markAllAsRead", "markAsRead", "getTotalUnread", "listNotificationTemplates", "createNotificationTemplate", "getNotificationTemplate", "updateNotificationTemplate", "patchNotificationTemplate", "deleteNotificationTemplate", "sendPreview"] },
36
+ { apiName: "organization", kebabName: "organization", title: "Organization API", serverUrl: "https://organization-v2.sls.epilot.io", operationCount: 6, operationIds: ["getCurrentOrganization", "getOrganization", "updateOrganization", "getSettings", "putSettingsValue", "deleteSettingsValue"] },
37
+ { apiName: "partnerDirectory", kebabName: "partner-directory", title: "Partner API", serverUrl: "https://partner-directory-api.sls.epilot.io", operationCount: 16, operationIds: ["approvePartner", "rejectPartner", "searchAssignable", "batchGetAssignable", "getPartnerByToken", "activatePartner", "searchGeolocationForText", "invitePartnerV2", "getPartnerUsers", "createPartnerUser", "deletePartnerUser", "getPartnerRoles", "createPartnerRole", "updatePartnerRole", "assignPartnerUserRoles", "unassignPartnerUserRoles"] },
38
+ { apiName: "permissions", kebabName: "permissions", title: "Permissions API", serverUrl: "https://permissions.sls.epilot.io", operationCount: 13, operationIds: ["listCurrentRoles", "listAllRoles", "createRole", "searchRoles", "getRole", "putRole", "deleteRole", "refreshPermissions", "getAssignedRolesForUser", "assignRoles", "addAssignment", "removeAssignment", "listAllAssignments"] },
39
+ { apiName: "pricing", kebabName: "pricing", title: "Pricing API", serverUrl: "https://pricing-api.sls.epilot.io", operationCount: 22, operationIds: ["$calculatePricingDetails", "createOrder", "putOrder", "$checkoutCart", "$searchCatalog", "$privateSearchCatalog", "$validatePromoCodes", "$availabilityCheck", "$validateAvailabilityFile", "$historicMarketPrices", "$averageMarketPrice", "$searchExternalProducts", "$searchExternalProductRecommendations", "$searchProviders", "$searchStreets", "$computePrice", "$getCredentials", "$saveCredentials", "$deleteCredentials", "$getExternalCatalogProducts", "$getExternalCatalogProductRecommendations", "$productRecommendations"] },
40
+ { apiName: "pricingTier", kebabName: "pricing-tier", title: "Pricing Tier API", serverUrl: "", operationCount: 1, operationIds: ["getCurrentPricingTier"] },
41
+ { apiName: "purpose", kebabName: "purpose", title: "Purpose API", serverUrl: "https://purpose.sls.epilot.io", operationCount: 6, operationIds: ["createPurpose", "searchPurposes", "batchGetPurposes", "getPurpose", "updatePurpose", "deletePurpose"] },
42
+ { apiName: "sandbox", kebabName: "sandbox", title: "Sandbox API", serverUrl: "https://sandbox.sls.epilot.io", operationCount: 7, operationIds: ["listPipelines", "createPipeline", "getPipeline", "deletePipeline", "generatePipelineToken", "requestSandbox", "listSandboxRequests"] },
43
+ { apiName: "submission", kebabName: "submission", title: "Submission API", serverUrl: "https://submission.sls.epilot.io", operationCount: 2, operationIds: ["createSubmission", "getNonce"] },
44
+ { apiName: "targeting", kebabName: "targeting", title: "Targeting API", serverUrl: "https://targeting.sls.epilot.io", operationCount: 11, operationIds: ["changeCampaignStatus", "getCampaignJobStatus", "getCampaignPortals", "retriggerCampaignAutomations", "matchCampaigns", "matchTargets", "getTargetQueries", "createRecipient", "updateRecipient", "updateRecipientPortalStatus", "getRecipients"] },
45
+ { apiName: "templateVariables", kebabName: "template-variables", title: "Template Variables API", serverUrl: "https://template-variables-api.sls.epilot.io", operationCount: 12, operationIds: ["getCategories", "searchVariables", "getVariableContext", "replaceTemplates", "replaceTemplatesV2", "getCustomVariables", "createCustomVariable", "searchCustomVariables", "getCustomVariable", "updateCustomVariable", "deleteCustomVariable", "getBluePrintTableConfig"] },
46
+ { apiName: "user", kebabName: "user", title: "User API", serverUrl: "https://user.sls.epilot.io", operationCount: 34, operationIds: ["signUpUser", "getMeV2", "listUsersV2", "getUserV2", "updateUserV2", "deleteUserV2", "inviteUser", "resendUserInvitation", "getGroupsForUser", "getGroups", "createGroup", "getGroup", "updateGroup", "deleteGroup", "advanceUserAssignment", "createNavigation", "getNavigation", "verifyEmailWithToken", "checkInviteToken", "activateUser", "rejectInvite", "getUserLoginParametersV2", "beginPasskeyAuthentication", "beginDiscoverablePasskeyAuthentication", "resolveDiscoverableCredential", "beginPasskeyRegistration", "completePasskeyRegistration", "listPasskeys", "deletePasskey", "switchOrganization", "getMe", "listUsers", "getUser", "getUserLoginParameters"] },
47
+ { apiName: "validationRules", kebabName: "validation-rules", title: "Validation Rules API", serverUrl: "https://validation-rules.sls.epilot.io", operationCount: 7, operationIds: ["getValidationRules", "createValidationRule", "getValidationRuleById", "updateValidationRule", "deleteValidationRule", "addUsedByReference", "removeUsedByReference"] },
48
+ { apiName: "webhooks", kebabName: "webhooks", title: "Webhooks", serverUrl: "https://webhooks.sls.epilot.io", operationCount: 14, operationIds: ["getPublicKey", "getConfiguredEvents", "getConfigs", "createConfig", "getConfig", "updateConfig", "deleteConfig", "triggerWebhook", "getWehookEvents", "batchReplayEvents", "getEventById", "replayEvent", "getWebhookExample", "getWebhookEventsV2"] },
49
+ { apiName: "workflow", kebabName: "workflow", title: "Workflows Executions", serverUrl: "https://workflows-execution.sls.epilot.io", operationCount: 23, operationIds: ["getExecutions", "createExecution", "getExecution", "updateExecution", "deleteExecution", "createStep", "updateStep", "deleteStep", "searchExecutions", "searchSteps", "getClosingReasonExecution", "startFlowExecution", "getFlowExecution", "patchFlowExecution", "deleteFlowExecution", "searchFlowExecutions", "patchTask", "runTaskAutomation", "executeTask", "patchPhase", "addTask", "cancelTaskSchedule", "cancelSchedule"] },
50
+ { apiName: "workflowDefinition", kebabName: "workflow-definition", title: "Workflows Definitions", serverUrl: "https://workflows-definition.sls.epilot.io", operationCount: 24, operationIds: ["getMaxAllowedLimit", "getDefinitions", "createDefinition", "listFlowTemplates", "createFlowTemplate", "searchFlowTemplates", "getFlowTemplate", "updateFlowTemplate", "deleteFlowTemplate", "duplicateFlowTemplate", "exportFlowTemplate", "importFlowTemplate", "getDefinition", "updateDefinition", "deleteDefinition", "getAllClosingReasons", "createClosingReason", "getClosingReason", "updateClosingReason", "deleteClosingReason", "getClosingReasonV1", "changeReasonStatus", "getWorkflowClosingReasons", "setWorkflowClosingReasons"] }
51
+ ];
52
+ var API_NAMES = API_LIST.map((a) => a.apiName);
53
+
54
+ export {
55
+ API_LIST
56
+ };
@@ -0,0 +1,168 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ API_LIST
4
+ } from "./chunk-UJ6TU34M.js";
5
+
6
+ // src/commands/completion.ts
7
+ import { defineCommand } from "citty";
8
+ var BASH_SCRIPT = `
9
+ _epilot_completions() {
10
+ local cur prev words cword
11
+ _init_completion || return
12
+
13
+ # Get all words on the command line
14
+ local cmd="\${COMP_WORDS[0]}"
15
+
16
+ if [[ \${cword} -eq 1 ]]; then
17
+ # First arg: subcommands (APIs + auth + profile + completion)
18
+ COMPREPLY=( $(compgen -W "$(\${cmd} --_completions subcommands 2>/dev/null)" -- "\${cur}") )
19
+ return
20
+ fi
21
+
22
+ if [[ \${cword} -eq 2 ]]; then
23
+ # Second arg: operationIds for the given API
24
+ local api="\${COMP_WORDS[1]}"
25
+ COMPREPLY=( $(compgen -W "$(\${cmd} --_completions operations \${api} 2>/dev/null)" -- "\${cur}") )
26
+ return
27
+ fi
28
+
29
+ # Flags
30
+ if [[ "\${cur}" == -* ]]; then
31
+ COMPREPLY=( $(compgen -W "--token --profile --server --json --verbose --interactive --no-interactive --jsonata --include --data --param --header --definition --help" -- "\${cur}") )
32
+ return
33
+ fi
34
+ }
35
+
36
+ complete -F _epilot_completions epilot
37
+ `.trim();
38
+ var ZSH_SCRIPT = `
39
+ #compdef epilot
40
+
41
+ _epilot() {
42
+ local -a subcommands operations flags
43
+
44
+ _arguments -C \\
45
+ '1:api:->api' \\
46
+ '2:operation:->operation' \\
47
+ '*:flags:->flags'
48
+
49
+ case "$state" in
50
+ api)
51
+ subcommands=(\${(f)"$(epilot --_completions subcommands 2>/dev/null)"})
52
+ _describe 'api' subcommands
53
+ ;;
54
+ operation)
55
+ operations=(\${(f)"$(epilot --_completions operations $words[2] 2>/dev/null)"})
56
+ _describe 'operation' operations
57
+ ;;
58
+ flags)
59
+ flags=(
60
+ '--token[Bearer token]:token:'
61
+ '--profile[Use a named profile]:profile:'
62
+ '--server[Override server base URL]:url:'
63
+ '--json[Output raw JSON]'
64
+ '--verbose[Verbose output]'
65
+ '--interactive[Interactive mode]'
66
+ '--no-interactive[Disable interactive mode]'
67
+ '--jsonata[JSONata expression]:expr:'
68
+ '--include[Include response headers]'
69
+ '-d[Request body JSON]:json:'
70
+ '-p[Parameter key=value]:param:'
71
+ '-H[Custom header]:header:'
72
+ '--definition[Override OpenAPI spec]:file:_files'
73
+ '--help[Show help]'
74
+ )
75
+ _arguments "$flags[@]"
76
+ ;;
77
+ esac
78
+ }
79
+
80
+ _epilot
81
+ `.trim();
82
+ var FISH_SCRIPT = `
83
+ # Fish completions for epilot
84
+
85
+ # Disable file completions by default
86
+ complete -c epilot -f
87
+
88
+ # Subcommands (first arg)
89
+ complete -c epilot -n '__fish_use_subcommand' -a '(epilot --_completions subcommands 2>/dev/null)'
90
+
91
+ # Operations (second arg)
92
+ complete -c epilot -n '__fish_seen_subcommand_from (epilot --_completions subcommands 2>/dev/null)' \\
93
+ -a '(epilot --_completions operations (commandline -opc)[2] 2>/dev/null)'
94
+
95
+ # Global flags
96
+ complete -c epilot -l token -s t -d 'Bearer token' -r
97
+ complete -c epilot -l profile -d 'Use a named profile' -r
98
+ complete -c epilot -l server -s s -d 'Override server base URL' -r
99
+ complete -c epilot -l json -d 'Output raw JSON'
100
+ complete -c epilot -l verbose -s v -d 'Verbose output'
101
+ complete -c epilot -l interactive -d 'Interactive mode'
102
+ complete -c epilot -l no-interactive -d 'Disable interactive mode'
103
+ complete -c epilot -l jsonata -d 'JSONata expression' -r
104
+ complete -c epilot -l include -s i -d 'Include response headers'
105
+ complete -c epilot -s d -d 'Request body JSON' -r
106
+ complete -c epilot -s p -d 'Parameter key=value' -r
107
+ complete -c epilot -s H -d 'Custom header' -r
108
+ complete -c epilot -l definition -d 'Override OpenAPI spec' -r -F
109
+ complete -c epilot -l help -d 'Show help'
110
+ `.trim();
111
+ var handleCompletions = (type, api) => {
112
+ if (type === "subcommands") {
113
+ const names = API_LIST.map((a) => a.kebabName);
114
+ names.push("auth", "profile", "completion");
115
+ console.log(names.join("\n"));
116
+ return;
117
+ }
118
+ if (type === "operations" && api) {
119
+ const info = API_LIST.find((a) => a.kebabName === api);
120
+ if (info) {
121
+ console.log(info.operationIds.join("\n"));
122
+ }
123
+ return;
124
+ }
125
+ };
126
+ var completion_default = defineCommand({
127
+ meta: { name: "completion", description: "Generate shell completion scripts" },
128
+ args: {
129
+ shell: {
130
+ type: "positional",
131
+ description: "Shell type: bash, zsh, or fish",
132
+ required: false
133
+ }
134
+ },
135
+ run: ({ args }) => {
136
+ const shell = args.shell || detectShell();
137
+ switch (shell) {
138
+ case "bash":
139
+ console.log(BASH_SCRIPT);
140
+ console.log("\n# Add to your ~/.bashrc:");
141
+ console.log('# eval "$(epilot completion bash)"');
142
+ break;
143
+ case "zsh":
144
+ console.log(ZSH_SCRIPT);
145
+ console.log("\n# Add to your ~/.zshrc:");
146
+ console.log('# eval "$(epilot completion zsh)"');
147
+ break;
148
+ case "fish":
149
+ console.log(FISH_SCRIPT);
150
+ console.log("\n# Save to ~/.config/fish/completions/epilot.fish:");
151
+ console.log("# epilot completion fish > ~/.config/fish/completions/epilot.fish");
152
+ break;
153
+ default:
154
+ console.error(`Unknown shell: ${shell}. Supported: bash, zsh, fish`);
155
+ process.exit(1);
156
+ }
157
+ }
158
+ });
159
+ var detectShell = () => {
160
+ const shell = process.env.SHELL || "";
161
+ if (shell.includes("zsh")) return "zsh";
162
+ if (shell.includes("fish")) return "fish";
163
+ return "bash";
164
+ };
165
+ export {
166
+ completion_default as default,
167
+ handleCompletions
168
+ };
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ callApi
4
+ } from "./chunk-57PPARIW.js";
5
+ import "./chunk-5WUPDZ5D.js";
6
+ import "./chunk-IST42ZNL.js";
7
+ import "./chunk-RC3GCXCI.js";
8
+ import "./chunk-TKZLQD2B.js";
9
+
10
+ // src/commands/apis/consent.ts
11
+ import { defineCommand } from "citty";
12
+ var consent_default = defineCommand({
13
+ meta: { name: "consent", description: "Consent API" },
14
+ args: {
15
+ operation: { type: "positional", description: "operationId to call", required: false },
16
+ param: { type: "string", alias: "p", description: "Parameter key=value" },
17
+ data: { type: "string", alias: "d", description: "Request body JSON" },
18
+ header: { type: "string", alias: "H", description: "Custom header" },
19
+ include: { type: "boolean", alias: "i", description: "Include response headers" },
20
+ definition: { type: "string", description: "Override OpenAPI spec file/URL" },
21
+ server: { type: "string", alias: "s", description: "Override server base URL" },
22
+ profile: { type: "string", description: "Use a named profile" },
23
+ token: { type: "string", alias: "t", description: "Bearer token" },
24
+ json: { type: "boolean", description: "Output raw JSON" },
25
+ verbose: { type: "boolean", alias: "v", description: "Verbose output" },
26
+ interactive: { type: "boolean", description: "Interactive mode" },
27
+ jsonata: { type: "string", description: "JSONata expression to transform response" },
28
+ _ophelp: { type: "boolean", description: "Show operation help", required: false }
29
+ },
30
+ run: ({ args, rawArgs }) => {
31
+ const positionalArgs = [];
32
+ if (args.operation && rawArgs) {
33
+ const opIdx = rawArgs.indexOf(args.operation);
34
+ if (opIdx >= 0) {
35
+ for (let i = opIdx + 1; i < rawArgs.length; i++) {
36
+ const arg = rawArgs[i];
37
+ if (arg.startsWith("-")) break;
38
+ positionalArgs.push(arg);
39
+ }
40
+ }
41
+ }
42
+ return callApi("consent", {
43
+ ...args,
44
+ help: !!args._ophelp,
45
+ _args: positionalArgs
46
+ });
47
+ }
48
+ });
49
+ export {
50
+ consent_default as default
51
+ };