@microsoft/teamsfx-core 2.0.7-alpha.bdb04bd16.0 → 2.0.7-alpha.c341ae107.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 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +3 -1
- package/build/common/constants.js.map +1 -1
- package/build/common/featureFlags.d.ts +1 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +5 -1
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/local/packageJsonHelper.d.ts.map +1 -1
- package/build/common/local/packageJsonHelper.js +1 -2
- package/build/common/local/packageJsonHelper.js.map +1 -1
- package/build/common/m365/packageService.d.ts +1 -0
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +13 -0
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/projectTypeChecker.d.ts.map +1 -1
- package/build/common/projectTypeChecker.js +1 -2
- package/build/common/projectTypeChecker.js.map +1 -1
- package/build/common/samples.d.ts +3 -2
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +84 -40
- package/build/common/samples.js.map +1 -1
- package/build/common/templates-config.json +1 -1
- package/build/component/coordinator/index.d.ts +8 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +36 -4
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts +1 -0
- package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.js +14 -0
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/apiKey/create.js +2 -2
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +5 -5
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +30 -0
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +63 -0
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +3 -0
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +3 -0
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +63 -14
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.d.ts +21 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.js +5 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.d.ts +17 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.js +16 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.d.ts +41 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.js +5 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.js.map +1 -0
- package/build/component/generator/copilotPlugin/generator.d.ts +3 -2
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/generator.js +31 -15
- package/build/component/generator/copilotPlugin/generator.js.map +1 -1
- package/build/component/generator/copilotPlugin/helper.d.ts +1 -1
- package/build/component/generator/copilotPlugin/helper.js +19 -19
- package/build/component/generator/copilotPlugin/helper.js.map +1 -1
- package/build/component/generator/error.d.ts +1 -1
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +4 -4
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generator.d.ts +5 -0
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +27 -25
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +5 -15
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +44 -92
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.d.ts +1 -0
- package/build/component/generator/officeAddin/config/projectProperties.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.js +1 -0
- package/build/component/generator/officeAddin/config/projectProperties.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts +1 -4
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.js +4 -11
- package/build/component/generator/officeAddin/config/projectsJsonData.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +7 -6
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts +2 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +21 -10
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/utils.d.ts +0 -1
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +26 -18
- package/build/component/generator/utils.js.map +1 -1
- package/build/core/FxCore.js +3 -3
- package/build/core/FxCore.js.map +1 -1
- package/build/error/arm.d.ts.map +1 -1
- package/build/error/arm.js +0 -2
- package/build/error/arm.js.map +1 -1
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +1 -1
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +17 -6
- package/build/error/deploy.js.map +1 -1
- package/build/question/create.d.ts +17 -0
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +293 -35
- package/build/question/create.js.map +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts +16 -4
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +52 -8
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/questionNames.d.ts +9 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +8 -0
- package/build/question/questionNames.js.map +1 -1
- package/package.json +6 -6
- package/resource/package.nls.json +100 -56
- 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/Enable SSO.txt +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts +0 -7
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +0 -1
- package/build/common/spec-parser/adaptiveCardGenerator.js +0 -168
- package/build/common/spec-parser/adaptiveCardGenerator.js.map +0 -1
- package/build/common/spec-parser/adaptiveCardWrapper.d.ts +0 -15
- package/build/common/spec-parser/adaptiveCardWrapper.d.ts.map +0 -1
- package/build/common/spec-parser/adaptiveCardWrapper.js +0 -98
- package/build/common/spec-parser/adaptiveCardWrapper.js.map +0 -1
- package/build/common/spec-parser/constants.d.ts +0 -41
- package/build/common/spec-parser/constants.d.ts.map +0 -1
- package/build/common/spec-parser/constants.js +0 -95
- package/build/common/spec-parser/constants.js.map +0 -1
- package/build/common/spec-parser/index.browser.d.ts +0 -6
- package/build/common/spec-parser/index.browser.d.ts.map +0 -1
- package/build/common/spec-parser/index.browser.js +0 -16
- package/build/common/spec-parser/index.browser.js.map +0 -1
- package/build/common/spec-parser/index.d.ts +0 -5
- package/build/common/spec-parser/index.d.ts.map +0 -1
- package/build/common/spec-parser/index.js +0 -16
- package/build/common/spec-parser/index.js.map +0 -1
- package/build/common/spec-parser/interfaces.d.ts +0 -180
- package/build/common/spec-parser/interfaces.d.ts.map +0 -1
- package/build/common/spec-parser/interfaces.js +0 -51
- package/build/common/spec-parser/interfaces.js.map +0 -1
- package/build/common/spec-parser/manifestUpdater.d.ts +0 -7
- package/build/common/spec-parser/manifestUpdater.d.ts.map +0 -1
- package/build/common/spec-parser/manifestUpdater.js +0 -98
- package/build/common/spec-parser/manifestUpdater.js.map +0 -1
- package/build/common/spec-parser/specFilter.d.ts +0 -3
- package/build/common/spec-parser/specFilter.d.ts.map +0 -1
- package/build/common/spec-parser/specFilter.js +0 -40
- package/build/common/spec-parser/specFilter.js.map +0 -1
- package/build/common/spec-parser/specParser.browser.d.ts +0 -46
- package/build/common/spec-parser/specParser.browser.d.ts.map +0 -1
- package/build/common/spec-parser/specParser.browser.js +0 -139
- package/build/common/spec-parser/specParser.browser.js.map +0 -1
- package/build/common/spec-parser/specParser.d.ts +0 -46
- package/build/common/spec-parser/specParser.d.ts.map +0 -1
- package/build/common/spec-parser/specParser.js +0 -244
- package/build/common/spec-parser/specParser.js.map +0 -1
- package/build/common/spec-parser/specParserError.d.ts +0 -6
- package/build/common/spec-parser/specParserError.d.ts.map +0 -1
- package/build/common/spec-parser/specParserError.js +0 -13
- package/build/common/spec-parser/specParserError.js.map +0 -1
- package/build/common/spec-parser/utils.d.ts +0 -43
- package/build/common/spec-parser/utils.d.ts.map +0 -1
- package/build/common/spec-parser/utils.js +0 -587
- package/build/common/spec-parser/utils.js.map +0 -1
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"core.provision.azureAccount": "Azure account: %s",
|
|
5
5
|
"core.provision.azureSubscription": "Azure subscription: %s",
|
|
6
6
|
"core.provision.m365Account": "Microsoft 365 account: %s",
|
|
7
|
-
"core.provision.confirmEnvAndCostNotice": "
|
|
8
|
-
"core.deploy.confirmEnvNoticeV3": "Do you want to
|
|
7
|
+
"core.provision.confirmEnvAndCostNotice": "Costs may apply based on usage. Do you want to provision resources in %s environment using listed accounts?",
|
|
8
|
+
"core.deploy.confirmEnvNoticeV3": "Do you want to provision resources in %s environment?",
|
|
9
9
|
"core.provision.viewResources": "View provisioned resources",
|
|
10
|
-
"core.deploy.aadManifestSuccessNotice": "Your Microsoft Entra
|
|
11
|
-
"core.deploy.aadManifestOnCLISuccessNotice": "Your Microsoft Entra
|
|
10
|
+
"core.deploy.aadManifestSuccessNotice": "Your Microsoft Entra app has been deployed successfully. To view that, click \"Learn more\"",
|
|
11
|
+
"core.deploy.aadManifestOnCLISuccessNotice": "Your Microsoft Entra app has been updated successfully.",
|
|
12
12
|
"core.deploy.aadManifestLearnMore": "Learn more",
|
|
13
|
-
"core.deploy.botTroubleShoot": "To troubleshoot bot application in
|
|
13
|
+
"core.deploy.botTroubleShoot": "To troubleshoot your bot application in Azure, click \"Learn more\" for documentation.",
|
|
14
14
|
"core.deploy.botTroubleShoot.learnMore": "Learn more",
|
|
15
15
|
"core.option.deploy": "Deploy",
|
|
16
16
|
"core.option.confirm": "Confirm",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"core.option.upgrade": "Upgrade",
|
|
19
19
|
"core.option.moreInfo": "More Info",
|
|
20
20
|
"core.progress.create": "Create",
|
|
21
|
-
"core.progress.createFromTemplate": "
|
|
22
|
-
"core.progress.createFromSample": "
|
|
21
|
+
"core.progress.createFromTemplate": "App template download in progress...",
|
|
22
|
+
"core.progress.createFromSample": "Sample %s download in progress...",
|
|
23
23
|
"core.progress.deploy": "Deploy",
|
|
24
24
|
"core.progress.publish": "Publish",
|
|
25
25
|
"core.progress.provision": "Provision",
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
"core.projectVersionChecker.incompatibleProject": "The current project is incompatible with the installed version of Teams Toolkit.",
|
|
39
39
|
"core.projectVersionChecker.vs.incompatibleProject": "The project in the solution is created with Teams Toolkit preview feature - Teams App Configuration Improvements. You can turn on the preview feature to continue.",
|
|
40
40
|
"core.deployArmTemplates.ActionSuccess": "Successfully deployed ARM templates. Resource group name: %s. Deployment name: %s",
|
|
41
|
-
"core.collaboration.ListCollaboratorsSuccess": "'List Microsoft 365 App owners
|
|
41
|
+
"core.collaboration.ListCollaboratorsSuccess": "'List of Microsoft 365 App owners is successful, you can view it in [Output panel](%s).",
|
|
42
42
|
"core.collaboration.GrantingPermission": "Granting permission",
|
|
43
|
-
"core.collaboration.EmailCannotBeEmptyOrSame": "
|
|
44
|
-
"core.collaboration.CannotFindUserInCurrentTenant": "
|
|
43
|
+
"core.collaboration.EmailCannotBeEmptyOrSame": "Provide collaborator's email and make sure it's not the current user's email.",
|
|
44
|
+
"core.collaboration.CannotFindUserInCurrentTenant": "User not found in current tenant. Provide correct email address",
|
|
45
45
|
"core.collaboration.GrantPermissionForUser": "Grant permission for user %s",
|
|
46
46
|
"core.collaboration.AccountToGrantPermission": "Account to grant permission: ",
|
|
47
47
|
"core.collaboration.StartingGrantPermission": "Starting to grant permission for environment: ",
|
|
48
48
|
"core.collaboration.TenantId": "Tenant ID: ",
|
|
49
|
-
"core.collaboration.PermissionHasBeenGrantTo": "
|
|
49
|
+
"core.collaboration.PermissionHasBeenGrantTo": "Permission granted to ",
|
|
50
50
|
"core.collaboration.GrantPermissionResourceId": ", Resource ID: ",
|
|
51
51
|
"core.collaboration.ListingM365Permission": "Listing Microsoft 365 permissions\n",
|
|
52
52
|
"core.collaboration.AccountUsedToCheck": "Account used to check: ",
|
|
@@ -61,43 +61,43 @@
|
|
|
61
61
|
"core.collaboration.Undefined": "undefined",
|
|
62
62
|
"core.collaboration.ResourceName": ", Resource Name: ",
|
|
63
63
|
"core.collaboration.Permission": ", Permission: ",
|
|
64
|
-
"core.developerPortal.scaffold.CannotFindManifest": "
|
|
64
|
+
"core.developerPortal.scaffold.CannotFindManifest": "Manifest not found from the downloaded package for Teams app %s.",
|
|
65
65
|
"plugins.spfx.questions.framework.title": "Framework",
|
|
66
66
|
"plugins.spfx.questions.webpartName": "Name for SharePoint Framework Web Part",
|
|
67
67
|
"plugins.spfx.questions.webpartName.error.duplicate": "The folder %s already exists. Choose a different name for your component.",
|
|
68
68
|
"plugins.spfx.questions.webpartName.error.notMatch": "%s doesn't match pattern: %s",
|
|
69
69
|
"plugins.spfx.questions.packageSelect.title": "SharePoint Framework",
|
|
70
|
-
"plugins.spfx.questions.packageSelect.placeholder": "Select
|
|
70
|
+
"plugins.spfx.questions.packageSelect.placeholder": "Select option for scaffolding",
|
|
71
71
|
"plugins.spfx.questions.packageSelect.useGlobalPackage.withVersion.label": "Use globally installed SPFx (%s)",
|
|
72
72
|
"plugins.spfx.questions.packageSelect.useGlobalPackage.noVersion.label": "Use globally installed SPFx",
|
|
73
73
|
"plugins.spfx.questions.packageSelect.useGlobalPackage.detail": "SPFx %s or later",
|
|
74
74
|
"plugins.spfx.questions.packageSelect.installLocally.withVersion.label": "Install the latest SPFx (%s) locally in Teams Toolkit directory ",
|
|
75
75
|
"plugins.spfx.questions.packageSelect.installLocally.noVersion.label": "Install the latest SPFx locally in Teams Toolkit directory ",
|
|
76
76
|
"plugins.spfx.questions.spfxSolution.title": "SharePoint Solution",
|
|
77
|
-
"plugins.spfx.questions.spfxSolution.createNew": "Create
|
|
78
|
-
"plugins.spfx.questions.spfxSolution.createNew.detail": "Create
|
|
79
|
-
"plugins.spfx.questions.spfxSolution.importExisting": "Import
|
|
77
|
+
"plugins.spfx.questions.spfxSolution.createNew": "Create New SPFx Solution",
|
|
78
|
+
"plugins.spfx.questions.spfxSolution.createNew.detail": "Create Teams Tab application using SPFx web parts",
|
|
79
|
+
"plugins.spfx.questions.spfxSolution.importExisting": "Import Existing SPFx Solution",
|
|
80
80
|
"plugins.spfx.questions.spfxSolution.importExisting.detail": "Expose SPFx client-side web part as Microsoft Teams tab or personal app",
|
|
81
|
-
"plugins.spfx.deployNotice": "SharePoint package %s
|
|
82
|
-
"plugins.spfx.cannotFindPackage": "
|
|
83
|
-
"plugins.spfx.cannotGetSPOToken": "
|
|
84
|
-
"plugins.spfx.cannotGetGraphToken": "
|
|
85
|
-
"plugins.spfx.insufficientPermission": "
|
|
86
|
-
"plugins.spfx.createAppcatalogFail": "Unable to create tenant app catalog
|
|
87
|
-
"plugins.spfx.uploadAppcatalogFail": "Unable to upload app package
|
|
81
|
+
"plugins.spfx.deployNotice": "SharePoint package %s deployed successfully to [%s](%s).",
|
|
82
|
+
"plugins.spfx.cannotFindPackage": "Unable to find SharePoint package %s",
|
|
83
|
+
"plugins.spfx.cannotGetSPOToken": "Unable to get SPO access token",
|
|
84
|
+
"plugins.spfx.cannotGetGraphToken": "Unable to get Graph access token",
|
|
85
|
+
"plugins.spfx.insufficientPermission": "To upload and deploy package to App Catalog %s, you need org's Microsoft 365 tenant admin permissions. Get free Microsoft 365 tenant from [Microsoft 365 developer program](%s) for testing.",
|
|
86
|
+
"plugins.spfx.createAppcatalogFail": "Unable to create tenant app catalog due to %s, stack: %s",
|
|
87
|
+
"plugins.spfx.uploadAppcatalogFail": "Unable to upload app package due to %s",
|
|
88
88
|
"plugins.spfx.buildSharepointPackage": "Building SharePoint package",
|
|
89
89
|
"plugins.spfx.deploy.title": "Upload and deploy SharePoint package",
|
|
90
90
|
"plugins.spfx.scaffold.title": "Scaffolding project",
|
|
91
91
|
"plugins.spfx.error.npmInstallFailed": "Unable to run 'npm install' due to %s",
|
|
92
92
|
"plugins.spfx.error.invalidDependency": "Unable to validate package %s",
|
|
93
93
|
"plugins.spfx.error.noConfiguration": "There's no .yo-rc.json file in your SPFx project, add the configuration file and try again.",
|
|
94
|
-
"plugins.spfx.error.devEnvironmentNotSetup": "SPFx development environment
|
|
94
|
+
"plugins.spfx.error.devEnvironmentNotSetup": "Your SPFx development environment is not set up correctly. Click \"Get Help\" to set up the right environment.",
|
|
95
95
|
"plugins.spfx.scaffold.dependencyCheck": "Checking dependencies...",
|
|
96
|
-
"plugins.spfx.scaffold.dependencyInstall": "Installing dependencies. This may take more than 5 minutes
|
|
96
|
+
"plugins.spfx.scaffold.dependencyInstall": "Installing dependencies. This may take more than 5 minutes.",
|
|
97
97
|
"plugins.spfx.scaffold.scaffoldProject": "Generate SPFx project using Yeoman CLI",
|
|
98
98
|
"plugins.spfx.scaffold.updateManifest": "Update webpart manifest",
|
|
99
|
-
"plugins.spfx.GetTenantFailedError": "
|
|
100
|
-
"plugins.spfx.error.installLatestDependencyError": "
|
|
99
|
+
"plugins.spfx.GetTenantFailedError": "Unable to get tenant %s %s",
|
|
100
|
+
"plugins.spfx.error.installLatestDependencyError": "Unable to set up SPFx environment in %s folder. To set up global SPFx environment, follow [Set up your SharePoint Framework development environment | Microsoft Learn](%s).",
|
|
101
101
|
"_plugins.spfx.error.installLatestDependencyError.comment": "'Microsoft Learn' and 'SharePoint' are the product brand names which should not be localized.",
|
|
102
102
|
"plugins.spfx.error.scaffoldError": "Project creation failed. A possible reason could be from Yeoman SharePoint Generator. Check [Output panel](%s) for details.",
|
|
103
103
|
"plugins.spfx.error.import.retrieveSolutionInfo": "Failed to retrieve existing SPFx solution information. Please make sure your SPFx solution is valid.",
|
|
@@ -159,45 +159,45 @@
|
|
|
159
159
|
"plugins.bot.triggers.http-and-timer-functions.detail": "A running function hosted on Azure Functions can listen to HTTP requests and respond based on a specific schedule.",
|
|
160
160
|
"plugins.bot.triggers.http-and-timer-functions.label": "HTTP and Timer Trigger",
|
|
161
161
|
"plugins.bot.triggers.http-restify.description": "Restify Server",
|
|
162
|
-
"plugins.bot.triggers.http-restify.detail": "A
|
|
162
|
+
"plugins.bot.triggers.http-restify.detail": "A restify server running on Azure App Service can respond to HTTP requests.",
|
|
163
163
|
"plugins.bot.triggers.http-restify.label": "HTTP Trigger",
|
|
164
164
|
"plugins.bot.triggers.http-webapi.description": "Web API Server",
|
|
165
|
-
"plugins.bot.triggers.http-webapi.detail": "A
|
|
165
|
+
"plugins.bot.triggers.http-webapi.detail": "A Web API server running on Azure App Service can respond to HTTP requests.",
|
|
166
166
|
"plugins.bot.triggers.http-webapi.label": "HTTP Trigger",
|
|
167
167
|
"plugins.bot.triggers.timer-functions.description": "Azure Functions",
|
|
168
|
-
"plugins.bot.triggers.timer-functions.detail": "A
|
|
168
|
+
"plugins.bot.triggers.timer-functions.detail": "A function running on Azure Functions can respond based on a specific schedule.",
|
|
169
169
|
"plugins.bot.triggers.timer-functions.label": "Timer Trigger",
|
|
170
|
-
"error.NoProjectOpenedError": "No project
|
|
170
|
+
"error.NoProjectOpenedError": "No project is currently open. Create a new project or open an existing one.",
|
|
171
171
|
"error.InvalidEnvNameError": "Environment name can only contain letters, digits, _ and -.",
|
|
172
|
-
"error.UpgradeV3CanceledError": "
|
|
172
|
+
"error.UpgradeV3CanceledError": "Don't want to upgrade? Continue using old version of Teams Toolkit",
|
|
173
173
|
"error.InvalidInputError": "Invalid inputs: %s",
|
|
174
174
|
"error.ProjectEnvAlreadyExistError": "Project environment %s already exists.",
|
|
175
175
|
"error.NotImplementedError": "Method not implemented: %s",
|
|
176
176
|
"error.FailedToParseResourceIdError": "Unable to get '%s' from resource id: '%s'",
|
|
177
177
|
"error.NoSubscriptionFound": "Unable to find a subscription.",
|
|
178
|
-
"error.TrustCertificateCancelError": "User canceled. For Teams to trust the self-signed SSL certificate used by the toolkit,
|
|
179
|
-
"error.VideoFilterAppNotRemoteSupported": "
|
|
180
|
-
"error.appstudio.teamsAppCreateFailed": "Unable to create Teams app in Teams Developer Portal
|
|
181
|
-
"error.appstudio.teamsAppUpdateFailed": "Unable to update Teams app with ID %s in Teams Developer Portal
|
|
182
|
-
"error.appstudio.apiFailed": "API call to Developer Portal
|
|
178
|
+
"error.TrustCertificateCancelError": "User canceled. For Teams to trust the self-signed SSL certificate used by the toolkit, add the certificate to your certificate store.",
|
|
179
|
+
"error.VideoFilterAppNotRemoteSupported": "Teams Toolkit doesn't support video filter app in remote. Check the README.md file in project root folder.",
|
|
180
|
+
"error.appstudio.teamsAppCreateFailed": "Unable to create Teams app in Teams Developer Portal due to %s",
|
|
181
|
+
"error.appstudio.teamsAppUpdateFailed": "Unable to update Teams app with ID %s in Teams Developer Portal due to %s",
|
|
182
|
+
"error.appstudio.apiFailed": "Unable to make API call to Developer Portal. Check [Output panel](command:fx-extension.showOutputChannel) for details.",
|
|
183
183
|
"_error.appstudio.apiFailed.comment": " This is to describe API call, no need to translate '(command:fx-extension.showOutputChannel)'. ",
|
|
184
|
-
"error.appstudio.apiFailed.telemetry": "API call to Developer Portal
|
|
185
|
-
"_error.appstudio.apiFailed.telemetry.comment": "
|
|
186
|
-
"error.appstudio.authServiceApiFailed": "API call to Developer Portal
|
|
184
|
+
"error.appstudio.apiFailed.telemetry": "Unable to make API call to Developer Portal: %s, %s, API name: %s, X-Correlation-ID: %s. This may be due to a temporary service error. Try again after a few minutes.",
|
|
185
|
+
"_error.appstudio.apiFailed.telemetry.comment": "This is to describe API call, no need to translate 'X-Correlation-ID'.",
|
|
186
|
+
"error.appstudio.authServiceApiFailed": "Unable to make API call to Developer Portal: %s, %s, Request path: %s",
|
|
187
187
|
"error.appstudio.publishFailed": "Unable to publish Teams app with ID %s.",
|
|
188
|
-
"error.appstudio.buildError": "Teams Package
|
|
189
|
-
"error.appstudio.checkPermissionFailed": "
|
|
190
|
-
"error.appstudio.grantPermissionFailed": "
|
|
191
|
-
"error.appstudio.listCollaboratorFailed": "
|
|
192
|
-
"error.appstudio.updateManifestInvalidApp": "
|
|
188
|
+
"error.appstudio.buildError": "Unable to build Teams Package!",
|
|
189
|
+
"error.appstudio.checkPermissionFailed": "Unable to check permission. Reason: %s",
|
|
190
|
+
"error.appstudio.grantPermissionFailed": "Unable to grant permission. Reason: %s",
|
|
191
|
+
"error.appstudio.listCollaboratorFailed": "Unable to list collaborators. Reason: %s",
|
|
192
|
+
"error.appstudio.updateManifestInvalidApp": "Unable to find Teams app with ID %s. Run debug or provision before updating manifest to Teams platform.",
|
|
193
193
|
"error.appstudio.invalidCapability": "Invalid capability: %s",
|
|
194
|
-
"error.appstudio.capabilityExceedLimit": "
|
|
195
|
-
"error.appstudio.staticTabNotExist": "
|
|
196
|
-
"error.appstudio.capabilityNotExist": "
|
|
197
|
-
"error.appstudio.noManifestId": "Invalid
|
|
194
|
+
"error.appstudio.capabilityExceedLimit": "Unable to add capability %s as it has reached its limit.",
|
|
195
|
+
"error.appstudio.staticTabNotExist": "As static tab with entity ID %s is not found, we can't update it.",
|
|
196
|
+
"error.appstudio.capabilityNotExist": "As capability %s doesn't exist in manifest, we can't update it.",
|
|
197
|
+
"error.appstudio.noManifestId": "Invalid ID found in manifest find.",
|
|
198
198
|
"error.appstudio.validateFetchSchemaFailed": "Unable to get schema from %s, message: %s",
|
|
199
199
|
"error.appstudio.validateSchemaNotDefined": "Manifest schema is not defined",
|
|
200
|
-
"error.appstudio.publishInDevPortalSuggestionForValidationError": "
|
|
200
|
+
"error.appstudio.publishInDevPortalSuggestionForValidationError": "Generate package from \"Zip Teams app package\" and try again.",
|
|
201
201
|
"error.appstudio.teamsAppCreateConflict": "Unable to create Teams app with 409 Conflict error. That may come from your app id is conflicting with another app in your tenant. Click Get Help to learn more.",
|
|
202
202
|
"error.appstudio.teamsAppCreateConflictWithPublishedApp": "A Teams app with that id already exists in your organization's app store. Manually update the app id and try again.",
|
|
203
203
|
"error.appstudio.teamsAppPublishConflict": "Unable to publish Teams app. Teams app with id %s already exists in the staged apps. Manually update the app id and try again.",
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"_error.appstudio.BotProvisionReturnsForbiddenResult.comment": "This is to describe API call, no need to translate 'Botframework'.",
|
|
208
208
|
"error.appstudio.BotProvisionReturnsConflictResult": "Botframework provisioning returns conflict result from attempting to create bot registration.",
|
|
209
209
|
"_error.appstudio.BotProvisionReturnsConflictResult.comment": "This is to describe API call, no need to translate 'Botframework'.",
|
|
210
|
-
"error.generator.
|
|
210
|
+
"error.generator.ScaffoldLocalTemplateError": "Unable to scaffold template based on local zip package.",
|
|
211
211
|
"error.generator.TemplateNotFoundError": "Unable to find template: %s.",
|
|
212
212
|
"error.generator.SampleNotFoundError": "Unable to find sample: %s.",
|
|
213
213
|
"error.generator.UnzipError": "Unable to unzip templates and write to disk.",
|
|
@@ -222,7 +222,8 @@
|
|
|
222
222
|
"core.QuestionAppName.validation.maxlength": "Application name is longer than the maximum length of 30.",
|
|
223
223
|
"core.QuestionAppName.validation.pathExist": "Path exists: %s. Select a different application name.",
|
|
224
224
|
"core.QuestionAppName.validation.lengthWarning": "Your application name may exceed the maximum length of 30 characters because Teams Toolkit will automatically append a \"local\" suffix for the Teams application registered for local debugging purposes. You may continue, but make sure to update your application name in the \"manifest.json\" file.",
|
|
225
|
-
"core.ProgrammingLanguageQuestion.
|
|
225
|
+
"core.ProgrammingLanguageQuestion.title": "Programming Language",
|
|
226
|
+
"core.ProgrammingLanguageQuestion.placeholder": "Select a programming language",
|
|
226
227
|
"core.ProgrammingLanguageQuestion.placeholder.spfx": "SPFx is currently supporting TypeScript only.",
|
|
227
228
|
"core.option.tutorial": "Open tutorial",
|
|
228
229
|
"core.option.github": "Open a GitHub guide",
|
|
@@ -290,15 +291,55 @@
|
|
|
290
291
|
"core.createProjectQuestion.projectType.copilotPlugin.label": "Plugin",
|
|
291
292
|
"core.createProjectQuestion.projectType.copilotPlugin.title": "Plugin for Copilot",
|
|
292
293
|
"core.createProjectQuestion.projectType.copilotPlugin.placeholder": "Select an option",
|
|
294
|
+
"core.createProjectQuestion.projectType.customCopilot.detail": "Build intelligent chatbot in Microsoft Teams easily using Teams AI Library",
|
|
295
|
+
"core.createProjectQuestion.projectType.customCopilot.label": "Custom Copilot",
|
|
296
|
+
"core.createProjectQuestion.projectType.customCopilot.title": "App Features Using Teams AI Library",
|
|
297
|
+
"core.createProjectQuestion.projectType.customCopilot.placeholder": "Select an option",
|
|
293
298
|
"core.createProjectQuestion.title": "New Project",
|
|
294
299
|
"core.createProjectQuestion.capability.botMessageExtension.label": "Start with a Bot",
|
|
295
|
-
"core.createProjectQuestion.capability.botMessageExtension.detail": "Create a
|
|
300
|
+
"core.createProjectQuestion.capability.botMessageExtension.detail": "Create a message extension using Bot Framework",
|
|
296
301
|
"core.createProjectQuestion.capability.copilotPluginNewApiOption.label": "Start with a new API",
|
|
297
|
-
"core.createProjectQuestion.capability.copilotPluginNewApiOption.detail": "Create
|
|
302
|
+
"core.createProjectQuestion.capability.copilotPluginNewApiOption.detail": "Create an API plugin with a new API from Azure Functions",
|
|
303
|
+
"core.createProjectQuestion.capability.messageExtensionNewApiOption.detail": "Create a message extension with a new API from Azure Functions",
|
|
298
304
|
"core.createProjectQuestion.capability.copilotPluginApiSpecOption.label": "Start with an OpenAPI Description Document",
|
|
299
|
-
"core.createProjectQuestion.capability.copilotPluginApiSpecOption.detail": "Create
|
|
305
|
+
"core.createProjectQuestion.capability.copilotPluginApiSpecOption.detail": "Create an API plugin from your existing API",
|
|
306
|
+
"core.createProjectQuestion.capability.messageExtensionApiSpecOption.detail": "Create a message extension from your existing API",
|
|
300
307
|
"core.createProjectQuestion.capability.copilotPluginAIPluginOption.label": "Start with an OpenAI Plugin",
|
|
301
308
|
"core.createProjectQuestion.capability.copilotPluginAIPluginOption.detail": "Convert an OpenAI Plugin to Microsoft 365 Copilot plugin",
|
|
309
|
+
"core.createProjectQuestion.capability.customCopilotBasicOption.label": "Basic AI Chatbot",
|
|
310
|
+
"core.createProjectQuestion.capability.customCopilotBasicOption.detail": "Build a basic AI chatbot in Teams",
|
|
311
|
+
"core.createProjectQuestion.capability.customCopilotRagOption.label": "Chat With Your Data",
|
|
312
|
+
"core.createProjectQuestion.capability.customCopilotRagOption.detail": "Expand AI bot's knowledge with your content to get accurate answers to your questions",
|
|
313
|
+
"core.createProjectQuestion.capability.customCopilotAssistantOption.label": "AI Assistant",
|
|
314
|
+
"core.createProjectQuestion.capability.customCopilotAssistantOption.detail": "Build intelligent chatbot in Teams to complete everyday tasks efficiently",
|
|
315
|
+
"core.createProjectQuestion.capability.customCopilotRagCustomizeOption.label": "Customize",
|
|
316
|
+
"core.createProjectQuestion.capability.customCopilotRagCustomizeOption.detail": "Decide how to load your data",
|
|
317
|
+
"core.createProjectQuestion.capability.customCopilotRagAzureAISearchOption.label": "Azure AI Search",
|
|
318
|
+
"core.createProjectQuestion.capability.customCopilotRagAzureAISearchOption.detail": "Load your data from Azure AI Search service",
|
|
319
|
+
"core.createProjectQuestion.capability.customCopilotRagCustomApiOption.label": "Custom API",
|
|
320
|
+
"core.createProjectQuestion.capability.customCopilotRagCustomApiOption.detail": "Load your data from custom APIs based on OpenAPI description document",
|
|
321
|
+
"core.createProjectQuestion.capability.customCopilotRagMicrosoft365Option.label": "Microsoft 365",
|
|
322
|
+
"core.createProjectQuestion.capability.customCopilotRagMicrosoft365Option.detail": "Load your data from Microsoft Graph and SharePoint",
|
|
323
|
+
"core.createProjectQuestion.capability.customCopilotRag.title": "Chat With Your Data",
|
|
324
|
+
"core.createProjectQuestion.capability.customCopilotRag.placeholder": "Select an option to load your data",
|
|
325
|
+
"core.createProjectQuestion.capability.customCopilotAssistantNewOption.label": "Build New",
|
|
326
|
+
"core.createProjectQuestion.capability.customCopilotAssistantNewOption.detail": "Build your own AI Assistant from scratch using Teams AI Library",
|
|
327
|
+
"core.createProjectQuestion.capability.customCopilotAssistantAssistantsApiOption.label": "Build with Assistants API",
|
|
328
|
+
"core.createProjectQuestion.capability.customCopilotAssistantAssistantsApiOption.detail": "Build an intelligent AI Assistant with OpenAI Assistants API and Teams AI Library's built-in coordination",
|
|
329
|
+
"core.createProjectQuestion.capability.customCopilotAssistant.title": "AI Assistant",
|
|
330
|
+
"core.createProjectQuestion.capability.customCopilotAssistant.placeholder": "Choose how you want to manage your AI tasks",
|
|
331
|
+
"core.createProjectQuestion.llmService.title": "Service for Large Language Model (LLM)",
|
|
332
|
+
"core.createProjectQuestion.llmService.placeholder": "Select a service to access LLMs",
|
|
333
|
+
"core.createProjectQuestion.llmServiceOpenAIOption.label": "OpenAI",
|
|
334
|
+
"core.createProjectQuestion.llmServiceOpenAIOption.detail": "Access LLMs developed by OpenAI",
|
|
335
|
+
"core.createProjectQuestion.llmServiceAzureOpenAIOption.label": "Azure OpenAI",
|
|
336
|
+
"core.createProjectQuestion.llmServiceAzureOpenAIOption.detail": "Access powerful LLMs in OpenAI with Azure security and reliability",
|
|
337
|
+
"core.createProjectQuestion.llmService.openAIKey.title": "OpenAI Key",
|
|
338
|
+
"core.createProjectQuestion.llmService.openAIKey.placeholder": "Input OpenAI service key now or set it later in the project",
|
|
339
|
+
"core.createProjectQuestion.llmService.azureOpenAIKey.title": "Azure OpenAI Key",
|
|
340
|
+
"core.createProjectQuestion.llmService.azureOpenAIKey.placeholder": "Input Azure OpenAI service key now or set it later in the project",
|
|
341
|
+
"core.createProjectQuestion.llmService.azureOpenAIEndpoint.title": "Azure OpenAI Endpoint",
|
|
342
|
+
"core.createProjectQuestion.llmService.azureOpenAIEndpoint.placeholder": "Input Azure OpenAI service endpoint now or set it later in the project",
|
|
302
343
|
"core.createProjectQuestion.apiSpec.title": "OpenAPI Description Document",
|
|
303
344
|
"core.createProjectQuestion.apiSpec.placeholder": "Enter OpenAPI Description Document URL",
|
|
304
345
|
"core.createProjectQuestion.apiSpecInputUrl.label": "Enter OpenAPI Description Document Location",
|
|
@@ -311,6 +352,7 @@
|
|
|
311
352
|
"core.createProjectQuestion.invalidApiKey.message": "Client secret is invalid. The length of secret should be >= 10 and <= 128",
|
|
312
353
|
"core.createProjectQuestion.invalidUrl.message": "Enter a valid HTTP URL without authentication to access your OpenAPI description document.",
|
|
313
354
|
"core.createProjectQuestion.apiSpec.operation.title": "Select Operation(s) Teams Can Interact with",
|
|
355
|
+
"core.createProjectQuestion.apiSpec.copilotOperation.title": "Select Operation(s) Copilot Can Interact with",
|
|
314
356
|
"core.createProjectQuestion.apiSpec.operation.placeholder": "GET/POST methods with at most one required parameter and no auth are listed",
|
|
315
357
|
"core.createProjectQuestion.apiSpec.operation.apikey.placeholder": "GET/POST methods with at most one required parameter and API key are listed",
|
|
316
358
|
"core.createProjectQuestion.apiSpec.operation.invalidMessage": "%s API(s) selected. You can select at least one and at most %s APIs.",
|
|
@@ -344,8 +386,10 @@
|
|
|
344
386
|
"core.QuestionNewResourceGroupLocation.title": "Location for the new resource group",
|
|
345
387
|
"core.QuestionNewResourceGroupLocation.group.recommended": "Recommended",
|
|
346
388
|
"core.QuestionNewResourceGroupLocation.group.others": "Others",
|
|
347
|
-
"core.question.workspaceFolder.title": "Workspace
|
|
389
|
+
"core.question.workspaceFolder.title": "Workspace Folder",
|
|
348
390
|
"core.question.workspaceFolder.placeholder": "Select the folder that will contain your project root folder",
|
|
391
|
+
"core.question.appName.title": "Application Name",
|
|
392
|
+
"core.question.appName.placeholder": "Input an application name",
|
|
349
393
|
"core.ScratchOptionYes.label": "Create a new app",
|
|
350
394
|
"core.ScratchOptionYes.detail": "Use the Teams Toolkit to create a new Teams application.",
|
|
351
395
|
"core.ScratchOptionNo.label": "Start from a sample",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,7 +5,7 @@ On click of Visual Studio menu Project -> Teams Toolkit -> Add Authentication Co
|
|
|
5
5
|
|
|
6
6
|
Teams Toolkit helps you generate the authentication files, then you will need to link the files to your Teams application by updating authentication configurations to make sure the Single Sign-on works for your application. Please be noted that for different Teams application type like Tab or Bot, the detailed steps are slightly different.
|
|
7
7
|
|
|
8
|
-
Basically you will need take care these configurations:
|
|
8
|
+
Basically, you will need to take care of these configurations:
|
|
9
9
|
|
|
10
10
|
* In the Microsoft Entra manifest file, you need to specify URIs such as the URI to identify the Microsoft Entra authentication app and the redirect URI for returning token.
|
|
11
11
|
* In the Teams manifest file, add the SSO application to link it with Teams application.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpenAPIV3 } from "openapi-types";
|
|
2
|
-
import { AdaptiveCard, ArrayElement, ImageElement, TextBlockElement } from "./interfaces";
|
|
3
|
-
export declare function generateAdaptiveCard(operationItem: OpenAPIV3.OperationObject): [AdaptiveCard, string];
|
|
4
|
-
export declare function generateCardFromResponse(schema: OpenAPIV3.SchemaObject, name: string, parentArrayName?: string): Array<TextBlockElement | ImageElement | ArrayElement>;
|
|
5
|
-
export declare function getResponseJsonPathFromSchema(schema: OpenAPIV3.SchemaObject): string;
|
|
6
|
-
export declare function isImageUrlProperty(schema: OpenAPIV3.NonArraySchemaObject, name: string, parentArrayName: string): boolean;
|
|
7
|
-
//# sourceMappingURL=adaptiveCardGenerator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
"use strict";
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.isImageUrlProperty = exports.getResponseJsonPathFromSchema = exports.generateCardFromResponse = exports.generateAdaptiveCard = void 0;
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
|
-
const interfaces_1 = require("./interfaces");
|
|
8
|
-
const constants_1 = require("./constants");
|
|
9
|
-
const specParserError_1 = require("./specParserError");
|
|
10
|
-
function generateAdaptiveCard(operationItem) {
|
|
11
|
-
try {
|
|
12
|
-
const json = utils_1.getResponseJson(operationItem);
|
|
13
|
-
let cardBody = [];
|
|
14
|
-
let schema = json.schema;
|
|
15
|
-
let jsonPath = "$";
|
|
16
|
-
if (schema && Object.keys(schema).length > 0) {
|
|
17
|
-
jsonPath = getResponseJsonPathFromSchema(schema);
|
|
18
|
-
if (jsonPath !== "$") {
|
|
19
|
-
schema = schema.properties[jsonPath];
|
|
20
|
-
}
|
|
21
|
-
cardBody = generateCardFromResponse(schema, "");
|
|
22
|
-
}
|
|
23
|
-
// if no schema, try to use example value
|
|
24
|
-
if (cardBody.length === 0 && (json.examples || json.example)) {
|
|
25
|
-
cardBody = [
|
|
26
|
-
{
|
|
27
|
-
type: constants_1.ConstantString.TextBlockType,
|
|
28
|
-
text: "${jsonStringify($root)}",
|
|
29
|
-
wrap: true,
|
|
30
|
-
},
|
|
31
|
-
];
|
|
32
|
-
}
|
|
33
|
-
// if no example value, use default success response
|
|
34
|
-
if (cardBody.length === 0) {
|
|
35
|
-
cardBody = [
|
|
36
|
-
{
|
|
37
|
-
type: constants_1.ConstantString.TextBlockType,
|
|
38
|
-
text: "success",
|
|
39
|
-
wrap: true,
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
}
|
|
43
|
-
const fullCard = {
|
|
44
|
-
type: constants_1.ConstantString.AdaptiveCardType,
|
|
45
|
-
$schema: constants_1.ConstantString.AdaptiveCardSchema,
|
|
46
|
-
version: constants_1.ConstantString.AdaptiveCardVersion,
|
|
47
|
-
body: cardBody,
|
|
48
|
-
};
|
|
49
|
-
return [fullCard, jsonPath];
|
|
50
|
-
}
|
|
51
|
-
catch (err) {
|
|
52
|
-
throw new specParserError_1.SpecParserError(err.toString(), interfaces_1.ErrorType.GenerateAdaptiveCardFailed);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.generateAdaptiveCard = generateAdaptiveCard;
|
|
56
|
-
function generateCardFromResponse(schema, name, parentArrayName = "") {
|
|
57
|
-
if (schema.type === "array") {
|
|
58
|
-
// schema.items can be arbitrary object: schema { type: array, items: {} }
|
|
59
|
-
if (Object.keys(schema.items).length === 0) {
|
|
60
|
-
return [
|
|
61
|
-
{
|
|
62
|
-
type: constants_1.ConstantString.TextBlockType,
|
|
63
|
-
text: name ? `${name}: \${jsonStringify(${name})}` : "result: ${jsonStringify($root)}",
|
|
64
|
-
wrap: true,
|
|
65
|
-
},
|
|
66
|
-
];
|
|
67
|
-
}
|
|
68
|
-
const obj = generateCardFromResponse(schema.items, "", name);
|
|
69
|
-
const template = {
|
|
70
|
-
type: constants_1.ConstantString.ContainerType,
|
|
71
|
-
$data: name ? `\${${name}}` : "${$root}",
|
|
72
|
-
items: Array(),
|
|
73
|
-
};
|
|
74
|
-
template.items.push(...obj);
|
|
75
|
-
return [template];
|
|
76
|
-
}
|
|
77
|
-
// some schema may not contain type but contain properties
|
|
78
|
-
if (schema.type === "object" || (!schema.type && schema.properties)) {
|
|
79
|
-
const { properties } = schema;
|
|
80
|
-
const result = [];
|
|
81
|
-
for (const property in properties) {
|
|
82
|
-
const obj = generateCardFromResponse(properties[property], name ? `${name}.${property}` : property, parentArrayName);
|
|
83
|
-
result.push(...obj);
|
|
84
|
-
}
|
|
85
|
-
if (schema.additionalProperties) {
|
|
86
|
-
// TODO: better ways to handler warnings.
|
|
87
|
-
console.warn(constants_1.ConstantString.AdditionalPropertiesNotSupported);
|
|
88
|
-
}
|
|
89
|
-
return result;
|
|
90
|
-
}
|
|
91
|
-
if (schema.type === "string" ||
|
|
92
|
-
schema.type === "integer" ||
|
|
93
|
-
schema.type === "boolean" ||
|
|
94
|
-
schema.type === "number") {
|
|
95
|
-
if (!isImageUrlProperty(schema, name, parentArrayName)) {
|
|
96
|
-
// string in root: "ddd"
|
|
97
|
-
let text = "result: ${$root}";
|
|
98
|
-
if (name) {
|
|
99
|
-
// object { id: "1" }
|
|
100
|
-
text = `${name}: \${if(${name}, ${name}, 'N/A')}`;
|
|
101
|
-
if (parentArrayName) {
|
|
102
|
-
// object types inside array: { tags: ["id": 1, "name": "name"] }
|
|
103
|
-
text = `${parentArrayName}.${text}`;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
else if (parentArrayName) {
|
|
107
|
-
// string array: photoUrls: ["1", "2"]
|
|
108
|
-
text = `${parentArrayName}: ` + "${$data}";
|
|
109
|
-
}
|
|
110
|
-
return [
|
|
111
|
-
{
|
|
112
|
-
type: constants_1.ConstantString.TextBlockType,
|
|
113
|
-
text,
|
|
114
|
-
wrap: true,
|
|
115
|
-
},
|
|
116
|
-
];
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
if (name) {
|
|
120
|
-
return [
|
|
121
|
-
{
|
|
122
|
-
type: "Image",
|
|
123
|
-
url: `\${${name}}`,
|
|
124
|
-
$when: `\${${name} != null}`,
|
|
125
|
-
},
|
|
126
|
-
];
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
return [
|
|
130
|
-
{
|
|
131
|
-
type: "Image",
|
|
132
|
-
url: "${$data}",
|
|
133
|
-
$when: "${$data != null}",
|
|
134
|
-
},
|
|
135
|
-
];
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (schema.oneOf || schema.anyOf || schema.not || schema.allOf) {
|
|
140
|
-
throw new Error(utils_1.format(constants_1.ConstantString.SchemaNotSupported, JSON.stringify(schema)));
|
|
141
|
-
}
|
|
142
|
-
throw new Error(utils_1.format(constants_1.ConstantString.UnknownSchema, JSON.stringify(schema)));
|
|
143
|
-
}
|
|
144
|
-
exports.generateCardFromResponse = generateCardFromResponse;
|
|
145
|
-
// Find the first array property in the response schema object with the well-known name
|
|
146
|
-
function getResponseJsonPathFromSchema(schema) {
|
|
147
|
-
if (schema.type === "object" || (!schema.type && schema.properties)) {
|
|
148
|
-
const { properties } = schema;
|
|
149
|
-
for (const property in properties) {
|
|
150
|
-
const schema = properties[property];
|
|
151
|
-
if (schema.type === "array" &&
|
|
152
|
-
utils_1.isWellKnownName(property, constants_1.ConstantString.WellknownResultNames)) {
|
|
153
|
-
return property;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return "$";
|
|
158
|
-
}
|
|
159
|
-
exports.getResponseJsonPathFromSchema = getResponseJsonPathFromSchema;
|
|
160
|
-
function isImageUrlProperty(schema, name, parentArrayName) {
|
|
161
|
-
const propertyName = name ? name : parentArrayName;
|
|
162
|
-
return (!!propertyName &&
|
|
163
|
-
schema.type === "string" &&
|
|
164
|
-
utils_1.isWellKnownName(propertyName, constants_1.ConstantString.WellknownImageName) &&
|
|
165
|
-
(propertyName.toLocaleLowerCase().indexOf("url") >= 0 || schema.format === "uri"));
|
|
166
|
-
}
|
|
167
|
-
exports.isImageUrlProperty = isImageUrlProperty;
|
|
168
|
-
//# sourceMappingURL=adaptiveCardGenerator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;QAE5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Y,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"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AdaptiveCard, PreviewCardTemplate, WrappedAdaptiveCard } from "./interfaces";
|
|
2
|
-
export declare function wrapAdaptiveCard(card: AdaptiveCard, jsonPath: string): WrappedAdaptiveCard;
|
|
3
|
-
/**
|
|
4
|
-
* Infers the preview card template from an Adaptive Card and a JSON path.
|
|
5
|
-
* The preview card template includes a title and an optional subtitle and image.
|
|
6
|
-
* It populates the preview card template with the first text block that matches
|
|
7
|
-
* each well-known name, in the order of title, subtitle, and image.
|
|
8
|
-
* If no text block matches the title or subtitle, it uses the first two text block as the title and subtitle.
|
|
9
|
-
* If the title is still empty and the subtitle is not empty, it uses subtitle as the title.
|
|
10
|
-
* @param card The Adaptive Card to infer the preview card template from.
|
|
11
|
-
* @param jsonPath The JSON path to the root object in the card body.
|
|
12
|
-
* @returns The inferred preview card template.
|
|
13
|
-
*/
|
|
14
|
-
export declare function inferPreviewCardTemplate(card: AdaptiveCard): PreviewCardTemplate;
|
|
15
|
-
//# sourceMappingURL=adaptiveCardWrapper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adaptiveCardWrapper.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/adaptiveCardWrapper.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY,EAGZ,mBAAmB,EAEnB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAGtB,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,mBAAmB,CAW1F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,YAAY,GAAG,mBAAmB,CAmEhF"}
|