import { ApiOperation, CoreCallbackEvent, CreateProjectInputs, CreateProjectResult, CryptoProvider, Func, FxError, IGenerator, IQTreeNode, Inputs, InputsWithProjectPath, Result, Stage, TeamsAppInputs, Tools } from "@microsoft/teamsfx-api"; import { DotenvParseOutput } from "dotenv"; import "reflect-metadata"; import { ListCollaboratorResult, PermissionsResult } from "../common/permissionInterface"; import { ProjectTypeResult } from "../common/projectTypeChecker"; import { ILifecycle } from "../component/configManager/interface"; import "../component/driver/index"; import { DriverContext } from "../component/driver/interface/commonArgs"; import "../component/driver/script/scriptDriver"; import "../component/feature/sso"; import { ItemMetadata } from "../component/generator/declarativeAgent/oneDriveSharePointHandler"; import { SyncManifestInputs, UninstallInputs } from "../question"; import { ValidateTeamsAppInputs } from "../question/inputs/ValidateTeamsAppInputs"; import { CoreCallbackFunc } from "./callback"; import { CoreHookContext, PreProvisionResForVS, VersionCheckRes } from "./types"; export declare class FxCore { constructor(tools: Tools); /** * @todo this's a really primitive implement. Maybe could use Subscription Model to // Copyright (c) Microsoft Corporation. * refactor later. */ on(event: CoreCallbackEvent, callback: CoreCallbackFunc): void; createProject(inputs: Inputs): Promise>; createProjectFromTdp(inputs: Inputs): Promise>; createProjectByCustomizedGenerator(inputs: CreateProjectInputs, generator: IGenerator): Promise>; /** * lifecycle command: create new sample project */ createSampleProject(inputs: Inputs): Promise>; /** * Wrapper of provisionResourcesOnce, which will retry if NeedRedoError is thrown. */ provisionResources(inputs: Inputs): Promise>; /** * lifecycle commands: provision */ provisionResourcesOnce(inputs: Inputs, ctx?: CoreHookContext): Promise>; /** * none lifecycle command, uninstall provisioned resources */ uninstall(inputs: UninstallInputs): Promise>; /** * uninstall provisioned resources by manifest ID */ uninstallByManifestId(inputs: UninstallInputs): Promise>; /** * uninstall provisioned resources by a given environment */ uninstallByEnv(inputs: UninstallInputs, ctx?: CoreHookContext): Promise>; resetEnvVar(key: string, ctx?: CoreHookContext, skipIfNotExist?: boolean, resetValue?: string): void; /** * uninstall provisioned resources by title ID. Titlle mode only uninstalls M365 app. */ uninstallByTitleId(inputs: UninstallInputs): Promise>; /** * uninstall sideloaded appps in M365 */ uninstallM365App(titleId?: string, manifestId?: string): Promise>; /** * uninstall sideloaded apps in Teams Developer Portal */ uninstallAppRegistration(manifestId: string): Promise>; /** * uninstall bots created in dev.botframework.com */ uninstallBotFrameworRegistration(botId?: string, manifestId?: string): Promise>; /** * lifecycle commands: deploy */ deployArtifacts(inputs: Inputs, ctx?: CoreHookContext): Promise>; localDebug(inputs: Inputs): Promise>; /** * none lifecycle command, v3 only */ deployAadManifest(inputs: Inputs): Promise>; /** * none lifecycle command, v3 only */ addWebpart(inputs: Inputs): Promise>; /** * lifecycle command: publish */ publishApplication(inputs: Inputs, ctx?: CoreHookContext): Promise>; /** * lifecycle command: share */ removeSharedAccess(inputs: Inputs, ctx?: CoreHookContext): Promise>; /** * lifecycle command: share */ shareApplication(inputs: Inputs, ctx?: CoreHookContext): Promise>; /** * most commands will be deprecated in V3 */ executeUserTask(func: Func, inputs: Inputs): Promise>; /** * v3 only none lifecycle command */ buildAadManifest(inputs: Inputs): Promise>; convertAadToNewSchema(inputs: Inputs): Promise>; /** * v3 only none lifecycle command */ deployTeamsManifest(inputs: Inputs, ctx?: CoreHookContext): Promise>; /****** * CLI v3 commands */ updateTeamsAppCLIV3(inputs: TeamsAppInputs): Promise>; /****** * CLI v3 commands */ validateTeamsAppCLIV3(inputs: TeamsAppInputs): Promise>; /****** * CLI v3 commands */ packageTeamsAppCLIV3(inputs: TeamsAppInputs): Promise>; /****** * CLI v3 commands */ publishTeamsAppCLIV3(inputs: TeamsAppInputs): Promise>; /** * v3 only none lifecycle command */ validateApplication(inputs: ValidateTeamsAppInputs): Promise>; /** * v3 only none lifecycle command */ validateManifest(inputs: ValidateTeamsAppInputs): Promise>; /** * v3 only none lifecycle command */ validateAppPackage(inputs: ValidateTeamsAppInputs): Promise>; validateWithTestCases(inputs: ValidateTeamsAppInputs): Promise>; /** * v3 only none lifecycle command */ syncManifest(inputs: SyncManifestInputs): Promise>; /** * v3 only none lifecycle command */ createAppPackage(inputs: Inputs): Promise>; /** * get url to preview the app, may prompt to select env, hub and Teams manifest * v3 only none lifecycle command * @param {Inputs} inputs * @returns the url to preview the app */ previewWithManifest(inputs: Inputs): Promise>; /** * Warning: this API only works for CLI_HELP, it has no business with interactive run for CLI! */ getQuestions(stage: Stage, inputs: Inputs): Result; /** * get all dot envs */ getDotEnvs(inputs: InputsWithProjectPath): Promise>; /** * given projectPath and filePath, return whether the filePath is a env file */ isEnvFile(projectPath: string, inputFile: string): Promise>; /** * get projectId */ getProjectId(projectPath: string): Promise>; /** * @description get projectId and version from yml */ getProjectMetadata(projectPath: string): Promise>; /** * get Teams App Name from yml */ getTeamsAppName(projectPath: string): Promise>; /** * get project info */ getProjectInfo(projectPath: string, env: string): Promise>; grantPermission(inputs: Inputs): Promise>; /** * none lifecycle command */ checkPermission(inputs: Inputs): Promise>; /** * none lifecycle command */ listCollaborator(inputs: Inputs): Promise>; getSelectedEnv(inputs: Inputs): Promise>; createLocalCrypto(projectPath: string): Promise>; /** * only for vs code extension */ encrypt(plaintext: string, inputs: Inputs): Promise>; /** * only for vs code extension */ decrypt(ciphertext: string, inputs: Inputs): Promise>; createEnv(inputs: Inputs): Promise>; createEnvCopyV3(targetEnvName: string, sourceEnvName: string, projectPath: string): Promise>; phantomMigrationV3(inputs: Inputs): Promise>; innerMigrationV3(inputs: Inputs): Result; projectVersionCheck(inputs: Inputs): Promise>; apply(inputs: Inputs, templatePath: string, lifecycleName: string): Promise>; runLifecycle(lifecycle: ILifecycle, driverContext: DriverContext, env: string): Promise>; preProvisionForVS(inputs: Inputs): Promise>; preCheckYmlAndEnvForVS(inputs: Inputs): Promise>; publishInDeveloperPortal(inputs: Inputs): Promise>; copilotPluginAddAPI(inputs: Inputs): Promise>; listPluginApiSpecs(inputs: Inputs): Promise>; copilotPluginListOperations(inputs: Inputs): Promise>; /** * check project type info */ checkProjectType(projectPath: string): Promise>; /** * Add plugin */ addPlugin(inputs: Inputs): Promise>; regeneratePlugin(inputs: Inputs): Promise>; /** * MetaOS Extend To DA */ metaOSExtendToDA(inputs: Inputs, workDir: string): Promise>; /** * Add Knowledge */ addKnowledge(inputs: Inputs): Promise>; /** * only for vs code extension */ getODSPItemDetails(siteId: string, itemId?: string): Promise>; /** * Kiota regenerate * Need to update da manifest and update m365agents.yml */ kiotaRegenerate(inputs: Inputs): Promise>; addAuthAction(inputs: Inputs): Promise>; setSensitivityLabel(inputs: Inputs): Promise>; installAppToChannel(inputs: Inputs): Promise>; private updateAuthActionInYaml; private parseAuthNameAndScheme; private parseScope; isDelcarativeAgentApp(inputs: Inputs): Promise>; private addOneDriveSharePointKnowledge; private addWebSearchKnowledge; private addGCKnowledge; private addEmbeddedKnowledge; private showAddKnowledgeSuccessMessage; } //# sourceMappingURL=FxCore.d.ts.map