@microsoft/teamsfx-core 2.0.7 → 2.0.8-alpha.18377bc6e.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.
Files changed (378) hide show
  1. package/build/common/constants.d.ts +6 -0
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +6 -0
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/featureFlags.d.ts +7 -0
  6. package/build/common/featureFlags.d.ts.map +1 -1
  7. package/build/common/featureFlags.js +85 -2
  8. package/build/common/featureFlags.js.map +1 -1
  9. package/build/common/m365/packageService.d.ts +1 -0
  10. package/build/common/m365/packageService.d.ts.map +1 -1
  11. package/build/common/m365/packageService.js +15 -2
  12. package/build/common/m365/packageService.js.map +1 -1
  13. package/build/common/projectSettingsHelper.d.ts +8 -0
  14. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  15. package/build/common/projectSettingsHelper.js +47 -1
  16. package/build/common/projectSettingsHelper.js.map +1 -1
  17. package/build/common/projectTypeChecker.d.ts +2 -0
  18. package/build/common/projectTypeChecker.d.ts.map +1 -1
  19. package/build/common/projectTypeChecker.js +11 -2
  20. package/build/common/projectTypeChecker.js.map +1 -1
  21. package/build/common/samples.d.ts +1 -1
  22. package/build/common/samples.d.ts.map +1 -1
  23. package/build/common/samples.js +1 -3
  24. package/build/common/samples.js.map +1 -1
  25. package/build/common/telemetry.d.ts +8 -2
  26. package/build/common/telemetry.d.ts.map +1 -1
  27. package/build/common/telemetry.js +15 -5
  28. package/build/common/telemetry.js.map +1 -1
  29. package/build/common/templates-config.json +3 -2
  30. package/build/common/wrappedAxiosClient.d.ts +59 -0
  31. package/build/common/wrappedAxiosClient.d.ts.map +1 -0
  32. package/build/common/wrappedAxiosClient.js +249 -0
  33. package/build/common/wrappedAxiosClient.js.map +1 -0
  34. package/build/component/configManager/constant.d.ts +2 -1
  35. package/build/component/configManager/constant.d.ts.map +1 -1
  36. package/build/component/configManager/constant.js +1 -0
  37. package/build/component/configManager/constant.js.map +1 -1
  38. package/build/component/configManager/validator.js +1 -1
  39. package/build/component/configManager/validator.js.map +1 -1
  40. package/build/component/constant/commonConstant.d.ts +5 -0
  41. package/build/component/constant/commonConstant.d.ts.map +1 -1
  42. package/build/component/constant/commonConstant.js +7 -1
  43. package/build/component/constant/commonConstant.js.map +1 -1
  44. package/build/component/coordinator/index.d.ts +10 -1
  45. package/build/component/coordinator/index.d.ts.map +1 -1
  46. package/build/component/coordinator/index.js +76 -23
  47. package/build/component/coordinator/index.js.map +1 -1
  48. package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
  49. package/build/component/developerPortalScaffoldUtils.js +0 -2
  50. package/build/component/developerPortalScaffoldUtils.js.map +1 -1
  51. package/build/component/driver/aad/create.d.ts +1 -0
  52. package/build/component/driver/aad/create.d.ts.map +1 -1
  53. package/build/component/driver/aad/create.js +22 -11
  54. package/build/component/driver/aad/create.js.map +1 -1
  55. package/build/component/driver/aad/error/aadManifestError.d.ts +6 -0
  56. package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
  57. package/build/component/driver/aad/error/aadManifestError.js +25 -1
  58. package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
  59. package/build/component/driver/aad/error/clientSecretNotAllowedError.d.ts +5 -0
  60. package/build/component/driver/aad/error/clientSecretNotAllowedError.d.ts.map +1 -0
  61. package/build/component/driver/aad/error/clientSecretNotAllowedError.js +23 -0
  62. package/build/component/driver/aad/error/clientSecretNotAllowedError.js.map +1 -0
  63. package/build/component/driver/aad/error/credentialInvalidLifetimeError.d.ts +5 -0
  64. package/build/component/driver/aad/error/credentialInvalidLifetimeError.d.ts.map +1 -0
  65. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js +23 -0
  66. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js.map +1 -0
  67. package/build/component/driver/aad/interface/IAADDefinition.d.ts +1 -0
  68. package/build/component/driver/aad/interface/IAADDefinition.d.ts.map +1 -1
  69. package/build/component/driver/aad/interface/createAadAppArgs.d.ts +3 -0
  70. package/build/component/driver/aad/interface/createAadAppArgs.d.ts.map +1 -1
  71. package/build/component/driver/aad/permissions/index.d.ts.map +1 -1
  72. package/build/component/driver/aad/permissions/index.js +9 -0
  73. package/build/component/driver/aad/permissions/index.js.map +1 -1
  74. package/build/component/driver/aad/utility/aadAppClient.d.ts +4 -2
  75. package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
  76. package/build/component/driver/aad/utility/aadAppClient.js +43 -16
  77. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  78. package/build/component/driver/aad/utility/aadManifestHelper.d.ts.map +1 -1
  79. package/build/component/driver/aad/utility/aadManifestHelper.js +9 -1
  80. package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
  81. package/build/component/driver/aad/utility/constants.d.ts +6 -0
  82. package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
  83. package/build/component/driver/aad/utility/constants.js +8 -2
  84. package/build/component/driver/aad/utility/constants.js.map +1 -1
  85. package/build/component/driver/apiKey/create.d.ts +0 -3
  86. package/build/component/driver/apiKey/create.d.ts.map +1 -1
  87. package/build/component/driver/apiKey/create.js +23 -50
  88. package/build/component/driver/apiKey/create.js.map +1 -1
  89. package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts +2 -0
  90. package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts.map +1 -1
  91. package/build/component/driver/apiKey/interface/updateApiKeyArgs.d.ts +9 -0
  92. package/build/component/driver/apiKey/interface/updateApiKeyArgs.d.ts.map +1 -0
  93. package/build/component/driver/apiKey/interface/updateApiKeyArgs.js +5 -0
  94. package/build/component/driver/apiKey/interface/updateApiKeyArgs.js.map +1 -0
  95. package/build/component/driver/apiKey/update.d.ts +13 -0
  96. package/build/component/driver/apiKey/update.d.ts.map +1 -0
  97. package/build/component/driver/apiKey/update.js +182 -0
  98. package/build/component/driver/apiKey/update.js.map +1 -0
  99. package/build/component/driver/apiKey/utility/constants.d.ts +2 -0
  100. package/build/component/driver/apiKey/utility/constants.d.ts.map +1 -1
  101. package/build/component/driver/apiKey/utility/constants.js +2 -0
  102. package/build/component/driver/apiKey/utility/constants.js.map +1 -1
  103. package/build/component/driver/apiKey/utility/utility.d.ts +7 -0
  104. package/build/component/driver/apiKey/utility/utility.d.ts.map +1 -0
  105. package/build/component/driver/apiKey/utility/utility.js +56 -0
  106. package/build/component/driver/apiKey/utility/utility.js.map +1 -0
  107. package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
  108. package/build/component/driver/botFramework/createOrUpdateBot.js +0 -2
  109. package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
  110. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
  111. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +5 -5
  112. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
  113. package/build/component/driver/deploy/spfx/utility/spoClient.d.ts.map +1 -1
  114. package/build/component/driver/deploy/spfx/utility/spoClient.js +3 -1
  115. package/build/component/driver/deploy/spfx/utility/spoClient.js.map +1 -1
  116. package/build/component/driver/index.d.ts +2 -0
  117. package/build/component/driver/index.d.ts.map +1 -1
  118. package/build/component/driver/index.js +2 -0
  119. package/build/component/driver/index.js.map +1 -1
  120. package/build/component/driver/script/scriptDriver.js +2 -2
  121. package/build/component/driver/script/scriptDriver.js.map +1 -1
  122. package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
  123. package/build/component/driver/teamsApp/appStudio.js +0 -2
  124. package/build/component/driver/teamsApp/appStudio.js.map +1 -1
  125. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +35 -10
  126. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
  127. package/build/component/driver/teamsApp/clients/appStudioClient.js +100 -109
  128. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  129. package/build/component/driver/teamsApp/clients/authSvcClient.d.ts.map +1 -1
  130. package/build/component/driver/teamsApp/clients/authSvcClient.js +3 -24
  131. package/build/component/driver/teamsApp/clients/authSvcClient.js.map +1 -1
  132. package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
  133. package/build/component/driver/teamsApp/configure.js +0 -2
  134. package/build/component/driver/teamsApp/configure.js.map +1 -1
  135. package/build/component/driver/teamsApp/constants.d.ts +5 -0
  136. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  137. package/build/component/driver/teamsApp/constants.js +7 -1
  138. package/build/component/driver/teamsApp/constants.js.map +1 -1
  139. package/build/component/driver/teamsApp/create.d.ts.map +1 -1
  140. package/build/component/driver/teamsApp/create.js +0 -2
  141. package/build/component/driver/teamsApp/create.js.map +1 -1
  142. package/build/component/driver/teamsApp/createAppPackage.d.ts +5 -1
  143. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  144. package/build/component/driver/teamsApp/createAppPackage.js +86 -24
  145. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  146. package/build/component/driver/teamsApp/errors.d.ts +4 -0
  147. package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
  148. package/build/component/driver/teamsApp/errors.js +7 -0
  149. package/build/component/driver/teamsApp/errors.js.map +1 -1
  150. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts +20 -0
  151. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts.map +1 -1
  152. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.js.map +1 -1
  153. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.d.ts +21 -0
  154. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.d.ts.map +1 -0
  155. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.js +5 -0
  156. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.js.map +1 -0
  157. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.d.ts +17 -0
  158. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.d.ts.map +1 -0
  159. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.js +16 -0
  160. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.js.map +1 -0
  161. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.d.ts +41 -0
  162. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.d.ts.map +1 -0
  163. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.js +5 -0
  164. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.js.map +1 -0
  165. package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.d.ts +17 -0
  166. package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.d.ts.map +1 -0
  167. package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.js +5 -0
  168. package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.js.map +1 -0
  169. package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
  170. package/build/component/driver/teamsApp/publishAppPackage.js +3 -5
  171. package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
  172. package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
  173. package/build/component/driver/teamsApp/teamsappMgr.js +22 -8
  174. package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
  175. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +1 -0
  176. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
  177. package/build/component/driver/teamsApp/utils/ManifestUtils.js +17 -0
  178. package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
  179. package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts +8 -0
  180. package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -0
  181. package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +63 -0
  182. package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -0
  183. package/build/component/driver/teamsApp/utils/telemetry.d.ts +1 -31
  184. package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
  185. package/build/component/driver/teamsApp/utils/telemetry.js +2 -53
  186. package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
  187. package/build/component/driver/teamsApp/utils/utils.d.ts +1 -0
  188. package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
  189. package/build/component/driver/teamsApp/utils/utils.js +5 -1
  190. package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
  191. package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
  192. package/build/component/driver/teamsApp/validate.js +0 -1
  193. package/build/component/driver/teamsApp/validate.js.map +1 -1
  194. package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
  195. package/build/component/driver/teamsApp/validateAppPackage.js +0 -1
  196. package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
  197. package/build/component/driver/teamsApp/validateTestCases.d.ts +31 -0
  198. package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -0
  199. package/build/component/driver/teamsApp/validateTestCases.js +225 -0
  200. package/build/component/driver/teamsApp/validateTestCases.js.map +1 -0
  201. package/build/component/feature/collaboration.d.ts +1 -1
  202. package/build/component/feature/collaboration.d.ts.map +1 -1
  203. package/build/component/feature/collaboration.js +2 -4
  204. package/build/component/feature/collaboration.js.map +1 -1
  205. package/build/component/generator/copilotPlugin/generator.d.ts +5 -2
  206. package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
  207. package/build/component/generator/copilotPlugin/generator.js +101 -26
  208. package/build/component/generator/copilotPlugin/generator.js.map +1 -1
  209. package/build/component/generator/copilotPlugin/helper.d.ts +8 -3
  210. package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
  211. package/build/component/generator/copilotPlugin/helper.js +273 -30
  212. package/build/component/generator/copilotPlugin/helper.js.map +1 -1
  213. package/build/component/generator/error.d.ts +1 -1
  214. package/build/component/generator/error.d.ts.map +1 -1
  215. package/build/component/generator/error.js +4 -4
  216. package/build/component/generator/error.js.map +1 -1
  217. package/build/component/generator/generator.d.ts +6 -1
  218. package/build/component/generator/generator.d.ts.map +1 -1
  219. package/build/component/generator/generator.js +33 -26
  220. package/build/component/generator/generator.js.map +1 -1
  221. package/build/component/generator/generatorAction.d.ts +5 -16
  222. package/build/component/generator/generatorAction.d.ts.map +1 -1
  223. package/build/component/generator/generatorAction.js +46 -87
  224. package/build/component/generator/generatorAction.js.map +1 -1
  225. package/build/component/generator/officeAddin/config/projectProperties.d.ts +32 -1
  226. package/build/component/generator/officeAddin/config/projectProperties.d.ts.map +1 -1
  227. package/build/component/generator/officeAddin/config/projectProperties.js +33 -2
  228. package/build/component/generator/officeAddin/config/projectProperties.js.map +1 -1
  229. package/build/component/generator/officeAddin/generator.d.ts +7 -2
  230. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  231. package/build/component/generator/officeAddin/generator.js +74 -32
  232. package/build/component/generator/officeAddin/generator.js.map +1 -1
  233. package/build/component/generator/officeAddin/helperMethods.d.ts +2 -1
  234. package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
  235. package/build/component/generator/officeAddin/helperMethods.js +21 -10
  236. package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
  237. package/build/component/generator/officeXMLAddin/generator.d.ts +13 -0
  238. package/build/component/generator/officeXMLAddin/generator.d.ts.map +1 -0
  239. package/build/component/generator/officeXMLAddin/generator.js +107 -0
  240. package/build/component/generator/officeXMLAddin/generator.js.map +1 -0
  241. package/build/component/generator/officeXMLAddin/projectConfig.d.ts +24 -0
  242. package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -0
  243. package/build/component/generator/officeXMLAddin/projectConfig.js +126 -0
  244. package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -0
  245. package/build/component/generator/utils.d.ts +2 -1
  246. package/build/component/generator/utils.d.ts.map +1 -1
  247. package/build/component/generator/utils.js +35 -16
  248. package/build/component/generator/utils.js.map +1 -1
  249. package/build/component/middleware/envMW.d.ts.map +1 -1
  250. package/build/component/middleware/envMW.js +1 -0
  251. package/build/component/middleware/envMW.js.map +1 -1
  252. package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
  253. package/build/component/resource/botService/appStudio/appStudioClient.js +11 -39
  254. package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
  255. package/build/component/utils/envUtil.d.ts +2 -0
  256. package/build/component/utils/envUtil.d.ts.map +1 -1
  257. package/build/component/utils/envUtil.js +23 -0
  258. package/build/component/utils/envUtil.js.map +1 -1
  259. package/build/component/utils/metadataGraphPermssion.d.ts +8 -6
  260. package/build/component/utils/metadataGraphPermssion.d.ts.map +1 -1
  261. package/build/component/utils/metadataGraphPermssion.js +10 -2
  262. package/build/component/utils/metadataGraphPermssion.js.map +1 -1
  263. package/build/component/utils/metadataRscPermission.d.ts +16 -0
  264. package/build/component/utils/metadataRscPermission.d.ts.map +1 -0
  265. package/build/component/utils/metadataRscPermission.js +69 -0
  266. package/build/component/utils/metadataRscPermission.js.map +1 -0
  267. package/build/component/utils/metadataUtil.d.ts.map +1 -1
  268. package/build/component/utils/metadataUtil.js +2 -0
  269. package/build/component/utils/metadataUtil.js.map +1 -1
  270. package/build/component/utils/pathUtils.d.ts.map +1 -1
  271. package/build/component/utils/pathUtils.js +2 -0
  272. package/build/component/utils/pathUtils.js.map +1 -1
  273. package/build/core/FxCore.d.ts +3 -2
  274. package/build/core/FxCore.d.ts.map +1 -1
  275. package/build/core/FxCore.js +105 -19
  276. package/build/core/FxCore.js.map +1 -1
  277. package/build/core/collaborator.js +3 -3
  278. package/build/core/collaborator.js.map +1 -1
  279. package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
  280. package/build/core/middleware/projectMigratorV3.js +6 -1
  281. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  282. package/build/error/common.d.ts.map +1 -1
  283. package/build/error/common.js +1 -1
  284. package/build/error/common.js.map +1 -1
  285. package/build/error/deploy.d.ts.map +1 -1
  286. package/build/error/deploy.js +17 -6
  287. package/build/error/deploy.js.map +1 -1
  288. package/build/error/script.d.ts +2 -2
  289. package/build/error/script.d.ts.map +1 -1
  290. package/build/error/script.js +6 -6
  291. package/build/error/script.js.map +1 -1
  292. package/build/index.d.ts +0 -1
  293. package/build/index.d.ts.map +1 -1
  294. package/build/index.js +1 -3
  295. package/build/index.js.map +1 -1
  296. package/build/question/constants.d.ts +1 -0
  297. package/build/question/constants.d.ts.map +1 -1
  298. package/build/question/constants.js +2 -1
  299. package/build/question/constants.js.map +1 -1
  300. package/build/question/create.d.ts +44 -4
  301. package/build/question/create.d.ts.map +1 -1
  302. package/build/question/create.js +685 -128
  303. package/build/question/create.js.map +1 -1
  304. package/build/question/inputs/CreateProjectInputs.d.ts +22 -8
  305. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
  306. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  307. package/build/question/options/CreateProjectOptions.js +74 -12
  308. package/build/question/options/CreateProjectOptions.js.map +1 -1
  309. package/build/question/other.d.ts +1 -0
  310. package/build/question/other.d.ts.map +1 -1
  311. package/build/question/other.js +17 -1
  312. package/build/question/other.js.map +1 -1
  313. package/build/question/questionNames.d.ts +9 -1
  314. package/build/question/questionNames.d.ts.map +1 -1
  315. package/build/question/questionNames.js +8 -0
  316. package/build/question/questionNames.js.map +1 -1
  317. package/package.json +5 -4
  318. package/resource/package.nls.json +233 -125
  319. package/resource/yaml-schema/v1.5/yaml.schema.json +1663 -0
  320. package/resource/yaml-schema/yaml.schema.json +77 -2
  321. package/templates/fallback/common.zip +0 -0
  322. package/templates/fallback/csharp.zip +0 -0
  323. package/templates/fallback/js.zip +0 -0
  324. package/templates/fallback/python.zip +0 -0
  325. package/templates/fallback/ts.zip +0 -0
  326. package/templates/plugins/resource/aad/auth/V3/Enable SSO.txt +1 -1
  327. package/build/common/spec-parser/adaptiveCardGenerator.d.ts +0 -7
  328. package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +0 -1
  329. package/build/common/spec-parser/adaptiveCardGenerator.js +0 -168
  330. package/build/common/spec-parser/adaptiveCardGenerator.js.map +0 -1
  331. package/build/common/spec-parser/adaptiveCardWrapper.d.ts +0 -15
  332. package/build/common/spec-parser/adaptiveCardWrapper.d.ts.map +0 -1
  333. package/build/common/spec-parser/adaptiveCardWrapper.js +0 -98
  334. package/build/common/spec-parser/adaptiveCardWrapper.js.map +0 -1
  335. package/build/common/spec-parser/constants.d.ts +0 -41
  336. package/build/common/spec-parser/constants.d.ts.map +0 -1
  337. package/build/common/spec-parser/constants.js +0 -95
  338. package/build/common/spec-parser/constants.js.map +0 -1
  339. package/build/common/spec-parser/index.browser.d.ts +0 -6
  340. package/build/common/spec-parser/index.browser.d.ts.map +0 -1
  341. package/build/common/spec-parser/index.browser.js +0 -16
  342. package/build/common/spec-parser/index.browser.js.map +0 -1
  343. package/build/common/spec-parser/index.d.ts +0 -5
  344. package/build/common/spec-parser/index.d.ts.map +0 -1
  345. package/build/common/spec-parser/index.js +0 -16
  346. package/build/common/spec-parser/index.js.map +0 -1
  347. package/build/common/spec-parser/interfaces.d.ts +0 -180
  348. package/build/common/spec-parser/interfaces.d.ts.map +0 -1
  349. package/build/common/spec-parser/interfaces.js +0 -51
  350. package/build/common/spec-parser/interfaces.js.map +0 -1
  351. package/build/common/spec-parser/manifestUpdater.d.ts +0 -7
  352. package/build/common/spec-parser/manifestUpdater.d.ts.map +0 -1
  353. package/build/common/spec-parser/manifestUpdater.js +0 -98
  354. package/build/common/spec-parser/manifestUpdater.js.map +0 -1
  355. package/build/common/spec-parser/specFilter.d.ts +0 -3
  356. package/build/common/spec-parser/specFilter.d.ts.map +0 -1
  357. package/build/common/spec-parser/specFilter.js +0 -40
  358. package/build/common/spec-parser/specFilter.js.map +0 -1
  359. package/build/common/spec-parser/specParser.browser.d.ts +0 -46
  360. package/build/common/spec-parser/specParser.browser.d.ts.map +0 -1
  361. package/build/common/spec-parser/specParser.browser.js +0 -139
  362. package/build/common/spec-parser/specParser.browser.js.map +0 -1
  363. package/build/common/spec-parser/specParser.d.ts +0 -46
  364. package/build/common/spec-parser/specParser.d.ts.map +0 -1
  365. package/build/common/spec-parser/specParser.js +0 -244
  366. package/build/common/spec-parser/specParser.js.map +0 -1
  367. package/build/common/spec-parser/specParserError.d.ts +0 -6
  368. package/build/common/spec-parser/specParserError.d.ts.map +0 -1
  369. package/build/common/spec-parser/specParserError.js +0 -13
  370. package/build/common/spec-parser/specParserError.js.map +0 -1
  371. package/build/common/spec-parser/utils.d.ts +0 -43
  372. package/build/common/spec-parser/utils.d.ts.map +0 -1
  373. package/build/common/spec-parser/utils.js +0 -595
  374. package/build/common/spec-parser/utils.js.map +0 -1
  375. package/build/component/generator/officeAddin/config/projectsJsonData.d.ts +0 -20
  376. package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +0 -1
  377. package/build/component/generator/officeAddin/config/projectsJsonData.js +0 -115
  378. package/build/component/generator/officeAddin/config/projectsJsonData.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createProjectCliHelpNode = exports.createSampleProjectQuestionNode = exports.createProjectQuestionNode = exports.capabilitySubTree = exports.apiOperationQuestion = exports.apiMessageExtensionAuthQuestion = exports.openAIPluginManifestLocationQuestion = exports.apiSpecLocationQuestion = exports.ApiMessageExtensionAuthOptions = exports.RuntimeOptions = exports.appNameQuestion = exports.AppNamePattern = exports.folderQuestion = exports.programmingLanguageQuestion = exports.ProgrammingLanguage = exports.getLanguageOptions = exports.officeAddinHostingQuestion = exports.getTemplate = exports.SPFxImportFolderQuestion = exports.SPFxVersionOptionIds = exports.SPFxWebpartNameQuestion = exports.SPFxFrameworkQuestion = exports.SPFxPackageSelectQuestion = exports.NotificationTriggerOptions = exports.meArchitectureQuestion = exports.MeArchitectureOptions = exports.capabilityQuestion = exports.CapabilityOptions = exports.ProjectTypeOptions = exports.ScratchOptions = void 0;
5
+ exports.createProjectCliHelpNode = exports.createSampleProjectQuestionNode = exports.createProjectQuestionNode = exports.capabilitySubTree = exports.CustomCopilotAssistantOptions = exports.CustomCopilotRagOptions = exports.apiOperationQuestion = exports.apiMessageExtensionAuthQuestion = exports.openAIPluginManifestLocationQuestion = exports.apiSpecLocationQuestion = exports.ApiMessageExtensionAuthOptions = exports.RuntimeOptions = exports.appNameQuestion = exports.AppNamePattern = exports.folderQuestion = exports.programmingLanguageQuestion = exports.ProgrammingLanguage = exports.getLanguageOptions = exports.getOfficeAddinFramework = exports.getAddinFrameworkOptions = exports.officeAddinFrameworkQuestion = exports.officeAddinHostingQuestion = exports.SPFxImportFolderQuestion = exports.SPFxVersionOptionIds = exports.SPFxWebpartNameQuestion = exports.SPFxFrameworkQuestion = exports.SPFxPackageSelectQuestion = exports.NotificationTriggerOptions = exports.meArchitectureQuestion = exports.MeArchitectureOptions = exports.capabilityQuestion = exports.CapabilityOptions = exports.OfficeAddinHostOptions = exports.ProjectTypeOptions = exports.ScratchOptions = void 0;
6
6
  const tslib_1 = require("tslib");
7
7
  const teamsfx_api_1 = require("@microsoft/teamsfx-api");
8
8
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
@@ -11,6 +11,7 @@ const lodash_1 = require("lodash");
11
11
  const os = tslib_1.__importStar(require("os"));
12
12
  const path = tslib_1.__importStar(require("path"));
13
13
  const constants_1 = require("../common/constants");
14
+ const correlator_1 = require("../common/correlator");
14
15
  const featureFlags_1 = require("../common/featureFlags");
15
16
  const localizeUtils_1 = require("../common/localizeUtils");
16
17
  const samples_1 = require("../common/samples");
@@ -18,17 +19,16 @@ const utils_1 = require("../common/utils");
18
19
  const developerPortalScaffoldUtils_1 = require("../component/developerPortalScaffoldUtils");
19
20
  const utils_2 = require("../component/driver/teamsApp/utils/utils");
20
21
  const helper_1 = require("../component/generator/copilotPlugin/helper");
21
- const projectsJsonData_1 = tslib_1.__importDefault(require("../component/generator/officeAddin/config/projectsJsonData"));
22
+ const projectConfig_1 = require("../component/generator/officeXMLAddin/projectConfig");
22
23
  const error_1 = require("../component/generator/spfx/error");
23
24
  const spfxGenerator_1 = require("../component/generator/spfx/spfxGenerator");
24
25
  const constants_2 = require("../component/generator/spfx/utils/constants");
25
26
  const utils_3 = require("../component/generator/spfx/utils/utils");
26
27
  const utils_4 = require("../component/utils");
27
28
  const error_2 = require("../error");
29
+ const constants_3 = require("./constants");
28
30
  const questionNames_1 = require("./questionNames");
29
31
  const util_1 = require("./util");
30
- const constants_3 = require("./constants");
31
- const correlator_1 = require("../common/correlator");
32
32
  class ScratchOptions {
33
33
  static yes() {
34
34
  return {
@@ -80,13 +80,41 @@ class ProjectTypeOptions {
80
80
  detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.detail"),
81
81
  };
82
82
  }
83
+ static officeXMLAddin(platform) {
84
+ return {
85
+ id: "office-xml-addin-type",
86
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(teamsfx-m365) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.mainEntry.title")}`,
87
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.mainEntry.detail"),
88
+ };
89
+ }
90
+ static officeAddin(platform) {
91
+ return {
92
+ id: "office-addin-type",
93
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(extensions) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.label")}`,
94
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.detail"),
95
+ };
96
+ }
97
+ static officeAddinAllIds(platform) {
98
+ return [
99
+ ProjectTypeOptions.officeAddin(platform).id,
100
+ ProjectTypeOptions.officeXMLAddin(platform).id,
101
+ ProjectTypeOptions.outlookAddin(platform).id,
102
+ ];
103
+ }
83
104
  static copilotPlugin(platform) {
84
105
  return {
85
106
  id: "copilot-plugin-type",
86
- label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(sparkle) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.label")}`,
107
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(teamsfx-copilot-plugin) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.label")}`,
87
108
  detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.detail"),
88
109
  };
89
110
  }
111
+ static customCopilot(platform) {
112
+ return {
113
+ id: "custom-copilot-type",
114
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(teamsfx-custom-copilot) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.label")}`,
115
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.detail"),
116
+ };
117
+ }
90
118
  }
91
119
  exports.ProjectTypeOptions = ProjectTypeOptions;
92
120
  function projectTypeQuestion() {
@@ -94,6 +122,8 @@ function projectTypeQuestion() {
94
122
  ProjectTypeOptions.bot(teamsfx_api_1.Platform.CLI),
95
123
  ProjectTypeOptions.tab(teamsfx_api_1.Platform.CLI),
96
124
  ProjectTypeOptions.me(teamsfx_api_1.Platform.CLI),
125
+ ProjectTypeOptions.officeXMLAddin(teamsfx_api_1.Platform.CLI),
126
+ ProjectTypeOptions.officeAddin(teamsfx_api_1.Platform.CLI),
97
127
  ProjectTypeOptions.outlookAddin(teamsfx_api_1.Platform.CLI),
98
128
  ];
99
129
  return {
@@ -103,22 +133,12 @@ function projectTypeQuestion() {
103
133
  staticOptions: staticOptions,
104
134
  dynamicOptions: (inputs) => {
105
135
  var _a;
106
- let staticOptions;
136
+ const staticOptions = [];
107
137
  if (featureFlags_1.isApiCopilotPluginEnabled()) {
108
- staticOptions = [
109
- ProjectTypeOptions.copilotPlugin(inputs.platform),
110
- ProjectTypeOptions.bot(inputs.platform),
111
- ProjectTypeOptions.tab(inputs.platform),
112
- ProjectTypeOptions.me(inputs.platform),
113
- ];
114
- }
115
- else {
116
- staticOptions = [
117
- ProjectTypeOptions.bot(inputs.platform),
118
- ProjectTypeOptions.tab(inputs.platform),
119
- ProjectTypeOptions.me(inputs.platform),
120
- ];
138
+ staticOptions.push(ProjectTypeOptions.copilotPlugin(inputs.platform));
121
139
  }
140
+ staticOptions.push(ProjectTypeOptions.customCopilot(inputs.platform));
141
+ staticOptions.push(ProjectTypeOptions.bot(inputs.platform), ProjectTypeOptions.tab(inputs.platform), ProjectTypeOptions.me(inputs.platform));
122
142
  if (developerPortalScaffoldUtils_1.isFromDevPortal(inputs)) {
123
143
  const projectType = (_a = developerPortalScaffoldUtils_1.getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.projectType;
124
144
  if (projectType) {
@@ -126,7 +146,11 @@ function projectTypeQuestion() {
126
146
  }
127
147
  }
128
148
  else {
129
- staticOptions.push(ProjectTypeOptions.outlookAddin(inputs.platform));
149
+ staticOptions.push(featureFlags_1.isOfficeXMLAddinEnabled() && !featureFlags_1.isOfficeJSONAddinEnabled()
150
+ ? ProjectTypeOptions.officeXMLAddin(inputs.platform)
151
+ : featureFlags_1.isOfficeJSONAddinEnabled()
152
+ ? ProjectTypeOptions.officeAddin(inputs.platform)
153
+ : ProjectTypeOptions.outlookAddin(inputs.platform));
130
154
  }
131
155
  return staticOptions;
132
156
  },
@@ -135,6 +159,49 @@ function projectTypeQuestion() {
135
159
  skipSingleOption: true,
136
160
  };
137
161
  }
162
+ class OfficeAddinHostOptions {
163
+ static all(platform) {
164
+ return [
165
+ OfficeAddinHostOptions.outlook(platform),
166
+ OfficeAddinHostOptions.word(),
167
+ OfficeAddinHostOptions.excel(),
168
+ OfficeAddinHostOptions.powerpoint(),
169
+ ];
170
+ }
171
+ static outlook(platform) {
172
+ return {
173
+ id: "outlook",
174
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(mail) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.label")}`,
175
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.detail"),
176
+ data: "Outlook",
177
+ };
178
+ }
179
+ static word() {
180
+ return {
181
+ id: "word",
182
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.title"),
183
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.detail"),
184
+ data: "Word",
185
+ };
186
+ }
187
+ static excel() {
188
+ return {
189
+ id: "excel",
190
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.title"),
191
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.detail"),
192
+ data: "Excel",
193
+ };
194
+ }
195
+ static powerpoint() {
196
+ return {
197
+ id: "powerpoint",
198
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.title"),
199
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.detail"),
200
+ data: "PowerPoint",
201
+ };
202
+ }
203
+ }
204
+ exports.OfficeAddinHostOptions = OfficeAddinHostOptions;
138
205
  class CapabilityOptions {
139
206
  // bot
140
207
  static basicBot() {
@@ -292,11 +359,19 @@ class CapabilityOptions {
292
359
  detail: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.detail"),
293
360
  };
294
361
  }
295
- static bots(inputs, includeAssistant) {
362
+ static bots(inputs) {
363
+ if ((inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.VS) {
364
+ return [
365
+ CapabilityOptions.basicBot(),
366
+ CapabilityOptions.aiBot(),
367
+ CapabilityOptions.aiAssistantBot(),
368
+ CapabilityOptions.notificationBot(),
369
+ CapabilityOptions.commandBot(),
370
+ CapabilityOptions.workflowBot(inputs),
371
+ ];
372
+ }
296
373
  return [
297
374
  CapabilityOptions.basicBot(),
298
- CapabilityOptions.aiBot(),
299
- ...(includeAssistant === true ? [CapabilityOptions.aiAssistantBot()] : []),
300
375
  CapabilityOptions.notificationBot(),
301
376
  CapabilityOptions.commandBot(),
302
377
  CapabilityOptions.workflowBot(inputs),
@@ -311,13 +386,17 @@ class CapabilityOptions {
311
386
  ];
312
387
  }
313
388
  static dotnetCaps(inputs) {
314
- return [
389
+ const capabilities = [
315
390
  ...CapabilityOptions.copilotPlugins(),
316
- ...CapabilityOptions.bots(inputs, true),
391
+ ...CapabilityOptions.bots(inputs),
317
392
  CapabilityOptions.nonSsoTab(),
318
393
  CapabilityOptions.tab(),
319
394
  ...CapabilityOptions.collectMECaps(),
320
395
  ];
396
+ if (featureFlags_1.isTdpTemplateCliTestEnabled()) {
397
+ capabilities.push(CapabilityOptions.me());
398
+ }
399
+ return capabilities;
321
400
  }
322
401
  /**
323
402
  * Collect all capabilities for message extension, including dotnet and nodejs.
@@ -344,11 +423,82 @@ class CapabilityOptions {
344
423
  CapabilityOptions.linkUnfurling(),
345
424
  ];
346
425
  }
426
+ static officeAddinStaticCapabilities(host) {
427
+ const items = [];
428
+ for (const h of Object.keys(projectConfig_1.OfficeAddinProjectConfig)) {
429
+ if (host && h !== host)
430
+ continue;
431
+ const hostValue = projectConfig_1.OfficeAddinProjectConfig[h];
432
+ for (const capability of Object.keys(hostValue)) {
433
+ const capabilityValue = hostValue[capability];
434
+ items.push({
435
+ id: capability,
436
+ label: localizeUtils_1.getLocalizedString(capabilityValue.title),
437
+ detail: localizeUtils_1.getLocalizedString(capabilityValue.detail),
438
+ });
439
+ }
440
+ }
441
+ return items;
442
+ }
443
+ static officeAddinDynamicCapabilities(projectType, host) {
444
+ const items = [];
445
+ const isOutlookAddin = projectType === ProjectTypeOptions.outlookAddin().id;
446
+ const isOfficeAddin = projectType === ProjectTypeOptions.officeAddin().id;
447
+ const isOfficeXMLAddinForOutlook = projectType === ProjectTypeOptions.officeXMLAddin().id &&
448
+ host === OfficeAddinHostOptions.outlook().id;
449
+ const pushToItems = (option) => {
450
+ const capabilityValue = projectConfig_1.OfficeAddinProjectConfig.json[option];
451
+ items.push({
452
+ id: option,
453
+ label: localizeUtils_1.getLocalizedString(capabilityValue.title),
454
+ detail: localizeUtils_1.getLocalizedString(capabilityValue.detail),
455
+ });
456
+ };
457
+ if (isOutlookAddin || isOfficeAddin || isOfficeXMLAddinForOutlook) {
458
+ pushToItems("json-taskpane");
459
+ if (isOutlookAddin || isOfficeXMLAddinForOutlook) {
460
+ items.push(CapabilityOptions.outlookAddinImport());
461
+ }
462
+ else if (isOfficeAddin) {
463
+ items.push(CapabilityOptions.officeContentAddin());
464
+ items.push(CapabilityOptions.officeAddinImport());
465
+ }
466
+ }
467
+ else {
468
+ if (host) {
469
+ const hostValue = projectConfig_1.OfficeAddinProjectConfig[host];
470
+ for (const capability of Object.keys(hostValue)) {
471
+ const capabilityValue = hostValue[capability];
472
+ items.push({
473
+ id: capability,
474
+ label: localizeUtils_1.getLocalizedString(capabilityValue.title),
475
+ detail: localizeUtils_1.getLocalizedString(capabilityValue.detail),
476
+ });
477
+ }
478
+ }
479
+ }
480
+ return items;
481
+ }
347
482
  static copilotPlugins() {
348
483
  return [
349
484
  CapabilityOptions.copilotPluginNewApi(),
350
485
  CapabilityOptions.copilotPluginApiSpec(),
351
- CapabilityOptions.copilotPluginOpenAIPlugin(),
486
+ // CapabilityOptions.copilotPluginOpenAIPlugin(),
487
+ ];
488
+ }
489
+ static customCopilots() {
490
+ return [
491
+ CapabilityOptions.customCopilotBasic(),
492
+ CapabilityOptions.customCopilotRag(),
493
+ CapabilityOptions.customCopilotAssistant(),
494
+ ];
495
+ }
496
+ static tdpIntegrationCapabilities() {
497
+ // templates that are used by TDP integration only
498
+ return [
499
+ CapabilityOptions.me(),
500
+ CapabilityOptions.botAndMe(),
501
+ CapabilityOptions.nonSsoTabAndBot(),
352
502
  ];
353
503
  }
354
504
  /**
@@ -356,11 +506,14 @@ class CapabilityOptions {
356
506
  */
357
507
  static staticAll(inputs) {
358
508
  const capabilityOptions = [
359
- ...CapabilityOptions.bots(inputs, true),
509
+ ...CapabilityOptions.bots(inputs),
360
510
  ...CapabilityOptions.tabs(),
361
511
  ...CapabilityOptions.collectMECaps(),
362
512
  ...CapabilityOptions.copilotPlugins(),
513
+ ...CapabilityOptions.customCopilots(),
514
+ ...CapabilityOptions.tdpIntegrationCapabilities(),
363
515
  ];
516
+ capabilityOptions.push(...CapabilityOptions.officeAddinStaticCapabilities());
364
517
  return capabilityOptions;
365
518
  }
366
519
  /**
@@ -368,31 +521,78 @@ class CapabilityOptions {
368
521
  */
369
522
  static all(inputs) {
370
523
  const capabilityOptions = [
371
- ...CapabilityOptions.bots(inputs, true),
524
+ ...CapabilityOptions.bots(inputs),
372
525
  ...CapabilityOptions.tabs(),
373
526
  ...CapabilityOptions.collectMECaps(),
374
527
  ];
375
528
  if (featureFlags_1.isApiCopilotPluginEnabled()) {
376
529
  capabilityOptions.push(...CapabilityOptions.copilotPlugins());
377
530
  }
531
+ capabilityOptions.push(...CapabilityOptions.customCopilots());
532
+ if (featureFlags_1.isTdpTemplateCliTestEnabled()) {
533
+ // test templates that are used by TDP integration only
534
+ capabilityOptions.push(...CapabilityOptions.tdpIntegrationCapabilities());
535
+ }
536
+ capabilityOptions.push(...CapabilityOptions.officeAddinDynamicCapabilities(inputs === null || inputs === void 0 ? void 0 : inputs.projectType, inputs === null || inputs === void 0 ? void 0 : inputs.host));
537
+ // if (isOfficeXMLAddinEnabled()) {
538
+ // capabilityOptions.push(
539
+ // ...[
540
+ // ...CapabilityOptions.officeAddinStaticCapabilities("word"),
541
+ // ...CapabilityOptions.officeAddinStaticCapabilities("excel"),
542
+ // ...CapabilityOptions.officeAddinStaticCapabilities("powerpoint"),
543
+ // ]
544
+ // );
545
+ // } else {
546
+ // capabilityOptions.push(...CapabilityOptions.officeAddinStaticCapabilities("json"));
547
+ // }
378
548
  return capabilityOptions;
379
549
  }
380
- static officeAddinImport() {
550
+ static outlookAddinImport() {
381
551
  return {
382
- id: "import",
552
+ id: "outlook-addin-import",
383
553
  label: localizeUtils_1.getLocalizedString("core.importAddin.label"),
384
554
  detail: localizeUtils_1.getLocalizedString("core.importAddin.detail"),
385
- description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
386
555
  };
387
556
  }
388
- static officeAddinItems() {
389
- return officeAddinJsonData.getProjectTemplateNames().map((template) => ({
390
- id: template,
391
- label: localizeUtils_1.getLocalizedString(officeAddinJsonData.getProjectDisplayName(template)),
392
- detail: localizeUtils_1.getLocalizedString(officeAddinJsonData.getProjectDetails(template)),
557
+ static officeAddinImport() {
558
+ return {
559
+ id: "office-addin-import",
560
+ label: localizeUtils_1.getLocalizedString("core.importOfficeAddin.label"),
561
+ detail: localizeUtils_1.getLocalizedString("core.importAddin.detail"),
393
562
  description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
394
- }));
563
+ };
564
+ }
565
+ static officeContentAddin() {
566
+ return {
567
+ id: "office-content-addin",
568
+ label: localizeUtils_1.getLocalizedString("core.officeContentAddin.label"),
569
+ detail: localizeUtils_1.getLocalizedString("core.officeContentAddin.detail"),
570
+ };
395
571
  }
572
+ // static officeXMLAddinHostOptionItems(host: string): OptionItem[] {
573
+ // return getOfficeXMLAddinHostProjectOptions(host).map((x) => ({
574
+ // id: x.proj,
575
+ // label: getLocalizedString(x.title),
576
+ // detail: getLocalizedString(x.detail),
577
+ // }));
578
+ // }
579
+ // static jsonAddinTaskpane(): OptionItem {
580
+ // return {
581
+ // id: "json-taskpane",
582
+ // label: getLocalizedString("core.newTaskpaneAddin.label"),
583
+ // detail: getLocalizedString("core.newTaskpaneAddin.detail"),
584
+ // description: getLocalizedString(
585
+ // "core.createProjectQuestion.option.description.previewOnWindow"
586
+ // ),
587
+ // };
588
+ // }
589
+ // static officeAddinItems(): OptionItem[] {
590
+ // return officeAddinJsonData.getProjectTemplateNames().map((template) => ({
591
+ // id: template,
592
+ // label: getLocalizedString(officeAddinJsonData.getProjectDisplayName(template)),
593
+ // detail: getLocalizedString(officeAddinJsonData.getProjectDetails(template)),
594
+ // }));
595
+ // }
396
596
  static nonSsoTabAndBot() {
397
597
  return {
398
598
  id: "TabNonSsoAndBot",
@@ -442,6 +642,28 @@ class CapabilityOptions {
442
642
  description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
443
643
  };
444
644
  }
645
+ // custom copilot
646
+ static customCopilotBasic() {
647
+ return {
648
+ id: "custom-copilot-basic",
649
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotBasicOption.label"),
650
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotBasicOption.detail"),
651
+ };
652
+ }
653
+ static customCopilotRag() {
654
+ return {
655
+ id: "custom-copilot-rag",
656
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagOption.label"),
657
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagOption.detail"),
658
+ };
659
+ }
660
+ static customCopilotAssistant() {
661
+ return {
662
+ id: "custom-copilot-agent",
663
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantOption.label"),
664
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantOption.detail"),
665
+ };
666
+ }
445
667
  }
446
668
  exports.CapabilityOptions = CapabilityOptions;
447
669
  function capabilityQuestion() {
@@ -457,9 +679,24 @@ function capabilityQuestion() {
457
679
  case ProjectTypeOptions.me().id:
458
680
  return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.messageExtension.title");
459
681
  case ProjectTypeOptions.outlookAddin().id:
460
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.title");
682
+ case ProjectTypeOptions.officeAddin().id:
683
+ case ProjectTypeOptions.officeXMLAddin().id: {
684
+ switch (inputs[questionNames_1.QuestionNames.OfficeAddinHost]) {
685
+ case OfficeAddinHostOptions.outlook().id:
686
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.title");
687
+ case OfficeAddinHostOptions.word().id:
688
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.create.title");
689
+ case OfficeAddinHostOptions.excel().id:
690
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.create.title");
691
+ case OfficeAddinHostOptions.powerpoint().id:
692
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.create.title");
693
+ }
694
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.title");
695
+ }
461
696
  case ProjectTypeOptions.copilotPlugin().id:
462
697
  return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.title");
698
+ case ProjectTypeOptions.customCopilot().id:
699
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.title");
463
700
  default:
464
701
  return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.titleNew");
465
702
  }
@@ -490,7 +727,7 @@ function capabilityQuestion() {
490
727
  // nodejs capabilities
491
728
  const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
492
729
  if (projectType === ProjectTypeOptions.bot().id) {
493
- return CapabilityOptions.bots(inputs, true);
730
+ return CapabilityOptions.bots(inputs);
494
731
  }
495
732
  else if (projectType === ProjectTypeOptions.tab().id) {
496
733
  return CapabilityOptions.tabs();
@@ -498,12 +735,15 @@ function capabilityQuestion() {
498
735
  else if (projectType === ProjectTypeOptions.me().id) {
499
736
  return CapabilityOptions.mes();
500
737
  }
501
- else if (projectType === ProjectTypeOptions.outlookAddin().id) {
502
- return [...CapabilityOptions.officeAddinItems(), CapabilityOptions.officeAddinImport()];
738
+ else if (ProjectTypeOptions.officeAddinAllIds().includes(projectType)) {
739
+ return CapabilityOptions.officeAddinDynamicCapabilities(projectType, inputs[questionNames_1.QuestionNames.OfficeAddinHost]);
503
740
  }
504
741
  else if (projectType === ProjectTypeOptions.copilotPlugin().id) {
505
742
  return CapabilityOptions.copilotPlugins();
506
743
  }
744
+ else if (projectType === ProjectTypeOptions.customCopilot().id) {
745
+ return CapabilityOptions.customCopilots();
746
+ }
507
747
  else {
508
748
  return CapabilityOptions.all(inputs);
509
749
  }
@@ -512,6 +752,9 @@ function capabilityQuestion() {
512
752
  if (inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.copilotPlugin().id) {
513
753
  return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.placeholder");
514
754
  }
755
+ else if (inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.customCopilot().id) {
756
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.placeholder");
757
+ }
515
758
  return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.placeholder");
516
759
  },
517
760
  forgetLastValue: true,
@@ -540,14 +783,14 @@ class MeArchitectureOptions {
540
783
  return {
541
784
  id: "new-api",
542
785
  label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.label"),
543
- detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.detail"),
786
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.messageExtensionNewApiOption.detail"),
544
787
  };
545
788
  }
546
789
  static apiSpec() {
547
790
  return {
548
791
  id: "api-spec",
549
792
  label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.label"),
550
- detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.detail"),
793
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.messageExtensionApiSpecOption.detail"),
551
794
  };
552
795
  }
553
796
  static all() {
@@ -874,65 +1117,127 @@ function SPFxImportFolderQuestion(hasDefaultFunc = false) {
874
1117
  };
875
1118
  }
876
1119
  exports.SPFxImportFolderQuestion = SPFxImportFolderQuestion;
877
- const getTemplate = (inputs) => {
878
- const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
879
- const templates = officeAddinJsonData.getProjectTemplateNames();
880
- const foundTemplate = templates.find((template) => {
881
- return capabilities && capabilities.includes(template);
882
- });
883
- return foundTemplate !== null && foundTemplate !== void 0 ? foundTemplate : "";
884
- };
885
- exports.getTemplate = getTemplate;
886
1120
  function officeAddinHostingQuestion() {
887
- const OfficeHostQuestion = {
888
- type: "singleSelect",
1121
+ return {
889
1122
  name: questionNames_1.QuestionNames.OfficeAddinHost,
890
- title: "Add-in Host",
891
- staticOptions: [],
892
- dynamicOptions: (inputs) => {
893
- const template = exports.getTemplate(inputs);
894
- const getHostTemplateNames = officeAddinJsonData.getHostTemplateNames(template);
895
- const options = getHostTemplateNames.map((host) => ({
896
- label: officeAddinJsonData.getHostDisplayName(host),
897
- id: host,
898
- }));
899
- return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
900
- },
901
- default: (inputs) => {
902
- const template = exports.getTemplate(inputs);
903
- const options = officeAddinJsonData.getHostTemplateNames(template);
904
- return options[0] || "No Options";
905
- },
906
- skipSingleOption: true,
1123
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.create.title"),
1124
+ type: "singleSelect",
1125
+ staticOptions: OfficeAddinHostOptions.all(),
907
1126
  };
908
- return OfficeHostQuestion;
909
1127
  }
910
1128
  exports.officeAddinHostingQuestion = officeAddinHostingQuestion;
911
- const officeAddinJsonData = new projectsJsonData_1.default();
1129
+ function officeAddinFrameworkQuestion() {
1130
+ return {
1131
+ type: "singleSelect",
1132
+ name: questionNames_1.QuestionNames.OfficeAddinFramework,
1133
+ cliShortName: "f",
1134
+ cliDescription: "Framework for WXP extension.",
1135
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.framework.title"),
1136
+ dynamicOptions: getAddinFrameworkOptions,
1137
+ staticOptions: [
1138
+ { id: "default", label: "Default" },
1139
+ { id: "react", label: "React" },
1140
+ ],
1141
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.framework.placeholder"),
1142
+ skipSingleOption: true,
1143
+ };
1144
+ }
1145
+ exports.officeAddinFrameworkQuestion = officeAddinFrameworkQuestion;
1146
+ function getAddinFrameworkOptions(inputs) {
1147
+ const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
1148
+ const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
1149
+ const host = inputs[questionNames_1.QuestionNames.OfficeAddinHost];
1150
+ if (projectType === ProjectTypeOptions.outlookAddin().id ||
1151
+ (projectType === ProjectTypeOptions.officeXMLAddin().id &&
1152
+ host === OfficeAddinHostOptions.outlook().id)) {
1153
+ return [{ id: "default", label: "Default" }];
1154
+ }
1155
+ else if ((projectType === ProjectTypeOptions.officeAddin().id &&
1156
+ capabilities === CapabilityOptions.officeContentAddin().id) ||
1157
+ capabilities === CapabilityOptions.officeAddinImport().id) {
1158
+ return [{ id: "default", label: "Default" }];
1159
+ }
1160
+ else {
1161
+ return [
1162
+ { id: "default", label: "Default" },
1163
+ { id: "react", label: "React" },
1164
+ ];
1165
+ }
1166
+ }
1167
+ exports.getAddinFrameworkOptions = getAddinFrameworkOptions;
1168
+ /**
1169
+ * when project-type=office-addin-type(office-addin-framework-type=default or react), use selected value;
1170
+ * when project-type=outlook-addin-type, no framework to select, office-addin-framework-type=default_old
1171
+ * when project-type=office-xml-addin-type, no framework to select, office-addin-framework-type=default_old
1172
+ */
1173
+ function getOfficeAddinFramework(inputs) {
1174
+ const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
1175
+ if (projectType === ProjectTypeOptions.officeAddin().id &&
1176
+ inputs[questionNames_1.QuestionNames.OfficeAddinFramework]) {
1177
+ return inputs[questionNames_1.QuestionNames.OfficeAddinFramework];
1178
+ }
1179
+ else if ((projectType === ProjectTypeOptions.officeXMLAddin().id &&
1180
+ inputs[questionNames_1.QuestionNames.OfficeAddinHost] === OfficeAddinHostOptions.outlook().id) ||
1181
+ projectType === ProjectTypeOptions.outlookAddin().id) {
1182
+ return "default_old";
1183
+ }
1184
+ else {
1185
+ return "default";
1186
+ }
1187
+ }
1188
+ exports.getOfficeAddinFramework = getOfficeAddinFramework;
912
1189
  function getLanguageOptions(inputs) {
913
1190
  const runtime = getRuntime(inputs);
914
1191
  // dotnet runtime only supports C#
915
1192
  if (runtime === RuntimeOptions.DotNet().id) {
916
- return [{ id: "csharp", label: "C#" }];
1193
+ return [{ id: ProgrammingLanguage.CSharp, label: "C#" }];
917
1194
  }
1195
+ const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
1196
+ const host = inputs[questionNames_1.QuestionNames.OfficeAddinHost];
918
1197
  // office addin supports language defined in officeAddinJsonData
919
1198
  const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
920
- if (projectType === ProjectTypeOptions.outlookAddin().id) {
921
- const template = exports.getTemplate(inputs);
922
- const supportedTypes = officeAddinJsonData.getSupportedScriptTypes(template);
923
- const options = supportedTypes.map((language) => ({ label: language, id: language }));
924
- return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
1199
+ if (ProjectTypeOptions.officeAddinAllIds().includes(projectType)) {
1200
+ if (capabilities.endsWith("-manifest")) {
1201
+ return [{ id: ProgrammingLanguage.JS, label: "JavaScript" }];
1202
+ }
1203
+ if (projectType === ProjectTypeOptions.outlookAddin().id ||
1204
+ (projectType === ProjectTypeOptions.officeXMLAddin().id &&
1205
+ host === OfficeAddinHostOptions.outlook().id)) {
1206
+ return [{ id: ProgrammingLanguage.TS, label: "TypeScript" }];
1207
+ }
1208
+ const officeXMLAddinLangConfig = projectConfig_1.getOfficeAddinTemplateConfig(projectType, host)[capabilities]
1209
+ .framework["default"];
1210
+ const officeXMLAddinLangOptions = [];
1211
+ if (!!officeXMLAddinLangConfig.typescript)
1212
+ officeXMLAddinLangOptions.push({ id: ProgrammingLanguage.TS, label: "TypeScript" });
1213
+ if (!!officeXMLAddinLangConfig.javascript)
1214
+ officeXMLAddinLangOptions.push({ id: ProgrammingLanguage.JS, label: "JavaScript" });
1215
+ return officeXMLAddinLangOptions;
925
1216
  }
926
- const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
927
- // SPFx only supports typescript
928
1217
  if (capabilities === CapabilityOptions.SPFxTab().id) {
929
- return [{ id: "typescript", label: "TypeScript" }];
1218
+ // SPFx only supports typescript
1219
+ return [{ id: ProgrammingLanguage.TS, label: "TypeScript" }];
1220
+ }
1221
+ else if (constants_3.capabilitiesHavePythonOption.includes(capabilities)) {
1222
+ // support python language
1223
+ return [
1224
+ { id: ProgrammingLanguage.JS, label: "JavaScript" },
1225
+ { id: ProgrammingLanguage.TS, label: "TypeScript" },
1226
+ {
1227
+ id: ProgrammingLanguage.PY,
1228
+ label: "Python",
1229
+ detail: "",
1230
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
1231
+ },
1232
+ ];
1233
+ }
1234
+ else {
1235
+ // other cases
1236
+ return [
1237
+ { id: ProgrammingLanguage.JS, label: "JavaScript" },
1238
+ { id: ProgrammingLanguage.TS, label: "TypeScript" },
1239
+ ];
930
1240
  }
931
- // other case
932
- return [
933
- { id: "javascript", label: "JavaScript" },
934
- { id: "typescript", label: "TypeScript" },
935
- ];
936
1241
  }
937
1242
  exports.getLanguageOptions = getLanguageOptions;
938
1243
  var ProgrammingLanguage;
@@ -940,17 +1245,19 @@ var ProgrammingLanguage;
940
1245
  ProgrammingLanguage["JS"] = "javascript";
941
1246
  ProgrammingLanguage["TS"] = "typescript";
942
1247
  ProgrammingLanguage["CSharp"] = "csharp";
1248
+ ProgrammingLanguage["PY"] = "python";
943
1249
  })(ProgrammingLanguage = exports.ProgrammingLanguage || (exports.ProgrammingLanguage = {}));
944
1250
  function programmingLanguageQuestion() {
945
1251
  const programmingLanguageQuestion = {
946
1252
  name: questionNames_1.QuestionNames.ProgrammingLanguage,
947
1253
  cliShortName: "l",
948
- title: "Programming Language",
1254
+ title: localizeUtils_1.getLocalizedString("core.ProgrammingLanguageQuestion.title"),
949
1255
  type: "singleSelect",
950
1256
  staticOptions: [
951
1257
  { id: ProgrammingLanguage.JS, label: "JavaScript" },
952
1258
  { id: ProgrammingLanguage.TS, label: "TypeScript" },
953
1259
  { id: ProgrammingLanguage.CSharp, label: "C#" },
1260
+ { id: ProgrammingLanguage.PY, label: "Python" },
954
1261
  ],
955
1262
  dynamicOptions: getLanguageOptions,
956
1263
  default: (inputs) => {
@@ -962,14 +1269,14 @@ function programmingLanguageQuestion() {
962
1269
  if (runtime === RuntimeOptions.DotNet().id) {
963
1270
  return "";
964
1271
  }
965
- // office addin
966
- const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
967
- if (projectType === ProjectTypeOptions.outlookAddin().id) {
968
- const template = exports.getTemplate(inputs);
969
- const options = officeAddinJsonData.getSupportedScriptTypes(template);
970
- return options[0] || "No Options";
971
- }
972
1272
  const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
1273
+ // // office addin
1274
+ // const projectType = inputs[QuestionNames.ProjectType];
1275
+ // if (projectType === ProjectTypeOptions.outlookAddin().id) {
1276
+ // const template = getTemplate(inputs);
1277
+ // const options = officeAddinJsonData.getSupportedScriptTypesNew(template);
1278
+ // return options[0] || "No Options";
1279
+ // }
973
1280
  // SPFx
974
1281
  if (capabilities === CapabilityOptions.SPFxTab().id) {
975
1282
  return localizeUtils_1.getLocalizedString("core.ProgrammingLanguageQuestion.placeholder.spfx");
@@ -1004,7 +1311,7 @@ function appNameQuestion() {
1004
1311
  type: "text",
1005
1312
  name: questionNames_1.QuestionNames.AppName,
1006
1313
  cliShortName: "n",
1007
- title: "Application name",
1314
+ title: localizeUtils_1.getLocalizedString("core.question.appName.title"),
1008
1315
  required: true,
1009
1316
  default: async (inputs) => {
1010
1317
  var _a, _b;
@@ -1058,7 +1365,7 @@ function appNameQuestion() {
1058
1365
  return undefined;
1059
1366
  },
1060
1367
  },
1061
- placeholder: "Application name",
1368
+ placeholder: localizeUtils_1.getLocalizedString("core.question.appName.placeholder"),
1062
1369
  };
1063
1370
  return question;
1064
1371
  }
@@ -1264,8 +1571,18 @@ class ApiMessageExtensionAuthOptions {
1264
1571
  label: "API Key",
1265
1572
  };
1266
1573
  }
1574
+ static microsoftEntra() {
1575
+ return {
1576
+ id: "microsoft-entra",
1577
+ label: "Microsoft Entra",
1578
+ };
1579
+ }
1267
1580
  static all() {
1268
- return [ApiMessageExtensionAuthOptions.none(), ApiMessageExtensionAuthOptions.apiKey()];
1581
+ return [
1582
+ ApiMessageExtensionAuthOptions.none(),
1583
+ ApiMessageExtensionAuthOptions.apiKey(),
1584
+ ApiMessageExtensionAuthOptions.microsoftEntra(),
1585
+ ];
1269
1586
  }
1270
1587
  }
1271
1588
  exports.ApiMessageExtensionAuthOptions = ApiMessageExtensionAuthOptions;
@@ -1289,14 +1606,14 @@ function selectBotIdsQuestion() {
1289
1606
  }
1290
1607
  const maximumLengthOfDetailsErrorMessageInInputBox = 90;
1291
1608
  function apiSpecLocationQuestion(includeExistingAPIs = true) {
1292
- const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will loose correlation id when user accepts the value.
1609
+ const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will lose correlation id when user accepts the value.
1293
1610
  const validationOnAccept = async (input, inputs) => {
1294
1611
  try {
1295
1612
  if (!inputs) {
1296
1613
  throw new Error("inputs is undefined"); // should never happen
1297
1614
  }
1298
1615
  const context = utils_4.createContextV3();
1299
- const res = await helper_1.listOperations(context, undefined, input.trim(), inputs[questionNames_1.QuestionNames.ManifestPath], includeExistingAPIs, false, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
1616
+ const res = await helper_1.listOperations(context, undefined, input.trim(), inputs, includeExistingAPIs, false, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
1300
1617
  if (res.isOk()) {
1301
1618
  inputs.supportedApisFromApiSpec = res.value;
1302
1619
  }
@@ -1363,7 +1680,7 @@ function apiSpecLocationQuestion(includeExistingAPIs = true) {
1363
1680
  exports.apiSpecLocationQuestion = apiSpecLocationQuestion;
1364
1681
  function openAIPluginManifestLocationQuestion() {
1365
1682
  // export for unit test
1366
- const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will loose correlation id when user accepts the value.
1683
+ const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will lose correlation id when user accepts the value.
1367
1684
  return {
1368
1685
  type: "text",
1369
1686
  name: questionNames_1.QuestionNames.OpenAIPluginManifest,
@@ -1398,7 +1715,7 @@ function openAIPluginManifestLocationQuestion() {
1398
1715
  }
1399
1716
  const context = utils_4.createContextV3();
1400
1717
  try {
1401
- const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation], undefined, true, true, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
1718
+ const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation], inputs, true, true, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
1402
1719
  if (res.isOk()) {
1403
1720
  inputs.supportedApisFromApiSpec = res.value;
1404
1721
  }
@@ -1433,28 +1750,59 @@ function apiMessageExtensionAuthQuestion() {
1433
1750
  placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiMessageExtensionAuth.placeholder"),
1434
1751
  cliDescription: "The authentication type for the API.",
1435
1752
  staticOptions: ApiMessageExtensionAuthOptions.all(),
1753
+ dynamicOptions: () => {
1754
+ const options = [ApiMessageExtensionAuthOptions.none()];
1755
+ if (featureFlags_1.isApiKeyEnabled()) {
1756
+ options.push(ApiMessageExtensionAuthOptions.apiKey());
1757
+ }
1758
+ if (featureFlags_1.isApiMeSSOEnabled()) {
1759
+ options.push(ApiMessageExtensionAuthOptions.microsoftEntra());
1760
+ }
1761
+ return options;
1762
+ },
1436
1763
  default: ApiMessageExtensionAuthOptions.none().id,
1437
1764
  };
1438
1765
  }
1439
1766
  exports.apiMessageExtensionAuthQuestion = apiMessageExtensionAuthQuestion;
1440
1767
  function apiOperationQuestion(includeExistingAPIs = true) {
1441
1768
  // export for unit test
1769
+ let placeholder = "";
1770
+ const isPlugin = (inputs) => {
1771
+ return (!!inputs && inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginApiSpec().id);
1772
+ };
1442
1773
  return {
1443
1774
  type: "multiSelect",
1444
1775
  name: questionNames_1.QuestionNames.ApiOperation,
1445
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.title"),
1776
+ title: (inputs) => {
1777
+ return isPlugin(inputs)
1778
+ ? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.copilotOperation.title")
1779
+ : localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.title");
1780
+ },
1446
1781
  cliDescription: "Select Operation(s) Teams Can Interact with.",
1447
1782
  cliShortName: "o",
1448
- placeholder: includeExistingAPIs
1449
- ? featureFlags_1.isApiKeyEnabled()
1450
- ? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.apikey.placeholder")
1451
- : localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder")
1452
- : localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting"),
1783
+ placeholder: (inputs) => {
1784
+ const isPlugin = inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginApiSpec().id;
1785
+ if (!includeExistingAPIs) {
1786
+ placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting");
1787
+ }
1788
+ else if (isPlugin) {
1789
+ placeholder = ""; // TODO: add placeholder for api plugin
1790
+ }
1791
+ else if (featureFlags_1.isApiKeyEnabled()) {
1792
+ placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.apikey.placeholder");
1793
+ }
1794
+ else {
1795
+ placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder");
1796
+ }
1797
+ return placeholder;
1798
+ },
1453
1799
  forgetLastValue: true,
1454
1800
  staticOptions: [],
1455
1801
  validation: {
1456
1802
  validFunc: (input, inputs) => {
1457
- if (input.length < 1 || input.length > 10) {
1803
+ if (input.length < 1 ||
1804
+ (input.length > 10 &&
1805
+ (inputs === null || inputs === void 0 ? void 0 : inputs[questionNames_1.QuestionNames.CustomCopilotRag]) != CustomCopilotRagOptions.customApi().id)) {
1458
1806
  return localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.invalidMessage", input.length, 10);
1459
1807
  }
1460
1808
  const operations = inputs === null || inputs === void 0 ? void 0 : inputs.supportedApisFromApiSpec;
@@ -1487,6 +1835,154 @@ function apiOperationQuestion(includeExistingAPIs = true) {
1487
1835
  };
1488
1836
  }
1489
1837
  exports.apiOperationQuestion = apiOperationQuestion;
1838
+ class CustomCopilotRagOptions {
1839
+ static customize() {
1840
+ return {
1841
+ id: "custom-copilot-rag-customize",
1842
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomizeOption.label"),
1843
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomizeOption.detail"),
1844
+ };
1845
+ }
1846
+ static azureAISearch() {
1847
+ return {
1848
+ id: "custom-copilot-rag-azureAISearch",
1849
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagAzureAISearchOption.label"),
1850
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagAzureAISearchOption.detail"),
1851
+ };
1852
+ }
1853
+ static customApi() {
1854
+ return {
1855
+ id: "custom-copilot-rag-customApi",
1856
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomApiOption.label"),
1857
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomApiOption.detail"),
1858
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
1859
+ };
1860
+ }
1861
+ static microsoft365() {
1862
+ return {
1863
+ id: "custom-copilot-rag-microsoft365",
1864
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagMicrosoft365Option.label"),
1865
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagMicrosoft365Option.detail"),
1866
+ };
1867
+ }
1868
+ static all() {
1869
+ return [
1870
+ CustomCopilotRagOptions.customize(),
1871
+ CustomCopilotRagOptions.azureAISearch(),
1872
+ // CustomCopilotRagOptions.customApi(),
1873
+ // CustomCopilotRagOptions.microsoft365(),
1874
+ ];
1875
+ }
1876
+ }
1877
+ exports.CustomCopilotRagOptions = CustomCopilotRagOptions;
1878
+ class CustomCopilotAssistantOptions {
1879
+ static new() {
1880
+ return {
1881
+ id: "custom-copilot-agent-new",
1882
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantNewOption.label"),
1883
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantNewOption.detail"),
1884
+ };
1885
+ }
1886
+ static assistantsApi() {
1887
+ return {
1888
+ id: "custom-copilot-agent-assistants-api",
1889
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantAssistantsApiOption.label"),
1890
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantAssistantsApiOption.detail"),
1891
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
1892
+ };
1893
+ }
1894
+ static all() {
1895
+ return [CustomCopilotAssistantOptions.new(), CustomCopilotAssistantOptions.assistantsApi()];
1896
+ }
1897
+ }
1898
+ exports.CustomCopilotAssistantOptions = CustomCopilotAssistantOptions;
1899
+ function customCopilotRagQuestion() {
1900
+ return {
1901
+ type: "singleSelect",
1902
+ name: questionNames_1.QuestionNames.CustomCopilotRag,
1903
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRag.title"),
1904
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRag.placeholder"),
1905
+ staticOptions: CustomCopilotRagOptions.all(),
1906
+ dynamicOptions: () => CustomCopilotRagOptions.all(),
1907
+ default: CustomCopilotRagOptions.customize().id,
1908
+ };
1909
+ }
1910
+ function customCopilotAssistantQuestion() {
1911
+ return {
1912
+ type: "singleSelect",
1913
+ name: questionNames_1.QuestionNames.CustomCopilotAssistant,
1914
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistant.title"),
1915
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistant.placeholder"),
1916
+ staticOptions: CustomCopilotAssistantOptions.all(),
1917
+ dynamicOptions: () => CustomCopilotAssistantOptions.all(),
1918
+ default: CustomCopilotAssistantOptions.new().id,
1919
+ };
1920
+ }
1921
+ function llmServiceQuestion() {
1922
+ return {
1923
+ type: "singleSelect",
1924
+ name: questionNames_1.QuestionNames.LLMService,
1925
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.title"),
1926
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.placeholder"),
1927
+ staticOptions: [
1928
+ {
1929
+ id: "llm-service-azure-openai",
1930
+ cliName: "azure-openai",
1931
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
1932
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
1933
+ },
1934
+ {
1935
+ id: "llm-service-openai",
1936
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.label"),
1937
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
1938
+ },
1939
+ ],
1940
+ dynamicOptions: (inputs) => {
1941
+ const options = [];
1942
+ if (inputs[questionNames_1.QuestionNames.CustomCopilotAssistant] !== "custom-copilot-agent-assistants-api") {
1943
+ options.push({
1944
+ id: "llm-service-azure-openai",
1945
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
1946
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
1947
+ });
1948
+ }
1949
+ options.push({
1950
+ id: "llm-service-openai",
1951
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.label"),
1952
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
1953
+ });
1954
+ return options;
1955
+ },
1956
+ skipSingleOption: true,
1957
+ default: "llm-service-azure-openai",
1958
+ };
1959
+ }
1960
+ function openAIKeyQuestion() {
1961
+ return {
1962
+ type: "text",
1963
+ password: true,
1964
+ name: questionNames_1.QuestionNames.OpenAIKey,
1965
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.openAIKey.title"),
1966
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.openAIKey.placeholder"),
1967
+ };
1968
+ }
1969
+ function azureOpenAIKeyQuestion() {
1970
+ return {
1971
+ type: "text",
1972
+ password: true,
1973
+ name: questionNames_1.QuestionNames.AzureOpenAIKey,
1974
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIKey.title"),
1975
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIKey.placeholder"),
1976
+ };
1977
+ }
1978
+ function azureOpenAIEndpointQuestion() {
1979
+ return {
1980
+ type: "text",
1981
+ name: questionNames_1.QuestionNames.AzureOpenAIEndpoint,
1982
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIEndpoint.title"),
1983
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIEndpoint.placeholder"),
1984
+ };
1985
+ }
1490
1986
  function capabilitySubTree() {
1491
1987
  const node = {
1492
1988
  data: capabilityQuestion(),
@@ -1517,8 +2013,13 @@ function capabilitySubTree() {
1517
2013
  ],
1518
2014
  },
1519
2015
  {
1520
- // office addin import sub-tree
1521
- condition: { equals: CapabilityOptions.officeAddinImport().id },
2016
+ // office addin import sub-tree (capabilities=office-addin-import | outlook-addin-import)
2017
+ condition: {
2018
+ enum: [
2019
+ CapabilityOptions.outlookAddinImport().id,
2020
+ CapabilityOptions.officeAddinImport().id,
2021
+ ],
2022
+ },
1522
2023
  data: { type: "group", name: questionNames_1.QuestionNames.OfficeAddinImport },
1523
2024
  children: [
1524
2025
  {
@@ -1537,13 +2038,6 @@ function capabilitySubTree() {
1537
2038
  },
1538
2039
  ],
1539
2040
  },
1540
- {
1541
- // office addin other items sub-tree
1542
- condition: {
1543
- enum: CapabilityOptions.officeAddinItems().map((i) => i.id),
1544
- },
1545
- data: officeAddinHostingQuestion(),
1546
- },
1547
2041
  {
1548
2042
  // Search ME sub-tree
1549
2043
  condition: { equals: CapabilityOptions.m365SearchMe().id },
@@ -1567,22 +2061,47 @@ function capabilitySubTree() {
1567
2061
  },
1568
2062
  data: apiSpecLocationQuestion(),
1569
2063
  },
2064
+ // {
2065
+ // condition: { equals: CapabilityOptions.copilotPluginOpenAIPlugin().id },
2066
+ // data: openAIPluginManifestLocationQuestion(),
2067
+ // },
1570
2068
  {
1571
- condition: { equals: CapabilityOptions.copilotPluginOpenAIPlugin().id },
1572
- data: openAIPluginManifestLocationQuestion(),
2069
+ data: apiOperationQuestion(),
1573
2070
  },
2071
+ ],
2072
+ },
2073
+ {
2074
+ condition: (inputs) => {
2075
+ return ((featureFlags_1.isApiKeyEnabled() || featureFlags_1.isApiMeSSOEnabled()) &&
2076
+ inputs[questionNames_1.QuestionNames.MeArchitectureType] == MeArchitectureOptions.newApi().id);
2077
+ },
2078
+ data: apiMessageExtensionAuthQuestion(),
2079
+ },
2080
+ {
2081
+ condition: (inputs) => {
2082
+ return inputs[questionNames_1.QuestionNames.Capabilities] == CapabilityOptions.customCopilotRag().id;
2083
+ },
2084
+ data: customCopilotRagQuestion(),
2085
+ children: [
1574
2086
  {
2087
+ condition: (inputs) => {
2088
+ return (inputs[questionNames_1.QuestionNames.CustomCopilotRag] === CustomCopilotRagOptions.customApi().id);
2089
+ },
2090
+ data: apiSpecLocationQuestion(),
2091
+ },
2092
+ {
2093
+ condition: (inputs) => {
2094
+ return (inputs[questionNames_1.QuestionNames.CustomCopilotRag] === CustomCopilotRagOptions.customApi().id);
2095
+ },
1575
2096
  data: apiOperationQuestion(),
1576
2097
  },
1577
2098
  ],
1578
2099
  },
1579
2100
  {
1580
2101
  condition: (inputs) => {
1581
- return (featureFlags_1.isApiKeyEnabled() &&
1582
- (inputs[questionNames_1.QuestionNames.MeArchitectureType] == MeArchitectureOptions.newApi().id ||
1583
- inputs[questionNames_1.QuestionNames.Capabilities] == CapabilityOptions.copilotPluginNewApi().id));
2102
+ return (inputs[questionNames_1.QuestionNames.Capabilities] == CapabilityOptions.customCopilotAssistant().id);
1584
2103
  },
1585
- data: apiMessageExtensionAuthQuestion(),
2104
+ data: customCopilotAssistantQuestion(),
1586
2105
  },
1587
2106
  {
1588
2107
  // programming language
@@ -1592,7 +2111,44 @@ function capabilitySubTree() {
1592
2111
  inputs[questionNames_1.QuestionNames.Capabilities] !== CapabilityOptions.copilotPluginApiSpec().id &&
1593
2112
  inputs[questionNames_1.QuestionNames.Capabilities] !==
1594
2113
  CapabilityOptions.copilotPluginOpenAIPlugin().id &&
1595
- inputs[questionNames_1.QuestionNames.MeArchitectureType] !== MeArchitectureOptions.apiSpec().id);
2114
+ inputs[questionNames_1.QuestionNames.MeArchitectureType] !== MeArchitectureOptions.apiSpec().id &&
2115
+ inputs[questionNames_1.QuestionNames.Capabilities] !== CapabilityOptions.officeAddinImport().id &&
2116
+ inputs[questionNames_1.QuestionNames.Capabilities] !== CapabilityOptions.outlookAddinImport().id);
2117
+ },
2118
+ },
2119
+ {
2120
+ condition: (inputs) => {
2121
+ return (inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotBasic().id ||
2122
+ inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotRag().id ||
2123
+ inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotAssistant().id);
2124
+ },
2125
+ data: llmServiceQuestion(),
2126
+ children: [
2127
+ {
2128
+ condition: { equals: "llm-service-azure-openai" },
2129
+ data: azureOpenAIKeyQuestion(),
2130
+ children: [
2131
+ {
2132
+ condition: (inputs) => {
2133
+ var _a;
2134
+ return ((_a = inputs[questionNames_1.QuestionNames.AzureOpenAIKey]) === null || _a === void 0 ? void 0 : _a.length) > 0;
2135
+ },
2136
+ data: azureOpenAIEndpointQuestion(),
2137
+ },
2138
+ ],
2139
+ },
2140
+ {
2141
+ condition: { equals: "llm-service-openai" },
2142
+ data: openAIKeyQuestion(),
2143
+ },
2144
+ ],
2145
+ },
2146
+ {
2147
+ // Office addin framework for json manifest
2148
+ data: officeAddinFrameworkQuestion(),
2149
+ condition: (inputs) => {
2150
+ return (inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.officeAddin().id &&
2151
+ inputs[questionNames_1.QuestionNames.Capabilities] !== CapabilityOptions.officeAddinImport().id);
1596
2152
  },
1597
2153
  },
1598
2154
  {
@@ -1621,6 +2177,10 @@ function createProjectQuestionNode() {
1621
2177
  data: projectTypeQuestion(),
1622
2178
  cliOptionDisabled: "self",
1623
2179
  },
2180
+ {
2181
+ condition: (inputs) => inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.officeXMLAddin().id,
2182
+ data: officeAddinHostingQuestion(),
2183
+ },
1624
2184
  capabilitySubTree(),
1625
2185
  {
1626
2186
  condition: (inputs) => inputs.teamsAppFromTdp && utils_2.isPersonalApp(inputs.teamsAppFromTdp),
@@ -1684,9 +2244,6 @@ function createProjectCliHelpNode() {
1684
2244
  if (!featureFlags_1.isCLIDotNetEnabled()) {
1685
2245
  deleteNames.push(questionNames_1.QuestionNames.Runtime);
1686
2246
  }
1687
- if (!featureFlags_1.isApiCopilotPluginEnabled()) {
1688
- deleteNames.push(questionNames_1.QuestionNames.CopilotPluginExistingApi);
1689
- }
1690
2247
  trimQuestionTreeForCliHelp(node, deleteNames);
1691
2248
  return node;
1692
2249
  }