"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var config_exports = {};
__export(config_exports, {
  schemas: () => schemas
});
module.exports = __toCommonJS(config_exports);
var consts = __toESM(require("./consts"));
var import_project_templates = require("./project-templates");
const port = {
  type: "number",
  description: "The port to use"
};
const workDir = {
  type: "string",
  description: "The path to the project",
  default: consts.defaultWorkDir
};
const noBuild = {
  type: "boolean",
  description: "Skip the build step",
  default: false
};
const dryRun = {
  type: "boolean",
  description: "Ask the API not to perform the actual operation",
  default: false
};
const apiUrl = {
  type: "string",
  description: "The URL of the Botpress server"
};
const token = {
  type: "string",
  description: "You Personal Access Token "
};
const workspaceId = {
  type: "string",
  description: "The Workspace Id to deploy to"
};
const secrets = {
  type: "string",
  description: "Values for the integration secrets",
  array: true,
  default: []
};
const botRef = {
  type: "string",
  description: "The bot ID. Bot Name is not supported.",
  demandOption: true,
  positional: true,
  idx: 0
};
const packageType = {
  type: "string",
  description: "Either an integration or an interface; helps disambiguate the package type in case both an integration and an interface have the same reference.",
  choices: ["integration", "interface", "plugin"]
};
const packageRef = {
  type: "string",
  description: "The package ID or name with optional version. The package can be either an integration or an interface. Ex: teams, teams@0.2.0, llm@5.1.0",
  positional: true,
  idx: 0
};
const integrationRef = {
  ...packageRef,
  demandOption: true,
  description: "The integration ID or name with optional version. Ex: teams or teams@0.2.0"
};
const interfaceRef = {
  ...packageRef,
  demandOption: true,
  description: "The interface ID or name and version. Ex: llm@5.1.0"
};
const pluginRef = {
  ...packageRef,
  demandOption: true,
  description: "The plugin ID or name and version. Ex: knowledge@0.0.1"
};
const sourceMap = { type: "boolean", description: "Generate sourcemaps", default: false };
const minify = { type: "boolean", description: "Minify the bundled code", default: true };
const dev = {
  type: "boolean",
  description: "List only dev bots / dev integrations",
  default: false
};
const globalSchema = {
  verbose: {
    type: "boolean",
    description: "Enable verbose logging",
    alias: "v",
    default: false
  },
  confirm: {
    type: "boolean",
    description: "Confirm all prompts",
    alias: "y",
    default: false
  },
  json: {
    type: "boolean",
    description: "Prevent logging anything else than raw json in stdout. Useful for piping output to other tools",
    default: false
  },
  botpressHome: {
    type: "string",
    description: "The path to the Botpress home directory",
    default: consts.defaultBotpressHome
  },
  profile: {
    type: "string",
    description: "The CLI profile defined in the $BP_BOTPRESS_HOME/profiles.json",
    alias: "p"
  }
};
const projectSchema = {
  ...globalSchema,
  workDir
};
const credentialsSchema = {
  apiUrl,
  workspaceId,
  token
};
const secretsSchema = {
  secrets
};
const generateSchema = {
  ...projectSchema
};
const bundleSchema = {
  ...projectSchema,
  sourceMap,
  minify
};
const buildSchema = {
  ...projectSchema,
  sourceMap,
  minify
};
const readSchema = {
  ...projectSchema
};
const serveSchema = {
  ...projectSchema,
  ...secretsSchema,
  port
};
const deploySchema = {
  ...projectSchema,
  ...credentialsSchema,
  ...secretsSchema,
  botId: { type: "string", description: "The bot ID to deploy. Only used when deploying a bot" },
  noBuild,
  dryRun,
  createNewBot: { type: "boolean", description: "Create a new bot when deploying. Only used when deploying a bot" },
  sourceMap,
  minify,
  visibility: {
    type: "string",
    choices: ["public", "private", "unlisted"],
    description: "The visibility of the project. By default, projects are always private. Unlisted visibility is only supported for integrations.",
    default: "private"
  },
  public: {
    type: "boolean",
    description: 'DEPRECATED: Please use "--visibility public" instead.',
    default: false,
    deprecated: true
  },
  allowDeprecated: {
    type: "boolean",
    description: "Allow deprecated features in the project",
    default: false
  }
};
const devSchema = {
  ...projectSchema,
  ...credentialsSchema,
  ...secretsSchema,
  sourceMap,
  minify,
  port,
  tunnelUrl: {
    type: "string",
    description: "The tunnel HTTP URL to use",
    default: consts.defaultTunnelUrl
  },
  tunnelId: {
    type: "string",
    description: "The tunnel ID to use. The ID will be generated if not specified"
  }
};
const addSchema = {
  ...globalSchema,
  ...credentialsSchema,
  packageRef,
  packageType,
  installPath: {
    type: "string",
    description: "The path where to install the package",
    default: consts.defaultInstallPath
  },
  useDev: {
    type: "boolean",
    description: "If a dev version of the package is found, use it",
    default: false
  }
};
const loginSchema = {
  ...globalSchema,
  token,
  workspaceId,
  apiUrl: { ...apiUrl, default: consts.defaultBotpressApiUrl }
};
const logoutSchema = {
  ...globalSchema
};
const createBotSchema = {
  ...globalSchema,
  ...credentialsSchema,
  name: { type: "string", description: "The name of the bot to create" },
  ifNotExists: {
    type: "boolean",
    description: "Do not create if a bot with the same name already exists",
    default: false
  }
};
const getBotSchema = {
  ...globalSchema,
  ...credentialsSchema,
  botRef
};
const deleteBotSchema = {
  ...globalSchema,
  ...credentialsSchema,
  botRef
};
const listBotsSchema = {
  ...globalSchema,
  ...credentialsSchema,
  dev
};
const getIntegrationSchema = {
  ...globalSchema,
  ...credentialsSchema,
  integrationRef
};
const listIntegrationsSchema = {
  ...globalSchema,
  ...credentialsSchema,
  name: { type: "string", description: "The name filter when listing integrations" },
  versionNumber: { type: "string", description: "The version filter when listing integrations" },
  dev
};
const deleteIntegrationSchema = {
  ...globalSchema,
  ...credentialsSchema,
  integrationRef
};
const getInterfaceSchema = {
  ...globalSchema,
  ...credentialsSchema,
  interfaceRef
};
const listInterfacesSchema = {
  ...globalSchema,
  ...credentialsSchema
};
const deleteInterfaceSchema = {
  ...globalSchema,
  ...credentialsSchema,
  interfaceRef
};
const getPluginSchema = {
  ...globalSchema,
  ...credentialsSchema,
  pluginRef
};
const listPluginsSchema = {
  ...globalSchema,
  ...credentialsSchema,
  name: { type: "string", description: "The name filter when listing plugins" },
  versionNumber: { type: "string", description: "The version filter when listing plugins" }
};
const deletePluginSchema = {
  ...globalSchema,
  ...credentialsSchema,
  pluginRef
};
const initSchema = {
  ...globalSchema,
  workDir,
  type: { type: "string", choices: ["bot", "integration", "plugin"] },
  template: {
    type: "string",
    choices: import_project_templates.ProjectTemplates.getAllChoices(),
    description: "The template to use"
  },
  name: { type: "string", description: "The name of the project" }
};
const lintSchema = {
  ...projectSchema
};
const chatSchema = {
  ...globalSchema,
  ...credentialsSchema,
  chatApiUrl: {
    type: "string",
    description: "The URL of the chat server"
  },
  botId: {
    type: "string",
    positional: true,
    idx: 0,
    description: "The bot ID to chat with"
  }
};
const listProfilesSchema = {
  ...globalSchema
};
const activeProfileSchema = {
  ...globalSchema
};
const useProfileSchema = {
  ...globalSchema,
  profileToUse: {
    type: "string",
    description: "The CLI profile defined in the $BP_BOTPRESS_HOME/profiles.json",
    positional: true,
    idx: 0
  }
};
const schemas = {
  global: globalSchema,
  project: projectSchema,
  credentials: credentialsSchema,
  secrets: secretsSchema,
  login: loginSchema,
  logout: logoutSchema,
  createBot: createBotSchema,
  getBot: getBotSchema,
  deleteBot: deleteBotSchema,
  listBots: listBotsSchema,
  getIntegration: getIntegrationSchema,
  listIntegrations: listIntegrationsSchema,
  deleteIntegration: deleteIntegrationSchema,
  getInterface: getInterfaceSchema,
  listInterfaces: listInterfacesSchema,
  deleteInterface: deleteInterfaceSchema,
  getPlugin: getPluginSchema,
  listPlugins: listPluginsSchema,
  deletePlugin: deletePluginSchema,
  init: initSchema,
  generate: generateSchema,
  bundle: bundleSchema,
  build: buildSchema,
  read: readSchema,
  serve: serveSchema,
  deploy: deploySchema,
  add: addSchema,
  dev: devSchema,
  lint: lintSchema,
  chat: chatSchema,
  listProfiles: listProfilesSchema,
  activeProfile: activeProfileSchema,
  useProfile: useProfileSchema
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  schemas
});
//# sourceMappingURL=config.js.map
