@microsoft/teamsfx-core 2.0.6-alpha.07708d12e.0 → 2.0.6-alpha.136ac351d.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 (215) hide show
  1. package/build/common/constants.d.ts +1 -1
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +1 -1
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/deps-checker/internal/funcToolChecker.d.ts +1 -1
  6. package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
  7. package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
  8. package/build/common/featureFlags.d.ts +1 -1
  9. package/build/common/featureFlags.d.ts.map +1 -1
  10. package/build/common/featureFlags.js +5 -6
  11. package/build/common/featureFlags.js.map +1 -1
  12. package/build/common/local/constants.d.ts +1 -0
  13. package/build/common/local/constants.d.ts.map +1 -1
  14. package/build/common/local/constants.js +1 -0
  15. package/build/common/local/constants.js.map +1 -1
  16. package/build/common/local/localCertificateManager.d.ts +3 -2
  17. package/build/common/local/localCertificateManager.d.ts.map +1 -1
  18. package/build/common/local/localCertificateManager.js +5 -1
  19. package/build/common/local/localCertificateManager.js.map +1 -1
  20. package/build/common/m365/packageService.d.ts +1 -0
  21. package/build/common/m365/packageService.d.ts.map +1 -1
  22. package/build/common/m365/packageService.js +68 -0
  23. package/build/common/m365/packageService.js.map +1 -1
  24. package/build/common/samples.d.ts +5 -0
  25. package/build/common/samples.d.ts.map +1 -1
  26. package/build/common/samples.js +28 -30
  27. package/build/common/samples.js.map +1 -1
  28. package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +1 -1
  29. package/build/common/spec-parser/adaptiveCardGenerator.js +2 -4
  30. package/build/common/spec-parser/adaptiveCardGenerator.js.map +1 -1
  31. package/build/common/spec-parser/constants.d.ts +22 -13
  32. package/build/common/spec-parser/constants.d.ts.map +1 -1
  33. package/build/common/spec-parser/constants.js +22 -14
  34. package/build/common/spec-parser/constants.js.map +1 -1
  35. package/build/common/spec-parser/index.browser.d.ts +6 -0
  36. package/build/common/spec-parser/index.browser.d.ts.map +1 -0
  37. package/build/common/spec-parser/index.browser.js +16 -0
  38. package/build/common/spec-parser/index.browser.js.map +1 -0
  39. package/build/common/spec-parser/index.d.ts +1 -1
  40. package/build/common/spec-parser/index.d.ts.map +1 -1
  41. package/build/common/spec-parser/index.js.map +1 -1
  42. package/build/common/spec-parser/interfaces.d.ts +23 -2
  43. package/build/common/spec-parser/interfaces.d.ts.map +1 -1
  44. package/build/common/spec-parser/interfaces.js +3 -2
  45. package/build/common/spec-parser/interfaces.js.map +1 -1
  46. package/build/common/spec-parser/manifestUpdater.d.ts +2 -1
  47. package/build/common/spec-parser/manifestUpdater.d.ts.map +1 -1
  48. package/build/common/spec-parser/manifestUpdater.js +20 -7
  49. package/build/common/spec-parser/manifestUpdater.js.map +1 -1
  50. package/build/common/spec-parser/specFilter.d.ts +1 -1
  51. package/build/common/spec-parser/specFilter.d.ts.map +1 -1
  52. package/build/common/spec-parser/specFilter.js +2 -2
  53. package/build/common/spec-parser/specFilter.js.map +1 -1
  54. package/build/common/spec-parser/specParser.browser.d.ts +51 -0
  55. package/build/common/spec-parser/specParser.browser.d.ts.map +1 -0
  56. package/build/common/spec-parser/specParser.browser.js +145 -0
  57. package/build/common/spec-parser/specParser.browser.js.map +1 -0
  58. package/build/common/spec-parser/specParser.d.ts +11 -6
  59. package/build/common/spec-parser/specParser.d.ts.map +1 -1
  60. package/build/common/spec-parser/specParser.js +108 -101
  61. package/build/common/spec-parser/specParser.js.map +1 -1
  62. package/build/common/spec-parser/utils.d.ts +10 -4
  63. package/build/common/spec-parser/utils.d.ts.map +1 -1
  64. package/build/common/spec-parser/utils.js +142 -26
  65. package/build/common/spec-parser/utils.js.map +1 -1
  66. package/build/common/tools.d.ts.map +1 -1
  67. package/build/common/tools.js +1 -1
  68. package/build/common/tools.js.map +1 -1
  69. package/build/component/configManager/validator.d.ts.map +1 -1
  70. package/build/component/configManager/validator.js +2 -3
  71. package/build/component/configManager/validator.js.map +1 -1
  72. package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
  73. package/build/component/developerPortalScaffoldUtils.js +32 -0
  74. package/build/component/developerPortalScaffoldUtils.js.map +1 -1
  75. package/build/component/driver/aad/create.js +1 -1
  76. package/build/component/driver/aad/create.js.map +1 -1
  77. package/build/component/driver/aad/error/invalidFieldInManifestError.js +1 -1
  78. package/build/component/driver/aad/error/invalidFieldInManifestError.js.map +1 -1
  79. package/build/component/driver/aad/permissions/permissions.json +42 -42
  80. package/build/component/driver/aad/update.d.ts.map +1 -1
  81. package/build/component/driver/aad/update.js +6 -4
  82. package/build/component/driver/aad/update.js.map +1 -1
  83. package/build/component/driver/aad/utility/aadAppClient.js +8 -8
  84. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  85. package/build/component/driver/aad/utility/constants.js +1 -1
  86. package/build/component/driver/aad/utility/constants.js.map +1 -1
  87. package/build/component/driver/apiKey/create.d.ts +16 -0
  88. package/build/component/driver/apiKey/create.d.ts.map +1 -0
  89. package/build/component/driver/apiKey/create.js +211 -0
  90. package/build/component/driver/apiKey/create.js.map +1 -0
  91. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.d.ts +5 -0
  92. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.d.ts.map +1 -0
  93. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js +22 -0
  94. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js.map +1 -0
  95. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.d.ts +5 -0
  96. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.d.ts.map +1 -0
  97. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js +22 -0
  98. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js.map +1 -0
  99. package/build/component/driver/apiKey/error/apiKeyNameTooLong.d.ts +5 -0
  100. package/build/component/driver/apiKey/error/apiKeyNameTooLong.d.ts.map +1 -0
  101. package/build/component/driver/apiKey/error/apiKeyNameTooLong.js +21 -0
  102. package/build/component/driver/apiKey/error/apiKeyNameTooLong.js.map +1 -0
  103. package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts +8 -0
  104. package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts.map +1 -0
  105. package/build/component/driver/apiKey/interface/createApiKeyArgs.js +5 -0
  106. package/build/component/driver/apiKey/interface/createApiKeyArgs.js.map +1 -0
  107. package/build/component/driver/apiKey/interface/createApiKeyOutputs.d.ts +7 -0
  108. package/build/component/driver/apiKey/interface/createApiKeyOutputs.d.ts.map +1 -0
  109. package/build/component/driver/apiKey/interface/createApiKeyOutputs.js +10 -0
  110. package/build/component/driver/apiKey/interface/createApiKeyOutputs.js.map +1 -0
  111. package/build/component/driver/apiKey/utility/constants.d.ts +10 -0
  112. package/build/component/driver/apiKey/utility/constants.d.ts.map +1 -0
  113. package/build/component/driver/apiKey/utility/constants.js +15 -0
  114. package/build/component/driver/apiKey/utility/constants.js.map +1 -0
  115. package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
  116. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +6 -6
  117. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
  118. package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
  119. package/build/component/driver/devTool/installDriver.js +2 -1
  120. package/build/component/driver/devTool/installDriver.js.map +1 -1
  121. package/build/component/driver/devTool/interfaces/InstallToolArgs.d.ts +1 -1
  122. package/build/component/driver/devTool/interfaces/InstallToolArgs.d.ts.map +1 -1
  123. package/build/component/driver/index.d.ts +1 -0
  124. package/build/component/driver/index.d.ts.map +1 -1
  125. package/build/component/driver/index.js +1 -0
  126. package/build/component/driver/index.js.map +1 -1
  127. package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
  128. package/build/component/driver/script/scriptDriver.js +2 -2
  129. package/build/component/driver/script/scriptDriver.js.map +1 -1
  130. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +13 -0
  131. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
  132. package/build/component/driver/teamsApp/clients/appStudioClient.js +38 -0
  133. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  134. package/build/component/driver/teamsApp/constants.d.ts +2 -0
  135. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  136. package/build/component/driver/teamsApp/constants.js +2 -0
  137. package/build/component/driver/teamsApp/constants.js.map +1 -1
  138. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts +44 -0
  139. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts.map +1 -0
  140. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.js +21 -0
  141. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.js.map +1 -0
  142. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.d.ts +15 -0
  143. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.d.ts.map +1 -0
  144. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.js +5 -0
  145. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistrationClientSecret.js.map +1 -0
  146. package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts +1 -1
  147. package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts.map +1 -1
  148. package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
  149. package/build/component/driver/teamsApp/validateAppPackage.js +26 -6
  150. package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
  151. package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
  152. package/build/component/generator/copilotPlugin/generator.js +15 -8
  153. package/build/component/generator/copilotPlugin/generator.js.map +1 -1
  154. package/build/component/generator/copilotPlugin/helper.d.ts +3 -1
  155. package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
  156. package/build/component/generator/copilotPlugin/helper.js +72 -8
  157. package/build/component/generator/copilotPlugin/helper.js.map +1 -1
  158. package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
  159. package/build/component/generator/spfx/spfxGenerator.js +7 -0
  160. package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
  161. package/build/component/generator/spfx/utils/constants.d.ts +1 -14
  162. package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
  163. package/build/component/generator/spfx/utils/constants.js +1 -14
  164. package/build/component/generator/spfx/utils/constants.js.map +1 -1
  165. package/build/component/utils/ResourceGroupHelper.d.ts +1 -0
  166. package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
  167. package/build/component/utils/ResourceGroupHelper.js +31 -1
  168. package/build/component/utils/ResourceGroupHelper.js.map +1 -1
  169. package/build/core/FxCore.d.ts +1 -0
  170. package/build/core/FxCore.d.ts.map +1 -1
  171. package/build/core/FxCore.js +3 -1
  172. package/build/core/FxCore.js.map +1 -1
  173. package/build/core/middleware/projectMigratorV3.js +1 -1
  174. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  175. package/build/core/middleware/utils/debug/taskMigrator.js +1 -1
  176. package/build/index.d.ts +3 -0
  177. package/build/index.d.ts.map +1 -1
  178. package/build/index.js +7 -1
  179. package/build/index.js.map +1 -1
  180. package/build/question/create.d.ts.map +1 -1
  181. package/build/question/create.js +26 -7
  182. package/build/question/create.js.map +1 -1
  183. package/build/question/inputs/DeployAadManifestInputs.d.ts +1 -1
  184. package/build/question/inputs/DeployAadManifestInputs.d.ts.map +1 -1
  185. package/build/question/inputs/PermissionGrantInputs.d.ts +2 -2
  186. package/build/question/inputs/PermissionGrantInputs.d.ts.map +1 -1
  187. package/build/question/inputs/PermissionListInputs.d.ts +1 -1
  188. package/build/question/inputs/PermissionListInputs.d.ts.map +1 -1
  189. package/build/question/options/DeployAadManifestOptions.js +1 -1
  190. package/build/question/options/DeployAadManifestOptions.js.map +1 -1
  191. package/build/question/options/PermissionGrantOptions.js +1 -1
  192. package/build/question/options/PermissionGrantOptions.js.map +1 -1
  193. package/build/question/options/PermissionListOptions.js +1 -1
  194. package/build/question/options/PermissionListOptions.js.map +1 -1
  195. package/build/question/other.d.ts.map +1 -1
  196. package/build/question/other.js +23 -2
  197. package/build/question/other.js.map +1 -1
  198. package/package.json +6 -5
  199. package/resource/package.nls.json +52 -43
  200. package/resource/yaml-schema/v1.3/yaml.schema.json +83 -32
  201. package/templates/core/v3Migration/csharp.app.local.yml +6 -6
  202. package/templates/core/v3Migration/csharp.app.yml +6 -6
  203. package/templates/core/v3Migration/js.ts.app.local.yml +11 -11
  204. package/templates/core/v3Migration/js.ts.app.yml +12 -12
  205. package/templates/fallback/common.zip +0 -0
  206. package/templates/fallback/csharp.zip +0 -0
  207. package/templates/fallback/js.zip +0 -0
  208. package/templates/fallback/ts.zip +0 -0
  209. package/templates/plugins/resource/aad/auth/V3/Enable SSO.txt +2 -2
  210. package/templates/plugins/resource/aad/auth/bot/README.md +13 -13
  211. package/templates/plugins/resource/aad/auth/bot/README.txt +7 -7
  212. package/templates/plugins/resource/aad/auth/tab/README.md +6 -6
  213. package/templates/plugins/resource/aad/auth/tab/README.txt +5 -5
  214. package/templates/plugins/resource/aad/auth/tab/js/sso/GetUserProfile.jsx +1 -1
  215. package/templates/plugins/resource/aad/auth/tab/ts/sso/GetUserProfile.tsx +1 -1
@@ -1395,7 +1395,7 @@
1395
1395
  "allowedMemberTypes": [
1396
1396
  "Application"
1397
1397
  ],
1398
- "description": "Allows an app to read all service usage reports without a signed-in user. Services that provide usage reports include Office 365 and Azure Active Directory.",
1398
+ "description": "Allows an app to read all service usage reports without a signed-in user. Services that provide usage reports include Office 365 and Microsoft Entra ID.",
1399
1399
  "displayName": "Read all usage reports",
1400
1400
  "id": "230c1aed-a721-4c5d-9cb4-a90514e508ef",
1401
1401
  "isEnabled": true,
@@ -1824,8 +1824,8 @@
1824
1824
  "allowedMemberTypes": [
1825
1825
  "Application"
1826
1826
  ],
1827
- "description": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Azure AD built-in and custom administrative roles in your organization, without a signed-in user.",
1828
- "displayName": "Read privileged access to Azure AD roles",
1827
+ "description": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Microsoft Entra built-in and custom administrative roles in your organization, without a signed-in user.",
1828
+ "displayName": "Read privileged access to Microsoft Entra roles",
1829
1829
  "id": "4cdc2547-9148-4295-8d11-be0db1391d6b",
1830
1830
  "isEnabled": true,
1831
1831
  "origin": "Application",
@@ -1835,8 +1835,8 @@
1835
1835
  "allowedMemberTypes": [
1836
1836
  "Application"
1837
1837
  ],
1838
- "description": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Azure AD groups in your organization, without a signed-in user.",
1839
- "displayName": "Read privileged access to Azure AD groups",
1838
+ "description": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Microsoft Entra groups in your organization, without a signed-in user.",
1839
+ "displayName": "Read privileged access to Microsoft Entra groups",
1840
1840
  "id": "01e37dc9-c035-40bd-b438-b2879c4870a6",
1841
1841
  "isEnabled": true,
1842
1842
  "origin": "Application",
@@ -1857,8 +1857,8 @@
1857
1857
  "allowedMemberTypes": [
1858
1858
  "Application"
1859
1859
  ],
1860
- "description": "Allows the app to request and manage time-based assignment and just-in-time elevation (including scheduled elevation) of Azure AD built-in and custom administrative roles in your organization, without a signed-in user.",
1861
- "displayName": "Read and write privileged access to Azure AD roles",
1860
+ "description": "Allows the app to request and manage time-based assignment and just-in-time elevation (including scheduled elevation) of Microsoft Entra built-in and custom administrative roles in your organization, without a signed-in user.",
1861
+ "displayName": "Read and write privileged access to Microsoft Entra roles",
1862
1862
  "id": "854d9ab1-6657-4ec8-be45-823027bcd009",
1863
1863
  "isEnabled": true,
1864
1864
  "origin": "Application",
@@ -1868,8 +1868,8 @@
1868
1868
  "allowedMemberTypes": [
1869
1869
  "Application"
1870
1870
  ],
1871
- "description": "Allows the app to request and manage time-based assignment and just-in-time elevation (including scheduled elevation) of Azure AD groups in your organization, without a signed-in user.",
1872
- "displayName": "Read and write privileged access to Azure AD groups",
1871
+ "description": "Allows the app to request and manage time-based assignment and just-in-time elevation (including scheduled elevation) of Microsoft Entra groups in your organization, without a signed-in user.",
1872
+ "displayName": "Read and write privileged access to Microsoft Entra groups",
1873
1873
  "id": "2f6817f8-7b12-4f0f-bc18-eeaf60705a9e",
1874
1874
  "isEnabled": true,
1875
1875
  "origin": "Application",
@@ -2891,7 +2891,7 @@
2891
2891
  "allowedMemberTypes": [
2892
2892
  "Application"
2893
2893
  ],
2894
- "description": "Allows the application to obtain basic tenant information about another target tenant within the Azure AD ecosystem without a signed-in user.",
2894
+ "description": "Allows the application to obtain basic tenant information about another target tenant within the Microsoft Entra ecosystem without a signed-in user.",
2895
2895
  "displayName": "Read cross-tenant basic information",
2896
2896
  "id": "cac88765-0581-4025-9725-5ebc13f729ee",
2897
2897
  "isEnabled": true,
@@ -2979,8 +2979,8 @@
2979
2979
  "allowedMemberTypes": [
2980
2980
  "Application"
2981
2981
  ],
2982
- "description": "Allows the app to read and update all Azure AD recommendations, without a signed-in user. ",
2983
- "displayName": "Read and update all Azure AD recommendations",
2982
+ "description": "Allows the app to read and update all Microsoft Entra recommendations, without a signed-in user. ",
2983
+ "displayName": "Read and update all Microsoft Entra recommendations",
2984
2984
  "id": "0e9eea12-4f01-45f6-9b8d-3ea4c8144158",
2985
2985
  "isEnabled": true,
2986
2986
  "origin": "Application",
@@ -3023,8 +3023,8 @@
3023
3023
  "allowedMemberTypes": [
3024
3024
  "Application"
3025
3025
  ],
3026
- "description": "Allows the app to read all Azure AD recommendations, without a signed-in user. ",
3027
- "displayName": "Read all Azure AD recommendations",
3026
+ "description": "Allows the app to read all Microsoft Entra recommendations, without a signed-in user. ",
3027
+ "displayName": "Read all Microsoft Entra recommendations",
3028
3028
  "id": "ae73097b-cb2a-4447-b064-5d80f6093921",
3029
3029
  "isEnabled": true,
3030
3030
  "origin": "Application",
@@ -4132,13 +4132,13 @@
4132
4132
  "value": "AppCatalog.ReadWrite.All"
4133
4133
  },
4134
4134
  {
4135
- "adminConsentDescription": "Allows the app to request and manage just in time elevation (including scheduled elevation) of users to Azure AD built-in administrative roles, on behalf of signed-in users.",
4136
- "adminConsentDisplayName": "Read and write privileged access to Azure AD",
4135
+ "adminConsentDescription": "Allows the app to request and manage just in time elevation (including scheduled elevation) of users to Microsoft Entra built-in administrative roles, on behalf of signed-in users.",
4136
+ "adminConsentDisplayName": "Read and write privileged access to Microsoft Entra",
4137
4137
  "id": "3c3c74f5-cdaa-4a97-b7e0-4e788bfcfb37",
4138
4138
  "isEnabled": true,
4139
4139
  "type": "Admin",
4140
- "userConsentDescription": "Allows the app to request and manage just in time elevation (including scheduled elevation) of users to Azure AD built-in administrative roles, on your behalf.",
4141
- "userConsentDisplayName": "Read and write privileged access to Azure AD",
4140
+ "userConsentDescription": "Allows the app to request and manage just in time elevation (including scheduled elevation) of users to Microsoft Entra built-in administrative roles, on your behalf.",
4141
+ "userConsentDisplayName": "Read and write privileged access to Microsoft Entra",
4142
4142
  "value": "PrivilegedAccess.ReadWrite.AzureAD"
4143
4143
  },
4144
4144
  {
@@ -4582,12 +4582,12 @@
4582
4582
  "value": "Files.ReadWrite.AppFolder"
4583
4583
  },
4584
4584
  {
4585
- "adminConsentDescription": "Allows an app to read all service usage reports on behalf of the signed-in user. Services that provide usage reports include Office 365 and Azure Active Directory.",
4585
+ "adminConsentDescription": "Allows an app to read all service usage reports on behalf of the signed-in user. Services that provide usage reports include Office 365 and Microsoft Entra ID.",
4586
4586
  "adminConsentDisplayName": "Read all usage reports",
4587
4587
  "id": "02e97553-ed7b-43d0-ab3c-f8bace0d040c",
4588
4588
  "isEnabled": true,
4589
4589
  "type": "Admin",
4590
- "userConsentDescription": "Allows an app to read all service usage reports on your behalf. Services that provide usage reports include Office 365 and Azure Active Directory.",
4590
+ "userConsentDescription": "Allows an app to read all service usage reports on your behalf. Services that provide usage reports include Office 365 and Microsoft Entra ID.",
4591
4591
  "userConsentDisplayName": "Read all usage reports",
4592
4592
  "value": "Reports.Read.All"
4593
4593
  },
@@ -5142,23 +5142,23 @@
5142
5142
  "value": "PrivilegedAccess.ReadWrite.AzureResources"
5143
5143
  },
5144
5144
  {
5145
- "adminConsentDescription": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Azure AD built-in and custom administrative roles, on behalf of the signed-in user.",
5146
- "adminConsentDisplayName": "Read privileged access to Azure AD",
5145
+ "adminConsentDescription": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Microsoft Entra built-in and custom administrative roles, on behalf of the signed-in user.",
5146
+ "adminConsentDisplayName": "Read privileged access to Microsoft Entra",
5147
5147
  "id": "b3a539c9-59cb-4ad5-825a-041ddbdc2bdb",
5148
5148
  "isEnabled": true,
5149
5149
  "type": "Admin",
5150
- "userConsentDescription": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Azure AD built-in and custom administrative roles, on your behalf.",
5151
- "userConsentDisplayName": "Read privileged access to Azure AD",
5150
+ "userConsentDescription": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Microsoft Entra built-in and custom administrative roles, on your behalf.",
5151
+ "userConsentDisplayName": "Read privileged access to Microsoft Entra",
5152
5152
  "value": "PrivilegedAccess.Read.AzureAD"
5153
5153
  },
5154
5154
  {
5155
- "adminConsentDescription": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Azure AD groups, on behalf of the signed-in user.",
5156
- "adminConsentDisplayName": "Read privileged access to Azure AD groups",
5155
+ "adminConsentDescription": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Microsoft Entra groups, on behalf of the signed-in user.",
5156
+ "adminConsentDisplayName": "Read privileged access to Microsoft Entra groups",
5157
5157
  "id": "d329c81c-20ad-4772-abf9-3f6fdb7e5988",
5158
5158
  "isEnabled": true,
5159
5159
  "type": "Admin",
5160
- "userConsentDescription": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Azure AD groups, on your behalf.",
5161
- "userConsentDisplayName": "Read privileged access to Azure AD groups",
5160
+ "userConsentDescription": "Allows the app to read time-based assignment and just-in-time elevation (including scheduled elevation) of Microsoft Entra groups, on your behalf.",
5161
+ "userConsentDisplayName": "Read privileged access to Microsoft Entra groups",
5162
5162
  "value": "PrivilegedAccess.Read.AzureADGroup"
5163
5163
  },
5164
5164
  {
@@ -5172,13 +5172,13 @@
5172
5172
  "value": "PrivilegedAccess.Read.AzureResources"
5173
5173
  },
5174
5174
  {
5175
- "adminConsentDescription": "Allows the app to request and manage time-based assignment and just-in-time elevation (including scheduled elevation) of Azure AD groups, on behalf of the signed-in user.",
5176
- "adminConsentDisplayName": "Read and write privileged access to Azure AD groups",
5175
+ "adminConsentDescription": "Allows the app to request and manage time-based assignment and just-in-time elevation (including scheduled elevation) of Microsoft Entra groups, on behalf of the signed-in user.",
5176
+ "adminConsentDisplayName": "Read and write privileged access to Microsoft Entra groups",
5177
5177
  "id": "32531c59-1f32-461f-b8df-6f8a3b89f73b",
5178
5178
  "isEnabled": true,
5179
5179
  "type": "Admin",
5180
- "userConsentDescription": "Allows the app to request and manage time-based assignment and just-in-time elevation (including scheduled elevation) of Azure AD groups, on your behalf.",
5181
- "userConsentDisplayName": "Read and write privileged access to Azure AD groups",
5180
+ "userConsentDescription": "Allows the app to request and manage time-based assignment and just-in-time elevation (including scheduled elevation) of Microsoft Entra groups, on your behalf.",
5181
+ "userConsentDisplayName": "Read and write privileged access to Microsoft Entra groups",
5182
5182
  "value": "PrivilegedAccess.ReadWrite.AzureADGroup"
5183
5183
  },
5184
5184
  {
@@ -6322,13 +6322,13 @@
6322
6322
  "value": "PrintJob.Create"
6323
6323
  },
6324
6324
  {
6325
- "adminConsentDescription": "Allows the app to read Azure AD recommendations, on behalf of the signed-in user.",
6326
- "adminConsentDisplayName": "Read Azure AD recommendations",
6325
+ "adminConsentDescription": "Allows the app to read Microsoft Entra recommendations, on behalf of the signed-in user.",
6326
+ "adminConsentDisplayName": "Read Microsoft Entra recommendations",
6327
6327
  "id": "34d3bd24-f6a6-468c-b67c-0c365c1d6410",
6328
6328
  "isEnabled": true,
6329
6329
  "type": "Admin",
6330
- "userConsentDescription": "Allows the app to read Azure AD recommendations, on your behalf.",
6331
- "userConsentDisplayName": "Read Azure AD recommendations",
6330
+ "userConsentDescription": "Allows the app to read Microsoft Entra recommendations, on your behalf.",
6331
+ "userConsentDisplayName": "Read Microsoft Entra recommendations",
6332
6332
  "value": "DirectoryRecommendations.Read.All"
6333
6333
  },
6334
6334
  {
@@ -6402,12 +6402,12 @@
6402
6402
  "value": "OnlineMeetingRecording.Read.All"
6403
6403
  },
6404
6404
  {
6405
- "adminConsentDescription": "Allows the application to obtain basic tenant information about another target tenant within the Azure AD ecosystem on behalf of the signed-in user.",
6405
+ "adminConsentDescription": "Allows the application to obtain basic tenant information about another target tenant within the Microsoft Entra ecosystem on behalf of the signed-in user.",
6406
6406
  "adminConsentDisplayName": "Read cross-tenant basic information",
6407
6407
  "id": "81594d25-e88e-49cf-ac8c-fecbff49f994",
6408
6408
  "isEnabled": true,
6409
6409
  "type": "Admin",
6410
- "userConsentDescription": "Allows the application to obtain basic tenant information about another target tenant within the Azure AD ecosystem on your behalf.",
6410
+ "userConsentDescription": "Allows the application to obtain basic tenant information about another target tenant within the Microsoft Entra ecosystem on your behalf.",
6411
6411
  "userConsentDisplayName": "Read cross-tenant basic information",
6412
6412
  "value": "CrossTenantInformation.ReadBasic.All"
6413
6413
  },
@@ -6462,13 +6462,13 @@
6462
6462
  "value": "ReportSettings.Read.All"
6463
6463
  },
6464
6464
  {
6465
- "adminConsentDescription": "Allows the app to read and update Azure AD recommendations, on behalf of the signed-in user. ",
6466
- "adminConsentDisplayName": "Read and update Azure AD recommendations",
6465
+ "adminConsentDescription": "Allows the app to read and update Microsoft Entra recommendations, on behalf of the signed-in user. ",
6466
+ "adminConsentDisplayName": "Read and update Microsoft Entra recommendations",
6467
6467
  "id": "f37235e8-90a0-4189-93e2-e55b53867ccd",
6468
6468
  "isEnabled": true,
6469
6469
  "type": "Admin",
6470
- "userConsentDescription": "Allows the app to read and update Azure AD recommendations, on your behalf.",
6471
- "userConsentDisplayName": "Read and update Azure AD recommendations",
6470
+ "userConsentDescription": "Allows the app to read and update Microsoft Entra recommendations, on your behalf.",
6471
+ "userConsentDisplayName": "Read and update Microsoft Entra recommendations",
6472
6472
  "value": "DirectoryRecommendations.ReadWrite.All"
6473
6473
  },
6474
6474
  {
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/component/driver/aad/update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAqBhE,qBACa,kBAAmB,YAAW,UAAU;IACnD,WAAW,SAAqD;IAChE,QAAQ,CAAC,aAAa,SAAqE;IAG9E,OAAO,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;IAyF9F,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,gBAAgB;CAKzB"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/component/driver/aad/update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAqBhE,qBACa,kBAAmB,YAAW,UAAU;IACnD,WAAW,SAAqD;IAChE,QAAQ,CAAC,aAAa,SAAqE;IAG9E,OAAO,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;IA4F9F,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,gBAAgB;CAKzB"}
@@ -30,15 +30,15 @@ let UpdateAadAppDriver = class UpdateAadAppDriver {
30
30
  const aadAppClient = new aadAppClient_1.AadAppClient(context.m365TokenProvider, context.logProvider);
31
31
  const manifest = await buildAadManifest_1.buildAadManifest(context, args.manifestPath, args.outputFilePath, state);
32
32
  // MS Graph API does not allow adding new OAuth permissions and pre authorize it within one request
33
- // So split update AAD app to two requests:
34
- // 1. If there's preAuthorizedApplications, remove it temporary and update AAD app to create possible new permission
33
+ // So split update Microsoft Entra app to two requests:
34
+ // 1. If there's preAuthorizedApplications, remove it temporary and update Microsoft Entra app to create possible new permission
35
35
  if (manifest.preAuthorizedApplications && manifest.preAuthorizedApplications.length > 0) {
36
36
  const preAuthorizedApplications = manifest.preAuthorizedApplications;
37
37
  manifest.preAuthorizedApplications = [];
38
38
  await aadAppClient.updateAadApp(manifest);
39
39
  manifest.preAuthorizedApplications = preAuthorizedApplications;
40
40
  }
41
- // 2. Update AAD app again with full manifest to set preAuthorizedApplications
41
+ // 2. Update Microsoft Entra app again with full manifest to set preAuthorizedApplications
42
42
  await aadAppClient.updateAadApp(manifest);
43
43
  const summary = localizeUtils_1.getLocalizedString(constants_1.logMessageKeys.successUpdateAadAppManifest, args.manifestPath, manifest.id);
44
44
  (_b = context.logProvider) === null || _b === void 0 ? void 0 : _b.info(summary);
@@ -59,7 +59,9 @@ let UpdateAadAppDriver = class UpdateAadAppDriver {
59
59
  summaries: summaries,
60
60
  };
61
61
  }
62
- if (axios_1.default.isAxiosError(error)) {
62
+ if (axios_1.default.isAxiosError(error) &&
63
+ error.response // If no response, treat as unhandled error first to understand the actual problem
64
+ ) {
63
65
  const message = JSON.stringify(error.response.data);
64
66
  (_e = context.logProvider) === null || _e === void 0 ? void 0 : _e.error(localizeUtils_1.getLocalizedString(constants_1.logMessageKeys.failExecuteDriver, actionName, message));
65
67
  if (error.response.status >= 400 && error.response.status < 500) {
@@ -1 +1 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;IAD9B,gBAAO,CAAC,UAAU,CAAC,CAAC,iCAAiC;GACzC,kBAAkB,CAqH9B;AArHY,gDAAkB"}
@@ -43,7 +43,7 @@ class AadAppClient {
43
43
  (_a = this.logProvider) === null || _a === void 0 ? void 0 : _a.info(localizeUtils_1.getLocalizedString("core.common.ReceiveApiResponse", JSON.stringify(response.data)));
44
44
  return response;
45
45
  });
46
- // Add retry logic. Retry post request may result in creating additional resources but should be fine in AAD driver.
46
+ // Add retry logic. Retry post request may result in creating additional resources but should be fine in Microsoft Entra driver.
47
47
  axios_retry_1.default(this.axios, {
48
48
  retries: this.retryNumber,
49
49
  retryDelay: axios_retry_1.default.exponentialDelay,
@@ -54,7 +54,7 @@ class AadAppClient {
54
54
  const requestBody = {
55
55
  displayName: displayName,
56
56
  signInAudience: signInAudience,
57
- }; // Create an AAD app without setting anything
57
+ }; // Create a Microsoft Entra app without setting anything
58
58
  const response = await this.axios.post("applications", requestBody);
59
59
  return response.data;
60
60
  }
@@ -70,7 +70,7 @@ class AadAppClient {
70
70
  retryDelay: axios_retry_1.default.exponentialDelay,
71
71
  retryCondition: (error) => axios_retry_1.default.isNetworkError(error) ||
72
72
  axios_retry_1.default.isRetryableError(error) ||
73
- this.is404Error(error), // also retry 404 error since AAD need sometime to sync created AAD app data
73
+ this.is404Error(error), // also retry 404 error since Microsoft Entra need sometime to sync created Microsoft Entra app data
74
74
  },
75
75
  });
76
76
  return response.data.secretText;
@@ -85,8 +85,8 @@ class AadAppClient {
85
85
  retryDelay: axios_retry_1.default.exponentialDelay,
86
86
  retryCondition: (error) => axios_retry_1.default.isNetworkError(error) ||
87
87
  axios_retry_1.default.isRetryableError(error) ||
88
- this.is404Error(error) || // also retry 404 error since AAD need sometime to sync created AAD app data
89
- this.is400Error(error), // sometimes AAD will complain OAuth permission not found if we pre-authorize a newly created permission
88
+ this.is404Error(error) || // also retry 404 error since Microsoft Entra need sometime to sync created Microsoft Entra app data
89
+ this.is400Error(error), // sometimes Microsoft Entra will complain OAuth permission not found if we pre-authorize a newly created permission
90
90
  },
91
91
  });
92
92
  }
@@ -108,7 +108,7 @@ class AadAppClient {
108
108
  retryDelay: axios_retry_1.default.exponentialDelay,
109
109
  retryCondition: (error) => axios_retry_1.default.isNetworkError(error) ||
110
110
  axios_retry_1.default.isRetryableError(error) ||
111
- this.is404Error(error), // also retry 404 error since AAD need sometime to sync created AAD app data
111
+ this.is404Error(error), // also retry 404 error since Microsoft Entra need sometime to sync created Microsoft Entra app data
112
112
  },
113
113
  });
114
114
  const aadOwners = [];
@@ -134,11 +134,11 @@ class AadAppClient {
134
134
  retryDelay: axios_retry_1.default.exponentialDelay,
135
135
  retryCondition: (error) => axios_retry_1.default.isNetworkError(error) ||
136
136
  axios_retry_1.default.isRetryableError(error) ||
137
- this.is404Error(error), // also retry 404 error since AAD need sometime to sync created AAD app data
137
+ this.is404Error(error), // also retry 404 error since Microsoft Entra need sometime to sync created Microsoft Entra app data
138
138
  },
139
139
  });
140
140
  }
141
- // only use it to retry 404 errors for create client secret / update AAD app requests right after AAD app creation
141
+ // only use it to retry 404 errors for create client secret / update Microsoft Entra app requests right after Microsoft Entra app creation
142
142
  is404Error(error) {
143
143
  return error.code !== "ECONNABORTED" && (!error.response || error.response.status === 404);
144
144
  }
@@ -1 +1 @@
1
- {"version":3,"file":"aadAppClient.js","sourceRoot":"","sources":["../../../../../src/component/driver/aad/utility/aadAppClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,+CAA8C;AAE9C,0DAAyD;AACzD,sEAA4D;AAE5D,oDAAuD;AACvD,4DAA6D;AAC7D,gEAAgF;AAIhF,gEAA6D;AAC7D,2DAAwD;AACxD,2CAAsD;AACtD,oEAAsE;AAWtE,MAAa,YAAY;IAOvB,YAAY,iBAAoC,EAAE,WAAyB;QAN1D,gBAAW,GAAW,CAAC,CAAC;QAIxB,YAAO,GAAW,kCAAkC,CAAC;QAGpE,IAAI,CAAC,aAAa,GAAG,iBAAiB,CA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.permissionsKeys = {
24
- name: "Azure AD App",
24
+ name: "Microsoft Entra App",
25
25
  owner: "Owner",
26
26
  noPermission: "No Permission",
27
27
  type: "M365",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/component/driver/aad/utility/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,cAAc,GAAG;IAC5B,kBAAkB,EAAE,sCAAsC;IAC1D,oBAAoB,EAAE,wCAAwC;IAC9D,iBAAiB,EAAE,qCAAqC;IACxD,iBAAiB,EAAE,qCAAqC;IACxD,mBAAmB,EAAE,uCAAuC;IAC5D,gBAAgB,EAAE,oCAAoC;IACtD,yBAAyB,EAAE,6CAA6C;IACxE,2BAA2B,EAAE,+CAA+C;IAC5E,wBAAwB,EAAE,4CAA4C;IACtE,oBAAoB,EAAE,wCAAwC;IAC9D,2BAA2B,EAAE,+CAA+C;CAC7E,CAAC;AAEW,QAAA,sBAAsB,GAAG;IACpC,MAAM,EAAE,kCAAkC;IAC1C,MAAM,EAAE,kCAAkC;CAC3C,CAAC;AAEW,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,OAAO;IACd,YAAY,EAAE,eAAe;IAC7B,IAAI,EAAE,MAAM;CACb,CAAC;AAEW,QAAA,YAAY,GAAG;IAC1B,mBAAmB,EAAE,wCAAwC;CAC9D,CAAC;AAEW,QAAA,SAAS,GAAG;IACvB,yBAAyB,EAAE,SAAS;IACpC,oBAAoB,EAAE,mCAAmC;CAC1D,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/component/driver/aad/utility/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,cAAc,GAAG;IAC5B,kBAAkB,EAAE,sCAAsC;IAC1D,oBAAoB,EAAE,wCAAwC;IAC9D,iBAAiB,EAAE,qCAAqC;IACxD,iBAAiB,EAAE,qCAAqC;IACxD,mBAAmB,EAAE,uCAAuC;IAC5D,gBAAgB,EAAE,oCAAoC;IACtD,yBAAyB,EAAE,6CAA6C;IACxE,2BAA2B,EAAE,+CAA+C;IAC5E,wBAAwB,EAAE,4CAA4C;IACtE,oBAAoB,EAAE,wCAAwC;IAC9D,2BAA2B,EAAE,+CAA+C;CAC7E,CAAC;AAEW,QAAA,sBAAsB,GAAG;IACpC,MAAM,EAAE,kCAAkC;IAC1C,MAAM,EAAE,kCAAkC;CAC3C,CAAC;AAEW,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,OAAO;IACd,YAAY,EAAE,eAAe;IAC7B,IAAI,EAAE,MAAM;CACb,CAAC;AAEW,QAAA,YAAY,GAAG;IAC1B,mBAAmB,EAAE,wCAAwC;CAC9D,CAAC;AAEW,QAAA,SAAS,GAAG;IACvB,yBAAyB,EAAE,SAAS;IACpC,oBAAoB,EAAE,mCAAmC;CAC1D,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ExecutionResult, StepDriver } from "../interface/stepDriver";
2
+ import { CreateApiKeyArgs } from "./interface/createApiKeyArgs";
3
+ import { DriverContext } from "../interface/commonArgs";
4
+ export declare class CreateApiKeyDriver implements StepDriver {
5
+ description: string;
6
+ readonly progressTitle: string;
7
+ execute(args: CreateApiKeyArgs, context: DriverContext, outputEnvVarNames?: Map<string, string>): Promise<ExecutionResult>;
8
+ private loadStateFromEnv;
9
+ private parseSecret;
10
+ private validateSecret;
11
+ private parseDomain;
12
+ private validateDomain;
13
+ private validateArgs;
14
+ private mapArgsToApiSecretRegistration;
15
+ }
16
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/component/driver/apiKey/create.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAwBxD,qBACa,kBAAmB,YAAW,UAAU;IACnD,WAAW,SAA0D;IACrE,QAAQ,CAAC,aAAa,SAA2D;IAGpE,OAAO,CAClB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,aAAa,EACtB,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACtC,OAAO,CAAC,eAAe,CAAC;IAkF3B,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,cAAc;IAmBtB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,cAAc;IAmBtB,OAAO,CAAC,YAAY;YA+BN,8BAA8B;CAiD7C"}
@@ -0,0 +1,211 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.CreateApiKeyDriver = void 0;
6
+ const tslib_1 = require("tslib");
7
+ const typedi_1 = require("typedi");
8
+ const localizeUtils_1 = require("../../../common/localizeUtils");
9
+ const addStartAndEndTelemetry_1 = require("../middleware/addStartAndEndTelemetry");
10
+ const hooks_1 = require("@feathersjs/hooks");
11
+ const constants_1 = require("./utility/constants");
12
+ const teamsfx_api_1 = require("@microsoft/teamsfx-api");
13
+ const outputEnvironmentVariableUndefinedError_1 = require("../error/outputEnvironmentVariableUndefinedError");
14
+ const createApiKeyOutputs_1 = require("./interface/createApiKeyOutputs");
15
+ const tools_1 = require("../../../common/tools");
16
+ const appStudioClient_1 = require("../teamsApp/clients/appStudioClient");
17
+ const ApiSecretRegistration_1 = require("../teamsApp/interfaces/ApiSecretRegistration");
18
+ const error_1 = require("../../../error");
19
+ const apiKeyNameTooLong_1 = require("./error/apiKeyNameTooLong");
20
+ const apiKeyClientSecretInvalid_1 = require("./error/apiKeyClientSecretInvalid");
21
+ const apiKeyDomainInvalid_1 = require("./error/apiKeyDomainInvalid");
22
+ const actionName = "apiKey/create"; // DO NOT MODIFY the name
23
+ const helpLink = "https://aka.ms/teamsfx-actions/apiKey-create";
24
+ let CreateApiKeyDriver = class CreateApiKeyDriver {
25
+ constructor() {
26
+ this.description = localizeUtils_1.getLocalizedString("driver.apiKey.description.create");
27
+ this.progressTitle = localizeUtils_1.getLocalizedString("driver.aadApp.apiKey.title.create");
28
+ }
29
+ async execute(args, context, outputEnvVarNames) {
30
+ var _a, _b, _c, _d, _e, _f;
31
+ const summaries = [];
32
+ const outputs = new Map();
33
+ try {
34
+ (_a = context.logProvider) === null || _a === void 0 ? void 0 : _a.info(localizeUtils_1.getLocalizedString(constants_1.logMessageKeys.startExecuteDriver, actionName));
35
+ if (!outputEnvVarNames) {
36
+ throw new outputEnvironmentVariableUndefinedError_1.OutputEnvironmentVariableUndefinedError(actionName);
37
+ }
38
+ const state = this.loadStateFromEnv(outputEnvVarNames);
39
+ const appStudioTokenRes = await context.m365TokenProvider.getAccessToken({
40
+ scopes: tools_1.AppStudioScopes,
41
+ });
42
+ if (appStudioTokenRes.isErr()) {
43
+ throw appStudioTokenRes.error;
44
+ }
45
+ const appStudioToken = appStudioTokenRes.value;
46
+ if (state && state.registrationId) {
47
+ try {
48
+ await appStudioClient_1.AppStudioClient.getApiKeyRegistrationById(appStudioToken, state.registrationId);
49
+ (_b = context.logProvider) === null || _b === void 0 ? void 0 : _b.info(localizeUtils_1.getLocalizedString(constants_1.logMessageKeys.skipCreateApiKey, outputEnvVarNames.get(createApiKeyOutputs_1.OutputKeys.registrationId)));
50
+ }
51
+ catch (error) {
52
+ (_c = context.logProvider) === null || _c === void 0 ? void 0 : _c.warning(localizeUtils_1.getLocalizedString(constants_1.logMessageKeys.apiKeyNotFound, outputEnvVarNames.get(createApiKeyOutputs_1.OutputKeys.registrationId)));
53
+ }
54
+ }
55
+ else {
56
+ this.validateArgs(args);
57
+ const apiKey = await this.mapArgsToApiSecretRegistration(context.m365TokenProvider, args);
58
+ const apiRegistrationRes = await appStudioClient_1.AppStudioClient.createApiKeyRegistration(appStudioToken, apiKey);
59
+ outputs.set(outputEnvVarNames.get(createApiKeyOutputs_1.OutputKeys.registrationId), apiRegistrationRes.id);
60
+ const summary = localizeUtils_1.getLocalizedString(constants_1.logMessageKeys.successCreateApiKey, apiRegistrationRes.id);
61
+ (_d = context.logProvider) === null || _d === void 0 ? void 0 : _d.info(summary);
62
+ summaries.push(summary);
63
+ }
64
+ return {
65
+ result: teamsfx_api_1.ok(outputs),
66
+ summaries: summaries,
67
+ };
68
+ }
69
+ catch (error) {
70
+ if (error instanceof teamsfx_api_1.UserError || error instanceof teamsfx_api_1.SystemError) {
71
+ (_e = context.logProvider) === null || _e === void 0 ? void 0 : _e.error(localizeUtils_1.getLocalizedString(constants_1.logMessageKeys.failedExecuteDriver, actionName, error.displayMessage));
72
+ return {
73
+ result: teamsfx_api_1.err(error),
74
+ summaries: summaries,
75
+ };
76
+ }
77
+ const message = JSON.stringify(error);
78
+ (_f = context.logProvider) === null || _f === void 0 ? void 0 : _f.error(localizeUtils_1.getLocalizedString(constants_1.logMessageKeys.failedExecuteDriver, actionName, message));
79
+ return {
80
+ result: teamsfx_api_1.err(new error_1.UnhandledError(error, actionName)),
81
+ summaries: summaries,
82
+ };
83
+ }
84
+ }
85
+ // Needs to validate the parameters outside of the function
86
+ loadStateFromEnv(outputEnvVarNames) {
87
+ const result = {};
88
+ for (const [propertyName, envVarName] of outputEnvVarNames) {
89
+ result[propertyName] = process.env[envVarName];
90
+ }
91
+ return result;
92
+ }
93
+ // Allowed secrets: secret or secret1, secret2
94
+ // Need to validate secrets outside of the function
95
+ parseSecret(apiKeyClientSecret) {
96
+ const secrets = apiKeyClientSecret.trim().split(",");
97
+ return secrets.map((secret) => secret.trim());
98
+ }
99
+ validateSecret(apiKeySecret) {
100
+ if (typeof apiKeySecret !== "string") {
101
+ return false;
102
+ }
103
+ const regExp = /^(\w){10,128}(,\s*\w{10,128})*/g;
104
+ const regResult = regExp.exec(apiKeySecret);
105
+ if (!regResult) {
106
+ return false;
107
+ }
108
+ const secrets = this.parseSecret(apiKeySecret);
109
+ if (secrets.length > constants_1.maxSecretPerApiKey) {
110
+ return false;
111
+ }
112
+ return true;
113
+ }
114
+ parseDomain(domain) {
115
+ const domains = domain.trim().split(",");
116
+ return domains.map((domain) => domain.trim());
117
+ }
118
+ validateDomain(domain) {
119
+ if (typeof domain !== "string") {
120
+ return false;
121
+ }
122
+ const regExp = /^\w+(,\s*\w+)*/g;
123
+ const regResult = regExp.exec(domain);
124
+ if (!regResult) {
125
+ return false;
126
+ }
127
+ const domains = this.parseDomain(domain);
128
+ if (domains.length > constants_1.maxDomainPerApiKey) {
129
+ return false;
130
+ }
131
+ return true;
132
+ }
133
+ validateArgs(args) {
134
+ const invalidParameters = [];
135
+ if (typeof args.name !== "string" || !args.name) {
136
+ invalidParameters.push("name");
137
+ }
138
+ if (args.name.length > 128) {
139
+ throw new apiKeyNameTooLong_1.ApiKeyNameTooLongError(actionName);
140
+ }
141
+ if (typeof args.appId !== "string" || !args.appId) {
142
+ invalidParameters.push("appId");
143
+ }
144
+ if (args.clientSecret && !this.validateSecret(args.clientSecret)) {
145
+ throw new apiKeyClientSecretInvalid_1.ApiKeyClientSecretInvalidError(actionName);
146
+ }
147
+ if (args.apiSpecPath && typeof args.apiSpecPath !== "string") {
148
+ invalidParameters.push("apiSpecPath");
149
+ }
150
+ if (args.domain && !this.validateDomain(args.domain)) {
151
+ throw new apiKeyDomainInvalid_1.ApiKeyDomainInvalidError(actionName);
152
+ }
153
+ if (invalidParameters.length > 0) {
154
+ throw new error_1.InvalidActionInputError(actionName, invalidParameters, helpLink);
155
+ }
156
+ }
157
+ async mapArgsToApiSecretRegistration(tokenProvider, args) {
158
+ const currentUserRes = await tokenProvider.getJsonObject({ scopes: tools_1.GraphScopes });
159
+ if (currentUserRes.isErr()) {
160
+ throw currentUserRes.error;
161
+ }
162
+ const currentUser = currentUserRes.value;
163
+ const userId = currentUser["oid"];
164
+ const secrets = this.parseSecret(args.clientSecret);
165
+ let isPrimary = true;
166
+ const clientSecrets = secrets.map((secret) => {
167
+ const clientSecret = {
168
+ value: secret,
169
+ description: args.name,
170
+ priority: isPrimary ? 0 : 1,
171
+ isValueRedacted: true,
172
+ };
173
+ isPrimary = false;
174
+ return clientSecret;
175
+ });
176
+ let domain;
177
+ if (args.domain) {
178
+ domain = this.parseDomain(args.domain);
179
+ }
180
+ else {
181
+ // TODO: get domain from api spec
182
+ domain = [];
183
+ }
184
+ const apiKey = {
185
+ description: args.name,
186
+ targetUrlsShouldStartWith: domain,
187
+ applicableToApps: ApiSecretRegistration_1.ApiSecretRegistrationAppType.SpecificApp,
188
+ specificAppId: args.appId,
189
+ targetAudience: ApiSecretRegistration_1.ApiSecretRegistrationTargetAudience.AnyTenant,
190
+ clientSecrets: clientSecrets,
191
+ manageableByUsers: [
192
+ {
193
+ userId: userId,
194
+ accessType: ApiSecretRegistration_1.ApiSecretRegistrationUserAccessType.ReadWrite,
195
+ },
196
+ ],
197
+ };
198
+ return apiKey;
199
+ }
200
+ };
201
+ tslib_1.__decorate([
202
+ hooks_1.hooks([addStartAndEndTelemetry_1.addStartAndEndTelemetry(actionName, actionName)]),
203
+ tslib_1.__metadata("design:type", Function),
204
+ tslib_1.__metadata("design:paramtypes", [Object, Object, Map]),
205
+ tslib_1.__metadata("design:returntype", Promise)
206
+ ], CreateApiKeyDriver.prototype, "execute", null);
207
+ CreateApiKeyDriver = tslib_1.__decorate([
208
+ typedi_1.Service(actionName) // DO NOT MODIFY the service name
209
+ ], CreateApiKeyDriver);
210
+ exports.CreateApiKeyDriver = CreateApiKeyDriver;
211
+ //# sourceMappingURL=create.js.map