@microsoft/teamsfx-core 3.0.15-beta.2026072312.0 → 3.0.15

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.
Files changed (343) hide show
  1. package/build/client/aadAppClient.d.ts.map +1 -1
  2. package/build/client/aadAppClient.js +6 -6
  3. package/build/client/aadAppClient.js.map +1 -1
  4. package/build/common/featureFlags.d.ts +5 -0
  5. package/build/common/featureFlags.d.ts.map +1 -1
  6. package/build/common/featureFlags.js +5 -0
  7. package/build/common/featureFlags.js.map +1 -1
  8. package/build/common/secretmasker/dict.d.ts.map +1 -1
  9. package/build/common/secretmasker/dict.js +2 -5
  10. package/build/common/secretmasker/dict.js.map +1 -1
  11. package/build/common/secretmasker/feature.js.map +1 -1
  12. package/build/common/templates-config.json +4 -4
  13. package/build/component/coordinator/index.d.ts.map +1 -1
  14. package/build/component/coordinator/index.js.map +1 -1
  15. package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
  16. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts +0 -3
  17. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
  18. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +3 -38
  19. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
  20. package/build/component/driver/script/scriptDriver.js +1 -1
  21. package/build/component/driver/script/scriptDriver.js.map +1 -1
  22. package/build/component/driver/teamsApp/create.d.ts.map +1 -1
  23. package/build/component/driver/teamsApp/create.js +3 -3
  24. package/build/component/driver/teamsApp/create.js.map +1 -1
  25. package/build/component/driver/teamsApp/createAppPackage.d.ts +0 -1
  26. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  27. package/build/component/driver/teamsApp/createAppPackage.js +0 -23
  28. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  29. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
  30. package/build/component/generator/declarativeAgent/helper.js.map +1 -1
  31. package/build/component/generator/officeAddin/generator.d.ts +0 -1
  32. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  33. package/build/component/generator/officeAddin/generator.js +2 -109
  34. package/build/component/generator/officeAddin/generator.js.map +1 -1
  35. package/build/component/generator/openApiSpec/helper.d.ts +3 -2
  36. package/build/component/generator/openApiSpec/helper.d.ts.map +1 -1
  37. package/build/component/generator/openApiSpec/helper.js +56 -6
  38. package/build/component/generator/openApiSpec/helper.js.map +1 -1
  39. package/build/component/generator/templateHelper.d.ts +2 -10
  40. package/build/component/generator/templateHelper.d.ts.map +1 -1
  41. package/build/component/generator/templateHelper.js +3 -16
  42. package/build/component/generator/templateHelper.js.map +1 -1
  43. package/build/component/generator/templates/templateNames.d.ts +0 -2
  44. package/build/component/generator/templates/templateNames.d.ts.map +1 -1
  45. package/build/component/generator/templates/templateNames.js +0 -2
  46. package/build/component/generator/templates/templateNames.js.map +1 -1
  47. package/build/component/generator/utils.d.ts.map +1 -1
  48. package/build/component/generator/utils.js +0 -6
  49. package/build/component/generator/utils.js.map +1 -1
  50. package/build/component/generator/v4TemplateBridge.d.ts +1 -4
  51. package/build/component/generator/v4TemplateBridge.d.ts.map +1 -1
  52. package/build/component/generator/v4TemplateBridge.js +3 -11
  53. package/build/component/generator/v4TemplateBridge.js.map +1 -1
  54. package/build/component/utils/envUtil.d.ts.map +1 -1
  55. package/build/component/utils/envUtil.js +2 -2
  56. package/build/component/utils/envUtil.js.map +1 -1
  57. package/build/component/utils/fileOperation.d.ts.map +1 -1
  58. package/build/component/utils/fileOperation.js +1 -4
  59. package/build/component/utils/fileOperation.js.map +1 -1
  60. package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -1
  61. package/build/component/utils/mcpAuthScaffolder.js.map +1 -1
  62. package/build/component/utils/mcpToolFetcher.d.ts +72 -1
  63. package/build/component/utils/mcpToolFetcher.d.ts.map +1 -1
  64. package/build/component/utils/mcpToolFetcher.js +227 -1
  65. package/build/component/utils/mcpToolFetcher.js.map +1 -1
  66. package/build/component/utils/odrProvider.d.ts +55 -1
  67. package/build/component/utils/odrProvider.d.ts.map +1 -1
  68. package/build/component/utils/odrProvider.js +101 -1
  69. package/build/component/utils/odrProvider.js.map +1 -1
  70. package/build/core/FxCore.d.ts.map +1 -1
  71. package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
  72. package/build/core/FxCore.declarativeAgent.js +0 -41
  73. package/build/core/FxCore.declarativeAgent.js.map +1 -1
  74. package/build/core/FxCore.js +5 -3
  75. package/build/core/FxCore.js.map +1 -1
  76. package/build/core/createFrontDoorAdapters.d.ts +25 -1
  77. package/build/core/createFrontDoorAdapters.d.ts.map +1 -1
  78. package/build/core/createFrontDoorAdapters.js +155 -4
  79. package/build/core/createFrontDoorAdapters.js.map +1 -1
  80. package/build/core/createProjectFrontDoor.d.ts +12 -10
  81. package/build/core/createProjectFrontDoor.d.ts.map +1 -1
  82. package/build/core/createProjectFrontDoor.js +106 -141
  83. package/build/core/createProjectFrontDoor.js.map +1 -1
  84. package/build/core/modifyProjectFrontDoor.d.ts +1 -0
  85. package/build/core/modifyProjectFrontDoor.d.ts.map +1 -1
  86. package/build/core/modifyProjectFrontDoor.js +2 -0
  87. package/build/core/modifyProjectFrontDoor.js.map +1 -1
  88. package/build/index.d.ts.map +1 -1
  89. package/build/index.js +0 -2
  90. package/build/index.js.map +1 -1
  91. package/build/question/inputs/AddKnowledgeInputs.d.ts.map +1 -1
  92. package/build/question/inputs/CreateProjectInputs.d.ts +0 -4
  93. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
  94. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  95. package/build/question/options/CreateProjectOptions.js +0 -14
  96. package/build/question/options/CreateProjectOptions.js.map +1 -1
  97. package/build/question/other.d.ts.map +1 -1
  98. package/build/question/other.js +1 -2
  99. package/build/question/other.js.map +1 -1
  100. package/build/question/questionNames.d.ts +0 -2
  101. package/build/question/questionNames.d.ts.map +1 -1
  102. package/build/question/questionNames.js +0 -2
  103. package/build/question/questionNames.js.map +1 -1
  104. package/build/question/scaffold/constructNode.d.ts +1 -3
  105. package/build/question/scaffold/constructNode.d.ts.map +1 -1
  106. package/build/question/scaffold/constructNode.js +0 -50
  107. package/build/question/scaffold/constructNode.js.map +1 -1
  108. package/build/question/scaffold/vsc/CapabilityOptions.d.ts +0 -2
  109. package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
  110. package/build/question/scaffold/vsc/CapabilityOptions.js +0 -16
  111. package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
  112. package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
  113. package/build/question/scaffold/vsc/teamsProjectTypeNode.js +7 -0
  114. package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
  115. package/build/v4/buildTarget/parseSelector.d.ts +2 -6
  116. package/build/v4/buildTarget/parseSelector.d.ts.map +1 -1
  117. package/build/v4/buildTarget/parseSelector.js +45 -58
  118. package/build/v4/buildTarget/parseSelector.js.map +1 -1
  119. package/build/v4/buildTarget/resolveBuildTarget.d.ts +7 -21
  120. package/build/v4/buildTarget/resolveBuildTarget.d.ts.map +1 -1
  121. package/build/v4/buildTarget/resolveBuildTarget.js +52 -97
  122. package/build/v4/buildTarget/resolveBuildTarget.js.map +1 -1
  123. package/build/v4/collectInputs/collectInputs.d.ts +9 -50
  124. package/build/v4/collectInputs/collectInputs.d.ts.map +1 -1
  125. package/build/v4/collectInputs/collectInputs.js +91 -274
  126. package/build/v4/collectInputs/collectInputs.js.map +1 -1
  127. package/build/v4/distribution/createQuestions.d.ts.map +1 -1
  128. package/build/v4/distribution/createQuestions.js +29 -2
  129. package/build/v4/distribution/createQuestions.js.map +1 -1
  130. package/build/v4/distribution/declarativePackage.d.ts.map +1 -1
  131. package/build/v4/distribution/declarativePackage.js +30 -2
  132. package/build/v4/distribution/declarativePackage.js.map +1 -1
  133. package/build/v4/expression/evaluateExpression.d.ts +0 -13
  134. package/build/v4/expression/evaluateExpression.d.ts.map +1 -1
  135. package/build/v4/expression/evaluateExpression.js +0 -57
  136. package/build/v4/expression/evaluateExpression.js.map +1 -1
  137. package/build/v4/index.d.ts +0 -7
  138. package/build/v4/index.d.ts.map +1 -1
  139. package/build/v4/index.js +0 -7
  140. package/build/v4/index.js.map +1 -1
  141. package/build/v4/model/dataModel.d.ts +1 -1
  142. package/build/v4/model/dataModel.d.ts.map +1 -1
  143. package/build/v4/pipeline/runScaffoldPipeline.d.ts +4 -20
  144. package/build/v4/pipeline/runScaffoldPipeline.d.ts.map +1 -1
  145. package/build/v4/pipeline/runScaffoldPipeline.js +9 -61
  146. package/build/v4/pipeline/runScaffoldPipeline.js.map +1 -1
  147. package/build/v4/renderContext/buildRenderContext.d.ts.map +1 -1
  148. package/build/v4/renderContext/buildRenderContext.js +2 -1
  149. package/build/v4/renderContext/buildRenderContext.js.map +1 -1
  150. package/build/v4/runtime/inMemoryRuntime.d.ts +1 -4
  151. package/build/v4/runtime/inMemoryRuntime.d.ts.map +1 -1
  152. package/build/v4/runtime/inMemoryRuntime.js +3 -22
  153. package/build/v4/runtime/inMemoryRuntime.js.map +1 -1
  154. package/build/v4/runtime/packageParse.d.ts.map +1 -1
  155. package/build/v4/runtime/packageParse.js +8 -64
  156. package/build/v4/runtime/packageParse.js.map +1 -1
  157. package/build/v4/runtime/realRuntime.d.ts +1 -2
  158. package/build/v4/runtime/realRuntime.d.ts.map +1 -1
  159. package/build/v4/runtime/realRuntime.js +2 -3
  160. package/build/v4/runtime/realRuntime.js.map +1 -1
  161. package/build/v4/runtime/renderMustache.d.ts.map +1 -1
  162. package/build/v4/runtime/renderMustache.js +4 -13
  163. package/build/v4/runtime/renderMustache.js.map +1 -1
  164. package/build/v4/runtime/runtimeRegistry.d.ts +3 -12
  165. package/build/v4/runtime/runtimeRegistry.d.ts.map +1 -1
  166. package/build/v4/runtime/runtimeRegistry.js +17 -123
  167. package/build/v4/runtime/runtimeRegistry.js.map +1 -1
  168. package/build/v4/runtime/scaffold.d.ts +0 -1
  169. package/build/v4/runtime/scaffold.d.ts.map +1 -1
  170. package/build/v4/runtime/scaffold.js +20 -1
  171. package/build/v4/runtime/scaffold.js.map +1 -1
  172. package/build/v4/runtime/steps/daAction.d.ts.map +1 -1
  173. package/build/v4/runtime/steps/daAction.js +111 -3
  174. package/build/v4/runtime/steps/daAction.js.map +1 -1
  175. package/build/v4/runtime/steps/mcpAuth.d.ts +2 -5
  176. package/build/v4/runtime/steps/mcpAuth.d.ts.map +1 -1
  177. package/build/v4/runtime/steps/mcpAuth.js +66 -37
  178. package/build/v4/runtime/steps/mcpAuth.js.map +1 -1
  179. package/build/v4/runtime/steps/mcpLocal.d.ts +4 -0
  180. package/build/v4/runtime/steps/mcpLocal.d.ts.map +1 -1
  181. package/build/v4/runtime/steps/mcpLocal.js +31 -11
  182. package/build/v4/runtime/steps/mcpLocal.js.map +1 -1
  183. package/build/v4/runtime/steps/mcpStatic.d.ts +1 -1
  184. package/build/v4/runtime/steps/mcpStatic.d.ts.map +1 -1
  185. package/build/v4/runtime/steps/mcpStatic.js +32 -14
  186. package/build/v4/runtime/steps/mcpStatic.js.map +1 -1
  187. package/build/v4/runtime/steps/metaOs.d.ts.map +1 -1
  188. package/build/v4/runtime/steps/metaOs.js +51 -39
  189. package/build/v4/runtime/steps/metaOs.js.map +1 -1
  190. package/build/v4/runtime/steps/officeAddin.d.ts.map +1 -1
  191. package/build/v4/runtime/steps/officeAddin.js +12 -7
  192. package/build/v4/runtime/steps/officeAddin.js.map +1 -1
  193. package/build/v4/runtime/steps/openApi.d.ts.map +1 -1
  194. package/build/v4/runtime/steps/openApi.js +555 -47
  195. package/build/v4/runtime/steps/openApi.js.map +1 -1
  196. package/build/v4/surface/createInputs.d.ts +3 -25
  197. package/build/v4/surface/createInputs.d.ts.map +1 -1
  198. package/build/v4/surface/createInputs.js +431 -54
  199. package/build/v4/surface/createInputs.js.map +1 -1
  200. package/build/v4/surface/createSelectorWalk.d.ts +3 -8
  201. package/build/v4/surface/createSelectorWalk.d.ts.map +1 -1
  202. package/build/v4/surface/createSelectorWalk.js +11 -21
  203. package/build/v4/surface/createSelectorWalk.js.map +1 -1
  204. package/build/v4/surface/modifySelectorWalk.d.ts.map +1 -1
  205. package/build/v4/surface/modifySelectorWalk.js +3 -0
  206. package/build/v4/surface/modifySelectorWalk.js.map +1 -1
  207. package/build/v4/surface/uiPromptUI.d.ts.map +1 -1
  208. package/build/v4/surface/uiPromptUI.js +41 -36
  209. package/build/v4/surface/uiPromptUI.js.map +1 -1
  210. package/build/v4/validation/validateTemplatePackage.d.ts +2 -21
  211. package/build/v4/validation/validateTemplatePackage.d.ts.map +1 -1
  212. package/build/v4/validation/validateTemplatePackage.js +31 -155
  213. package/build/v4/validation/validateTemplatePackage.js.map +1 -1
  214. package/package.json +20 -26
  215. package/resource/package.nls.cs.json +0 -1
  216. package/resource/package.nls.de.json +54 -55
  217. package/resource/package.nls.es.json +0 -1
  218. package/resource/package.nls.fr.json +0 -1
  219. package/resource/package.nls.it.json +0 -1
  220. package/resource/package.nls.ja.json +0 -1
  221. package/resource/package.nls.json +0 -2
  222. package/resource/package.nls.ko.json +0 -1
  223. package/resource/package.nls.pl.json +0 -1
  224. package/resource/package.nls.pt-BR.json +0 -1
  225. package/resource/package.nls.ru.json +0 -1
  226. package/resource/package.nls.tr.json +0 -1
  227. package/resource/package.nls.zh-Hans.json +0 -1
  228. package/resource/package.nls.zh-Hant.json +0 -1
  229. package/resource/templates/package.nls.cs.json +2 -9
  230. package/resource/templates/package.nls.de.json +2 -9
  231. package/resource/templates/package.nls.es.json +2 -9
  232. package/resource/templates/package.nls.fr.json +2 -9
  233. package/resource/templates/package.nls.it.json +2 -9
  234. package/resource/templates/package.nls.ja.json +2 -9
  235. package/resource/templates/package.nls.json +3 -16
  236. package/resource/templates/package.nls.ko.json +2 -9
  237. package/resource/templates/package.nls.pl.json +2 -9
  238. package/resource/templates/package.nls.pt-BR.json +2 -9
  239. package/resource/templates/package.nls.ru.json +2 -9
  240. package/resource/templates/package.nls.tr.json +2 -9
  241. package/resource/templates/package.nls.zh-Hans.json +2 -9
  242. package/resource/templates/package.nls.zh-Hant.json +2 -9
  243. package/resource/templates/package.nls.zh-cn.json +1 -7
  244. package/resource/templates/package.nls.zh-tw.json +1 -7
  245. package/templates/configs/local/typescript/.gitignore +1 -0
  246. package/templates/configs/playground/typescript/.gitignore +4 -0
  247. package/templates/fallback/common.zip +0 -0
  248. package/templates/fallback/csharp.zip +0 -0
  249. package/templates/fallback/js.zip +0 -0
  250. package/templates/fallback/python.zip +0 -0
  251. package/templates/fallback/ts.zip +0 -0
  252. package/templates/metadata/allTemplates.json +2 -16
  253. package/templates/metadata.zip +0 -0
  254. package/templates/ui/wizardNode.json +0 -24
  255. package/templates/v4/create-selector.json +5 -12
  256. package/templates/v4/floor.json +1 -1
  257. package/templates/v4/modify-selector.json +6 -1
  258. package/templates/v4/templates-metadata.zip +0 -0
  259. package/templates/v4/templates.zip +0 -0
  260. package/build/common/httpProxy.d.ts +0 -21
  261. package/build/common/httpProxy.d.ts.map +0 -1
  262. package/build/common/httpProxy.js +0 -117
  263. package/build/common/httpProxy.js.map +0 -1
  264. package/build/common/mcpToolFetcher.d.ts +0 -31
  265. package/build/common/mcpToolFetcher.d.ts.map +0 -1
  266. package/build/common/mcpToolFetcher.js +0 -182
  267. package/build/common/mcpToolFetcher.js.map +0 -1
  268. package/build/common/odrProvider.d.ts +0 -43
  269. package/build/common/odrProvider.d.ts.map +0 -1
  270. package/build/common/odrProvider.js +0 -154
  271. package/build/common/odrProvider.js.map +0 -1
  272. package/build/common/openApiParserOptions.d.ts +0 -3
  273. package/build/common/openApiParserOptions.d.ts.map +0 -1
  274. package/build/common/openApiParserOptions.js +0 -61
  275. package/build/common/openApiParserOptions.js.map +0 -1
  276. package/build/v4/distribution/questionFragments.d.ts +0 -11
  277. package/build/v4/distribution/questionFragments.d.ts.map +0 -1
  278. package/build/v4/distribution/questionFragments.js +0 -130
  279. package/build/v4/distribution/questionFragments.js.map +0 -1
  280. package/build/v4/engineVersion.d.ts +0 -7
  281. package/build/v4/engineVersion.d.ts.map +0 -1
  282. package/build/v4/engineVersion.js +0 -12
  283. package/build/v4/engineVersion.js.map +0 -1
  284. package/build/v4/inspection/scaffoldCatalog.d.ts +0 -28
  285. package/build/v4/inspection/scaffoldCatalog.d.ts.map +0 -1
  286. package/build/v4/inspection/scaffoldCatalog.js +0 -66
  287. package/build/v4/inspection/scaffoldCatalog.js.map +0 -1
  288. package/build/v4/inspection/scaffoldMetadataSource.d.ts +0 -6
  289. package/build/v4/inspection/scaffoldMetadataSource.d.ts.map +0 -1
  290. package/build/v4/inspection/scaffoldMetadataSource.js +0 -78
  291. package/build/v4/inspection/scaffoldMetadataSource.js.map +0 -1
  292. package/build/v4/mcp/mcpAuthAction.d.ts +0 -28
  293. package/build/v4/mcp/mcpAuthAction.d.ts.map +0 -1
  294. package/build/v4/mcp/mcpAuthAction.js +0 -162
  295. package/build/v4/mcp/mcpAuthAction.js.map +0 -1
  296. package/build/v4/mcp/mcpAuthScaffold.d.ts +0 -37
  297. package/build/v4/mcp/mcpAuthScaffold.d.ts.map +0 -1
  298. package/build/v4/mcp/mcpAuthScaffold.js +0 -140
  299. package/build/v4/mcp/mcpAuthScaffold.js.map +0 -1
  300. package/build/v4/providers/createOptionsProviders.d.ts +0 -11
  301. package/build/v4/providers/createOptionsProviders.d.ts.map +0 -1
  302. package/build/v4/providers/createOptionsProviders.js +0 -268
  303. package/build/v4/providers/createOptionsProviders.js.map +0 -1
  304. package/build/v4/runtime/generalSensitivityLabel.d.ts +0 -5
  305. package/build/v4/runtime/generalSensitivityLabel.d.ts.map +0 -1
  306. package/build/v4/runtime/generalSensitivityLabel.js +0 -36
  307. package/build/v4/runtime/generalSensitivityLabel.js.map +0 -1
  308. package/build/v4/runtime/steps/daSensitivity.d.ts +0 -14
  309. package/build/v4/runtime/steps/daSensitivity.d.ts.map +0 -1
  310. package/build/v4/runtime/steps/daSensitivity.js +0 -50
  311. package/build/v4/runtime/steps/daSensitivity.js.map +0 -1
  312. package/build/v4/runtime/steps/openApiCustomApi.d.ts +0 -5
  313. package/build/v4/runtime/steps/openApiCustomApi.d.ts.map +0 -1
  314. package/build/v4/runtime/steps/openApiCustomApi.js +0 -385
  315. package/build/v4/runtime/steps/openApiCustomApi.js.map +0 -1
  316. package/build/v4/runtime/withTempDirectory.d.ts +0 -10
  317. package/build/v4/runtime/withTempDirectory.d.ts.map +0 -1
  318. package/build/v4/runtime/withTempDirectory.js +0 -41
  319. package/build/v4/runtime/withTempDirectory.js.map +0 -1
  320. package/build/v4/surface/createFloorTail.d.ts +0 -12
  321. package/build/v4/surface/createFloorTail.d.ts.map +0 -1
  322. package/build/v4/surface/createFloorTail.js +0 -138
  323. package/build/v4/surface/createFloorTail.js.map +0 -1
  324. package/build/v4/surface/localizePrompt.d.ts +0 -11
  325. package/build/v4/surface/localizePrompt.d.ts.map +0 -1
  326. package/build/v4/surface/localizePrompt.js +0 -32
  327. package/build/v4/surface/localizePrompt.js.map +0 -1
  328. package/build/v4/validation/capabilityCatalog.d.ts +0 -8
  329. package/build/v4/validation/capabilityCatalog.d.ts.map +0 -1
  330. package/build/v4/validation/capabilityCatalog.js +0 -61
  331. package/build/v4/validation/capabilityCatalog.js.map +0 -1
  332. package/build/v4/validation/templateArchiveValidation.d.ts +0 -15
  333. package/build/v4/validation/templateArchiveValidation.d.ts.map +0 -1
  334. package/build/v4/validation/templateArchiveValidation.js +0 -297
  335. package/build/v4/validation/templateArchiveValidation.js.map +0 -1
  336. package/build/v4/validators/createInputValidators.d.ts +0 -7
  337. package/build/v4/validators/createInputValidators.d.ts.map +0 -1
  338. package/build/v4/validators/createInputValidators.js +0 -75
  339. package/build/v4/validators/createInputValidators.js.map +0 -1
  340. package/build/v4/validators/mcpCredentialValidators.d.ts +0 -5
  341. package/build/v4/validators/mcpCredentialValidators.d.ts.map +0 -1
  342. package/build/v4/validators/mcpCredentialValidators.js +0 -13
  343. package/build/v4/validators/mcpCredentialValidators.js.map +0 -1
@@ -1,268 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.openApiOperationsProvider = void 0;
6
- exports.createMcpServerTypesProvider = createMcpServerTypesProvider;
7
- exports.createLocalMcpServersProvider = createLocalMcpServersProvider;
8
- exports.createOpenApiSearchProvider = createOpenApiSearchProvider;
9
- exports.createMcpToolsProvider = createMcpToolsProvider;
10
- exports.createDefaultCreateOptionsProviders = createDefaultCreateOptionsProviders;
11
- const tslib_1 = require("tslib");
12
- const teamsfx_api_1 = require("@microsoft/teamsfx-api");
13
- const m365_spec_parser_1 = require("@microsoft/m365-spec-parser");
14
- const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
15
- const openApiParserOptions_1 = require("../../common/openApiParserOptions");
16
- const mcpStaticTools_1 = require("../mcp/mcpStaticTools");
17
- const remoteMcpServerType = {
18
- id: "remote",
19
- label: "Remote MCP Server",
20
- keyPrefix: "core.createProjectQuestion.mcpServerType.remote",
21
- };
22
- const localMcpServerType = {
23
- id: "local",
24
- label: "Local MCP Server",
25
- keyPrefix: "core.createProjectQuestion.mcpServerType.local",
26
- };
27
- function createLocalServerCache(listLocalMcpServers) {
28
- let cached;
29
- return () => {
30
- if (cached === undefined) {
31
- cached = listLocalMcpServers();
32
- }
33
- return cached;
34
- };
35
- }
36
- function createMcpServerTypesProvider(localServers) {
37
- return {
38
- derivedSchema: ["catalog"],
39
- async fetch(params) {
40
- if (params.selected === remoteMcpServerType.id) {
41
- return { options: [remoteMcpServerType], derived: { catalog: "{}" } };
42
- }
43
- const servers = await localServers();
44
- return {
45
- options: servers.length > 0 ? [remoteMcpServerType, localMcpServerType] : [remoteMcpServerType],
46
- derived: { catalog: localServerCatalog(servers) },
47
- };
48
- },
49
- };
50
- }
51
- function localServerDetail(server) {
52
- const toolsDetail = `${server.tools.length} tools available`;
53
- return server.description ? `${server.description} (${toolsDetail})` : toolsDetail;
54
- }
55
- function localServerCatalog(servers) {
56
- const catalog = {};
57
- for (const server of servers) {
58
- catalog[server.name] = { command: server.command, args: server.args };
59
- }
60
- return JSON.stringify(catalog);
61
- }
62
- function createLocalMcpServersProvider(localServers) {
63
- return {
64
- async fetch() {
65
- const servers = await localServers();
66
- return {
67
- options: servers.map((server) => ({
68
- id: server.name,
69
- label: server.display_name || server.name,
70
- detail: localServerDetail(server),
71
- })),
72
- };
73
- },
74
- };
75
- }
76
- function openApiParseOptions() {
77
- // Reuse the v3 Copilot parser options (single source of truth) instead of a v4 copy.
78
- return (0, openApiParserOptions_1.getParserOptions)(m365_spec_parser_1.ProjectType.Copilot, true);
79
- }
80
- function operationDetail(operation) {
81
- if (!operation.auth) {
82
- return "No authentication";
83
- }
84
- if (m365_spec_parser_1.Utils.isBearerTokenAuth(operation.auth.authScheme)) {
85
- return "API key";
86
- }
87
- if (m365_spec_parser_1.Utils.isOAuthWithAuthCodeFlow(operation.auth.authScheme)) {
88
- return "OAuth";
89
- }
90
- if (m365_spec_parser_1.Utils.isAPIKeyAuthButNotInCookie(operation.auth.authScheme)) {
91
- return "API key with header or query parameter";
92
- }
93
- return "Unsupported authentication";
94
- }
95
- function sortOperations(operations) {
96
- return [...operations].sort((left, right) => {
97
- const leftParts = left.api.toLowerCase().split(" ");
98
- const rightParts = right.api.toLowerCase().split(" ");
99
- if (leftParts[0] < rightParts[0]) {
100
- return -1;
101
- }
102
- if (leftParts[0] > rightParts[0]) {
103
- return 1;
104
- }
105
- return (leftParts[1] ?? "").localeCompare(rightParts[1] ?? "");
106
- });
107
- }
108
- exports.openApiOperationsProvider = {
109
- async fetch(params) {
110
- const apiSpecLocation = params.apiSpecLocation?.trim();
111
- if (!apiSpecLocation) {
112
- throw new teamsfx_api_1.SystemError({
113
- source: "Scaffold",
114
- name: "OpenApiMissingSpecLocation",
115
- message: "OpenAPI operations cannot be listed without an API spec location.",
116
- });
117
- }
118
- const parser = new m365_spec_parser_1.SpecParser(apiSpecLocation, openApiParseOptions());
119
- const validation = await parser.validate();
120
- if (validation.status === m365_spec_parser_1.ValidationStatus.Error) {
121
- throw new teamsfx_api_1.UserError({
122
- source: "Scaffold",
123
- name: "OpenApiSpecInvalid",
124
- message: "The OpenAPI description document is invalid or contains no supported operations.",
125
- });
126
- }
127
- let listed;
128
- try {
129
- listed = await parser.list();
130
- }
131
- catch {
132
- throw new teamsfx_api_1.UserError({
133
- source: "Scaffold",
134
- name: "OpenApiSpecInvalid",
135
- message: "The OpenAPI description document is invalid or contains no supported operations.",
136
- });
137
- }
138
- const operations = sortOperations(listed.APIs).filter((operation) => operation.isValid);
139
- if (operations.length === 0) {
140
- throw new teamsfx_api_1.UserError({
141
- source: "Scaffold",
142
- name: "OpenApiSpecInvalid",
143
- message: "The OpenAPI description document is invalid or contains no supported operations.",
144
- });
145
- }
146
- return {
147
- options: operations.map((operation) => ({
148
- id: operation.api,
149
- label: operation.api,
150
- groupName: operation.api.toUpperCase().split(" ")[0],
151
- detail: operationDetail(operation),
152
- })),
153
- };
154
- },
155
- };
156
- function createOpenApiSearchProvider(searchApiSpec) {
157
- return {
158
- async fetch(params) {
159
- const query = params.query?.trim();
160
- if (!query) {
161
- throw new teamsfx_api_1.UserError({
162
- source: "Scaffold",
163
- name: "OpenApiSearchQueryMissing",
164
- message: "Please enter a search query.",
165
- });
166
- }
167
- const results = await searchApiSpec(query);
168
- if (results.length === 0) {
169
- throw new teamsfx_api_1.UserError({
170
- source: "Scaffold",
171
- name: "OpenApiSearchResultNotFound",
172
- message: "No search result found.",
173
- });
174
- }
175
- return {
176
- options: results.map((api) => ({
177
- id: api.url,
178
- label: api.key,
179
- detail: api.description,
180
- })),
181
- };
182
- },
183
- };
184
- }
185
- function mcpToolsJsonFromFetchResult(serverUrl, result) {
186
- if (result.requiresAuth) {
187
- throw new teamsfx_api_1.UserError({
188
- source: "Scaffold",
189
- name: "McpAuthRequired",
190
- message: `The MCP server${serverUrl ? ` at ${serverUrl}` : ""} requires authentication.`,
191
- });
192
- }
193
- if (result.tools.length === 0) {
194
- throw new teamsfx_api_1.UserError({
195
- source: "Scaffold",
196
- name: "McpToolsNotFound",
197
- message: `No tools were discovered from the MCP server${serverUrl ? ` at ${serverUrl}` : ""}.`,
198
- });
199
- }
200
- return JSON.stringify({ tools: result.tools });
201
- }
202
- function createMcpToolsProvider(fetchTools) {
203
- return {
204
- derivedSchema: ["toolsJson"],
205
- async fetch(params) {
206
- let toolsJson = params.toolsJson?.trim();
207
- const toolsFilePath = params.toolsFilePath?.trim();
208
- if (!toolsJson && toolsFilePath) {
209
- try {
210
- toolsJson = fs_extra_1.default.readFileSync(toolsFilePath, "utf8");
211
- }
212
- catch {
213
- throw new teamsfx_api_1.UserError({
214
- source: "Scaffold",
215
- name: "McpToolsFileReadFailed",
216
- message: "Failed to read the MCP tools file.",
217
- });
218
- }
219
- }
220
- const serverUrl = params.serverUrl?.trim();
221
- if (!toolsJson && serverUrl) {
222
- try {
223
- toolsJson = mcpToolsJsonFromFetchResult(serverUrl, await fetchTools(serverUrl));
224
- }
225
- catch (error) {
226
- if (error instanceof teamsfx_api_1.UserError) {
227
- throw error;
228
- }
229
- throw new teamsfx_api_1.UserError({
230
- source: "Scaffold",
231
- name: "McpToolsFetchFailed",
232
- message: `Failed to fetch tools from the MCP server at ${serverUrl}.`,
233
- });
234
- }
235
- }
236
- if (!toolsJson) {
237
- throw new teamsfx_api_1.UserError({
238
- source: "Scaffold",
239
- name: "McpToolsJsonMissing",
240
- message: "MCP tools JSON is required before listing tools.",
241
- });
242
- }
243
- const parsed = (0, mcpStaticTools_1.parseMcpStaticToolsJson)(toolsJson);
244
- if (!parsed.ok) {
245
- throw new teamsfx_api_1.UserError({ source: "Scaffold", name: parsed.code, message: parsed.message });
246
- }
247
- return {
248
- options: parsed.tools.map((tool) => ({
249
- id: tool.name,
250
- label: tool.name,
251
- detail: tool.description,
252
- })),
253
- derived: { toolsJson },
254
- };
255
- },
256
- };
257
- }
258
- function createDefaultCreateOptionsProviders(fetchTools, listLocalMcpServers, searchApiSpec = () => Promise.resolve([])) {
259
- const localServers = createLocalServerCache(listLocalMcpServers);
260
- return {
261
- "mcp.serverTypes": createMcpServerTypesProvider(localServers),
262
- "mcp.localServers": createLocalMcpServersProvider(localServers),
263
- "mcp.tools": createMcpToolsProvider(fetchTools),
264
- "openapi.search": createOpenApiSearchProvider(searchApiSpec),
265
- "openapi.operations": exports.openApiOperationsProvider,
266
- };
267
- }
268
- //# sourceMappingURL=createOptionsProviders.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createOptionsProviders.js","sourceRoot":"","sources":["../../../src/v4/providers/createOptionsProviders.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA0ClC,oEAiBC;AAeD,sEAeC;AAqFD,kEA8BC;AAyBD,wDAuDC;AAED,kFAaC;;AAzSD,wDAAgE;AAChE,kEAOqC;AACrC,gEAA0B;AAK1B,4EAAqE;AACrE,0DAAgE;AAEhE,MAAM,mBAAmB,GAAG;IAC1B,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,iDAAiD;CAC7D,CAAC;AACF,MAAM,kBAAkB,GAAG;IACzB,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,gDAAgD;CAC5D,CAAC;AAEF,SAAS,sBAAsB,CAC7B,mBAA+C;IAE/C,IAAI,MAAwC,CAAC;IAC7C,OAAO,GAAG,EAAE;QACV,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,GAAG,mBAAmB,EAAE,CAAC;QACjC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,4BAA4B,CAC1C,YAAwC;IAExC,OAAO;QACL,aAAa,EAAE,CAAC,SAAS,CAAC;QAC1B,KAAK,CAAC,KAAK,CAAC,MAA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CAAC;gBACf,MAAM,IAAI,uBAAS,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YAC1F,CAAC;YACD,OAAO;gBACL,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;oBACnC,EAAE,EAAE,IAAI,CAAC,IAAI;oBACb,KAAK,EAAE,IAAI,CAAC,IAAI;oBAChB,MAAM,EAAE,IAAI,CAAC,WAAW;iBACzB,CAAC,CAAC;gBACH,OAAO,EAAE,EAAE,SAAS,EAAE;aACvB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,mCAAmC,CACjD,UAA0D,EAC1D,mBAA+C,EAC/C,gBAAuE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IAEhG,MAAM,YAAY,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;IACjE,OAAO;QACL,iBAAiB,EAAE,4BAA4B,CAAC,YAAY,CAAC;QAC7D,kBAAkB,EAAE,6BAA6B,CAAC,YAAY,CAAC;QAC/D,WAAW,EAAE,sBAAsB,CAAC,UAAU,CAAC;QAC/C,gBAAgB,EAAE,2BAA2B,CAAC,aAAa,CAAC;QAC5D,oBAAoB,EAAE,iCAAyB;KAChD,CAAC;AACJ,CAAC"}
@@ -1,5 +0,0 @@
1
- import { M365TokenProvider } from "@microsoft/teamsfx-api";
2
- import { GeneralSensitivityLabelService } from "./steps/daSensitivity";
3
- /** Build the non-interactive, best-effort Graph adapter used by the real scaffold runtime. */
4
- export declare function createGeneralSensitivityLabelService(tokenProvider: M365TokenProvider | undefined): GeneralSensitivityLabelService;
5
- //# sourceMappingURL=generalSensitivityLabel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generalSensitivityLabel.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/generalSensitivityLabel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAY,MAAM,wBAAwB,CAAC;AAGrE,OAAO,EACL,8BAA8B,EAE/B,MAAM,uBAAuB,CAAC;AAE/B,8FAA8F;AAC9F,wBAAgB,oCAAoC,CAClD,aAAa,EAAE,iBAAiB,GAAG,SAAS,GAC3C,8BAA8B,CA6BhC"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createGeneralSensitivityLabelService = createGeneralSensitivityLabelService;
6
- const teamsfx_api_1 = require("@microsoft/teamsfx-api");
7
- const graphClient_1 = require("../../client/graphClient");
8
- const constants_1 = require("../../common/constants");
9
- const daSensitivity_1 = require("./steps/daSensitivity");
10
- /** Build the non-interactive, best-effort Graph adapter used by the real scaffold runtime. */
11
- function createGeneralSensitivityLabelService(tokenProvider) {
12
- if (tokenProvider === undefined) {
13
- return daSensitivity_1.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE;
14
- }
15
- return {
16
- resolveId: async () => {
17
- try {
18
- const status = await tokenProvider.getStatus({
19
- scopes: [constants_1.ListSensitivityLabelScope],
20
- showDialog: false,
21
- });
22
- if (status.isErr() ||
23
- status.value.status !== teamsfx_api_1.signedIn ||
24
- status.value.token === undefined) {
25
- return undefined;
26
- }
27
- const result = await new graphClient_1.GraphClient(tokenProvider).getGeneralSentivityLabel(status.value.token);
28
- return result.isOk() ? result.value.id : undefined;
29
- }
30
- catch {
31
- return undefined;
32
- }
33
- },
34
- };
35
- }
36
- //# sourceMappingURL=generalSensitivityLabel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generalSensitivityLabel.js","sourceRoot":"","sources":["../../../src/v4/runtime/generalSensitivityLabel.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAWlC,oFA+BC;AAxCD,wDAAqE;AACrE,0DAAuD;AACvD,sDAAmE;AACnE,yDAG+B;AAE/B,8FAA8F;AAC9F,SAAgB,oCAAoC,CAClD,aAA4C;IAE5C,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,sDAAsC,CAAC;IAChD,CAAC;IAED,OAAO;QACL,SAAS,EAAE,KAAK,IAAiC,EAAE;YACjD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,SAAS,CAAC;oBAC3C,MAAM,EAAE,CAAC,qCAAyB,CAAC;oBACnC,UAAU,EAAE,KAAK;iBAClB,CAAC,CAAC;gBACH,IACE,MAAM,CAAC,KAAK,EAAE;oBACd,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,sBAAQ;oBAChC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,EAChC,CAAC;oBACD,OAAO,SAAS,CAAC;gBACnB,CAAC;gBAED,MAAM,MAAM,GAAG,MAAM,IAAI,yBAAW,CAAC,aAAa,CAAC,CAAC,wBAAwB,CAC1E,MAAM,CAAC,KAAK,CAAC,KAAK,CACnB,CAAC;gBACF,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YACrD,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,SAAS,CAAC;YACnB,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,14 +0,0 @@
1
- import { RegisteredStep } from "../../pipeline/runScaffoldPipeline";
2
- /** Engine step name `da/set-sensitivity-label`. */
3
- export declare const STEP_SET_SENSITIVITY_LABEL = "da/set-sensitivity-label";
4
- /** Best-effort service used by the sensitivity-label step. */
5
- export interface GeneralSensitivityLabelService {
6
- resolveId(): Promise<string | undefined>;
7
- }
8
- /** Offline/default service used when no authenticated M365 adapter is registered. */
9
- export declare const NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE: GeneralSensitivityLabelService;
10
- /** Bind the General-label lookup dependency into its registered step. */
11
- export declare function createDaSetSensitivityLabelStep(generalSensitivityLabel: GeneralSensitivityLabelService): RegisteredStep;
12
- /** Default step binding for offline runtimes and compatibility consumers. */
13
- export declare const daSetSensitivityLabel: RegisteredStep;
14
- //# sourceMappingURL=daSensitivity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"daSensitivity.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/daSensitivity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAA2B,MAAM,oCAAoC,CAAC;AAI7F,mDAAmD;AACnD,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAWrE,8DAA8D;AAC9D,MAAM,WAAW,8BAA8B;IAC7C,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAED,qFAAqF;AACrF,eAAO,MAAM,sCAAsC,EAAE,8BAEpD,CAAC;AAEF,yEAAyE;AACzE,wBAAgB,+BAA+B,CAC7C,uBAAuB,EAAE,8BAA8B,GACtD,cAAc,CAgChB;AAED,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,gBAEjC,CAAC"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.daSetSensitivityLabel = exports.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE = exports.STEP_SET_SENSITIVITY_LABEL = void 0;
6
- exports.createDaSetSensitivityLabelStep = createDaSetSensitivityLabelStep;
7
- const teamsfx_api_1 = require("@microsoft/teamsfx-api");
8
- const neverthrow_1 = require("neverthrow");
9
- const SOURCE = "Scaffold";
10
- /** Engine step name `da/set-sensitivity-label`. */
11
- exports.STEP_SET_SENSITIVITY_LABEL = "da/set-sensitivity-label";
12
- function systemError(name, message) {
13
- return new teamsfx_api_1.SystemError({ source: SOURCE, name, message });
14
- }
15
- function manifestPath(params) {
16
- const value = params.manifestPath;
17
- return typeof value === "string" && value.trim().length > 0 ? value : undefined;
18
- }
19
- /** Offline/default service used when no authenticated M365 adapter is registered. */
20
- exports.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE = {
21
- resolveId: () => Promise.resolve(undefined),
22
- };
23
- /** Bind the General-label lookup dependency into its registered step. */
24
- function createDaSetSensitivityLabelStep(generalSensitivityLabel) {
25
- return {
26
- validateParams(resolved) {
27
- return manifestPath(resolved) === undefined
28
- ? "missing non-empty string parameter 'manifestPath'"
29
- : undefined;
30
- },
31
- async apply(resolved, ctx) {
32
- const path = manifestPath(resolved);
33
- if (path === undefined) {
34
- return (0, neverthrow_1.err)(systemError("DaSensitivityLabelParams", "resolved manifestPath is not a non-empty string"));
35
- }
36
- const id = await generalSensitivityLabel.resolveId();
37
- if (id === undefined) {
38
- return (0, neverthrow_1.ok)(undefined);
39
- }
40
- const wrapper = ctx.manifestWrapper("declarativeAgent");
41
- if (wrapper.setSensitivityLabel === undefined) {
42
- return (0, neverthrow_1.err)(systemError("DaSensitivityLabelWrapperMissing", "the Declarative Agent manifest wrapper cannot set a sensitivity label"));
43
- }
44
- return wrapper.setSensitivityLabel(path, id);
45
- },
46
- };
47
- }
48
- /** Default step binding for offline runtimes and compatibility consumers. */
49
- exports.daSetSensitivityLabel = createDaSetSensitivityLabelStep(exports.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE);
50
- //# sourceMappingURL=daSensitivity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"daSensitivity.js","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/daSensitivity.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA+BlC,0EAkCC;AA/DD,wDAA8D;AAC9D,2CAA6C;AAG7C,MAAM,MAAM,GAAG,UAAU,CAAC;AAE1B,mDAAmD;AACtC,QAAA,0BAA0B,GAAG,0BAA0B,CAAC;AAErE,SAAS,WAAW,CAAC,IAAY,EAAE,OAAe;IAChD,O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AAG,EACR,WAAW,CACT,kCAAkC,EAClC,uEAAuE,CACxE,CACF,CAAC;YACJ,CAAC;YACD,OAAO,OAAO,CAAC,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC/C,CAAC;KACF,CAAC;AACJ,CAAC;AAED,6EAA6E;AAChE,QAAA,qBAAqB,GAAG,+BAA+B,CAClE,8CAAsC,CACvC,CAAC"}
@@ -1,5 +0,0 @@
1
- import { WarningResult } from "@microsoft/m365-spec-parser";
2
- import { OpenAPIV3 } from "openapi-types";
3
- /** Generate the post-render Teams AI files declared by the custom API scenario. */
4
- export declare function generateTeamsAiCustomApiFiles(spec: OpenAPIV3.Document, language: string, destinationPath: string, openapiSpecFileName: string): Promise<WarningResult[]>;
5
- //# sourceMappingURL=openApiCustomApi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"openApiCustomApi.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/openApiCustomApi.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,aAAa,EAEd,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAsc1C,mFAAmF;AACnF,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,SAAS,CAAC,QAAQ,EACxB,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,EACvB,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC,aAAa,EAAE,CAAC,CAc1B"}