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.
- package/.circleci/config.yml +5 -46
- package/.eslintignore +5 -0
- package/.eslintrc +69 -0
- package/CHANGELOG.md +15 -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 +85 -7
- package/lib/tools/auth0/handlers/clients.js +187 -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 +1 -3
- package/lib/tools/auth0/handlers/resourceServers.js +60 -59
- 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 +6 -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 +10 -11
- package/tsconfig.json +3 -4
- package/eslint.config.js +0 -130
|
@@ -38,13 +38,22 @@ 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
|
};
|
|
44
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
54
|
exports.processConnectionEnabledClients = exports.updateConnectionEnabledClients = exports.getConnectionEnabledClients = exports.addExcludedConnectionPropertiesToChanges = exports.schema = void 0;
|
|
46
55
|
const dot_prop_1 = __importDefault(require("dot-prop"));
|
|
47
|
-
const lodash_1 = require("lodash");
|
|
56
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
48
57
|
const auth0_1 = require("auth0");
|
|
49
58
|
const default_1 = __importStar(require("./default"));
|
|
50
59
|
const utils_1 = require("../../utils");
|
|
@@ -102,13 +111,14 @@ exports.schema = {
|
|
|
102
111
|
// This use case is common because organizations may not want to expose sensitive connection details, but want to preserve them in the tenant.
|
|
103
112
|
// exported only for unit testing purposes
|
|
104
113
|
const addExcludedConnectionPropertiesToChanges = ({ proposedChanges, existingConnections, config, }) => {
|
|
114
|
+
var _a, _b;
|
|
105
115
|
if (proposedChanges.update.length === 0)
|
|
106
116
|
return proposedChanges;
|
|
107
|
-
|
|
108
|
-
const excludedFields = config()
|
|
117
|
+
//@ts-ignore because this expects a parameter to be passed
|
|
118
|
+
const excludedFields = ((_b = (_a = config()) === null || _a === void 0 ? void 0 : _a.EXCLUDED_PROPS) === null || _b === void 0 ? void 0 : _b.connections) || [];
|
|
109
119
|
if (excludedFields.length === 0)
|
|
110
120
|
return proposedChanges;
|
|
111
|
-
const existingConnectionsMap =
|
|
121
|
+
const existingConnectionsMap = lodash_1.default.keyBy(existingConnections, 'id');
|
|
112
122
|
const excludedOptions = excludedFields.filter(
|
|
113
123
|
// Only include fields that pertain to options
|
|
114
124
|
(excludedField) => excludedField.startsWith('options'));
|
|
@@ -123,18 +133,9 @@ const addExcludedConnectionPropertiesToChanges = ({ proposedChanges, existingCon
|
|
|
123
133
|
}, {
|
|
124
134
|
options: {},
|
|
125
135
|
});
|
|
126
|
-
return {
|
|
127
|
-
...proposedConnection,
|
|
128
|
-
options: {
|
|
129
|
-
...proposedConnection.options,
|
|
130
|
-
...currentExcludedPropertyValues.options,
|
|
131
|
-
},
|
|
132
|
-
};
|
|
136
|
+
return Object.assign(Object.assign({}, proposedConnection), { options: Object.assign(Object.assign({}, proposedConnection.options), currentExcludedPropertyValues.options) });
|
|
133
137
|
});
|
|
134
|
-
return {
|
|
135
|
-
...proposedChanges,
|
|
136
|
-
update: newProposedUpdates,
|
|
137
|
-
};
|
|
138
|
+
return Object.assign(Object.assign({}, proposedChanges), { update: newProposedUpdates });
|
|
138
139
|
};
|
|
139
140
|
exports.addExcludedConnectionPropertiesToChanges = addExcludedConnectionPropertiesToChanges;
|
|
140
141
|
/**
|
|
@@ -143,28 +144,32 @@ exports.addExcludedConnectionPropertiesToChanges = addExcludedConnectionProperti
|
|
|
143
144
|
* @param connectionId - The unique identifier of the connection to fetch enabled clients for
|
|
144
145
|
* @returns A promise that resolves to an array of client IDs, or null if connectionId is empty or an error occurs
|
|
145
146
|
*/
|
|
146
|
-
const getConnectionEnabledClients =
|
|
147
|
+
const getConnectionEnabledClients = (auth0Client, connectionId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
147
148
|
if (!connectionId)
|
|
148
149
|
return null;
|
|
149
150
|
try {
|
|
150
151
|
const enabledClientsFormatted = [];
|
|
151
|
-
let
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
let from;
|
|
153
|
+
let hasMore = true;
|
|
154
|
+
while (hasMore) {
|
|
155
|
+
const response = yield auth0Client.connections.getEnabledClients(Object.assign({ id: connectionId, take: 50 }, (from && { from })));
|
|
156
|
+
const { clients: enabledClients, next } = (response === null || response === void 0 ? void 0 : response.data) || {};
|
|
157
|
+
if (enabledClients === null || enabledClients === void 0 ? void 0 : enabledClients.length) {
|
|
158
|
+
enabledClients.forEach((client) => {
|
|
159
|
+
if (client === null || client === void 0 ? void 0 : client.client_id) {
|
|
156
160
|
enabledClientsFormatted.push(client.client_id);
|
|
157
161
|
}
|
|
158
162
|
});
|
|
159
163
|
}
|
|
160
|
-
|
|
161
|
-
|
|
164
|
+
hasMore = !!next;
|
|
165
|
+
from = next;
|
|
166
|
+
}
|
|
162
167
|
return enabledClientsFormatted;
|
|
163
168
|
}
|
|
164
169
|
catch (error) {
|
|
165
170
|
return null;
|
|
166
171
|
}
|
|
167
|
-
};
|
|
172
|
+
});
|
|
168
173
|
exports.getConnectionEnabledClients = getConnectionEnabledClients;
|
|
169
174
|
/**
|
|
170
175
|
* Updates the enabled clients for a specific Auth0 connection.
|
|
@@ -176,16 +181,18 @@ exports.getConnectionEnabledClients = getConnectionEnabledClients;
|
|
|
176
181
|
* @returns Promise that resolves to true if the update was successful, false otherwise
|
|
177
182
|
*
|
|
178
183
|
*/
|
|
179
|
-
const updateConnectionEnabledClients =
|
|
184
|
+
const updateConnectionEnabledClients = (auth0Client, typeName, connectionId, enabledClientIds) => __awaiter(void 0, void 0, void 0, function* () {
|
|
180
185
|
if (!connectionId || !Array.isArray(enabledClientIds) || !enabledClientIds.length)
|
|
181
186
|
return false;
|
|
182
187
|
const enabledClientUpdatePayloads = enabledClientIds.map((clientId) => ({
|
|
183
188
|
client_id: clientId,
|
|
184
189
|
status: true,
|
|
185
190
|
}));
|
|
186
|
-
const payloadChunks =
|
|
191
|
+
const payloadChunks = lodash_1.default.chunk(enabledClientUpdatePayloads, 50);
|
|
187
192
|
try {
|
|
188
|
-
|
|
193
|
+
yield Promise.all(payloadChunks.map((payload) => auth0Client.connections.updateEnabledClients({
|
|
194
|
+
id: connectionId,
|
|
195
|
+
}, payload)));
|
|
189
196
|
logger_1.default.debug(`Updated enabled clients for ${typeName}: ${connectionId}`);
|
|
190
197
|
return true;
|
|
191
198
|
}
|
|
@@ -193,7 +200,7 @@ const updateConnectionEnabledClients = async (auth0Client, typeName, connectionI
|
|
|
193
200
|
logger_1.default.error(`Unable to update enabled clients for ${typeName}: ${connectionId}:`, error);
|
|
194
201
|
return false;
|
|
195
202
|
}
|
|
196
|
-
};
|
|
203
|
+
});
|
|
197
204
|
exports.updateConnectionEnabledClients = updateConnectionEnabledClients;
|
|
198
205
|
/**
|
|
199
206
|
* This function processes enabled clients for create, update, and conflict operations.
|
|
@@ -206,64 +213,60 @@ exports.updateConnectionEnabledClients = updateConnectionEnabledClients;
|
|
|
206
213
|
*
|
|
207
214
|
* @returns A Promise that resolves when all enabled client updates are complete
|
|
208
215
|
*/
|
|
209
|
-
const processConnectionEnabledClients =
|
|
210
|
-
)
|
|
216
|
+
const processConnectionEnabledClients = (auth0Client_1, typeName_1, changes_1, ...args_1) => __awaiter(void 0, [auth0Client_1, typeName_1, changes_1, ...args_1], void 0, function* (auth0Client, typeName, changes, delayMs = 2500 // Default delay is 2.5 seconds
|
|
217
|
+
) {
|
|
211
218
|
const { create, update, conflicts } = changes;
|
|
212
219
|
let createWithId = [];
|
|
213
220
|
if (create.length) {
|
|
214
|
-
|
|
215
|
-
createWithId =
|
|
221
|
+
yield (0, utils_1.sleep)(delayMs); // Wait for the configured duration before fetching new connections
|
|
222
|
+
createWithId = yield Promise.all(create.map((conn) => __awaiter(void 0, void 0, void 0, function* () {
|
|
223
|
+
var _a;
|
|
216
224
|
let newConnections;
|
|
217
225
|
if (typeName === 'database') {
|
|
218
|
-
const { data: connections } =
|
|
226
|
+
const { data: { connections }, } = yield auth0Client.connections.getAll({
|
|
219
227
|
name: conn.name,
|
|
220
228
|
take: 1,
|
|
221
|
-
strategy: [auth0_1.
|
|
222
|
-
|
|
229
|
+
strategy: [auth0_1.GetConnectionsStrategyEnum.auth0],
|
|
230
|
+
include_totals: true,
|
|
223
231
|
});
|
|
224
232
|
newConnections = connections;
|
|
225
233
|
}
|
|
226
234
|
else {
|
|
227
|
-
const { data: connections } =
|
|
235
|
+
const { data: { connections }, } = yield auth0Client.connections.getAll({
|
|
228
236
|
name: conn.name,
|
|
229
237
|
take: 1,
|
|
230
|
-
|
|
238
|
+
include_totals: true,
|
|
231
239
|
});
|
|
232
240
|
newConnections = connections;
|
|
233
241
|
}
|
|
234
242
|
if (newConnections && newConnections.length) {
|
|
235
|
-
conn.id = newConnections[0]
|
|
243
|
+
conn.id = (_a = newConnections[0]) === null || _a === void 0 ? void 0 : _a.id;
|
|
236
244
|
}
|
|
237
245
|
else {
|
|
238
246
|
logger_1.default.warn(`Unable to find ID for newly created ${typeName} '${conn.name}' when updating enabled clients`);
|
|
239
247
|
}
|
|
240
248
|
return conn;
|
|
241
|
-
}));
|
|
249
|
+
})));
|
|
242
250
|
}
|
|
243
251
|
// Process enabled clients for each change type
|
|
244
252
|
// Delete is handled by the `processChanges` method, removed connection completely
|
|
245
|
-
|
|
253
|
+
yield Promise.all([
|
|
246
254
|
...createWithId.map((conn) => (0, exports.updateConnectionEnabledClients)(auth0Client, typeName, conn.id, conn.enabled_clients)),
|
|
247
255
|
...update.map((conn) => (0, exports.updateConnectionEnabledClients)(auth0Client, typeName, conn.id, conn.enabled_clients)),
|
|
248
256
|
...conflicts.map((conn) => (0, exports.updateConnectionEnabledClients)(auth0Client, typeName, conn.id, conn.enabled_clients)),
|
|
249
257
|
]);
|
|
250
|
-
};
|
|
258
|
+
});
|
|
251
259
|
exports.processConnectionEnabledClients = processConnectionEnabledClients;
|
|
252
260
|
class ConnectionsHandler extends default_1.default {
|
|
253
261
|
constructor(config) {
|
|
254
|
-
super({
|
|
255
|
-
...config,
|
|
256
|
-
type: 'connections',
|
|
257
|
-
stripUpdateFields: ['strategy', 'name'],
|
|
258
|
-
functions: {
|
|
262
|
+
super(Object.assign(Object.assign({}, config), { type: 'connections', stripUpdateFields: ['strategy', 'name'], functions: {
|
|
259
263
|
// When `connections` is updated, it can result in `update`,`create` or `delete` action on SCIM.
|
|
260
264
|
// Because, `scim_configuration` is inside `connections`.
|
|
261
|
-
update:
|
|
265
|
+
update: (requestParams, bodyParams) => __awaiter(this, void 0, void 0, function* () { return yield this.scimHandler.updateOverride(requestParams, bodyParams); }),
|
|
262
266
|
// When a new `connection` is created. We can perform only `create` option on SCIM.
|
|
263
267
|
// When a connection is `deleted`. `scim_configuration` is also deleted along with it; no action on SCIM is required.
|
|
264
|
-
create:
|
|
265
|
-
}
|
|
266
|
-
});
|
|
268
|
+
create: (bodyParams) => __awaiter(this, void 0, void 0, function* () { return yield this.scimHandler.createOverride(bodyParams); }),
|
|
269
|
+
} }));
|
|
267
270
|
// @ts-ignore
|
|
268
271
|
this.scimHandler = new scimHandler_1.default(this.config, this.client.connections, this.client.pool);
|
|
269
272
|
}
|
|
@@ -273,102 +276,104 @@ class ConnectionsHandler extends default_1.default {
|
|
|
273
276
|
getFormattedOptions(connection, clients) {
|
|
274
277
|
try {
|
|
275
278
|
return {
|
|
276
|
-
options: {
|
|
277
|
-
...connection.options,
|
|
278
|
-
idpinitiated: {
|
|
279
|
-
...connection.options.idpinitiated,
|
|
280
|
-
client_id: (0, utils_1.convertClientNameToId)(connection.options.idpinitiated.client_id, clients),
|
|
281
|
-
},
|
|
282
|
-
},
|
|
279
|
+
options: Object.assign(Object.assign({}, connection.options), { idpinitiated: Object.assign(Object.assign({}, connection.options.idpinitiated), { client_id: (0, utils_1.convertClientNameToId)(connection.options.idpinitiated.client_id, clients) }) }),
|
|
283
280
|
};
|
|
284
281
|
}
|
|
285
282
|
catch (e) {
|
|
286
283
|
return {};
|
|
287
284
|
}
|
|
288
285
|
}
|
|
289
|
-
|
|
290
|
-
|
|
286
|
+
getType() {
|
|
287
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
288
|
+
if (this.existing)
|
|
289
|
+
return this.existing;
|
|
290
|
+
const connections = yield (0, client_1.paginate)(this.client.connections.getAll, {
|
|
291
|
+
checkpoint: true,
|
|
292
|
+
include_totals: true,
|
|
293
|
+
});
|
|
294
|
+
// Filter out database connections as we have separate handler for it
|
|
295
|
+
const filteredConnections = connections.filter((c) => c.strategy !== 'auth0');
|
|
296
|
+
// If options option is empty for all connection, log the missing options scope.
|
|
297
|
+
const isOptionExists = filteredConnections.every((c) => c.options && Object.keys(c.options).length > 0);
|
|
298
|
+
if (!isOptionExists) {
|
|
299
|
+
logger_1.default.warn(`Insufficient scope the read:connections_options scope is required to get ${this.type} options.`);
|
|
300
|
+
}
|
|
301
|
+
this.existing = filteredConnections;
|
|
302
|
+
if (this.existing === null)
|
|
303
|
+
return [];
|
|
304
|
+
const connectionsWithEnabledClients = yield Promise.all(filteredConnections.map((con) => __awaiter(this, void 0, void 0, function* () {
|
|
305
|
+
const enabledClients = yield (0, exports.getConnectionEnabledClients)(this.client, con.id);
|
|
306
|
+
if (enabledClients && (enabledClients === null || enabledClients === void 0 ? void 0 : enabledClients.length)) {
|
|
307
|
+
return Object.assign(Object.assign({}, con), { enabled_clients: enabledClients });
|
|
308
|
+
}
|
|
309
|
+
return con;
|
|
310
|
+
})));
|
|
311
|
+
this.existing = connectionsWithEnabledClients;
|
|
312
|
+
// Apply `scim_configuration` to all the relevant `SCIM` connections. This method mutates `this.existing`.
|
|
313
|
+
yield this.scimHandler.applyScimConfiguration(this.existing);
|
|
291
314
|
return this.existing;
|
|
292
|
-
const connections = await (0, client_1.paginate)(this.client.connections.list, {
|
|
293
|
-
checkpoint: true,
|
|
294
315
|
});
|
|
295
|
-
// Filter out database connections as we have separate handler for it
|
|
296
|
-
const filteredConnections = connections.filter((c) => c.strategy !== 'auth0');
|
|
297
|
-
// If options option is empty for all connection, log the missing options scope.
|
|
298
|
-
const isOptionExists = filteredConnections.every((c) => c.options && Object.keys(c.options).length > 0);
|
|
299
|
-
if (!isOptionExists) {
|
|
300
|
-
logger_1.default.warn(`Insufficient scope the read:connections_options scope is required to get ${this.type} options.`);
|
|
301
|
-
}
|
|
302
|
-
this.existing = filteredConnections;
|
|
303
|
-
if (this.existing === null)
|
|
304
|
-
return [];
|
|
305
|
-
const connectionsWithEnabledClients = await Promise.all(filteredConnections.map(async (con) => {
|
|
306
|
-
if (!con?.id)
|
|
307
|
-
return con;
|
|
308
|
-
const enabledClients = await (0, exports.getConnectionEnabledClients)(this.client, con.id);
|
|
309
|
-
if (enabledClients && enabledClients?.length) {
|
|
310
|
-
return { ...con, enabled_clients: enabledClients };
|
|
311
|
-
}
|
|
312
|
-
return con;
|
|
313
|
-
}));
|
|
314
|
-
this.existing = connectionsWithEnabledClients;
|
|
315
|
-
// Apply `scim_configuration` to all the relevant `SCIM` connections. This method mutates `this.existing`.
|
|
316
|
-
await this.scimHandler.applyScimConfiguration(this.existing);
|
|
317
|
-
return this.existing;
|
|
318
316
|
}
|
|
319
|
-
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
if (!connections)
|
|
323
|
-
return {
|
|
324
|
-
del: [],
|
|
325
|
-
create: [],
|
|
326
|
-
update: [],
|
|
327
|
-
conflicts: [],
|
|
328
|
-
};
|
|
329
|
-
// Convert enabled_clients by name to the id
|
|
330
|
-
const clients = await (0, client_1.paginate)(this.client.clients.list, {
|
|
331
|
-
paginate: true,
|
|
332
|
-
include_totals: true,
|
|
317
|
+
calcChanges(assets) {
|
|
318
|
+
const _super = Object.create(null, {
|
|
319
|
+
calcChanges: { get: () => super.calcChanges }
|
|
333
320
|
});
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
321
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
322
|
+
const { connections } = assets;
|
|
323
|
+
// Do nothing if not set
|
|
324
|
+
if (!connections)
|
|
325
|
+
return {
|
|
326
|
+
del: [],
|
|
327
|
+
create: [],
|
|
328
|
+
update: [],
|
|
329
|
+
conflicts: [],
|
|
330
|
+
};
|
|
331
|
+
// Convert enabled_clients by name to the id
|
|
332
|
+
const clients = yield (0, client_1.paginate)(this.client.clients.getAll, {
|
|
333
|
+
paginate: true,
|
|
334
|
+
include_totals: true,
|
|
335
|
+
});
|
|
336
|
+
const existingConnections = yield (0, client_1.paginate)(this.client.connections.getAll, {
|
|
337
|
+
checkpoint: true,
|
|
338
|
+
include_totals: true,
|
|
339
|
+
});
|
|
340
|
+
// Prepare an id map. We'll use this map later to get the `strategy` and SCIM enable status of the connections.
|
|
341
|
+
yield this.scimHandler.createIdMap(existingConnections);
|
|
342
|
+
const formatted = connections.map((connection) => (Object.assign(Object.assign(Object.assign({}, connection), this.getFormattedOptions(connection, clients)), { enabled_clients: (0, utils_1.getEnabledClients)(assets, connection, existingConnections, clients) })));
|
|
343
|
+
const proposedChanges = yield _super.calcChanges.call(this, Object.assign(Object.assign({}, assets), { connections: formatted }));
|
|
344
|
+
const proposedChangesWithExcludedProperties = (0, exports.addExcludedConnectionPropertiesToChanges)({
|
|
345
|
+
proposedChanges,
|
|
346
|
+
existingConnections,
|
|
347
|
+
config: this.config,
|
|
348
|
+
});
|
|
349
|
+
return proposedChangesWithExcludedProperties;
|
|
337
350
|
});
|
|
338
|
-
// Prepare an id map. We'll use this map later to get the `strategy` and SCIM enable status of the connections.
|
|
339
|
-
await this.scimHandler.createIdMap(existingConnections);
|
|
340
|
-
const formatted = connections.map((connection) => ({
|
|
341
|
-
...connection,
|
|
342
|
-
...this.getFormattedOptions(connection, clients),
|
|
343
|
-
enabled_clients: (0, utils_1.getEnabledClients)(assets, connection, existingConnections, clients),
|
|
344
|
-
}));
|
|
345
|
-
const proposedChanges = await super.calcChanges({ ...assets, connections: formatted });
|
|
346
|
-
const proposedChangesWithExcludedProperties = (0, exports.addExcludedConnectionPropertiesToChanges)({
|
|
347
|
-
proposedChanges,
|
|
348
|
-
existingConnections,
|
|
349
|
-
config: this.config,
|
|
350
|
-
});
|
|
351
|
-
return proposedChangesWithExcludedProperties;
|
|
352
351
|
}
|
|
353
352
|
// Run after clients are updated so we can convert all the enabled_clients names to id's
|
|
354
|
-
|
|
355
|
-
const
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
353
|
+
processChanges(assets) {
|
|
354
|
+
const _super = Object.create(null, {
|
|
355
|
+
processChanges: { get: () => super.processChanges }
|
|
356
|
+
});
|
|
357
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
358
|
+
const { connections } = assets;
|
|
359
|
+
// Do nothing if not set
|
|
360
|
+
if (!connections)
|
|
361
|
+
return;
|
|
362
|
+
// If options option is empty for all connection, log the missing options scope.
|
|
363
|
+
const isOptionExists = connections.every((c) => c.options && Object.keys(c.options).length > 0);
|
|
364
|
+
if (!isOptionExists) {
|
|
365
|
+
logger_1.default.warn(`Insufficient scope the update:connections_options scope is required to update ${this.type} options.`);
|
|
366
|
+
}
|
|
367
|
+
const excludedConnections = (assets.exclude && assets.exclude.connections) || [];
|
|
368
|
+
const changes = yield this.calcChanges(assets);
|
|
369
|
+
yield _super.processChanges.call(this, assets, (0, utils_1.filterExcluded)(changes, excludedConnections));
|
|
370
|
+
// process enabled clients
|
|
371
|
+
yield (0, exports.processConnectionEnabledClients)(this.client, this.type, (0, utils_1.filterExcluded)(changes, excludedConnections));
|
|
372
|
+
});
|
|
369
373
|
}
|
|
370
374
|
}
|
|
371
375
|
exports.default = ConnectionsHandler;
|
|
372
376
|
__decorate([
|
|
373
377
|
(0, default_1.order)('60')
|
|
374
378
|
], ConnectionsHandler.prototype, "processChanges", null);
|
|
379
|
+
//# sourceMappingURL=connections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connections.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handl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O,qCAAqC,CAAC;QAC/C,CAAC;KAAA;IAED,wFAAwF;IAElF,cAAc,CAAC,MAAc;;;;;YACjC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;YAE/B,wBAAwB;YACxB,IAAI,CAAC,WAAW;gBAAE,OAAO;YAEzB,gFAAgF;YAChF,MAAM,cAAc,GAAG,WAAW,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;YAChG,IAAI,CAAC,cAAc,EAAE,CAAC;gBACpB,gBAAG,CAAC,IAAI,CACN,iFAAiF,IAAI,CAAC,IAAI,WAAW,CACtG,CAAC;YACJ,CAAC;YAED,MAAM,mBAAmB,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;YAEjF,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,uCAA+B,EACnC,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,IAAI,EACT,IAAA,sBAAc,EAAC,OAAO,EAAE,mBAAmB,CAAC,CAC7C,CAAC;QACJ,CAAC;KAAA;CACF;AA9JD,qCA8JC;AA3BO;IADL,IAAA,eAAK,EAAC,IAAI,CAAC;wDA2BX"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Management } from 'auth0';
|
|
2
1
|
import DefaultAPIHandler from './default';
|
|
3
2
|
import { Asset, Assets } from '../../../types';
|
|
4
3
|
export declare const schema: {
|
|
@@ -51,12 +50,10 @@ export declare const schema: {
|
|
|
51
50
|
required: string[];
|
|
52
51
|
};
|
|
53
52
|
};
|
|
54
|
-
type CustomDomain = Management.CustomDomain;
|
|
55
53
|
export default class CustomDomainsHadnler extends DefaultAPIHandler {
|
|
56
|
-
existing:
|
|
54
|
+
existing: Asset[] | null;
|
|
57
55
|
constructor(config: DefaultAPIHandler);
|
|
58
56
|
objString(item: Asset): string;
|
|
59
57
|
getType(): Promise<Asset | null>;
|
|
60
58
|
processChanges(assets: Assets): Promise<void>;
|
|
61
59
|
}
|
|
62
|
-
export {};
|
|
@@ -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
|
};
|
|
@@ -84,20 +93,14 @@ exports.schema = {
|
|
|
84
93
|
};
|
|
85
94
|
class CustomDomainsHadnler extends default_1.default {
|
|
86
95
|
constructor(config) {
|
|
87
|
-
super({
|
|
88
|
-
...config,
|
|
89
|
-
type: 'customDomains',
|
|
90
|
-
id: 'custom_domain_id',
|
|
91
|
-
identifiers: ['custom_domain_id', 'domain'],
|
|
92
|
-
stripCreateFields: [
|
|
96
|
+
super(Object.assign(Object.assign({}, config), { type: 'customDomains', id: 'custom_domain_id', identifiers: ['custom_domain_id', 'domain'], stripCreateFields: [
|
|
93
97
|
'status',
|
|
94
98
|
'primary',
|
|
95
99
|
'verification',
|
|
96
100
|
'certificate',
|
|
97
101
|
'created_at',
|
|
98
102
|
'updated_at',
|
|
99
|
-
],
|
|
100
|
-
stripUpdateFields: [
|
|
103
|
+
], stripUpdateFields: [
|
|
101
104
|
'status',
|
|
102
105
|
'primary',
|
|
103
106
|
'verification',
|
|
@@ -107,51 +110,58 @@ class CustomDomainsHadnler extends default_1.default {
|
|
|
107
110
|
'certificate',
|
|
108
111
|
'created_at',
|
|
109
112
|
'updated_at',
|
|
110
|
-
],
|
|
111
|
-
|
|
112
|
-
update: (args, data) => this.client.customDomains.update(args.custom_domain_id, data),
|
|
113
|
-
}
|
|
114
|
-
});
|
|
113
|
+
], functions: {
|
|
114
|
+
delete: (args) => this.client.customDomains.delete({ id: args.custom_domain_id }),
|
|
115
|
+
update: (args, data) => this.client.customDomains.update({ id: args.custom_domain_id }, data),
|
|
116
|
+
} }));
|
|
115
117
|
}
|
|
116
118
|
objString(item) {
|
|
117
119
|
return super.objString(item.domain);
|
|
118
120
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
getType() {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
try {
|
|
124
|
+
if (this.existing) {
|
|
125
|
+
return this.existing;
|
|
126
|
+
}
|
|
127
|
+
const customDomains = yield (0, client_1.paginate)(this.client.customDomains.getAll, {
|
|
128
|
+
checkpoint: true,
|
|
129
|
+
});
|
|
130
|
+
this.existing = customDomains;
|
|
131
|
+
return customDomains;
|
|
123
132
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
if (err.statusCode === 403 &&
|
|
132
|
-
err.message ===
|
|
133
|
-
'The account is not allowed to perform this operation, please contact our support team') {
|
|
134
|
-
return null;
|
|
133
|
+
catch (err) {
|
|
134
|
+
if (err.statusCode === 403 &&
|
|
135
|
+
err.message ===
|
|
136
|
+
'The account is not allowed to perform this operation, please contact our support team') {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
throw err;
|
|
135
140
|
}
|
|
136
|
-
|
|
137
|
-
}
|
|
141
|
+
});
|
|
138
142
|
}
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
143
|
+
processChanges(assets) {
|
|
144
|
+
const _super = Object.create(null, {
|
|
145
|
+
processChanges: { get: () => super.processChanges }
|
|
146
|
+
});
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
const { customDomains } = assets;
|
|
149
|
+
if (!customDomains)
|
|
150
|
+
return;
|
|
151
|
+
// Deprecation warnings for custom domains
|
|
152
|
+
if (customDomains.some((customDomain) => customDomain.primary != null)) {
|
|
153
|
+
logger_1.default.warn('The "primary" field is deprecated and may be removed in future versions for "customDomains"');
|
|
154
|
+
}
|
|
155
|
+
if (customDomains.some((customDomain) => 'verification_method' in customDomain)) {
|
|
156
|
+
logger_1.default.warn('The "verification_method" field is deprecated and may be removed in future versions for "customDomains"');
|
|
157
|
+
}
|
|
158
|
+
const changes = yield this.calcChanges(assets);
|
|
159
|
+
yield _super.processChanges.call(this, assets, changes);
|
|
160
|
+
});
|
|
152
161
|
}
|
|
153
162
|
}
|
|
154
163
|
exports.default = CustomDomainsHadnler;
|
|
155
164
|
__decorate([
|
|
156
165
|
(0, default_1.order)('50')
|
|
157
166
|
], CustomDomainsHadnler.prototype, "processChanges", null);
|
|
167
|
+
//# sourceMappingURL=customDomains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customDomains.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/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