@microsoft/teamsfx-core 2.0.4-alpha.dc097d3df.0 → 2.0.4-alpha.e432bab97.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.
- package/build/common/deps-checker/checkerFactory.d.ts +1 -2
- package/build/common/deps-checker/checkerFactory.d.ts.map +1 -1
- package/build/common/deps-checker/checkerFactory.js +2 -2
- package/build/common/deps-checker/checkerFactory.js.map +1 -1
- package/build/common/deps-checker/depsLogger.d.ts +14 -14
- package/build/common/deps-checker/depsLogger.d.ts.map +1 -1
- package/build/common/deps-checker/depsLogger.js +7 -21
- package/build/common/deps-checker/depsLogger.js.map +1 -1
- package/build/common/deps-checker/internal/dotnetChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/dotnetChecker.js +42 -37
- package/build/common/deps-checker/internal/dotnetChecker.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js +2 -2
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +8 -8
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/common/deps-checker/internal/vxTestAppChecker.js +1 -1
- package/build/common/deps-checker/internal/vxTestAppChecker.js.map +1 -1
- package/build/common/deps-checker/util/cpUtils.d.ts +1 -1
- package/build/common/deps-checker/util/cpUtils.d.ts.map +1 -1
- package/build/common/deps-checker/util/cpUtils.js +5 -5
- package/build/common/deps-checker/util/cpUtils.js.map +1 -1
- package/build/common/deps-checker/util/fileHelper.d.ts.map +1 -1
- package/build/common/deps-checker/util/fileHelper.js +2 -0
- package/build/common/deps-checker/util/fileHelper.js.map +1 -1
- package/build/common/deps-checker/util/progressIndicator.js +2 -2
- package/build/common/deps-checker/util/progressIndicator.js.map +1 -1
- package/build/common/featureFlags.d.ts +1 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +7 -2
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/jsonUtils.d.ts.map +1 -1
- package/build/common/jsonUtils.js +2 -0
- package/build/common/jsonUtils.js.map +1 -1
- package/build/common/local/localCertificateManager.d.ts.map +1 -1
- package/build/common/local/localCertificateManager.js +4 -1
- package/build/common/local/localCertificateManager.js.map +1 -1
- package/build/common/local/packageJsonHelper.d.ts.map +1 -1
- package/build/common/local/packageJsonHelper.js +1 -0
- package/build/common/local/packageJsonHelper.js.map +1 -1
- package/build/common/local/portChecker.js.map +1 -1
- package/build/common/m365/launchHelper.d.ts +2 -2
- package/build/common/m365/launchHelper.d.ts.map +1 -1
- package/build/common/m365/launchHelper.js +13 -4
- package/build/common/m365/launchHelper.js.map +1 -1
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +38 -0
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -0
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/samples-config-v3.json +234 -27
- package/build/common/samples.d.ts +10 -6
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +31 -29
- package/build/common/samples.js.map +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts +5 -0
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +1 -0
- package/build/common/spec-parser/adaptiveCardGenerator.js +119 -0
- package/build/common/spec-parser/adaptiveCardGenerator.js.map +1 -0
- package/build/common/spec-parser/constants.d.ts +20 -0
- package/build/common/spec-parser/constants.d.ts.map +1 -0
- package/build/common/spec-parser/constants.js +27 -0
- package/build/common/spec-parser/constants.js.map +1 -0
- package/build/common/spec-parser/interfaces.d.ts +133 -0
- package/build/common/spec-parser/interfaces.d.ts.map +1 -0
- package/build/common/spec-parser/interfaces.js +46 -0
- package/build/common/spec-parser/interfaces.js.map +1 -0
- package/build/common/spec-parser/manifestUpdater.d.ts +5 -0
- package/build/common/spec-parser/manifestUpdater.d.ts.map +1 -0
- package/build/common/spec-parser/manifestUpdater.js +81 -0
- package/build/common/spec-parser/manifestUpdater.js.map +1 -0
- package/build/common/spec-parser/specFilter.d.ts +3 -0
- package/build/common/spec-parser/specFilter.d.ts.map +1 -0
- package/build/common/spec-parser/specFilter.js +40 -0
- package/build/common/spec-parser/specFilter.js.map +1 -0
- package/build/common/spec-parser/specParser.d.ts +45 -0
- package/build/common/spec-parser/specParser.d.ts.map +1 -0
- package/build/common/spec-parser/specParser.js +247 -0
- package/build/common/spec-parser/specParser.js.map +1 -0
- package/build/common/spec-parser/specParserError.d.ts +6 -0
- package/build/common/spec-parser/specParserError.d.ts.map +1 -0
- package/build/common/spec-parser/specParserError.js +13 -0
- package/build/common/spec-parser/specParserError.js.map +1 -0
- package/build/common/spec-parser/utils.d.ts +8 -0
- package/build/common/spec-parser/utils.d.ts.map +1 -0
- package/build/common/spec-parser/utils.js +91 -0
- package/build/common/spec-parser/utils.js.map +1 -0
- package/build/common/telemetry.d.ts +7 -5
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +40 -15
- package/build/common/telemetry.js.map +1 -1
- package/build/common/tools.js +3 -3
- package/build/common/tools.js.map +1 -1
- package/build/common/utils.d.ts +1 -0
- package/build/common/utils.d.ts.map +1 -1
- package/build/common/utils.js +5 -1
- package/build/common/utils.js.map +1 -1
- package/build/component/configManager/constant.d.ts.map +1 -1
- package/build/component/configManager/constant.js +4 -2
- package/build/component/configManager/constant.js.map +1 -1
- package/build/component/configManager/interface.d.ts +5 -0
- package/build/component/configManager/interface.d.ts.map +1 -1
- package/build/component/configManager/interface.js +2 -3
- package/build/component/configManager/interface.js.map +1 -1
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +22 -13
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/configManager/parser.d.ts.map +1 -1
- package/build/component/configManager/parser.js +17 -9
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/configManager/validator.d.ts +0 -3
- package/build/component/configManager/validator.d.ts.map +1 -1
- package/build/component/configManager/validator.js +4 -12
- package/build/component/configManager/validator.js.map +1 -1
- package/build/component/constants.d.ts +10 -23
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +11 -24
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts +12 -8
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +76 -59
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/coordinator/summary.d.ts.map +1 -1
- package/build/component/coordinator/summary.js +4 -1
- package/build/component/coordinator/summary.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +7 -7
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/create.d.ts +1 -0
- package/build/component/driver/aad/create.d.ts.map +1 -1
- package/build/component/driver/aad/create.js +2 -5
- package/build/component/driver/aad/create.js.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.d.ts +13 -3
- package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.js +51 -5
- package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
- package/build/component/driver/aad/interface/AADApplication.js +1 -1
- package/build/component/driver/aad/interface/AADApplication.js.map +1 -1
- package/build/component/driver/aad/interface/AADManifest.js +1 -1
- package/build/component/driver/aad/interface/AADManifest.js.map +1 -1
- package/build/component/driver/aad/update.d.ts +1 -0
- package/build/component/driver/aad/update.d.ts.map +1 -1
- package/build/component/driver/aad/update.js +2 -5
- package/build/component/driver/aad/update.js.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.js +58 -13
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js +14 -19
- package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.d.ts.map +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.js +12 -2
- package/build/component/driver/aad/utility/buildAadManifest.js.map +1 -1
- package/build/component/driver/aad/utility/constants.d.ts +3 -0
- package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
- package/build/component/driver/aad/utility/constants.js +4 -1
- package/build/component/driver/aad/utility/constants.js.map +1 -1
- package/build/component/driver/add/addWebPart.js +1 -1
- package/build/component/driver/add/addWebPart.js.map +1 -1
- package/build/component/driver/arm/deploy.d.ts +1 -0
- package/build/component/driver/arm/deploy.d.ts.map +1 -1
- package/build/component/driver/arm/deploy.js +1 -8
- package/build/component/driver/arm/deploy.js.map +1 -1
- package/build/component/driver/arm/deployImpl.d.ts +2 -1
- package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
- package/build/component/driver/arm/deployImpl.js +15 -0
- package/build/component/driver/arm/deployImpl.js.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.d.ts.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.js +9 -6
- package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
- package/build/component/driver/arm/util/handleError.js.map +1 -1
- package/build/component/driver/arm/validator.d.ts.map +1 -1
- package/build/component/driver/arm/validator.js +3 -3
- package/build/component/driver/arm/validator.js.map +1 -1
- package/build/component/driver/botAadApp/create.d.ts +1 -0
- package/build/component/driver/botAadApp/create.d.ts.map +1 -1
- package/build/component/driver/botAadApp/create.js +4 -7
- package/build/component/driver/botAadApp/create.js.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts +1 -0
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.js +7 -11
- package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +12 -5
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js +11 -4
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +22 -14
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +8 -8
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.js +4 -4
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/spfx/deployDriver.d.ts +1 -0
- package/build/component/driver/deploy/spfx/deployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/spfx/deployDriver.js +11 -5
- package/build/component/driver/deploy/spfx/deployDriver.js.map +1 -1
- package/build/component/driver/devTool/installDriver.d.ts +1 -0
- package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
- package/build/component/driver/devTool/installDriver.js +10 -6
- package/build/component/driver/devTool/installDriver.js.map +1 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts +1 -0
- package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts.map +1 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js +5 -11
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
- package/build/component/driver/file/createOrUpdateJsonFile.d.ts +1 -0
- package/build/component/driver/file/createOrUpdateJsonFile.d.ts.map +1 -1
- package/build/component/driver/file/createOrUpdateJsonFile.js +5 -11
- package/build/component/driver/file/createOrUpdateJsonFile.js.map +1 -1
- package/build/component/driver/interface/buildAndDeployArgs.d.ts +3 -6
- package/build/component/driver/interface/buildAndDeployArgs.d.ts.map +1 -1
- package/build/component/driver/interface/stepDriver.d.ts +1 -0
- package/build/component/driver/interface/stepDriver.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.d.ts +1 -0
- package/build/component/driver/m365/acquire.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.js +5 -11
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/script/baseBuildDriver.d.ts.map +1 -1
- package/build/component/driver/script/baseBuildDriver.js +1 -0
- package/build/component/driver/script/baseBuildDriver.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts +1 -0
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +30 -21
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +6 -6
- package/build/component/driver/teamsApp/appStudio.js.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +21 -5
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.d.ts +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.js +3 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.js.map +1 -1
- package/build/component/driver/teamsApp/configure.d.ts +1 -0
- package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
- package/build/component/driver/teamsApp/configure.js +4 -17
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +0 -1
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +1 -2
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts +1 -0
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts.map +1 -1
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.js +3 -6
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.js.map +1 -1
- package/build/component/driver/teamsApp/create.d.ts +1 -0
- package/build/component/driver/teamsApp/create.d.ts.map +1 -1
- package/build/component/driver/teamsApp/create.js +4 -5
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -2
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +47 -23
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
- package/build/component/driver/teamsApp/errors.js +2 -0
- package/build/component/driver/teamsApp/errors.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtension.d.ts +3 -0
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtension.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtensionCommand.d.ts +1 -0
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtensionCommand.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.d.ts +1 -0
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +2 -5
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/results.d.ts.map +1 -1
- package/build/component/driver/teamsApp/results.js +2 -0
- package/build/component/driver/teamsApp/results.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +6 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +19 -2
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.d.ts +2 -3
- package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.js +21 -19
- package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts +1 -0
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +8 -5
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts +1 -0
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +26 -18
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/error/componentError.d.ts +2 -5
- package/build/component/error/componentError.d.ts.map +1 -1
- package/build/component/error/componentError.js +9 -14
- package/build/component/error/componentError.js.map +1 -1
- package/build/component/feature/collaboration.d.ts.map +1 -1
- package/build/component/feature/collaboration.js +50 -21
- package/build/component/feature/collaboration.js.map +1 -1
- package/build/component/feature/createAuthFiles.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts +8 -0
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -0
- package/build/component/generator/copilotPlugin/generator.js +142 -0
- package/build/component/generator/copilotPlugin/generator.js.map +1 -0
- package/build/component/generator/copilotPlugin/helper.d.ts +30 -0
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -0
- package/build/component/generator/copilotPlugin/helper.js +261 -0
- package/build/component/generator/copilotPlugin/helper.js.map +1 -0
- package/build/component/generator/error.d.ts +1 -1
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +2 -2
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +24 -20
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +4 -3
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.js +2 -0
- package/build/component/generator/officeAddin/config/projectProperties.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.js +2 -0
- package/build/component/generator/officeAddin/config/projectsJsonData.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +17 -9
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +11 -5
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.js +12 -12
- package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.d.ts +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.js +10 -10
- package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
- package/build/component/generator/spfx/error.d.ts +2 -0
- package/build/component/generator/spfx/error.d.ts.map +1 -1
- package/build/component/generator/spfx/error.js +21 -1
- package/build/component/generator/spfx/error.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts +4 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +141 -117
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +1 -0
- package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/constants.js +2 -0
- package/build/component/generator/spfx/utils/constants.js.map +1 -1
- package/build/component/generator/spfx/utils/telemetryEvents.d.ts +2 -1
- package/build/component/generator/spfx/utils/telemetryEvents.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/telemetryEvents.js +1 -0
- package/build/component/generator/spfx/utils/telemetryEvents.js.map +1 -1
- package/build/component/generator/spfx/utils/utils.js +3 -3
- package/build/component/generator/spfx/utils/utils.js.map +1 -1
- package/build/component/generator/utils.d.ts +10 -3
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +6 -9
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/messages.d.ts +2 -3
- package/build/component/messages.d.ts.map +1 -1
- package/build/component/messages.js +3 -4
- package/build/component/messages.js.map +1 -1
- package/build/component/middleware/questionMW.d.ts +2 -2
- package/build/component/middleware/questionMW.d.ts.map +1 -1
- package/build/component/middleware/questionMW.js +7 -11
- package/build/component/middleware/questionMW.js.map +1 -1
- package/build/component/migrate.d.ts.map +1 -1
- package/build/component/migrate.js +2 -0
- package/build/component/migrate.js.map +1 -1
- package/build/component/provisionUtils.d.ts +3 -3
- package/build/component/provisionUtils.d.ts.map +1 -1
- package/build/component/provisionUtils.js +3 -3
- package/build/component/provisionUtils.js.map +1 -1
- package/build/component/registerService.d.ts +0 -1
- package/build/component/registerService.d.ts.map +1 -1
- package/build/component/registerService.js +0 -1
- package/build/component/registerService.js.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.js +24 -2
- package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
- package/build/component/telemetry.d.ts.map +1 -1
- package/build/component/telemetry.js +3 -6
- package/build/component/telemetry.js.map +1 -1
- package/build/component/utils/ResourceGroupHelper.d.ts +2 -2
- package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/component/utils/ResourceGroupHelper.js +1 -4
- package/build/component/utils/ResourceGroupHelper.js.map +1 -1
- package/build/component/utils/azureResourceOperation.js +2 -2
- package/build/component/utils/azureResourceOperation.js.map +1 -1
- package/build/component/utils/charsetUtils.d.ts.map +1 -1
- package/build/component/utils/charsetUtils.js +5 -3
- package/build/component/utils/charsetUtils.js.map +1 -1
- package/build/component/utils/common.d.ts +1 -1
- package/build/component/utils/common.d.ts.map +1 -1
- package/build/component/utils/common.js +5 -6
- package/build/component/utils/common.js.map +1 -1
- package/build/component/utils/depsChecker/common.d.ts.map +1 -1
- package/build/component/utils/depsChecker/common.js +1 -1
- package/build/component/utils/depsChecker/common.js.map +1 -1
- package/build/component/utils/depsChecker/cpUtils.d.ts.map +1 -1
- package/build/component/utils/depsChecker/cpUtils.js +9 -5
- package/build/component/utils/depsChecker/cpUtils.js.map +1 -1
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +4 -2
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/metadataUtil.d.ts +3 -0
- package/build/component/utils/metadataUtil.d.ts.map +1 -1
- package/build/component/utils/metadataUtil.js +18 -4
- package/build/component/utils/metadataUtil.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts.map +1 -1
- package/build/component/utils/pathUtils.js +2 -0
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/component/utils/teamsFxTelemetryReporter.d.ts.map +1 -1
- package/build/component/utils/teamsFxTelemetryReporter.js +3 -6
- package/build/component/utils/teamsFxTelemetryReporter.js.map +1 -1
- package/build/component/utils.js.map +1 -1
- package/build/core/FxCore.d.ts +43 -32
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +816 -63
- package/build/core/FxCore.js.map +1 -1
- package/build/core/collaborator.d.ts +1 -1
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/collaborator.js +16 -10
- package/build/core/collaborator.js.map +1 -1
- package/build/core/error.d.ts +6 -0
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +23 -1
- package/build/core/error.js.map +1 -1
- package/build/core/globalVars.d.ts +16 -0
- package/build/core/globalVars.d.ts.map +1 -1
- package/build/core/globalVars.js +34 -1
- package/build/core/globalVars.js.map +1 -1
- package/build/core/index.js +1 -0
- package/build/core/index.js.map +1 -1
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +7 -3
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/errorHandler.d.ts +2 -0
- package/build/core/middleware/errorHandler.d.ts.map +1 -1
- package/build/core/middleware/errorHandler.js +16 -25
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts +7 -1
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +35 -34
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.js +8 -8
- package/build/core/middleware/projectVersionChecker.js.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.d.ts.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.js +2 -1
- package/build/core/middleware/utils/appYmlGenerator.js.map +1 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js +3 -2
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js.map +1 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +33 -15
- package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
- package/build/core/middleware/utils/migrationContext.d.ts +1 -0
- package/build/core/middleware/utils/migrationContext.d.ts.map +1 -1
- package/build/core/middleware/utils/migrationContext.js.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.js +6 -2
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/error/arm.d.ts.map +1 -1
- package/build/error/arm.js +2 -0
- package/build/error/arm.js.map +1 -1
- package/build/error/azure.d.ts.map +1 -1
- package/build/error/azure.js +2 -0
- package/build/error/azure.js.map +1 -1
- package/build/error/common.d.ts +8 -2
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +129 -22
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +10 -8
- package/build/error/deploy.js.map +1 -1
- package/build/error/index.d.ts.map +1 -1
- package/build/error/index.js +2 -0
- package/build/error/index.js.map +1 -1
- package/build/error/m365.d.ts.map +1 -1
- package/build/error/m365.js +2 -0
- package/build/error/m365.js.map +1 -1
- package/build/error/script.d.ts.map +1 -1
- package/build/error/script.js +2 -0
- package/build/error/script.js.map +1 -1
- package/build/error/upgrade.d.ts.map +1 -1
- package/build/error/upgrade.js +2 -0
- package/build/error/upgrade.js.map +1 -1
- package/build/error/yml.d.ts.map +1 -1
- package/build/error/yml.js +2 -0
- package/build/error/yml.js.map +1 -1
- package/build/failpoint/index.d.ts.map +1 -1
- package/build/failpoint/index.js +2 -0
- package/build/failpoint/index.js.map +1 -1
- package/build/failpoint/marker.d.ts.map +1 -1
- package/build/failpoint/marker.js +2 -0
- package/build/failpoint/marker.js.map +1 -1
- package/build/failpoint/runtime.d.ts.map +1 -1
- package/build/failpoint/runtime.js +3 -4
- package/build/failpoint/runtime.js.map +1 -1
- package/build/index.d.ts +3 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +4 -1
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +4 -0
- package/build/question/constants.d.ts.map +1 -0
- package/build/question/constants.js +12 -0
- package/build/question/constants.js.map +1 -0
- package/build/question/create.d.ts +14 -15
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +478 -332
- package/build/question/create.js.map +1 -1
- package/build/question/generator.d.ts +4 -0
- package/build/question/generator.d.ts.map +1 -0
- package/build/question/generator.js +371 -0
- package/build/question/generator.js.map +1 -0
- package/build/question/index.d.ts +18 -28
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +18 -44
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/CreateEnvInputs.d.ts +14 -0
- package/build/question/inputs/CreateEnvInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateEnvInputs.js +5 -0
- package/build/question/inputs/CreateEnvInputs.js.map +1 -0
- package/build/question/inputs/CreateProjectInputs.d.ts +40 -0
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateProjectInputs.js +5 -0
- package/build/question/inputs/CreateProjectInputs.js.map +1 -0
- package/build/question/inputs/CreateSampleProjectInputs.d.ts +12 -0
- package/build/question/inputs/CreateSampleProjectInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateSampleProjectInputs.js +5 -0
- package/build/question/inputs/CreateSampleProjectInputs.js.map +1 -0
- package/build/question/inputs/DeployAadManifestInputs.d.ts +14 -0
- package/build/question/inputs/DeployAadManifestInputs.d.ts.map +1 -0
- package/build/question/inputs/DeployAadManifestInputs.js +5 -0
- package/build/question/inputs/DeployAadManifestInputs.js.map +1 -0
- package/build/question/inputs/PermissionGrantInputs.d.ts +18 -0
- package/build/question/inputs/PermissionGrantInputs.d.ts.map +1 -0
- package/build/question/inputs/PermissionGrantInputs.js +5 -0
- package/build/question/inputs/PermissionGrantInputs.js.map +1 -0
- package/build/question/inputs/PermissionListInputs.d.ts +16 -0
- package/build/question/inputs/PermissionListInputs.d.ts.map +1 -0
- package/build/question/inputs/PermissionListInputs.js +5 -0
- package/build/question/inputs/PermissionListInputs.js.map +1 -0
- package/build/question/inputs/PreviewTeamsAppInputs.d.ts +14 -0
- package/build/question/inputs/PreviewTeamsAppInputs.d.ts.map +1 -0
- package/build/question/inputs/PreviewTeamsAppInputs.js +5 -0
- package/build/question/inputs/PreviewTeamsAppInputs.js.map +1 -0
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts +18 -0
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts.map +1 -0
- package/build/question/inputs/SPFxAddWebpartInputs.js +5 -0
- package/build/question/inputs/SPFxAddWebpartInputs.js.map +1 -0
- package/build/question/inputs/SelectTeamsManifestInputs.d.ts +12 -0
- package/build/question/inputs/SelectTeamsManifestInputs.d.ts.map +1 -0
- package/build/question/inputs/SelectTeamsManifestInputs.js +5 -0
- package/build/question/inputs/SelectTeamsManifestInputs.js.map +1 -0
- package/build/question/inputs/ValidateTeamsAppInputs.d.ts +14 -0
- package/build/question/inputs/ValidateTeamsAppInputs.d.ts.map +1 -0
- package/build/question/inputs/ValidateTeamsAppInputs.js +5 -0
- package/build/question/inputs/ValidateTeamsAppInputs.js.map +1 -0
- package/build/question/inputs/index.d.ts +11 -0
- package/build/question/inputs/index.d.ts.map +1 -0
- package/build/question/inputs/index.js +16 -0
- package/build/question/inputs/index.js.map +1 -0
- package/build/question/options/CreateEnvOptions.d.ts +10 -0
- package/build/question/options/CreateEnvOptions.d.ts.map +1 -0
- package/build/question/options/CreateEnvOptions.js +24 -0
- package/build/question/options/CreateEnvOptions.js.map +1 -0
- package/build/question/options/CreateProjectOptions.d.ts +10 -0
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -0
- package/build/question/options/CreateProjectOptions.js +139 -0
- package/build/question/options/CreateProjectOptions.js.map +1 -0
- package/build/question/options/CreateSampleProjectOptions.d.ts +10 -0
- package/build/question/options/CreateSampleProjectOptions.d.ts.map +1 -0
- package/build/question/options/CreateSampleProjectOptions.js +52 -0
- package/build/question/options/CreateSampleProjectOptions.js.map +1 -0
- package/build/question/options/DeployAadManifestOptions.d.ts +10 -0
- package/build/question/options/DeployAadManifestOptions.d.ts.map +1 -0
- package/build/question/options/DeployAadManifestOptions.js +21 -0
- package/build/question/options/DeployAadManifestOptions.js.map +1 -0
- package/build/question/options/PermissionGrantOptions.d.ts +10 -0
- package/build/question/options/PermissionGrantOptions.d.ts.map +1 -0
- package/build/question/options/PermissionGrantOptions.js +33 -0
- package/build/question/options/PermissionGrantOptions.js.map +1 -0
- package/build/question/options/PermissionListOptions.d.ts +10 -0
- package/build/question/options/PermissionListOptions.d.ts.map +1 -0
- package/build/question/options/PermissionListOptions.js +28 -0
- package/build/question/options/PermissionListOptions.js.map +1 -0
- package/build/question/options/PreviewTeamsAppOptions.d.ts +10 -0
- package/build/question/options/PreviewTeamsAppOptions.d.ts.map +1 -0
- package/build/question/options/PreviewTeamsAppOptions.js +26 -0
- package/build/question/options/PreviewTeamsAppOptions.js.map +1 -0
- package/build/question/options/SPFxAddWebpartOptions.d.ts +10 -0
- package/build/question/options/SPFxAddWebpartOptions.d.ts.map +1 -0
- package/build/question/options/SPFxAddWebpartOptions.js +38 -0
- package/build/question/options/SPFxAddWebpartOptions.js.map +1 -0
- package/build/question/options/SelectTeamsManifestOptions.d.ts +10 -0
- package/build/question/options/SelectTeamsManifestOptions.d.ts.map +1 -0
- package/build/question/options/SelectTeamsManifestOptions.js +17 -0
- package/build/question/options/SelectTeamsManifestOptions.js.map +1 -0
- package/build/question/options/ValidateTeamsAppOptions.d.ts +10 -0
- package/build/question/options/ValidateTeamsAppOptions.d.ts.map +1 -0
- package/build/question/options/ValidateTeamsAppOptions.js +23 -0
- package/build/question/options/ValidateTeamsAppOptions.js.map +1 -0
- package/build/question/options/index.d.ts +11 -0
- package/build/question/options/index.d.ts.map +1 -0
- package/build/question/options/index.js +16 -0
- package/build/question/options/index.js.map +1 -0
- package/build/question/other.d.ts +13 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +132 -26
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +6 -2
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +10 -3
- package/build/question/questionNames.js.map +1 -1
- package/build/question/util.d.ts +1 -1
- package/build/question/util.d.ts.map +1 -1
- package/build/question/util.js +7 -5
- package/build/question/util.js.map +1 -1
- package/build/ui/validationUtils.d.ts +15 -0
- package/build/ui/validationUtils.d.ts.map +1 -0
- package/build/ui/validationUtils.js +95 -0
- package/build/ui/validationUtils.js.map +1 -0
- package/build/ui/visitor.d.ts +13 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +259 -213
- package/build/ui/visitor.js.map +1 -1
- package/package.json +15 -9
- package/resource/package.nls.cs.json +30 -56
- package/resource/package.nls.de.json +30 -56
- package/resource/package.nls.es.json +30 -56
- package/resource/package.nls.fr.json +30 -56
- package/resource/package.nls.it.json +30 -56
- package/resource/package.nls.ja.json +30 -56
- package/resource/package.nls.json +57 -19
- package/resource/package.nls.ko.json +30 -56
- package/resource/package.nls.pl.json +30 -56
- package/resource/package.nls.pt-BR.json +31 -57
- package/resource/package.nls.ru.json +34 -60
- package/resource/package.nls.tr.json +31 -57
- package/resource/package.nls.zh-Hans.json +31 -57
- package/resource/package.nls.zh-Hant.json +30 -56
- package/resource/package.nls.zh-cn.json +232 -712
- package/resource/package.nls.zh-tw.json +230 -710
- package/resource/yaml-schema/v1.2/yaml.schema.json +1474 -0
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/plugins/resource/aad/auth/V3/Tab/GetUserProfile.razor +1 -2
- package/templates/plugins/resource/aad/auth/bot/README.md +281 -263
- package/templates/plugins/resource/aad/auth/bot/js/sso/handleMessageExtensionQueryWithToken.js +13 -3
- package/templates/plugins/resource/aad/auth/bot/js/sso/profileSsoCommandHandler.js +14 -5
- package/templates/plugins/resource/aad/auth/bot/ts/sso/handleMessageExtensionQueryWithToken.ts +11 -3
- package/templates/plugins/resource/aad/auth/bot/ts/sso/profileSsoCommandHandler.ts +12 -3
- package/templates/plugins/resource/aad/auth/tab/csharp/GetUserProfile.razor +1 -2
- package/build/component/configManager/diagnostic.d.ts +0 -9
- package/build/component/configManager/diagnostic.d.ts.map +0 -1
- package/build/component/configManager/diagnostic.js +0 -47
- package/build/component/configManager/diagnostic.js.map +0 -1
- package/build/component/driver/middleware/updateProgress.d.ts +0 -6
- package/build/component/driver/middleware/updateProgress.d.ts.map +0 -1
- package/build/component/driver/middleware/updateProgress.js +0 -15
- package/build/component/driver/middleware/updateProgress.js.map +0 -1
- package/build/component/generator/officeAddin/question.d.ts +0 -10
- package/build/component/generator/officeAddin/question.d.ts.map +0 -1
- package/build/component/generator/officeAddin/question.js +0 -118
- package/build/component/generator/officeAddin/question.js.map +0 -1
- package/build/core/FxCoreImplementV3.d.ts +0 -43
- package/build/core/FxCoreImplementV3.d.ts.map +0 -1
- package/build/core/FxCoreImplementV3.js +0 -653
- package/build/core/FxCoreImplementV3.js.map +0 -1
- package/templates/plugins/resource/apim/README.md +0 -92
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.generateCardFromResponse = exports.generateAdaptiveCard = void 0;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const util = tslib_1.__importStar(require("util"));
|
|
8
|
+
const utils_1 = require("./utils");
|
|
9
|
+
const interfaces_1 = require("./interfaces");
|
|
10
|
+
const constants_1 = require("./constants");
|
|
11
|
+
const specParserError_1 = require("./specParserError");
|
|
12
|
+
function generateAdaptiveCard(operationItem) {
|
|
13
|
+
try {
|
|
14
|
+
const json = utils_1.getResponseJson(operationItem);
|
|
15
|
+
let cardBody = [];
|
|
16
|
+
if (json.schema) {
|
|
17
|
+
cardBody = generateCardFromResponse(json.schema, "");
|
|
18
|
+
}
|
|
19
|
+
// if no schema, try to use example value
|
|
20
|
+
if (cardBody.length === 0 && (json.examples || json.example)) {
|
|
21
|
+
cardBody = [
|
|
22
|
+
{
|
|
23
|
+
type: constants_1.ConstantString.TextBlockType,
|
|
24
|
+
text: "${jsonStringify($root)}",
|
|
25
|
+
wrap: true,
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
// if no example value, use default success response
|
|
30
|
+
if (cardBody.length === 0) {
|
|
31
|
+
cardBody = [
|
|
32
|
+
{
|
|
33
|
+
type: constants_1.ConstantString.TextBlockType,
|
|
34
|
+
text: "success",
|
|
35
|
+
wrap: true,
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
const fullCard = {
|
|
40
|
+
type: constants_1.ConstantString.AdaptiveCardType,
|
|
41
|
+
$schema: constants_1.ConstantString.AdaptiveCardSchema,
|
|
42
|
+
version: constants_1.ConstantString.AdaptiveCardVersion,
|
|
43
|
+
body: cardBody,
|
|
44
|
+
};
|
|
45
|
+
return fullCard;
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
throw new specParserError_1.SpecParserError(err.toString(), interfaces_1.ErrorType.GenerateAdaptiveCardFailed);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.generateAdaptiveCard = generateAdaptiveCard;
|
|
52
|
+
function generateCardFromResponse(schema, name, parentArrayName = "") {
|
|
53
|
+
if (schema.type === "array") {
|
|
54
|
+
// schema.items can be arbitrary object: schema { type: array, items: {} }
|
|
55
|
+
if (Object.keys(schema.items).length === 0) {
|
|
56
|
+
return [
|
|
57
|
+
{
|
|
58
|
+
type: constants_1.ConstantString.TextBlockType,
|
|
59
|
+
text: name ? `${name}: \${jsonStringify(${name})}` : "result: ${jsonStringify($root)}",
|
|
60
|
+
wrap: true,
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
const obj = generateCardFromResponse(schema.items, "", name);
|
|
65
|
+
const template = {
|
|
66
|
+
type: constants_1.ConstantString.ContainerType,
|
|
67
|
+
$data: name ? `\${${name}}` : "${$root}",
|
|
68
|
+
items: Array(),
|
|
69
|
+
};
|
|
70
|
+
template.items.push(...obj);
|
|
71
|
+
return [template];
|
|
72
|
+
}
|
|
73
|
+
// some schema may not contain type but contain properties
|
|
74
|
+
if (schema.type === "object" || (!schema.type && schema.properties)) {
|
|
75
|
+
const { properties } = schema;
|
|
76
|
+
const result = [];
|
|
77
|
+
for (const property in properties) {
|
|
78
|
+
const obj = generateCardFromResponse(properties[property], name ? `${name}.${property}` : property, parentArrayName);
|
|
79
|
+
result.push(...obj);
|
|
80
|
+
}
|
|
81
|
+
if (schema.additionalProperties) {
|
|
82
|
+
// TODO: better ways to handler warnings.
|
|
83
|
+
console.warn(constants_1.ConstantString.AdditionalPropertiesNotSupported);
|
|
84
|
+
}
|
|
85
|
+
return result;
|
|
86
|
+
}
|
|
87
|
+
if (schema.type === "string" ||
|
|
88
|
+
schema.type === "integer" ||
|
|
89
|
+
schema.type === "boolean" ||
|
|
90
|
+
schema.type === "number") {
|
|
91
|
+
// string in root: "ddd"
|
|
92
|
+
let text = "result: ${$root}";
|
|
93
|
+
if (name) {
|
|
94
|
+
// object { id: "1" }
|
|
95
|
+
text = `${name}: \${${name}}`;
|
|
96
|
+
if (parentArrayName) {
|
|
97
|
+
// object types inside array: { tags: ["id": 1, "name": "name"] }
|
|
98
|
+
text = `${parentArrayName}.${text}`;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else if (parentArrayName) {
|
|
102
|
+
// string array: photoUrls: ["1", "2"]
|
|
103
|
+
text = `${parentArrayName}: ` + "${$data}";
|
|
104
|
+
}
|
|
105
|
+
return [
|
|
106
|
+
{
|
|
107
|
+
type: constants_1.ConstantString.TextBlockType,
|
|
108
|
+
text,
|
|
109
|
+
wrap: true,
|
|
110
|
+
},
|
|
111
|
+
];
|
|
112
|
+
}
|
|
113
|
+
if (schema.oneOf || schema.anyOf || schema.not || schema.allOf) {
|
|
114
|
+
throw new Error(util.format(constants_1.ConstantString.SchemaNotSupported, JSON.stringify(schema)));
|
|
115
|
+
}
|
|
116
|
+
throw new Error(util.format(constants_1.ConstantString.UnknownSchema, JSON.stringify(schema)));
|
|
117
|
+
}
|
|
118
|
+
exports.generateCardFromResponse = generateCardFromResponse;
|
|
119
|
+
//# sourceMappingURL=adaptiveCardGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adaptiveCardGenerator.js","sourceRoot":"","sources":["../../../src/common/spec-parser/adaptiveCardGenerator.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;;AAGb,mDAA6B;AAC7B,mCAA0C;AAC1C,6CAAuF;AACvF,2CAA6C;AAC7C,uDAAoD;AAEpD,SAAgB,oBAAoB,CAAC,aAAwC;IAC3E,IAAI;QACF,MAAM,IAAI,GAAG,uBAAe,CAAC,aAAa,CAAC,CAAC;QAE5C,IAAI,QAAQ,GAA2C,EAAE,CAAC;QAC1D,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,QAAQ,GAAG,wBAAwB,CAAC,IAAI,CAAC,MAAgC,EAAE,EAAE,CAAC,CAAC;SAChF;QAED,yCAAyC;QACzC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE;YAC5D,QAAQ,GAAG;gBACT;oBACE,IAAI,EAAE,0BAAc,CAAC,aAAa;oBAClC,IAAI,EAAE,yBAAyB;oBAC/B,IAAI,EAAE,IAAI;iBACX;aACF,CAAC;SACH;QAED,oDAAoD;QACpD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YACzB,QAAQ,GAAG;gBACT;oBACE,IAAI,EAAE,0BAAc,CAAC,aAAa;oBAClC,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,IAAI;iBACX;aACF,CAAC;SACH;QAED,MAAM,QAAQ,GAAiB;YAC7B,IAAI,EAAE,0BAAc,CAAC,gBAAgB;YACrC,OAAO,EAAE,0BAAc,CAAC,kBAAkB;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AE;QAC9D,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,0BAAc,CAAC,kBAAkB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KACzF;IAED,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,0BAAc,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACrF,CAAC;AAjFD,4DAiFC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class ConstantString {
|
|
2
|
+
static readonly CancelledMessage: string;
|
|
3
|
+
static readonly SpecVersionNotSupported: string;
|
|
4
|
+
static readonly NoServerInformation: string;
|
|
5
|
+
static readonly MultipleServerInformation: string;
|
|
6
|
+
static readonly RemoteRefNotSupported: string;
|
|
7
|
+
static readonly MissingOperationId: string;
|
|
8
|
+
static readonly NoSupportedApi: string;
|
|
9
|
+
static readonly AdditionalPropertiesNotSupported: string;
|
|
10
|
+
static readonly SchemaNotSupported: string;
|
|
11
|
+
static readonly UnknownSchema: string;
|
|
12
|
+
static readonly GetMethod = "get";
|
|
13
|
+
static readonly PostMethod = "post";
|
|
14
|
+
static readonly AdaptiveCardVersion = "1.5";
|
|
15
|
+
static readonly AdaptiveCardSchema = "http://adaptivecards.io/schemas/adaptive-card.json";
|
|
16
|
+
static readonly AdaptiveCardType = "AdaptiveCard";
|
|
17
|
+
static readonly TextBlockType = "TextBlock";
|
|
18
|
+
static readonly ContainerType = "Container";
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/constants.ts"],"names":[],"mappings":"AAMA,qBAAa,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,gBAAgB,SAAsD;IACtF,MAAM,CAAC,QAAQ,CAAC,uBAAuB,SAErC;IACF,MAAM,CAAC,QAAQ,CAAC,mBAAmB,SAAyD;IAC5F,MAAM,CAAC,QAAQ,CAAC,yBAAyB,SAEvC;IACF,MAAM,CAAC,QAAQ,CAAC,qBAAqB,SAA2D;IAEhG,MAAM,CAAC,QAAQ,CAAC,kBAAkB,SAAwD;IAC1F,MAAM,CAAC,QAAQ,CAAC,cAAc,SAAoD;IAClF,MAAM,CAAC,QAAQ,CAAC,gCAAgC,SAE9C;IACF,MAAM,CAAC,QAAQ,CAAC,kBAAkB,SAAwD;IAC1F,MAAM,CAAC,QAAQ,CAAC,aAAa,SAAmD;IAChF,MAAM,CAAC,QAAQ,CAAC,SAAS,SAAS;IAClC,MAAM,CAAC,QAAQ,CAAC,UAAU,UAAU;IACpC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,SAAS;IAC5C,MAAM,CAAC,QAAQ,CAAC,kBAAkB,wDAAwD;IAC1F,MAAM,CAAC,QAAQ,CAAC,gBAAgB,kBAAkB;IAClD,MAAM,CAAC,QAAQ,CAAC,aAAa,eAAe;IAC5C,MAAM,CAAC,QAAQ,CAAC,aAAa,eAAe;CAC7C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ConstantString = void 0;
|
|
6
|
+
const localizeUtils_1 = require("../localizeUtils");
|
|
7
|
+
class ConstantString {
|
|
8
|
+
}
|
|
9
|
+
exports.ConstantString = ConstantString;
|
|
10
|
+
ConstantString.CancelledMessage = localizeUtils_1.getLocalizedString("core.common.CancelledMessage");
|
|
11
|
+
ConstantString.SpecVersionNotSupported = localizeUtils_1.getLocalizedString("core.common.SpecVersionNotSupported");
|
|
12
|
+
ConstantString.NoServerInformation = localizeUtils_1.getLocalizedString("core.common.NoServerInformation");
|
|
13
|
+
ConstantString.MultipleServerInformation = localizeUtils_1.getLocalizedString("core.common.MultipleServerInformation");
|
|
14
|
+
ConstantString.RemoteRefNotSupported = localizeUtils_1.getLocalizedString("core.common.RemoteRefNotSupported");
|
|
15
|
+
ConstantString.MissingOperationId = localizeUtils_1.getLocalizedString("core.common.MissingOperationId");
|
|
16
|
+
ConstantString.NoSupportedApi = localizeUtils_1.getLocalizedString("core.common.NoSupportedApi");
|
|
17
|
+
ConstantString.AdditionalPropertiesNotSupported = localizeUtils_1.getLocalizedString("core.common.AdditionalPropertiesNotSupported");
|
|
18
|
+
ConstantString.SchemaNotSupported = localizeUtils_1.getLocalizedString("core.common.SchemaNotSupported");
|
|
19
|
+
ConstantString.UnknownSchema = localizeUtils_1.getLocalizedString("core.common.UnknownSchema");
|
|
20
|
+
ConstantString.GetMethod = "get";
|
|
21
|
+
ConstantString.PostMethod = "post";
|
|
22
|
+
ConstantString.AdaptiveCardVersion = "1.5";
|
|
23
|
+
ConstantString.AdaptiveCardSchema = "http://adaptivecards.io/schemas/adaptive-card.json";
|
|
24
|
+
ConstantString.AdaptiveCardType = "AdaptiveCard";
|
|
25
|
+
ConstantString.TextBlockType = "TextBlock";
|
|
26
|
+
ConstantString.ContainerType = "Container";
|
|
27
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/common/spec-parser/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAEb,oDAAsD;AAEtD,MAAa,cAAc;;AAA3B,wCAyBC;AAxBiB,+BAAgB,GAAG,kCAAkB,CAAC,8BAA8B,CAAC,CAAC;AACtE,sCAAuB,GAAG,kCAAkB,CAC1D,qCAAqC,CACtC,CAAC;AACc,kCAAmB,GAAG,kCAAkB,CAAC,iCAAiC,CAAC,CAAC;AAC5E,wCAAyB,GAAG,kCAAkB,CAC5D,uCAAuC,CACxC,CAAC;AACc,oCAAqB,GAAG,kCAAkB,CAAC,mCAAmC,CAAC,CAAC;AAEhF,iCAAkB,GAAG,kCAAkB,CAAC,gCAAgC,CAAC,CAAC;AAC1E,6BAAc,GAAG,kCAAkB,CAAC,4BAA4B,CAAC,CAAC;AAClE,+CAAgC,GAAG,kCAAkB,CACnE,8CAA8C,CAC/C,CAAC;AACc,iCAAkB,GAAG,kCAAkB,CAAC,gCAAgC,CAAC,CAAC;AAC1E,4BAAa,GAAG,kCAAkB,CAAC,2BAA2B,CAAC,CAAC;AAChE,wBAAS,GAAG,KAAK,CAAC;AAClB,yBAAU,GAAG,MAAM,CAAC;AACpB,kCAAmB,GAAG,KAAK,CAAC;AAC5B,iCAAkB,GAAG,oDAAoD,CAAC;AAC1E,+BAAgB,GAAG,cAAc,CAAC;AAClC,4BAAa,GAAG,WAAW,CAAC;AAC5B,4BAAa,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An interface that represents the result of validating an OpenAPI specification file.
|
|
3
|
+
*/
|
|
4
|
+
export interface ValidateResult {
|
|
5
|
+
/**
|
|
6
|
+
* The validation status of the OpenAPI specification file.
|
|
7
|
+
*/
|
|
8
|
+
status: ValidationStatus;
|
|
9
|
+
/**
|
|
10
|
+
* An array of warning results generated during validation.
|
|
11
|
+
*/
|
|
12
|
+
warnings: WarningResult[];
|
|
13
|
+
/**
|
|
14
|
+
* An array of error results generated during validation.
|
|
15
|
+
*/
|
|
16
|
+
errors: ErrorResult[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* An interface that represents a warning result generated during validation.
|
|
20
|
+
*/
|
|
21
|
+
export interface WarningResult {
|
|
22
|
+
/**
|
|
23
|
+
* The type of warning.
|
|
24
|
+
*/
|
|
25
|
+
type: WarningType;
|
|
26
|
+
/**
|
|
27
|
+
* The content of the warning.
|
|
28
|
+
*/
|
|
29
|
+
content: string;
|
|
30
|
+
/**
|
|
31
|
+
* data of the warning.
|
|
32
|
+
*/
|
|
33
|
+
data?: any;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* An interface that represents an error result generated during validation.
|
|
37
|
+
*/
|
|
38
|
+
export interface ErrorResult {
|
|
39
|
+
/**
|
|
40
|
+
* The type of error.
|
|
41
|
+
*/
|
|
42
|
+
type: ErrorType;
|
|
43
|
+
/**
|
|
44
|
+
* The content of the error.
|
|
45
|
+
*/
|
|
46
|
+
content: string;
|
|
47
|
+
/**
|
|
48
|
+
* data of the error.
|
|
49
|
+
*/
|
|
50
|
+
data?: any;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* An enum that represents the types of errors that can occur during validation.
|
|
54
|
+
*/
|
|
55
|
+
export declare enum ErrorType {
|
|
56
|
+
SpecNotValid = "spec-not-valid",
|
|
57
|
+
VersionNotSupported = "version-not-supported",
|
|
58
|
+
RemoteRefNotSupported = "remote-ref-not-supported",
|
|
59
|
+
NoServerInformation = "no-server-information",
|
|
60
|
+
MultipleServerInformation = "multiple-server-information",
|
|
61
|
+
NoSupportedApi = "no-supported-api",
|
|
62
|
+
ListFailed = "list-failed",
|
|
63
|
+
ListOperationMapFailed = "list-operation-map-failed",
|
|
64
|
+
FilterSpecFailed = "filter-spec-failed",
|
|
65
|
+
UpdateManifestFailed = "update-manifest-failed",
|
|
66
|
+
GenerateAdaptiveCardFailed = "generate-adaptive-card-failed",
|
|
67
|
+
GenerateFailed = "generate-failed",
|
|
68
|
+
ValidateFailed = "validate-failed",
|
|
69
|
+
Cancelled = "cancelled",
|
|
70
|
+
Unknown = "unknown"
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* An enum that represents the types of warnings that can occur during validation.
|
|
74
|
+
*/
|
|
75
|
+
export declare enum WarningType {
|
|
76
|
+
AuthNotSupported = "auth-not-supported",
|
|
77
|
+
MethodNotSupported = "method-not-supported",
|
|
78
|
+
OperationIdMissing = "operationid-missing",
|
|
79
|
+
Unknown = "unknown"
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* An enum that represents the validation status of an OpenAPI specification file.
|
|
83
|
+
*/
|
|
84
|
+
export declare enum ValidationStatus {
|
|
85
|
+
Valid = 0,
|
|
86
|
+
Warning = 1,
|
|
87
|
+
Error = 2
|
|
88
|
+
}
|
|
89
|
+
export interface TextBlockElement {
|
|
90
|
+
type: string;
|
|
91
|
+
text: string;
|
|
92
|
+
wrap: boolean;
|
|
93
|
+
}
|
|
94
|
+
export interface ArrayElement {
|
|
95
|
+
type: string;
|
|
96
|
+
$data: string;
|
|
97
|
+
items: Array<TextBlockElement | ArrayElement>;
|
|
98
|
+
}
|
|
99
|
+
export interface AdaptiveCard {
|
|
100
|
+
type: string;
|
|
101
|
+
$schema: string;
|
|
102
|
+
version: string;
|
|
103
|
+
body: Array<TextBlockElement | ArrayElement>;
|
|
104
|
+
}
|
|
105
|
+
export interface PartialManifest {
|
|
106
|
+
description: Description;
|
|
107
|
+
composeExtensions: ComposeExtension[];
|
|
108
|
+
}
|
|
109
|
+
export interface Description {
|
|
110
|
+
short: string;
|
|
111
|
+
full: string;
|
|
112
|
+
}
|
|
113
|
+
export interface ComposeExtension {
|
|
114
|
+
type: string;
|
|
115
|
+
apiSpecFile: string;
|
|
116
|
+
supportsConversationalAI: boolean;
|
|
117
|
+
commands: Command[];
|
|
118
|
+
}
|
|
119
|
+
export interface Command {
|
|
120
|
+
id: string;
|
|
121
|
+
type: string;
|
|
122
|
+
context: string[];
|
|
123
|
+
title: string;
|
|
124
|
+
description?: string;
|
|
125
|
+
parameters: Parameter[];
|
|
126
|
+
apiResponseRenderingTemplate?: string;
|
|
127
|
+
}
|
|
128
|
+
export interface Parameter {
|
|
129
|
+
name: string;
|
|
130
|
+
title: string;
|
|
131
|
+
description: string;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/interfaces.ts"],"names":[],"mappings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CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,gBAAgB,GAAG,YAAY,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC,gBAAgB,GAAG,YAAY,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB,EAAE,OAAO,CAAC;IAClC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,4BAA4B,CAAC,EAAE,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ValidationStatus = exports.WarningType = exports.ErrorType = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* An enum that represents the types of errors that can occur during validation.
|
|
8
|
+
*/
|
|
9
|
+
var ErrorType;
|
|
10
|
+
(function (ErrorType) {
|
|
11
|
+
ErrorType["SpecNotValid"] = "spec-not-valid";
|
|
12
|
+
ErrorType["VersionNotSupported"] = "version-not-supported";
|
|
13
|
+
ErrorType["RemoteRefNotSupported"] = "remote-ref-not-supported";
|
|
14
|
+
ErrorType["NoServerInformation"] = "no-server-information";
|
|
15
|
+
ErrorType["MultipleServerInformation"] = "multiple-server-information";
|
|
16
|
+
ErrorType["NoSupportedApi"] = "no-supported-api";
|
|
17
|
+
ErrorType["ListFailed"] = "list-failed";
|
|
18
|
+
ErrorType["ListOperationMapFailed"] = "list-operation-map-failed";
|
|
19
|
+
ErrorType["FilterSpecFailed"] = "filter-spec-failed";
|
|
20
|
+
ErrorType["UpdateManifestFailed"] = "update-manifest-failed";
|
|
21
|
+
ErrorType["GenerateAdaptiveCardFailed"] = "generate-adaptive-card-failed";
|
|
22
|
+
ErrorType["GenerateFailed"] = "generate-failed";
|
|
23
|
+
ErrorType["ValidateFailed"] = "validate-failed";
|
|
24
|
+
ErrorType["Cancelled"] = "cancelled";
|
|
25
|
+
ErrorType["Unknown"] = "unknown";
|
|
26
|
+
})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));
|
|
27
|
+
/**
|
|
28
|
+
* An enum that represents the types of warnings that can occur during validation.
|
|
29
|
+
*/
|
|
30
|
+
var WarningType;
|
|
31
|
+
(function (WarningType) {
|
|
32
|
+
WarningType["AuthNotSupported"] = "auth-not-supported";
|
|
33
|
+
WarningType["MethodNotSupported"] = "method-not-supported";
|
|
34
|
+
WarningType["OperationIdMissing"] = "operationid-missing";
|
|
35
|
+
WarningType["Unknown"] = "unknown";
|
|
36
|
+
})(WarningType = exports.WarningType || (exports.WarningType = {}));
|
|
37
|
+
/**
|
|
38
|
+
* An enum that represents the validation status of an OpenAPI specification file.
|
|
39
|
+
*/
|
|
40
|
+
var ValidationStatus;
|
|
41
|
+
(function (ValidationStatus) {
|
|
42
|
+
ValidationStatus[ValidationStatus["Valid"] = 0] = "Valid";
|
|
43
|
+
ValidationStatus[ValidationStatus["Warning"] = 1] = "Warning";
|
|
44
|
+
ValidationStatus[ValidationStatus["Error"] = 2] = "Error";
|
|
45
|
+
})(ValidationStatus = exports.ValidationStatus || (exports.ValidationStatus = {}));
|
|
46
|
+
//# sourceMappingURL=interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/common/spec-parser/interfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AA8Db;;GAEG;AACH,IAAY,SAkBX;AAlBD,WAAY,SAAS;IACnB,4CAA+B,CAAA;IAC/B,0DAA6C,CAAA;IAC7C,+DAAkD,CAAA;IAClD,0DAA6C,CAAA;IAC7C,sEAAyD,CAAA;IACzD,gDAAmC,CAAA;IAEnC,uCAA0B,CAAA;IAC1B,iEAAoD,CAAA;IACpD,oDAAuC,CAAA;IACvC,4DAA+C,CAAA;IAC/C,yEAA4D,CAAA;IAC5D,+CAAkC,CAAA;IAClC,+CAAkC,CAAA;IAElC,oCAAuB,CAAA;IACvB,gCAAmB,CAAA;AACrB,CAAC,EAlBW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAkBpB;AAED;;GAEG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,sDAAuC,CAAA;IACvC,0DAA2C,CAAA;IAC3C,yDAA0C,CAAA;IAC1C,kCAAmB,CAAA;AACrB,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED;;GAEG;AACH,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,yDAAK,CAAA;IACL,6DAAO,CAAA;IACP,yDAAK,CAAA;AACP,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OpenAPIV3 } from "openapi-types";
|
|
2
|
+
import { Command, PartialManifest } from "./interfaces";
|
|
3
|
+
export declare function updateManifest(manifestPath: string, outputSpecPath: string, adaptiveCardFolder: string, spec: OpenAPIV3.Document): Promise<PartialManifest>;
|
|
4
|
+
export declare function generateCommands(spec: OpenAPIV3.Document, adaptiveCardFolder: string, manifestPath: string): Command[];
|
|
5
|
+
//# sourceMappingURL=manifestUpdater.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifestUpdater.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/manifestUpdater.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,eAAe,EAA0C,MAAM,cAAc,CAAC;AAMhG,wBAAsB,cAAc,CAClC,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,SAAS,CAAC,QAAQ,GACvB,OAAO,CAAC,eAAe,CAAC,CA2B1B;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,CAAC,QAAQ,EACxB,kBAAkB,EAAE,MAAM,EAC1B,YAAY,EAAE,MAAM,GACnB,OAAO,EAAE,CA+CX"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.generateCommands = exports.updateManifest = void 0;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const interfaces_1 = require("./interfaces");
|
|
8
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
9
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
10
|
+
const utils_1 = require("./utils");
|
|
11
|
+
const specParserError_1 = require("./specParserError");
|
|
12
|
+
async function updateManifest(manifestPath, outputSpecPath, adaptiveCardFolder, spec) {
|
|
13
|
+
var _a;
|
|
14
|
+
try {
|
|
15
|
+
// TODO: manifest interface can be updated when manifest parser library is ready
|
|
16
|
+
const originalManifest = await fs_extra_1.default.readJSON(manifestPath);
|
|
17
|
+
const commands = generateCommands(spec, adaptiveCardFolder, manifestPath);
|
|
18
|
+
const ComposeExtension = {
|
|
19
|
+
type: "apiBased",
|
|
20
|
+
apiSpecFile: utils_1.getRelativePath(manifestPath, outputSpecPath),
|
|
21
|
+
commands: commands,
|
|
22
|
+
supportsConversationalAI: true,
|
|
23
|
+
};
|
|
24
|
+
const updatedPart = {
|
|
25
|
+
description: {
|
|
26
|
+
short: spec.info.title,
|
|
27
|
+
full: (_a = spec.info.description) !== null && _a !== void 0 ? _a : originalManifest.description.full,
|
|
28
|
+
},
|
|
29
|
+
composeExtensions: [ComposeExtension],
|
|
30
|
+
};
|
|
31
|
+
const updatedManifest = Object.assign(Object.assign({}, originalManifest), updatedPart);
|
|
32
|
+
return updatedManifest;
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
throw new specParserError_1.SpecParserError(err.toString(), interfaces_1.ErrorType.UpdateManifestFailed);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.updateManifest = updateManifest;
|
|
39
|
+
function generateCommands(spec, adaptiveCardFolder, manifestPath) {
|
|
40
|
+
var _a;
|
|
41
|
+
const paths = spec.paths;
|
|
42
|
+
const commands = [];
|
|
43
|
+
if (paths) {
|
|
44
|
+
for (const pathUrl in paths) {
|
|
45
|
+
const pathItem = paths[pathUrl];
|
|
46
|
+
if (pathItem) {
|
|
47
|
+
const operations = pathItem;
|
|
48
|
+
// Currently only support GET method
|
|
49
|
+
const operationItem = operations.get;
|
|
50
|
+
if (operationItem) {
|
|
51
|
+
const parameters = [];
|
|
52
|
+
const paramObject = operationItem.parameters;
|
|
53
|
+
if (paramObject) {
|
|
54
|
+
paramObject.forEach((param) => {
|
|
55
|
+
var _a;
|
|
56
|
+
param = param;
|
|
57
|
+
parameters.push({
|
|
58
|
+
name: param.name,
|
|
59
|
+
title: utils_1.updateFirstLetter(param.name),
|
|
60
|
+
description: (_a = param.description) !== null && _a !== void 0 ? _a : "",
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const adaptiveCardPath = path_1.default.join(adaptiveCardFolder, operationItem.operationId + ".json");
|
|
65
|
+
const command = {
|
|
66
|
+
context: ["compose"],
|
|
67
|
+
type: "query",
|
|
68
|
+
title: (_a = operationItem.summary) !== null && _a !== void 0 ? _a : "",
|
|
69
|
+
id: operationItem.operationId,
|
|
70
|
+
parameters: parameters,
|
|
71
|
+
apiResponseRenderingTemplate: utils_1.getRelativePath(manifestPath, adaptiveCardPath),
|
|
72
|
+
};
|
|
73
|
+
commands.push(command);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return commands;
|
|
79
|
+
}
|
|
80
|
+
exports.generateCommands = generateCommands;
|
|
81
|
+
//# sourceMappingURL=manifestUpdater.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifestUpdater.js","sourceRoot":"","sources":["../../../src/common/spec-parser/manifestUpdater.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;;AAGb,6CAAgG;AAChG,gEAA0B;AAC1B,wDAAwB;AACxB,mCAA6D;AAC7D,uDAAoD;AAE7C,KAAK,UAAU,cAAc,CAClC,YAAoB,EACpB,cAAsB,EACtB,kBAA0B,EAC1B,IAAwB;;IAExB,IAAI;QACF,gFAAgF;QAChF,MAAM,gBAAgB,GAAoB,MAAM,kBAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAE1E,MAAM,QAAQ,G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UAAU,CAAC;oBAE7C,IAAI,WAAW,EAAE;wBACf,WAAW,CAAC,OAAO,CAAC,CAAC,KAA4D,EAAE,EAAE;;4BACnF,KAAK,GAAG,KAAkC,CAAC;4BAC3C,UAAU,CAAC,IAAI,CAAC;gCACd,IAAI,EAAE,KAAK,CAAC,IAAI;gCAChB,KAAK,EAAE,yBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC;gCACpC,WAAW,EAAE,MAAA,KAAK,CAAC,WAAW,mCAAI,EAAE;6BACrC,CAAC,CAAC;wBACL,CAAC,CAAC,CAAC;qBACJ;oBAED,MAAM,gBAAgB,GAAG,cAAI,CAAC,IAAI,CAChC,kBAAkB,EAClB,aAAa,CAAC,WAAY,GAAG,OAAO,CACrC,CAAC;oBAEF,MAAM,OAAO,GAAY;wBACvB,OAAO,EAAE,CAAC,SAAS,CAAC;wBACpB,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,MAAA,aAAa,CAAC,OAAO,mCAAI,EAAE;wBAClC,EAAE,EAAE,aAAa,CAAC,WAAY;wBAC9B,UAAU,EAAE,UAAU;wBACtB,4BAA4B,EAAE,uBAAe,CAAC,YAAY,EAAE,gBAAgB,CAAC;qBAC9E,CAAC;oBACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;iBACxB;aACF;SACF;KACF;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAnDD,4CAmDC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specFilter.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/specFilter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAO1C,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EAAE,EAChB,aAAa,EAAE,SAAS,CAAC,QAAQ,GAChC,SAAS,CAAC,QAAQ,CAkCpB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.specFilter = void 0;
|
|
6
|
+
const utils_1 = require("./utils");
|
|
7
|
+
const specParserError_1 = require("./specParserError");
|
|
8
|
+
const interfaces_1 = require("./interfaces");
|
|
9
|
+
const allMethodNames = ["get", "post", "put", "delete", "patch", "head", "options", "trace"];
|
|
10
|
+
function specFilter(filter, unResolveSpec) {
|
|
11
|
+
try {
|
|
12
|
+
const newSpec = Object.assign({}, unResolveSpec);
|
|
13
|
+
const newPaths = {};
|
|
14
|
+
for (const filterItem of filter) {
|
|
15
|
+
const [method, path] = filterItem.split(" ");
|
|
16
|
+
const methodName = method.toLowerCase();
|
|
17
|
+
if (!utils_1.isSupportedApi(methodName, path, unResolveSpec)) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (!newPaths[path]) {
|
|
21
|
+
newPaths[path] = Object.assign({}, unResolveSpec.paths[path]);
|
|
22
|
+
for (const m of allMethodNames) {
|
|
23
|
+
delete newPaths[path][m];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
newPaths[path][methodName] = unResolveSpec.paths[path][methodName];
|
|
27
|
+
// Add the operationId if missing
|
|
28
|
+
if (!newPaths[path][methodName].operationId) {
|
|
29
|
+
newPaths[path][methodName].operationId = `${methodName}${utils_1.convertPathToCamelCase(path)}`;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
newSpec.paths = newPaths;
|
|
33
|
+
return newSpec;
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
throw new specParserError_1.SpecParserError(err.toString(), interfaces_1.ErrorType.FilterSpecFailed);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.specFilter = specFilter;
|
|
40
|
+
//# sourceMappingURL=specFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specFilter.js","sourceRoot":"","sources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G,UAAU,GAAG,8BAAsB,CACtF,IAAI,CACL,EAAE,CAAC;aACL;SACF;QAED,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC;QACzB,OAAO,OAAO,CAAC;KAChB;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,IAAI,iCAAe,CAAE,GAAa,CAAC,QAAQ,EAAE,EAAE,sBAAS,CAAC,gBAAgB,CAAC,CAAC;KAClF;AACH,CAAC;AArCD,gCAqCC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import SwaggerParser from "@apidevtools/swagger-parser";
|
|
2
|
+
import { ValidateResult } from "./interfaces";
|
|
3
|
+
/**
|
|
4
|
+
* A class that parses an OpenAPI specification file and provides methods to validate, list, and generate artifacts.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SpecParser {
|
|
7
|
+
readonly specPath: string;
|
|
8
|
+
readonly parser: SwaggerParser;
|
|
9
|
+
private apiMap;
|
|
10
|
+
private spec;
|
|
11
|
+
private unResolveSpec;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new instance of the SpecParser class.
|
|
14
|
+
* @param path The URL or file path of the OpenAPI specification file. The OpenAPI specification file must have a version of 3.0 or higher.
|
|
15
|
+
*/
|
|
16
|
+
constructor(path: string);
|
|
17
|
+
/**
|
|
18
|
+
* Validates the OpenAPI specification file and returns a validation result.
|
|
19
|
+
*
|
|
20
|
+
* @returns A validation result object that contains information about any errors or warnings in the specification file.
|
|
21
|
+
*/
|
|
22
|
+
validate(): Promise<ValidateResult>;
|
|
23
|
+
/**
|
|
24
|
+
* Lists all the OpenAPI operations in the specification file.
|
|
25
|
+
* @returns A string array that represents the HTTP method and path of each operation, such as ['GET /pets/{petId}', 'GET /user/{userId}']
|
|
26
|
+
* according to copilot plugin spec, only list get and post method without auth
|
|
27
|
+
*/
|
|
28
|
+
list(): Promise<string[]>;
|
|
29
|
+
/**
|
|
30
|
+
* List all the OpenAPI operations in the specification file and return a map of operationId and operation path.
|
|
31
|
+
* @returns A map of operationId and operation path, such as [{'getPetById': 'GET /pets/{petId}'}, {'getUser': 'GET /user/{userId}'}]
|
|
32
|
+
*/
|
|
33
|
+
listOperationMap(): Promise<Map<string, string>>;
|
|
34
|
+
/**
|
|
35
|
+
* Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
|
|
36
|
+
* @param manifestPath A file path of the Teams app manifest file to update.
|
|
37
|
+
* @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
|
|
38
|
+
* @param outputSpecPath File path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
|
|
39
|
+
* @param adaptiveCardFolder Folder path where the Adaptive Card files will be generated. If not specified or empty, Adaptive Card files will not be generated.
|
|
40
|
+
*/
|
|
41
|
+
generate(manifestPath: string, filter: string[], outputSpecPath: string, adaptiveCardFolder: string, signal?: AbortSignal): Promise<void>;
|
|
42
|
+
private loadSpec;
|
|
43
|
+
private getAllSupportedApi;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=specParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specParser.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/specParser.ts"],"names":[],"mappings":"AAKA,OAAO,aAAa,MAAM,6BAA6B,CAAC;AAGxD,OAAO,EAIL,cAAc,EAIf,MAAM,cAAc,CAAC;AAUtB;;GAEG;AACH,qBAAa,UAAU;IACrB,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,MAAM,EAAE,aAAa,CAAC;IAEtC,OAAO,CAAC,MAAM,CAA0D;IACxE,OAAO,CAAC,IAAI,CAAiC;IAC7C,OAAO,CAAC,aAAa,CAAiC;IAEtD;;;OAGG;gBACS,IAAI,EAAE,MAAM;IAKxB;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC;IAuGzC;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAU/B;;;OAGG;IACG,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAqBtD;;;;;;OAMG;IACG,QAAQ,CACZ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EAAE,EAChB,cAAc,EAAE,MAAM,EACtB,kBAAkB,EAAE,MAAM,EAC1B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC;YAqDF,QAAQ;IAQtB,OAAO,CAAC,kBAAkB;CAqB3B"}
|