@microsoft/teamsfx-core 2.0.6-alpha.e65dc015f.0 → 2.0.6-alpha.e662467a1.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/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.map +1 -1
- package/build/common/deps-checker/internal/testToolChecker.js +9 -3
- package/build/common/deps-checker/internal/testToolChecker.js.map +1 -1
- package/build/common/featureFlags.d.ts +3 -3
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +13 -14
- 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/m365/launchHelper.d.ts +1 -1
- package/build/common/m365/launchHelper.d.ts.map +1 -1
- package/build/common/m365/launchHelper.js +2 -2
- package/build/common/m365/launchHelper.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 +70 -1
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/samples.d.ts +8 -4
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +25 -26
- package/build/common/samples.js.map +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts +3 -2
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.js +53 -24
- package/build/common/spec-parser/adaptiveCardGenerator.js.map +1 -1
- package/build/common/spec-parser/adaptiveCardWrapper.d.ts +14 -2
- package/build/common/spec-parser/adaptiveCardWrapper.d.ts.map +1 -1
- package/build/common/spec-parser/adaptiveCardWrapper.js +82 -6
- package/build/common/spec-parser/adaptiveCardWrapper.js.map +1 -1
- package/build/common/spec-parser/constants.d.ts +26 -14
- package/build/common/spec-parser/constants.d.ts.map +1 -1
- package/build/common/spec-parser/constants.js +43 -15
- 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 +49 -13
- 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 +30 -104
- 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 +138 -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 +117 -128
- package/build/common/spec-parser/specParser.js.map +1 -1
- package/build/common/spec-parser/utils.d.ts +16 -6
- package/build/common/spec-parser/utils.d.ts.map +1 -1
- package/build/common/spec-parser/utils.js +283 -49
- package/build/common/spec-parser/utils.js.map +1 -1
- package/build/common/telemetry.d.ts +7 -1
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +6 -0
- 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/lifecycle.d.ts +1 -0
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +17 -5
- package/build/component/configManager/lifecycle.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 +19 -7
- 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.js +8 -8
- 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/add/addWebPart.d.ts.map +1 -1
- package/build/component/driver/add/addWebPart.js +2 -0
- package/build/component/driver/add/addWebPart.js.map +1 -1
- package/build/component/driver/add/interface/AddWebPartArgs.d.ts +4 -0
- package/build/component/driver/add/interface/AddWebPartArgs.d.ts.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 +226 -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/azureDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +6 -6
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.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.map +1 -1
- package/build/component/driver/script/scriptDriver.js +2 -2
- 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 +27 -9
- 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 +35 -7
- 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 +106 -21
- package/build/component/generator/copilotPlugin/helper.js.map +1 -1
- package/build/component/generator/error.d.ts +0 -6
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +1 -13
- 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 +17 -10
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +3 -1
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +14 -12
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/generator.js +1 -1
- 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 +39 -43
- 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 +9 -1
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +1 -15
- package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/constants.js +1 -15
- package/build/component/generator/spfx/utils/constants.js.map +1 -1
- package/build/component/generator/utils.d.ts +2 -4
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +8 -17
- 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/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.js +25 -14
- package/build/component/resource/botService/appStudio/appStudioClient.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.map +1 -1
- package/build/component/utils/common.js +9 -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/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 +18 -1
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +155 -10
- package/build/core/FxCore.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +2 -2
- package/build/core/middleware/projectMigratorV3.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/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 +3 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +7 -1
- package/build/index.js.map +1 -1
- package/build/question/create.d.ts +13 -4
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +184 -76
- package/build/question/create.js.map +1 -1
- package/build/question/generator.js +0 -2
- 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 +6 -4
- 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 +14 -6
- 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 +1 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +90 -8
- 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 +1 -2
- package/build/ui/visitor.js.map +1 -1
- package/package.json +11 -19
- package/resource/package.nls.json +89 -67
- package/resource/yaml-schema/v1.3/yaml.schema.json +79 -32
- 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,19 +1,21 @@
|
|
|
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
|
-
static readonly WrappedCardSchema = "
|
|
18
|
+
static readonly WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
|
|
17
19
|
static readonly WrappedCardResponseLayout = "list";
|
|
18
20
|
static readonly GetMethod = "get";
|
|
19
21
|
static readonly PostMethod = "post";
|
|
@@ -22,8 +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[];
|
|
31
|
+
static readonly WellknownTitleName: string[];
|
|
32
|
+
static readonly WellknownSubtitleName: string[];
|
|
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;
|
|
28
40
|
}
|
|
29
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":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/constants.ts"],"names":[],"mappings":"AAIA,qBAAa,cAAc;IACzB,MAAM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AAC,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,25 +3,26 @@
|
|
|
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
|
-
ConstantString.WrappedCardSchema = "
|
|
25
|
+
ConstantString.WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
|
|
25
26
|
ConstantString.WrappedCardResponseLayout = "list";
|
|
26
27
|
ConstantString.GetMethod = "get";
|
|
27
28
|
ConstantString.PostMethod = "post";
|
|
@@ -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",
|
|
@@ -64,4 +66,30 @@ ConstantString.WellknownResultNames = [
|
|
|
64
66
|
"list",
|
|
65
67
|
"output",
|
|
66
68
|
];
|
|
69
|
+
ConstantString.WellknownTitleName = ["title", "name", "summary", "caption", "subject", "label"];
|
|
70
|
+
ConstantString.WellknownSubtitleName = [
|
|
71
|
+
"subtitle",
|
|
72
|
+
"id",
|
|
73
|
+
"uid",
|
|
74
|
+
"description",
|
|
75
|
+
"desc",
|
|
76
|
+
"detail",
|
|
77
|
+
];
|
|
78
|
+
ConstantString.WellknownImageName = [
|
|
79
|
+
"image",
|
|
80
|
+
"icon",
|
|
81
|
+
"avatar",
|
|
82
|
+
"picture",
|
|
83
|
+
"photo",
|
|
84
|
+
"logo",
|
|
85
|
+
"pic",
|
|
86
|
+
"thumbnail",
|
|
87
|
+
"img",
|
|
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;
|
|
67
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,+CAAgC,GAC9C,+DAA+D,CAAC;AAClD,iCAAkB,GAAG,2DAA2D,CAAC;AACjF,4BAAa,GAAG,qBAAqB,CAAC;AAEtC,sCAAuB,GACrC,iGAAiG,CAAC;AACpF,4CAA6B,GAC3C,kEAAkE,CAAC;AACrD,qCAAsB,GACpC,iGAAiG,CAAC;AACpF,iDAAkC,GAChD,4GAA4G,CAAC;AAC/F,sCAAuB,GACrC,yDAAyD,CAAC;AAE5C,kCAAmB,GACjC,yFAAyF,CAAC;AAE5E,yCAA0B,GACxC,oGAAoG,CAAC;AAEvF,iCAAkB,GAAG,YAAY,CAAC;AAClC,gCAAiB,GAC/B,qHAAqH,CAAC;AACxG,wCAAyB,GAAG,MAAM,CAAC;AAEnC,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;AAC5B,oCAAqB,GAAG,iBAAiB,CAAC;AAC1C,iCAAkB,GAAG;IACnC,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,SAAS;CACV,CAAC;AACc,kCAAmB,GAAG;IACpC,KAAK;IACL,MAAM;IACN,KAAK;IACL,QAAQ;IACR,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;CACR,CAAC;AAEF,iEAAiE;AACjD,mCAAoB,GAAG;IACrC,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,SAAS;IACT,SAAS;IACT,MAAM;IACN,QAAQ;CACT,CAAC;AACc,iCAAkB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AACjF,oCAAqB,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",
|
|
@@ -100,16 +101,30 @@ export interface TextBlockElement {
|
|
|
100
101
|
text: string;
|
|
101
102
|
wrap: boolean;
|
|
102
103
|
}
|
|
104
|
+
export interface ImageElement {
|
|
105
|
+
type: string;
|
|
106
|
+
url: string;
|
|
107
|
+
$when: string;
|
|
108
|
+
}
|
|
103
109
|
export interface ArrayElement {
|
|
104
110
|
type: string;
|
|
105
111
|
$data: string;
|
|
106
|
-
items: Array<TextBlockElement | ArrayElement>;
|
|
112
|
+
items: Array<TextBlockElement | ImageElement | ArrayElement>;
|
|
107
113
|
}
|
|
108
114
|
export interface AdaptiveCard {
|
|
109
115
|
type: string;
|
|
110
116
|
$schema: string;
|
|
111
117
|
version: string;
|
|
112
|
-
body: Array<TextBlockElement | ArrayElement>;
|
|
118
|
+
body: Array<TextBlockElement | ImageElement | ArrayElement>;
|
|
119
|
+
}
|
|
120
|
+
export interface PreviewCardTemplate {
|
|
121
|
+
title: string;
|
|
122
|
+
subtitle?: string;
|
|
123
|
+
image?: {
|
|
124
|
+
url: string;
|
|
125
|
+
alt?: string;
|
|
126
|
+
$when?: string;
|
|
127
|
+
};
|
|
113
128
|
}
|
|
114
129
|
export interface WrappedAdaptiveCard {
|
|
115
130
|
version: string;
|
|
@@ -117,23 +132,44 @@ export interface WrappedAdaptiveCard {
|
|
|
117
132
|
jsonPath?: string;
|
|
118
133
|
responseLayout: string;
|
|
119
134
|
responseCardTemplate: AdaptiveCard;
|
|
120
|
-
previewCardTemplate:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
alt?: string;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
135
|
+
previewCardTemplate: PreviewCardTemplate;
|
|
136
|
+
}
|
|
137
|
+
export interface ChoicesItem {
|
|
138
|
+
title: string;
|
|
139
|
+
value: string;
|
|
128
140
|
}
|
|
129
141
|
export interface Parameter {
|
|
130
142
|
name: string;
|
|
131
143
|
title: string;
|
|
132
144
|
description: string;
|
|
145
|
+
inputType?: "text" | "textarea" | "number" | "date" | "time" | "toggle" | "choiceset";
|
|
146
|
+
value?: string;
|
|
147
|
+
choices?: ChoicesItem[];
|
|
133
148
|
}
|
|
134
149
|
export interface CheckParamResult {
|
|
135
150
|
requiredNum: number;
|
|
136
151
|
optionalNum: number;
|
|
137
152
|
isValid: boolean;
|
|
138
153
|
}
|
|
154
|
+
export interface ParseOptions {
|
|
155
|
+
allowMissingId?: boolean;
|
|
156
|
+
allowSwagger?: boolean;
|
|
157
|
+
allowAPIKeyAuth?: boolean;
|
|
158
|
+
allowMultipleParameters?: boolean;
|
|
159
|
+
}
|
|
160
|
+
export interface APIInfo {
|
|
161
|
+
method: string;
|
|
162
|
+
path: string;
|
|
163
|
+
title: string;
|
|
164
|
+
id: string;
|
|
165
|
+
parameters: Parameter[];
|
|
166
|
+
description: string;
|
|
167
|
+
warning?: WarningResult;
|
|
168
|
+
}
|
|
169
|
+
export interface ListAPIResult {
|
|
170
|
+
api: string;
|
|
171
|
+
server: string;
|
|
172
|
+
operationId: string;
|
|
173
|
+
auth?: OpenAPIV3.ApiKeySecurityScheme;
|
|
174
|
+
}
|
|
139
175
|
//# 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,gBAAgB,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ACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC,oBAAoB,CAAC;CACvC"}
|
|
@@ -16,8 +16,10 @@ var ErrorType;
|
|
|
16
16
|
ErrorType["NoSupportedApi"] = "no-supported-api";
|
|
17
17
|
ErrorType["NoExtraAPICanBeAdded"] = "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, apiKeyAuthName?: string): 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;AAIxD,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,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,CAAC,gBAAgB,EAAE,aAAa,EAAE,CAAC,CAAC,CA8C9C;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,30 +2,37 @@
|
|
|
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, apiKeyAuthName) {
|
|
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 [commands, warnings] = await generateCommands(spec, adaptiveCardFolder, manifestPath);
|
|
17
|
+
const [commands, warnings] = await generateCommands(spec, adaptiveCardFolder, manifestPath, allowMultipleParameters);
|
|
20
18
|
const ComposeExtension = {
|
|
21
19
|
composeExtensionType: "apiBased",
|
|
22
|
-
apiSpecificationFile:
|
|
20
|
+
apiSpecificationFile: getRelativePath(manifestPath, outputSpecPath),
|
|
23
21
|
commands: commands,
|
|
24
22
|
};
|
|
23
|
+
if (apiKeyAuthName) {
|
|
24
|
+
const safeApiSecretRegistrationId = utils_1.getSafeRegistrationIdEnvName(`${apiKeyAuthName}_${constants_1.ConstantString.RegistrationIdPostfix}`);
|
|
25
|
+
ComposeExtension.authorization = {
|
|
26
|
+
authType: "apiSecretServiceAuth",
|
|
27
|
+
apiSecretServiceAuthConfiguration: {
|
|
28
|
+
apiSecretRegistrationId: `\${{${safeApiSecretRegistrationId}}}`,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
25
32
|
const updatedPart = {
|
|
26
33
|
description: {
|
|
27
|
-
short: spec.info.title,
|
|
28
|
-
full: (_a = spec.info.description) !== null && _a !== void 0 ? _a : originalManifest.description.full,
|
|
34
|
+
short: spec.info.title.slice(0, constants_1.ConstantString.ShortDescriptionMaxLens),
|
|
35
|
+
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),
|
|
29
36
|
},
|
|
30
37
|
composeExtensions: [ComposeExtension],
|
|
31
38
|
};
|
|
@@ -37,43 +44,7 @@ async function updateManifest(manifestPath, outputSpecPath, adaptiveCardFolder,
|
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
46
|
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;
|
|
47
|
+
async function generateCommands(spec, adaptiveCardFolder, manifestPath, allowMultipleParameters) {
|
|
77
48
|
const paths = spec.paths;
|
|
78
49
|
const commands = [];
|
|
79
50
|
const warnings = [];
|
|
@@ -87,65 +58,15 @@ async function generateCommands(spec, adaptiveCardFolder, manifestPath) {
|
|
|
87
58
|
if (method === constants_1.ConstantString.PostMethod || method === constants_1.ConstantString.GetMethod) {
|
|
88
59
|
const operationItem = operations[method];
|
|
89
60
|
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
|
-
});
|
|
111
|
-
}
|
|
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
|
-
}
|
|
61
|
+
const [command, warning] = utils_1.parseApiInfo(operationItem, allowMultipleParameters);
|
|
62
|
+
const adaptiveCardPath = path_1.default.join(adaptiveCardFolder, command.id + ".json");
|
|
63
|
+
command.apiResponseRenderingTemplateFile = (await fs_extra_1.default.pathExists(adaptiveCardPath))
|
|
64
|
+
? getRelativePath(manifestPath, adaptiveCardPath)
|
|
65
|
+
: "";
|
|
66
|
+
if (warning) {
|
|
67
|
+
warnings.push(warning);
|
|
121
68
|
}
|
|
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
|
-
apiResponseRenderingTemplateFile: (await fs_extra_1.default.pathExists(adaptiveCardPath))
|
|
138
|
-
? utils_1.getRelativePath(manifestPath, adaptiveCardPath)
|
|
139
|
-
: "",
|
|
140
|
-
};
|
|
141
69
|
commands.push(command);
|
|
142
|
-
if (requiredParams.length === 0 && optionalParams.length > 1) {
|
|
143
|
-
warnings.push({
|
|
144
|
-
type: interfaces_1.WarningType.OperationOnlyContainsOptionalParam,
|
|
145
|
-
content: util_1.format(constants_1.ConstantString.OperationOnlyContainsOptionalParam, operationId),
|
|
146
|
-
data: operationId,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
70
|
}
|
|
150
71
|
}
|
|
151
72
|
}
|
|
@@ -155,4 +76,9 @@ async function generateCommands(spec, adaptiveCardFolder, manifestPath) {
|
|
|
155
76
|
return [commands, warnings];
|
|
156
77
|
}
|
|
157
78
|
exports.generateCommands = generateCommands;
|
|
79
|
+
function getRelativePath(from, to) {
|
|
80
|
+
const relativePath = path_1.default.relative(path_1.default.dirname(from), to);
|
|
81
|
+
return path_1.default.normalize(relativePath).replace(/\\/g, "/");
|
|
82
|
+
}
|
|
83
|
+
exports.getRelativePath = getRelativePath;
|
|
158
84
|
//# 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;;;;AAGb,gEAA0B;AAC1B,wDAAwB;AACxB,6CAAwD;AACxD,mCAAqE;AACrE,uDAAoD;AACpD,2CAA6C;AAOtC,KAAK,UAAU,cAAc,CAClC,YAAoB,EACpB,cAAsB,EACtB,kBAA0B,EAC1B,IAAwB,EACxB,uBAAgC,EAChC,cAAuB;;IAEvB,IAAI;QACF,MAAM,gBAAgB,GAAqB,MAAM,kBAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAE3E,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,MAAM,gBAAgB,CACjD,IAAI,EACJ,kBAAkB,EAClB,YAAY,EACZ,uBAAuB,CACxB,CAAC;QACF,MAAM,gBAAgB,GAAsB;YAC1C,oBAAoB,EAAE,UAAU;YAChC,oBAAoB,EAAE,eAAe,CAAC,YAAY,EAAE,cAAc,CAAC;YACnE,QAAQ,EAAE,QAAQ;SACnB,CAAC;QAEF,IAAI,cAAc,EAAE;YAClB,MAAM,2BAA2B,GAAG,oCAA4B,CAC9D,GAAG,cAAc,IAAI,0BAAc,CAAC,qBAAq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