@microsoft/teamsfx-core 2.0.6-alpha.ae74bd5cd.0 → 2.0.6-alpha.b2e46f3b2.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/constants.d.ts +3 -2
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +3 -2
- package/build/common/constants.js.map +1 -1
- package/build/common/deps-checker/checkerFactory.d.ts.map +1 -1
- package/build/common/deps-checker/checkerFactory.js +3 -0
- package/build/common/deps-checker/checkerFactory.js.map +1 -1
- package/build/common/deps-checker/constant/telemetry.d.ts +1 -0
- package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -1
- package/build/common/deps-checker/constant/telemetry.js +1 -0
- package/build/common/deps-checker/constant/telemetry.js.map +1 -1
- package/build/common/deps-checker/coreDepsLoggerAdapter.d.ts +17 -0
- package/build/common/deps-checker/coreDepsLoggerAdapter.d.ts.map +1 -0
- package/build/common/deps-checker/coreDepsLoggerAdapter.js +47 -0
- package/build/common/deps-checker/coreDepsLoggerAdapter.js.map +1 -0
- package/build/common/deps-checker/coreDepsTelemetryAdapter.d.ts +16 -0
- package/build/common/deps-checker/coreDepsTelemetryAdapter.d.ts.map +1 -0
- package/build/common/deps-checker/coreDepsTelemetryAdapter.js +53 -0
- package/build/common/deps-checker/coreDepsTelemetryAdapter.js.map +1 -0
- package/build/common/deps-checker/depsChecker.d.ts +6 -1
- package/build/common/deps-checker/depsChecker.d.ts.map +1 -1
- package/build/common/deps-checker/depsChecker.js +6 -1
- package/build/common/deps-checker/depsChecker.js.map +1 -1
- package/build/common/deps-checker/index.d.ts +2 -0
- package/build/common/deps-checker/index.d.ts.map +1 -1
- package/build/common/deps-checker/index.js +2 -0
- package/build/common/deps-checker/index.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/testToolChecker.d.ts +14 -3
- package/build/common/deps-checker/internal/testToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/testToolChecker.js +178 -70
- package/build/common/deps-checker/internal/testToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/vxTestAppChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/vxTestAppChecker.js +3 -45
- package/build/common/deps-checker/internal/vxTestAppChecker.js.map +1 -1
- package/build/common/deps-checker/util/downloadHelper.d.ts +15 -0
- package/build/common/deps-checker/util/downloadHelper.d.ts.map +1 -0
- package/build/common/deps-checker/util/downloadHelper.js +59 -0
- package/build/common/deps-checker/util/downloadHelper.js.map +1 -0
- package/build/common/featureFlags.d.ts +3 -3
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +11 -12
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/local/constants.d.ts +1 -0
- package/build/common/local/constants.d.ts.map +1 -1
- package/build/common/local/constants.js +1 -0
- package/build/common/local/constants.js.map +1 -1
- package/build/common/local/localCertificateManager.d.ts +5 -4
- package/build/common/local/localCertificateManager.d.ts.map +1 -1
- package/build/common/local/localCertificateManager.js +9 -2
- package/build/common/local/localCertificateManager.js.map +1 -1
- package/build/common/local/packageJsonHelper.d.ts +0 -1
- package/build/common/local/packageJsonHelper.d.ts.map +1 -1
- package/build/common/local/packageJsonHelper.js +1 -29
- package/build/common/local/packageJsonHelper.js.map +1 -1
- package/build/common/m365/packageService.d.ts +1 -0
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +85 -7
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/projectTypeChecker.d.ts +38 -0
- package/build/common/projectTypeChecker.d.ts.map +1 -0
- package/build/common/projectTypeChecker.js +217 -0
- package/build/common/projectTypeChecker.js.map +1 -0
- package/build/common/samples.d.ts +13 -7
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +83 -49
- package/build/common/samples.js.map +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.js +2 -4
- package/build/common/spec-parser/adaptiveCardGenerator.js.map +1 -1
- package/build/common/spec-parser/constants.d.ts +22 -13
- package/build/common/spec-parser/constants.d.ts.map +1 -1
- package/build/common/spec-parser/constants.js +22 -14
- package/build/common/spec-parser/constants.js.map +1 -1
- package/build/common/spec-parser/index.browser.d.ts +6 -0
- package/build/common/spec-parser/index.browser.d.ts.map +1 -0
- package/build/common/spec-parser/index.browser.js +16 -0
- package/build/common/spec-parser/index.browser.js.map +1 -0
- package/build/common/spec-parser/index.d.ts +5 -0
- package/build/common/spec-parser/index.d.ts.map +1 -0
- package/build/common/spec-parser/index.js +16 -0
- package/build/common/spec-parser/index.js.map +1 -0
- package/build/common/spec-parser/interfaces.d.ts +37 -3
- package/build/common/spec-parser/interfaces.d.ts.map +1 -1
- package/build/common/spec-parser/interfaces.js +3 -3
- package/build/common/spec-parser/interfaces.js.map +1 -1
- package/build/common/spec-parser/manifestUpdater.d.ts +4 -4
- package/build/common/spec-parser/manifestUpdater.d.ts.map +1 -1
- package/build/common/spec-parser/manifestUpdater.js +49 -110
- package/build/common/spec-parser/manifestUpdater.js.map +1 -1
- package/build/common/spec-parser/specFilter.d.ts +1 -1
- package/build/common/spec-parser/specFilter.d.ts.map +1 -1
- package/build/common/spec-parser/specFilter.js +2 -2
- package/build/common/spec-parser/specFilter.js.map +1 -1
- package/build/common/spec-parser/specParser.browser.d.ts +46 -0
- package/build/common/spec-parser/specParser.browser.d.ts.map +1 -0
- package/build/common/spec-parser/specParser.browser.js +139 -0
- package/build/common/spec-parser/specParser.browser.js.map +1 -0
- package/build/common/spec-parser/specParser.d.ts +11 -11
- package/build/common/spec-parser/specParser.d.ts.map +1 -1
- package/build/common/spec-parser/specParser.js +100 -113
- package/build/common/spec-parser/specParser.js.map +1 -1
- package/build/common/spec-parser/utils.d.ts +18 -5
- package/build/common/spec-parser/utils.d.ts.map +1 -1
- package/build/common/spec-parser/utils.js +304 -41
- package/build/common/spec-parser/utils.js.map +1 -1
- package/build/common/telemetry.d.ts +23 -2
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +40 -1
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +1 -1
- package/build/common/tools.js.map +1 -1
- package/build/component/configManager/validator.d.ts.map +1 -1
- package/build/component/configManager/validator.js +2 -3
- package/build/component/configManager/validator.js.map +1 -1
- package/build/component/coordinator/index.d.ts +2 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +3 -1
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +32 -0
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/create.js +1 -1
- package/build/component/driver/aad/create.js.map +1 -1
- package/build/component/driver/aad/error/invalidFieldInManifestError.js +1 -1
- package/build/component/driver/aad/error/invalidFieldInManifestError.js.map +1 -1
- package/build/component/driver/aad/permissions/index.d.ts +3 -0
- package/build/component/driver/aad/permissions/index.d.ts.map +1 -1
- package/build/component/driver/aad/permissions/index.js +34 -1
- package/build/component/driver/aad/permissions/index.js.map +1 -1
- package/build/component/driver/aad/permissions/permissions.json +42 -42
- 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 +19 -17
- package/build/component/driver/aad/update.js.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.js +9 -9
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/aad/utility/constants.js +1 -1
- package/build/component/driver/aad/utility/constants.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts +17 -0
- package/build/component/driver/apiKey/create.d.ts.map +1 -0
- package/build/component/driver/apiKey/create.js +228 -0
- package/build/component/driver/apiKey/create.js.map +1 -0
- package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.d.ts +5 -0
- package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.d.ts.map +1 -0
- package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js +22 -0
- package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js.map +1 -0
- package/build/component/driver/apiKey/error/apiKeyDomainInvalid.d.ts +5 -0
- package/build/component/driver/apiKey/error/apiKeyDomainInvalid.d.ts.map +1 -0
- package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js +22 -0
- package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js.map +1 -0
- package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.d.ts +5 -0
- package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.d.ts.map +1 -0
- package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js +21 -0
- package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js.map +1 -0
- package/build/component/driver/apiKey/error/apiKeyNameTooLong.d.ts +5 -0
- package/build/component/driver/apiKey/error/apiKeyNameTooLong.d.ts.map +1 -0
- package/build/component/driver/apiKey/error/apiKeyNameTooLong.js +21 -0
- package/build/component/driver/apiKey/error/apiKeyNameTooLong.js.map +1 -0
- package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts +7 -0
- package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts.map +1 -0
- package/build/component/driver/apiKey/interface/createApiKeyArgs.js +5 -0
- package/build/component/driver/apiKey/interface/createApiKeyArgs.js.map +1 -0
- package/build/component/driver/apiKey/interface/createApiKeyOutputs.d.ts +7 -0
- package/build/component/driver/apiKey/interface/createApiKeyOutputs.d.ts.map +1 -0
- package/build/component/driver/apiKey/interface/createApiKeyOutputs.js +10 -0
- package/build/component/driver/apiKey/interface/createApiKeyOutputs.js.map +1 -0
- package/build/component/driver/apiKey/utility/constants.d.ts +10 -0
- package/build/component/driver/apiKey/utility/constants.d.ts.map +1 -0
- package/build/component/driver/apiKey/utility/constants.js +15 -0
- package/build/component/driver/apiKey/utility/constants.js.map +1 -0
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts +3 -2
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +5 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts +5 -0
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +27 -6
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
- package/build/component/driver/devTool/installDriver.d.ts +2 -1
- package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
- package/build/component/driver/devTool/installDriver.js +5 -2
- package/build/component/driver/devTool/installDriver.js.map +1 -1
- package/build/component/driver/index.d.ts +1 -0
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +1 -0
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts +12 -7
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +52 -23
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +13 -0
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +38 -0
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +2 -0
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +2 -0
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +26 -6
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts +44 -0
- package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.js +21 -0
- package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.d.ts +15 -0
- package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.js +5 -0
- package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts +1 -1
- package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.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 +9 -9
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.d.ts +20 -0
- package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -0
- package/build/component/driver/teamsApp/teamsappMgr.js +278 -0
- package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -0
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +7 -2
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +49 -15
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/generator.js +47 -30
- package/build/component/generator/copilotPlugin/generator.js.map +1 -1
- package/build/component/generator/copilotPlugin/helper.d.ts +4 -2
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/helper.js +105 -20
- package/build/component/generator/copilotPlugin/helper.js.map +1 -1
- package/build/component/generator/error.d.ts +5 -8
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +16 -16
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generator.d.ts +5 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +26 -27
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +6 -1
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +30 -12
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +21 -20
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +7 -0
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +1 -14
- package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/constants.js +1 -14
- package/build/component/generator/spfx/utils/constants.js.map +1 -1
- package/build/component/generator/utils.d.ts +7 -5
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +35 -16
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/middleware/questionMW.d.ts +1 -1
- package/build/component/middleware/questionMW.d.ts.map +1 -1
- package/build/component/middleware/questionMW.js +4 -1
- package/build/component/middleware/questionMW.js.map +1 -1
- package/build/component/utils/ResourceGroupHelper.d.ts +1 -0
- package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/component/utils/ResourceGroupHelper.js +31 -1
- package/build/component/utils/ResourceGroupHelper.js.map +1 -1
- package/build/component/utils/common.d.ts +3 -1
- package/build/component/utils/common.d.ts.map +1 -1
- package/build/component/utils/common.js +2 -2
- package/build/component/utils/common.js.map +1 -1
- package/build/component/utils/envUtil.d.ts +1 -0
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +6 -1
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/fileOperation.d.ts +1 -1
- package/build/component/utils/fileOperation.d.ts.map +1 -1
- package/build/component/utils/fileOperation.js +34 -48
- package/build/component/utils/fileOperation.js.map +1 -1
- package/build/component/utils/metadataGraphPermssion.d.ts +16 -0
- package/build/component/utils/metadataGraphPermssion.d.ts.map +1 -0
- package/build/component/utils/metadataGraphPermssion.js +96 -0
- package/build/component/utils/metadataGraphPermssion.js.map +1 -0
- package/build/component/utils/metadataUtil.d.ts.map +1 -1
- package/build/component/utils/metadataUtil.js +2 -0
- package/build/component/utils/metadataUtil.js.map +1 -1
- package/build/core/FxCore.d.ts +24 -1
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +189 -25
- package/build/core/FxCore.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +11 -10
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.js +4 -4
- package/build/core/middleware/projectVersionChecker.js.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +1 -1
- package/build/error/common.d.ts +9 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +34 -1
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.d.ts +6 -0
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +25 -1
- package/build/error/deploy.js.map +1 -1
- package/build/error/teamsApp.d.ts +4 -1
- package/build/error/teamsApp.d.ts.map +1 -1
- package/build/error/teamsApp.js +13 -1
- package/build/error/teamsApp.js.map +1 -1
- package/build/index.d.ts +4 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +8 -1
- package/build/index.js.map +1 -1
- package/build/question/create.d.ts +2 -1
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +78 -24
- package/build/question/create.js.map +1 -1
- package/build/question/generator.js +1 -3
- package/build/question/generator.js.map +1 -1
- package/build/question/index.d.ts +1 -0
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +3 -0
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/inputs/DeployAadManifestInputs.d.ts +1 -1
- package/build/question/inputs/DeployAadManifestInputs.d.ts.map +1 -1
- package/build/question/inputs/PermissionGrantInputs.d.ts +2 -2
- package/build/question/inputs/PermissionGrantInputs.d.ts.map +1 -1
- package/build/question/inputs/PermissionListInputs.d.ts +1 -1
- package/build/question/inputs/PermissionListInputs.d.ts.map +1 -1
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts +2 -0
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +2 -1
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/options/CreateSampleProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateSampleProjectOptions.js +5 -1
- package/build/question/options/CreateSampleProjectOptions.js.map +1 -1
- package/build/question/options/DeployAadManifestOptions.js +2 -2
- package/build/question/options/DeployAadManifestOptions.js.map +1 -1
- package/build/question/options/PermissionGrantOptions.js +2 -2
- package/build/question/options/PermissionGrantOptions.js.map +1 -1
- package/build/question/options/PermissionListOptions.js +2 -2
- package/build/question/options/PermissionListOptions.js.map +1 -1
- package/build/question/options/SPFxAddWebpartOptions.d.ts.map +1 -1
- package/build/question/options/SPFxAddWebpartOptions.js +9 -0
- package/build/question/options/SPFxAddWebpartOptions.js.map +1 -1
- package/build/question/other.d.ts +3 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +83 -7
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +2 -0
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +2 -0
- package/build/question/questionNames.js.map +1 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +11 -2
- package/build/ui/visitor.js.map +1 -1
- package/package.json +16 -23
- package/resource/package.nls.json +74 -51
- package/resource/yaml-schema/v1.3/yaml.schema.json +81 -35
- package/templates/core/v3Migration/csharp.app.local.yml +6 -6
- package/templates/core/v3Migration/csharp.app.yml +6 -6
- package/templates/core/v3Migration/js.ts.app.local.yml +11 -11
- package/templates/core/v3Migration/js.ts.app.yml +12 -12
- 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/Bot/Pages/BotAuthorizeEndPage.cshtml +55 -51
- package/templates/plugins/resource/aad/auth/V3/Enable SSO.txt +2 -2
- package/templates/plugins/resource/aad/auth/bot/README.md +13 -13
- package/templates/plugins/resource/aad/auth/bot/README.txt +7 -7
- package/templates/plugins/resource/aad/auth/bot/csharp/Pages/BotAuthorizeEndPage.cshtml +55 -51
- package/templates/plugins/resource/aad/auth/bot/js/public/auth-end.html +6 -2
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +5 -1
- package/templates/plugins/resource/aad/auth/tab/README.md +6 -6
- package/templates/plugins/resource/aad/auth/tab/README.txt +5 -5
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-end.html +16 -9
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-start.html +11 -7
- package/templates/plugins/resource/aad/auth/tab/js/sso/GetUserProfile.jsx +1 -1
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-end.html +16 -9
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-start.html +11 -7
- package/templates/plugins/resource/aad/auth/tab/ts/sso/GetUserProfile.tsx +1 -1
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
export declare class ConstantString {
|
|
2
|
-
static readonly CancelledMessage
|
|
3
|
-
static readonly NoServerInformation
|
|
4
|
-
static readonly RemoteRefNotSupported:
|
|
5
|
-
static readonly MissingOperationId:
|
|
6
|
-
static readonly NoSupportedApi:
|
|
7
|
-
static readonly AdditionalPropertiesNotSupported
|
|
8
|
-
static readonly SchemaNotSupported:
|
|
9
|
-
static readonly UnknownSchema:
|
|
10
|
-
static readonly UrlProtocolNotSupported:
|
|
11
|
-
static readonly RelativeServerUrlNotSupported:
|
|
12
|
-
static readonly ResolveServerUrlFailed:
|
|
13
|
-
static readonly OperationOnlyContainsOptionalParam
|
|
14
|
-
static readonly ConvertSwaggerToOpenAPI
|
|
2
|
+
static readonly CancelledMessage = "Operation is cancelled.";
|
|
3
|
+
static readonly NoServerInformation = "No server information is found in the OpenAPI description document.";
|
|
4
|
+
static readonly RemoteRefNotSupported = "Remote reference is not supported: %s.";
|
|
5
|
+
static readonly MissingOperationId = "Missing operationIds: %s.";
|
|
6
|
+
static readonly NoSupportedApi = "No supported API is found in the OpenAPI description document: only GET and POST methods are supported, additionally, there can be at most one required parameter, and no auth is allowed.";
|
|
7
|
+
static readonly AdditionalPropertiesNotSupported = "'additionalProperties' is not supported, and will be ignored.";
|
|
8
|
+
static readonly SchemaNotSupported = "'oneOf', 'anyOf', and 'not' schema are not supported: %s.";
|
|
9
|
+
static readonly UnknownSchema = "Unknown schema: %s.";
|
|
10
|
+
static readonly UrlProtocolNotSupported = "Server url is not correct: protocol %s is not supported, you should use https protocol instead.";
|
|
11
|
+
static readonly RelativeServerUrlNotSupported = "Server url is not correct: relative server url is not supported.";
|
|
12
|
+
static readonly ResolveServerUrlFailed = "Unable to resolve the server URL: please make sure that the environment variable %s is defined.";
|
|
13
|
+
static readonly OperationOnlyContainsOptionalParam = "Operation %s contains multiple optional parameters. The first optional parameter is used for this command.";
|
|
14
|
+
static readonly ConvertSwaggerToOpenAPI = "The Swagger 2.0 file has been converted to OpenAPI 3.0.";
|
|
15
|
+
static readonly SwaggerNotSupported = "Swagger 2.0 is not supported. Please convert to OpenAPI 3.0 manually before proceeding.";
|
|
16
|
+
static readonly MultipleAPIKeyNotSupported = "Multiple API keys are not supported. Please make sure that all selected APIs use the same API key.";
|
|
15
17
|
static readonly WrappedCardVersion = "devPreview";
|
|
16
18
|
static readonly WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
|
|
17
19
|
static readonly WrappedCardResponseLayout = "list";
|
|
@@ -22,11 +24,18 @@ export declare class ConstantString {
|
|
|
22
24
|
static readonly AdaptiveCardType = "AdaptiveCard";
|
|
23
25
|
static readonly TextBlockType = "TextBlock";
|
|
24
26
|
static readonly ContainerType = "Container";
|
|
27
|
+
static readonly RegistrationIdPostfix = "REGISTRATION_ID";
|
|
25
28
|
static readonly ResponseCodeFor20X: string[];
|
|
26
29
|
static readonly AllOperationMethods: string[];
|
|
27
30
|
static readonly WellknownResultNames: string[];
|
|
28
31
|
static readonly WellknownTitleName: string[];
|
|
29
32
|
static readonly WellknownSubtitleName: string[];
|
|
30
33
|
static readonly WellknownImageName: string[];
|
|
34
|
+
static readonly ShortDescriptionMaxLens = 80;
|
|
35
|
+
static readonly FullDescriptionMaxLens = 4000;
|
|
36
|
+
static readonly CommandDescriptionMaxLens = 128;
|
|
37
|
+
static readonly ParameterDescriptionMaxLens = 128;
|
|
38
|
+
static readonly CommandTitleMaxLens = 32;
|
|
39
|
+
static readonly ParameterTitleMaxLens = 32;
|
|
31
40
|
}
|
|
32
41
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":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AAM,CAAC,QAAQ,CAAC,aAAa,eAAe;IAC5C,MAAM,CAAC,QAAQ,CAAC,qBAAqB,qBAAqB;IAC1D,MAAM,CAAC,QAAQ,CAAC,kBAAkB,WAYhC;IACF,MAAM,CAAC,QAAQ,CAAC,mBAAmB,WASjC;IAGF,MAAM,CAAC,QAAQ,CAAC,oBAAoB,WASlC;IACF,MAAM,CAAC,QAAQ,CAAC,kBAAkB,WAA+D;IACjG,MAAM,CAAC,QAAQ,CAAC,qBAAqB,WAOnC;IACF,MAAM,CAAC,QAAQ,CAAC,kBAAkB,WAUhC;IAEF,MAAM,CAAC,QAAQ,CAAC,uBAAuB,MAAM;IAC7C,MAAM,CAAC,QAAQ,CAAC,sBAAsB,QAAQ;IAC9C,MAAM,CAAC,QAAQ,CAAC,yBAAyB,OAAO;IAChD,MAAM,CAAC,QAAQ,CAAC,2BAA2B,OAAO;IAClD,MAAM,CAAC,QAAQ,CAAC,mBAAmB,MAAM;IACzC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,MAAM;CAC5C"}
|
|
@@ -3,23 +3,24 @@
|
|
|
3
3
|
"use strict";
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.ConstantString = void 0;
|
|
6
|
-
const localizeUtils_1 = require("../localizeUtils");
|
|
7
6
|
class ConstantString {
|
|
8
7
|
}
|
|
9
8
|
exports.ConstantString = ConstantString;
|
|
10
|
-
ConstantString.CancelledMessage =
|
|
11
|
-
ConstantString.NoServerInformation =
|
|
12
|
-
ConstantString.RemoteRefNotSupported =
|
|
13
|
-
ConstantString.MissingOperationId =
|
|
14
|
-
ConstantString.NoSupportedApi =
|
|
15
|
-
ConstantString.AdditionalPropertiesNotSupported =
|
|
16
|
-
ConstantString.SchemaNotSupported =
|
|
17
|
-
ConstantString.UnknownSchema =
|
|
18
|
-
ConstantString.UrlProtocolNotSupported =
|
|
19
|
-
ConstantString.RelativeServerUrlNotSupported =
|
|
20
|
-
ConstantString.ResolveServerUrlFailed =
|
|
21
|
-
ConstantString.OperationOnlyContainsOptionalParam =
|
|
22
|
-
ConstantString.ConvertSwaggerToOpenAPI =
|
|
9
|
+
ConstantString.CancelledMessage = "Operation is cancelled.";
|
|
10
|
+
ConstantString.NoServerInformation = "No server information is found in the OpenAPI description document.";
|
|
11
|
+
ConstantString.RemoteRefNotSupported = "Remote reference is not supported: %s.";
|
|
12
|
+
ConstantString.MissingOperationId = "Missing operationIds: %s.";
|
|
13
|
+
ConstantString.NoSupportedApi = "No supported API is found in the OpenAPI description document: only GET and POST methods are supported, additionally, there can be at most one required parameter, and no auth is allowed.";
|
|
14
|
+
ConstantString.AdditionalPropertiesNotSupported = "'additionalProperties' is not supported, and will be ignored.";
|
|
15
|
+
ConstantString.SchemaNotSupported = "'oneOf', 'anyOf', and 'not' schema are not supported: %s.";
|
|
16
|
+
ConstantString.UnknownSchema = "Unknown schema: %s.";
|
|
17
|
+
ConstantString.UrlProtocolNotSupported = "Server url is not correct: protocol %s is not supported, you should use https protocol instead.";
|
|
18
|
+
ConstantString.RelativeServerUrlNotSupported = "Server url is not correct: relative server url is not supported.";
|
|
19
|
+
ConstantString.ResolveServerUrlFailed = "Unable to resolve the server URL: please make sure that the environment variable %s is defined.";
|
|
20
|
+
ConstantString.OperationOnlyContainsOptionalParam = "Operation %s contains multiple optional parameters. The first optional parameter is used for this command.";
|
|
21
|
+
ConstantString.ConvertSwaggerToOpenAPI = "The Swagger 2.0 file has been converted to OpenAPI 3.0.";
|
|
22
|
+
ConstantString.SwaggerNotSupported = "Swagger 2.0 is not supported. Please convert to OpenAPI 3.0 manually before proceeding.";
|
|
23
|
+
ConstantString.MultipleAPIKeyNotSupported = "Multiple API keys are not supported. Please make sure that all selected APIs use the same API key.";
|
|
23
24
|
ConstantString.WrappedCardVersion = "devPreview";
|
|
24
25
|
ConstantString.WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
|
|
25
26
|
ConstantString.WrappedCardResponseLayout = "list";
|
|
@@ -30,6 +31,7 @@ ConstantString.AdaptiveCardSchema = "http://adaptivecards.io/schemas/adaptive-ca
|
|
|
30
31
|
ConstantString.AdaptiveCardType = "AdaptiveCard";
|
|
31
32
|
ConstantString.TextBlockType = "TextBlock";
|
|
32
33
|
ConstantString.ContainerType = "Container";
|
|
34
|
+
ConstantString.RegistrationIdPostfix = "REGISTRATION_ID";
|
|
33
35
|
ConstantString.ResponseCodeFor20X = [
|
|
34
36
|
"200",
|
|
35
37
|
"201",
|
|
@@ -84,4 +86,10 @@ ConstantString.WellknownImageName = [
|
|
|
84
86
|
"thumbnail",
|
|
85
87
|
"img",
|
|
86
88
|
];
|
|
89
|
+
ConstantString.ShortDescriptionMaxLens = 80;
|
|
90
|
+
ConstantString.FullDescriptionMaxLens = 4000;
|
|
91
|
+
ConstantString.CommandDescriptionMaxLens = 128;
|
|
92
|
+
ConstantString.ParameterDescriptionMaxLens = 128;
|
|
93
|
+
ConstantString.CommandTitleMaxLens = 32;
|
|
94
|
+
ConstantString.ParameterTitleMaxLens = 32;
|
|
87
95
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/common/spec-parser/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAEb,MAAa,cAAc;;AAA3B,wCA0GC;AAzGiB,+BAAgB,GAAG,yBAAyB,CAAC;AAC7C,kCAAmB,GACjC,qEAAqE,CAAC;AACxD,oCAAqB,GAAG,wCAAwC,CAAC;AACjE,iCAAkB,GAAG,2BAA2B,CAAC;AACjD,6BAAc,GAC5B,4LAA4L,CAAC;AAE/K,+CA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CAAqB,GAAG;IACtC,UAAU;IACV,IAAI;IACJ,KAAK;IACL,aAAa;IACb,MAAM;IACN,QAAQ;CACT,CAAC;AACc,iCAAkB,GAAG;IACnC,OAAO;IACP,MAAM;IACN,QAAQ;IACR,SAAS;IACT,OAAO;IACP,MAAM;IACN,KAAK;IACL,WAAW;IACX,KAAK;CACN,CAAC;AAEc,sCAAuB,GAAG,EAAE,CAAC;AAC7B,qCAAsB,GAAG,IAAI,CAAC;AAC9B,wCAAyB,GAAG,GAAG,CAAC;AAChC,0CAA2B,GAAG,GAAG,CAAC;AAClC,kCAAmB,GAAG,EAAE,CAAC;AACzB,oCAAqB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { SpecParser } from "./specParser.browser";
|
|
2
|
+
export { SpecParserError } from "./specParserError";
|
|
3
|
+
export { ValidationStatus, WarningType, ErrorType, ListAPIResult } from "./interfaces";
|
|
4
|
+
export type { ErrorResult, APIInfo, ValidateResult, WarningResult } from "./interfaces";
|
|
5
|
+
export { ConstantString } from "./constants";
|
|
6
|
+
//# sourceMappingURL=index.browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/index.browser.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACvF,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ConstantString = exports.ErrorType = exports.WarningType = exports.ValidationStatus = exports.SpecParserError = exports.SpecParser = void 0;
|
|
6
|
+
var specParser_browser_1 = require("./specParser.browser");
|
|
7
|
+
Object.defineProperty(exports, "SpecParser", { enumerable: true, get: function () { return specParser_browser_1.SpecParser; } });
|
|
8
|
+
var specParserError_1 = require("./specParserError");
|
|
9
|
+
Object.defineProperty(exports, "SpecParserError", { enumerable: true, get: function () { return specParserError_1.SpecParserError; } });
|
|
10
|
+
var interfaces_1 = require("./interfaces");
|
|
11
|
+
Object.defineProperty(exports, "ValidationStatus", { enumerable: true, get: function () { return interfaces_1.ValidationStatus; } });
|
|
12
|
+
Object.defineProperty(exports, "WarningType", { enumerable: true, get: function () { return interfaces_1.WarningType; } });
|
|
13
|
+
Object.defineProperty(exports, "ErrorType", { enumerable: true, get: function () { return interfaces_1.ErrorType; } });
|
|
14
|
+
var constants_1 = require("./constants");
|
|
15
|
+
Object.defineProperty(exports, "ConstantString", { enumerable: true, get: function () { return constants_1.ConstantString; } });
|
|
16
|
+
//# sourceMappingURL=index.browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../../../src/common/spec-parser/index.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAEb,2DAAkD;AAAzC,gHAAA,UAAU,OAAA;AACnB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,2CAAuF;AAA9E,8GAAA,gBAAgB,OAAA;AAAE,yGAAA,WAAW,OAAA;AAAE,uGAAA,SAAS,OAAA;AAEjD,yCAA6C;AAApC,2GAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { SpecParser } from "./specParser";
|
|
2
|
+
export { SpecParserError } from "./specParserError";
|
|
3
|
+
export { ValidationStatus, WarningType, ErrorType, WarningResult, ErrorResult, ListAPIResult, } from "./interfaces";
|
|
4
|
+
export { ConstantString } from "./constants";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ConstantString = exports.ErrorType = exports.WarningType = exports.ValidationStatus = exports.SpecParserError = exports.SpecParser = void 0;
|
|
6
|
+
var specParser_1 = require("./specParser");
|
|
7
|
+
Object.defineProperty(exports, "SpecParser", { enumerable: true, get: function () { return specParser_1.SpecParser; } });
|
|
8
|
+
var specParserError_1 = require("./specParserError");
|
|
9
|
+
Object.defineProperty(exports, "SpecParserError", { enumerable: true, get: function () { return specParserError_1.SpecParserError; } });
|
|
10
|
+
var interfaces_1 = require("./interfaces");
|
|
11
|
+
Object.defineProperty(exports, "ValidationStatus", { enumerable: true, get: function () { return interfaces_1.ValidationStatus; } });
|
|
12
|
+
Object.defineProperty(exports, "WarningType", { enumerable: true, get: function () { return interfaces_1.WarningType; } });
|
|
13
|
+
Object.defineProperty(exports, "ErrorType", { enumerable: true, get: function () { return interfaces_1.ErrorType; } });
|
|
14
|
+
var constants_1 = require("./constants");
|
|
15
|
+
Object.defineProperty(exports, "ConstantString", { enumerable: true, get: function () { return constants_1.ConstantString; } });
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/spec-parser/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAEb,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,2CAOsB;AANpB,8GAAA,gBAAgB,OAAA;AAChB,yGAAA,WAAW,OAAA;AACX,uGAAA,SAAS,OAAA;AAKX,yCAA6C;AAApC,2GAAA,cAAc,OAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OpenAPIV3 } from "openapi-types";
|
|
1
2
|
/**
|
|
2
3
|
* An interface that represents the result of validating an OpenAPI specification file.
|
|
3
4
|
*/
|
|
@@ -65,8 +66,10 @@ export declare enum ErrorType {
|
|
|
65
66
|
NoSupportedApi = "no-supported-api",
|
|
66
67
|
NoExtraAPICanBeAdded = "no-extra-api-can-be-added",
|
|
67
68
|
ResolveServerUrlFailed = "resolve-server-url-failed",
|
|
69
|
+
SwaggerNotSupported = "swagger-not-supported",
|
|
70
|
+
MultipleAPIKeyNotSupported = "multiple-api-key-not-supported",
|
|
68
71
|
ListFailed = "list-failed",
|
|
69
|
-
|
|
72
|
+
listSupportedAPIInfoFailed = "list-supported-api-info-failed",
|
|
70
73
|
FilterSpecFailed = "filter-spec-failed",
|
|
71
74
|
UpdateManifestFailed = "update-manifest-failed",
|
|
72
75
|
GenerateAdaptiveCardFailed = "generate-adaptive-card-failed",
|
|
@@ -79,8 +82,6 @@ export declare enum ErrorType {
|
|
|
79
82
|
* An enum that represents the types of warnings that can occur during validation.
|
|
80
83
|
*/
|
|
81
84
|
export declare enum WarningType {
|
|
82
|
-
AuthNotSupported = "auth-not-supported",
|
|
83
|
-
MethodNotSupported = "method-not-supported",
|
|
84
85
|
OperationIdMissing = "operationid-missing",
|
|
85
86
|
GenerateCardFailed = "generate-card-failed",
|
|
86
87
|
OperationOnlyContainsOptionalParam = "operation-only-contains-optional-param",
|
|
@@ -133,14 +134,47 @@ export interface WrappedAdaptiveCard {
|
|
|
133
134
|
responseCardTemplate: AdaptiveCard;
|
|
134
135
|
previewCardTemplate: PreviewCardTemplate;
|
|
135
136
|
}
|
|
137
|
+
export interface ChoicesItem {
|
|
138
|
+
title: string;
|
|
139
|
+
value: string;
|
|
140
|
+
}
|
|
136
141
|
export interface Parameter {
|
|
137
142
|
name: string;
|
|
138
143
|
title: string;
|
|
139
144
|
description: string;
|
|
145
|
+
inputType?: "text" | "textarea" | "number" | "date" | "time" | "toggle" | "choiceset";
|
|
146
|
+
value?: string;
|
|
147
|
+
choices?: ChoicesItem[];
|
|
140
148
|
}
|
|
141
149
|
export interface CheckParamResult {
|
|
142
150
|
requiredNum: number;
|
|
143
151
|
optionalNum: number;
|
|
144
152
|
isValid: boolean;
|
|
145
153
|
}
|
|
154
|
+
export interface ParseOptions {
|
|
155
|
+
allowMissingId?: boolean;
|
|
156
|
+
allowSwagger?: boolean;
|
|
157
|
+
allowAPIKeyAuth?: boolean;
|
|
158
|
+
allowMultipleParameters?: boolean;
|
|
159
|
+
allowOauth2?: boolean;
|
|
160
|
+
}
|
|
161
|
+
export interface APIInfo {
|
|
162
|
+
method: string;
|
|
163
|
+
path: string;
|
|
164
|
+
title: string;
|
|
165
|
+
id: string;
|
|
166
|
+
parameters: Parameter[];
|
|
167
|
+
description: string;
|
|
168
|
+
warning?: WarningResult;
|
|
169
|
+
}
|
|
170
|
+
export interface ListAPIResult {
|
|
171
|
+
api: string;
|
|
172
|
+
server: string;
|
|
173
|
+
operationId: string;
|
|
174
|
+
auth?: OpenAPIV3.SecuritySchemeObject;
|
|
175
|
+
}
|
|
176
|
+
export interface AuthSchema {
|
|
177
|
+
authSchema: OpenAPIV3.SecuritySchemeObject;
|
|
178
|
+
name: string;
|
|
179
|
+
}
|
|
146
180
|
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/interfaces.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IAEzB;;OAEG;IACH,QAAQ,EAAE,aAAa,EAAE,CAAC;IAE1B;;OAEG;IACH,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,YAAY,mBAAmB;IAC/B,qBAAqB,6BAA6B;IAClD,mBAAmB,0BAA0B;IAC7C,uBAAuB,+BAA+B;IACtD,6BAA6B,sCAAsC;IACnE,cAAc,qBAAqB;IACnC,oBAAoB,8BAA8B;IAClD,sBAAsB,8BAA8B;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/interfaces.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,EAAE,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ded"] = "no-extra-api-can-be-added";
|
|
18
18
|
ErrorType["ResolveServerUrlFailed"] = "resolve-server-url-failed";
|
|
19
|
+
ErrorType["SwaggerNotSupported"] = "swagger-not-supported";
|
|
20
|
+
ErrorType["MultipleAPIKeyNotSupported"] = "multiple-api-key-not-supported";
|
|
19
21
|
ErrorType["ListFailed"] = "list-failed";
|
|
20
|
-
ErrorType["
|
|
22
|
+
ErrorType["listSupportedAPIInfoFailed"] = "list-supported-api-info-failed";
|
|
21
23
|
ErrorType["FilterSpecFailed"] = "filter-spec-failed";
|
|
22
24
|
ErrorType["UpdateManifestFailed"] = "update-manifest-failed";
|
|
23
25
|
ErrorType["GenerateAdaptiveCardFailed"] = "generate-adaptive-card-failed";
|
|
@@ -31,8 +33,6 @@ var ErrorType;
|
|
|
31
33
|
*/
|
|
32
34
|
var WarningType;
|
|
33
35
|
(function (WarningType) {
|
|
34
|
-
WarningType["AuthNotSupported"] = "auth-not-supported";
|
|
35
|
-
WarningType["MethodNotSupported"] = "method-not-supported";
|
|
36
36
|
WarningType["OperationIdMissing"] = "operationid-missing";
|
|
37
37
|
WarningType["GenerateCardFailed"] = "generate-card-failed";
|
|
38
38
|
WarningType["OperationOnlyContainsOptionalParam"] = "operation-only-contains-optional-param";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/common/spec-parser/interfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/common/spec-parser/interfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAqEb;;GAEG;AACH,IAAY,SAsBX;AAtBD,WAAY,SAAS;IACnB,4CAA+B,CAAA;IAC/B,+DAAkD,CAAA;IAClD,0DAA6C,CAAA;IAC7C,mEAAsD,CAAA;IACtD,gFAAmE,CAAA;IACnE,gDAAmC,CAAA;IACnC,+DAAkD,CAAA;IAClD,iEAAoD,CAAA;IACpD,0DAA6C,CAAA;IAC7C,0EAA6D,CAAA;IAE7D,uCAA0B,CAAA;IAC1B,0EAA6D,CAAA;IAC7D,oDAAuC,CAAA;IACvC,4DAA+C,CAAA;IAC/C,yEAA4D,CAAA;IAC5D,+CAAkC,CAAA;IAClC,+CAAkC,CAAA;IAElC,oCAAuB,CAAA;IACvB,gCAAmB,CAAA;AACrB,CAAC,EAtBW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAsBpB;AAED;;GAEG;AACH,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,yDAA0C,CAAA;IAC1C,0DAA2C,CAAA;IAC3C,4FAA6E,CAAA;IAC7E,qEAAsD,CAAA;IACtD,kCAAmB,CAAA;AACrB,CAAC,EANW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAMtB;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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIV3 } from "openapi-types";
|
|
2
|
-
import {
|
|
2
|
+
import { WarningResult } from "./interfaces";
|
|
3
3
|
import { IMessagingExtensionCommand, TeamsAppManifest } from "@microsoft/teamsfx-api";
|
|
4
|
-
export declare function updateManifest(manifestPath: string, outputSpecPath: string, adaptiveCardFolder: string, spec: OpenAPIV3.Document): Promise<[TeamsAppManifest, WarningResult[]]>;
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
4
|
+
export declare function updateManifest(manifestPath: string, outputSpecPath: string, adaptiveCardFolder: string, spec: OpenAPIV3.Document, allowMultipleParameters: boolean, auth?: OpenAPIV3.SecuritySchemeObject): Promise<[TeamsAppManifest, WarningResult[]]>;
|
|
5
|
+
export declare function generateCommands(spec: OpenAPIV3.Document, adaptiveCardFolder: string, manifestPath: string, allowMultipleParameters: boolean): Promise<[IMessagingExtensionCommand[], WarningResult[]]>;
|
|
6
|
+
export declare function getRelativePath(from: string, to: string): string;
|
|
7
7
|
//# sourceMappingURL=manifestUpdater.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAG1C,OAAO,EAAa,aAAa,EAAE,MAAM,cAAc,CAAC;AASxD,OAAO,EAEL,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAEhC,wBAAsB,cAAc,CAClC,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,SAAS,CAAC,QAAQ,EACxB,uBAAuB,EAAE,OAAO,EAChC,IAAI,CAAC,EAAE,SAAS,CAAC,oBAAoB,GACpC,OAAO,CAAC,CAAC,gBAAgB,EAAE,aAAa,EAAE,CAAC,CAAC,CA2D9C;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,SAAS,CAAC,QAAQ,EACxB,kBAAkB,EAAE,MAAM,EAC1B,YAAY,EAAE,MAAM,EACpB,uBAAuB,EAAE,OAAO,GAC/B,OAAO,CAAC,CAAC,0BAA0B,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC,CAmC1D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAGhE"}
|
|
@@ -2,33 +2,54 @@
|
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
3
|
"use strict";
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.getRelativePath = exports.generateCommands = exports.updateManifest = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
|
-
const interfaces_1 = require("./interfaces");
|
|
8
7
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
9
8
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
9
|
+
const interfaces_1 = require("./interfaces");
|
|
10
10
|
const utils_1 = require("./utils");
|
|
11
11
|
const specParserError_1 = require("./specParserError");
|
|
12
12
|
const constants_1 = require("./constants");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _a;
|
|
13
|
+
async function updateManifest(manifestPath, outputSpecPath, adaptiveCardFolder, spec, allowMultipleParameters, auth) {
|
|
14
|
+
var _a, _b;
|
|
16
15
|
try {
|
|
17
|
-
// TODO: manifest interface can be updated when manifest parser library is ready
|
|
18
16
|
const originalManifest = await fs_extra_1.default.readJSON(manifestPath);
|
|
19
|
-
const
|
|
20
|
-
const
|
|
17
|
+
const updatedPart = {};
|
|
18
|
+
const [commands, warnings] = await generateCommands(spec, adaptiveCardFolder, manifestPath, allowMultipleParameters);
|
|
19
|
+
const composeExtension = {
|
|
21
20
|
composeExtensionType: "apiBased",
|
|
22
|
-
apiSpecificationFile:
|
|
21
|
+
apiSpecificationFile: getRelativePath(manifestPath, outputSpecPath),
|
|
23
22
|
commands: commands,
|
|
24
23
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
if (auth) {
|
|
25
|
+
if (utils_1.isAPIKeyAuth(auth)) {
|
|
26
|
+
auth = auth;
|
|
27
|
+
const safeApiSecretRegistrationId = utils_1.getSafeRegistrationIdEnvName(`${auth.name}_${constants_1.ConstantString.RegistrationIdPostfix}`);
|
|
28
|
+
composeExtension.authorization = {
|
|
29
|
+
authType: "apiSecretServiceAuth",
|
|
30
|
+
apiSecretServiceAuthConfiguration: {
|
|
31
|
+
apiSecretRegistrationId: `\${{${safeApiSecretRegistrationId}}}`,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
else if (utils_1.isBearerTokenAuth(auth)) {
|
|
36
|
+
composeExtension.authorization = {
|
|
37
|
+
authType: "microsoftEntra",
|
|
38
|
+
microsoftEntraConfiguration: {
|
|
39
|
+
supportsSingleSignOn: true,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
updatedPart.webApplicationInfo = {
|
|
43
|
+
id: "${{AAD_APP_CLIENT_ID}}",
|
|
44
|
+
resource: "api://${{DOMAIN}}/${{AAD_APP_CLIENT_ID}}",
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
updatedPart.description = {
|
|
49
|
+
short: spec.info.title.slice(0, constants_1.ConstantString.ShortDescriptionMaxLens),
|
|
50
|
+
full: (_b = ((_a = spec.info.description) !== null && _a !== void 0 ? _a : originalManifest.description.full)) === null || _b === void 0 ? void 0 : _b.slice(0, constants_1.ConstantString.FullDescriptionMaxLens),
|
|
31
51
|
};
|
|
52
|
+
updatedPart.composeExtensions = [composeExtension];
|
|
32
53
|
const updatedManifest = Object.assign(Object.assign({}, originalManifest), updatedPart);
|
|
33
54
|
return [updatedManifest, warnings];
|
|
34
55
|
}
|
|
@@ -37,43 +58,7 @@ async function updateManifest(manifestPath, outputSpecPath, adaptiveCardFolder,
|
|
|
37
58
|
}
|
|
38
59
|
}
|
|
39
60
|
exports.updateManifest = updateManifest;
|
|
40
|
-
function
|
|
41
|
-
var _a, _b;
|
|
42
|
-
const requiredParams = [];
|
|
43
|
-
const optionalParams = [];
|
|
44
|
-
if (schema.type === "string" ||
|
|
45
|
-
schema.type === "integer" ||
|
|
46
|
-
schema.type === "boolean" ||
|
|
47
|
-
schema.type === "number") {
|
|
48
|
-
const parameter = {
|
|
49
|
-
name: name,
|
|
50
|
-
title: utils_1.updateFirstLetter(name),
|
|
51
|
-
description: (_a = schema.description) !== null && _a !== void 0 ? _a : "",
|
|
52
|
-
};
|
|
53
|
-
if (isRequired && schema.default === undefined) {
|
|
54
|
-
requiredParams.push(parameter);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
optionalParams.push(parameter);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
else if (schema.type === "object") {
|
|
61
|
-
const { properties } = schema;
|
|
62
|
-
for (const property in properties) {
|
|
63
|
-
let isRequired = false;
|
|
64
|
-
if (schema.required && ((_b = schema.required) === null || _b === void 0 ? void 0 : _b.indexOf(property)) >= 0) {
|
|
65
|
-
isRequired = true;
|
|
66
|
-
}
|
|
67
|
-
const [requiredP, optionalP] = generateParametersFromSchema(properties[property], property, isRequired);
|
|
68
|
-
requiredParams.push(...requiredP);
|
|
69
|
-
optionalParams.push(...optionalP);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return [requiredParams, optionalParams];
|
|
73
|
-
}
|
|
74
|
-
exports.generateParametersFromSchema = generateParametersFromSchema;
|
|
75
|
-
async function generateCommands(spec, adaptiveCardFolder, manifestPath) {
|
|
76
|
-
var _a, _b;
|
|
61
|
+
async function generateCommands(spec, adaptiveCardFolder, manifestPath, allowMultipleParameters) {
|
|
77
62
|
const paths = spec.paths;
|
|
78
63
|
const commands = [];
|
|
79
64
|
const warnings = [];
|
|
@@ -87,66 +72,15 @@ async function generateCommands(spec, adaptiveCardFolder, manifestPath) {
|
|
|
87
72
|
if (method === constants_1.ConstantString.PostMethod || method === constants_1.ConstantString.GetMethod) {
|
|
88
73
|
const operationItem = operations[method];
|
|
89
74
|
if (operationItem) {
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
name: param.name,
|
|
98
|
-
title: utils_1.updateFirstLetter(param.name),
|
|
99
|
-
description: (_a = param.description) !== null && _a !== void 0 ? _a : "",
|
|
100
|
-
};
|
|
101
|
-
const schema = param.schema;
|
|
102
|
-
if (param.in !== "header" && param.in !== "cookie") {
|
|
103
|
-
if (param.required && (schema === null || schema === void 0 ? void 0 : schema.default) === undefined) {
|
|
104
|
-
requiredParams.push(parameter);
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
optionalParams.push(parameter);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
});
|
|
75
|
+
const [command, warning] = utils_1.parseApiInfo(operationItem, allowMultipleParameters);
|
|
76
|
+
const adaptiveCardPath = path_1.default.join(adaptiveCardFolder, command.id + ".json");
|
|
77
|
+
command.apiResponseRenderingTemplateFile = (await fs_extra_1.default.pathExists(adaptiveCardPath))
|
|
78
|
+
? getRelativePath(manifestPath, adaptiveCardPath)
|
|
79
|
+
: "";
|
|
80
|
+
if (warning) {
|
|
81
|
+
warnings.push(warning);
|
|
111
82
|
}
|
|
112
|
-
if (operationItem.requestBody) {
|
|
113
|
-
const requestBody = operationItem.requestBody;
|
|
114
|
-
const requestJson = requestBody.content["application/json"];
|
|
115
|
-
if (Object.keys(requestJson).length !== 0) {
|
|
116
|
-
const schema = requestJson.schema;
|
|
117
|
-
const [requiredP, optionalP] = generateParametersFromSchema(schema, "requestBody", requestBody.required);
|
|
118
|
-
requiredParams.push(...requiredP);
|
|
119
|
-
optionalParams.push(...optionalP);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
const operationId = operationItem.operationId;
|
|
123
|
-
const adaptiveCardPath = path_1.default.join(adaptiveCardFolder, operationId + ".json");
|
|
124
|
-
const parameters = [];
|
|
125
|
-
if (requiredParams.length != 0) {
|
|
126
|
-
parameters.push(...requiredParams);
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
parameters.push(optionalParams[0]);
|
|
130
|
-
}
|
|
131
|
-
const command = {
|
|
132
|
-
context: ["compose"],
|
|
133
|
-
type: "query",
|
|
134
|
-
title: (_a = operationItem.summary) !== null && _a !== void 0 ? _a : "",
|
|
135
|
-
id: operationId,
|
|
136
|
-
parameters: parameters,
|
|
137
|
-
description: (_b = operationItem.description) !== null && _b !== void 0 ? _b : "",
|
|
138
|
-
apiResponseRenderingTemplateFile: (await fs_extra_1.default.pathExists(adaptiveCardPath))
|
|
139
|
-
? utils_1.getRelativePath(manifestPath, adaptiveCardPath)
|
|
140
|
-
: "",
|
|
141
|
-
};
|
|
142
83
|
commands.push(command);
|
|
143
|
-
if (requiredParams.length === 0 && optionalParams.length > 1) {
|
|
144
|
-
warnings.push({
|
|
145
|
-
type: interfaces_1.WarningType.OperationOnlyContainsOptionalParam,
|
|
146
|
-
content: util_1.format(constants_1.ConstantString.OperationOnlyContainsOptionalParam, operationId),
|
|
147
|
-
data: operationId,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
84
|
}
|
|
151
85
|
}
|
|
152
86
|
}
|
|
@@ -156,4 +90,9 @@ async function generateCommands(spec, adaptiveCardFolder, manifestPath) {
|
|
|
156
90
|
return [commands, warnings];
|
|
157
91
|
}
|
|
158
92
|
exports.generateCommands = generateCommands;
|
|
93
|
+
function getRelativePath(from, to) {
|
|
94
|
+
const relativePath = path_1.default.relative(path_1.default.dirname(from), to);
|
|
95
|
+
return path_1.default.normalize(relativePath).replace(/\\/g, "/");
|
|
96
|
+
}
|
|
97
|
+
exports.getRelativePath = getRelativePath;
|
|
159
98
|
//# sourceMappingURL=manifestUpdater.js.map
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"manifestUpdater.js","sourceRoot":"","sources":["../../../src/common/spec-parser/manifestUpdater.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC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MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;wBACzC,IAAI,aAAa,EAAE;4BACjB,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,oBAAY,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAC;4BAEhF,MAAM,gBAAgB,GAAG,cAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC;4BAC7E,OAAO,CAAC,gCAAgC,GAAG,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;gCAChF,CAAC,CAAC,eAAe,CAAC,YAAY,EAAE,gBAAgB,CAAC;gCACjD,CAAC,CAAC,EAAE,CAAC;4BAEP,IAAI,OAAO,EAAE;gCACX,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;6BACxB;4BAED,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;yBACxB;qBACF;iBACF;aACF;SACF;KACF;IAED,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC;AAxCD,4CAwCC;AAED,SAAgB,eAAe,CAAC,IAAY,EAAE,EAAU;IACtD,MAAM,YAAY,GAAG,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3D,OAAO,cAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC1D,CAAC;AAHD,0CAGC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { OpenAPIV3 } from "openapi-types";
|
|
2
|
-
export declare function specFilter(filter: string[], unResolveSpec: OpenAPIV3.Document, resolvedSpec: OpenAPIV3.Document): OpenAPIV3.Document;
|
|
2
|
+
export declare function specFilter(filter: string[], unResolveSpec: OpenAPIV3.Document, resolvedSpec: OpenAPIV3.Document, allowMissingId: boolean, allowAPIKeyAuth: boolean, allowMultipleParameters: boolean, allowOauth2: boolean): OpenAPIV3.Document;
|
|
3
3
|
//# sourceMappingURL=specFilter.d.ts.map
|
|
@@ -1 +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;AAM1C,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EAAE,EAChB,aAAa,EAAE,SAAS,CAAC,QAAQ,EACjC,YAAY,EAAE,SAAS,CAAC,QAAQ,
|
|
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;AAM1C,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EAAE,EAChB,aAAa,EAAE,SAAS,CAAC,QAAQ,EACjC,YAAY,EAAE,SAAS,CAAC,QAAQ,EAChC,cAAc,EAAE,OAAO,EACvB,eAAe,EAAE,OAAO,EACxB,uBAAuB,EAAE,OAAO,EAChC,WAAW,EAAE,OAAO,GACnB,SAAS,CAAC,QAAQ,CA4CpB"}
|
|
@@ -7,14 +7,14 @@ const utils_1 = require("./utils");
|
|
|
7
7
|
const specParserError_1 = require("./specParserError");
|
|
8
8
|
const interfaces_1 = require("./interfaces");
|
|
9
9
|
const constants_1 = require("./constants");
|
|
10
|
-
function specFilter(filter, unResolveSpec, resolvedSpec) {
|
|
10
|
+
function specFilter(filter, unResolveSpec, resolvedSpec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters, allowOauth2) {
|
|
11
11
|
try {
|
|
12
12
|
const newSpec = Object.assign({}, unResolveSpec);
|
|
13
13
|
const newPaths = {};
|
|
14
14
|
for (const filterItem of filter) {
|
|
15
15
|
const [method, path] = filterItem.split(" ");
|
|
16
16
|
const methodName = method.toLowerCase();
|
|
17
|
-
if (!utils_1.isSupportedApi(methodName, path, resolvedSpec)) {
|
|
17
|
+
if (!utils_1.isSupportedApi(methodName, path, resolvedSpec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters, allowOauth2)) {
|
|
18
18
|
continue;
|
|
19
19
|
}
|
|
20
20
|
if (!newPaths[path]) {
|