@microsoft/teamsfx-core 2.0.7-alpha.bdb04bd16.0 → 2.0.7-alpha.c6f5fa837.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 +1 -0
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +1 -0
- 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/samples.d.ts +1 -1
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +1 -3
- 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 +2 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +42 -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 +14 -15
- 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 +288 -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 +49 -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 +50 -6
- 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
|
@@ -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;I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AAC,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"}
|
|
@@ -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"}
|
|
@@ -1,98 +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.inferPreviewCardTemplate = exports.wrapAdaptiveCard = void 0;
|
|
6
|
-
const constants_1 = require("./constants");
|
|
7
|
-
const utils_1 = require("./utils");
|
|
8
|
-
function wrapAdaptiveCard(card, jsonPath) {
|
|
9
|
-
const result = {
|
|
10
|
-
version: constants_1.ConstantString.WrappedCardVersion,
|
|
11
|
-
$schema: constants_1.ConstantString.WrappedCardSchema,
|
|
12
|
-
jsonPath: jsonPath,
|
|
13
|
-
responseLayout: constants_1.ConstantString.WrappedCardResponseLayout,
|
|
14
|
-
responseCardTemplate: card,
|
|
15
|
-
previewCardTemplate: inferPreviewCardTemplate(card),
|
|
16
|
-
};
|
|
17
|
-
return result;
|
|
18
|
-
}
|
|
19
|
-
exports.wrapAdaptiveCard = wrapAdaptiveCard;
|
|
20
|
-
/**
|
|
21
|
-
* Infers the preview card template from an Adaptive Card and a JSON path.
|
|
22
|
-
* The preview card template includes a title and an optional subtitle and image.
|
|
23
|
-
* It populates the preview card template with the first text block that matches
|
|
24
|
-
* each well-known name, in the order of title, subtitle, and image.
|
|
25
|
-
* If no text block matches the title or subtitle, it uses the first two text block as the title and subtitle.
|
|
26
|
-
* If the title is still empty and the subtitle is not empty, it uses subtitle as the title.
|
|
27
|
-
* @param card The Adaptive Card to infer the preview card template from.
|
|
28
|
-
* @param jsonPath The JSON path to the root object in the card body.
|
|
29
|
-
* @returns The inferred preview card template.
|
|
30
|
-
*/
|
|
31
|
-
function inferPreviewCardTemplate(card) {
|
|
32
|
-
var _a;
|
|
33
|
-
const result = {
|
|
34
|
-
title: "",
|
|
35
|
-
};
|
|
36
|
-
const textBlockElements = new Set();
|
|
37
|
-
let rootObject;
|
|
38
|
-
if (((_a = card.body[0]) === null || _a === void 0 ? void 0 : _a.type) === constants_1.ConstantString.ContainerType) {
|
|
39
|
-
rootObject = card.body[0].items;
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
rootObject = card.body;
|
|
43
|
-
}
|
|
44
|
-
for (const element of rootObject) {
|
|
45
|
-
if (element.type === constants_1.ConstantString.TextBlockType) {
|
|
46
|
-
const textElement = element;
|
|
47
|
-
const index = textElement.text.indexOf("${if(");
|
|
48
|
-
if (index > 0) {
|
|
49
|
-
textElement.text = textElement.text.substring(index);
|
|
50
|
-
textBlockElements.add(textElement);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
for (const element of textBlockElements) {
|
|
55
|
-
const text = element.text;
|
|
56
|
-
if (!result.title && utils_1.isWellKnownName(text, constants_1.ConstantString.WellknownTitleName)) {
|
|
57
|
-
result.title = text;
|
|
58
|
-
textBlockElements.delete(element);
|
|
59
|
-
}
|
|
60
|
-
else if (!result.subtitle && utils_1.isWellKnownName(text, constants_1.ConstantString.WellknownSubtitleName)) {
|
|
61
|
-
result.subtitle = text;
|
|
62
|
-
textBlockElements.delete(element);
|
|
63
|
-
}
|
|
64
|
-
else if (!result.image && utils_1.isWellKnownName(text, constants_1.ConstantString.WellknownImageName)) {
|
|
65
|
-
const match = text.match(/\${if\(([^,]+),/);
|
|
66
|
-
const property = match ? match[1] : "";
|
|
67
|
-
if (property) {
|
|
68
|
-
result.image = {
|
|
69
|
-
url: `\${${property}}`,
|
|
70
|
-
alt: text,
|
|
71
|
-
$when: `\${${property} != null}`,
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
textBlockElements.delete(element);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
for (const element of textBlockElements) {
|
|
78
|
-
const text = element.text;
|
|
79
|
-
if (!result.title) {
|
|
80
|
-
result.title = text;
|
|
81
|
-
textBlockElements.delete(element);
|
|
82
|
-
}
|
|
83
|
-
else if (!result.subtitle) {
|
|
84
|
-
result.subtitle = text;
|
|
85
|
-
textBlockElements.delete(element);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
if (!result.title && result.subtitle) {
|
|
89
|
-
result.title = result.subtitle;
|
|
90
|
-
delete result.subtitle;
|
|
91
|
-
}
|
|
92
|
-
if (!result.title) {
|
|
93
|
-
result.title = "result";
|
|
94
|
-
}
|
|
95
|
-
return result;
|
|
96
|
-
}
|
|
97
|
-
exports.inferPreviewCardTemplate = inferPreviewCardTemplate;
|
|
98
|
-
//# sourceMappingURL=adaptiveCardWrapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adaptiveCardWrapper.js","sourceRoot":"","sources":["../../../src/common/spec-parser/adaptiveCardWrapper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAEb,2CAA6C;AAS7C,mCAA0C;AAE1C,SAAgB,gBAAgB,CAAC,IAAkB,EAAE,QAAgB;IACnE,MAAM,MAAM,GAAwB;QAClC,OAAO,EAAE,0BAAc,CAAC,kBAAkB;QAC1C,OAAO,EAAE,0BAAc,CAAC,iBAAiB;QACzC,QAAQ,EAAE,QAAQ;QAClB,cAAc,EAAE,0BAAc,CAAC,yBAAyB;QACxD,oBAAoB,EAAE,IAAI;QAC1B,mBAAmB,EAAE,wBAAwB,CAAC,IAAI,CAAC;KACpD,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAXD,4CAWC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,wBAAwB,CAAC,IAAkB;;IACzD,MAAM,MAAM,GAAwB;QAClC,KAAK,EAAE,EAAE;KACV,CAAC;IACF,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAoB,CAAC;IAEtD,IAAI,UAA8D,CAAC;IACnE,IAAI,CAAA,MAAA,IAAI,CAAC,IAAI,CA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KAAK,CAAC,iBAAiB,CAAC,CAAC;YAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACvC,IAAI,QAAQ,EAAE;gBACZ,MAAM,CAAC,KAAK,GAAG;oBACb,GAAG,EAAE,MAAM,QAAQ,GAAG;oBACtB,GAAG,EAAE,IAAI;oBACT,KAAK,EAAE,MAAM,QAAQ,WAAW;iBACjC,CAAC;aACH;YACD,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACnC;KACF;IAED,KAAK,MAAM,OAAO,IAAI,iBAAiB,EAAE;QACvC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;YACjB,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;YACpB,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACnC;aAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC3B,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;YACvB,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACnC;KACF;IAED,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,QAAQ,EAAE;QACpC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC/B,OAAO,MAAM,CAAC,QAAQ,CAAC;KACxB;IAED,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;QACjB,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC;KACzB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAnED,4DAmEC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export declare class ConstantString {
|
|
2
|
-
static readonly CancelledMessage = "Operation is cancelled.";
|
|
3
|
-
static readonly NoServerInformation = "No server information is found in the OpenAPI description document.";
|
|
4
|
-
static readonly RemoteRefNotSupported = "Remote reference is not supported: %s.";
|
|
5
|
-
static readonly MissingOperationId = "Missing operationIds: %s.";
|
|
6
|
-
static readonly NoSupportedApi = "No supported API is found in the OpenAPI description document: only GET and POST methods are supported, additionally, there can be at most one required parameter, and no auth is allowed.";
|
|
7
|
-
static readonly AdditionalPropertiesNotSupported = "'additionalProperties' is not supported, and will be ignored.";
|
|
8
|
-
static readonly SchemaNotSupported = "'oneOf', 'anyOf', and 'not' schema are not supported: %s.";
|
|
9
|
-
static readonly UnknownSchema = "Unknown schema: %s.";
|
|
10
|
-
static readonly UrlProtocolNotSupported = "Server url is not correct: protocol %s is not supported, you should use https protocol instead.";
|
|
11
|
-
static readonly RelativeServerUrlNotSupported = "Server url is not correct: relative server url is not supported.";
|
|
12
|
-
static readonly ResolveServerUrlFailed = "Unable to resolve the server URL: please make sure that the environment variable %s is defined.";
|
|
13
|
-
static readonly OperationOnlyContainsOptionalParam = "Operation %s contains multiple optional parameters. The first optional parameter is used for this command.";
|
|
14
|
-
static readonly ConvertSwaggerToOpenAPI = "The Swagger 2.0 file has been converted to OpenAPI 3.0.";
|
|
15
|
-
static readonly SwaggerNotSupported = "Swagger 2.0 is not supported. Please convert to OpenAPI 3.0 manually before proceeding.";
|
|
16
|
-
static readonly MultipleAPIKeyNotSupported = "Multiple API keys are not supported. Please make sure that all selected APIs use the same API key.";
|
|
17
|
-
static readonly WrappedCardVersion = "devPreview";
|
|
18
|
-
static readonly WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
|
|
19
|
-
static readonly WrappedCardResponseLayout = "list";
|
|
20
|
-
static readonly GetMethod = "get";
|
|
21
|
-
static readonly PostMethod = "post";
|
|
22
|
-
static readonly AdaptiveCardVersion = "1.5";
|
|
23
|
-
static readonly AdaptiveCardSchema = "http://adaptivecards.io/schemas/adaptive-card.json";
|
|
24
|
-
static readonly AdaptiveCardType = "AdaptiveCard";
|
|
25
|
-
static readonly TextBlockType = "TextBlock";
|
|
26
|
-
static readonly ContainerType = "Container";
|
|
27
|
-
static readonly RegistrationIdPostfix = "REGISTRATION_ID";
|
|
28
|
-
static readonly ResponseCodeFor20X: string[];
|
|
29
|
-
static readonly AllOperationMethods: string[];
|
|
30
|
-
static readonly WellknownResultNames: string[];
|
|
31
|
-
static readonly WellknownTitleName: string[];
|
|
32
|
-
static readonly WellknownSubtitleName: string[];
|
|
33
|
-
static readonly WellknownImageName: string[];
|
|
34
|
-
static readonly ShortDescriptionMaxLens = 80;
|
|
35
|
-
static readonly FullDescriptionMaxLens = 4000;
|
|
36
|
-
static readonly CommandDescriptionMaxLens = 128;
|
|
37
|
-
static readonly ParameterDescriptionMaxLens = 128;
|
|
38
|
-
static readonly CommandTitleMaxLens = 32;
|
|
39
|
-
static readonly ParameterTitleMaxLens = 32;
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,yBAAyB;IAEtD,MAAM,CAAC,QAAQ,CAAC,uBAAuB,qGAC6D;IACpG,MAAM,CAAC,QAAQ,CAAC,6BAA6B,sEACwB;IACrE,MAAM,CAAC,QAAQ,CAAC,sBAAsB,qGAC8D;IACpG,MA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AAC,qBAAqB,MAAM;CAC5C"}
|
|
@@ -1,95 +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.ConstantString = void 0;
|
|
6
|
-
class ConstantString {
|
|
7
|
-
}
|
|
8
|
-
exports.ConstantString = ConstantString;
|
|
9
|
-
ConstantString.CancelledMessage = "Operation is cancelled.";
|
|
10
|
-
ConstantString.NoServerInformation = "No server information is found in the OpenAPI description document.";
|
|
11
|
-
ConstantString.RemoteRefNotSupported = "Remote reference is not supported: %s.";
|
|
12
|
-
ConstantString.MissingOperationId = "Missing operationIds: %s.";
|
|
13
|
-
ConstantString.NoSupportedApi = "No supported API is found in the OpenAPI description document: only GET and POST methods are supported, additionally, there can be at most one required parameter, and no auth is allowed.";
|
|
14
|
-
ConstantString.AdditionalPropertiesNotSupported = "'additionalProperties' is not supported, and will be ignored.";
|
|
15
|
-
ConstantString.SchemaNotSupported = "'oneOf', 'anyOf', and 'not' schema are not supported: %s.";
|
|
16
|
-
ConstantString.UnknownSchema = "Unknown schema: %s.";
|
|
17
|
-
ConstantString.UrlProtocolNotSupported = "Server url is not correct: protocol %s is not supported, you should use https protocol instead.";
|
|
18
|
-
ConstantString.RelativeServerUrlNotSupported = "Server url is not correct: relative server url is not supported.";
|
|
19
|
-
ConstantString.ResolveServerUrlFailed = "Unable to resolve the server URL: please make sure that the environment variable %s is defined.";
|
|
20
|
-
ConstantString.OperationOnlyContainsOptionalParam = "Operation %s contains multiple optional parameters. The first optional parameter is used for this command.";
|
|
21
|
-
ConstantString.ConvertSwaggerToOpenAPI = "The Swagger 2.0 file has been converted to OpenAPI 3.0.";
|
|
22
|
-
ConstantString.SwaggerNotSupported = "Swagger 2.0 is not supported. Please convert to OpenAPI 3.0 manually before proceeding.";
|
|
23
|
-
ConstantString.MultipleAPIKeyNotSupported = "Multiple API keys are not supported. Please make sure that all selected APIs use the same API key.";
|
|
24
|
-
ConstantString.WrappedCardVersion = "devPreview";
|
|
25
|
-
ConstantString.WrappedCardSchema = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
|
|
26
|
-
ConstantString.WrappedCardResponseLayout = "list";
|
|
27
|
-
ConstantString.GetMethod = "get";
|
|
28
|
-
ConstantString.PostMethod = "post";
|
|
29
|
-
ConstantString.AdaptiveCardVersion = "1.5";
|
|
30
|
-
ConstantString.AdaptiveCardSchema = "http://adaptivecards.io/schemas/adaptive-card.json";
|
|
31
|
-
ConstantString.AdaptiveCardType = "AdaptiveCard";
|
|
32
|
-
ConstantString.TextBlockType = "TextBlock";
|
|
33
|
-
ConstantString.ContainerType = "Container";
|
|
34
|
-
ConstantString.RegistrationIdPostfix = "REGISTRATION_ID";
|
|
35
|
-
ConstantString.ResponseCodeFor20X = [
|
|
36
|
-
"200",
|
|
37
|
-
"201",
|
|
38
|
-
"202",
|
|
39
|
-
"203",
|
|
40
|
-
"204",
|
|
41
|
-
"205",
|
|
42
|
-
"206",
|
|
43
|
-
"207",
|
|
44
|
-
"208",
|
|
45
|
-
"226",
|
|
46
|
-
"default",
|
|
47
|
-
];
|
|
48
|
-
ConstantString.AllOperationMethods = [
|
|
49
|
-
"get",
|
|
50
|
-
"post",
|
|
51
|
-
"put",
|
|
52
|
-
"delete",
|
|
53
|
-
"patch",
|
|
54
|
-
"head",
|
|
55
|
-
"options",
|
|
56
|
-
"trace",
|
|
57
|
-
];
|
|
58
|
-
// TODO: update after investigating the usage of these constants.
|
|
59
|
-
ConstantString.WellknownResultNames = [
|
|
60
|
-
"result",
|
|
61
|
-
"data",
|
|
62
|
-
"items",
|
|
63
|
-
"root",
|
|
64
|
-
"matches",
|
|
65
|
-
"queries",
|
|
66
|
-
"list",
|
|
67
|
-
"output",
|
|
68
|
-
];
|
|
69
|
-
ConstantString.WellknownTitleName = ["title", "name", "summary", "caption", "subject", "label"];
|
|
70
|
-
ConstantString.WellknownSubtitleName = [
|
|
71
|
-
"subtitle",
|
|
72
|
-
"id",
|
|
73
|
-
"uid",
|
|
74
|
-
"description",
|
|
75
|
-
"desc",
|
|
76
|
-
"detail",
|
|
77
|
-
];
|
|
78
|
-
ConstantString.WellknownImageName = [
|
|
79
|
-
"image",
|
|
80
|
-
"icon",
|
|
81
|
-
"avatar",
|
|
82
|
-
"picture",
|
|
83
|
-
"photo",
|
|
84
|
-
"logo",
|
|
85
|
-
"pic",
|
|
86
|
-
"thumbnail",
|
|
87
|
-
"img",
|
|
88
|
-
];
|
|
89
|
-
ConstantString.ShortDescriptionMaxLens = 80;
|
|
90
|
-
ConstantString.FullDescriptionMaxLens = 4000;
|
|
91
|
-
ConstantString.CommandDescriptionMaxLens = 128;
|
|
92
|
-
ConstantString.ParameterDescriptionMaxLens = 128;
|
|
93
|
-
ConstantString.CommandTitleMaxLens = 32;
|
|
94
|
-
ConstantString.ParameterTitleMaxLens = 32;
|
|
95
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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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WAAW;IACX,KAAK;CACN,CAAC;AAEc,sCAAuB,GAAG,EAAE,CAAC;AAC7B,qCAAsB,GAAG,IAAI,CAAC;AAC9B,wCAAyB,GAAG,GAAG,CAAC;AAChC,0CAA2B,GAAG,GAAG,CAAC;AAClC,kCAAmB,GAAG,EAAE,CAAC;AACzB,oCAAqB,GAAG,EAAE,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,16 +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.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
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
export { SpecParser } from "./specParser";
|
|
2
|
-
export { SpecParserError } from "./specParserError";
|
|
3
|
-
export { ValidationStatus, WarningType, ErrorType, WarningResult, ErrorResult, ListAPIResult, } from "./interfaces";
|
|
4
|
-
export { ConstantString } from "./constants";
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|