auth0-deploy-cli 8.20.4-beta.0 → 8.21.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 +15 -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 +85 -7
  204. package/lib/tools/auth0/handlers/clients.js +187 -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 +1 -3
  266. package/lib/tools/auth0/handlers/resourceServers.js +60 -59
  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 +6 -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 +10 -11
  317. package/tsconfig.json +3 -4
  318. package/eslint.config.js +0 -130
@@ -1,4 +1,24 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
2
22
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
24
  };
@@ -26,73 +46,76 @@ exports.schema = {
26
46
  };
27
47
  class GuardianFactorProvidersHandler extends default_1.default {
28
48
  constructor(options) {
29
- super({
30
- ...options,
31
- type: 'guardianFactorProviders',
32
- id: 'name',
49
+ super(Object.assign(Object.assign({}, options), { type: 'guardianFactorProviders', id: 'name' }));
50
+ }
51
+ getType() {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ if (this.existing)
54
+ return this.existing;
55
+ try {
56
+ const data = yield Promise.all(mappings.map((m) => __awaiter(this, void 0, void 0, function* () {
57
+ let provider;
58
+ // TODO: This is quite a change, needs to be validated for sure.
59
+ if (m.name === 'phone' && m.provider === 'twilio') {
60
+ provider = yield this.client.guardian.getPhoneFactorProviderTwilio();
61
+ }
62
+ else if (m.name === 'sms' && m.provider === 'twilio') {
63
+ provider = yield this.client.guardian.getSmsFactorProviderTwilio();
64
+ }
65
+ else if (m.name === 'push-notification' && m.provider === 'apns') {
66
+ provider = yield this.client.guardian.getPushNotificationProviderAPNS();
67
+ }
68
+ else if (m.name === 'push-notification' && m.provider === 'sns') {
69
+ provider = yield this.client.guardian.getPushNotificationProviderSNS();
70
+ }
71
+ return Object.assign(Object.assign({}, m), provider.data);
72
+ })));
73
+ // Filter out empty, should have more then 2 keys (name, provider)
74
+ return data.filter((d) => Object.keys(d).length > 2);
75
+ }
76
+ catch (err) {
77
+ if (err.statusCode === 404 || err.statusCode === 501) {
78
+ return null;
79
+ }
80
+ if ((0, utils_1.isForbiddenFeatureError)(err, this.type)) {
81
+ return null;
82
+ }
83
+ throw err;
84
+ }
33
85
  });
34
86
  }
35
- async getType() {
36
- if (this.existing)
37
- return this.existing;
38
- try {
39
- const data = await Promise.all(mappings.map(async (m) => {
40
- let provider;
41
- if (m.name === 'phone' && m.provider === 'twilio') {
42
- provider = await this.client.guardian.factors.phone.getTwilioProvider();
87
+ processChanges(assets) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ // No API to delete or create guardianFactorProviders, we can only update.
90
+ const { guardianFactorProviders } = assets;
91
+ // Do nothing if not set
92
+ if (!guardianFactorProviders || !guardianFactorProviders.length)
93
+ return;
94
+ // Process each factor
95
+ yield Promise.all(guardianFactorProviders.map((factorProvider) => __awaiter(this, void 0, void 0, function* () {
96
+ const { name, provider } = factorProvider, data = __rest(factorProvider, ["name", "provider"]);
97
+ const params = { name: factorProvider.name, provider: factorProvider.provider };
98
+ // TODO: This is quite a change, needs to be validated for sure.
99
+ if (name === 'phone' && provider === 'twilio') {
100
+ yield this.client.guardian.updatePhoneFactorProviderTwilio(data);
43
101
  }
44
- else if (m.name === 'sms' && m.provider === 'twilio') {
45
- provider = await this.client.guardian.factors.sms.getTwilioProvider();
102
+ else if (name === 'sms' && provider === 'twilio') {
103
+ yield this.client.guardian.setSmsFactorProviderTwilio(data);
46
104
  }
47
- else if (m.name === 'push-notification' && m.provider === 'apns') {
48
- provider = await this.client.guardian.factors.pushNotification.getApnsProvider();
105
+ else if (name === 'push-notification' && provider === 'apns') {
106
+ yield this.client.guardian.updatePushNotificationProviderAPNS(data);
49
107
  }
50
- else if (m.name === 'push-notification' && m.provider === 'sns') {
51
- provider = await this.client.guardian.factors.pushNotification.getSnsProvider();
108
+ else if (name === 'push-notification' && provider === 'fcm') {
109
+ yield this.client.guardian.updatePushNotificationProviderFCM(data);
52
110
  }
53
- return { ...m, ...provider.data };
54
- }));
55
- // Filter out empty, should have more then 2 keys (name, provider)
56
- return data.filter((d) => Object.keys(d).length > 2);
57
- }
58
- catch (err) {
59
- if (err.statusCode === 404 || err.statusCode === 501) {
60
- return null;
61
- }
62
- if ((0, utils_1.isForbiddenFeatureError)(err, this.type)) {
63
- return null;
64
- }
65
- throw err;
66
- }
67
- }
68
- async processChanges(assets) {
69
- // No API to delete or create guardianFactorProviders, we can only update.
70
- const { guardianFactorProviders } = assets;
71
- // Do nothing if not set
72
- if (!guardianFactorProviders || !guardianFactorProviders.length)
73
- return;
74
- // Process each factor
75
- await Promise.all(guardianFactorProviders.map(async (factorProvider) => {
76
- const { name, provider, ...data } = factorProvider;
77
- const params = { name: factorProvider.name, provider: factorProvider.provider };
78
- if (name === 'phone' && provider === 'twilio') {
79
- await this.client.guardian.factors.phone.setTwilioProvider(data);
80
- }
81
- else if (name === 'sms' && provider === 'twilio') {
82
- await this.client.guardian.factors.sms.setTwilioProvider(data);
83
- }
84
- else if (name === 'push-notification' && provider === 'apns') {
85
- await this.client.guardian.factors.pushNotification.setApnsProvider(data);
86
- }
87
- else if (name === 'push-notification' && provider === 'fcm') {
88
- await this.client.guardian.factors.pushNotification.setFcmProvider(data);
89
- }
90
- else if (name === 'push-notification' && provider === 'sns') {
91
- await this.client.guardian.factors.pushNotification.setSnsProvider(data);
92
- }
93
- this.didUpdate(params);
94
- this.updated += 1;
95
- }));
111
+ else if (name === 'push-notification' && provider === 'sns') {
112
+ yield this.client.guardian.updatePushNotificationProviderSNS(data);
113
+ }
114
+ this.didUpdate(params);
115
+ this.updated += 1;
116
+ })));
117
+ });
96
118
  }
97
119
  }
98
120
  exports.default = GuardianFactorProvidersHandler;
121
+ //# sourceMappingURL=guardianFactorProviders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guardianFactorProviders.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/guardianFactorProviders.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAuC;AACvC,gEAAwC;AAExC,uCAAsD;AAEtD,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAS,CAAC,yBAAyB,CAAC,CAAC,MAAM,CACzE,CAAC,KAA2C,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE;IACjE,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACtB,KAAK,CAAC,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AAM,CAAC,CAAC;gBACvB,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;YACpB,CAAC,CAAA,CAAC,CACH,CAAC;QACJ,CAAC;KAAA;CACF;AA5ED,iDA4EC"}
@@ -1,4 +1,24 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
2
22
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
24
  };
@@ -19,56 +39,58 @@ exports.schema = {
19
39
  };
20
40
  class GuardianFactorTemplatesHandler extends default_1.default {
21
41
  constructor(options) {
22
- super({
23
- ...options,
24
- type: 'guardianFactorTemplates',
25
- id: 'name',
26
- });
42
+ super(Object.assign(Object.assign({}, options), { type: 'guardianFactorTemplates', id: 'name' }));
27
43
  }
28
- async getType() {
29
- if (this.existing)
30
- return this.existing;
31
- try {
32
- const data = await Promise.all(constants_1.default.GUARDIAN_FACTOR_TEMPLATES.map(async (name) => {
33
- if (name === 'sms') {
34
- const templates = await this.client.guardian.factors.sms.getTemplates();
35
- return { name, ...templates };
36
- }
37
- const templates = await this.client.guardian.factors.phone.getTemplates();
38
- return { name, ...templates };
39
- }));
40
- // Filter out empty, should have more then 1 keys (name)
41
- return data.filter((d) => Object.keys(d).length > 1);
42
- }
43
- catch (err) {
44
- if (err.statusCode === 404 || err.statusCode === 501) {
45
- return null;
44
+ getType() {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ if (this.existing)
47
+ return this.existing;
48
+ try {
49
+ const data = yield Promise.all(constants_1.default.GUARDIAN_FACTOR_TEMPLATES.map((name) => __awaiter(this, void 0, void 0, function* () {
50
+ if (name === 'sms') {
51
+ const { data: templates } = yield this.client.guardian.getSmsFactorTemplates();
52
+ return Object.assign({ name }, templates);
53
+ }
54
+ const { data: templates } = yield this.client.guardian.getPhoneFactorTemplates();
55
+ return Object.assign({ name }, templates);
56
+ })));
57
+ // Filter out empty, should have more then 1 keys (name)
58
+ return data.filter((d) => Object.keys(d).length > 1);
46
59
  }
47
- if ((0, utils_1.isForbiddenFeatureError)(err, this.type)) {
48
- return null;
60
+ catch (err) {
61
+ if (err.statusCode === 404 || err.statusCode === 501) {
62
+ return null;
63
+ }
64
+ if ((0, utils_1.isForbiddenFeatureError)(err, this.type)) {
65
+ return null;
66
+ }
67
+ throw err;
49
68
  }
50
- throw err;
51
- }
69
+ });
52
70
  }
53
- async processChanges(assets) {
54
- // No API to delete or create guardianFactorTemplates, we can only update.
55
- const { guardianFactorTemplates } = assets;
56
- // Do nothing if not set
57
- if (!guardianFactorTemplates || !guardianFactorTemplates.length)
58
- return;
59
- // Process each factor templates
60
- await Promise.all(guardianFactorTemplates.map(async (fatorTemplates) => {
61
- const { name, ...data } = fatorTemplates;
62
- const params = { name: fatorTemplates.name };
63
- if (name === 'sms') {
64
- await this.client.guardian.factors.sms.setTemplates(data);
65
- }
66
- else if (name === 'phone') {
67
- await this.client.guardian.factors.phone.setTemplates(data);
68
- }
69
- this.didUpdate(params);
70
- this.updated += 1;
71
- }));
71
+ processChanges(assets) {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ // No API to delete or create guardianFactorTemplates, we can only update.
74
+ const { guardianFactorTemplates } = assets;
75
+ // Do nothing if not set
76
+ if (!guardianFactorTemplates || !guardianFactorTemplates.length)
77
+ return;
78
+ // Process each factor templates
79
+ yield Promise.all(guardianFactorTemplates.map((fatorTemplates) => __awaiter(this, void 0, void 0, function* () {
80
+ const { name } = fatorTemplates, data = __rest(fatorTemplates, ["name"]);
81
+ const params = { name: fatorTemplates.name };
82
+ // TODO: This is quite a change, needs to be validated for sure.
83
+ if (name === 'sms') {
84
+ yield this.client.guardian.setSmsFactorTemplates(data);
85
+ }
86
+ else if (name === 'phone') {
87
+ yield this.client.guardian.setPhoneFactorTemplates(data);
88
+ }
89
+ this.didUpdate(params);
90
+ this.updated += 1;
91
+ })));
92
+ });
72
93
  }
73
94
  }
74
95
  exports.default = GuardianFactorTemplatesHandler;
96
+ //# sourceMappingURL=guardianFactorTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guardianFactorTemplates.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/guardianFactorTemplates.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wDAAuC;AACvC,gEAAwC;AAExC,uCAAsD;AAEzC,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAS,CAAC,yBAAyB,EAAE;SACpE;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACF,CAAC;AAEF,MAAqB,8BAA+B,SAAQ,iBAAc;IAGxE,YAAY,OAAO;QACjB,KAAK,iCACA,OAAO,KACV,IAAI,EAAE,yBAAyB,EAC/B,EAAE,EAAE,MAAM,IACV,C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B;YACxB,IAAI,CAAC,uBAAuB,IAAI,CAAC,uBAAuB,CAAC,MAAM;gBAAE,OAAO;YAExE,gCAAgC;YAChC,MAAM,OAAO,CAAC,GAAG,CACf,uBAAuB,CAAC,GAAG,CAAC,CAAO,cAAc,EAAE,EAAE;gBACnD,MAAM,EAAE,IAAI,KAAc,cAAc,EAAvB,IAAI,UAAK,cAAc,EAAlC,QAAiB,CAAiB,CAAC;gBACzC,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,CAAC;gBAC7C,gEAAgE;gBAChE,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;oBACnB,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAwB,CAAC,CAAC;gBAC7E,CAAC;qBAAM,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;oBAC5B,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAAC,IAAwB,CAAC,CAAC;gBAC/E,CAAC;gBACD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBACvB,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;YACpB,CAAC,CAAA,CAAC,CACH,CAAC;QACJ,CAAC;KAAA;CACF;AA/DD,iDA+DC"}
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
@@ -19,45 +28,46 @@ exports.schema = {
19
28
  };
20
29
  class GuardianFactorsHandler extends default_1.default {
21
30
  constructor(options) {
22
- super({
23
- ...options,
24
- type: 'guardianFactors',
25
- id: 'name',
26
- });
31
+ super(Object.assign(Object.assign({}, options), { type: 'guardianFactors', id: 'name' }));
27
32
  }
28
- async getType() {
29
- if (this.existing)
30
- return this.existing;
31
- try {
32
- const factors = await this.client.guardian.factors.list();
33
- this.existing = factors;
34
- return this.existing;
35
- }
36
- catch (err) {
37
- if (err.statusCode === 404 || err.statusCode === 501) {
38
- return null;
33
+ getType() {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (this.existing)
36
+ return this.existing;
37
+ try {
38
+ const { data } = yield this.client.guardian.getFactors();
39
+ this.existing = data;
40
+ return this.existing;
39
41
  }
40
- if ((0, utils_1.isForbiddenFeatureError)(err, this.type)) {
41
- return null;
42
+ catch (err) {
43
+ if (err.statusCode === 404 || err.statusCode === 501) {
44
+ return null;
45
+ }
46
+ if ((0, utils_1.isForbiddenFeatureError)(err, this.type)) {
47
+ return null;
48
+ }
49
+ throw err;
42
50
  }
43
- throw err;
44
- }
51
+ });
45
52
  }
46
- async processChanges(assets) {
47
- // No API to delete or create guardianFactors, we can only update.
48
- const { guardianFactors } = assets;
49
- // Do nothing if not set
50
- if (!guardianFactors || !guardianFactors.length)
51
- return;
52
- // Process each factor
53
- await Promise.all(guardianFactors.map(async (factor) => {
54
- const data = { ...factor };
55
- const params = { name: factor.name };
56
- delete data.name;
57
- await this.client.guardian.factors.set(params.name, data);
58
- this.didUpdate(params);
59
- this.updated += 1;
60
- }));
53
+ processChanges(assets) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ // No API to delete or create guardianFactors, we can only update.
56
+ const { guardianFactors } = assets;
57
+ // Do nothing if not set
58
+ if (!guardianFactors || !guardianFactors.length)
59
+ return;
60
+ // Process each factor
61
+ yield Promise.all(guardianFactors.map((factor) => __awaiter(this, void 0, void 0, function* () {
62
+ const data = Object.assign({}, factor);
63
+ const params = { name: factor.name };
64
+ delete data.name;
65
+ yield this.client.guardian.updateFactor(params, data);
66
+ this.didUpdate(params);
67
+ this.updated += 1;
68
+ })));
69
+ });
61
70
  }
62
71
  }
63
72
  exports.default = GuardianFactorsHandler;
73
+ //# sourceMappingURL=guardianFactors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guardianFactors.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/guardianFactors.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,wDAAuC;AACvC,gEAAwC;AAExC,uCAAsD;AAEzC,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAS,CAAC,gBAAgB,EAAE;SAC3D;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACF,CAAC;AAEF,MAAqB,sBAAuB,SAAQ,iBAAc;IAGhE,YAAY,OAAuB;QACjC,KAAK,iCACA,OAAO,KACV,IAAI,EAAE,iBAAiB,EACvB,EAAE,EAAE,MAAM,IACV,CAAC;IACL,CAAC;IAEK,OAAO;;YACX,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO,IAAI,CAAC,QAAQ,CAAC;YACxC,IAAI,CAAC;gBACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;gBACzD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACrB,OAAO,IAAI,CAAC,QAAQ,CAAC;YACvB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;oBACrD,OAAO,IAAI,CAAC;gBACd,CAAC;gBACD,IAAI,IAAA,+BAAuB,EAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC5C,OAAO,IAAI,CAAC;gBACd,CAAC;gBAED,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC;KAAA;IAEK,cAAc,CAAC,MAAc;;YACjC,kEAAkE;YAClE,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;YAEnC,wBAAwB;YACxB,IAAI,CAAC,eAAe,IAAI,CAAC,eAAe,CAAC,MAAM;gBAAE,OAAO;YAExD,sBAAsB;YACtB,MAAM,OAAO,CAAC,GAAG,CACf,eAAe,CAAC,GAAG,CAAC,CAAO,MAAc,EAAE,EAAE;gBAC3C,MAAM,IAAI,qBAAQ,MAAM,CAAE,CAAC;gBAC3B,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,IAAsB,EAAE,CAAC;gBACvD,OAAO,IAAI,CAAC,IAAI,CAAC;gBACjB,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;gBACtD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBACvB,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;YACpB,CAAC,CAAA,CAAC,CACH,CAAC;QACJ,CAAC;KAAA;CACF;AAhDD,yCAgDC"}
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
@@ -37,40 +46,47 @@ const isFeatureUnavailableError = (err) => {
37
46
  };
38
47
  class GuardianPhoneMessageTypesHandler extends default_1.default {
39
48
  constructor(options) {
40
- super({
41
- ...options,
42
- type: 'guardianPhoneFactorMessageTypes',
43
- });
49
+ super(Object.assign(Object.assign({}, options), { type: 'guardianPhoneFactorMessageTypes' }));
44
50
  }
45
- async getType() {
46
- if (this.existing)
47
- return this.existing;
48
- try {
49
- const data = await this.client.guardian.factors.phone.getMessageTypes();
50
- this.existing = data;
51
- }
52
- catch (err) {
53
- if (isFeatureUnavailableError(err)) {
54
- // Gracefully skip processing this configuration value.
51
+ getType() {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ // in case client version does not support the operation
54
+ if (!this.client.guardian ||
55
+ typeof this.client.guardian.getPhoneFactorMessageTypes !== 'function') {
55
56
  return null;
56
57
  }
57
- if ((0, utils_1.isForbiddenFeatureError)(err, this.type)) {
58
- return null;
58
+ if (this.existing)
59
+ return this.existing;
60
+ try {
61
+ const { data } = yield this.client.guardian.getPhoneFactorMessageTypes();
62
+ this.existing = data;
59
63
  }
60
- throw err;
61
- }
62
- return this.existing;
64
+ catch (err) {
65
+ if (isFeatureUnavailableError(err)) {
66
+ // Gracefully skip processing this configuration value.
67
+ return null;
68
+ }
69
+ if ((0, utils_1.isForbiddenFeatureError)(err, this.type)) {
70
+ return null;
71
+ }
72
+ throw err;
73
+ }
74
+ return this.existing;
75
+ });
63
76
  }
64
- async processChanges(assets) {
65
- // No API to delete or create guardianPhoneFactorMessageTypes, we can only update.
66
- const { guardianPhoneFactorMessageTypes } = assets;
67
- // Do nothing if not set
68
- if (!guardianPhoneFactorMessageTypes || !guardianPhoneFactorMessageTypes.message_types)
69
- return;
70
- const data = guardianPhoneFactorMessageTypes;
71
- await this.client.guardian.factors.phone.setMessageTypes(data);
72
- this.updated += 1;
73
- this.didUpdate(guardianPhoneFactorMessageTypes);
77
+ processChanges(assets) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ // No API to delete or create guardianPhoneFactorMessageTypes, we can only update.
80
+ const { guardianPhoneFactorMessageTypes } = assets;
81
+ // Do nothing if not set
82
+ if (!guardianPhoneFactorMessageTypes || !guardianPhoneFactorMessageTypes.message_types)
83
+ return;
84
+ const data = guardianPhoneFactorMessageTypes;
85
+ yield this.client.guardian.updatePhoneFactorMessageTypes(data);
86
+ this.updated += 1;
87
+ this.didUpdate(guardianPhoneFactorMessageTypes);
88
+ });
74
89
  }
75
90
  }
76
91
  exports.default = GuardianPhoneMessageTypesHandler;
92
+ //# sourceMappingURL=guardianPhoneFactorMessageTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guardianPhoneFactorMessageTypes.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/guardianPhoneFactorMessageTypes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,wDAAuC;AACvC,gEAAwC;AAExC,uCAAsD;AAEzC,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,aAAa,EAAE;YACb,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,mBAAS,CAAC,4BAA4B;aAC7C;SACF;KACF;IACD,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,GAAG,EAAW,EAAE;IACjD,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;QAC3B,oEAAoE;QACpE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IACE,GAAG,CAAC,UAAU,KAAK,GAAG;QACtB,GAAG,CAAC,aAAa;QACjB,GAAG,CAAC,aAAa,CAAC,QAAQ;QAC1B,GAAG,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI;Q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+B,CAAC,aAAa;gBAAE,OAAO;YAE/F,MAAM,IAAI,GAAG,+BAA+B,CAAC;YAC7C,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,6BAA6B,CACtD,IAA6C,CAC9C,CAAC;YACF,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;YAClB,IAAI,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC;QAClD,CAAC;KAAA;CACF;AApDD,mDAoDC"}
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
@@ -34,40 +43,47 @@ const isFeatureUnavailableError = (err) => {
34
43
  };
35
44
  class GuardianPhoneSelectedProviderHandler extends default_1.default {
36
45
  constructor(options) {
37
- super({
38
- ...options,
39
- type: 'guardianPhoneFactorSelectedProvider',
40
- });
46
+ super(Object.assign(Object.assign({}, options), { type: 'guardianPhoneFactorSelectedProvider' }));
41
47
  }
42
- async getType() {
43
- if (this.existing)
44
- return this.existing;
45
- try {
46
- const data = await this.client.guardian.factors.phone.getSelectedProvider();
47
- this.existing = data;
48
- }
49
- catch (err) {
50
- if (isFeatureUnavailableError(err)) {
51
- // Gracefully skip processing this configuration value.
48
+ getType() {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ // in case client version does not support the operation
51
+ if (!this.client.guardian ||
52
+ typeof this.client.guardian.getPhoneFactorSelectedProvider !== 'function') {
52
53
  return null;
53
54
  }
54
- if ((0, utils_1.isForbiddenFeatureError)(err, this.type)) {
55
- return null;
55
+ if (this.existing)
56
+ return this.existing;
57
+ try {
58
+ const { data } = yield this.client.guardian.getPhoneFactorSelectedProvider();
59
+ this.existing = data;
56
60
  }
57
- throw err;
58
- }
59
- return this.existing;
61
+ catch (err) {
62
+ if (isFeatureUnavailableError(err)) {
63
+ // Gracefully skip processing this configuration value.
64
+ return null;
65
+ }
66
+ if ((0, utils_1.isForbiddenFeatureError)(err, this.type)) {
67
+ return null;
68
+ }
69
+ throw err;
70
+ }
71
+ return this.existing;
72
+ });
60
73
  }
61
- async processChanges(assets) {
62
- // No API to delete or create guardianPhoneFactorSelectedProvider, we can only update.
63
- const { guardianPhoneFactorSelectedProvider } = assets;
64
- // Do nothing if not set
65
- if (!guardianPhoneFactorSelectedProvider || !guardianPhoneFactorSelectedProvider.provider)
66
- return;
67
- const data = guardianPhoneFactorSelectedProvider;
68
- await this.client.guardian.factors.phone.setProvider(data);
69
- this.updated += 1;
70
- this.didUpdate(guardianPhoneFactorSelectedProvider);
74
+ processChanges(assets) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ // No API to delete or create guardianPhoneFactorSelectedProvider, we can only update.
77
+ const { guardianPhoneFactorSelectedProvider } = assets;
78
+ // Do nothing if not set
79
+ if (!guardianPhoneFactorSelectedProvider || !guardianPhoneFactorSelectedProvider.provider)
80
+ return;
81
+ const data = guardianPhoneFactorSelectedProvider;
82
+ yield this.client.guardian.updatePhoneFactorSelectedProvider(data);
83
+ this.updated += 1;
84
+ this.didUpdate(guardianPhoneFactorSelectedProvider);
85
+ });
71
86
  }
72
87
  }
73
88
  exports.default = GuardianPhoneSelectedProviderHandler;
89
+ //# sourceMappingURL=guardianPhoneFactorSelectedProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guardianPhoneFactorSelectedProvider.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers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