@microsoft/teamsfx-core 2.0.6-alpha.e5db52f29.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 -4
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +10 -15
- package/build/common/featureFlags.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/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +2 -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.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 +8 -0
- package/build/common/spec-parser/constants.d.ts.map +1 -1
- package/build/common/spec-parser/constants.js +8 -0
- 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 +1 -1
- package/build/common/spec-parser/index.d.ts.map +1 -1
- package/build/common/spec-parser/index.js.map +1 -1
- package/build/common/spec-parser/interfaces.d.ts +19 -1
- package/build/common/spec-parser/interfaces.d.ts.map +1 -1
- package/build/common/spec-parser/interfaces.js +2 -1
- package/build/common/spec-parser/interfaces.js.map +1 -1
- package/build/common/spec-parser/manifestUpdater.d.ts +3 -2
- package/build/common/spec-parser/manifestUpdater.d.ts.map +1 -1
- package/build/common/spec-parser/manifestUpdater.js +24 -10
- 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 +3 -8
- package/build/common/spec-parser/specParser.d.ts.map +1 -1
- package/build/common/spec-parser/specParser.js +88 -49
- package/build/common/spec-parser/specParser.js.map +1 -1
- package/build/common/spec-parser/utils.d.ts +10 -7
- package/build/common/spec-parser/utils.d.ts.map +1 -1
- package/build/common/spec-parser/utils.js +119 -36
- package/build/common/spec-parser/utils.js.map +1 -1
- package/build/common/telemetry.d.ts +6 -1
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +5 -0
- package/build/common/telemetry.js.map +1 -1
- 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/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/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 +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/teamsappMgr.js +7 -7
- package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
- 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 +40 -20
- package/build/component/generator/copilotPlugin/generator.js.map +1 -1
- package/build/component/generator/copilotPlugin/helper.d.ts +1 -2
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/helper.js +36 -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 +13 -8
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +2 -0
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +6 -6
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +19 -26
- 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 +2 -4
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +4 -14
- 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/envUtil.js +1 -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 +2 -0
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +81 -5
- package/build/core/FxCore.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +1 -1
- 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 +2 -1
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +66 -16
- 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 +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/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/other.d.ts +1 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +66 -7
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +1 -0
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +1 -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 +9 -18
- package/resource/package.nls.json +65 -44
- 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
package/build/common/samples.js
CHANGED
|
@@ -2,22 +2,20 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.sampleProvider = exports.SampleConfigBranchForPrerelease = exports.
|
|
5
|
+
exports.sampleProvider = exports.SampleConfigBranchForPrerelease = exports.SampleConfigTag = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
8
|
-
const utils_1 = require("../component/generator/utils");
|
|
9
|
-
const constants_1 = require("./constants");
|
|
10
|
-
const featureFlags_1 = require("./featureFlags");
|
|
11
|
-
const common_1 = require("../error/common");
|
|
12
8
|
const hooks_1 = require("@feathersjs/hooks");
|
|
9
|
+
const utils_1 = require("../component/generator/utils");
|
|
13
10
|
const globalVars_1 = require("../core/globalVars");
|
|
11
|
+
const common_1 = require("../error/common");
|
|
12
|
+
const constants_1 = require("./constants");
|
|
14
13
|
const packageJson = require("../../package.json");
|
|
15
14
|
const SampleConfigOwner = "OfficeDev";
|
|
16
15
|
const SampleConfigRepo = "TeamsFx-Samples";
|
|
17
16
|
const SampleConfigFile = ".config/samples-config-v3.json";
|
|
18
|
-
exports.SampleConfigTag = "v2.
|
|
19
|
-
//
|
|
20
|
-
exports.SampleConfigTagForRc = "v2.3.0";
|
|
17
|
+
exports.SampleConfigTag = "v2.4.0";
|
|
18
|
+
// prerelease tag is always using a branch.
|
|
21
19
|
exports.SampleConfigBranchForPrerelease = "v3";
|
|
22
20
|
class SampleProvider {
|
|
23
21
|
constructor() {
|
|
@@ -34,8 +32,8 @@ class SampleProvider {
|
|
|
34
32
|
this.branchOrTag = exports.SampleConfigBranchForPrerelease;
|
|
35
33
|
}
|
|
36
34
|
else if (version.includes("rc")) {
|
|
37
|
-
//
|
|
38
|
-
this.branchOrTag = exports.
|
|
35
|
+
// if there is a breaking change, the tag is not used by any stable version.
|
|
36
|
+
this.branchOrTag = exports.SampleConfigTag;
|
|
39
37
|
}
|
|
40
38
|
else {
|
|
41
39
|
// stable version uses the head of branch defined by feature flag when available
|
|
@@ -55,37 +53,38 @@ class SampleProvider {
|
|
|
55
53
|
}
|
|
56
54
|
}
|
|
57
55
|
get SampleCollection() {
|
|
58
|
-
var _a;
|
|
56
|
+
var _a, _b, _c, _d;
|
|
59
57
|
const samples = ((_a = this.samplesConfig) === null || _a === void 0 ? void 0 : _a.samples.map((sample) => {
|
|
60
|
-
const isExternal = sample["
|
|
58
|
+
const isExternal = sample["downloadUrlInfo"] ? true : false;
|
|
61
59
|
let gifUrl = sample["gifPath"] !== undefined
|
|
62
60
|
? `https://raw.githubusercontent.com/${SampleConfigOwner}/${SampleConfigRepo}/${this.branchOrTag}/${sample["id"]}/${sample["gifPath"]}`
|
|
63
61
|
: undefined;
|
|
64
62
|
let thumbnailUrl = `https://raw.githubusercontent.com/${SampleConfigOwner}/${SampleConfigRepo}/${this.branchOrTag}/${sample["id"]}/${sample["thumbnailPath"]}`;
|
|
65
63
|
if (isExternal) {
|
|
66
|
-
const info =
|
|
64
|
+
const info = sample["downloadUrlInfo"];
|
|
67
65
|
gifUrl =
|
|
68
66
|
sample["gifPath"] !== undefined
|
|
69
67
|
? `https://raw.githubusercontent.com/${info.owner}/${info.repository}/${info.ref}/${info.dir}/${sample["gifPath"]}`
|
|
70
68
|
: undefined;
|
|
71
69
|
thumbnailUrl = `https://raw.githubusercontent.com/${info.owner}/${info.repository}/${info.ref}/${info.dir}/${sample["thumbnailPath"]}`;
|
|
72
70
|
}
|
|
73
|
-
return Object.assign(Object.assign({}, sample), { onboardDate: new Date(sample["onboardDate"]),
|
|
74
|
-
? sample["
|
|
75
|
-
:
|
|
71
|
+
return Object.assign(Object.assign({}, sample), { onboardDate: new Date(sample["onboardDate"]), downloadUrlInfo: isExternal
|
|
72
|
+
? sample["downloadUrlInfo"]
|
|
73
|
+
: {
|
|
74
|
+
owner: SampleConfigOwner,
|
|
75
|
+
repository: SampleConfigRepo,
|
|
76
|
+
ref: this.branchOrTag,
|
|
77
|
+
dir: sample["id"],
|
|
78
|
+
}, gifUrl: gifUrl, thumbnailUrl: thumbnailUrl });
|
|
76
79
|
})) || [];
|
|
77
|
-
|
|
78
|
-
if (!featureFlags_1.isVideoFilterEnabled()) {
|
|
79
|
-
const videoFilterSampleId = "teams-videoapp-sample";
|
|
80
|
-
const index = samples.findIndex((sample) => sample.id === videoFilterSampleId);
|
|
81
|
-
if (index !== -1) {
|
|
82
|
-
samples.splice(index, 1);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
this.sampleCollection = {
|
|
80
|
+
return {
|
|
86
81
|
samples,
|
|
82
|
+
filterOptions: {
|
|
83
|
+
capabilities: ((_b = this.samplesConfig) === null || _b === void 0 ? void 0 : _b.filterOptions["capabilities"]) || [],
|
|
84
|
+
languages: ((_c = this.samplesConfig) === null || _c === void 0 ? void 0 : _c.filterOptions["languages"]) || [],
|
|
85
|
+
technologies: ((_d = this.samplesConfig) === null || _d === void 0 ? void 0 : _d.filterOptions["technologies"]) || [],
|
|
86
|
+
},
|
|
87
87
|
};
|
|
88
|
-
return this.sampleCollection;
|
|
89
88
|
}
|
|
90
89
|
async fetchRawFileContent(branchOrTag) {
|
|
91
90
|
const url = `https://raw.githubusercontent.com/${SampleConfigOwner}/${SampleConfigRepo}/${branchOrTag}/${SampleConfigFile}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"samples.js","sourceRoot":"","sources":["../../src/common/samples.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,0DAA0B;AAE1B,
|
|
1
|
+
{"version":3,"file":"samples.js","sourceRoot":"","sources":["../../src/common/samples.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,0DAA0B;AAE1B,6CAA0C;AAE1C,wDAAqF;AACrF,mDAAoD;AACpD,4CAAoD;AACpD,2CAA8C;AAE9C,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAElD,MAAM,iBAAiB,GAAG,WAAW,CAAC;AACtC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,gCAAgC,CAAC;AAC7C,QAAA,eAAe,GAAG,QAAQ,CAAC;AACxC,2CAA2C;AAC9B,QAAA,+BAA+B,GAAG,IAAI,CAAC;AAuCpD,MAAM,cAAc;IAApB;QAEU,gBAAW,GAAG,uBAAe,CAAC;IAoGxC,CAAC;IAjGQ,KAAK,CAAC,iBAAiB;QAC5B,MAAM,OAAO,GAAW,WAAW,CAAC,OAAO,CAAC;QAC5C,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YAC7B,8CAA8C;YAC9C,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;SAC1B;aAAM,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA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,0CAAE,aAAa,CAAC,WAAW,CAAC,KAAI,EAAE;gBAC/D,YAAY,EAAE,CAAA,MAAA,IAAI,CAAC,aAAa,0CAAE,aAAa,CAAC,cAAc,CAAC,KAAI,EAAE;aACtE;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,mBAAmB,CAAC,WAAmB;QACnD,MAAM,GAAG,GAAG,qCAAqC,iBAAiB,IAAI,gBAAgB,IAAI,WAAW,IAAI,gBAAgB,EAAE,CAAC;QAC5H,IAAI;YACF,MAAM,YAAY,GAAG,MAAM,8BAAsB,CAC/C,KAAK,IAAI,EAAE;gBACT,OAAO,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;YACxD,CAAC,EACD,IAAI,EACJ,CAAC,CACF,CAAC;YAEF,IAAI,YAAY,IAAI,YAAY,CAAC,IAAI,EAAE;gBACrC,OAAO,YAAY,CAAC,IAAI,CAAC;aAC1B;SACF;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,0BAAiB,CAAC,GAAG,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;SACvD;IACH,CAAC;CACF;AAjGC;IADC,aAAK,CAAC,CAAC,2BAAc,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;;;;uDA2BxD;AAyEU,QAAA,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adaptiveCardGenerator.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/adaptiveCardGenerator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"adaptiveCardGenerator.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/adaptiveCardGenerator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EACL,YAAY,EACZ,YAAY,EAEZ,YAAY,EACZ,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAItB,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,SAAS,CAAC,eAAe,GACvC,CAAC,YAAY,EAAE,MAAM,CAAC,CAkDxB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,CAAC,YAAY,EAC9B,IAAI,EAAE,MAAM,EACZ,eAAe,SAAK,GACnB,KAAK,CAAC,gBAAgB,GAAG,YAAY,GAAG,YAAY,CAAC,CAiGvD;AAGD,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,GAAG,MAAM,CAepF;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,CAAC,oBAAoB,EACtC,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,MAAM,GACtB,OAAO,CAQT"}
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
"use strict";
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.isImageUrlProperty = exports.getResponseJsonPathFromSchema = exports.generateCardFromResponse = exports.generateAdaptiveCard = void 0;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
const util = tslib_1.__importStar(require("util"));
|
|
8
6
|
const utils_1 = require("./utils");
|
|
9
7
|
const interfaces_1 = require("./interfaces");
|
|
10
8
|
const constants_1 = require("./constants");
|
|
@@ -139,9 +137,9 @@ function generateCardFromResponse(schema, name, parentArrayName = "") {
|
|
|
139
137
|
}
|
|
140
138
|
}
|
|
141
139
|
if (schema.oneOf || schema.anyOf || schema.not || schema.allOf) {
|
|
142
|
-
throw new Error(
|
|
140
|
+
throw new Error(utils_1.format(constants_1.ConstantString.SchemaNotSupported, JSON.stringify(schema)));
|
|
143
141
|
}
|
|
144
|
-
throw new Error(
|
|
142
|
+
throw new Error(utils_1.format(constants_1.ConstantString.UnknownSchema, JSON.stringify(schema)));
|
|
145
143
|
}
|
|
146
144
|
exports.generateCardFromResponse = generateCardFromResponse;
|
|
147
145
|
// Find the first array property in the response schema object with the well-known name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adaptiveCardGenerator.js","sourceRoot":"","sources":["../../../src/common/spec-parser/adaptiveCardGenerator.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"adaptiveCardGenerator.js","sourceRoot":"","sources":["../../../src/common/spec-parser/adaptiveCardGenerator.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAGb,mCAAmE;AACnE,6CAMsB;AACtB,2CAA6C;AAC7C,uDAAoD;AAEpD,SAAgB,oBAAoB,CAClC,aAAwC;IAExC,IAAI;QACF,MAAM,IAAI,GAAG,uBAAe,CAAC,aAAa,CAAC,CAAC;QAE5C,IAAI,QAAQ,GAA0D,EAAE,CAAC;QAEzE,IAAI,MAAM,GAAG,IAAI,CAAC,MAAgC,CAAC;QACnD,IAAI,QAAQ,GAAG,GAAG,CAAC;QACnB,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5C,QAAQ,GAAG,6BAA6B,CAAC,MAAM,CAAC,CAAC;YACjD,IAAI,QAAQ,KAAK,GAAG,EAAE;gBACpB,MAAM,GAAG,MAAM,CAAC,UAAW,CAAC,QAAQ,CAA2B,CAAC;aACjE;YAED,QAAQ,GAAG,wBAAwB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SACjD;QAED,yCAAyC;QACzC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE;YAC5D,QAAQ,GAAG;gBACT;oBACE,IAAI,EAAE,0BAAc,CAAC,aAAa;oBAClC,IAAI,EAAE,yBAAyB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M,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE;YACjC,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAA2B,CAAC;YAC9D,IACE,MAAM,CAAC,IAAI,KAAK,OAAO;gBACvB,uBAAe,CAAC,QAAQ,EAAE,0BAAc,CAAC,oBAAoB,CAAC,EAC9D;gBACA,OAAO,QAAQ,CAAC;aACjB;SACF;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAfD,sEAeC;AAED,SAAgB,kBAAkB,CAChC,MAAsC,EACtC,IAAY,EACZ,eAAuB;IAEvB,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC;IACnD,OAAO,CACL,CAAC,CAAC,YAAY;QACd,MAAM,CAAC,IAAI,KAAK,QAAQ;QACxB,uBAAe,CAAC,YAAY,EAAE,0BAAc,CAAC,kBAAkB,CAAC;QAChE,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,KAAK,CAAC,CAClF,CAAC;AACJ,CAAC;AAZD,gDAYC"}
|
|
@@ -13,6 +13,7 @@ export declare class ConstantString {
|
|
|
13
13
|
static readonly OperationOnlyContainsOptionalParam = "Operation %s contains multiple optional parameters. The first optional parameter is used for this command.";
|
|
14
14
|
static readonly ConvertSwaggerToOpenAPI = "The Swagger 2.0 file has been converted to OpenAPI 3.0.";
|
|
15
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.";
|
|
16
17
|
static readonly WrappedCardVersion = "devPreview";
|
|
17
18
|
static readonly WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
|
|
18
19
|
static readonly WrappedCardResponseLayout = "list";
|
|
@@ -23,11 +24,18 @@ export declare class ConstantString {
|
|
|
23
24
|
static readonly AdaptiveCardType = "AdaptiveCard";
|
|
24
25
|
static readonly TextBlockType = "TextBlock";
|
|
25
26
|
static readonly ContainerType = "Container";
|
|
27
|
+
static readonly RegistrationIdPostfix = "REGISTRATION_ID";
|
|
26
28
|
static readonly ResponseCodeFor20X: string[];
|
|
27
29
|
static readonly AllOperationMethods: string[];
|
|
28
30
|
static readonly WellknownResultNames: string[];
|
|
29
31
|
static readonly WellknownTitleName: string[];
|
|
30
32
|
static readonly WellknownSubtitleName: string[];
|
|
31
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;
|
|
32
40
|
}
|
|
33
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":"AAIA,qBAAa,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,gBAAgB,6BAA6B;IAC7D,MAAM,CAAC,QAAQ,CAAC,mBAAmB,yEACqC;IACxE,MAAM,CAAC,QAAQ,CAAC,qBAAqB,4CAA4C;IACjF,MAAM,CAAC,QAAQ,CAAC,kBAAkB,+BAA+B;IACjE,MAAM,CAAC,QAAQ,CAAC,cAAc,gMACiK;IAE/L,MAAM,CAAC,QAAQ,CAAC,gCAAgC,mEACkB;IAClE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,+DAA+D;IACjG,MAAM,CAAC,QAAQ,CAAC,aAAa,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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"}
|
|
@@ -20,6 +20,7 @@ ConstantString.ResolveServerUrlFailed = "Unable to resolve the server URL: pleas
|
|
|
20
20
|
ConstantString.OperationOnlyContainsOptionalParam = "Operation %s contains multiple optional parameters. The first optional parameter is used for this command.";
|
|
21
21
|
ConstantString.ConvertSwaggerToOpenAPI = "The Swagger 2.0 file has been converted to OpenAPI 3.0.";
|
|
22
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,MAAa,cAAc;;AAA3B,
|
|
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;AAC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,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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SpecParser } from "./specParser";
|
|
2
2
|
export { SpecParserError } from "./specParserError";
|
|
3
|
-
export { ValidationStatus, WarningType, ErrorType, WarningResult } from "./interfaces";
|
|
3
|
+
export { ValidationStatus, WarningType, ErrorType, WarningResult, ErrorResult, ListAPIResult, } from "./interfaces";
|
|
4
4
|
export { ConstantString } from "./constants";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1 +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,
|
|
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
|
*/
|
|
@@ -66,8 +67,9 @@ export declare enum ErrorType {
|
|
|
66
67
|
NoExtraAPICanBeAdded = "no-extra-api-can-be-added",
|
|
67
68
|
ResolveServerUrlFailed = "resolve-server-url-failed",
|
|
68
69
|
SwaggerNotSupported = "swagger-not-supported",
|
|
70
|
+
MultipleAPIKeyNotSupported = "multiple-api-key-not-supported",
|
|
69
71
|
ListFailed = "list-failed",
|
|
70
|
-
|
|
72
|
+
listSupportedAPIInfoFailed = "list-supported-api-info-failed",
|
|
71
73
|
FilterSpecFailed = "filter-spec-failed",
|
|
72
74
|
UpdateManifestFailed = "update-manifest-failed",
|
|
73
75
|
GenerateAdaptiveCardFailed = "generate-adaptive-card-failed",
|
|
@@ -132,10 +134,17 @@ export interface WrappedAdaptiveCard {
|
|
|
132
134
|
responseCardTemplate: AdaptiveCard;
|
|
133
135
|
previewCardTemplate: PreviewCardTemplate;
|
|
134
136
|
}
|
|
137
|
+
export interface ChoicesItem {
|
|
138
|
+
title: string;
|
|
139
|
+
value: string;
|
|
140
|
+
}
|
|
135
141
|
export interface Parameter {
|
|
136
142
|
name: string;
|
|
137
143
|
title: string;
|
|
138
144
|
description: string;
|
|
145
|
+
inputType?: "text" | "textarea" | "number" | "date" | "time" | "toggle" | "choiceset";
|
|
146
|
+
value?: string;
|
|
147
|
+
choices?: ChoicesItem[];
|
|
139
148
|
}
|
|
140
149
|
export interface CheckParamResult {
|
|
141
150
|
requiredNum: number;
|
|
@@ -145,6 +154,8 @@ export interface CheckParamResult {
|
|
|
145
154
|
export interface ParseOptions {
|
|
146
155
|
allowMissingId?: boolean;
|
|
147
156
|
allowSwagger?: boolean;
|
|
157
|
+
allowAPIKeyAuth?: boolean;
|
|
158
|
+
allowMultipleParameters?: boolean;
|
|
148
159
|
}
|
|
149
160
|
export interface APIInfo {
|
|
150
161
|
method: string;
|
|
@@ -153,5 +164,12 @@ export interface APIInfo {
|
|
|
153
164
|
id: string;
|
|
154
165
|
parameters: Parameter[];
|
|
155
166
|
description: string;
|
|
167
|
+
warning?: WarningResult;
|
|
168
|
+
}
|
|
169
|
+
export interface ListAPIResult {
|
|
170
|
+
api: string;
|
|
171
|
+
server: string;
|
|
172
|
+
operationId: string;
|
|
173
|
+
auth?: OpenAPIV3.ApiKeySecurityScheme;
|
|
156
174
|
}
|
|
157
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;IACpD,mBAAmB,0BAA0B;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
|
ErrorType["NoExtraAPICanBeAdded"] = "no-extra-api-can-be-added";
|
|
18
18
|
ErrorType["ResolveServerUrlFailed"] = "resolve-server-url-failed";
|
|
19
19
|
ErrorType["SwaggerNotSupported"] = "swagger-not-supported";
|
|
20
|
+
ErrorType["MultipleAPIKeyNotSupported"] = "multiple-api-key-not-supported";
|
|
20
21
|
ErrorType["ListFailed"] = "list-failed";
|
|
21
|
-
ErrorType["
|
|
22
|
+
ErrorType["listSupportedAPIInfoFailed"] = "list-supported-api-info-failed";
|
|
22
23
|
ErrorType["FilterSpecFailed"] = "filter-spec-failed";
|
|
23
24
|
ErrorType["UpdateManifestFailed"] = "update-manifest-failed";
|
|
24
25
|
ErrorType["GenerateAdaptiveCardFailed"] = "generate-adaptive-card-failed";
|
|
@@ -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,6 +1,7 @@
|
|
|
1
1
|
import { OpenAPIV3 } from "openapi-types";
|
|
2
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 generateCommands(spec: OpenAPIV3.Document, adaptiveCardFolder: string, manifestPath: string): Promise<[IMessagingExtensionCommand[], WarningResult[]]>;
|
|
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;
|
|
6
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;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,
|
|
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,7 +2,7 @@
|
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
3
|
"use strict";
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.generateCommands = exports.updateManifest = void 0;
|
|
5
|
+
exports.getRelativePath = exports.generateCommands = exports.updateManifest = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
8
8
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
@@ -10,20 +10,29 @@ 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
|
-
async function updateManifest(manifestPath, outputSpecPath, adaptiveCardFolder, spec) {
|
|
14
|
-
var _a;
|
|
13
|
+
async function updateManifest(manifestPath, outputSpecPath, adaptiveCardFolder, spec, allowMultipleParameters, apiKeyAuthName) {
|
|
14
|
+
var _a, _b;
|
|
15
15
|
try {
|
|
16
16
|
const originalManifest = await fs_extra_1.default.readJSON(manifestPath);
|
|
17
|
-
const [commands, warnings] = await generateCommands(spec, adaptiveCardFolder, manifestPath);
|
|
17
|
+
const [commands, warnings] = await generateCommands(spec, adaptiveCardFolder, manifestPath, allowMultipleParameters);
|
|
18
18
|
const ComposeExtension = {
|
|
19
19
|
composeExtensionType: "apiBased",
|
|
20
|
-
apiSpecificationFile:
|
|
20
|
+
apiSpecificationFile: getRelativePath(manifestPath, outputSpecPath),
|
|
21
21
|
commands: commands,
|
|
22
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
|
+
}
|
|
23
32
|
const updatedPart = {
|
|
24
33
|
description: {
|
|
25
|
-
short: spec.info.title,
|
|
26
|
-
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),
|
|
27
36
|
},
|
|
28
37
|
composeExtensions: [ComposeExtension],
|
|
29
38
|
};
|
|
@@ -35,7 +44,7 @@ async function updateManifest(manifestPath, outputSpecPath, adaptiveCardFolder,
|
|
|
35
44
|
}
|
|
36
45
|
}
|
|
37
46
|
exports.updateManifest = updateManifest;
|
|
38
|
-
async function generateCommands(spec, adaptiveCardFolder, manifestPath) {
|
|
47
|
+
async function generateCommands(spec, adaptiveCardFolder, manifestPath, allowMultipleParameters) {
|
|
39
48
|
const paths = spec.paths;
|
|
40
49
|
const commands = [];
|
|
41
50
|
const warnings = [];
|
|
@@ -49,10 +58,10 @@ async function generateCommands(spec, adaptiveCardFolder, manifestPath) {
|
|
|
49
58
|
if (method === constants_1.ConstantString.PostMethod || method === constants_1.ConstantString.GetMethod) {
|
|
50
59
|
const operationItem = operations[method];
|
|
51
60
|
if (operationItem) {
|
|
52
|
-
const [command, warning] = utils_1.parseApiInfo(operationItem);
|
|
61
|
+
const [command, warning] = utils_1.parseApiInfo(operationItem, allowMultipleParameters);
|
|
53
62
|
const adaptiveCardPath = path_1.default.join(adaptiveCardFolder, command.id + ".json");
|
|
54
63
|
command.apiResponseRenderingTemplateFile = (await fs_extra_1.default.pathExists(adaptiveCardPath))
|
|
55
|
-
?
|
|
64
|
+
? getRelativePath(manifestPath, adaptiveCardPath)
|
|
56
65
|
: "";
|
|
57
66
|
if (warning) {
|
|
58
67
|
warnings.push(warning);
|
|
@@ -67,4 +76,9 @@ async function generateCommands(spec, adaptiveCardFolder, manifestPath) {
|
|
|
67
76
|
return [commands, warnings];
|
|
68
77
|
}
|
|
69
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;
|
|
70
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,gEAA0B;AAC1B,wDAAwB;AACxB,6CAAwD;AACxD,
|
|
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,EAA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,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, allowMissingId: boolean): OpenAPIV3.Document;
|
|
2
|
+
export declare function specFilter(filter: string[], unResolveSpec: OpenAPIV3.Document, resolvedSpec: OpenAPIV3.Document, allowMissingId: boolean, allowAPIKeyAuth: boolean, allowMultipleParameters: 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,EAChC,cAAc,EAAE,OAAO,
|
|
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,GAC/B,SAAS,CAAC,QAAQ,CA2CpB"}
|
|
@@ -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, allowMissingId) {
|
|
10
|
+
function specFilter(filter, unResolveSpec, resolvedSpec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters) {
|
|
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, allowMissingId)) {
|
|
17
|
+
if (!utils_1.isSupportedApi(methodName, path, resolvedSpec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters)) {
|
|
18
18
|
continue;
|
|
19
19
|
}
|
|
20
20
|
if (!newPaths[path]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specFilter.js","sourceRoot":"","sources":["../../../src/common/spec-parser/specFilter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAGb,mCAAiE;AACjE,uDAAoD;AACpD,6CAAyC;AACzC,2CAA6C;AAE7C,SAAgB,UAAU,CACxB,MAAgB,EAChB,aAAiC,EACjC,YAAgC,EAChC,cAAuB;
|
|
1
|
+
{"version":3,"file":"specFilter.js","sourceRoot":"","sources":["../../../src/common/spec-parser/specFilter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAGb,mCAAiE;AACjE,uDAAoD;AACpD,6CAAyC;AACzC,2CAA6C;AAE7C,SAAgB,UAAU,CACxB,MAAgB,EAChB,aAAiC,EACjC,YAAgC,EAChC,cAAuB,EACvB,eAAwB,EACxB,uBAAgC;IAEhC,IAAI;QACF,MAAM,OAAO,qBAAQ,aAAa,CAAE,CAAC;QACrC,MAAM,QAAQ,GAA0B,EAAE,CAAC;QAC3C,KAAK,MAAM,UAAU,IAAI,MAAM,EAAE;YAC/B,MAA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Result, ParseOptions, ValidateResult, ListAPIResult } from "./interfaces";
|
|
4
|
+
/**
|
|
5
|
+
* A class that parses an OpenAPI specification file and provides methods to validate, list, and generate artifacts.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SpecParser {
|
|
8
|
+
readonly pathOrSpec: string | OpenAPIV3.Document;
|
|
9
|
+
readonly parser: SwaggerParser;
|
|
10
|
+
readonly options: Required<ParseOptions>;
|
|
11
|
+
private apiMap;
|
|
12
|
+
private spec;
|
|
13
|
+
private unResolveSpec;
|
|
14
|
+
private isSwaggerFile;
|
|
15
|
+
private defaultOptions;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new instance of the SpecParser class.
|
|
18
|
+
* @param pathOrDoc The path to the OpenAPI specification file or the OpenAPI specification object.
|
|
19
|
+
* @param options The options for parsing the OpenAPI specification file.
|
|
20
|
+
*/
|
|
21
|
+
constructor(pathOrDoc: string | OpenAPIV3.Document, options?: ParseOptions);
|
|
22
|
+
/**
|
|
23
|
+
* Validates the OpenAPI specification file and returns a validation result.
|
|
24
|
+
*
|
|
25
|
+
* @returns A validation result object that contains information about any errors or warnings in the specification file.
|
|
26
|
+
*/
|
|
27
|
+
validate(): Promise<ValidateResult>;
|
|
28
|
+
listSupportedAPIInfo(): Promise<APIInfo[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Lists all the OpenAPI operations in the specification file.
|
|
31
|
+
* @returns A string array that represents the HTTP method and path of each operation, such as ['GET /pets/{petId}', 'GET /user/{userId}']
|
|
32
|
+
* according to copilot plugin spec, only list get and post method without auth
|
|
33
|
+
*/
|
|
34
|
+
list(): Promise<ListAPIResult[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
|
|
37
|
+
* @param manifestPath A file path of the Teams app manifest file to update.
|
|
38
|
+
* @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
|
|
39
|
+
* @param outputSpecPath File path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
|
|
40
|
+
* @param adaptiveCardFolder Folder path where the Adaptive Card files will be generated. If not specified or empty, Adaptive Card files will not be generated.
|
|
41
|
+
*/
|
|
42
|
+
generate(manifestPath: string, filter: string[], outputSpecPath: string, adaptiveCardFolder: string, signal?: AbortSignal): Promise<GenerateResult>;
|
|
43
|
+
private loadSpec;
|
|
44
|
+
private getAllSupportedAPIs;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=specParser.browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specParser.browser.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/specParser.browser.ts"],"names":[],"mappings":"AAIA,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EACL,OAAO,EAEP,cAAc,EACd,YAAY,EACZ,cAAc,EAGd,aAAa,EACd,MAAM,cAAc,CAAC;AAKtB;;GAEG;AACH,qBAAa,UAAU;IACrB,SAAgB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC;IACxD,SAAgB,MAAM,EAAE,aAAa,CAAC;IACtC,SAAgB,OAAO,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEhD,OAAO,CAAC,MAAM,CAA0D;IACxE,OAAO,CAAC,IAAI,CAAiC;IAC7C,OAAO,CAAC,aAAa,CAAiC;IACtD,OAAO,CAAC,aAAa,CAAsB;IAE3C,OAAO,CAAC,cAAc,CAKpB;IAEF;;;;OAIG;gBACS,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,YAAY;IAS1E;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC;IAoCnC,oBAAoB,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IA0ChD;;;;OAIG;IAEG,IAAI,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAItC;;;;;;OAMG;IAEG,QAAQ,CACZ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EAAE,EAChB,cAAc,EAAE,MAAM,EACtB,kBAAkB,EAAE,MAAM,EAC1B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,cAAc,CAAC;YAIZ,QAAQ;IAYtB,OAAO,CAAC,mBAAmB;CAe5B"}
|