auth0-deploy-cli 8.20.4-beta.0 → 8.22.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 (318) hide show
  1. package/.circleci/config.yml +5 -46
  2. package/.eslintignore +5 -0
  3. package/.eslintrc +69 -0
  4. package/CHANGELOG.md +30 -6
  5. package/lib/args.js +1 -0
  6. package/lib/args.js.map +1 -0
  7. package/lib/commands/export.js +49 -41
  8. package/lib/commands/export.js.map +1 -0
  9. package/lib/commands/import.js +43 -36
  10. package/lib/commands/import.js.map +1 -0
  11. package/lib/commands/index.js +1 -0
  12. package/lib/commands/index.js.map +1 -0
  13. package/lib/configFactory.js +1 -0
  14. package/lib/configFactory.js.map +1 -0
  15. package/lib/context/defaults.js +10 -38
  16. package/lib/context/defaults.js.map +1 -0
  17. package/lib/context/directory/handlers/actions.js +39 -40
  18. package/lib/context/directory/handlers/actions.js.map +1 -0
  19. package/lib/context/directory/handlers/attackProtection.js +34 -22
  20. package/lib/context/directory/handlers/attackProtection.js.map +1 -0
  21. package/lib/context/directory/handlers/branding.js +21 -12
  22. package/lib/context/directory/handlers/branding.js.map +1 -0
  23. package/lib/context/directory/handlers/clientGrants.js +62 -52
  24. package/lib/context/directory/handlers/clientGrants.js.map +1 -0
  25. package/lib/context/directory/handlers/clients.js +60 -17
  26. package/lib/context/directory/handlers/clients.js.map +1 -0
  27. package/lib/context/directory/handlers/connectionProfiles.d.ts +11 -0
  28. package/lib/context/directory/handlers/connectionProfiles.js +59 -0
  29. package/lib/context/directory/handlers/connectionProfiles.js.map +1 -0
  30. package/lib/context/directory/handlers/connections.js +41 -32
  31. package/lib/context/directory/handlers/connections.js.map +1 -0
  32. package/lib/context/directory/handlers/customDomains.js +21 -9
  33. package/lib/context/directory/handlers/customDomains.js.map +1 -0
  34. package/lib/context/directory/handlers/databases.js +35 -37
  35. package/lib/context/directory/handlers/databases.js.map +1 -0
  36. package/lib/context/directory/handlers/emailProvider.js +36 -22
  37. package/lib/context/directory/handlers/emailProvider.js.map +1 -0
  38. package/lib/context/directory/handlers/emailTemplates.js +29 -20
  39. package/lib/context/directory/handlers/emailTemplates.js.map +1 -0
  40. package/lib/context/directory/handlers/flowVaultConnections.js +49 -39
  41. package/lib/context/directory/handlers/flowVaultConnections.js.map +1 -0
  42. package/lib/context/directory/handlers/flows.js +48 -38
  43. package/lib/context/directory/handlers/flows.js.map +1 -0
  44. package/lib/context/directory/handlers/forms.js +48 -38
  45. package/lib/context/directory/handlers/forms.js.map +1 -0
  46. package/lib/context/directory/handlers/guardianFactorProviders.js +21 -9
  47. package/lib/context/directory/handlers/guardianFactorProviders.js.map +1 -0
  48. package/lib/context/directory/handlers/guardianFactorTemplates.js +21 -9
  49. package/lib/context/directory/handlers/guardianFactorTemplates.js.map +1 -0
  50. package/lib/context/directory/handlers/guardianFactors.js +21 -9
  51. package/lib/context/directory/handlers/guardianFactors.js.map +1 -0
  52. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +20 -8
  53. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
  54. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +20 -8
  55. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
  56. package/lib/context/directory/handlers/guardianPolicies.js +20 -8
  57. package/lib/context/directory/handlers/guardianPolicies.js.map +1 -0
  58. package/lib/context/directory/handlers/hooks.js +34 -24
  59. package/lib/context/directory/handlers/hooks.js.map +1 -0
  60. package/lib/context/directory/handlers/index.js +3 -0
  61. package/lib/context/directory/handlers/index.js.map +1 -0
  62. package/lib/context/directory/handlers/logStreams.js +24 -12
  63. package/lib/context/directory/handlers/logStreams.js.map +1 -0
  64. package/lib/context/directory/handlers/networkACLs.js +34 -22
  65. package/lib/context/directory/handlers/networkACLs.js.map +1 -0
  66. package/lib/context/directory/handlers/organizations.js +44 -39
  67. package/lib/context/directory/handlers/organizations.js.map +1 -0
  68. package/lib/context/directory/handlers/pages.js +37 -31
  69. package/lib/context/directory/handlers/pages.js.map +1 -0
  70. package/lib/context/directory/handlers/phoneProvider.js +24 -12
  71. package/lib/context/directory/handlers/phoneProvider.js.map +1 -0
  72. package/lib/context/directory/handlers/prompts.js +76 -58
  73. package/lib/context/directory/handlers/prompts.js.map +1 -0
  74. package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
  75. package/lib/context/directory/handlers/resourceServers.js +30 -18
  76. package/lib/context/directory/handlers/resourceServers.js.map +1 -0
  77. package/lib/context/directory/handlers/roles.js +31 -21
  78. package/lib/context/directory/handlers/roles.js.map +1 -0
  79. package/lib/context/directory/handlers/rules.js +32 -22
  80. package/lib/context/directory/handlers/rules.js.map +1 -0
  81. package/lib/context/directory/handlers/rulesConfigs.js +15 -3
  82. package/lib/context/directory/handlers/rulesConfigs.js.map +1 -0
  83. package/lib/context/directory/handlers/selfServiceProfiles.js +40 -28
  84. package/lib/context/directory/handlers/selfServiceProfiles.js.map +1 -0
  85. package/lib/context/directory/handlers/tenant.js +34 -14
  86. package/lib/context/directory/handlers/tenant.js.map +1 -0
  87. package/lib/context/directory/handlers/themes.js +21 -9
  88. package/lib/context/directory/handlers/themes.js.map +1 -0
  89. package/lib/context/directory/handlers/triggers.d.ts +1 -1
  90. package/lib/context/directory/handlers/triggers.js +26 -16
  91. package/lib/context/directory/handlers/triggers.js.map +1 -0
  92. package/lib/context/directory/handlers/userAttributeProfiles.d.ts +1 -1
  93. package/lib/context/directory/handlers/userAttributeProfiles.js +26 -16
  94. package/lib/context/directory/handlers/userAttributeProfiles.js.map +1 -0
  95. package/lib/context/directory/index.js +80 -66
  96. package/lib/context/directory/index.js.map +1 -0
  97. package/lib/context/index.js +20 -9
  98. package/lib/context/index.js.map +1 -0
  99. package/lib/context/yaml/handlers/actions.js +41 -39
  100. package/lib/context/yaml/handlers/actions.js.map +1 -0
  101. package/lib/context/yaml/handlers/attackProtection.js +41 -27
  102. package/lib/context/yaml/handlers/attackProtection.js.map +1 -0
  103. package/lib/context/yaml/handlers/branding.js +69 -47
  104. package/lib/context/yaml/handlers/branding.js.map +1 -0
  105. package/lib/context/yaml/handlers/clientGrants.js +40 -26
  106. package/lib/context/yaml/handlers/clientGrants.js.map +1 -0
  107. package/lib/context/yaml/handlers/clients.js +85 -41
  108. package/lib/context/yaml/handlers/clients.js.map +1 -0
  109. package/lib/context/yaml/handlers/connectionProfiles.d.ts +11 -0
  110. package/lib/context/yaml/handlers/connectionProfiles.js +44 -0
  111. package/lib/context/yaml/handlers/connectionProfiles.js.map +1 -0
  112. package/lib/context/yaml/handlers/connections.js +67 -63
  113. package/lib/context/yaml/handlers/connections.js.map +1 -0
  114. package/lib/context/yaml/handlers/customDomains.js +19 -7
  115. package/lib/context/yaml/handlers/customDomains.js.map +1 -0
  116. package/lib/context/yaml/handlers/databases.js +65 -63
  117. package/lib/context/yaml/handlers/databases.js.map +1 -0
  118. package/lib/context/yaml/handlers/emailProvider.js +37 -22
  119. package/lib/context/yaml/handlers/emailProvider.js.map +1 -0
  120. package/lib/context/yaml/handlers/emailTemplates.js +39 -28
  121. package/lib/context/yaml/handlers/emailTemplates.js.map +1 -0
  122. package/lib/context/yaml/handlers/flowVaultConnections.js +50 -36
  123. package/lib/context/yaml/handlers/flowVaultConnections.js.map +1 -0
  124. package/lib/context/yaml/handlers/flows.js +66 -55
  125. package/lib/context/yaml/handlers/flows.js.map +1 -0
  126. package/lib/context/yaml/handlers/forms.js +66 -55
  127. package/lib/context/yaml/handlers/forms.js.map +1 -0
  128. package/lib/context/yaml/handlers/guardianFactorProviders.js +19 -7
  129. package/lib/context/yaml/handlers/guardianFactorProviders.js.map +1 -0
  130. package/lib/context/yaml/handlers/guardianFactorTemplates.js +19 -7
  131. package/lib/context/yaml/handlers/guardianFactorTemplates.js.map +1 -0
  132. package/lib/context/yaml/handlers/guardianFactors.js +19 -7
  133. package/lib/context/yaml/handlers/guardianFactors.js.map +1 -0
  134. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +19 -7
  135. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
  136. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +19 -7
  137. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
  138. package/lib/context/yaml/handlers/guardianPolicies.js +19 -7
  139. package/lib/context/yaml/handlers/guardianPolicies.js.map +1 -0
  140. package/lib/context/yaml/handlers/hooks.js +48 -34
  141. package/lib/context/yaml/handlers/hooks.js.map +1 -0
  142. package/lib/context/yaml/handlers/index.js +3 -0
  143. package/lib/context/yaml/handlers/index.js.map +1 -0
  144. package/lib/context/yaml/handlers/logStreams.js +30 -16
  145. package/lib/context/yaml/handlers/logStreams.js.map +1 -0
  146. package/lib/context/yaml/handlers/networkACLs.js +39 -25
  147. package/lib/context/yaml/handlers/networkACLs.js.map +1 -0
  148. package/lib/context/yaml/handlers/organizations.js +46 -37
  149. package/lib/context/yaml/handlers/organizations.js.map +1 -0
  150. package/lib/context/yaml/handlers/pages.js +39 -31
  151. package/lib/context/yaml/handlers/pages.js.map +1 -0
  152. package/lib/context/yaml/handlers/phoneProvider.js +31 -17
  153. package/lib/context/yaml/handlers/phoneProvider.js.map +1 -0
  154. package/lib/context/yaml/handlers/prompts.js +47 -22
  155. package/lib/context/yaml/handlers/prompts.js.map +1 -0
  156. package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
  157. package/lib/context/yaml/handlers/resourceServers.js +33 -21
  158. package/lib/context/yaml/handlers/resourceServers.js.map +1 -0
  159. package/lib/context/yaml/handlers/roles.js +33 -19
  160. package/lib/context/yaml/handlers/roles.js.map +1 -0
  161. package/lib/context/yaml/handlers/rules.js +39 -28
  162. package/lib/context/yaml/handlers/rules.js.map +1 -0
  163. package/lib/context/yaml/handlers/rulesConfigs.js +28 -14
  164. package/lib/context/yaml/handlers/rulesConfigs.js.map +1 -0
  165. package/lib/context/yaml/handlers/selfServiceProfiles.js +43 -29
  166. package/lib/context/yaml/handlers/selfServiceProfiles.js.map +1 -0
  167. package/lib/context/yaml/handlers/tenant.js +41 -19
  168. package/lib/context/yaml/handlers/tenant.js.map +1 -0
  169. package/lib/context/yaml/handlers/themes.js +19 -7
  170. package/lib/context/yaml/handlers/themes.js.map +1 -0
  171. package/lib/context/yaml/handlers/triggers.d.ts +1 -1
  172. package/lib/context/yaml/handlers/triggers.js +29 -15
  173. package/lib/context/yaml/handlers/triggers.js.map +1 -0
  174. package/lib/context/yaml/handlers/userAttributeProfiles.d.ts +1 -1
  175. package/lib/context/yaml/handlers/userAttributeProfiles.js +19 -7
  176. package/lib/context/yaml/handlers/userAttributeProfiles.js.map +1 -0
  177. package/lib/context/yaml/index.js +128 -120
  178. package/lib/context/yaml/index.js.map +1 -0
  179. package/lib/index.d.ts +96 -4
  180. package/lib/index.js +34 -24
  181. package/lib/index.js.map +1 -0
  182. package/lib/keywordPreservation.d.ts +1 -1
  183. package/lib/keywordPreservation.js +6 -10
  184. package/lib/keywordPreservation.js.map +1 -0
  185. package/lib/logger.js +1 -0
  186. package/lib/logger.js.map +1 -0
  187. package/lib/readonly.js +4 -3
  188. package/lib/readonly.js.map +1 -0
  189. package/lib/sessionDurationsToMinutes.js +1 -0
  190. package/lib/sessionDurationsToMinutes.js.map +1 -0
  191. package/lib/tools/auth0/client.js +127 -108
  192. package/lib/tools/auth0/client.js.map +1 -0
  193. package/lib/tools/auth0/handlers/actions.d.ts +26 -8
  194. package/lib/tools/auth0/handlers/actions.js +149 -138
  195. package/lib/tools/auth0/handlers/actions.js.map +1 -0
  196. package/lib/tools/auth0/handlers/attackProtection.js +92 -80
  197. package/lib/tools/auth0/handlers/attackProtection.js.map +1 -0
  198. package/lib/tools/auth0/handlers/branding.js +99 -75
  199. package/lib/tools/auth0/handlers/branding.js.map +1 -0
  200. package/lib/tools/auth0/handlers/clientGrants.d.ts +9 -2
  201. package/lib/tools/auth0/handlers/clientGrants.js +72 -65
  202. package/lib/tools/auth0/handlers/clientGrants.js.map +1 -0
  203. package/lib/tools/auth0/handlers/clients.d.ts +96 -7
  204. package/lib/tools/auth0/handlers/clients.js +221 -66
  205. package/lib/tools/auth0/handlers/clients.js.map +1 -0
  206. package/lib/tools/auth0/handlers/connectionProfiles.d.ts +182 -0
  207. package/lib/tools/auth0/handlers/connectionProfiles.js +239 -0
  208. package/lib/tools/auth0/handlers/connectionProfiles.js.map +1 -0
  209. package/lib/tools/auth0/handlers/connections.d.ts +1 -3
  210. package/lib/tools/auth0/handlers/connections.js +135 -130
  211. package/lib/tools/auth0/handlers/connections.js.map +1 -0
  212. package/lib/tools/auth0/handlers/customDomains.d.ts +1 -4
  213. package/lib/tools/auth0/handlers/customDomains.js +53 -43
  214. package/lib/tools/auth0/handlers/customDomains.js.map +1 -0
  215. package/lib/tools/auth0/handlers/databases.js +114 -94
  216. package/lib/tools/auth0/handlers/databases.js.map +1 -0
  217. package/lib/tools/auth0/handlers/default.d.ts +2 -2
  218. package/lib/tools/auth0/handlers/default.js +171 -210
  219. package/lib/tools/auth0/handlers/default.js.map +1 -0
  220. package/lib/tools/auth0/handlers/emailProvider.js +52 -41
  221. package/lib/tools/auth0/handlers/emailProvider.js.map +1 -0
  222. package/lib/tools/auth0/handlers/emailTemplates.js +71 -49
  223. package/lib/tools/auth0/handlers/emailTemplates.js.map +1 -0
  224. package/lib/tools/auth0/handlers/flowVaultConnections.d.ts +12 -5
  225. package/lib/tools/auth0/handlers/flowVaultConnections.js +143 -108
  226. package/lib/tools/auth0/handlers/flowVaultConnections.js.map +1 -0
  227. package/lib/tools/auth0/handlers/flows.d.ts +3 -2
  228. package/lib/tools/auth0/handlers/flows.js +129 -92
  229. package/lib/tools/auth0/handlers/flows.js.map +1 -0
  230. package/lib/tools/auth0/handlers/forms.d.ts +3 -3
  231. package/lib/tools/auth0/handlers/forms.js +112 -98
  232. package/lib/tools/auth0/handlers/forms.js.map +1 -0
  233. package/lib/tools/auth0/handlers/guardianFactorProviders.js +84 -61
  234. package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +1 -0
  235. package/lib/tools/auth0/handlers/guardianFactorTemplates.js +68 -46
  236. package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +1 -0
  237. package/lib/tools/auth0/handlers/guardianFactors.js +45 -35
  238. package/lib/tools/auth0/handlers/guardianFactors.js.map +1 -0
  239. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +45 -29
  240. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
  241. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +45 -29
  242. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
  243. package/lib/tools/auth0/handlers/guardianPolicies.js +35 -20
  244. package/lib/tools/auth0/handlers/guardianPolicies.js.map +1 -0
  245. package/lib/tools/auth0/handlers/hooks.js +153 -123
  246. package/lib/tools/auth0/handlers/hooks.js.map +1 -0
  247. package/lib/tools/auth0/handlers/index.js +3 -0
  248. package/lib/tools/auth0/handlers/index.js.map +1 -0
  249. package/lib/tools/auth0/handlers/logStreams.js +47 -42
  250. package/lib/tools/auth0/handlers/logStreams.js.map +1 -0
  251. package/lib/tools/auth0/handlers/networkACLs.d.ts +4 -5
  252. package/lib/tools/auth0/handlers/networkACLs.js +133 -115
  253. package/lib/tools/auth0/handlers/networkACLs.js.map +1 -0
  254. package/lib/tools/auth0/handlers/organizations.d.ts +9 -10
  255. package/lib/tools/auth0/handlers/organizations.js +429 -360
  256. package/lib/tools/auth0/handlers/organizations.js.map +1 -0
  257. package/lib/tools/auth0/handlers/pages.js +83 -74
  258. package/lib/tools/auth0/handlers/pages.js.map +1 -0
  259. package/lib/tools/auth0/handlers/phoneProvider.d.ts +2 -2
  260. package/lib/tools/auth0/handlers/phoneProvider.js +82 -69
  261. package/lib/tools/auth0/handlers/phoneProvider.js.map +1 -0
  262. package/lib/tools/auth0/handlers/prompts.d.ts +5 -5
  263. package/lib/tools/auth0/handlers/prompts.js +235 -240
  264. package/lib/tools/auth0/handlers/prompts.js.map +1 -0
  265. package/lib/tools/auth0/handlers/resourceServers.d.ts +2 -3
  266. package/lib/tools/auth0/handlers/resourceServers.js +106 -57
  267. package/lib/tools/auth0/handlers/resourceServers.js.map +1 -0
  268. package/lib/tools/auth0/handlers/roles.js +178 -162
  269. package/lib/tools/auth0/handlers/roles.js.map +1 -0
  270. package/lib/tools/auth0/handlers/rules.js +162 -144
  271. package/lib/tools/auth0/handlers/rules.js.map +1 -0
  272. package/lib/tools/auth0/handlers/rulesConfigs.js +39 -30
  273. package/lib/tools/auth0/handlers/rulesConfigs.js.map +1 -0
  274. package/lib/tools/auth0/handlers/scimHandler.d.ts +3 -4
  275. package/lib/tools/auth0/handlers/scimHandler.js +132 -110
  276. package/lib/tools/auth0/handlers/scimHandler.js.map +1 -0
  277. package/lib/tools/auth0/handlers/selfServiceProfiles.d.ts +5 -13
  278. package/lib/tools/auth0/handlers/selfServiceProfiles.js +204 -170
  279. package/lib/tools/auth0/handlers/selfServiceProfiles.js.map +1 -0
  280. package/lib/tools/auth0/handlers/tenant.d.ts +3 -5
  281. package/lib/tools/auth0/handlers/tenant.js +52 -45
  282. package/lib/tools/auth0/handlers/tenant.js.map +1 -0
  283. package/lib/tools/auth0/handlers/themes.d.ts +12 -12
  284. package/lib/tools/auth0/handlers/themes.js +102 -86
  285. package/lib/tools/auth0/handlers/themes.js.map +1 -0
  286. package/lib/tools/auth0/handlers/triggers.js +75 -59
  287. package/lib/tools/auth0/handlers/triggers.js.map +1 -0
  288. package/lib/tools/auth0/handlers/userAttributeProfiles.d.ts +4 -4
  289. package/lib/tools/auth0/handlers/userAttributeProfiles.js +63 -56
  290. package/lib/tools/auth0/handlers/userAttributeProfiles.js.map +1 -0
  291. package/lib/tools/auth0/index.js +48 -35
  292. package/lib/tools/auth0/index.js.map +1 -0
  293. package/lib/tools/auth0/schema.js +4 -6
  294. package/lib/tools/auth0/schema.js.map +1 -0
  295. package/lib/tools/calculateChanges.js +15 -24
  296. package/lib/tools/calculateChanges.js.map +1 -0
  297. package/lib/tools/constants.d.ts +3 -2
  298. package/lib/tools/constants.js +2 -0
  299. package/lib/tools/constants.js.map +1 -0
  300. package/lib/tools/deploy.js +29 -17
  301. package/lib/tools/deploy.js.map +1 -0
  302. package/lib/tools/index.d.ts +89 -3
  303. package/lib/tools/index.js +2 -3
  304. package/lib/tools/index.js.map +1 -0
  305. package/lib/tools/utils.d.ts +1 -1
  306. package/lib/tools/utils.js +22 -12
  307. package/lib/tools/utils.js.map +1 -0
  308. package/lib/tools/validationError.js +1 -0
  309. package/lib/tools/validationError.js.map +1 -0
  310. package/lib/types.d.ts +8 -9
  311. package/lib/types.js +1 -0
  312. package/lib/types.js.map +1 -0
  313. package/lib/utils.d.ts +58 -3
  314. package/lib/utils.js +5 -8
  315. package/lib/utils.js.map +1 -0
  316. package/package.json +12 -13
  317. package/tsconfig.json +3 -4
  318. package/eslint.config.js +0 -130
@@ -38,6 +38,15 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  return result;
39
39
  };
40
40
  })();
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
41
50
  var __importDefault = (this && this.__importDefault) || function (mod) {
42
51
  return (mod && mod.__esModule) ? mod : { "default": mod };
43
52
  };
@@ -62,9 +71,7 @@ exports.schema = {
62
71
  properties: {
63
72
  customScripts: {
64
73
  type: 'object',
65
- properties: {
66
- ...constants_1.default.DATABASE_SCRIPTS.reduce((o, script) => ({ ...o, [script]: { type: 'string' } }), {}),
67
- },
74
+ properties: Object.assign({}, constants_1.default.DATABASE_SCRIPTS.reduce((o, script) => (Object.assign(Object.assign({}, o), { [script]: { type: 'string' } })), {})),
68
75
  },
69
76
  attributes: {
70
77
  type: 'object',
@@ -147,28 +154,30 @@ exports.schema = {
147
154
  };
148
155
  class DatabaseHandler extends default_1.default {
149
156
  constructor(config) {
150
- super({
151
- ...config,
152
- type: 'databases',
153
- stripUpdateFields: ['strategy', 'name'],
154
- });
157
+ super(Object.assign(Object.assign({}, config), { type: 'databases', stripUpdateFields: ['strategy', 'name'] }));
155
158
  }
156
159
  objString(db) {
157
160
  return super.objString({ name: db.name, id: db.id });
158
161
  }
159
- async validate(assets) {
160
- const { databases } = assets;
161
- // Do nothing if not set
162
- if (!databases)
163
- return;
164
- // Validate each database
165
- databases.forEach((database) => {
166
- this.validateEmailUniqueConstraints(database);
162
+ validate(assets) {
163
+ const _super = Object.create(null, {
164
+ validate: { get: () => super.validate }
165
+ });
166
+ return __awaiter(this, void 0, void 0, function* () {
167
+ const { databases } = assets;
168
+ // Do nothing if not set
169
+ if (!databases)
170
+ return;
171
+ // Validate each database
172
+ databases.forEach((database) => {
173
+ this.validateEmailUniqueConstraints(database);
174
+ });
175
+ yield _super.validate.call(this, assets);
167
176
  });
168
- await super.validate(assets);
169
177
  }
170
178
  validateEmailUniqueConstraints(payload) {
171
- const attributes = payload?.options?.attributes;
179
+ var _a, _b, _c, _d, _e;
180
+ const attributes = (_a = payload === null || payload === void 0 ? void 0 : payload.options) === null || _a === void 0 ? void 0 : _a.attributes;
172
181
  // Only validate if attributes are present
173
182
  if (!attributes)
174
183
  return;
@@ -176,15 +185,15 @@ class DatabaseHandler extends default_1.default {
176
185
  const usernameAttributes = attributes.username;
177
186
  const phoneAttributes = attributes.phone_number;
178
187
  // At least one identifier must always be active
179
- const hasAnyActiveIdentifier = emailAttributes?.identifier?.active === true ||
180
- usernameAttributes?.identifier?.active === true ||
181
- phoneAttributes?.identifier?.active === true;
188
+ const hasAnyActiveIdentifier = ((_b = emailAttributes === null || emailAttributes === void 0 ? void 0 : emailAttributes.identifier) === null || _b === void 0 ? void 0 : _b.active) === true ||
189
+ ((_c = usernameAttributes === null || usernameAttributes === void 0 ? void 0 : usernameAttributes.identifier) === null || _c === void 0 ? void 0 : _c.active) === true ||
190
+ ((_d = phoneAttributes === null || phoneAttributes === void 0 ? void 0 : phoneAttributes.identifier) === null || _d === void 0 ? void 0 : _d.active) === true;
182
191
  if (!hasAnyActiveIdentifier) {
183
192
  throw new Error(`Database "${payload.name}": At least one identifier must be active. Either email.identifier.active, username.identifier.active, or phone_number.identifier.active must be set to true.`);
184
193
  }
185
- if (emailAttributes?.unique === false) {
194
+ if ((emailAttributes === null || emailAttributes === void 0 ? void 0 : emailAttributes.unique) === false) {
186
195
  // When email.unique = false, email.identifier.active cannot be true
187
- if (emailAttributes?.identifier?.active === true) {
196
+ if (((_e = emailAttributes === null || emailAttributes === void 0 ? void 0 : emailAttributes.identifier) === null || _e === void 0 ? void 0 : _e.active) === true) {
188
197
  throw new Error(`Database "${payload.name}": Cannot set email.identifier.active to true when email.unique is false. Non-unique emails cannot be used as active identifiers.`);
189
198
  }
190
199
  }
@@ -196,103 +205,114 @@ class DatabaseHandler extends default_1.default {
196
205
  }
197
206
  // If we going to update database, we need to get current options first
198
207
  if (fn === 'update') {
199
- return (params, payload) => this.client.connections.get(params?.id).then((response) => {
200
- const connection = response;
201
- const attributes = payload?.options?.attributes;
202
- const requiresUsername = payload?.options?.requires_username;
203
- const validation = payload?.options?.validation;
208
+ return (params, payload) => this.client.connections.get(params).then((response) => {
209
+ var _a, _b, _c;
210
+ const connection = response.data;
211
+ const attributes = (_a = payload === null || payload === void 0 ? void 0 : payload.options) === null || _a === void 0 ? void 0 : _a.attributes;
212
+ const requiresUsername = (_b = payload === null || payload === void 0 ? void 0 : payload.options) === null || _b === void 0 ? void 0 : _b.requires_username;
213
+ const validation = (_c = payload === null || payload === void 0 ? void 0 : payload.options) === null || _c === void 0 ? void 0 : _c.validation;
204
214
  if (attributes && (requiresUsername || validation)) {
205
215
  logger_1.default.warn('Warning: "attributes" cannot be used with "requires_username" or "validation". Please remove one of the conflicting options.');
206
216
  }
207
217
  else if (attributes) {
208
- delete connection.options?.validation;
209
- delete connection.options?.requires_username;
218
+ delete connection.options.validation;
219
+ delete connection.options.requires_username;
210
220
  }
211
221
  else if (requiresUsername || validation) {
212
- delete connection.options?.attributes;
222
+ delete connection.options.attributes;
213
223
  }
214
- payload.options = { ...connection.options, ...payload.options };
224
+ payload.options = Object.assign(Object.assign({}, connection.options), payload.options);
215
225
  if (payload.options && Object.keys(payload.options).length === 0) {
216
226
  delete payload.options;
217
227
  }
218
- return this.client.connections.update(params.id, payload);
228
+ return this.client.connections.update(params, payload);
219
229
  });
220
230
  }
221
231
  return this.client.connections[fn].bind(this.client.connections);
222
232
  }
223
- async getType() {
224
- if (this.existing)
225
- return this.existing;
226
- const connections = await (0, client_1.paginate)(this.client.connections.list, {
227
- strategy: [auth0_1.Management.ConnectionStrategyEnum.Auth0],
228
- checkpoint: true,
229
- });
230
- const dbConnectionsWithEnabledClients = await Promise.all(connections.map(async (con) => {
231
- if (!con?.id)
233
+ getType() {
234
+ return __awaiter(this, void 0, void 0, function* () {
235
+ if (this.existing)
236
+ return this.existing;
237
+ const connections = yield (0, client_1.paginate)(this.client.connections.getAll, {
238
+ strategy: [auth0_1.GetConnectionsStrategyEnum.auth0],
239
+ checkpoint: true,
240
+ include_totals: true,
241
+ });
242
+ const dbConnectionsWithEnabledClients = yield Promise.all(connections.map((con) => __awaiter(this, void 0, void 0, function* () {
243
+ const enabledClients = yield (0, connections_1.getConnectionEnabledClients)(this.client, con.id);
244
+ if (enabledClients && (enabledClients === null || enabledClients === void 0 ? void 0 : enabledClients.length)) {
245
+ return Object.assign(Object.assign({}, con), { enabled_clients: enabledClients });
246
+ }
232
247
  return con;
233
- const enabledClients = await (0, connections_1.getConnectionEnabledClients)(this.client, con.id);
234
- if (enabledClients && enabledClients?.length) {
235
- return { ...con, enabled_clients: enabledClients };
248
+ })));
249
+ // If options option is empty for all connection, log the missing options scope.
250
+ const isOptionExists = dbConnectionsWithEnabledClients.every((c) => c.options && Object.keys(c.options).length > 0);
251
+ if (!isOptionExists) {
252
+ logger_1.default.warn(`Insufficient scope the read:connections_options scope is required to get ${this.type} options.`);
236
253
  }
237
- return con;
238
- }));
239
- // If options option is empty for all connection, log the missing options scope.
240
- const isOptionExists = dbConnectionsWithEnabledClients.every((c) => c.options && Object.keys(c.options).length > 0);
241
- if (!isOptionExists) {
242
- logger_1.default.warn(`Insufficient scope the read:connections_options scope is required to get ${this.type} options.`);
243
- }
244
- this.existing = dbConnectionsWithEnabledClients;
245
- return this.existing;
246
- }
247
- async calcChanges(assets) {
248
- const { databases } = assets;
249
- // Do nothing if not set
250
- if (!databases)
251
- return {
252
- del: [],
253
- create: [],
254
- update: [],
255
- conflicts: [],
256
- };
257
- // Convert enabled_clients by name to the id
258
- const clients = await (0, client_1.paginate)(this.client.clients.list, {
259
- paginate: true,
254
+ this.existing = dbConnectionsWithEnabledClients;
255
+ return this.existing;
260
256
  });
261
- const existingDatabasesConnections = await (0, client_1.paginate)(this.client.connections.list, {
262
- strategy: [auth0_1.Management.ConnectionStrategyEnum.Auth0],
263
- checkpoint: true,
264
- include_totals: true,
257
+ }
258
+ calcChanges(assets) {
259
+ const _super = Object.create(null, {
260
+ calcChanges: { get: () => super.calcChanges }
265
261
  });
266
- const formatted = databases.map((db) => {
267
- if (db.enabled_clients) {
262
+ return __awaiter(this, void 0, void 0, function* () {
263
+ const { databases } = assets;
264
+ // Do nothing if not set
265
+ if (!databases)
268
266
  return {
269
- ...db,
270
- enabled_clients: (0, utils_1.getEnabledClients)(assets, db, existingDatabasesConnections, clients),
267
+ del: [],
268
+ create: [],
269
+ update: [],
270
+ conflicts: [],
271
271
  };
272
- }
273
- return db;
272
+ // Convert enabled_clients by name to the id
273
+ const clients = yield (0, client_1.paginate)(this.client.clients.getAll, {
274
+ paginate: true,
275
+ include_totals: true,
276
+ });
277
+ const existingDatabasesConnections = yield (0, client_1.paginate)(this.client.connections.getAll, {
278
+ strategy: [auth0_1.GetConnectionsStrategyEnum.auth0],
279
+ checkpoint: true,
280
+ include_totals: true,
281
+ });
282
+ const formatted = databases.map((db) => {
283
+ if (db.enabled_clients) {
284
+ return Object.assign(Object.assign({}, db), { enabled_clients: (0, utils_1.getEnabledClients)(assets, db, existingDatabasesConnections, clients) });
285
+ }
286
+ return db;
287
+ });
288
+ return _super.calcChanges.call(this, Object.assign(Object.assign({}, assets), { databases: formatted }));
274
289
  });
275
- return super.calcChanges({ ...assets, databases: formatted });
276
290
  }
277
291
  // Run after clients are updated so we can convert all the enabled_clients names to id's
278
- async processChanges(assets) {
279
- const { databases } = assets;
280
- // Do nothing if not set
281
- if (!databases)
282
- return;
283
- // If options option is empty for all connection, log the missing options scope.
284
- const isOptionExists = databases.every((c) => c.options && Object.keys(c.options).length > 0);
285
- if (!isOptionExists) {
286
- logger_1.default.warn(`Insufficient scope the update:connections_options scope is required to update ${this.type} options.`);
287
- }
288
- const excludedConnections = (assets.exclude && assets.exclude.databases) || [];
289
- const changes = await this.calcChanges(assets);
290
- await super.processChanges(assets, (0, utils_1.filterExcluded)(changes, excludedConnections));
291
- // process enabled clients
292
- await (0, connections_1.processConnectionEnabledClients)(this.client, this.type, (0, utils_1.filterExcluded)(changes, excludedConnections));
292
+ processChanges(assets) {
293
+ const _super = Object.create(null, {
294
+ processChanges: { get: () => super.processChanges }
295
+ });
296
+ return __awaiter(this, void 0, void 0, function* () {
297
+ const { databases } = assets;
298
+ // Do nothing if not set
299
+ if (!databases)
300
+ return;
301
+ // If options option is empty for all connection, log the missing options scope.
302
+ const isOptionExists = databases.every((c) => c.options && Object.keys(c.options).length > 0);
303
+ if (!isOptionExists) {
304
+ logger_1.default.warn(`Insufficient scope the update:connections_options scope is required to update ${this.type} options.`);
305
+ }
306
+ const excludedConnections = (assets.exclude && assets.exclude.databases) || [];
307
+ const changes = yield this.calcChanges(assets);
308
+ yield _super.processChanges.call(this, assets, (0, utils_1.filterExcluded)(changes, excludedConnections));
309
+ // process enabled clients
310
+ yield (0, connections_1.processConnectionEnabledClients)(this.client, this.type, (0, utils_1.filterExcluded)(changes, excludedConnections));
311
+ });
293
312
  }
294
313
  }
295
314
  exports.default = DatabaseHandler;
296
315
  __decorate([
297
316
  (0, default_1.order)('60')
298
317
  ], DatabaseHandler.prototype, "processChanges", null);
318
+ //# sourceMappingURL=databases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"databases.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/databases.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAuE;AACvE,qDAAqD;AACrD,gEAAwC;AACxC,uCAAgE;AAEhE,sCAAqC;AACrC,6DAAkC;AAClC,+CAA6F;AAEhF,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE;YAC/D,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,aAAa,EAAE;wBACb,IAAI,EAAE,QAAQ;wBACd,UAAU,oBACL,mBAAS,CAAC,gBAAgB,CAAC,MAAM,CAClC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,iCAAM,CAAC,KAAE,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAG,EACvD,EAAE,CACH,CACF;qBACF;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,E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AAC;KAAA;IAED,wFAAwF;IAElF,cAAc,CAAC,MAAc;;;;;YACjC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;YAE7B,wBAAwB;YACxB,IAAI,CAAC,SAAS;gBAAE,OAAO;YAEvB,gFAAgF;YAChF,MAAM,cAAc,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAC9F,IAAI,CAAC,cAAc,EAAE,CAAC;gBACpB,gBAAG,CAAC,IAAI,CACN,iFAAiF,IAAI,CAAC,IAAI,WAAW,CACtG,CAAC;YACJ,CAAC;YAED,MAAM,mBAAmB,GAAa,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;YAEzF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAE/C,MAAM,OAAM,cAAc,YAAC,MAAM,EAAE,IAAA,sBAAc,EAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC;YAEjF,0BAA0B;YAC1B,MAAM,IAAA,6CAA+B,EACnC,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,IAAI,EACT,IAAA,sBAAc,EAAC,OAAO,EAAE,mBAAmB,CAAC,CAC7C,CAAC;QACJ,CAAC;KAAA;CACF;AA1MD,kCA0MC;AA3BO;IADL,IAAA,eAAK,EAAC,IAAI,CAAC;qDA2BX"}
@@ -18,7 +18,7 @@ export default class APIHandler {
18
18
  stripCreateFields: string[];
19
19
  name?: string;
20
20
  functions: {
21
- list: ApiMethodOverride;
21
+ getAll: ApiMethodOverride;
22
22
  update: ApiMethodOverride;
23
23
  create: ApiMethodOverride;
24
24
  delete: ApiMethodOverride;
@@ -34,7 +34,7 @@ export default class APIHandler {
34
34
  sensitiveFieldsToObfuscate?: APIHandler['sensitiveFieldsToObfuscate'];
35
35
  stripCreateFields?: APIHandler['stripCreateFields'];
36
36
  functions: {
37
- list?: ApiMethodOverride;
37
+ getAll?: ApiMethodOverride;
38
38
  update?: ApiMethodOverride;
39
39
  create?: ApiMethodOverride;
40
40
  delete?: ApiMethodOverride;