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.
- package/.circleci/config.yml +5 -46
- package/.eslintignore +5 -0
- package/.eslintrc +69 -0
- package/CHANGELOG.md +30 -6
- package/lib/args.js +1 -0
- package/lib/args.js.map +1 -0
- package/lib/commands/export.js +49 -41
- package/lib/commands/export.js.map +1 -0
- package/lib/commands/import.js +43 -36
- package/lib/commands/import.js.map +1 -0
- package/lib/commands/index.js +1 -0
- package/lib/commands/index.js.map +1 -0
- package/lib/configFactory.js +1 -0
- package/lib/configFactory.js.map +1 -0
- package/lib/context/defaults.js +10 -38
- package/lib/context/defaults.js.map +1 -0
- package/lib/context/directory/handlers/actions.js +39 -40
- package/lib/context/directory/handlers/actions.js.map +1 -0
- package/lib/context/directory/handlers/attackProtection.js +34 -22
- package/lib/context/directory/handlers/attackProtection.js.map +1 -0
- package/lib/context/directory/handlers/branding.js +21 -12
- package/lib/context/directory/handlers/branding.js.map +1 -0
- package/lib/context/directory/handlers/clientGrants.js +62 -52
- package/lib/context/directory/handlers/clientGrants.js.map +1 -0
- package/lib/context/directory/handlers/clients.js +60 -17
- package/lib/context/directory/handlers/clients.js.map +1 -0
- package/lib/context/directory/handlers/connectionProfiles.d.ts +11 -0
- package/lib/context/directory/handlers/connectionProfiles.js +59 -0
- package/lib/context/directory/handlers/connectionProfiles.js.map +1 -0
- package/lib/context/directory/handlers/connections.js +41 -32
- package/lib/context/directory/handlers/connections.js.map +1 -0
- package/lib/context/directory/handlers/customDomains.js +21 -9
- package/lib/context/directory/handlers/customDomains.js.map +1 -0
- package/lib/context/directory/handlers/databases.js +35 -37
- package/lib/context/directory/handlers/databases.js.map +1 -0
- package/lib/context/directory/handlers/emailProvider.js +36 -22
- package/lib/context/directory/handlers/emailProvider.js.map +1 -0
- package/lib/context/directory/handlers/emailTemplates.js +29 -20
- package/lib/context/directory/handlers/emailTemplates.js.map +1 -0
- package/lib/context/directory/handlers/flowVaultConnections.js +49 -39
- package/lib/context/directory/handlers/flowVaultConnections.js.map +1 -0
- package/lib/context/directory/handlers/flows.js +48 -38
- package/lib/context/directory/handlers/flows.js.map +1 -0
- package/lib/context/directory/handlers/forms.js +48 -38
- package/lib/context/directory/handlers/forms.js.map +1 -0
- package/lib/context/directory/handlers/guardianFactorProviders.js +21 -9
- package/lib/context/directory/handlers/guardianFactorProviders.js.map +1 -0
- package/lib/context/directory/handlers/guardianFactorTemplates.js +21 -9
- package/lib/context/directory/handlers/guardianFactorTemplates.js.map +1 -0
- package/lib/context/directory/handlers/guardianFactors.js +21 -9
- package/lib/context/directory/handlers/guardianFactors.js.map +1 -0
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +20 -8
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +20 -8
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
- package/lib/context/directory/handlers/guardianPolicies.js +20 -8
- package/lib/context/directory/handlers/guardianPolicies.js.map +1 -0
- package/lib/context/directory/handlers/hooks.js +34 -24
- package/lib/context/directory/handlers/hooks.js.map +1 -0
- package/lib/context/directory/handlers/index.js +3 -0
- package/lib/context/directory/handlers/index.js.map +1 -0
- package/lib/context/directory/handlers/logStreams.js +24 -12
- package/lib/context/directory/handlers/logStreams.js.map +1 -0
- package/lib/context/directory/handlers/networkACLs.js +34 -22
- package/lib/context/directory/handlers/networkACLs.js.map +1 -0
- package/lib/context/directory/handlers/organizations.js +44 -39
- package/lib/context/directory/handlers/organizations.js.map +1 -0
- package/lib/context/directory/handlers/pages.js +37 -31
- package/lib/context/directory/handlers/pages.js.map +1 -0
- package/lib/context/directory/handlers/phoneProvider.js +24 -12
- package/lib/context/directory/handlers/phoneProvider.js.map +1 -0
- package/lib/context/directory/handlers/prompts.js +76 -58
- package/lib/context/directory/handlers/prompts.js.map +1 -0
- package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
- package/lib/context/directory/handlers/resourceServers.js +30 -18
- package/lib/context/directory/handlers/resourceServers.js.map +1 -0
- package/lib/context/directory/handlers/roles.js +31 -21
- package/lib/context/directory/handlers/roles.js.map +1 -0
- package/lib/context/directory/handlers/rules.js +32 -22
- package/lib/context/directory/handlers/rules.js.map +1 -0
- package/lib/context/directory/handlers/rulesConfigs.js +15 -3
- package/lib/context/directory/handlers/rulesConfigs.js.map +1 -0
- package/lib/context/directory/handlers/selfServiceProfiles.js +40 -28
- package/lib/context/directory/handlers/selfServiceProfiles.js.map +1 -0
- package/lib/context/directory/handlers/tenant.js +34 -14
- package/lib/context/directory/handlers/tenant.js.map +1 -0
- package/lib/context/directory/handlers/themes.js +21 -9
- package/lib/context/directory/handlers/themes.js.map +1 -0
- package/lib/context/directory/handlers/triggers.d.ts +1 -1
- package/lib/context/directory/handlers/triggers.js +26 -16
- package/lib/context/directory/handlers/triggers.js.map +1 -0
- package/lib/context/directory/handlers/userAttributeProfiles.d.ts +1 -1
- package/lib/context/directory/handlers/userAttributeProfiles.js +26 -16
- package/lib/context/directory/handlers/userAttributeProfiles.js.map +1 -0
- package/lib/context/directory/index.js +80 -66
- package/lib/context/directory/index.js.map +1 -0
- package/lib/context/index.js +20 -9
- package/lib/context/index.js.map +1 -0
- package/lib/context/yaml/handlers/actions.js +41 -39
- package/lib/context/yaml/handlers/actions.js.map +1 -0
- package/lib/context/yaml/handlers/attackProtection.js +41 -27
- package/lib/context/yaml/handlers/attackProtection.js.map +1 -0
- package/lib/context/yaml/handlers/branding.js +69 -47
- package/lib/context/yaml/handlers/branding.js.map +1 -0
- package/lib/context/yaml/handlers/clientGrants.js +40 -26
- package/lib/context/yaml/handlers/clientGrants.js.map +1 -0
- package/lib/context/yaml/handlers/clients.js +85 -41
- package/lib/context/yaml/handlers/clients.js.map +1 -0
- package/lib/context/yaml/handlers/connectionProfiles.d.ts +11 -0
- package/lib/context/yaml/handlers/connectionProfiles.js +44 -0
- package/lib/context/yaml/handlers/connectionProfiles.js.map +1 -0
- package/lib/context/yaml/handlers/connections.js +67 -63
- package/lib/context/yaml/handlers/connections.js.map +1 -0
- package/lib/context/yaml/handlers/customDomains.js +19 -7
- package/lib/context/yaml/handlers/customDomains.js.map +1 -0
- package/lib/context/yaml/handlers/databases.js +65 -63
- package/lib/context/yaml/handlers/databases.js.map +1 -0
- package/lib/context/yaml/handlers/emailProvider.js +37 -22
- package/lib/context/yaml/handlers/emailProvider.js.map +1 -0
- package/lib/context/yaml/handlers/emailTemplates.js +39 -28
- package/lib/context/yaml/handlers/emailTemplates.js.map +1 -0
- package/lib/context/yaml/handlers/flowVaultConnections.js +50 -36
- package/lib/context/yaml/handlers/flowVaultConnections.js.map +1 -0
- package/lib/context/yaml/handlers/flows.js +66 -55
- package/lib/context/yaml/handlers/flows.js.map +1 -0
- package/lib/context/yaml/handlers/forms.js +66 -55
- package/lib/context/yaml/handlers/forms.js.map +1 -0
- package/lib/context/yaml/handlers/guardianFactorProviders.js +19 -7
- package/lib/context/yaml/handlers/guardianFactorProviders.js.map +1 -0
- package/lib/context/yaml/handlers/guardianFactorTemplates.js +19 -7
- package/lib/context/yaml/handlers/guardianFactorTemplates.js.map +1 -0
- package/lib/context/yaml/handlers/guardianFactors.js +19 -7
- package/lib/context/yaml/handlers/guardianFactors.js.map +1 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +19 -7
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +19 -7
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
- package/lib/context/yaml/handlers/guardianPolicies.js +19 -7
- package/lib/context/yaml/handlers/guardianPolicies.js.map +1 -0
- package/lib/context/yaml/handlers/hooks.js +48 -34
- package/lib/context/yaml/handlers/hooks.js.map +1 -0
- package/lib/context/yaml/handlers/index.js +3 -0
- package/lib/context/yaml/handlers/index.js.map +1 -0
- package/lib/context/yaml/handlers/logStreams.js +30 -16
- package/lib/context/yaml/handlers/logStreams.js.map +1 -0
- package/lib/context/yaml/handlers/networkACLs.js +39 -25
- package/lib/context/yaml/handlers/networkACLs.js.map +1 -0
- package/lib/context/yaml/handlers/organizations.js +46 -37
- package/lib/context/yaml/handlers/organizations.js.map +1 -0
- package/lib/context/yaml/handlers/pages.js +39 -31
- package/lib/context/yaml/handlers/pages.js.map +1 -0
- package/lib/context/yaml/handlers/phoneProvider.js +31 -17
- package/lib/context/yaml/handlers/phoneProvider.js.map +1 -0
- package/lib/context/yaml/handlers/prompts.js +47 -22
- package/lib/context/yaml/handlers/prompts.js.map +1 -0
- package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
- package/lib/context/yaml/handlers/resourceServers.js +33 -21
- package/lib/context/yaml/handlers/resourceServers.js.map +1 -0
- package/lib/context/yaml/handlers/roles.js +33 -19
- package/lib/context/yaml/handlers/roles.js.map +1 -0
- package/lib/context/yaml/handlers/rules.js +39 -28
- package/lib/context/yaml/handlers/rules.js.map +1 -0
- package/lib/context/yaml/handlers/rulesConfigs.js +28 -14
- package/lib/context/yaml/handlers/rulesConfigs.js.map +1 -0
- package/lib/context/yaml/handlers/selfServiceProfiles.js +43 -29
- package/lib/context/yaml/handlers/selfServiceProfiles.js.map +1 -0
- package/lib/context/yaml/handlers/tenant.js +41 -19
- package/lib/context/yaml/handlers/tenant.js.map +1 -0
- package/lib/context/yaml/handlers/themes.js +19 -7
- package/lib/context/yaml/handlers/themes.js.map +1 -0
- package/lib/context/yaml/handlers/triggers.d.ts +1 -1
- package/lib/context/yaml/handlers/triggers.js +29 -15
- package/lib/context/yaml/handlers/triggers.js.map +1 -0
- package/lib/context/yaml/handlers/userAttributeProfiles.d.ts +1 -1
- package/lib/context/yaml/handlers/userAttributeProfiles.js +19 -7
- package/lib/context/yaml/handlers/userAttributeProfiles.js.map +1 -0
- package/lib/context/yaml/index.js +128 -120
- package/lib/context/yaml/index.js.map +1 -0
- package/lib/index.d.ts +96 -4
- package/lib/index.js +34 -24
- package/lib/index.js.map +1 -0
- package/lib/keywordPreservation.d.ts +1 -1
- package/lib/keywordPreservation.js +6 -10
- package/lib/keywordPreservation.js.map +1 -0
- package/lib/logger.js +1 -0
- package/lib/logger.js.map +1 -0
- package/lib/readonly.js +4 -3
- package/lib/readonly.js.map +1 -0
- package/lib/sessionDurationsToMinutes.js +1 -0
- package/lib/sessionDurationsToMinutes.js.map +1 -0
- package/lib/tools/auth0/client.js +127 -108
- package/lib/tools/auth0/client.js.map +1 -0
- package/lib/tools/auth0/handlers/actions.d.ts +26 -8
- package/lib/tools/auth0/handlers/actions.js +149 -138
- package/lib/tools/auth0/handlers/actions.js.map +1 -0
- package/lib/tools/auth0/handlers/attackProtection.js +92 -80
- package/lib/tools/auth0/handlers/attackProtection.js.map +1 -0
- package/lib/tools/auth0/handlers/branding.js +99 -75
- package/lib/tools/auth0/handlers/branding.js.map +1 -0
- package/lib/tools/auth0/handlers/clientGrants.d.ts +9 -2
- package/lib/tools/auth0/handlers/clientGrants.js +72 -65
- package/lib/tools/auth0/handlers/clientGrants.js.map +1 -0
- package/lib/tools/auth0/handlers/clients.d.ts +96 -7
- package/lib/tools/auth0/handlers/clients.js +221 -66
- package/lib/tools/auth0/handlers/clients.js.map +1 -0
- package/lib/tools/auth0/handlers/connectionProfiles.d.ts +182 -0
- package/lib/tools/auth0/handlers/connectionProfiles.js +239 -0
- package/lib/tools/auth0/handlers/connectionProfiles.js.map +1 -0
- package/lib/tools/auth0/handlers/connections.d.ts +1 -3
- package/lib/tools/auth0/handlers/connections.js +135 -130
- package/lib/tools/auth0/handlers/connections.js.map +1 -0
- package/lib/tools/auth0/handlers/customDomains.d.ts +1 -4
- package/lib/tools/auth0/handlers/customDomains.js +53 -43
- package/lib/tools/auth0/handlers/customDomains.js.map +1 -0
- package/lib/tools/auth0/handlers/databases.js +114 -94
- package/lib/tools/auth0/handlers/databases.js.map +1 -0
- package/lib/tools/auth0/handlers/default.d.ts +2 -2
- package/lib/tools/auth0/handlers/default.js +171 -210
- package/lib/tools/auth0/handlers/default.js.map +1 -0
- package/lib/tools/auth0/handlers/emailProvider.js +52 -41
- package/lib/tools/auth0/handlers/emailProvider.js.map +1 -0
- package/lib/tools/auth0/handlers/emailTemplates.js +71 -49
- package/lib/tools/auth0/handlers/emailTemplates.js.map +1 -0
- package/lib/tools/auth0/handlers/flowVaultConnections.d.ts +12 -5
- package/lib/tools/auth0/handlers/flowVaultConnections.js +143 -108
- package/lib/tools/auth0/handlers/flowVaultConnections.js.map +1 -0
- package/lib/tools/auth0/handlers/flows.d.ts +3 -2
- package/lib/tools/auth0/handlers/flows.js +129 -92
- package/lib/tools/auth0/handlers/flows.js.map +1 -0
- package/lib/tools/auth0/handlers/forms.d.ts +3 -3
- package/lib/tools/auth0/handlers/forms.js +112 -98
- package/lib/tools/auth0/handlers/forms.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianFactorProviders.js +84 -61
- package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +68 -46
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianFactors.js +45 -35
- package/lib/tools/auth0/handlers/guardianFactors.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +45 -29
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +45 -29
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianPolicies.js +35 -20
- package/lib/tools/auth0/handlers/guardianPolicies.js.map +1 -0
- package/lib/tools/auth0/handlers/hooks.js +153 -123
- package/lib/tools/auth0/handlers/hooks.js.map +1 -0
- package/lib/tools/auth0/handlers/index.js +3 -0
- package/lib/tools/auth0/handlers/index.js.map +1 -0
- package/lib/tools/auth0/handlers/logStreams.js +47 -42
- package/lib/tools/auth0/handlers/logStreams.js.map +1 -0
- package/lib/tools/auth0/handlers/networkACLs.d.ts +4 -5
- package/lib/tools/auth0/handlers/networkACLs.js +133 -115
- package/lib/tools/auth0/handlers/networkACLs.js.map +1 -0
- package/lib/tools/auth0/handlers/organizations.d.ts +9 -10
- package/lib/tools/auth0/handlers/organizations.js +429 -360
- package/lib/tools/auth0/handlers/organizations.js.map +1 -0
- package/lib/tools/auth0/handlers/pages.js +83 -74
- package/lib/tools/auth0/handlers/pages.js.map +1 -0
- package/lib/tools/auth0/handlers/phoneProvider.d.ts +2 -2
- package/lib/tools/auth0/handlers/phoneProvider.js +82 -69
- package/lib/tools/auth0/handlers/phoneProvider.js.map +1 -0
- package/lib/tools/auth0/handlers/prompts.d.ts +5 -5
- package/lib/tools/auth0/handlers/prompts.js +235 -240
- package/lib/tools/auth0/handlers/prompts.js.map +1 -0
- package/lib/tools/auth0/handlers/resourceServers.d.ts +2 -3
- package/lib/tools/auth0/handlers/resourceServers.js +106 -57
- package/lib/tools/auth0/handlers/resourceServers.js.map +1 -0
- package/lib/tools/auth0/handlers/roles.js +178 -162
- package/lib/tools/auth0/handlers/roles.js.map +1 -0
- package/lib/tools/auth0/handlers/rules.js +162 -144
- package/lib/tools/auth0/handlers/rules.js.map +1 -0
- package/lib/tools/auth0/handlers/rulesConfigs.js +39 -30
- package/lib/tools/auth0/handlers/rulesConfigs.js.map +1 -0
- package/lib/tools/auth0/handlers/scimHandler.d.ts +3 -4
- package/lib/tools/auth0/handlers/scimHandler.js +132 -110
- package/lib/tools/auth0/handlers/scimHandler.js.map +1 -0
- package/lib/tools/auth0/handlers/selfServiceProfiles.d.ts +5 -13
- package/lib/tools/auth0/handlers/selfServiceProfiles.js +204 -170
- package/lib/tools/auth0/handlers/selfServiceProfiles.js.map +1 -0
- package/lib/tools/auth0/handlers/tenant.d.ts +3 -5
- package/lib/tools/auth0/handlers/tenant.js +52 -45
- package/lib/tools/auth0/handlers/tenant.js.map +1 -0
- package/lib/tools/auth0/handlers/themes.d.ts +12 -12
- package/lib/tools/auth0/handlers/themes.js +102 -86
- package/lib/tools/auth0/handlers/themes.js.map +1 -0
- package/lib/tools/auth0/handlers/triggers.js +75 -59
- package/lib/tools/auth0/handlers/triggers.js.map +1 -0
- package/lib/tools/auth0/handlers/userAttributeProfiles.d.ts +4 -4
- package/lib/tools/auth0/handlers/userAttributeProfiles.js +63 -56
- package/lib/tools/auth0/handlers/userAttributeProfiles.js.map +1 -0
- package/lib/tools/auth0/index.js +48 -35
- package/lib/tools/auth0/index.js.map +1 -0
- package/lib/tools/auth0/schema.js +4 -6
- package/lib/tools/auth0/schema.js.map +1 -0
- package/lib/tools/calculateChanges.js +15 -24
- package/lib/tools/calculateChanges.js.map +1 -0
- package/lib/tools/constants.d.ts +3 -2
- package/lib/tools/constants.js +2 -0
- package/lib/tools/constants.js.map +1 -0
- package/lib/tools/deploy.js +29 -17
- package/lib/tools/deploy.js.map +1 -0
- package/lib/tools/index.d.ts +89 -3
- package/lib/tools/index.js +2 -3
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/utils.d.ts +1 -1
- package/lib/tools/utils.js +22 -12
- package/lib/tools/utils.js.map +1 -0
- package/lib/tools/validationError.js +1 -0
- package/lib/tools/validationError.js.map +1 -0
- package/lib/types.d.ts +8 -9
- package/lib/types.js +1 -0
- package/lib/types.js.map +1 -0
- package/lib/utils.d.ts +58 -3
- package/lib/utils.js +5 -8
- package/lib/utils.js.map +1 -0
- package/package.json +12 -13
- package/tsconfig.json +3 -4
- 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
|
};
|
|
@@ -14,121 +34,122 @@ const API_CONCURRENCY = 3;
|
|
|
14
34
|
const API_FREQUENCY_PER_SECOND = 8;
|
|
15
35
|
const MAX_PAGE_SIZE = 100;
|
|
16
36
|
function getEntity(rsp) {
|
|
17
|
-
//
|
|
37
|
+
// Extract all array values from the response object
|
|
38
|
+
const found = Object.values(rsp).filter((a) => Array.isArray(a));
|
|
39
|
+
// If response contains exactly one array property, return it as the entity list
|
|
40
|
+
if (Array.isArray(found) && found.length === 1) {
|
|
41
|
+
return found[0];
|
|
42
|
+
}
|
|
43
|
+
// If the response itself is an array, return it directly
|
|
18
44
|
if (Array.isArray(rsp)) {
|
|
19
45
|
return rsp;
|
|
20
46
|
}
|
|
21
|
-
// If
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
if (found.length === 1) {
|
|
25
|
-
return found[0];
|
|
26
|
-
}
|
|
27
|
-
// If we can't find exactly one array, but there's a property that looks like it contains the data
|
|
28
|
-
// Try some common property names from Auth0 SDK v5
|
|
29
|
-
if ('data' in rsp && Array.isArray(rsp.data)) {
|
|
30
|
-
return rsp.data;
|
|
31
|
-
}
|
|
32
|
-
// Handle empty response case - return empty array instead of throwing error
|
|
33
|
-
if (Array.isArray(found) && found.length === 0) {
|
|
34
|
-
return [];
|
|
35
|
-
}
|
|
47
|
+
// If empty response case - return empty array instead of throwing error
|
|
48
|
+
if (Array.isArray(found) && found.length === 0) {
|
|
49
|
+
return [];
|
|
36
50
|
}
|
|
37
51
|
throw new Error('There was an error trying to find the entity within paginate');
|
|
38
52
|
}
|
|
39
53
|
function checkpointPaginator(client, target, name) {
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.
|
|
48
|
-
data: newArgs,
|
|
49
|
-
generator: (requestArgs) => target[name](requestArgs),
|
|
50
|
-
})
|
|
51
|
-
.promise();
|
|
52
|
-
// Add first page data
|
|
53
|
-
data.push(...(currentPage.data || []));
|
|
54
|
-
// Continue fetching while there are more pages
|
|
55
|
-
while (currentPage.hasNextPage && currentPage.hasNextPage()) {
|
|
56
|
-
const pageToFetch = currentPage; // Capture the current page reference
|
|
57
|
-
currentPage = await client.pool
|
|
54
|
+
return function (...args) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
const data = [];
|
|
58
|
+
// remove the _checkpoint_ flag
|
|
59
|
+
const _c = lodash_1.default.cloneDeep(args[0]), { checkpoint } = _c, newArgs = __rest(_c, ["checkpoint"]);
|
|
60
|
+
// fetch the total to validate records match
|
|
61
|
+
const total = ((_a = (yield client.pool
|
|
58
62
|
.addSingleTask({
|
|
59
|
-
data:
|
|
60
|
-
generator: () =>
|
|
63
|
+
data: newArgs,
|
|
64
|
+
generator: (requestArgs) => target[name](requestArgs),
|
|
61
65
|
})
|
|
62
|
-
.promise();
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
.promise()).data) === null || _a === void 0 ? void 0 : _a.total) || 0;
|
|
67
|
+
let done = false;
|
|
68
|
+
// use checkpoint pagination to allow fetching 1000+ results
|
|
69
|
+
newArgs.take = (_b = newArgs.take) !== null && _b !== void 0 ? _b : 50;
|
|
70
|
+
while (!done) {
|
|
71
|
+
const rsp = yield client.pool
|
|
72
|
+
.addSingleTask({
|
|
73
|
+
data: newArgs,
|
|
74
|
+
generator: (requestArgs) => target[name](requestArgs),
|
|
75
|
+
})
|
|
76
|
+
.promise();
|
|
77
|
+
data.push(...getEntity(rsp.data));
|
|
78
|
+
if (!rsp.data.next) {
|
|
79
|
+
done = true;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
newArgs.from = rsp.data.next;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// Not all entities return total, so only validate when we have a total
|
|
86
|
+
if (total > 0 && data.length !== total) {
|
|
87
|
+
throw new Error('Fail to load data from tenant');
|
|
88
|
+
}
|
|
89
|
+
return data;
|
|
90
|
+
});
|
|
66
91
|
};
|
|
67
92
|
}
|
|
68
93
|
function pagePaginator(client, target, name) {
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
data.push(...getEntity(rsp.data));
|
|
87
|
-
// In Auth0 SDK v5, the total is not provided
|
|
88
|
-
const total = rsp.response?.total || 0;
|
|
89
|
-
// If total is 0 but we have data, it likely means the response doesn't include pagination info
|
|
90
|
-
// In this case, we should assume this is all the data and skip pagination
|
|
91
|
-
const initialDataLength = getEntity(rsp.data).length;
|
|
92
|
-
if (total === 0 && initialDataLength > 0) {
|
|
93
|
-
return data; // Return what we have without pagination
|
|
94
|
-
}
|
|
95
|
-
const pagesLeft = Math.ceil(total / perPage) - 1;
|
|
96
|
-
// Setup pool to get the rest of the pages
|
|
97
|
-
if (pagesLeft > 0) {
|
|
98
|
-
const pages = await client.pool
|
|
99
|
-
.addEachTask({
|
|
100
|
-
data: Array.from(Array(pagesLeft).keys()),
|
|
101
|
-
generator: (page) => {
|
|
102
|
-
const pageArgs = lodash_1.default.cloneDeep(newArgs);
|
|
103
|
-
pageArgs[0].page = page + 1;
|
|
104
|
-
return target[name](...pageArgs).then((r) => getEntity(r.data));
|
|
105
|
-
},
|
|
94
|
+
return function (...args) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
var _a;
|
|
97
|
+
// Where the entity data will be collected
|
|
98
|
+
const data = [];
|
|
99
|
+
// Create new args and inject the properties we require for pagination automation
|
|
100
|
+
const newArgs = [...args];
|
|
101
|
+
newArgs[0] = Object.assign(Object.assign({}, newArgs[0]), { page: 0 });
|
|
102
|
+
// Grab data we need from the request then delete the keys as they are only needed for this automation function to work
|
|
103
|
+
const perPage = newArgs[0].per_page || MAX_PAGE_SIZE;
|
|
104
|
+
newArgs[0].per_page = perPage;
|
|
105
|
+
delete newArgs[0].paginate;
|
|
106
|
+
// Run the first request to get the total number of entity items
|
|
107
|
+
const rsp = yield client.pool
|
|
108
|
+
.addSingleTask({
|
|
109
|
+
data: lodash_1.default.cloneDeep(newArgs),
|
|
110
|
+
generator: (pageArgs) => target[name](...pageArgs),
|
|
106
111
|
})
|
|
107
112
|
.promise();
|
|
108
|
-
data.push(...(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
data.push(...getEntity(rsp.data));
|
|
114
|
+
const total = ((_a = rsp.data) === null || _a === void 0 ? void 0 : _a.total) || 0;
|
|
115
|
+
const pagesLeft = Math.ceil(total / perPage) - 1;
|
|
116
|
+
// Setup pool to get the rest of the pages
|
|
117
|
+
if (pagesLeft > 0) {
|
|
118
|
+
const pages = yield client.pool
|
|
119
|
+
.addEachTask({
|
|
120
|
+
data: Array.from(Array(pagesLeft).keys()),
|
|
121
|
+
generator: (page) => {
|
|
122
|
+
const pageArgs = lodash_1.default.cloneDeep(newArgs);
|
|
123
|
+
pageArgs[0].page = page + 1;
|
|
124
|
+
return target[name](...pageArgs).then((r) => getEntity(r.data));
|
|
125
|
+
},
|
|
126
|
+
})
|
|
127
|
+
.promise();
|
|
128
|
+
data.push(...(0, utils_1.flatten)(pages));
|
|
129
|
+
if (data.length !== total) {
|
|
130
|
+
throw new Error('Fail to load data from tenant');
|
|
131
|
+
}
|
|
113
132
|
}
|
|
114
|
-
|
|
115
|
-
|
|
133
|
+
return data;
|
|
134
|
+
});
|
|
116
135
|
};
|
|
117
136
|
}
|
|
118
137
|
// Warp around a <resource>Manager and detect when requesting specific pages to return all
|
|
119
138
|
function pagedManager(client, manager) {
|
|
120
139
|
return new Proxy(manager, {
|
|
121
140
|
get: function (target, name, receiver) {
|
|
122
|
-
if (name === '
|
|
123
|
-
return
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
141
|
+
if (name === 'getAll') {
|
|
142
|
+
return function (...args) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
switch (true) {
|
|
145
|
+
case args[0] && typeof args[0] === 'object' && args[0].checkpoint:
|
|
146
|
+
return checkpointPaginator(client, target, name)(...args);
|
|
147
|
+
case args[0] && typeof args[0] === 'object' && args[0].paginate:
|
|
148
|
+
return pagePaginator(client, target, name)(...args);
|
|
149
|
+
default:
|
|
150
|
+
return target[name](...args);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
132
153
|
};
|
|
133
154
|
}
|
|
134
155
|
const nestedManager = Reflect.get(target, name, receiver);
|
|
@@ -141,21 +162,19 @@ function pagedManager(client, manager) {
|
|
|
141
162
|
}
|
|
142
163
|
// Warp around the ManagementClient and detect when requesting specific pages to return all
|
|
143
164
|
function pagedClient(client) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
clientWithPooling.pool = new promise_pool_executor_1.PromisePoolExecutor({
|
|
150
|
-
concurrencyLimit: API_CONCURRENCY,
|
|
151
|
-
frequencyLimit: API_FREQUENCY_PER_SECOND,
|
|
152
|
-
frequencyWindow: 1000, // 1 sec
|
|
153
|
-
});
|
|
165
|
+
const clientWithPooling = Object.assign(Object.assign({}, client), { pool: new promise_pool_executor_1.PromisePoolExecutor({
|
|
166
|
+
concurrencyLimit: API_CONCURRENCY,
|
|
167
|
+
frequencyLimit: API_FREQUENCY_PER_SECOND,
|
|
168
|
+
frequencyWindow: 1000, // 1 sec
|
|
169
|
+
}) });
|
|
154
170
|
return pagedManager(clientWithPooling, clientWithPooling);
|
|
155
171
|
}
|
|
156
172
|
// eslint-disable-next-line no-unused-vars
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
173
|
+
function paginate(fetchFunc, args) {
|
|
174
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
// override default <T>.getAll() behaviour using pagedClient
|
|
176
|
+
const allItems = (yield fetchFunc(args));
|
|
177
|
+
return allItems;
|
|
178
|
+
});
|
|
161
179
|
}
|
|
180
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/tools/auth0/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkLA,8BAWC;AAGD,4BAOC;AAvMD,iEAA4D;AAC5D,oDAAuB;AAGvB,oCAAmC;AASnC,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,8FAA8F;AAC9F,gEAAgE;AA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AC,CAAC,GAAG,IAAI,CAAC,CAAC;wBACjC,CAAC;oBACH,CAAC;iBAAA,CAAC;YACJ,CAAC;YAED,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YAE1D,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;gBAChE,OAAO,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;YAC7C,CAAC;YAED,OAAO,aAAa,CAAC;QACvB,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,2FAA2F;AAC3F,SAAwB,WAAW,CAAC,MAAwB;IAC1D,MAAM,iBAAiB,GAAmB,gCACrC,MAAM,KACT,IAAI,EAAE,IAAI,2CAAmB,CAAC;YAC5B,gBAAgB,EAAE,eAAe;YACjC,cAAc,EAAE,wBAAwB;YACxC,eAAe,EAAE,IAAI,EAAE,QAAQ;SAChC,CAAC,GACe,CAAC;IAEpB,OAAO,YAAY,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;AAC5D,CAAC;AAED,0CAA0C;AAC1C,SAAsB,QAAQ,CAC5B,SAAwC,EACxC,IAAuD;;QAEvD,4DAA4D;QAC5D,MAAM,QAAQ,GAAG,CAAC,MAAM,SAAS,CAAC,IAAI,CAAC,CAAmB,CAAC;QAC3D,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA"}
|
|
@@ -1,11 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetActions200ResponseActionsInner, PostActionRequest } from 'auth0';
|
|
2
2
|
import DefaultAPIHandler from './default';
|
|
3
3
|
import { Asset, Assets } from '../../../types';
|
|
4
|
-
export type Action =
|
|
4
|
+
export type Action = {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
created_at: string;
|
|
8
|
+
updated_at: string;
|
|
5
9
|
deployed?: boolean;
|
|
10
|
+
supported_triggers: {
|
|
11
|
+
id: string;
|
|
12
|
+
version: string;
|
|
13
|
+
status?: string;
|
|
14
|
+
}[];
|
|
15
|
+
code?: string;
|
|
16
|
+
dependencies?: [];
|
|
17
|
+
runtime?: string;
|
|
18
|
+
status?: string;
|
|
19
|
+
secrets?: {
|
|
20
|
+
name: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}[];
|
|
23
|
+
all_changes_deployed?: boolean;
|
|
24
|
+
installed_integration_id?: string;
|
|
25
|
+
integration?: Object;
|
|
6
26
|
};
|
|
7
|
-
type
|
|
8
|
-
type CreateActionRequestWithId = ActionCreate & {
|
|
27
|
+
type PostActionRequestWithId = PostActionRequest & {
|
|
9
28
|
id: string;
|
|
10
29
|
};
|
|
11
30
|
export declare const schema: {
|
|
@@ -91,11 +110,10 @@ export declare const schema: {
|
|
|
91
110
|
};
|
|
92
111
|
export declare function isMarketplaceAction(action: Action): boolean;
|
|
93
112
|
export default class ActionHandler extends DefaultAPIHandler {
|
|
94
|
-
existing:
|
|
113
|
+
existing: GetActions200ResponseActionsInner[] | null;
|
|
95
114
|
constructor(options: DefaultAPIHandler);
|
|
96
|
-
createAction(action:
|
|
97
|
-
|
|
98
|
-
deleteAction(actionId: string): Promise<void | never[]>;
|
|
115
|
+
createAction(action: PostActionRequestWithId): Promise<GetActions200ResponseActionsInner>;
|
|
116
|
+
deleteAction(action: Action): Promise<never[] | import("auth0").ApiResponse<void>>;
|
|
99
117
|
objString(action: any): string;
|
|
100
118
|
deployActions(actions: any): Promise<void>;
|
|
101
119
|
deployAction(action: any): Promise<void>;
|